Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
9523d21
Add gateway infrastructure and Word document-properties command family
pplupo Aug 6, 2026
a70296b
Switch GatewayCommandRunner to the in-process CDP bridge, wire up sta…
pplupo Aug 6, 2026
73223fc
Update test-scope comment now that target resolution is real, not a stub
pplupo Aug 6, 2026
488c42a
Add Word content-enumeration command family (§B2)
pplupo Aug 6, 2026
2a45d8d
Add Word insert/edit-text command family (§B3)
pplupo Aug 6, 2026
2fe5231
Add Word character-formatting command family (§B4)
pplupo Aug 6, 2026
b418f6d
Add Word paragraph-formatting command family (§B5)
pplupo Aug 6, 2026
c17ce1c
Add Word search & replace command family (§B6)
pplupo Aug 6, 2026
014dc2f
Add Word table command family (§B7)
pplupo Aug 6, 2026
a6ba442
Add Word style command family (§B8)
pplupo Aug 6, 2026
43a1104
Add Word image/shape command family (§B9)
pplupo Aug 6, 2026
fb6f0cd
Add Word headers/footers and page-setup command family (§B10)
pplupo Aug 6, 2026
d303fa8
Add Word bookmarks/hyperlinks command family (§B11)
pplupo Aug 6, 2026
c79abf6
Add Word form-field command family (§B12, checkbox forms deferred)
pplupo Aug 6, 2026
f3e5c04
Add Word comments and track-changes command family (§B13)
pplupo Aug 6, 2026
5203e0b
Package eo-ctl into the DesktopEditors install/deploy bundle
pplupo Aug 6, 2026
11b0b90
Run the gateway CTest suite as part of the server build
pplupo Aug 6, 2026
e00fb85
Add Cell sheet-management command family (§C1)
pplupo Aug 6, 2026
6c15464
Add Cell range read/write command family (§C2)
pplupo Aug 6, 2026
a160aa8
Add Cell number-format/merge/clear command family (§C3)
pplupo Aug 6, 2026
7b033fa
Add Cell copy/find/replace command family (§C4)
pplupo Aug 6, 2026
46af3b0
Add Cell formatting command family (§C5)
pplupo Aug 6, 2026
5e830d0
Add Cell conditional-formatting command family (§C6)
pplupo Aug 6, 2026
40547fc
Add Cell data-validation/named-range command family (§C7)
pplupo Aug 6, 2026
329952a
Add Cell AutoFilter command family (§C8)
pplupo Aug 6, 2026
1a81212
Add Cell PivotTable command family (§C9)
pplupo Aug 6, 2026
576ee9a
Add Cell freeze-panes command family (§C10)
pplupo Aug 6, 2026
666ef9b
Add Cell image/OLE command family (§C11, shapes deferred)
pplupo Aug 6, 2026
f300ab3
Add Cell comments-with-replies command family (§C12)
pplupo Aug 6, 2026
0d9dd96
Add Cell insert/delete row/column command family (§C13)
pplupo Aug 6, 2026
1c4b407
Add Cell recalculate-formulas command family (§C14)
pplupo Aug 6, 2026
93e614d
Add Cell chart command family (§C15)
pplupo Aug 6, 2026
add48cf
Add Cell SmartArt command family (§C16)
pplupo Aug 6, 2026
cb62f6f
Add Slide management command family (§D1)
pplupo Aug 7, 2026
b784541
Add Slide content-enumeration command family (§D2)
pplupo Aug 7, 2026
4935203
Add Slide layout/master command family (§D3, theme deferred)
pplupo Aug 7, 2026
8920fa1
Add Slide transition command family (§D4, background deferred)
pplupo Aug 7, 2026
63347c4
Add Slide shape/positioning command family (§D5)
pplupo Aug 7, 2026
6f115e0
Add Slide text-formatting command family (§D6)
pplupo Aug 7, 2026
ff00367
Add Slide image command family (§D7)
pplupo Aug 7, 2026
777cfc3
Add Slide table-editing command family (§D8, creation deferred)
pplupo Aug 7, 2026
a3a1d96
Add Slide speaker-notes command family (§D9)
pplupo Aug 7, 2026
7f5e358
Add Slide comments command family (§D10)
pplupo Aug 7, 2026
ba1ff67
Add Slide document-properties command family (§D11)
pplupo Aug 7, 2026
b048dca
Add PDF form-field command family (§E1)
pplupo Aug 7, 2026
5cd5ecf
gateway: implement PDF annotation commands (§E2)
pplupo Aug 7, 2026
f860803
gateway: implement PDF text search/selection/extraction commands (§E3)
pplupo Aug 7, 2026
f997867
gateway: implement PDF redaction commands (§E4)
pplupo Aug 7, 2026
2ef5222
gateway: implement PDF page operation commands (§E5)
pplupo Aug 7, 2026
73ab9ac
gateway tests: fix missing Qt6 RPATH so ctest can actually run
pplupo Aug 7, 2026
d78ba02
build: split ctest into its own RUN layer to avoid BuildKit log clipping
pplupo Aug 7, 2026
9ff65dc
gateway tests: derive RPATH from vcpkg's install layout, not Qt::Core…
pplupo Aug 7, 2026
6ccba2f
gateway tests: use CMAKE_INSTALL_RPATH, not CMAKE_BUILD_RPATH
pplupo Aug 7, 2026
a415dcb
gateway tests: use QT_ROOT (aqtinstall), not vcpkg's install tree, fo…
pplupo Aug 7, 2026
3bad911
gateway: add gateway.connect meta-command, fix eo-ctl connect to reso…
pplupo Aug 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .docker/desktop-apps.bake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,17 @@ FROM core-base AS desktop-linux
-DVCPKG_MANIFEST_FEATURES="desktop-editors" \
-DABOUT_PAGE_APP_NAME="${ABOUT_PAGE_APP_NAME}" \
/desktop-apps/win-linux/ && \
cmake --build . && \
cmake --build .

