@indexnetwork/protocol 66.0.0-rc.646.1 → 66.0.0-rc.648.1

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 CHANGED
@@ -31,8 +31,8 @@ flowchart LR
31
31
 
32
32
  Scope --> CandidateGeneration[Candidate generation]
33
33
  CandidateGeneration --> Evaluation[Evaluation]
34
- Evaluation -->|plausible but uncertain| Opportunity[Draft or negotiating opportunity]
35
- Evaluation -->|clear fit| Opportunity[Draft or pending opportunity]
34
+ Evaluation -->|plausible but uncertain| Opportunity[Negotiating opportunity]
35
+ Evaluation -->|clear fit| Opportunity[Pending opportunity]
36
36
  Opportunity -->|needs agent clarification| Negotiation[Bounded negotiation]
37
37
  Negotiation -->|fit established| Opportunity
38
38
  Negotiation -->|human judgment required| Questions[Structured questions]
@@ -238,11 +238,11 @@ Opportunity states are participant-facing as follows:
238
238
 
239
239
  | State | Participant-facing term | Meaning |
240
240
  |---|---|---|
241
- | **Draft** | Draft | The protocol found a plausible opportunity, but it has not been sent to the other side. |
242
- | **Sent** | Sent | One side has sent or received the opportunity and a response is pending. |
243
- | **Connected** | Connected | Required participants accepted and a conversation or introduction may proceed. |
244
- | **Declined** | Declined | A participant rejected the opportunity. |
245
- | **Expired** | Expired | The opportunity is no longer actionable. |
241
+ | **negotiating** | Agents talking | The agents are negotiating whether the fit holds. |
242
+ | **pending** | Waiting on you | The agents agreed and the participants decide. A participant who already accepted sees Chat open: the first accept opens the conversation, and the status stays pending until every participant has accepted. |
243
+ | **accepted** | Connected | Every participant accepted. |
244
+ | **rejected** | Passed | An agent declined or a participant rejected the opportunity. |
245
+ | **expired** | Expired | An intent was archived. |
246
246
 
247
247
  A conforming agent MUST NOT present a received opportunity as **Connected** without explicit approval from the receiving participant. The reference implementation enforces actor authorization and valid source statuses for acceptance, while current-approval capture is handled by the agent or user-interface flow invoking the transition.
248
248
 
@@ -250,33 +250,26 @@ A conforming agent MUST NOT present a received opportunity as **Connected** with
250
250
 
251
251
  ```mermaid
252
252
  stateDiagram-v2
253
- [*] --> Draft: candidate promoted
254
- Draft --> Sent: sender approves send
255
- Draft --> Connected: direct acceptance or connection link
256
- Draft --> Declined: sender declines
257
- Draft --> Expired: TTL or invalidated
258
-
259
- Sent --> Connected: recipient explicitly accepts
260
- Sent --> Declined: recipient declines
261
- Sent --> Expired: TTL or invalidated
262
-
263
- Connected --> [*]
264
- Declined --> [*]
265
- Expired --> [*]
266
-
267
- note right of Draft
268
- Plausible but not sent.
269
- Only visible under role and scope rules.
253
+ [*] --> negotiating: agent opens it
254
+ negotiating --> pending: agents agree
255
+ negotiating --> rejected: agent declines
256
+ negotiating --> expired: intent archived
257
+
258
+ pending --> accepted: every participant accepts
259
+ pending --> rejected: participant rejects
260
+ pending --> expired: intent archived
261
+
262
+ accepted --> [*]
263
+ rejected --> [*]
264
+ expired --> [*]
265
+
266
+ note right of pending
267
+ Waiting on the participants.
268
+ The first accept opens the chat.
270
269
  end note
271
270
 
272
- note right of Sent
273
- One side is waiting.
274
- Acceptance requires participant approval.
275
- end note
276
-
277
- note right of Connected
278
- Relationship boundary crossed.
279
- Conversation or introduction may proceed.
271
+ note right of accepted
272
+ Every participant accepted.
280
273
  end note
281
274
  ```
282
275
 
@@ -300,11 +293,11 @@ sequenceDiagram
300
293
  PR->>PR: Generate candidates inside scope
301
294
  PR->>PR: Evaluate role fit and constraints
302
295
  alt Fit is clear
303
- PR-->>A: Draft opportunity with explanation
296
+ PR-->>A: Pending opportunity with explanation
304
297
  else Fit is uncertain
