From 7e0feed3472cc240631a5300a6c2cdd2545928da Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Fri, 10 Apr 2026 17:40:29 +0800 Subject: [PATCH] fix github actions workflow pinning --- .github/workflows/pipeline.yml | 22 +++++----- AGENTS.md | 24 +++++++++++ ...emote-agent-local-workspace-test-matrix.md | 41 +++++++++++++++++++ 3 files changed, 76 insertions(+), 11 deletions(-) create mode 100644 AGENTS.md create mode 100644 docs/testing/remote-agent-local-workspace-test-matrix.md diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 1644e23..d9e80ee 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -43,16 +43,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version-file: go.mod cache: true - name: Set up golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6 with: version: v1.64.8 @@ -65,10 +65,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version-file: go.mod cache: true @@ -77,7 +77,7 @@ jobs: run: bash ./scripts/github-actions/build-artifact.sh dist - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: xworkmate-bridge-linux-amd64 path: dist/xworkmate-bridge @@ -93,26 +93,26 @@ jobs: INTERNAL_SERVICE_TOKEN: ${{ github.event_name == 'workflow_dispatch' && inputs.internal_service_token || secrets.INTERNAL_SERVICE_TOKEN }} steps: - name: Checkout service repository - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: path: xworkmate-bridge - name: Checkout playbooks repository - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: repository: x-evor/playbooks token: ${{ secrets.WORKSPACE_REPO_TOKEN || github.token }} path: playbooks - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version-file: xworkmate-bridge/go.mod cache: true cache-dependency-path: xworkmate-bridge/go.sum - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.11" @@ -157,7 +157,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Validate deployed endpoints run: bash ./scripts/github-actions/validate-deploy.sh diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..150015a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,24 @@ +# AGENTS + +## Deployment Naming Rules + +### Caddy config file naming + +Use the following filename format for generated Caddy config files: + +```text +---.caddy +``` + +Example: + +```text +console-6ebcdd6-jp-xhttp-contabo-console-svc-plus.caddy +``` + +Notes: + +- `server-name` is the service or site identifier, such as `console` +- `release_id` is the normalized release identifier; use the release tag when available, otherwise use a short git commit id +- `hostname` is the target host name +- `domain` should be encoded in a filesystem-friendly form; replace `.` with `-` diff --git a/docs/testing/remote-agent-local-workspace-test-matrix.md b/docs/testing/remote-agent-local-workspace-test-matrix.md new file mode 100644 index 0000000..abf72e3 --- /dev/null +++ b/docs/testing/remote-agent-local-workspace-test-matrix.md @@ -0,0 +1,41 @@ +# Remote Agent -> APP Local Workspace Test Matrix + +## Scope + +This matrix tracks the current project status for the "APP workspace first, remote agent returns artifacts back to the local thread workspace" model. + +- Bridge RPC surface: `session.start`, `session.message` +- APP local-first result handling: write returned `artifacts` into the current local thread workspace +- Remote execution metadata: keep `remoteWorkingDirectory` / `remoteWorkspaceRefKind` as thread metadata only + +## Matrix + +| Case | 输入类型 | 目标能力 | 当前项目标记 | 对应接口 | 关键断言 | 主要代码路径 | 当前测试落点 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `pptx` | 文稿生成 + 二次追问 | 单 agent + 追问续写 | 已实现,待补专项 E2E 断言 | `session.start`, `session.message` | 首轮生成 `.pptx`;同线程追问继续修改;APP 线程 `workspaceBinding` 保持 `localFs`;远程目录只记录到 metadata | Bridge: `internal/acp/server.go`, `internal/acp/execution.go`;APP: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/go_task_service_client.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/runtime_models_runtime_payloads.dart` | APP runtime: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/app_controller_ai_gateway_chat_suite_single_agent.dart`;Bridge E2E: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/bridge_real_e2e_suite.dart` | +| `docx` | 周报生成 | 文档产出 | 已实现,待补内容结构专项断言 | `session.start` | 生成 `.docx`;结果写回当前线程本地目录;同名文件版本化为 `.v2`;内容结构可进一步做文档级校验 | Bridge: `internal/acp/server.go`, `internal/acp/execution.go`;APP: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart` | APP runtime: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/app_controller_ai_gateway_chat_suite_single_agent.dart` | +| `xlsx` | 公式表格 | 表格计算 | 已实现,待补公式专项 E2E | `session.start`, `session.message` | 生成 `.xlsx`;写回当前线程;后续追问仍走同一本地 workspace;公式存在且可计算 | Bridge: `internal/acp/server.go`, `internal/acp/execution.go`;APP: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/go_task_service_client.dart` | APP runtime: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/app_controller_ai_gateway_chat_suite_single_agent.dart`;Bridge E2E: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/bridge_real_e2e_suite.dart` | +| `pdf` | 合并 / 转换 | 文件变换 | 已实现,待补页数/内容专项校验 | `session.start` | 产出 `.pdf`;页数或文本内容符合预期;结果写回当前线程本地目录;线程 workspace 不切到远程目录 | Bridge: `internal/acp/server.go`, `internal/acp/execution.go`;APP: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart` | Bridge E2E: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/bridge_real_e2e_suite.dart` | +| `image-resizer` | 图片处理 | 图片回写 | 已实现,待补尺寸断言自动化 | `session.start` | 输出图片写回当前线程;尺寸符合请求;同线程 artifact 面板可见;workspace 不变 | Bridge: `internal/acp/server.go`, `internal/acp/execution.go`;APP: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/desktop_thread_artifact_service.dart` | 规划/E2E: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/bridge_real_e2e_suite.dart`;artifact surface: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/desktop_thread_artifact_service_test.dart` | +| `browser` | 浏览器自动化 | 浏览 / 摘要 / 截图 / 日志 | Bridge 结果面已支持,真实 browser skill 链路待专项收口 | `session.start`, `session.message` | 文本摘要、截图、日志至少两类 artifact/summary 回写本地线程;继续追问复用本地 workspace,并可附带上次远程目录 hint | Bridge: `internal/acp/server.go`, `internal/acp/execution.go`;APP: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/go_task_service_client.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/desktop_thread_artifact_service.dart` | Bridge E2E: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/bridge_real_e2e_suite.dart`;APP runtime: `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/test/runtime/app_controller_ai_gateway_chat_suite_single_agent.dart` | + +## Shared Interfaces + +| Interface | 用途 | 代码路径 | +| --- | --- | --- | +| `session.start` | 首轮执行;生成初始结果与 artifact payload | `internal/acp/server.go` | +| `session.message` | 同线程 follow-up;复用本地 workspace,并允许携带远程目录 hint | `internal/acp/server.go` | +| `artifacts[]` | 结构化产物回传;APP 侧据此落盘 | `internal/acp/execution.go`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/go_task_service_client.dart` | +| `remoteWorkingDirectory` | 远程执行目录元数据,不替代 APP 本地 workspace | `internal/acp/execution.go`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/runtime_models_runtime_payloads.dart` | +| `remoteWorkspaceRefKind` | 远程目录类型元数据,不替代 APP 本地 workspace | `internal/acp/execution.go`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/runtime_models_runtime_payloads.dart` | +| `remoteWorkingDirectoryHint` | APP follow-up 请求时附带上一次远程目录提示 | `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/runtime/go_task_service_client.dart`, `/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/lib/app/app_controller_desktop_single_agent_go_task_flow.dart` | + +## Current Status Summary + +| Area | 状态 | 说明 | +| --- | --- | --- | +| Bridge 结构化结果面 | 已实现 | 成功结果会补 `artifacts`, `resultSummary`, `remoteWorkingDirectory`, `remoteWorkspaceRefKind` | +| APP 本地落盘 | 已实现 | inline artifact 会写回当前线程本地目录,并自动版本化同名文件 | +| 线程 metadata 分离 | 已实现 | 远程目录写入 thread context metadata,不再覆盖 `workspaceBinding` | +| 单元 / runtime 回归 | 已覆盖 | 已有 bridge 和 APP runtime 测试覆盖核心本地优先语义 | +| 六类真实场景专项验收 | 待继续补全 | 还需要把 `pptx/docx/xlsx/pdf/image-resizer/browser` 的真实 E2E 断言逐项补细 |