@kagura-agent/atlas-openclaw 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +4 -2
  2. package/package.json +1 -1
  3. package/worker.mjs +31 -2
package/README.md CHANGED
@@ -52,7 +52,9 @@ Reads, heartbeat renewals and writes protected by server receipts retry transien
52
52
 
53
53
  Streaming previews coalesce, serialize and stop before final settlement. A preview failure does not prevent later updates or the final response. Final delivery seals the draft; callbacks arriving after cancellation or dispatcher completion cannot alter it.
54
54
 
55
- Each turn gets a fresh OpenClaw session with Atlas's completed conversation history. Cancelled and failed prompts are excluded so runtime transcript replay cannot revive them. Atlas preserves OpenClaw's configured tool policy, including terminal and file tools, explicit denials, sandboxing and approval requirements. The additional `atlas_board` tool exists only for its bound task and cannot choose another board or acquire a new scope. Atlas content must be accessed through that scoped tool; unrelated tasks use the agent's other configured tools. Stop aborts the dispatcher; only after it returns does the plugin report settlement. OpenClaw error payloads are failures, not successful replies.
55
+ Each turn gets a fresh OpenClaw session with Atlas's completed conversation history. Cancelled and failed prompts are excluded so runtime transcript replay cannot revive them. Atlas preserves OpenClaw's configured tool policy, including terminal and file tools, explicit denials, sandboxing and approval requirements. The additional `atlas_board` tool exists only for its bound task. Writes stay on the current board within the task's granted objects. Atlas content must be accessed through that scoped tool; unrelated tasks use the agent's other configured tools. Stop aborts the dispatcher; only after it returns does the plugin report settlement. OpenClaw error payloads are failures, not successful replies.
56
+
57
+ From plugin 0.1.6, `read` can reference another board by ID or URL from the same Atlas server. Read its overview first, then request the relevant objects. Atlas checks the user's board access and shows a separate read permission card in the chat. The tool waits for the decision and resumes the same call. Allow once binds the exact request; Allow for this chat covers that target for the same user, connection and Atlas conversation. The grant survives fresh OpenClaw turn sessions, but never extends writes to the reference board. Board access is checked again before returning cached read receipts. A declined read is a consent decision, not a board sharing error. Ordinary `ask` answers cannot grant access. Users with viewing or commenting rights can run read-only conversations.
56
58
 
57
59
  Tool discovery can load the plugin separately from its channel worker. Run authority therefore travels through OpenClaw's native tool binding, rather than a process-global session map. The binding is separate from model input; credentials come from the selected account's host configuration. The host checks invocation lifetime, and Atlas validates the lease and canvas scope on every request.
58
60
 
@@ -73,4 +75,4 @@ This comparison uses static source at Cove commit `3de8390882e8b0170b493d4f81001
73
75
  | Authorization and sessions | Cove admits channel messages before enrichment and uses canonical thread sessions | Atlas checks worker and board permissions before claim; fresh sessions use completed Atlas history, the host's tool policy and a scoped board tool |
74
76
  | Platform features | Cove has group policy, commands, reactions, recurring tasks, media delivery, child-run hooks and usage collection | Atlas does not mirror Cove's group UI, media rendering, child-run progress or cost accounting. Tool availability remains the OpenClaw operator's policy |
75
77
 
76
- The supported OpenClaw SDK requires `contracts.tools` in the manifest. Atlas uses its buffered reply dispatcher; Cove's `runInboundReplyTurn` wrapper is not exported by the minimum supported host. Package verification checks installation and account resolution, then starts a real gateway against an isolated Atlas fixture and deterministic model. It must execute a terminal command, preserve an explicit tool denial, read the board and deliver the final reply on both the minimum and latest OpenClaw versions. Failure regressions live in [channel tests](https://github.com/kagura-chen/atlas/blob/main/tests/openclaw-channel.test.ts).
78
+ The supported OpenClaw SDK requires `contracts.tools` in the manifest. Atlas uses its buffered reply dispatcher; Cove's `runInboundReplyTurn` wrapper is not exported by the minimum supported host. Package verification checks installation and account resolution, then starts a real gateway against an isolated Atlas fixture and deterministic model. It must execute a terminal command, preserve an explicit tool denial, read the board, resume a reference read after consent and deliver the final reply on both the minimum and latest OpenClaw versions. Failure regressions live in [channel tests](https://github.com/kagura-chen/atlas/blob/main/tests/openclaw-channel.test.ts).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kagura-agent/atlas-openclaw",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Connect an external OpenClaw agent to Atlas conversations and canvas tools",
5
5
  "repository": {
6
6
  "type": "git",
package/worker.mjs CHANGED
@@ -42,7 +42,7 @@ export function boardTool(context, request) {
42
42
  name: "atlas_board",
43
43
  label: "Atlas board",
44
44
  description:
45
- "Read the current Atlas run context, get the canvas composer skill, create or update native canvas objects, or ask the user a structured question. Only this run's selected objects and newly created objects are writable. Read skill before writing. Never use another tool to access Atlas.",
45
+ "Read the current Atlas run context, or reference another board with board set to its ID or URL. For reference boards, read mode overview first, then mode content with widgetIds. Atlas handles permission and waits for the user's decision. Reference boards are read-only; create/update always target the current task board and its granted objects. Get skill before writing; use ask only for clarification. Never use another tool to access Atlas.",
46
46
  parameters: {
47
47
  type: "object",
48
48
  additionalProperties: false,
@@ -58,6 +58,24 @@ export function boardTool(context, request) {
58
58
  },
59
59
  question: { type: "string" },
60
60
  options: { type: "array", items: { type: "string" }, maxItems: 6 },
61
+ board: {
62
+ type: "string",
63
+ description:
64
+ "Another Atlas board ID or URL; read only. Omit for current task context.",
65
+ },
66
+ mode: {
67
+ type: "string",
68
+ enum: ["overview", "content"],
69
+ description: "Reference read mode; defaults to overview.",
70
+ },
71
+ widgetIds: {
72
+ type: "array",
73
+ items: { type: "string" },
74
+ minItems: 1,
75
+ maxItems: 100,
76
+ description:
77
+ "Objects from the reference overview to read in content mode.",
78
+ },
61
79
  },
62
80
  },
63
81
  async execute(callId, args, signal) {
@@ -72,7 +90,18 @@ export function boardTool(context, request) {
72
90
  { signal, idempotent: true },
73
91
  );
74
92
  const requestId = `tool:${callId}`;
75
- const result = await post("tool", { ...args, requestId });
93
+ let result = await post("tool", { ...args, requestId });
94
+ while (result.status === "consent_required") {
95
+ await sleep(1000, undefined, { signal });
96
+ const state = await post("heartbeat", {});
97
+ if (!["running", "waiting"].includes(state.status))
98
+ throw new Error(
99
+ "The Atlas task stopped while waiting for permission",
100
+ );
101
+ if (state.consent?.id === result.consentId) continue;
102
+ // Resume the same call so Allow once cannot authorize different arguments.
103
+ result = await post("tool", { ...args, requestId });
104
+ }
76
105
  if (args.action === "ask") {
77
106
  for (;;) {
78
107
  await sleep(1000, undefined, { signal });