@indexnetwork/cli 0.10.0 → 0.10.2-rc.14.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.
Files changed (2) hide show
  1. package/README.md +114 -97
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -10,23 +10,44 @@ npm install -g @indexnetwork/cli
10
10
 
11
11
  ## Quick Start
12
12
 
13
+ Index helps you find the right people—and helps the right people find you—based on what you are actually trying to do, not just a profile headline. The value is grounded intros: suggestions come from communities you share (syndicates, founder groups, firm networks), not from spraying the open web.
14
+
15
+ The flow below is one complete story—shape a room, invite people, publish what you need, run discovery inside that context, watch broker negotiations, then accept a match.
16
+
13
17
  ```bash
14
- # Authenticate (opens browser)
15
18
  index login
19
+ index profile
20
+
21
+ # 1. Create a network scoped to a specific domain
22
+ index network create "AI Privacy Research" --prompt "Researchers working on privacy-preserving ML"
23
+
24
+ # 2. Invite collaborators
25
+ index network invite <network-id> alice@example.com
26
+ index network invite <network-id> bob@example.com
27
+
28
+ # 3. Create signals that describe what you are looking for
29
+ index intent create "Looking for someone experienced in federated learning"
30
+ index intent create "Need a collaborator for differential privacy benchmarks"
16
31
 
17
- # Chat with the AI agent (interactive REPL)
18
- index conversation
32
+ # 4. Link your signals to the network so discovery can find them
33
+ index intent link <intent-id-1> <network-id>
34
+ index intent link <intent-id-2> <network-id>
19
35
 
20
- # One-shot message
21
- index conversation "What opportunities do I have?"
36
+ # 5. Discovery across the network (no fixed counterpart—who fits depends on members and signals)
37
+ index opportunity discover "federated learning collaboration"
22
38
 
23
- # Browse your signals
24
- index intent list
39
+ # 6. Check what the broker agents negotiated
40
+ index negotiation list --since 1h
41
+ index negotiation show <negotiation-id>
25
42
 
26
- # Review pending opportunities
27
- index opportunity list
43
+ # 7. Review the resulting opportunity and accept
44
+ index opportunity list --status pending
45
+ index opportunity show <opportunity-id>
46
+ index opportunity accept <opportunity-id>
28
47
  ```
29
48
 
49
+ Words you will see elsewhere in this doc: **network** = a community you are in; **intent** = your “what I am looking for” post; **opportunity** = a suggested introduction between you and someone else.
50
+
30
51
  ## Commands
31
52
 
32
53
  ### `index login`
@@ -49,35 +70,6 @@ Clear stored credentials.
49
70
  index logout
50
71
  ```
51
72
 
52
- ### `index conversation`
53
-
54
- Unified conversation command for AI agent chat and human-to-human messaging. Supports streaming responses, inline markdown formatting, tool call indicators, and special blocks (signal proposals, opportunities).
55
-
56
- ```bash
57
- index conversation # Interactive AI chat REPL
58
- index conversation "find me collaborators" # One-shot message to AI agent
59
- index conversation --session <id> # Resume an AI chat session
60
- index conversation sessions # List AI chat sessions
61
- index conversation list # List all conversations (H2A + H2H)
62
- index conversation with <user-id> # Open or resume a DM
63
- index conversation show <id> # Show messages
64
- index conversation send <id> <msg> # Send a message
65
- index conversation stream # Real-time SSE stream
66
- ```
67
-
68
- ### `index profile`
69
-
70
- View user profiles and trigger profile regeneration.
71
-
72
- ```bash
73
- index profile # Show your own profile
74
- index profile show <user-id> # Show another user's profile
75
- index profile sync # Regenerate your profile
76
- index profile search <query> # Search profiles by name or keyword
77
- index profile create # Generate profile from social links
78
- index profile update <details> # Update profile details
79
- ```
80
-
81
73
  ### `index intent`
82
74
 
83
75
  Manage your signals (intents). Create signals from natural language, list active signals, view details, and archive signals you no longer need.
@@ -95,6 +87,18 @@ index intent unlink <id> <network-id> # Unlink a signal from a network
95
87
  index intent links <id> # List networks linked to a signal
96
88
  ```
97
89
 
90
+ ### `index negotiation`
91
+
92
+ Inspect agent negotiations — the autonomous turn-by-turn exchanges between broker agents that evaluate whether an opportunity exists.
93
+
94
+ ```bash
95
+ index negotiation list # List your agent's negotiations
96
+ index negotiation list --limit 10 # Limit results
97
+ index negotiation list --since 1d # Negotiations from the last 24 hours
98
+ index negotiation list --since 2026-04-01 # Since a specific date
99
+ index negotiation show <id> # Show turn-by-turn details (accepts short ID)
100
+ ```
101
+
98
102
  ### `index opportunity`
99
103
 
100
104
  Browse and manage discovered opportunities.
