agents-can-communicate 0.1.14 → 0.1.15

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-claude-code",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
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.15",
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.15",
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.15",
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.15",
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.15",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/core",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
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.15",
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.15",
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.15",
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.15",
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.15",
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.15",
4
4
  "type": "module",
5
5
  "description": "Local-first coordination for independently opened AI agent sessions.",
6
6
  "keywords": [