# Split from the compile step above so ctest's own output isn't sharing (and
# getting pushed out of) BuildKit's per-step 2MiB log buffer with the compiler's
# warning noise -- that clipping repeatedly hid ctest's actual per-test results
# during the gateway test suite's rollout.
RUN --mount=type=cache,target=/build-cache-desktop,id=build-cache-desktop-${CACHE_BUST} \
--mount=type=cache,target=/ccache,id=ccache \
export CCACHE_DIR=/ccache && \
cd /build-cache-desktop && \
ctest --test-dir . --output-on-failure && \
cmake --install . && \
ccache --show-stats && \
cp -a desktopeditors /desktopeditors
Expand Down
31 changes: 31 additions & 0 deletions win-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ if(UNIX)
add_definitions(-DLINUX -D_LINUX -D_WAYLAND)
endif()

# Gateway (see cdp-gateway-cli-plan.md): GatewayCommandRunner drives CDP in-process via
# CCefView::SendGatewayDevToolsMessage (CefBrowserHost::SendDevToolsMessage under the
# hood) -- no external --remote-debugging-port, no WebSocket client needed. An earlier
# design used Qt6WebSockets against an external CDP port; dropped after investigation
# showed the in-process CefBrowserHost API solves target resolution for free (see
# gatewaycommandrunner.h and the desktop-sdk cefview.h/.cpp changes on this branch).

if(NOT TARGET hunspell-wrapper)
add_subdirectory(${CORE_ROOT_DIR}/Common/3dParty/hunspell/qt hunspell-wrapper)
endif()
Expand Down Expand Up @@ -115,6 +122,14 @@ if(NOT TARGET allthemesgen)
add_subdirectory( "${CORE_ROOT_DIR}/DesktopEditor/allthemesgen" allthemesgen )
endif()

if(NOT TARGET eo-ctl)
add_subdirectory( "${CMAKE_CURRENT_LIST_DIR}/tools/eo-ctl/build/cmake" eo-ctl )
endif()

enable_testing()
add_subdirectory( "${CMAKE_CURRENT_LIST_DIR}/tests/gateway" gateway_tests )
add_subdirectory( "${CMAKE_CURRENT_LIST_DIR}/tools/eo-ctl/tests" eo_ctl_tests )

# 3. Definitions & Global Config
add_definitions(-D__DONT_WRITE_IN_APP_TITLE)
add_definitions(-DAPP_ICON_PATH="./res/icons/desktopeditors-eo.ico")
Expand All @@ -131,6 +146,14 @@ endif()

