agents-can-communicate 0.4.2 → 0.4.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 (67) hide show
  1. package/README.md +12 -4
  2. package/bin/acc-maintenance-worker.mjs +6 -0
  3. package/docs/ARCHITECTURE.md +12 -5
  4. package/docs/CLI.md +13 -6
  5. package/docs/CONCEPTS.md +2 -1
  6. package/docs/CONFIGURATION.md +27 -1
  7. package/docs/GETTING_STARTED.md +10 -4
  8. package/docs/HOW_IT_WORKS.md +2 -1
  9. package/docs/PROTOCOL.md +4 -0
  10. package/docs/RELEASING.md +1 -1
  11. package/docs/SECURITY_MODEL.md +19 -5
  12. package/docs/TROUBLESHOOTING.md +22 -4
  13. package/docs/UPGRADING.md +60 -14
  14. package/docs/WHY_ACC.md +1 -1
  15. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +1 -1
  16. package/node_modules/@agents-can-communicate/adapter-claude-code/src/channel.mjs +2 -4
  17. package/node_modules/@agents-can-communicate/adapter-claude-code/src/native-delivery.mjs +3 -1
  18. package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
  19. package/node_modules/@agents-can-communicate/adapter-codex/src/adapter.mjs +6 -2
  20. package/node_modules/@agents-can-communicate/adapter-codex/src/config-block.mjs +4 -88
  21. package/node_modules/@agents-can-communicate/adapter-codex/src/install.mjs +36 -15
  22. package/node_modules/@agents-can-communicate/adapter-codex/src/live-permissions.mjs +110 -0
  23. package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance-host.mjs +120 -0
  24. package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance-threads.mjs +49 -0
  25. package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance.mjs +108 -0
  26. package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +1 -0
  27. package/node_modules/@agents-can-communicate/adapter-codex/src/permission-ownership.mjs +109 -0
  28. package/node_modules/@agents-can-communicate/adapter-codex/src/toml-scan.mjs +99 -0
  29. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
  30. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  31. package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
  32. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  33. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  34. package/node_modules/@agents-can-communicate/adapter-sdk/src/channel-directory.mjs +8 -0
  35. package/node_modules/@agents-can-communicate/adapter-sdk/src/index.mjs +1 -0
  36. package/node_modules/@agents-can-communicate/cli/package.json +1 -1
  37. package/node_modules/@agents-can-communicate/cli/src/args.mjs +1 -1
  38. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +5 -4
  39. package/node_modules/@agents-can-communicate/cli/src/help.mjs +2 -0
  40. package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +3 -0
  41. package/node_modules/@agents-can-communicate/cli/src/main.mjs +8 -4
  42. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/activation.mjs +45 -7
  43. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/command.mjs +15 -0
  44. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/diagnostics.mjs +35 -0
  45. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/entry.mjs +40 -8
  46. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/legacy-maintenance.mjs +47 -0
  47. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/maintenance-state.mjs +57 -0
  48. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/maintenance-worker.mjs +110 -0
  49. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/maintenance.mjs +92 -0
  50. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/management-recovery.mjs +71 -0
  51. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/refresh.mjs +6 -7
  52. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/schedule.mjs +4 -2
  53. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/worker.mjs +16 -4
  54. package/node_modules/@agents-can-communicate/cli/src/native-delivery-status.mjs +1 -1
  55. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  56. package/node_modules/@agents-can-communicate/core/src/receipts.mjs +1 -0
  57. package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
  58. package/node_modules/@agents-can-communicate/delivery-router/src/router.mjs +1 -1
  59. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  60. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  61. package/node_modules/@agents-can-communicate/installer/src/apply.mjs +4 -2
  62. package/node_modules/@agents-can-communicate/installer/src/detect.mjs +5 -2
  63. package/node_modules/@agents-can-communicate/installer/src/plan.mjs +15 -3
  64. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  65. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  66. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  67. package/package.json +2 -1
