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.
Files changed (50) hide show
  1. package/README.md +8 -5
  2. package/docs/CLI.md +19 -5
  3. package/docs/CONCEPTS.md +7 -0
  4. package/docs/CONFIGURATION.md +7 -3
  5. package/docs/GETTING_STARTED.md +19 -3
  6. package/docs/MCP.md +5 -1
  7. package/docs/PROTOCOL.md +17 -3
  8. package/docs/TROUBLESHOOTING.md +7 -7
  9. package/docs/UPGRADING.md +7 -4
  10. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +1 -1
  11. package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/skills/acc/SKILL.md +57 -10
  12. package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
  13. package/node_modules/@agents-can-communicate/adapter-codex/plugin/skills/acc/SKILL.md +57 -10
  14. package/node_modules/@agents-can-communicate/adapter-codex/src/adapter.mjs +5 -2
  15. package/node_modules/@agents-can-communicate/adapter-codex/src/app-server-client.mjs +2 -1
  16. package/node_modules/@agents-can-communicate/adapter-codex/src/install.mjs +1 -1
  17. package/node_modules/@agents-can-communicate/adapter-codex/src/live-permissions.mjs +37 -12
  18. package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance-host.mjs +1 -1
  19. package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +2 -1
  20. package/node_modules/@agents-can-communicate/adapter-codex/src/service-setup.mjs +135 -0
  21. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
  22. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/skills/acc/SKILL.md +57 -10
  23. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  24. package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
  25. package/node_modules/@agents-can-communicate/adapter-grok/plugin/skills/acc/SKILL.md +57 -10
  26. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  27. package/node_modules/@agents-can-communicate/adapter-kimi/plugin/skills/acc/SKILL.md +57 -10
  28. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  29. package/node_modules/@agents-can-communicate/cli/package.json +1 -1
  30. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +10 -5
  31. package/node_modules/@agents-can-communicate/cli/src/help.mjs +10 -3
  32. package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +15 -71
  33. package/node_modules/@agents-can-communicate/cli/src/install-delivery-consent.mjs +152 -0
  34. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/refresh.mjs +6 -1
  35. package/node_modules/@agents-can-communicate/cli/src/native-delivery-status.mjs +22 -5
  36. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  37. package/node_modules/@agents-can-communicate/core/src/inbox.mjs +8 -8
  38. package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
  39. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  40. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  41. package/node_modules/@agents-can-communicate/installer/src/apply.mjs +6 -2
  42. package/node_modules/@agents-can-communicate/installer/src/detect.mjs +11 -0
  43. package/node_modules/@agents-can-communicate/installer/src/ownership.mjs +6 -1
  44. package/node_modules/@agents-can-communicate/installer/src/plan.mjs +10 -2
  45. package/node_modules/@agents-can-communicate/installer/src/service-setup.mjs +30 -0
  46. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  47. package/node_modules/@agents-can-communicate/mcp-server/src/tools.mjs +8 -5
  48. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  49. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  50. 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
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/mcp-server",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -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: `Answer a message that asked for an acknowledgement, so it stops `
156
- + `demanding one. ${MUTATION_POLL}`,
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 answered."),
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. Call it while still working, not after: `
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("Participant taking over, if any."),
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
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/protocol",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/storage-filesystem",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-can-communicate",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "accManagedUpdateProtocol": 2,
5
5
  "accStoreVersion": 6,
6
6
  "type": "module",