@arp-protocol/cli 0.0.3 → 0.0.4

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.
@@ -7,7 +7,8 @@ import {
7
7
  parseLocalFailures,
8
8
  parseLocalOutcomes,
9
9
  sharedLineKey
10
- } from "./cli-wev0jgf7.js";
10
+ } from "./cli-wer26exb.js";
11
+ import"./cli-zehr6kdx.js";
11
12
  import"./cli-0gsbnq5w.js";
12
13
  import"./cli-fbwpcfvp.js";
13
14
  import"./cli-mhzh9z8k.js";
@@ -41,6 +42,7 @@ function decide(env) {
41
42
  outcomes: parseLocalOutcomes(read(join(env.arpHome, "outcomes.jsonl")) ?? ""),
42
43
  installed: [
43
44
  ...installedFromSkillLock(read(join(env.home, ".agents", ".skill-lock.json"))),
45
+ ...installedFromSkillLock(read(join(env.cwd, "skills-lock.json"))),
44
46
  ...installedFromReceipts(read(join(env.arpHome, "receipts.jsonl"))),
45
47
  ...installedFromReceipts(read(join(env.cwd, ".arp", "receipts.jsonl")))
46
48
  ],
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  import { dirname } from "node:path";
15
15
  import { fileURLToPath } from "node:url";
16
16
  // package.json
17
- var version = "0.0.3";
17
+ var version = "0.0.4";
18
18
 
19
19
  // src/cli.ts
20
20
  var USAGE = `arp ${version} — ARP's agent-side programs
@@ -28,13 +28,18 @@ usage
28
28
  arp share say what would be public from ~/.arp/failures.jsonl and outcomes.jsonl,
29
29
  and what stays here.
30
30
  arp share on, off (off by default). arp share send writes them on testnet
31
+ arp check <skill> before you use a skill: what its files contain, what agents wrote about
32
+ it, and whether what it needed when it failed is on this machine.
33
+ <owner/repo/skill> or a github.com URL with ?skill=. Writes nothing
31
34
  arp node the hire endpoint. Opt-in: it listens on 127.0.0.1 and is reached through
32
35
  a tunnel you rent (cloudflared or ngrok, or ARP_NODE_PUBLIC_URL)
33
36
 
34
37
  arp line write one public line on testnet 13579 through ARP's sponsor: --tool <url>
35
38
  --outcome worked|failed [--domain <category>] [--reason <reason>]
36
39
  [--payment-tx <hash> --network eip155:8453] an x402 payment, read on Base;
37
- with it, --tool is the exact URL you paid
40
+ with it, --tool is the exact URL you paid, written
41
+ with its values removed, and the 402's terms you paid
42
+ against: --pay-to --asset --price --terms-at
38
43
  [--needs <name>] or [--with <name>] the program or variable name that was
39
44
  missing, or that you added; written only if the skill's SKILL.md names it
40
45
  arp init add the MCP server and the hook to every runtime found here
@@ -70,7 +75,7 @@ var asksHelp = (rest) => rest.some((arg) => arg === "--help" || arg === "-h");
70
75
  var WANTS_HELP = asksHelp(ARGV.slice(1));
71
76
  var STDIO_INPUT = ARGV[0] === "mcp" && !ARGV.includes("--http") && !WANTS_HELP ? bufferedCopy(process.stdin) : undefined;
72
77
  async function runNodeInit(rest) {
73
- const { nodeInit, parseNodeInitFlags } = await import("./chunks/node-init-rcepfyeh.js");
78
+ const { nodeInit, parseNodeInitFlags } = await import("./chunks/node-init-amedveja.js");
74
79
  const flags = parseNodeInitFlags(rest);
75
80
  if (flags instanceof Error) {
76
81
  process.stderr.write(`arp init --node: ${flags.message}
@@ -100,7 +105,7 @@ async function runNodeInit(rest) {
100
105
  async function shareCommand(rest) {
101
106
  const { arpHome } = await import("./chunks/index-jrs2shcc.js");
102
107
  const { homedir } = await import("node:os");
103
- const share = await import("./chunks/share-vtbkzs5f.js");
108
+ const share = await import("./chunks/share-ax2k8805.js");
104
109
  const env = { arpHome: arpHome(process.env, homedir()), home: homedir(), cwd: process.cwd() };
105
110
  if (rest[0] === "send") {
106
111
  if (!share.decide(env).on) {
@@ -108,7 +113,7 @@ async function shareCommand(rest) {
108
113
  return EXIT.ok;
109
114
  }
110
115
  process.env["ARP_TARGET"] ??= "testnet";
111
- const { writeLineHere } = await import("./chunks/line-691gbaha.js");
116
+ const { writeLineHere } = await import("./chunks/line-kvm1ew55.js");
112
117
  const done = await share.sendShared(env, async (line) => {
113
118
  await writeLineHere(line);
114
119
  });
@@ -139,7 +144,7 @@ async function run(argv) {
139
144
  return runNodeInit(rest);
140
145
  switch (command) {
141
146
  case "mcp": {
142
- const { main } = await import("./chunks/server-59zry2jp.js");
147
+ const { main } = await import("./chunks/server-ek7fet5m.js");
143
148
  await main(rest.includes("--http") ? rest : ["--stdio", ...rest], STDIO_INPUT);
144
149
  return EXIT.ok;
145
150
  }
@@ -154,6 +159,17 @@ async function run(argv) {
154
159
  `);
155
160
  return EXIT.writeFailed;
156
161
  }
162
+ case "check": {
163
+ const { checkSkill, skillRefOf, thisMachine } = await import("./chunks/check-k4qnc9ee.js");
164
+ const ref = rest.length === 1 ? skillRefOf(rest[0] ?? "") : null;
165
+ if (ref === null) {
166
+ process.stderr.write(`usage: arp check <owner/repo/skill | https://github.com/owner/repo?skill=name>
167
+ `);
168
+ return EXIT.usage;
169
+ }
170
+ process.stdout.write(await checkSkill(ref, { env: process.env, machine: thisMachine() }));
171
+ return EXIT.ok;
172
+ }
157
173
  case "line": {
158
174
  const flag = (name) => {
159
175
  const at = rest.indexOf(`--${name}`);
@@ -165,14 +181,17 @@ async function run(argv) {
165
181
  process.stderr.write(`usage: arp line --tool <url> --outcome worked|failed [--domain <category>] [--reason <reason>]
166
182
  [--parent <category> --why <text>] adds a --domain the tree lacks, under --parent
167
183
  [--payment-tx <hash> --network eip155:8453] the x402 payment this outcome refers to;
168
- --tool is then the exact URL you paid
184
+ --tool is then the exact URL you paid;
185
+ its values are removed before anything is signed
186
+ ` + ` [--pay-to <0x…> --asset <0x…> --price <units> --terms-at <unix|ISO>] with --payment-tx: the 402's
187
+ ` + ` payTo, asset and amount you paid against, and when it came
169
188
  [--needs <name>] with missing-program or missing-key: the program or variable name (never a value)
170
189
  [--with <name>] with --outcome worked: what you had to add; either is written only if the SKILL.md names it
171
190
  `);
172
191
  return EXIT.usage;
173
192
  }
174
193
  process.env["ARP_TARGET"] ??= "testnet";
175
- const { lineFromArgs, writeLineHere } = await import("./chunks/line-691gbaha.js");
194
+ const { lineFromArgs, writeLineHere } = await import("./chunks/line-kvm1ew55.js");
176
195
  const input = lineFromArgs({
177
196
  toolUrl,
178
197
  outcome,
@@ -182,6 +201,10 @@ async function run(argv) {
182
201
  why: flag("why"),
183
202
  paymentTx: flag("payment-tx"),
184
203
  network: flag("network"),
204
+ payTo: flag("pay-to"),
205
+ asset: flag("asset"),
206
+ price: flag("price"),
207
+ termsAt: flag("terms-at"),
185
208
  needs: flag("needs"),
186
209
  with: flag("with")
187
210
  });
@@ -202,21 +225,21 @@ async function run(argv) {
202
225
  }
203
226
  }
204
227
  case "backfill": {
205
- const { backfill } = await import("./chunks/backfill-awengrsd.js");
228
+ const { backfill } = await import("./chunks/backfill-5zmh0t43.js");
206
229
  const found = backfill();
207
230
  process.stdout.write(`read ${found.transcripts} transcripts: ${found.uses} skill uses, ${found.added} new failures in ${found.file}
208
231
  `);
209
232
  return EXIT.ok;
210
233
  }
211
234
  case "node": {
212
- const { main } = await import("./chunks/node-m0mx4y5k.js");
235
+ const { main } = await import("./chunks/node-x35ncwhq.js");
213
236
  await main();
214
237
  return EXIT.ok;
215
238
  }
216
239
  case "init":
217
240
  case "uninstall":
218
241
  case "doctor": {
219
- const install = await import("./chunks/commands-157bms70.js");
242
+ const install = await import("./chunks/commands-t5a0w785.js");
220
243
  const { processEnv } = await import("./chunks/env-n5ac8d1z.js");
221
244
  const flags = install.parseFlags(rest);
222
245
  if (flags instanceof Error) {