tersign 0.4.6 → 0.4.8

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.
package/README.md CHANGED
@@ -127,8 +127,8 @@ when that stabilizes. It makes no conformance claim to that draft.
127
127
  | `TERSIGN_LEDGER_URL` | no | hosted ledger for counter-signing + chain checks |
128
128
  | `TERSIGN_LEDGER_API_KEY` | no | your seller API key on that ledger |
129
129
  | `TERSIGN_LEDGER_SELLER_ID` | no | your seller id on that ledger |
130
- | `TERSIGN_ISSUER_NAME` | no | issuer name stamped on compliance records |
131
- | `TERSIGN_ISSUER_JURISDICTION` | no | issuer jurisdiction stamped on compliance records |
130
+ | `TERSIGN_ISSUER_NAME` | no | issuer name stamped on action records |
131
+ | `TERSIGN_ISSUER_JURISDICTION` | no | issuer jurisdiction stamped on action records |
132
132
 
133
133
  Cold to counter-signed in one session: call `issue_receipt`, then check the issued receipt's digest with `npx tersign verify <digest> --ledger <url>`.
134
134
 
@@ -148,12 +148,13 @@ Full URLs, readable without auth. If you are an agent, start here.
148
148
  | Surface | Address |
149
149
  |---|---|
150
150
  | npm package | `tersign` — https://www.npmjs.com/package/tersign |
151
- | MCP registry | `io.github.tersignhq/evidence` |
151
+ | MCP registry | `io.github.tersignhq/evidence` — `npx tersign` needs no configuration; the first call self-provisions a signer-keyed account |
152
152
  | ARD catalog (Agentic Resource Discovery) | https://tersign.ai/.well-known/ai-catalog.json |
153
153
  | Verify API | `GET https://tersign.ai/v1/receipts/{digest}/verify` |
154
154
  | Envelope API | `GET https://tersign.ai/v1/receipts/{digest}/envelope?venue={internet-court\|kleros\|uma\|generic}` |
155
155
  | Ledger stats | `GET https://tersign.ai/v1/stats` |
156
156
  | Ledger signer | `GET https://tersign.ai/v1/ledger` |
157
+ | Bundle verifier, out-of-band | https://tersign.ai/verify/v1/ — `verify_bundle.py` · `keccak.py` · `secp256k1.py` · `SHA256SUMS`. A bundle ships its own checker; for evidence from an interested party fetch this copy and diff the two. |
157
158
  | llms.txt | https://raw.githubusercontent.com/tersignhq/tersign-js/main/llms.txt |
158
159
  | Conformance vectors (RFC 8785 + keccak256) | https://github.com/tersignhq/tersign-js/blob/main/test/fixtures/canonical-vectors.json |
159
160
  | Sample compliance record + digests | https://github.com/tersignhq/tersign-js/blob/main/test/fixtures/compliance-record.json |
package/dist/cli.js CHANGED
@@ -3,13 +3,21 @@ const sub = process.argv[2];
3
3
  if (sub === undefined || sub === 'mcp') {
4
4
  if (sub === 'mcp')
5
5
  process.argv.splice(2, 1);
6
- // Bare `npx tersign` with no config is almost always a curious human, not an MCP client —
7
- // greet them with the wiring instructions instead of a stack trace.
8
- if (!process.env.TERSIGN_SELLER_KEY) {
9
- console.error('tersign: this command starts the MCP server, which needs TERSIGN_SELLER_KEY set.\n\n' +
10
- 'Wire it into your MCP client config:\n' +
11
- ' { "mcpServers": { "tersign": { "command": "npx", "args": ["tersign"],\n' +
12
- ' "env": { "TERSIGN_SELLER_KEY": "0x<your-seller-key>" } } } }\n\n' +
6
+ // Bare `npx tersign` at a prompt is almost always a curious human, not an MCP client — greet
7
+ // them rather than sitting mute on a stdio transport they are not speaking. The discriminator
8
+ // is the TTY, NOT the presence of a key: an MCP client, a directory's sandbox and a CI probe
9
+ // all arrive with stdin piped, and until 2026-08-29 every one of them hit a hard exit here.
10
+ // That made `npx tersign` fail on first run for anyone who had not already exported a key,
11
+ // left the server impossible to introspect or demonstrate anywhere, and contradicted
12
+ // record_disclosure's own published promise that the first call self-provisions. The key is
13
+ // no longer required — envDeps resolves through the shared keystore — so the greeting is now
14
+ // a courtesy for humans instead of a gate on everyone.
15
+ if (process.stdin.isTTY && !process.env.TERSIGN_SELLER_KEY) {
16
+ console.error('tersign: this starts the MCP server, which speaks JSON-RPC over stdin — nothing to see\n' +
17
+ 'at a prompt. Wire it into your MCP client config:\n\n' +
18
+ ' { "mcpServers": { "tersign": { "command": "npx", "args": ["tersign"] } } }\n\n' +
19
+ 'No key needed: the first call self-provisions a signer-keyed account (OS keychain,\n' +
20
+ 'else ~/.tersign/signer.key). Set TERSIGN_SELLER_KEY to use your own.\n\n' +
13
21
  "Just exploring? Try: tersign help · tersign verify <receipt.json | 0xdigest> [--ledger url]");
14
22
  process.exit(1);
15
23
  }
@@ -8,6 +8,6 @@ export declare function envDeps(env?: Record<string, string | undefined>): McpDe
8
8
  * every client; mcp.test.ts pins it against package.json so a release bump can't drift it. */
9
9
  export declare const MCP_SERVER_IDENTITY: {
10
10
  readonly name: "tersign";
11
- readonly version: "0.4.6";
11
+ readonly version: "0.4.8";
12
12
  };
13
13
  export declare function buildServer(deps: McpDeps): McpServer;
@@ -49,7 +49,7 @@ function json(value) {
49
49
  }
50
50
  /** MUST match package.json name/version — the MCP handshake self-reports this identity to
51
51
  * every client; mcp.test.ts pins it against package.json so a release bump can't drift it. */
52
- export const MCP_SERVER_IDENTITY = { name: 'tersign', version: '0.4.6' };
52
+ export const MCP_SERVER_IDENTITY = { name: 'tersign', version: '0.4.8' };
53
53
  export function buildServer(deps) {
54
54
  const server = new McpServer(MCP_SERVER_IDENTITY);
55
55
  server.registerTool('issue_receipt', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tersign",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Tersign \u2014 the evidence layer for the agent economy. Counter-signed receipts, agent action records, idempotency enforcement, refunds, disputes, and jury-ready evidence envelopes for x402/agent-commerce sellers.",
5
5
  "license": "MIT",
6
6
  "type": "module",