agents-can-communicate 0.5.2 → 0.5.4
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.
- package/README.md +8 -5
- package/docs/CLI.md +19 -5
- package/docs/CONCEPTS.md +7 -0
- package/docs/CONFIGURATION.md +7 -3
- package/docs/GETTING_STARTED.md +19 -3
- package/docs/MCP.md +5 -1
- package/docs/PROTOCOL.md +17 -3
- package/docs/TROUBLESHOOTING.md +7 -7
- package/docs/UPGRADING.md +7 -4
- package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/skills/acc/SKILL.md +57 -10
- package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-codex/plugin/skills/acc/SKILL.md +57 -10
- package/node_modules/@agents-can-communicate/adapter-codex/src/adapter.mjs +5 -2
- package/node_modules/@agents-can-communicate/adapter-codex/src/app-server-client.mjs +2 -1
- package/node_modules/@agents-can-communicate/adapter-codex/src/install.mjs +1 -1
- package/node_modules/@agents-can-communicate/adapter-codex/src/live-permissions.mjs +37 -12
- package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance-host.mjs +1 -1
- package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +2 -1
- package/node_modules/@agents-can-communicate/adapter-codex/src/service-setup.mjs +135 -0
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/skills/acc/SKILL.md +57 -10
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-grok/plugin/skills/acc/SKILL.md +57 -10
- package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-kimi/plugin/skills/acc/SKILL.md +57 -10
- package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
- package/node_modules/@agents-can-communicate/cli/package.json +1 -1
- package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +10 -5
- package/node_modules/@agents-can-communicate/cli/src/help.mjs +10 -3
- package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +15 -71
- package/node_modules/@agents-can-communicate/cli/src/install-delivery-consent.mjs +152 -0
- package/node_modules/@agents-can-communicate/cli/src/managed-runtime/refresh.mjs +6 -1
- package/node_modules/@agents-can-communicate/cli/src/native-delivery-status.mjs +22 -5
- package/node_modules/@agents-can-communicate/core/package.json +1 -1
- package/node_modules/@agents-can-communicate/core/src/inbox.mjs +8 -8
- package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
- package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
- package/node_modules/@agents-can-communicate/installer/package.json +1 -1
- package/node_modules/@agents-can-communicate/installer/src/apply.mjs +6 -2
- package/node_modules/@agents-can-communicate/installer/src/detect.mjs +11 -0
- package/node_modules/@agents-can-communicate/installer/src/ownership.mjs +6 -1
- package/node_modules/@agents-can-communicate/installer/src/plan.mjs +10 -2
- package/node_modules/@agents-can-communicate/installer/src/service-setup.mjs +30 -0
- package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
- package/node_modules/@agents-can-communicate/mcp-server/src/tools.mjs +8 -5
- package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
- package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Invoked only after adapter configuration and ownership/consent persistence.
|
|
2
|
+
// A failed service command must not erase the successful adapter operation.
|
|
3
|
+
export async function applyServiceSetup({ adapter, context, operation, results }) {
|
|
4
|
+
const plan = operation.nativeServiceSetup;
|
|
5
|
+
if (!plan || operation.livePolicy === "off" || operation.deliveryDecision?.completeSetup !== true) return;
|
|
6
|
+
let setup = plan;
|
|
7
|
+
if (["needed", "ready"].includes(plan.state)) {
|
|
8
|
+
try {
|
|
9
|
+
setup = await adapter.prepareNativeServiceSetup({ context, plan });
|
|
10
|
+
if (!setup || !["ready", "failed", "blocked"].includes(setup.state)) throw new Error("invalid setup result");
|
|
11
|
+
} catch {
|
|
12
|
+
setup = { state: "failed", started: false, reasonCode: "service_setup_failed",
|
|
13
|
+
diagnostic: `${adapter.displayName} service preparation failed; check the vendor service and retry acc install` };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
operation.nativeServiceSetup = setup;
|
|
17
|
+
if (setup.state === "ready") {
|
|
18
|
+
const stale = new Set([operation.deliverySummary, operation.deliveryDiagnostic, plan.diagnostic]);
|
|
19
|
+
operation.summary = (operation.summary ?? []).filter(line => !stale.has(line));
|
|
20
|
+
operation.summary.push(setup.diagnostic);
|
|
21
|
+
operation.diagnostics = (operation.diagnostics ?? []).filter(line => !stale.has(line));
|
|
22
|
+
operation.deliverySummary = setup.diagnostic;
|
|
23
|
+
operation.deliveryDiagnostic = setup.diagnostic;
|
|
24
|
+
} else {
|
|
25
|
+
operation.needsAction.push(setup.diagnostic);
|
|
26
|
+
if (setup.state === "failed") results.failed.push({ adapterId: operation.adapterId,
|
|
27
|
+
error: setup.diagnostic, reasonCode: setup.reasonCode });
|
|
28
|
+
}
|
|
29
|
+
operation.diagnostics.push(setup.diagnostic);
|
|
30
|
+
}
|
|
@@ -128,6 +128,7 @@ export const PUBLIC_TOOLS = Object.freeze([
|
|
|
128
128
|
name: "acc_reply",
|
|
129
129
|
description: `Reply to one addressed message and acknowledge the original in the same `
|
|
130
130
|
+ `operation. The reply is attributed and linked with inReplyTo. `
|
|
131
|
+
+ `May follow an acknowledgement or an earlier answer; a distinct reply needs a new retry key. `
|
|
131
132
|
+ `Returns message and delivery for the outgoing reply, plus receipt for the original. `
|
|
132
133
|
+ `${OUTGOING} ${MUTATION_POLL}`,
|
|
133
134
|
inputSchema: object({
|
|
@@ -152,16 +153,18 @@ export const PUBLIC_TOOLS = Object.freeze([
|
|
|
152
153
|
},
|
|
153
154
|
{
|
|
154
155
|
name: "acc_ack",
|
|
155
|
-
description: `
|
|
156
|
-
+ `
|
|
156
|
+
description: `Acknowledge receipt without accepting work or writing an answer. `
|
|
157
|
+
+ `An unanswered question/request requires acc_reply; acc_ack refuses without changing its receipt. `
|
|
158
|
+
+ `Acknowledgement does not prevent a later reply. ${MUTATION_POLL}`,
|
|
157
159
|
inputSchema: object({
|
|
158
|
-
messageId: string("The message being
|
|
160
|
+
messageId: string("The message being acknowledged."),
|
|
159
161
|
}, ["messageId"]),
|
|
160
162
|
},
|
|
161
163
|
{
|
|
162
164
|
name: "acc_finish",
|
|
163
165
|
description: `Record a handoff describing what was completed and what remains, and `
|
|
164
|
-
+ `release the claims this session owns
|
|
166
|
+
+ `release the claims this session owns and close its ACC presence. `
|
|
167
|
+
+ `Status describes the original goal, not peer acceptance. Call it while still working, not after: `
|
|
165
168
|
+ `nothing else writes the summary for you. ${OUTGOING} ${MUTATION_POLL}`,
|
|
166
169
|
inputSchema: object({
|
|
167
170
|
goal: string("What this stretch of work was for."),
|
|
@@ -169,7 +172,7 @@ export const PUBLIC_TOOLS = Object.freeze([
|
|
|
169
172
|
completed: stringList("What was finished."),
|
|
170
173
|
remaining: stringList("What is left."),
|
|
171
174
|
blockers: stringList("What is in the way."),
|
|
172
|
-
toParticipantId: string("
|
|
175
|
+
toParticipantId: string("Intended recipient, if any; sending does not establish acceptance."),
|
|
173
176
|
clientMessageId: string("Retry key; supply before sending if needed after a lost response. Omit to generate one returned in message."),
|
|
174
177
|
}, ["goal"]),
|
|
175
178
|
},
|