agents-can-communicate 0.1.14 → 0.1.16

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 (19) hide show
  1. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +1 -1
  2. package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/skills/acc/SKILL.md +8 -1
  3. package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
  4. package/node_modules/@agents-can-communicate/adapter-codex/plugin/skills/acc/SKILL.md +8 -1
  5. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/skills/acc/SKILL.md +8 -1
  6. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  7. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  8. package/node_modules/@agents-can-communicate/adapter-kimi/plugin/skills/acc/SKILL.md +8 -1
  9. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  10. package/node_modules/@agents-can-communicate/cli/package.json +1 -1
  11. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +15 -3
  12. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  13. package/node_modules/@agents-can-communicate/core/src/sync.mjs +37 -0
  14. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  15. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  16. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  17. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  18. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  19. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-claude-code",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,7 +14,7 @@ skill is how you stay legible to them and they to you.
14
14
  Once you understand the request, publish one line of Intent:
15
15
 
16
16
  ```bash
17
- {{ACC}} work --summary "porting the claim model" --mode edit
17
+ {{ACC}} work --summary "porting the claim model" --mode edit --hint 'file:packages/core/**'
18
18
  ```
19
19
 
20
20
  When you stop working on something and are not starting anything else, say so with
@@ -25,6 +25,12 @@ progress.
25
25
  when the work changes character. Intent is awareness, not a reservation: it tells peers
26
26
  what you are up to, it does not stop anyone editing anything.
27
27
 
28
+ `--hint` names a file or glob you are about to touch, and repeats for more than one. It is
29
+ the part of Intent another agent's tools act on: a peer who holds a claim on that resource
30
+ is told you are heading for it, and you are told if your hint lands on a claim someone else
31
+ holds. A summary a person reads is not a hint a tool can match - leave it off and neither
32
+ warning fires.
33
+
28
34
  ## Claim before you change shared work
29
35
 
30
36
  ```bash
@@ -62,6 +68,7 @@ to the command that answers it:
62
68
  - [direct_request] message_x someone addressed this to you -> ack
63
69
  - [task_unblocked] task_x work is waiting for you -> task --take
64
70
  - [claim_conflict] claim_x someone holds what you want -> ask, or release
71
+ - [claim_contended] claim_x a peer means to touch what you hold -> reach out, or hold
65
72
  - [request_stalled] task_x you asked and nobody is on it -> ask again, or take it back
66
73
  - [request_stalled] message_x you asked and nobody is there -> ask someone else
67
74
  ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-codex",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,7 +14,7 @@ skill is how you stay legible to them and they to you.
14
14
  Once you understand the request, publish one line of Intent:
15
15
 
16
16
  ```bash
17
- {{ACC}} work --summary "porting the claim model" --mode edit
17
+ {{ACC}} work --summary "porting the claim model" --mode edit --hint 'file:packages/core/**'
18
18
  ```
19
19
 
20
20
  When you stop working on something and are not starting anything else, say so with
@@ -25,6 +25,12 @@ progress.
25
25
  when the work changes character. Intent is awareness, not a reservation: it tells peers
26
26
  what you are up to, it does not stop anyone editing anything.
27
27
 
28
+ `--hint` names a file or glob you are about to touch, and repeats for more than one. It is
29
+ the part of Intent another agent's tools act on: a peer who holds a claim on that resource
30
+ is told you are heading for it, and you are told if your hint lands on a claim someone else
31
+ holds. A summary a person reads is not a hint a tool can match - leave it off and neither
32
+ warning fires.
33
+
28
34
  ## Claim before you change shared work
29
35
 
30
36
  ```bash
@@ -62,6 +68,7 @@ to the command that answers it:
62
68
  - [direct_request] message_x someone addressed this to you -> ack
63
69
  - [task_unblocked] task_x work is waiting for you -> task --take
64
70
  - [claim_conflict] claim_x someone holds what you want -> ask, or release
71
+ - [claim_contended] claim_x a peer means to touch what you hold -> reach out, or hold
65
72
  - [request_stalled] task_x you asked and nobody is on it -> ask again, or take it back
66
73
  - [request_stalled] message_x you asked and nobody is there -> ask someone else
67
74
  ```
@@ -14,7 +14,7 @@ skill is how you stay legible to them and they to you.
14
14
  Once you understand the request, publish one line of Intent:
15
15
 
16
16
  ```bash
