@arp-protocol/cli 0.0.3 → 0.0.5

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,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ "13579_default" as _13579_default
4
+ } from "./cli-7c393v47.js";
2
5
  import {
3
6
  domain_aliases_default
4
7
  } from "./cli-00qp1sj2.js";
@@ -33,6 +36,7 @@ import {
33
36
  readSkillContents,
34
37
  receiptMatchesContent,
35
38
  recoverContentRequester,
39
+ redactEndpointUrl,
36
40
  renderSkillPrompt,
37
41
  resolveDomain,
38
42
  reviewSkill,
@@ -46,7 +50,7 @@ import {
46
50
  skillRefFromUrl,
47
51
  sponsorProofDigest,
48
52
  verifyContentReceipt
49
- } from "./cli-wev0jgf7.js";
53
+ } from "./cli-g3q6fxm0.js";
50
54
  import {
51
55
  encodeFunctionData
52
56
  } from "./cli-0gsbnq5w.js";
@@ -106,176 +110,6 @@ var _1155_default = {
106
110
  deployedAt: "2026-09-16",
107
111
  gasCost: "0.0000228 TRUST for both enforcers"
108
112
  };
109
- // ../../data/deployments/13579.json
110
- var _13579_default = {
111
- chain: {
112
- name: "Intuition Testnet",
113
- chainId: 13579,
114
- chainIdHex: "0x350b",
115
- nativeCurrency: {
116
- name: "Test Trust",
117
- symbol: "tTRUST",
118
- decimals: 18
119
- },
120
- rpcUrl: "https://testnet.rpc.intuition.systems/http",
121
- explorerUrl: "https://testnet.explorer.intuition.systems",
122
- graphqlUrl: "https://testnet.intuition.sh/v1/graphql",
123
- _source: [
124
- "Intuition skill: .claude/skills/intuition/SKILL.md (table at line 149, Viem chain config at line 184)",
125
- "MetaMask deployments: ~/Project/metamask-smart-accounts-kit/packages/delegation-deployments/src/index.ts (CHAIN_ID.intuitionTestnet = 0x350b)"
126
- ]
127
- },
128
- intuition: {
129
- _source: ".claude/skills/intuition/SKILL.md line 152",
130
- multiVault: "0x2Ece8D4dEdcB9918A398528f3fa4688b1d2CAB91"
131
- },
132
- metamaskDelegationFramework: {
133
- version: "1.3.0",
134
- _source: "MetaMask deployments package (~/Project/metamask-smart-accounts-kit/packages/delegation-deployments/src/contractAddresses.ts → DEPLOYMENTS_1_3_0). All addresses are deterministic CREATE2 — same value on every chain MetaMask supports. Intuition Testnet (chainId 0x350b) is explicitly mapped to DEPLOYMENTS_1_3_0 at packages/delegation-deployments/src/index.ts line 148.",
135
- delegationManager: "0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3",
136
- entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
137
- simpleFactory: "0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c",
138
- implementations: {
139
- hybridDeleGator: "0x48dBe696A4D990079e039489bA2053B36E8FFEC4",
140
- multiSigDeleGator: "0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7",
141
- eip7702StatelessDeleGator: "0x63c0c19a282a1B52b07dD5a65b58948A07DAE32B"
142
- },
143
- enforcers: {
144
- _note: "Standard caveat enforcers. ARP composes its custom DomainScopeEnforcer + TrustStakeCapEnforcer alongside a subset of these.",
145
- allowedCalldata: "0xc2b0d624c1c4319760C96503BA27C347F3260f55",
146
- allowedMethods: "0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5",
147
- allowedTargets: "0x7F20f61b1f09b08D970938F6fa563634d65c4EeB",
148
- approvalRevocation: "0xe264F1f09A19505a1ca1a86D5b01E8bFdb64324A",
149
- blockNumber: "0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c",
150
- deployed: "0x24ff2AA430D53a8CD6788018E902E098083dcCd2",
151
- erc20BalanceChange: "0xcdF6aB796408598Cea671d79506d7D48E97a5437",
152
- erc20TransferAmount: "0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc",
153
- erc20PeriodTransfer: "0x474e3Ae7E169e940607cC624Da8A15Eb120139aB",
154
- erc20Streaming: "0x56c97aE02f233B29fa03502Ecc0457266d9be00e",
155
- erc721BalanceChange: "0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e",
156
- erc721Transfer: "0x3790e6B7233f779b09DA74C72b6e94813925b9aF",
157
- erc1155BalanceChange: "0x63c322732695cAFbbD488Fc6937A0A7B66fC001A",
158
- exactCalldataBatch: "0x982FD5C86BBF425d7d1451f974192d4525113DfD",
159
- exactCalldata: "0x99F2e9bF15ce5eC84685604836F71aB835DBBdED",
160
- exactExecutionBatch: "0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017",
161
- exactExecution: "0x146713078D39eCC1F5338309c28405ccf85Abfbb",
162
- id: "0xC8B5D93463c893401094cc70e66A206fb5987997",
163
- logicalOrWrapper: "0xE1302607a3251AF54c3a6e69318d6aa07F5eB46c",
164
- limitedCalls: "0x04658B29F6b82ed55274221a06Fc97D318E25416",
165
- nativeBalanceChange: "0xbD7B277507723490Cd50b12EaaFe87C616be6880",
166
- argsEqualityCheck: "0x44B8C6ae3C304213c3e298495e12497Ed3E56E41",
167
- nativeTokenPayment: "0x4803a326ddED6dDBc60e659e5ed12d85c7582811",
168
- nativeTokenTransferAmount: "0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320",
169
- nativeTokenStreaming: "0xD10b97905a320b13a0608f7E9cC506b56747df19",
170
- nativeTokenPeriodTransfer: "0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9",
171
- nonce: "0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f",
172
- ownershipTransfer: "0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681",
173
- redeemer: "0xE144b0b2618071B4E56f746313528a669c7E65c5",
174
- specificActionERC20TransferBatch: "0x6649b61c873F6F9686A1E1ae9ee98aC380c7bA13",
175
- timestamp: "0x1046bb45C8d673d4ea75321280DB34899413c069",
176
- valueLte: "0x92Bf12322527cAA612fd31a0e810472BBB106A8F",
177
- multiTokenPeriod: "0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7"
178
- }
179
- },
180
- arp: {
181
- endpointBinding: {
182
- _note: "Task 39c, ADR 0094/0095. The two predicates the endpoint binding is written with: (agent identity atom) has endpoint (endpoint atom), and (pinned binding document) in context of (that triple). Both READ FROM THE GRAPH, neither minted by ARP: scripts/measure/endpoint-predicate.ts, run 2026-10-30, found `has endpoint` (Thing, 6 triples) and `in context of` (Thing, 29 triples) on testnet 13579, and none of `reachable at`, `is reachable at`, `served at`, `hosted at`. `in context of` differs from mainnet's 0x892054b0… (scripts/measure/nested-triples.ts), so never copy it across chains.",
183
- measuredAt: "2026-10-30",
184
- hasEndpoint: "0xa4488686eb3702e4e972a971ea008d6832a7f935b942366f1091566d1993a5f1",
185
- inContextOf: "0x61a88b9c372c0d164d2caf66947b67ed0fcb4c457178a271b6b3dc39fb1f8862"
186
- },
187
- _note: "Written by scripts/deploy/deploy.sh --broadcast. Addresses are EOA-nonce-derived (CREATE). deploy.sh skips a contract whose address here already has code unless --force, and on a redeploy keeps the replaced address under <name>V<n>. ModuleRegistry and DomainScopeEnforcer were removed from src/ in 59ac83a; their entries are the record.",
188
- deployer: "0xE596096F4176b682E300d73963e7B04B383C1AA1",
189
- deployedAt: "2026-06-01T13:30:00Z",
190
- moduleRegistry: "0xc9a2f66775828017e984E8be077fA2d17e0A41F4",
191
- moduleRegistryV1: "0x777C28eCb4688D647B535098d11fB87A9746334f",
192
- _moduleRegistryNote: "Redeployed 2026-06-03 with schemaURI uniqueness (ADR 0013). V1 address kept for historical reference; orphan (UI reads V2).",
193
- domainScopeEnforcer: "0x516B82E29e3Ca46Ca810FC2EEf348932b198f7f9",
194
- trustStakeCapEnforcer: "0x19e07280F1483Aa9aCDb1a7F8C61bfd20c7879Bc",
195
- identityRegistry: "0xC165A2AD2E540A4069E02834009161E2b4490d5A",
196
- sponsor: "0x77939A4c276f3E549276CEB3A09CDa1fF58b7ec9",
197
- sponsorV1: "0xE596096F4176b682E300d73963e7B04B383C1AA1",
198
- _sponsorNote: "The address ARP's sponsoring service sends from on 13579 (apps/sponsor, ADR 0092, 0094). Since 2026-11-09 a key of its own, for the hosted service (task 78, ADR 0149): sponsorV1 is the deployer's key, which sent for it before and also holds mainnet funds. Not a contract: an EOA whose key is a file mounted into the service's container, never read by an agent. Before 2026-11-09: The address ARP's sponsoring service sends from on 13579 (apps/sponsor, ADR 0092, 0094): its GET / answered this on 2026-11-02. /tools counts every deposit it sent in Usage: the proof-gated ones, the edge creations it paid for, and, because the address is also ARP's deployer, 3 deposits written before the service existed (scripts/measure/sponsor-deposit-provenance.ts, 2026-11-03). Not a contract: an EOA whose key is in a 0600 file the agent never reads.",
199
- deployedTxs: {
200
- moduleRegistry: "0x6ee4f4d76dd55c69ea434f8c3c204cb6149df1c588910b1792db1650681fbc2e",
201
- moduleRegistryV1: "0x02abe9a0c598df131995bc40927a4e0be0b86e7bdbfe747cfdf37fb19b069634",
202
- domainScopeEnforcer: "0x6ca2c4e680b45eaa37147c2458bd38d756e6ffabb560755657cc9caf893df272",
203
- trustStakeCapEnforcer: "0x8dd54ea3eeba14645531c501c3f1b8ec95e6a95788825e00fbe239ff32263159",
204
- identityRegistry: "0x60b1f6ff7dbdcbca6864794eb9c5cf1e3ba94770daac6d2e77a4df00d726900c",
205
- trustStakeCapEnforcerV1: "0x80e36828202a9c7606b92146076ed123155a94cfda3a2ab53013bd27be71764f"
206
- },
207
- explorerLinks: {
208
- moduleRegistry: "https://testnet.explorer.intuition.systems/address/0xc9a2f66775828017e984E8be077fA2d17e0A41F4",
209
- moduleRegistryV1: "https://testnet.explorer.intuition.systems/address/0x777C28eCb4688D647B535098d11fB87A9746334f",
210
- domainScopeEnforcer: "https://testnet.explorer.intuition.systems/address/0x516B82E29e3Ca46Ca810FC2EEf348932b198f7f9",
211
- trustStakeCapEnforcer: "https://testnet.explorer.intuition.systems/address/0x19e07280F1483Aa9aCDb1a7F8C61bfd20c7879Bc",
212
- identityRegistry: "https://testnet.explorer.intuition.systems/address/0xC165A2AD2E540A4069E02834009161E2b4490d5A",
213
- trustStakeCapEnforcerV1: "https://testnet.explorer.intuition.systems/address/0x7BB56819E9a413B8B4668C5cAF5C494c41dC0F8E"
214
- },
215
- modules: [
216
- {
217
- id: "1",
218
- name: "Solidity Audit",
219
- domain: "solidity-audit",
220
- schemaURI: "ipfs://bafkreiembmtprqzufrdkvig74lskv6iazuatblm4hwmtxkf5a3v67mkdkm",
221
- creator: "0xE596096F4176b682E300d73963e7B04B383C1AA1",
222
- tx: "0xbd97979b197e4423293180e36d69f72e8eb07d2bb11bdfb2940ec918d6f6af3c"
223
- }
224
- ],
225
- intuitionAtoms: [
226
- {
227
- atomId: "0xde8890fca8dde322ca57bce0e20dfeb23be67332f9101305ebe72facdee032dc",
228
- uri: "ipfs://bafkreiembmtprqzufrdkvig74lskv6iazuatblm4hwmtxkf5a3v67mkdkm",
229
- tx: "0x97db7629c6c973d43c0c62325754d750ee262853bdbd87496b4b82c1ea3d0ac7"
230
- }
231
- ],
232
- rigAgents: {
233
- _note: "Task 24. ERC-8004 agents on ARP's own testnet registry, minted 2026-10-19 on chain 13579. SIGNED BY THE AGENT SESSION using the operator's PRIVATE_KEY from .env, on the user's explicit authorisation — not by a human at a keyboard. See ADR 0037. security.md scopes its automation prohibition to mainnet, so this is permitted and was previously unwritten. Agents 1 and 2 were left with an EMPTY tokenURI deliberately: no-token-uri is 23% of the real cohort (32/140, scripts/measure/cohort-endpoints.ts), so they exercise a branch the three new agents cannot. Permanent: the ids are taken and setAgentURI leaves the superseded URI in the mint transaction's calldata.",
234
- registry: "0xC165A2AD2E540A4069E02834009161E2b4490d5A",
235
- agents: {
236
- "3": {
237
- slug: "rig-confirmed",
238
- exercises: "confirmed/serves-declared-protocol + tools/list recovery",
239
- endpoint: "http://localhost:3002/mcp",
240
- _endpointNote: "ARP's own MCP server, local by default. ARP_MCP_ENDPOINT regenerates the file and setAgentURI can update the agent — but that escape hatch is a rehearsal prop: portability.md rule 4 says any step that works because ARP can write to the registry is not a step, and on mainnet ARP owns no registry. The real fix is a public endpoint.",
241
- tx: "0xce4fee69c692ddf57d4537b23479d78384a9e2d06b733b532e419055ed50a086",
242
- documentSha256_16: "478ac85cd6b2357f",
243
- _documentShaNote: "sha256 of the data: URI, first 16 hex. Lets repo-vs-chain drift be detected: the fixtures in scripts/seed/rig-registration-files.ts are the source of truth for three permanent mints, and an edit to FILES would otherwise diverge silently. Checked by scripts/verify/verify-rig-claims.ts against a gate report. ONLY REPRODUCIBLE WITH ARP_MCP_ENDPOINT UNSET: OWN_ENDPOINT reads the environment and the document is hashed after substitution, so anyone with it exported sees a false DRIFT."
244
- },
245
- "4": {
246
- slug: "rig-dead",
247
- exercises: "confirmed/dead",
248
- endpoint: "http://192.0.2.1/mcp",
249
- _endpointNote: "TEST-NET-1, RFC 5737 — reserved and never routable, so it always times out. A .invalid hostname was tried first and gave inconclusive/transport-error, because a DNS failure is indistinguishable from our own network being down.",
250
- tx: "0x87bf71cf0ce55db7f82ca617b8601ee87f870e67018b1097a311ed2d61cc7378",
251
- uriUpdatedTx: "0x8f5950a61fca19b6a3f69b26f6c4159e29833689ed4b1623d8610206bfe87100",
252
- documentSha256_16: "6db8b769dd551e98"
253
- },
254
- "5": {
255
- slug: "rig-unprobeable",
256
- exercises: "not-checkable ×2 — templated and non-http-identifier. Never a defect.",
257
- tx: "0x859aff609fa10dba635ffd12d0b60b598c7c3174238f61962edb4b5eee1a0efd",
258
- documentSha256_16: "f61a9d7f6637958e"
259
- }
260
- },
261
- gate: {
262
- command: "bun run scripts/verify/verify-cohort.ts --target intuition-testnet --ids 1,2,3,4,5 --tools --out /tmp/gate.json && bun run scripts/verify/verify-rig-claims.ts /tmp/gate.json",
263
- ranAt: "2026-10-19",
264
- result: "5 agents: 2 with no tokenURI (40%), 3 read. 4 endpoints: 2 confirmed (serves-declared-protocol, dead), 2 not-checkable (templated, non-http-identifier), 0 inconclusive, 1 capability list recovered (arp_tool_reputation).",
265
- _requires: "apps/mcp/src/server.ts listening on :3002, or agent 3 reports inconclusive. The confirmed branch is therefore reproducible only on a host running that server — a known limit of this gate until ARP has a public endpoint.",
266
- _widerThanSpecced: "--ids 1,2,3,4,5 rather than 3,4,5. Including the two empty-tokenURI agents exercises a fifth branch for two extra requests.",
267
- _claimsCheck: "verify-rig-claims.ts asserts each fixture's `exercises` prose against the outcome the probe observed, and the document hashes against this file. The unit suite CANNOT close that class: confirmed and inconclusive are both probeable before a request is sent, and the mutation that actually shipped lived exactly there."
268
- }
269
- },
270
- trustStakeCapEnforcerV1: "0x7BB56819E9a413B8B4668C5cAF5C494c41dC0F8E",
271
- delegationRegister: {
272
- _note: "Task 37c, ADR 0092 item 7. The two predicates a published delegation is written with: (delegator CAIP-10) delegate to (delegate CAIP-10), and (pinned document) in context of (that triple). Both READ FROM THE GRAPH, neither minted by ARP: on testnet 13579 on 2026-11-03 exactly one atom carries each label, a Thing, `delegate to` in 10 triples and `in context of` in 29. `in context of` is the one endpointBinding uses. Never copy either across chains.",
273
- measuredAt: "2026-11-03",
274
- delegateTo: "0xb56980d42a3b03455bf41ea20fe04ae223fca0b9e688994dc661414e81e6433b",
275
- inContextOf: "0x61a88b9c372c0d164d2caf66947b67ed0fcb4c457178a271b6b3dc39fb1f8862"
276
- }
277
- }
278
- };
279
113
  // ../../data/catalogue/skills-13579.json