@@ -129,6 +133,35 @@ index network leave <id> # Leave a network
129
133
  index network invite <id> user@email # Invite a user by email
130
134
  ```
131
135
 
136
+ ### `index conversation`
137
+
138
+ Unified conversation command for AI agent chat and human-to-human messaging. Supports streaming responses, inline markdown formatting, tool call indicators, and special blocks (signal proposals, opportunities).
139
+
140
+ ```bash
141
+ index conversation # Interactive AI chat REPL
142
+ index conversation "find me collaborators" # One-shot message to AI agent
143
+ index conversation --session <id> # Resume an AI chat session
144
+ index conversation sessions # List AI chat sessions
145
+ index conversation list # List all conversations (H2A + H2H)
146
+ index conversation with <user-id> # Open or resume a DM
147
+ index conversation show <id> # Show messages
148
+ index conversation send <id> <msg> # Send a message
149
+ index conversation stream # Real-time SSE stream
150
+ ```
151
+
152
+ ### `index profile`
153
+
154
+ View user profiles and trigger profile regeneration.
155
+
156
+ ```bash
157
+ index profile # Show your own profile
158
+ index profile show <user-id> # Show another user's profile
159
+ index profile sync # Regenerate your profile
160
+ index profile search <query> # Search profiles by name or keyword
161
+ index profile create # Generate profile from social links
162
+ index profile update <action> [--details <text>] # Update profile (action is the verb-phrase, e.g. "add interests")
163
+ ```
164
+
132
165
  ### `index contact`
133
166
 
134
167
  Manage your contacts. Add, list, remove, or import contacts.
@@ -161,23 +194,19 @@ index sync --json # Output to stdout as JSON
161
194
 
162
195
  ## Examples: Opportunity Discovery
163
196
 
164
- The `opportunity discover` command supports multiple modes for creating connections.
197
+ The `opportunity discover` command supports multiple modes for creating connections. Each mode can be combined with flags to customize the discovery.
165
198
 
166
- ### Scenario 1: Search-based discovery
199
+ ### Search-based discovery
167
200
 
168
201
  Find people whose intents match a search query. The protocol runs HyDE-powered semantic search across your networks.
169
202
 
170
203
  ```bash
171
- # Find collaborators for a project
172
204
  index opportunity discover "looking for an AI engineer with privacy expertise"
173
-
174
- # Scope discovery to a specific network
175
- index opportunity discover "need a React developer" --target <network-id>
176
205
  ```
177
206
 
178
- ### Scenario 2: Direct connection
207
+ ### Targeted discovery
179
208
 
180
- Propose an opportunity with a specific person. Use when you already know who you want to connect with.
209
+ Scope discovery to a specific user. Use when you already know who you want to connect with.
181
210
 
182
211
  ```bash
183
212
  # First, find the user
@@ -187,7 +216,7 @@ index profile search "Jane Smith"
187
216
  index opportunity discover "collaborate on open-source LLM tooling" --target <user-id>
188
217
  ```
189
218
 
190
- ### Scenario 3: Introduction
219
+ ### Introduction
191
220
 
192
221
  Introduce two people you think should connect. You become the introducer — both parties see you as the connector. The CLI automatically finds shared networks, gathers profiles and intents, then creates the introduction.
193
222
 
@@ -199,7 +228,22 @@ index opportunity discover --introduce <user-id-a> <user-id-b>
199
228
  index opportunity discover --introduce <user-id-a> <user-id-b> "both working on privacy-preserving ML"
200
229
  ```
201
230
 
202
- ### Scenario 4: Review and act
231
+ ### Complex social flows
232
+
233
+ Use this when you want to propose an opportunity outright instead of running discovery: pick the community (`--network`), list each person (`--party`, two or more), and when it matters, tie a person to one of their signals with `userId:intentId` on that line and add why it fits (`--reason`). Here Alice and Bob carry explicit signals; Carol does not. This command is not in the CLI yet; it is the shape we intend to ship.
234
+
235
+ ```bash
236
+ index opportunity create \
237
+ --network <network-id> \
238
+ --party <alice-id>:<alice-intent-id> \
239
+ --party <bob-id>:<bob-intent-id> \
240
+ --party <carol-id> \
241
+ --reason "Alice, Bob, and Carol are all working on federated learning from different angles" \
242
+ --category "collaboration" \
243
+ --confidence 0.9
244
+ ```
245
+
246
+ ### Review and act
203
247
 
204
248
  After discovery creates draft opportunities, review and accept/reject them.
205
249
 
@@ -219,25 +263,28 @@ index opportunity reject <id>
219
263
 
220
264
  ## Options
221
265
 