17
- {{ACC}} work --summary "porting the claim model" --mode edit
17
+ {{ACC}} work --summary "porting the claim model" --mode edit --hint 'file:packages/core/**'
18
18
  ```
19
19
 
20
20
  When you stop working on something and are not starting anything else, say so with
@@ -25,6 +25,12 @@ progress.
25
25
  when the work changes character. Intent is awareness, not a reservation: it tells peers
26
26
  what you are up to, it does not stop anyone editing anything.
27
27
 
28
+ `--hint` names a file or glob you are about to touch, and repeats for more than one. It is
29
+ the part of Intent another agent's tools act on: a peer who holds a claim on that resource
30
+ is told you are heading for it, and you are told if your hint lands on a claim someone else
31
+ holds. A summary a person reads is not a hint a tool can match - leave it off and neither
32
+ warning fires.
33
+
28
34
  ## Claim before you change shared work
29
35
 
30
36
  ```bash
@@ -62,6 +68,7 @@ to the command that answers it:
62
68
  - [direct_request] message_x someone addressed this to you -> ack
63
69
  - [task_unblocked] task_x work is waiting for you -> task --take
64
70
  - [claim_conflict] claim_x someone holds what you want -> ask, or release
71
+ - [claim_contended] claim_x a peer means to touch what you hold -> reach out, or hold
65
72
  - [request_stalled] task_x you asked and nobody is on it -> ask again, or take it back
66
73
  - [request_stalled] message_x you asked and nobody is there -> ask someone else
67
74
  ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-gemini-cli",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-kimi",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,7 +14,7 @@ skill is how you stay legible to them and they to you.
14
14
  Once you understand the request, publish one line of Intent:
15
15
 
16
16
  ```bash
17
- {{ACC}} work --summary "porting the claim model" --mode edit
17
+ {{ACC}} work --summary "porting the claim model" --mode edit --hint 'file:packages/core/**'
18
18
  ```
19
19
 
20
20
  When you stop working on something and are not starting anything else, say so with
@@ -25,6 +25,12 @@ progress.
25
25
  when the work changes character. Intent is awareness, not a reservation: it tells peers
26
26
  what you are up to, it does not stop anyone editing anything.
27
27
 
28
+ `--hint` names a file or glob you are about to touch, and repeats for more than one. It is
29
+ the part of Intent another agent's tools act on: a peer who holds a claim on that resource
30
+ is told you are heading for it, and you are told if your hint lands on a claim someone else
31
+ holds. A summary a person reads is not a hint a tool can match - leave it off and neither
32
+ warning fires.
33
+
28
34
  ## Claim before you change shared work
29
35
 
30
36
  ```bash
@@ -62,6 +68,7 @@ to the command that answers it:
62
68
  - [direct_request] message_x someone addressed this to you -> ack
63
69
  - [task_unblocked] task_x work is waiting for you -> task --take
64
70
  - [claim_conflict] claim_x someone holds what you want -> ask, or release
71
+ - [claim_contended] claim_x a peer means to touch what you hold -> reach out, or hold
65
72
  - [request_stalled] task_x you asked and nobody is on it -> ask again, or take it back
66
73
  - [request_stalled] message_x you asked and nobody is there -> ask someone else
67
74
  ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-sdk",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/cli",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -134,10 +134,18 @@ async function diagnoseAdapters({ options, runtime }) {
134
134
  // trust prompt, most of all. It goes where a person reads, not into --json.
135
135
  remediation.push(...(entry.needsAction ?? []));
136
136
  const installed = record.installs.find(one => one.adapterId === entry.adapterId);
137
- const stale = staleInstall({ recorded: installed?.accVersion ?? null, running });
137
+ const bundleVersion = installed?.accVersion ?? null;
138
+ const stale = staleInstall({ recorded: bundleVersion, running });
138
139
  if (stale !== null) {
140
+ // Names the skills and manifests, not "the plugin". Updating the npm
141
+ // package replaces the CLI and the hook runtime the client's shim points
142
+ // at, so the runner can already be current - `wired` says whether it is -
143
+ // while the skills and manifests copied into the client stay at whatever
144
+ // acc last ran `acc install`. Calling the whole plugin stale reads as a
145
+ // stale runtime and contradicts a `wired` that says otherwise.
139
146
  remediation.push(`acc install --adapter ${entry.adapterId}`
140
- + ` # plugin is ${stale.recorded}, acc is ${stale.running}`);
147
+ + ` # skills and manifests here are from ${stale.recorded}, acc is ${stale.running}`
148
+ + ` - reinstall to refresh the bundle`);
141
149
  }