305
298
  PR->>N: Start bounded negotiation
306
299
  N-->>PR: Propose, counter, accept, reject, or question
307
- PR-->>A: Draft opportunity or structured question
300
+ PR-->>A: Pending opportunity or structured question
308
301
  end
309
302
  A->>P: Explain strongest reason and ask for approval
310
303
  P-->>A: Approve, decline, or refine intent
@@ -145,8 +145,9 @@ Rules:
145
145
  **Negotiation-grounded explanations (ONLY when NEGOTIATION CONTEXT is provided):**
146
146
  When NEGOTIATION CONTEXT is provided, this opportunity passed through an agent-to-agent negotiation. Use the transcript to ground your explanation in the concrete reasoning the agents exchanged.
147
147
  - Personalize the summary with *why* the negotiation produced this match — reference the roles the agents agreed on, the specific concerns raised, and how they were resolved.
148
- - For status "accepted": the agents agreed; the card should confidently explain *why* they agreed.
149
- - For status "rejected": the agents declined. The card should explain the reason briefly so the user understands — not dwell on it.
148
+ - For status "pending": the agents agreed and the viewer decides; the card should confidently explain *why* they agreed.
149
+ - For status "accepted": both people said yes; the card should explain *why* the agents agreed.
150
+ - For status "rejected": say who ended it. If the negotiation says one agent declined, the agents did; otherwise a person passed. The card should explain the reason briefly so the user understands — not dwell on it.
150
151
  - Do NOT invent turn content. Only reference what is in the NEGOTIATION CONTEXT block.
151
152
 