222
- | Flag | Short | Description |
223
- |------|-------|-------------|
224
- | `--api-url <url>` | | Override API server (default: `https://protocol.index.network`) |
225
- | `--app-url <url>` | | Override app URL for login (default: `https://index.network`) |
226
- | `--token <token>` | `-t` | Provide bearer token directly |
227
- | `--session <id>` | `-s` | Resume a specific chat session |
228
- | `--archived` | | Include archived signals (intent list) |
229
- | `--status <status>` | | Filter opportunities by status |
230
- | `--limit <n>` | | Limit number of results |
231
- | `--prompt <text>` | `-p` | Network description (for `network create`) |
232
- | `--title <text>` | | Network title (for `network update`) |
233
- | `--name <name>` | | Display name (for `contact add`) |
234
- | `--gmail` | | Import from Gmail (for `contact import`) |
235
- | `--target <id>` | | Target user ID (for `opportunity discover`) |
236
- | `--introduce <id>` | | Introduce two users (for `opportunity discover`) |
237
- | `--objective <text>` | | Focus objective (for `scrape`) |
238
- | `--json` | | Output raw JSON to stdout |
239
- | `--help` | `-h` | Show help |
240
- | `--version` | `-v` | Show version |
266
+
267
+ | Flag | Short | Description |
268
+ | -------------------- | ----- | --------------------------------------------------------------- |
269
+ | `--api-url <url>` | | Override API server (default: `https://protocol.index.network`) |
270
+ | `--app-url <url>` | | Override app URL for login (default: `https://index.network`) |
271
+ | `--token <token>` | `-t` | Provide bearer token directly |
272
+ | `--session <id>` | `-s` | Resume a specific chat session |
273
+ | `--archived` | | Include archived signals (intent list) |
274
+ | `--status <status>` | | Filter opportunities by status |
275
+ | `--limit <n>` | | Limit number of results |
276
+ | `--since <date>` | | Filter by time: ISO date or duration like `1h`, `2d`, `1w` |
277
+ | `--prompt <text>` | `-p` | Network description (for `network create`) |
278
+ | `--title <text>` | | Network title (for `network update`) |
279
+ | `--name <name>` | | Display name (for `contact add`) |
280
+ | `--gmail` | | Import from Gmail (for `contact import`) |
281
+ | `--target <id>` | | Target user ID (for `opportunity discover`) |
282
+ | `--introduce <id>` | | Introduce two users (for `opportunity discover`) |
283
+ | `--objective <text>` | | Focus objective (for `scrape`) |
284
+ | `--json` | | Output raw JSON to stdout |
285
+ | `--help` | `-h` | Show help |
286
+ | `--version` | `-v` | Show version |
287
+
241
288
 
242
289
  ## Development
243
290
 
@@ -258,33 +305,3 @@ bun test
258
305
  bun scripts/publish.ts --dry-run
259
306
  ```
260
307
 
261
- ### Project Structure
262
-
263
- ```
264
- cli/
265
- bin/
266
- index.cjs Bin shim (resolves platform binary or JS fallback)
267
- npm/
268
- {os}-{arch}/ Platform-specific packages with precompiled binaries
269
- scripts/
270
- build.ts Cross-compilation build script
271
- publish.ts npm publish orchestration
272
- src/
273
- main.ts Entry point, command routing
274
- login.command.ts OAuth flow with local callback server
275
- conversation.command.ts H2A agent chat + H2H messaging + SSE stream parser
276
- profile.command.ts Profile subcommand handlers
277
- intent.command.ts Intent (signal) subcommand handlers
278
- opportunity.command.ts Opportunity subcommand handlers
279
- network.command.ts Network subcommand handlers
280
- contact.command.ts Contact subcommand handlers
281
- scrape.command.ts URL scraping command handler
282
- sync.command.ts Context sync command handler
283
- onboarding.command.ts Onboarding command handler
284
- output/ Terminal formatting, colors, markdown renderer
285
- api.client.ts Typed HTTP client for the protocol API
286
- auth.store.ts Credential persistence (~/.index/credentials.json)
287
- args.parser.ts CLI argument parser
288
- sse.parser.ts Server-Sent Events parser
289
- types.ts Shared type definitions
290
- ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/cli",
3
- "version": "0.10.0",
3
+ "version": "0.10.2-rc.14.1",
4
4
  "description": "Command-line interface for Index Network",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,10 +20,10 @@
20
20
  "publish:all": "bun scripts/publish.ts"
21
21
  },
22
22
  "optionalDependencies": {
23
- "@indexnetwork/cli-linux-x64": "0.10.0",
24
- "@indexnetwork/cli-linux-arm64": "0.10.0",
25
- "@indexnetwork/cli-darwin-x64": "0.10.0",
26
- "@indexnetwork/cli-darwin-arm64": "0.10.0"
23
+ "@indexnetwork/cli-linux-x64": "0.10.2-rc.14.1",
24
+ "@indexnetwork/cli-linux-arm64": "0.10.2-rc.14.1",
25
+ "@indexnetwork/cli-darwin-x64": "0.10.2-rc.14.1",
26
+ "@indexnetwork/cli-darwin-arm64": "0.10.2-rc.14.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/bun": "latest"