# 4. Source and Header Lists
set(COMMON_HEADERS
src/gateway/gatewaytypes.h
src/gateway/allowlist.h
src/gateway/gatewaycommandrunner.h
src/gateway/gatewayserver.h
src/gateway/commands/wordcommands.h
src/gateway/commands/cellcommands.h
src/gateway/commands/slidecommands.h
src/gateway/commands/pdfcommands.h
src/prop/defines_p.h
src/prop/cascapplicationmanagerwrapperintf.h
src/prop/version_p.h
Expand Down Expand Up @@ -180,6 +203,13 @@ set(COMMON_HEADERS
)

set(COMMON_SOURCES
src/gateway/allowlist.cpp
src/gateway/gatewaycommandrunner.cpp
src/gateway/gatewayserver.cpp
src/gateway/commands/wordcommands.cpp
src/gateway/commands/cellcommands.cpp
src/gateway/commands/slidecommands.cpp
src/gateway/commands/pdfcommands.cpp
src/prop/cmainwindowimpl.cpp
src/prop/utils.cpp
src/windows/cmainwindow.cpp
Expand Down Expand Up @@ -445,6 +475,7 @@ install(TARGETS
DesktopEditors
ascdocumentscore
qtascdocumentscore
eo-ctl
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
Expand Down
30 changes: 30 additions & 0 deletions win-linux/src/gateway/allowlist.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "allowlist.h"

namespace Gateway
{
AllowlistTable& AllowlistTable::Instance()
{
static AllowlistTable instance;
return instance;
}

void AllowlistTable::Register(const QString& command, CommandSpec spec)
{
m_commands.emplace(command, std::move(spec));
}

const CommandSpec* AllowlistTable::Find(const QString& command) const
{
auto it = m_commands.find(command);
return it == m_commands.end() ? nullptr : &it->second;
}

std::vector<QString> AllowlistTable::ListCommandNames() const
{
std::vector<QString> names;
names.reserve(m_commands.size());
for (const auto& entry : m_commands)
names.push_back(entry.first);
return names;
}
}
76 changes: 76 additions & 0 deletions win-linux/src/gateway/allowlist.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#ifndef GATEWAY_ALLOWLIST_H
#define GATEWAY_ALLOWLIST_H

#include <QString>
#include <QJsonObject>
#include <functional>
#include <map>

#include "gatewaytypes.h"

// One entry per allowlisted command. `validate` is a hand-rolled schema check (no
// generic JSON-schema engine — see cdp-gateway-cli-plan.md §9/YAGNI: this app has no
// existing JSON-schema dependency, and the schemas in gateway-test-case-designs.md are
// simple enough not to need one). `script` is the apiBuilder.js-backed script template;
// its only substitution point is the literal token %%SCOPE%%, filled by
// GatewayCommandRunner with QJsonDocument(scope).toJson(Compact) — never by
// interpolating individual scope fields into the template string. See §2 of the plan.
namespace Gateway
{
struct CommandSpec
{
// Returns an empty QString if `scope` is valid, otherwise a human-readable reason.
std::function<QString(const QJsonObject& scope)> validate;
QString script;
};

class AllowlistTable
{
public:
static AllowlistTable& Instance();

// Registers a command. Called from each *Commands.cpp's static registration
// block (WordCommands.cpp, CellCommands.cpp, SlideCommands.cpp, PdfCommands.cpp).
void Register(const QString& command, CommandSpec spec);

// Returns nullptr if `command` is not allowlisted.
const CommandSpec* Find(const QString& command) const;

// eo-ctl's `allowlist` subcommand and the gateway's introspection endpoint both
// read this — command names only, no schema/script internals leaked.
std::vector<QString> ListCommandNames() const;

private:
std::map<QString, CommandSpec> m_commands;
};

// --- small reusable scope-field validators, shared across command families ---

inline QString RequireInt(const QJsonObject& scope, const QString& field, int minimum = 0)
{
if (!scope.contains(field) || !scope.value(field).isDouble())
return QStringLiteral("scope.%1 must be an integer").arg(field);
double v = scope.value(field).toDouble();
if (v != static_cast<int>(v) || static_cast<int>(v) < minimum)
return QStringLiteral("scope.%1 must be an integer >= %2").arg(field).arg(minimum);
return QString();
}

inline QString RequireString(const QJsonObject& scope, const QString& field, bool allowEmpty = true)
{
if (!scope.contains(field) || !scope.value(field).isString())
return QStringLiteral("scope.%1 must be a string").arg(field);
if (!allowEmpty && scope.value(field).toString().isEmpty())
return QStringLiteral("scope.%1 must not be empty").arg(field);
return QString();
}

inline QString RequireBool(const QJsonObject& scope, const QString& field)
{
if (!scope.contains(field) || !scope.value(field).isBool())
return QStringLiteral("scope.%1 must be a boolean").arg(field);
return QString();
}
}

#endif // GATEWAY_ALLOWLIST_H
Loading