142
150
  // Read from the wiring rather than from the record. An ACC old enough not to
143
151
  // know the record's version field still rewrites that record - blank - while
@@ -149,7 +157,11 @@ async function diagnoseAdapters({ options, runtime }) {
149
157
  remediation.push(`acc install --adapter ${entry.adapterId}`
150
158
  + ` # wired to acc ${wired}, this is ${running}`);
151
159
  }
152
- return { ...entry, stale, wired, owned: { modified: owned.modified,
160
+ // `wired` is the version of the runner the client executes; `bundleVersion`
161
+ // is the acc that copied the skills and manifests into it. They diverge after
162
+ // an npm upgrade with no `acc install`, and reporting both is what makes the
163
+ // divergence legible rather than hidden behind a single reassuring number.
164
+ return { ...entry, stale, wired, bundleVersion, owned: { modified: owned.modified,
153
165
  missing: owned.missing, intact: owned.intact.length }, remediation };
154
166
  }));
155
167
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/core",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -45,6 +45,7 @@ export const ATTENTION_PRIORITY = Object.freeze({
45
45
  coordinator_missing: 4,
46
46
  request_stalled: 5,
47
47
  claim_expired: 6,
48
+ claim_contended: 7,
48
49
  });
49
50
 
50
51
  function directRequests(snapshot, participantId) {
@@ -95,6 +96,41 @@ function claimConflicts(snapshot, session, now) {
95
96
  summary: `${claim.resource} is claimed by ${claim.ownerSessionId}` }));
96
97
  }
97
98
 
99
+ /**
100
+ * A resource I hold that a peer has said they intend to touch.
101
+ *
102
+ * The mirror of `claimConflicts`. That one reads my own intent and warns me when
103
+ * what I mean to touch is already claimed. This one reads a peer's intent and
104
+ * warns me, the holder, that someone is heading for what I claimed. Without it
105
+ * intent's only wired reader faced inward: it protected the one declaring intent
106
+ * and told the claim holder nothing, so a claim was a wall nobody was told they
107
+ * were walking into. A claim is advisory - it does not stop the write - so being
108
+ * told early is the whole of the protection it offers.
109
+ *
110
+ * Only my own claims, and never my own intent against them: declaring intent on
111
+ * what you already hold is not someone reaching for it. The peer is named by
112
+ * participant where the roster knows it, because a session id cannot be used
113
+ * with `--to` and an id a reader cannot act on is the trap the projector warns of.
114
+ */
115
+ function claimContended(snapshot, session, now) {
116
+ if (session === null || session === undefined) return [];
117
+ const theirs = (snapshot.intents ?? [])
118
+ .filter(intent => intent.sessionId !== session.sessionId);
119
+ const nameOf = sessionId => (snapshot.sessions ?? [])
120
+ .find(item => item.sessionId === sessionId)?.participantId ?? "a peer";
121
+ return (snapshot.claims ?? [])
122
+ .filter(claim => claim.ownerSessionId === session.sessionId
123
+ && Date.parse(claim.expiresAt) > Date.parse(now))
124
+ .flatMap(claim => {
125
+ const eyeing = theirs.find(intent =>
126
+ (intent.resourceHints ?? []).some(hint => overlaps(hint, claim.resource)));
127
+ return eyeing === undefined ? [] : [{
128
+ kind: "claim_contended", priority: ATTENTION_PRIORITY.claim_contended,
129
+ sourceId: claim.claimId,
130
+ summary: `${claim.resource} - ${nameOf(eyeing.sessionId)} means to work on what you hold` }];
131
+ });
132
+ }
133
+
98
134
  /**
99
135
  * Work waiting on me.
100
136
  *
@@ -210,6 +246,7 @@ export function computeAttention(snapshot, { session, participantId, now, pidIsA
210
246
  return [
211
247
  ...directRequests(snapshot, participantId),
212
248
  ...claimConflicts(snapshot, session, now),
249
+ ...claimContended(snapshot, session, now),
213
250
  ...expiredClaims(snapshot, session, now),
214
251
  ...unblockedTasks(snapshot, session, participantId),
215
252
  ...coordinatorGaps(snapshot),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/hook-runner",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/installer",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": { ".": "./src/index.mjs" },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/mcp-server",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
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.1.14",
3
+ "version": "0.1.16",
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.1.14",
3
+ "version": "0.1.16",
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.1.14",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "description": "Local-first coordination for independently opened AI agent sessions.",
6
6
  "keywords": [