@indexnetwork/cli 0.29.0 → 0.30.0-rc.90.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 (3) hide show
  1. package/README.md +2 -3
  2. package/dist/index.js +10 -17
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -65,7 +65,7 @@ flags are listed in [Options](#options), and examples follow this reference.
65
65
  | `index intent remove-from-network <id> <network-id>` | Stop sharing an intent in a network. |
66
66
  | `index negotiation list` | List negotiations, optionally filtered by intent or open/settled state. |
67
67
  | `index negotiation show <opportunity-id>` | Read the negotiation's turns, current state, and available actions. |
68
- | `index negotiation turn <opportunity-id> --action <action> --message <text> --expected-turn-count <n>` | Submit one `propose`, `counter`, `accept`, or `decline` turn against the observed turn count. |
68
+ | `index negotiation turn <opportunity-id> --action <action> --message <text>` | Submit one `propose`, `counter`, `accept`, or `decline` turn. |
69
69
  | `index opportunity list` | List persisted opportunities, with optional status and result-limit filters. |
70
70
  | `index opportunity show <id>` | Show an opportunity's presentation and participants. |
71
71
  | `index opportunity accept <id>` | Request acceptance through the server's owner-approval flow. |
@@ -176,7 +176,7 @@ Read current negotiations and submit structured turns using full opportunity IDs
176
176
  ```bash
177
177
  index negotiation list [--intent-id <id>] [--state open|settled]
178
178
  index negotiation show <opportunity-id> --json
179
- index negotiation turn <opportunity-id> --action propose --message "..." --expected-turn-count 0 --json
179
+ index negotiation turn <opportunity-id> --action propose --message "..." --json
180
180
  ```
181
181
 
182
182
  Actions are `propose`, `counter`, `accept`, and `decline`. Read the detail's
@@ -336,7 +336,6 @@ index opportunity reject <id>
336
336
  | `--state <state>` | | Filter negotiations by `open` or `settled` |
337
337
  | `--action <action>` | | Required negotiation turn action: `propose`, `counter`, `accept`, or `decline` |
338
338
  | `--message <text>` | | Required message for a negotiation turn |
339
- | `--expected-turn-count <n>` | | Required observed nonnegative integer turn count for a negotiation turn |
340
339
  | `--question-id <id>` | | Identify the displayed question when answering the personal agent |
341
340
  | `--answer <key=value>` | | Repeat for recovery prompt labels or agent question IDs |
342
341
  | `--receipt <token>` | | Preparation receipt for intent creation |
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { spawn } from "node:child_process";
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@indexnetwork/cli",
8
- version: "0.29.0",
8
+ version: "0.30.0",
9
9
  description: "Command-line interface for Index Network",
10
10
  license: "MIT",
11
11
  type: "module",
@@ -25,10 +25,10 @@ var package_default = {
25
25
  "publish:all": "bun scripts/publish.ts"
26
26
  },
27
27
  optionalDependencies: {
28
- "@indexnetwork/cli-linux-x64": "0.29.0",
29
- "@indexnetwork/cli-linux-arm64": "0.29.0",
30
- "@indexnetwork/cli-darwin-x64": "0.29.0",
31
- "@indexnetwork/cli-darwin-arm64": "0.29.0"
28
+ "@indexnetwork/cli-linux-x64": "0.30.0",
29
+ "@indexnetwork/cli-linux-arm64": "0.30.0",
30
+ "@indexnetwork/cli-darwin-x64": "0.30.0",
31
+ "@indexnetwork/cli-darwin-arm64": "0.30.0"
32
32
  },
33
33
  devDependencies: {
34
34
  "@types/bun": "1.3.14"
@@ -95,7 +95,7 @@ function parseArgs(args) {
95
95
  return { ...result, command: "version" };
96
96
  if (["--api-url", "--app-url", "--status", "--limit", "--prompt", "-p", "--objective", "--title"].includes(arg) && (!args[i + 1] || args[i + 1].startsWith("--")))
97
97
  throw new Error(`Missing value for ${arg}`);
98
- if (["--query", "--state", "--action", "--message", "--intent-id", "--question-id", "--expected-turn-count", "--receipt", "--name", "--intro", "--location", "--statuses", "--answer", "--social"].includes(arg)) {
98
+ if (["--query", "--state", "--action", "--message", "--intent-id", "--question-id", "--receipt", "--name", "--intro", "--location", "--statuses", "--answer", "--social"].includes(arg)) {
99
99
  const value = args[i + 1];
100
100
  if (value === undefined || value.startsWith("--"))
101
101
  throw new Error(`Missing value for ${arg}`);
@@ -118,9 +118,6 @@ function parseArgs(args) {
118
118
  case "--question-id":
119
119
  result.questionId = value;
120
120
  break;
121
- case "--expected-turn-count":
122
- result.expectedTurnCount = Number(value);
123
- break;
124
121
  case "--receipt":
125
122
  result.receipt = value;
126
123
  break;
@@ -1405,7 +1402,7 @@ function negotiationCard(negotiation) {
1405
1402
  console.log(` ${BOLD}Blocked:${RESET} ${YELLOW}${blockedReason}${RESET}`);
1406
1403
  console.log(rule);
1407
1404
  if (availableActions.length > 0) {
1408
- dim(` Reply: index negotiation turn ${negotiation.opportunityId.slice(0, 8)} --action <action> --message <text> --expected-turn-count ${negotiation.turnCount}`);
1405
+ dim(` Reply: index negotiation turn ${negotiation.opportunityId.slice(0, 8)} --action <action> --message <text>`);
1409
1406
  }
1410
1407
  console.log();
1411
1408
  }
@@ -1960,12 +1957,9 @@ async function handleNegotiation(client, subcommand, options) {
1960
1957
  throw new Error("--action must be propose, counter, accept, or decline");
1961
1958
  if (!options.message?.trim())
1962
1959
  throw new Error("--message is required");
1963
- if (options.expectedTurnCount === undefined || !Number.isSafeInteger(options.expectedTurnCount) || options.expectedTurnCount < 0)
1964
- throw new Error("--expected-turn-count must be the observed nonnegative integer turn count");
1965
1960
  const negotiation = await client.submitNegotiationTurn(options.targetId, {
1966
1961
  action: options.action,
1967
- message: options.message,
1968
- expectedTurnCount: options.expectedTurnCount
1962
+ message: options.message
1969
1963
  });
1970
1964
  if (options.json) {
1971
1965
  console.log(JSON.stringify(negotiation));
@@ -1975,7 +1969,7 @@ async function handleNegotiation(client, subcommand, options) {
1975
1969
  negotiationCard(negotiation);
1976
1970
  }
1977
1971
  } else {
1978
- throw new Error("Usage: index negotiation list [--intent-id <id>] [--state open|settled], show <opportunity-id>, or turn <opportunity-id> --action <action> --message <text> --expected-turn-count <n>");
1972
+ throw new Error("Usage: index negotiation list [--intent-id <id>] [--state open|settled], show <opportunity-id>, or turn <opportunity-id> --action <action> --message <text>");
1979
1973
  }
1980
1974
  }
1981
1975
 
@@ -2543,7 +2537,7 @@ function renderHelp(json) {
2543
2537
  negotiation list [--intent-id <id>] [--state open|settled]
2544
2538
  negotiation show <opportunity-id>
2545
2539
  negotiation turn <opportunity-id> --action propose|counter|accept|decline
2546
- --message <text> --expected-turn-count <n>
2540
+ --message <text>
2547
2541
  conversation list|with|show|send|answer|stream
2548
2542
  conversation show agent --intent-id <id>
2549
2543
  conversation send agent <text> --intent-id <id> [--question-id <id>]
@@ -2721,7 +2715,6 @@ async function main() {
2721
2715
  state: args.state,
2722
2716
  action: args.action,
2723
2717
  message: args.message,
2724
- expectedTurnCount: args.expectedTurnCount,
2725
2718
  json: args.json
2726
2719
  });
2727
2720
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/cli",
3
- "version": "0.29.0",
3
+ "version": "0.30.0-rc.90.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.29.0",
24
- "@indexnetwork/cli-linux-arm64": "0.29.0",
25
- "@indexnetwork/cli-darwin-x64": "0.29.0",
26
- "@indexnetwork/cli-darwin-arm64": "0.29.0"
23
+ "@indexnetwork/cli-linux-x64": "0.30.0-rc.90.1",
24
+ "@indexnetwork/cli-linux-arm64": "0.30.0-rc.90.1",
25
+ "@indexnetwork/cli-darwin-x64": "0.30.0-rc.90.1",
26
+ "@indexnetwork/cli-darwin-arm64": "0.30.0-rc.90.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/bun": "1.3.14"