@provian/mcp 0.0.0-stage → 1.2.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 (101) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +21 -0
  3. package/README.md +266 -2
  4. package/bin/provian-mcp.mjs +18 -0
  5. package/dist/agent-wallet-registration.d.ts +34 -0
  6. package/dist/agent-wallet-registration.d.ts.map +1 -0
  7. package/dist/agent-wallet-registration.js +440 -0
  8. package/dist/agent-wallet-registration.js.map +1 -0
  9. package/dist/core/challenge.d.ts +187 -0
  10. package/dist/core/challenge.d.ts.map +1 -0
  11. package/dist/core/challenge.js +536 -0
  12. package/dist/core/challenge.js.map +1 -0
  13. package/dist/core/crypto.d.ts +44 -0
  14. package/dist/core/crypto.d.ts.map +1 -0
  15. package/dist/core/crypto.js +124 -0
  16. package/dist/core/crypto.js.map +1 -0
  17. package/dist/core/disclosure-request.d.ts +169 -0
  18. package/dist/core/disclosure-request.d.ts.map +1 -0
  19. package/dist/core/disclosure-request.js +400 -0
  20. package/dist/core/disclosure-request.js.map +1 -0
  21. package/dist/core/genesis-offer.d.ts +25 -0
  22. package/dist/core/genesis-offer.d.ts.map +1 -0
  23. package/dist/core/genesis-offer.js +34 -0
  24. package/dist/core/genesis-offer.js.map +1 -0
  25. package/dist/core/harness-tool-vocabulary.d.ts +55 -0
  26. package/dist/core/harness-tool-vocabulary.d.ts.map +1 -0
  27. package/dist/core/harness-tool-vocabulary.js +116 -0
  28. package/dist/core/harness-tool-vocabulary.js.map +1 -0
  29. package/dist/core/keccak256.d.ts +15 -0
  30. package/dist/core/keccak256.d.ts.map +1 -0
  31. package/dist/core/keccak256.js +111 -0
  32. package/dist/core/keccak256.js.map +1 -0
  33. package/dist/core/key-custody.d.ts +33 -0
  34. package/dist/core/key-custody.d.ts.map +1 -0
  35. package/dist/core/key-custody.js +59 -0
  36. package/dist/core/key-custody.js.map +1 -0
  37. package/dist/core/meter-hash.d.ts +2 -0
  38. package/dist/core/meter-hash.d.ts.map +1 -0
  39. package/dist/core/meter-hash.js +8 -0
  40. package/dist/core/meter-hash.js.map +1 -0
  41. package/dist/core/meter-wire.d.ts +193 -0
  42. package/dist/core/meter-wire.d.ts.map +1 -0
  43. package/dist/core/meter-wire.js +418 -0
  44. package/dist/core/meter-wire.js.map +1 -0
  45. package/dist/core/output-signature.d.ts +162 -0
  46. package/dist/core/output-signature.d.ts.map +1 -0
  47. package/dist/core/output-signature.js +367 -0
  48. package/dist/core/output-signature.js.map +1 -0
  49. package/dist/core/presentation.d.ts +141 -0
  50. package/dist/core/presentation.d.ts.map +1 -0
  51. package/dist/core/presentation.js +160 -0
  52. package/dist/core/presentation.js.map +1 -0
  53. package/dist/core/recovery-seal.d.ts +36 -0
  54. package/dist/core/recovery-seal.d.ts.map +1 -0
  55. package/dist/core/recovery-seal.js +122 -0
  56. package/dist/core/recovery-seal.js.map +1 -0
  57. package/dist/core/server.d.ts +38 -0
  58. package/dist/core/server.d.ts.map +1 -0
  59. package/dist/core/server.js +106 -0
  60. package/dist/core/server.js.map +1 -0
  61. package/dist/core/thread-reader.d.ts +8 -0
  62. package/dist/core/thread-reader.d.ts.map +1 -0
  63. package/dist/core/thread-reader.js +47 -0
  64. package/dist/core/thread-reader.js.map +1 -0
  65. package/dist/core/tool-set.d.ts +28 -0
  66. package/dist/core/tool-set.d.ts.map +1 -0
  67. package/dist/core/tool-set.js +71 -0
  68. package/dist/core/tool-set.js.map +1 -0
  69. package/dist/core/tools.d.ts +151 -0
  70. package/dist/core/tools.d.ts.map +1 -0
  71. package/dist/core/tools.js +3623 -0
  72. package/dist/core/tools.js.map +1 -0
  73. package/dist/core/types.d.ts +189 -0
  74. package/dist/core/types.d.ts.map +1 -0
  75. package/dist/core/types.js +17 -0
  76. package/dist/core/types.js.map +1 -0
  77. package/dist/credentials.d.ts +46 -0
  78. package/dist/credentials.d.ts.map +1 -0
  79. package/dist/credentials.js +213 -0
  80. package/dist/credentials.js.map +1 -0
  81. package/dist/device-credentials.d.ts +57 -0
  82. package/dist/device-credentials.d.ts.map +1 -0
  83. package/dist/device-credentials.js +403 -0
  84. package/dist/device-credentials.js.map +1 -0
  85. package/dist/eip191.d.ts +18 -0
  86. package/dist/eip191.d.ts.map +1 -0
  87. package/dist/eip191.js +41 -0
  88. package/dist/eip191.js.map +1 -0
  89. package/dist/index.d.ts +21 -0
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.js +48 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/runtime-env.d.ts +131 -0
  94. package/dist/runtime-env.d.ts.map +1 -0
  95. package/dist/runtime-env.js +328 -0
  96. package/dist/runtime-env.js.map +1 -0
  97. package/dist/stdio.d.ts +6 -0
  98. package/dist/stdio.d.ts.map +1 -0
  99. package/dist/stdio.js +136 -0
  100. package/dist/stdio.js.map +1 -0
  101. package/package.json +60 -4
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registeredToolNames = registeredToolNames;
4
+ exports.diffToolSet = diffToolSet;
5
+ exports.assertServedToolSet = assertServedToolSet;
6
+ exports.privateKeyFieldViolations = privateKeyFieldViolations;
7
+ /**
8
+ * The ONE comparator every tool-list pin binds to.
9
+ *
10
+ * `tools/list` serves `PROVIAN_TOOLS` verbatim (server.ts), in every mode, over stdio and over
11
+ * the relay's `/mcp` mount (the relay serves this same core, mirrored by
12
+ * scripts/sync-mcp-core.sh). A test that pins the served list must therefore compare it with
13
+ * that registry, never with a redeclared literal: five such literals (three here, two in the
14
+ * relay) each held their own copy of the tool names and went red when added tools
15
+ * (`answer_challenge`, `feature_item`, …). Binding to the single source ends that class.
16
+ *
17
+ * The comparator is not vacuous by construction: an empty registry is refused (a comparison
18
+ * over zero tools proves nothing), and a missing, an extra, or a duplicated served name each
19
+ * fail with the offending names (see the RED control in tools.test.ts).
20
+ */
21
+ const tools_1 = require("./tools");
22
+ const key_custody_1 = require("./key-custody");
23
+ /** The registered tool names, sorted — the single source every pin compares against. */
24
+ function registeredToolNames() {
25
+ return tools_1.PROVIAN_TOOLS.map((t) => t.name).sort();
26
+ }
27
+ function diffToolSet(served, registered = registeredToolNames()) {
28
+ const servedSet = new Set(served);
29
+ const registeredSet = new Set(registered);
30
+ const seen = new Set();
31
+ const duplicates = new Set();
32
+ for (const name of served) {
33
+ if (seen.has(name))
34
+ duplicates.add(name);
35
+ seen.add(name);
36
+ }
37
+ return {
38
+ missing: [...registeredSet].filter((name) => !servedSet.has(name)).sort(),
39
+ extra: [...servedSet].filter((name) => !registeredSet.has(name)).sort(),
40
+ duplicates: [...duplicates].sort(),
41
+ };
42
+ }
43
+ /** Throws unless `served` is exactly the registered set, once each, over a non-empty registry. */
44
+ function assertServedToolSet(served, registered = registeredToolNames()) {
45
+ if (registered.length === 0) {
46
+ throw new Error('tool registry is empty: a comparison over zero tools proves nothing');
47
+ }
48
+ const diff = diffToolSet(served, registered);
49
+ if (diff.missing.length > 0 || diff.extra.length > 0 || diff.duplicates.length > 0) {
50
+ throw new Error(`served tool set differs from the registry: missing [${diff.missing.join(', ')}] `
51
+ + `extra [${diff.extra.join(', ')}] duplicated [${diff.duplicates.join(', ')}]`);
52
+ }
53
+ }
54
+ /**
55
+ * Every input, across the given tools, that names private key material and is not the one
56
+ * declared local-only field. Empty means no tool schema accepts a private key. The input
57
+ * type is wide on purpose (any name + schema) so a violating registry is constructible in
58
+ * the RED control.
59
+ */
60
+ function privateKeyFieldViolations(tools = tools_1.PROVIAN_TOOLS) {
61
+ const out = [];
62
+ for (const tool of tools) {
63
+ const allowed = key_custody_1.LOCAL_ONLY_PRIVATE_KEY_FIELDS[tool.name] ?? [];
64
+ for (const field of (0, key_custody_1.findPrivateKeyFields)(tool.inputSchema)) {
65
+ if (!allowed.includes(field))
66
+ out.push({ tool: tool.name, field });
67
+ }
68
+ }
69
+ return out;
70
+ }
71
+ //# sourceMappingURL=tool-set.js.map
@@ -0,0 +1 @@
1
+ {"version":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ian MCP tool set — one definition, two transports.
3
+ *
4
+ * SHARED CORE — canonical in `provian-mcp/src/core/`, mirrored into
5
+ * `provian-backend/src/mcp/core/`. Edit only the canonical copy and run
6
+ * `scripts/sync-mcp-core.sh`.
7
+ *
8
+ * PEs prove provenance. An agent declaring its own work
9
+ * has no path to a PE, so there is no report tool here (submit_pe and
10
+ * submit_sovereign_work were removed): an agent's work is recorded by the observer
11
+ * daemon on its machine, and by the counterparty / forge / chain witnesses behind
12
+ * the Commons and on-chain tools below. §5: every "what earns" string here
13
+ * reads WHAT_EARNS_NOTE (tool calls from each program's one witness — session files,
14
+ * proxy, OTel or the process lane — forge-webhook commits, Commons acts, on-chain acts
15
+ * signed with the agent's own key).
16
+ *
17
+ * Every handler is a thin wrapper over the EXISTING Provian REST API:
18
+ * create_wallet GET /v1/agent/wallet/challenge + POST /v1/agent/wallet/create
19
+ * genesis_status GET /v1/agent/genesis/status/:wallet_id
20
+ * get_agent_record GET /v1/agents/:id/record (fallback: /v1/agents/:id/profile)
21
+ * get_pvt_estimate GET /v1/pvt/estimate
22
+ * browse_jobs GET /v1/commons/jobs (the ONE Commons board,)
23
+ * read_job GET /v1/commons/jobs/:id (+ /applications, /escrow)
24
+ * post_job POST /v1/commons/jobs/post
25
+ * apply_job POST /v1/commons/jobs/:id/apply
26
+ * accept_applicant POST /v1/commons/jobs/:id/accept
27
+ * fund_job GET /v1/commons/jobs/:id/escrow (plan) + POST /v1/commons/jobs/:id/fund
28
+ * deliver_job POST /v1/commons/jobs/:id/deliver (legacy job_… ids: POST /v1/jobs/:id/deliver)
29
+ * release_job GET …/escrow (plan) + POST /v1/commons/jobs/:id/complete
30
+ * dispute_job GET …/escrow (plan) + POST /v1/commons/jobs/:id/dispute
31
+ * read_job_dispute GET /v1/commons/jobs/:id/dispute
32
+ * settle_job_dispute POST /v1/commons/jobs/:id/dispute/settle
33
+ * market_jobs GET /v1/commons/market/jobs (+ /market/stats)
34
+ * vouch POST /v1/agent/wallet/:id/vouch/burn (+ GET …/vouches, GET /v1/commons/agent/:id/vouches)
35
+ * link_external_address POST /v1/agent/external-address/challenge + /verify
36
+ * present_challenge POST /v1/agent/wallet/:id/present/challenge (relay-SIGNED,); unsigned + local without credentials
37
+ * check_challenge (pure; reads only the requester's public key) the presenter's pre-burn verdict
38
+ * record_burn POST /v1/agent/wallet/:id/burn/record
39
+ * present POST /v1/agent/wallet/:id/present
40
+ * verify_presentation POST /v1/present/verify
41
+ * read_handshake_state GET /v1/agent/wallet/:id/rail-handshake
42
+ * get_pvt_balance GET /v1/agent/wallet/:id/balances
43
+ * read_inbox GET /v1/agent/wallet/:id/inbox
44
+ * wallet_challenge GET /v1/agent/wallet/challenge (remote-capable; public key only,)
45
+ * wallet_create POST /v1/agent/wallet/create (remote-capable; PoP signature only,)
46
+ * request_link POST /v1/agent/wallet/:id/request-link
47
+ * escrow_target GET /v1/agent/wallet/:id/escrow-target (the anchor to seal your key to)
48
+ * recovery_escrow POST /v1/agent/wallet/:id/recovery-escrow (ciphertext only)
49
+ *
50
+ * AUTH MODEL (load-bearing): this layer NEVER validates credentials itself.
51
+ * It forwards whatever the caller supplied (Authorization: Bearer
52
+ * api_key:api_secret, or DeviceKey args) to the REST endpoint, where the
53
+ * relay's existing middleware — createAgentAuthMiddleware, device auth, PoP
54
+ * verification — is the sole authority. No new auth path is minted here, and
55
+ * every existing per-route rate limit applies unchanged because the calls go
56
+ * through the same routes.
57
+ *
58
+ * Copy discipline: work mints, the bookkeeping around it does not; eligible
59
+ * every act of work mints PVT once at its best-supported value. Never state or imply that
60
+ * every action earns PVT, and never state or imply a fiat value for PVT.
61
+ */
62
+ import { type PeFact } from './presentation';
63
+ import type { ProvianToolDef, ToolContext, ToolResult } from './types';
64
+ /** Version reported by both transports. Keep in sync with provian-mcp/package.json. */
65
+ export declare const PROVIAN_MCP_VERSION = "1.2.1";
66
+ export declare const PROVIAN_MCP_SERVER_NAME = "provian";
67
+ /**
68
+ * §5 : what an agent's work mints from — the same witnesses on every surface that
69
+ * tells an agent (or its human) what earns, hosted bots included. Each program has exactly one tool
70
+ * witness: its session files, otherwise the proxy, otherwise OTel, otherwise — for a program
71
+ * on its own machine with none of those — the process lane, command by command (a Grok Bot is one).
72
+ * Capture health per device is the source of truth for which lanes are live. No tool reports the agent's own work.
73
+ */
74
+ export declare const WHAT_EARNS_NOTE: string;
75
+ /**
76
+ * Base mainnet pins the on-chain plans sign against. Mirrors the checked-in sources of
77
+ * truth — ProvianEscrowV4 from contracts/deployments/base-pvt9-institutions.json, the
78
+ * PVT9 kernel and USDC from config/pvt9-base.json (tools.test.ts binds each to its file).
79
+ */
80
+ export declare const COMMONS_HIRE_BASE_PINS: {
81
+ readonly chainId: 8453;
82
+ readonly escrow: "0x96560fdf49e563efcdc2d502934676dc074732d0";
83
+ readonly tokens: {
84
+ readonly pvt: "0x8811441914381143b9408c5c32247367f86f173a";
85
+ readonly usdc: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
86
+ };
87
+ };
88
+ /**
89
+ * The on-chain escrow id for a Commons hire — byte-identical to the SDK's
90
+ * `deriveHireOnchainEscrowId`: keccak256(abi.encode("provian.commons.hire-escrow.v1", depositor,
91
+ * relayEscrowId)). Deterministic per (depositor, hire): every plan for one hire names ONE
92
+ * on-chain escrow, and the contract's EscrowAlreadyExists refuses a second createEscrow at it,
93
+ * so re-planning after a stopped run can never open (and fund) a second escrow for the hire.
94
+ */
95
+ export declare function deriveHireOnchainEscrowId(depositor: string, relayEscrowId: string): string;
96
+ /** Static-type ABI encoding for the escrow + ERC-20 calls the hire legs use. */
97
+ export declare function encodeHireCall(fn: 'createEscrow' | 'approve' | 'fundEscrow' | 'releaseEscrow' | 'disputeEscrow' | 'claimDisputeTimeout', args: {
98
+ escrowId?: string;
99
+ recipient?: string;
100
+ amount?: bigint;
101
+ autoReleaseAt?: bigint;
102
+ currency?: 'pvt' | 'usdc';
103
+ spender?: string;
104
+ }): string;
105
+ /** USD float → USDC atomic (6 dp) — byte-identical to the relay's usdcToAtomic. */
106
+ export declare function usdcToAtomic(amountUsdc: number): bigint;
107
+ /**
108
+ * pe_facts for a pe_fact presentation (PE meter). The relay keeps no PE, so every entry must carry
109
+ * the PE and its inclusion proof; an entry without them, or whose PE is not the named one, is
110
+ * refused here before anything is signed or sent.
111
+ */
112
+ export declare function parsePeFactArgs(raw: unknown): {
113
+ facts: PeFact[];
114
+ } | {
115
+ refuse: string;
116
+ };
117
+ /**
118
+ * item 4 : every thread read carries the owner's reply policy as the relay
119
+ * handed it, and what to do under it in this server's terms. A missing policy is the default
120
+ * (answer anyone); one this server cannot read is "ask me first" (unknown = block).
121
+ */
122
+ export declare function replyInstructionFor(policy: unknown): string;
123
+ /** The exact signing recipe, returned with every challenge so an agent can write its own signer. */
124
+ export declare const WALLET_POP_SIGNING_RECIPE: {
125
+ readonly curve: "secp256k1";
126
+ readonly message: "the UTF-8 bytes of the `challenge` string exactly as returned (64 hex characters; sign the text itself, do not hex-decode it)";
127
+ readonly hash: "SHA-256, applied once (e.g. Node: crypto.sign(\"sha256\", Buffer.from(challenge, \"utf8\"), privateKey); Python cryptography: key.sign(challenge.encode(), ec.ECDSA(hashes.SHA256())))";
128
+ readonly signature_encoding: "DER (ASN.1 SEQUENCE of r and s), as lowercase hex, no 0x";
129
+ readonly public_key_encoding: "the 64-byte uncompressed point x‖y as 128 hex characters (no 0x, no leading 04). From a Node JWK: hex(base64url-decode(x)) + hex(base64url-decode(y))";
130
+ };
131
+ /**
132
+ * The output-signature message and object, as the relay defines them in
133
+ * `core/meter/output-signature.ts` (byte-identical in the relay, the SDK and the app). The MCP core
134
+ * is mirrored into the relay's Docker context and carries no crypto dependency, so it restates the
135
+ * few literals it needs; `output-signature-mcp-parity` (relay jest) and the pinned vectors in
136
+ * tools.test.ts hold them equal to the one definition.
137
+ */
138
+ export declare const OUTPUT_SIGNATURE_MESSAGE_PREFIX_MCP = "provian-output:v1:";
139
+ export declare const OUTPUT_SIGNATURE_HEADER_MCP = "Provian-Output-Signature";
140
+ export declare const OUTPUT_SIGNATURE_JSON_KEY_MCP = "provian_output_signature";
141
+ export declare const PROVIAN_TOOLS: ProvianToolDef[];
142
+ /** Look up a tool by name. */
143
+ export declare function findTool(name: string): ProvianToolDef | undefined;
144
+ /**
145
+ * Execute a tool with uniform pre-flight guidance and error shaping. Auth is
146
+ * NOT enforced here — `requiresAuth` only produces a helpful error when no
147
+ * credentials were supplied at all; the relay's middleware remains the sole
148
+ * validator of any credentials that are present.
149
+ */
150
+ export declare function callProvianTool(name: string, args: Record<string, unknown>, ctx: ToolContext): Promise<ToolResult>;
151
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/core/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAOH,OAAO,EAQL,KAAK,MAAM,EAMZ,MAAM,gBAAgB,CAAC;AAkBxB,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACX,MAAM,SAAS,CAAC;AAEjB,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AAMjD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,QAQJ,CAAC;AAuiBzB;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;CAOzB,CAAC;AA4BX;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAM1F;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAC5B,EAAE,EAAE,cAAc,GAAG,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,eAAe,GAAG,qBAAqB,EACzG,IAAI,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;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