@decidio/sdk 0.6.2 → 0.6.3

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/CHANGELOG.md CHANGED
@@ -1,8 +1,19 @@
1
1
  # Changelog — @decidio/sdk
2
2
 
3
- Release notes for the client SDK. The Python package `decidio` ships the same changes under the same
4
- version (the two are conformance-locked twins). Each entry names what changed, what a reader must do
5
- on upgrade, and what proved it.
3
+ Release notes for the client SDK. The Python package `decidio` ships under the same version; the core -
4
+ the gate, signing, receipts and the verifier - is conformance-locked between the two, while the command line's
5
+ first-run surfaces (the fork, `--demo`, the code sign-in) are TypeScript-first and named as such in the parity
6
+ allowlist. Each entry names what changed, what a reader must do on upgrade, and what proved it.
7
+
8
+ ## 0.6.3 — the two 0.6.2 reviews' small items
9
+
10
+ - **`DECIDIO_DEBUG_INPUT=1` no longer prints what you type** (review: Medium). The 0.6.2 trace hex-dumped every stdin
11
+ byte - passwords, codes and links, muted prompt or not. It now prints the SHAPE only: control bytes named (`\r`, `\n`,
12
+ ESC), every printable byte as `x`. A newline problem is visible in the shape alone.
13
+ - Four strings still described the sign-in as an emailed link to paste; they say the code now. The CHANGELOG's "twins"
14
+ line overstated CLI parity and now says exactly what is locked and what is TypeScript-first. Two README headings
15
+ still said "0.4". The offline local demo no longer prints "the terminal follows the web app or your phone" when it
16
+ has just said there are no such doors. `receipt --json` help says it prints a summary; the credential is the file.
6
17
 
7
18
  ## 0.6.2 — the fork after its first real run
8
19
 
package/README.md CHANGED
@@ -23,7 +23,7 @@ you approve right there (or from your Decidio app), executes on approval, then d
23
23
  sealed Authority Receipt and verifies it offline in front of you, pinned to your workspace's
24
24
  issuer. It mints a **7-day** tour token (`init` mints 90-day tokens — different jobs, different
25
25
  lifetimes) and ends by offering to clean itself up (`quickstart cleanup` works later too).
26
- Sign in once — `npx @decidio/sdk login`, or when the tour asks: the CLI emails you a link, you paste it, and
26
+ Sign in once — `npx @decidio/sdk login`, or when the tour asks: the CLI emails you an 8-character code, you type it, and
27
27
  the sign-in is kept in your profile (owner-only) for 30 days, or until this terminal closes, `logout`, or
28
28
  `quickstart cleanup`. At the human step the tour offers three doors: answer here, open the decision in
29
29
  the web app (a one-time link, signed in for you), or scan the QR with your phone — whichever answers
@@ -660,7 +660,7 @@ that fits every other confirm error.
660
660
  - **The token recovery journal** (`.decidio-token-journal`, owner-only, gitignored; ids and timestamps, never a token value; append-only by the CLI's behaviour — not OS-enforced or tamper-evident). One JSON row per event: `minted` (a token was issued, written BEFORE its credential file), `retired how=persisted` (the credential file now holds it - the token is live and that file is its handle; not revoked), `retired how=revoked` (revoked server-side), `probe` (a durability check). `doctor` names rows still outstanding; `quickstart cleanup` sweeps them.
661
661
  - `quickstart --demo` — the same tour with no account: an in-process stand-in of the API on 127.0.0.1 (shipped in this package) answers every door, a key generated for the run signs a real receipt (its content says `local-demo`; pinning it to the hosted issuer fails), and the web/phone door is a hosted demo decision page reached through a one-word relay (no account, no record, ten minutes). Your folder gains exactly one file, the receipt. Offline, the tour is terminal-only and says so.
662
662
  - `quickstart --phone web` — the QR at the human step opens the phone web rendering even when the Decidio app is installed (by default it opens the app when there is one).
663
- - `login [email]` / `logout` — sign in ONCE (the CLI emails you a link; you paste it) and forget that sign-in on this computer (the session token itself stays valid until it expires (up to 30 days) — there is no server-side revocation yet). The session is stored in your user profile, owner-only, bound to the terminal window that created it, for 30 days; `DECIDIO_SESSION_TOKEN` in the environment outranks it (headless shells).
663
+ - `login [email]` / `logout` — sign in ONCE (the CLI emails you an 8-character code; you type it) and forget that sign-in on this computer (the session token itself stays valid until it expires (up to 30 days) — there is no server-side revocation yet). The session is stored in your user profile, owner-only, bound to the terminal window that created it, for 30 days; `DECIDIO_SESSION_TOKEN` in the environment outranks it (headless shells).
664
664
  - `dev [--target URL] [--port N]` — local relay for the resume webhook (operator setups)
665
665
 
666
666
  The CLI's stream contract: **stdout carries results only** (safe to pipe — `--json` output is
@@ -703,7 +703,7 @@ Every error raised after a decision exists carries the `decisionId`, so a suspen
703
703
  timed-out action is always findable in
704
704
  your queue.
705
705
 
706
- ## What 0.4 does not yet claim
706
+ ## What the SDK does not yet claim
707
707
 
708
708
  The retest that graded 0.3.3 *A- for the core and the shipped stores* and the first-run reviews of
709
709
  0.3.3 and 0.3.5 agree on what is left, and none of it is a defect a patch release closes. Stated here so
@@ -729,7 +729,7 @@ the next reader grades a promise, not a moving target:
729
729
 
730
730
  ## Compatibility and support
731
731
 
732
- - **Stable in 0.4:** `guard.protect` / `withApproval` and their options; the durable resume
732
+ - **Stable surface:** `guard.protect` / `withApproval` and their options; the durable resume
733
733
  controller (`createDecidioResume`: `park`, `resolve`, `reconcile`, `reconfirm`, `recover`, the worker
734
734
  and both webhook handlers); the `PendingStore` contract and both shipped stores, including the on-disk
735
735
  revision-chain layout; `EvidenceOutcome` (a root export) and `ResumeStatus` / `RecoveryState` (on the
package/dist/cli.js CHANGED
@@ -501,7 +501,11 @@ function ask(question, mute = false) {
501
501
  });
502
502
  }