280
114
  var skills_13579_default = {
281
115
  _note: "What ARP wrote on chain for the skill catalogue. A RECORD, not a source of truth: every id here is a pure function of the URL or the word (ADR 0077, 0054), so the whole set is re-derivable with no credential and no network. What is not re-derivable is which ones ARP asserted, and which it later withdrew.",
@@ -6828,7 +6662,7 @@ function inProject(path, projectDir = process.env["ARP_PROJECT_DIR"]) {
6828
6662
  var SKILLS_DIR = process.env["ARP_SKILLS_DIR"] === undefined ? undefined : inProject(process.env["ARP_SKILLS_DIR"]);
6829
6663
  var READ_ONLY = process.env["ARP_TOOLS"] === "read" || DESKTOP;
6830
6664
  var CONTENT_URL = process.env["ARP_CONTENT"] ?? "http://127.0.0.1:3002";
6831
- var SPONSOR_DEFAULT = "http://127.0.0.1:3200";
6665
+ var SPONSOR_DEFAULT = "https://sponsor.arp.intuition.box";
6832
6666
  var SPONSOR_URL = process.env["ARP_SPONSOR"] ?? SPONSOR_DEFAULT;
6833
6667
  var SESSION_LOG = inProject(process.env["ARP_SESSION_LOG"] ?? ".arp/session.jsonl");
6834
6668
  var RECEIPTS_LOG = inProject(process.env["ARP_RECEIPTS"] ?? ".arp/receipts.jsonl");
@@ -7308,7 +7142,11 @@ async function approveSponsor(config, agent, ref, approval) {
7308
7142
  const next = gas.body["next"];
7309
7143
  await agent.send({ to: next.to, data: next.data, value: BigInt(next.value), chainId: DESKTOP_CHAIN_ID }, [approval]);
7310
7144
  }
7311
- async function writeLine(config, agent, input) {
7145
+ async function writeLine(config, agent, asked) {
7146
+ const input = asked.payment === undefined ? asked : { ...asked, toolUrl: redactEndpointUrl(asked.toolUrl) };
7147
+ if (input.payment !== undefined && input.terms === undefined)
7148
+ throw new Error("a line with a payment names the terms it paid against");
7149
+ const terms = input.payment === undefined ? null : input.terms ?? null;
7312
7150
  const state = await ensureAgent(config, agent);
7313
7151
  const ref = { agentRegistry: registryRef(config), agentId: state.agentId };
7314
7152
  await ensureIdentity(config, state);
@@ -7351,6 +7189,10 @@ async function writeLine(config, agent, input) {
7351
7189
  payment: input.payment === undefined ? "" : paymentAtomLabel(input.payment),
7352
7190
  endpoint: input.payment === undefined ? "" : input.toolUrl,
7353
7191
  need: input.need ?? "",
7192
+ payTo: terms?.payTo ?? "",
7193
+ asset: terms?.asset ?? "",
7194
+ price: terms?.price ?? "",
7195
+ termsAt: terms?.receivedAt ?? 0,
7354
7196
  nonce: keccak256(stringToBytes(`line-${tool}-${Date.now()}`)),
7355
7197
  expiresAt: expiresAt()
7356
7198
  }, DESKTOP_CHAIN_ID, agent.account);
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ // ../../packages/protocol/src/declare/line-need.ts
4
+ var NEEDS_LABEL = "needs";
5
+ var WITH_LABEL = "with";
6
+ var PROGRAM_NAME = /^[a-z0-9][a-z0-9._+-]{0,39}$/;
7
+ var KEY_NAME = /^[A-Z][A-Z0-9_]{2,63}$/;
8
+ function needKindOf(name) {
9
+ if (PROGRAM_NAME.test(name))
10
+ return "program";
11
+ if (KEY_NAME.test(name))
12
+ return "key";
13
+ return null;
14
+ }
15
+ function needKindOfReason(reason) {
16
+ if (reason === "missing-program")
17
+ return "program";
18
+ if (reason === "missing-key")
19
+ return "key";
20
+ return null;
21
+ }
22
+
23
+ export { NEEDS_LABEL, WITH_LABEL, PROGRAM_NAME, KEY_NAME, needKindOf, needKindOfReason };