@@ -108,6 +108,10 @@ export function planInstallation({ adapters, detected, context, action = "instal
108
108
  const liveDeliverySupported = native?.state === "eligible"
109
109
  && native.activationPlan?.eligible === true;
110
110
  const effectiveLivePolicy = liveDeliverySupported ? delivery : "off";
111
+ const previous = recordedById.get(entry.adapterId)?.nativeActivation ?? null;
112
+ const retainedActivation = action === "install" && delivery !== "off"
113
+ && !liveDeliverySupported && previous?.livePolicy === delivery ? previous : null;
114
+ const configuredLivePolicy = retainedActivation ? delivery : effectiveLivePolicy;
111
115
  const deliveryDiagnostic = action === "install" && delivery !== "off"
112
116
  && !liveDeliverySupported
113
117
  ? entry.deliveryDiagnostic ?? adapter.deliveryFallback?.diagnostic
@@ -117,18 +121,21 @@ export function planInstallation({ adapters, detected, context, action = "instal
117
121
  const deliverySummary = action === "install"
118
122
  ? describeInstallDelivery(entry, delivery, effectiveLivePolicy) : null;
119
123
  const installContext = { ...context, requestedLivePolicy: delivery,
120
- livePolicy: effectiveLivePolicy };
124
+ livePolicy: configuredLivePolicy, clientVersion: entry.version, platform: entry.platform };
125
+ const setupNotes = action === "install" && delivery !== "off"
126
+ ? [entry.outgoingDelivery?.setup, entry.nativeSetup].filter(note => typeof note === "string") : [];
121
127
  // A consented activation that this run keeps, activates, or takes back.
122
128
  // Only an explicit off or an uninstall removes one; an absent record never
123
129
  // creates one.
124
- const previous = recordedById.get(entry.adapterId)?.nativeActivation ?? null;
125
130
  const nativeActivation = action === "install" && effectiveLivePolicy !== "off"
126
131
  ? { livePolicy: effectiveLivePolicy, protocolContract: native.eligibility.protocolContract,
127
132
  shell: context?.shell ?? null, rcFile: rcFileFor(context?.home, context?.shell),
128
133
  shimDir: typeof context?.stateRoot === "string" ? shimDirFor(context.stateRoot) : null,
129
134
  mechanisms: native.activationPlan.mechanisms }
130
135
  : null;
131
- const retirements = planActivationRetirements({ previous, desired: nativeActivation });
136
+ // A failed readiness probe is not revocation. Keep existing guarded launch
137
+ // setup without applying service commands or claiming it is available.
138
+ const retirements = retainedActivation ? [] : planActivationRetirements({ previous, desired: nativeActivation });
132
139
  const deactivation = retirements.length > 0 ? { ...previous, mechanisms: retirements } : null;
133
140
  const artifacts = (record?.artifacts ?? adapter.planInstall(installContext))
134
141
  .map(artifact => ({ path: artifact.path, kind: artifact.kind ?? "file" }))
@@ -139,6 +146,7 @@ export function planInstallation({ adapters, detected, context, action = "instal
139
146
  displayName: adapter.displayName,
140
147
  action,
141
148
  clientVersion: entry.version ?? record?.version ?? null,
149
+ platform: entry.platform ?? context?.platform,
142
150
  // "Remove these files for a client that is not here" is a different thing
143
151
  // to approve than an ordinary uninstall, so it is said rather than left
144
152
  // to be inferred from a client version that is null.
@@ -146,8 +154,10 @@ export function planInstallation({ adapters, detected, context, action = "instal
146
154
  alreadyInstalled: entry.installed === true,
147
155
  livePolicy: delivery,
148
156
  effectiveLivePolicy,
157
+ ...(retainedActivation ? { configuredLivePolicy, retainedNativeActivation: retainedActivation } : {}),
149
158
  ...(deliveryDiagnostic === null ? {} : { deliveryDiagnostic }),
150
159
  ...(deliverySummary === null ? {} : { deliverySummary }),
160
+ ...(setupNotes.length ? { setupNotes } : {}),
151
161
  ...(nativeActivation === null ? {} : { nativeActivation }),
152
162
  ...(deactivation === null ? {} : { deactivation }),
153
163
  artifacts,
@@ -157,6 +167,8 @@ export function planInstallation({ adapters, detected, context, action = "instal
157
167
  ...(entry.present ? [] : [`${adapter.displayName ?? adapter.id} is no longer on `
158
168
  + "this machine; removing what ACC recorded writing"]),
159
169
  ...(deliverySummary === null ? [] : [deliverySummary]),
170
+ ...(retainedActivation ? ["keep existing native delivery setup; current readiness is unverified"] : []),
171
+ ...setupNotes,
160
172
  ...artifacts.filter(a => a.kind === "tree")
161
173
  .map(a => `${action === "install" ? "create" : "remove"} ${a.path}`),
162
174
  ...artifacts.filter(a => a.kind === "merge")
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/mcp-server",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/protocol",
3
- "version": "0.4.2",
3
+ "version": "0.4.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.4.2",
3
+ "version": "0.4.4",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "agents-can-communicate",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
+ "accManagedUpdateProtocol": 2,
4
5
  "type": "module",
5
6
  "description": "Local-first coordination for independently opened AI agent sessions.",
6
7
  "keywords": [