152
153
  `;
@@ -5,7 +5,7 @@ export declare const NEGOTIATION_GUIDANCE = "You participate in the Index protoc
5
5
  export declare const CANONICAL_GUIDANCE_TOPICS: readonly ["identity-context", "intents", "communities-networks", "opportunities", "negotiations", "workflows"];
6
6
  export type CanonicalGuidanceTopic = (typeof CANONICAL_GUIDANCE_TOPICS)[number];
7
7
  /** Summary served when GET /api/docs has no topic. */
8
- export declare const CANONICAL_GUIDANCE_SUMMARY = "# Index Network Protocol\n\nIndex Network is a private, intent-driven discovery protocol. Users express intents, agents find matches within shared networks, and decisions proceed through clear gates.\n\n## Core Concepts\n\n**Identity & Context** \u2014 Account and presentation metadata plus scoped runtime state (networks, intents, stage).\n\n**Intents** \u2014 What users seek (intents, opportunities). Drive semantic matching.\n\n**Communities & Networks** \u2014 Private groups where members share intents and discover connections via shared membership.\n\n**Opportunities** \u2014 Discovered matches between users. Matches may be draft or negotiating; agreement advances to pending owner review, then accepted/rejected/expired.\n\n**Negotiations** \u2014 Agents coordinate, users approve. **A2A acceptance is not owner approval.** These are separate gates.\n\n**Workflows** \u2014 H2A (users express intents \u2192 agents discover) and A2A (agents coordinate) over the REST API. External agents use the Index CLI; the personal-agent runtime stays on the server. Human conversations are available through the conversation routes and commands.\n\n## Command interface\n\nUse the Index CLI with an explicit API origin: index --api-url <origin> ... --json.\nAuthenticate with browser login or one environment credential: INDEX_SESSION_TOKEN (Bearer) or INDEX_API_KEY (x-api-key). Keys do not bypass owner-session requirements.\nEvery capability is a named resource: /api/intents, /api/networks, /api/opportunities, /api/negotiations, /api/conversations, /api/scrape, /api/docs. The user's event stream is GET /api/events.\nUse the workflows topic for the resource routes and their CLI commands.\n\n## Canonical Topics\n\nRefer to these for detailed entity facts and lifecycle:\n\n- **identity-context** \u2014 Presentation identity, context scoping, matching inputs\n- **intents** \u2014 Intent inference, classification\n- **communities-networks** \u2014 Membership and explicit intent sharing\n- **opportunities** \u2014 Discovery, roles, reasoning\n- **negotiations** \u2014 Owner approval vs A2A, acceptance gates\n- **workflows** \u2014 H2A and A2A request sequences";
8
+ export declare const CANONICAL_GUIDANCE_SUMMARY = "# Index Network Protocol\n\nIndex Network is a private, intent-driven discovery protocol. Users express intents, agents find matches within shared networks, and decisions proceed through clear gates.\n\n## Core Concepts\n\n**Identity & Context** \u2014 Account and presentation metadata plus scoped runtime state (networks, intents, stage).\n\n**Intents** \u2014 What users seek (intents, opportunities). Drive semantic matching.\n\n**Communities & Networks** \u2014 Private groups where members share intents and discover connections via shared membership.\n\n**Opportunities** \u2014 Discovered matches between users. Matches start negotiating; agreement advances to pending owner review, then accepted/rejected/expired.\n\n**Negotiations** \u2014 Agents coordinate, users approve. **A2A acceptance is not owner approval.** These are separate gates.\n\n**Workflows** \u2014 H2A (users express intents \u2192 agents discover) and A2A (agents coordinate) over the REST API. External agents use the Index CLI; the personal-agent runtime stays on the server. Human conversations are available through the conversation routes and commands.\n\n## Command interface\n\nUse the Index CLI with an explicit API origin: index --api-url <origin> ... --json.\nAuthenticate with browser login or one environment credential: INDEX_SESSION_TOKEN (Bearer) or INDEX_API_KEY (x-api-key). Keys do not bypass owner-session requirements.\nEvery capability is a named resource: /api/intents, /api/networks, /api/opportunities, /api/negotiations, /api/conversations, /api/scrape, /api/docs. The user's event stream is GET /api/events.\nUse the workflows topic for the resource routes and their CLI commands.\n\n## Canonical Topics\n\nRefer to these for detailed entity facts and lifecycle:\n\n- **identity-context** \u2014 Presentation identity, context scoping, matching inputs\n- **intents** \u2014 Intent inference, classification\n- **communities-networks** \u2014 Membership and explicit intent sharing\n- **opportunities** \u2014 Discovery, roles, reasoning\n- **negotiations** \u2014 Owner approval vs A2A, acceptance gates\n- **workflows** \u2014 H2A and A2A request sequences";
9
9
  /**
10
10
  * Detailed canonical topic content for GET /api/docs.
11
11
  * Indexed by topic name; each contains current entity, capability, and lifecycle facts.
@@ -30,7 +30,7 @@ Index Network is a private, intent-driven discovery protocol. Users express inte
30
30
 
31
31
  **Communities & Networks** — Private groups where members share intents and discover connections via shared membership.
32
32
 
33
- **Opportunities** — Discovered matches between users. Matches may be draft or negotiating; agreement advances to pending owner review, then accepted/rejected/expired.
33
+ **Opportunities** — Discovered matches between users. Matches start negotiating; agreement advances to pending owner review, then accepted/rejected/expired.
34
34
 
35
35
  **Negotiations** — Agents coordinate, users approve. **A2A acceptance is not owner approval.** These are separate gates.
36
36
 
@@ -131,16 +131,15 @@ Discovery is networked — it only finds matches within shared networks. This pr
131
131
  **Opportunity** is a discovered connection between two or more users based on complementary intents and shared network membership. Each opportunity has:
132
132
  - Parties (the people being connected)
133
133
  - Roles (party)
134
- - Status (draft or negotiating → pending owner review → accepted/rejected/expired)
134
+ - Status (negotiating → pending owner review → accepted/rejected/expired)
135
135
  - Match reasoning (why they're a good fit)
136
136
  - Confidence score (0-1 from evaluation)
137
137
 
138
138
  ### Opportunity Lifecycle
139
- 1. **Draft**: A persisted suggestion awaiting further action.
140
- 2. **Negotiating**: Agents exchange structured turns under the negotiation rules.
141
- 3. **Pending**: Agent agreement recommends a connection for separate owner review.
142
- 4. **Accepted**: The required participant approvals permit the connection.
143
- 5. **Rejected** or **Expired**: The opportunity no longer advances automatically.
139
+ 1. **Negotiating**: Agents exchange structured turns under the negotiation rules.
140
+ 2. **Pending**: Agent agreement recommends a connection for separate owner review. An owner's accept opens their chat right away; the status stays pending until every participant has accepted.
141
+ 3. **Accepted**: Every participant has accepted.
142
+ 4. **Rejected** or **Expired**: The opportunity no longer advances automatically. Expired means an intent was archived.
144
143
 
145
144
  ### Background Matching
146
145
  Approved intents are evaluated in the background. GET /api/opportunities only reviews persisted opportunities; it does not start matching.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "66.0.0-rc.646.1",
3
+ "version": "66.0.0-rc.648.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",