503
503
  if (process.env.DECIDIO_DEBUG_INPUT && process.stdin.isTTY) {
504
- process.stdin.on("data", (c) => { process.stderr.write(`[stdin ${Buffer.from(c).toString("hex")}]\n`); });
504
+ process.stdin.on("data", (c) => {
505
+ const b = Buffer.from(c);
506
+ const shape = [...b].map((x) => x === 0x0d ? "\\r" : x === 0x0a ? "\\n" : x === 0x1b ? "ESC" : x < 0x20 ? `^${String.fromCharCode(x + 64)}` : x === 0x7f ? "DEL" : "x").join("");
507
+ process.stderr.write(`[stdin ${b.length}B ${shape}]\n`);
508
+ });
505
509
  }
506
510
  function terminalId() {
507
511
  for (const k of ["WT_SESSION", "VSCODE_IPC_HOOK_CLI", "TERM_SESSION_ID", "ITERM_SESSION_ID", "TMUX_PANE", "KONSOLE_DBUS_SESSION", "GNOME_TERMINAL_SCREEN", "WINDOWID"]) {
@@ -575,7 +579,7 @@ async function loginFlow(purpose, emailArg) {
575
579
  log(" ✘ no email given - re-run when you have it.");
576
580
  return null;
577
581
  }
578
- const password = await ask(" password (Enter = emailed sign-in link): ", true);
582
+ const password = await ask(" password (Enter = emailed sign-in code): ", true);
579
583
  if (password) {
580
584
  const r = await api("/demo/login", { method: "POST", body: JSON.stringify({ email, password }) }, "");
581
585
  if (r.status >= 200 && r.status < 300 && r.body?.token) {
@@ -1554,7 +1558,8 @@ async function cmdQuickstartInner(opts = {}) {
1554
1558
  }
1555
1559
  else if (doorLink)
1556
1560
  rows.push(`${bold("your phone")} ${dim("the link above works on a phone too (no QR came back this time)")}`);
1557
- rows.push(dim("whichever answers first wins — the terminal follows the web app or your phone."));
1561
+ if (!DEMO || doorLink)
1562
+ rows.push(dim("whichever answers first wins — the terminal follows the web app or your phone."));
1558
1563
  block("③", "Your call", rows, "choice");
1559
1564
  let settledState = null;
1560
1565
  const settledP = running.then(() => { settledState = "approved"; }, (e) => { settledState = e instanceof DecidioRejectedError ? "rejected" : "other"; });
@@ -2186,7 +2191,9 @@ APPROVALS AND RECEIPTS
2186
2191
  If it starts with a dash, put it after -- or use --reason:
2187
2192
  ... approve <id> -- "-50% cut, per the board"
2188
2193
  ... approve <id> --reason "-50% cut, per the board"
2189
- npx @decidio/sdk receipt <id> [--json] download a sealed decision's Authority Receipt (.json)
2194
+ npx @decidio/sdk receipt <id> [--json] download a sealed decision's Authority Receipt to a .json FILE; --json prints
2195
+ a summary to stdout (file name, evidence, issuer, the identities you may see) -
2196
+ the credential itself is the file
2190
2197
  npx @decidio/sdk verify --issuer <did> <receipt.json> [more...] verify receipts OFFLINE, pinned to your
2191
2198
  workspace's issuer (--allow-unpinned: structural check only)
2192
2199
 
package/openapi.yaml CHANGED
@@ -5,7 +5,7 @@
5
5
  openapi: 3.1.0
6
6
  info:
7
7
  title: Decidio Agent Gate
8
- version: 0.6.2 # tracks the SDK release - checked by packages/conformance/manifests.mjs
8
+ version: 0.6.3 # tracks the SDK release - checked by packages/conformance/manifests.mjs
9
9
  description: >
10
10
  Authorize an AI-agent action (proceed | route | block), confirm the captured outcome, and
11
11
  receive the signed resume webhook when a routed action is decided. Every outcome seals a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decidio/sdk",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "One-line approval gate for AI-agent actions. Wrap a risky tool call with guard.protect(); Decidio's policy engine decides proceed | route | block, a human approves routed actions, and every outcome is sealed as a verifiable Authority Receipt.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -84,7 +84,7 @@
84
84
  "prepublishOnly": "npm run typecheck && npm run build && node ../publish-boundary/check.mjs --only @decidio/sdk"
85
85
  },
86
86
  "dependencies": {
87
- "@decidio/verify": "0.6.2"
87
+ "@decidio/verify": "0.6.3"
88
88
  },
89
89
  "author": "OmniTwin Technologies Inc.",
90
90
  "bugs": {