Go to file
2026-05-05 11:14:01 +08:00
.github/workflows Pin GitHub Actions for org policy 2026-05-05 11:12:21 +08:00
src Initial OpenClaw XWorkmate artifacts plugin 2026-05-05 11:08:01 +08:00
.gitignore Initial OpenClaw XWorkmate artifacts plugin 2026-05-05 11:08:01 +08:00
index.test.ts Initial OpenClaw XWorkmate artifacts plugin 2026-05-05 11:08:01 +08:00
index.ts Initial OpenClaw XWorkmate artifacts plugin 2026-05-05 11:08:01 +08:00
openclaw.plugin.json Rename package to xworkmate-artifacts 2026-05-05 11:09:43 +08:00
package.json Rename package to xworkmate-artifacts 2026-05-05 11:09:43 +08:00
pnpm-lock.yaml Initial OpenClaw XWorkmate artifacts plugin 2026-05-05 11:08:01 +08:00
README.md Document xworkmate artifacts plugin 2026-05-05 11:14:01 +08:00
tsconfig.json Initial OpenClaw XWorkmate artifacts plugin 2026-05-05 11:08:01 +08:00

xworkmate-artifacts

OpenClaw Gateway plugin that exports structured workspace artifact manifests for XWorkmate.

Why

XWorkmate talks to OpenClaw through xworkmate-bridge using the existing /gateway/openclaw task contract. The bridge sends chat.send, waits for agent.wait, then asks this plugin for a structured artifact manifest. The APP can then sync generated files into its local thread workspace without changing the UI or adding provider-specific routes.

It registers one Gateway method:

xworkmate.artifacts.export

The method scans the resolved OpenClaw workspace after a run finishes and returns safe, relative artifact entries that XWorkmate Bridge can normalize into the APP artifacts[] contract.

Install

Install from npm:

npm install -g xworkmate-artifacts
openclaw plugins enable xworkmate-artifacts

Or install from a Git checkout for development:

git clone https://github.com/x-evor/xworkmate-artifacts.git
openclaw plugins install --link ./xworkmate-artifacts
openclaw plugins enable xworkmate-artifacts

Equivalent config shape for a linked checkout:

{
  "plugins": {
    "load": {
      "paths": [
        "/path/to/xworkmate-artifacts"
      ]
    },
    "entries": {
      "xworkmate-artifacts": {
        "enabled": true
      }
    }
  }
}

Contract

Request params:

{
  "sessionKey": "thread-main",
  "runId": "turn-1",
  "sinceUnixMs": 1770000000000,
  "maxFiles": 64,
  "maxInlineBytes": 10485760
}

Response payload:

{
  "runId": "turn-1",
  "sessionKey": "thread-main",
  "remoteWorkingDirectory": "/home/user/.openclaw/workspace",
  "remoteWorkspaceRefKind": "remotePath",
  "artifacts": [
    {
      "relativePath": "reports/final.md",
      "label": "final.md",
      "contentType": "text/markdown",
      "sizeBytes": 1234,
      "sha256": "..."
    }
  ],
  "warnings": []
}

Files at or below maxInlineBytes also include encoding: "base64" and content.

Limits

  • Only files inside the resolved OpenClaw workspace are exported.
  • .git, .openclaw, .pi, build outputs, and dependency folders are skipped.
  • Symlinks are skipped to avoid workspace escape.
  • Files larger than maxInlineBytes are listed with metadata and a warning, but are not inlined.

Development

pnpm install
pnpm test
pnpm typecheck
pnpm pack:check