@decidio/sdk 0.4.3 → 0.4.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.
- package/CHANGELOG.md +37 -0
- package/README.md +4 -3
- package/dist/cli.js +40 -19
- package/dist/resume.d.ts +1 -0
- package/openapi.yaml +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@ Release notes for the client SDK. The Python package `decidio` ships the same ch
|
|
|
4
4
|
version (the two are conformance-locked twins). Each entry names what changed, what a reader must do
|
|
5
5
|
on upgrade, and what proved it.
|
|
6
6
|
|
|
7
|
+
## 0.4.4 — the small findings of the 0.4.3 prodsec run: frames at 80 columns, a local install upgrades in place, a key-less .env survives the tour
|
|
8
|
+
|
|
9
|
+
An external prodsec reviewer ran 0.4.3 from a stranger's install (2026-09-04; grade B, "trust in the core mechanics
|
|
10
|
+
went up"). Its design questions (a mandatory `--issuer`, out-of-band issuer distribution, npm provenance) are founder
|
|
11
|
+
calls in the backlog; these are its small findings, each with a vector that was red first.
|
|
12
|
+
|
|
13
|
+
- **Frames never wider than the terminal.** The 0.4.2 frames had a width FLOOR of 84 columns, and the terminal driver
|
|
14
|
+
that gates the tours ran only at 300 columns - so on the most common width, 80, every border wrapped. The floor now
|
|
15
|
+
yields to the terminal, and both suites run the approval tour at 80 columns: no frame line wider than the window,
|
|
16
|
+
every frame line closes with its border.
|
|
17
|
+
- **The update gate knows a project-local install.** `npm install @decidio/sdk` then `npx @decidio/sdk …` (this
|
|
18
|
+
README's own path) runs the CLI from the project's node_modules; the gate offered `npm i -g` (global state nobody
|
|
19
|
+
asked for) and then re-ran the same old local file. Three shapes now, each upgraded the way it was installed:
|
|
20
|
+
project-local → `npm i @decidio/sdk@latest` in that project; global → `-g`; under npx → the `@latest` form,
|
|
21
|
+
printed. The re-run the gate spawns carries `DECIDIO_UPDATE_REEXEC=1` and never checks again, so a version that did
|
|
22
|
+
not move cannot loop the prompt. (Python: `pip install -U` already upgrades the interpreter that is running; it
|
|
23
|
+
gains the re-run marker.)
|
|
24
|
+
- **A key-less agent `.env` is left alone.** The tour used its own `.env.quickstart` only when `.env` held a signing
|
|
25
|
+
key; the SDK's `agentKey` is optional, so an agent configured without one had its agent fields overwritten and then
|
|
26
|
+
stripped by cleanup. ANY agent identity in `.env` (`DECIDIO_AGENT_ID`, `_DID`, `_KEY` or `DECIDIO_API_TOKEN`) now
|
|
27
|
+
sends the tour to its own file. Vector: such a file is byte-identical after the tour and its cleanup.
|
|
28
|
+
- **The ④ frame names what was sealed** without `--explain`: `decision payInvoice $86,000 · APPROVED · routed to
|
|
29
|
+
a human by policy (no auto-approve rule for this agent)` (REJECTED on the denial's record).
|
|
30
|
+
- A `.gitignore` the tour CREATES also ignores `node_modules/`; an existing file gets only the secret entries.
|
|
31
|
+
- `openapi.yaml` now states the release version (it read 0.1.11 beside a 0.4.3 package), and a seven-manifest
|
|
32
|
+
lockstep check (`packages/conformance/manifests.mjs`: both package.json, both package-lock.json, pyproject,
|
|
33
|
+
`__init__`, openapi) runs in CI and on the publish path - 0.4.3 shipped with both locks a version behind.
|
|
34
|
+
- Documented: the token recovery journal's vocabulary (`minted`, `retired how=persisted`, `retired how=revoked`,
|
|
35
|
+
`probe`) - `persisted` means the credential file holds the token and is its handle, not that it was revoked.
|
|
36
|
+
- **`logout` says what it does** (prodsec second pass on 0.4.3 - "A / A-", two Lows): it forgets the stored sign-in on
|
|
37
|
+
this computer; the session token itself stays valid until it expires - there is no server-side revocation yet, and no
|
|
38
|
+
wording implies one any more (`logout`, cleanup, the sign-in prompt, the usage page, both READMEs). Vectors: the
|
|
39
|
+
statement is asserted, and `logout` makes no API call.
|
|
40
|
+
- The shipped `.d.ts` state-machine comment names the terminal `discarded` state beside the chain that omitted it.
|
|
41
|
+
- Confirmed as intended, no change: the online `receipt` command prints the tokenized identities your access
|
|
42
|
+
covers ("Resolved for you"); the file keeps its tokens.
|
|
43
|
+
|
|
7
44
|
## 0.4.3 — the stale-install gate, frames you can read at a glance, and a phone door that lands
|
|
8
45
|
|
|
9
46
|
The founder's UAT round 2, second half (2026-09-04). Nobody is on 0.4.2 yet, so it was never tagged; this carries both.
|
package/README.md
CHANGED
|
@@ -648,9 +648,10 @@ that fits every other confirm error.
|
|
|
648
648
|
- `verify [--issuer <did>] <file>...` — verify receipts offline (the canonical verifier; the standalone `@decidio/verify` package is the same implementation, for auditors who want zero Decidio dependency — the sdk depends on the verifier released alongside it, at the same version). Unknown flags are refused, never ignored. Fully offline AND fully decoupled: it touches no network and reads no `.env` — a receipt verifies identically from an empty directory.
|
|
649
649
|
- `tokens list [--mine]` / `tokens revoke <jti>` — see and kill agent tokens (values are never re-shown; the jti is the revocation handle). Each row carries its status — `active`, `expired`, or `REVOKED <date>` — so the list confirms the revocations it performs; re-revoking is an honest no-op (exit 1). The list is workspace-wide (a shared workspace shows every member's agents); `--mine` narrows to this directory's agent
|
|
650
650
|
- `quickstart cleanup` — revoke the tour's token and delete its local credentials. What stays, honestly: sealed records (permanent by design) and the agent's registration row (inert without key or token; server-side deregistration is on the roadmap) Also ends the stored sign-in.
|
|
651
|
-
- **Update check.** Network commands ask the public npm registry once a day whether a newer version exists; if so, an interactive run asks `Upgrade now? [y/n]` first (`y` upgrades
|
|
651
|
+
- **Update check.** Network commands ask the public npm registry once a day whether a newer version exists; if so, an interactive run asks `Upgrade now? [y/n]` first (`y` upgrades the way you installed - `npm i @decidio/sdk@latest` in the project for a local install, `-g` for a global one, and under `npx` it prints the `@latest` form - then re-runs your command once; `n` exits), a headless run prints the notice and continues (`DECIDIO_REQUIRE_LATEST=1` makes it exit). `DECIDIO_NO_UPDATE_CHECK=1` skips it. Nothing is sent to Decidio; `verify` never checks.
|
|
652
|
+
- **The token recovery journal** (`.decidio-token-journal`, owner-only, gitignored; ids and timestamps, never a token value). 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.
|
|
652
653
|
- `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).
|
|
653
|
-
- `login [email]` / `logout` — sign in ONCE (the CLI emails you a link; you paste it) and
|
|
654
|
+
- `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).
|
|
654
655
|
- `dev [--target URL]` — local relay for the resume webhook (operator setups)
|
|
655
656
|
|
|
656
657
|
The CLI's stream contract: **stdout carries results only** (safe to pipe — `--json` output is
|
|
@@ -660,7 +661,7 @@ result and prints on stdout. Exit codes: 0 success · 1 failure or honest no-op
|
|
|
660
661
|
|
|
661
662
|
Commands that administer your workspace (`init`, `approvals`, `receipt`, `tokens`) use a **session**
|
|
662
663
|
sign-in: `login` stores it in your user profile (owner-only, bound to this terminal window, 30 days;
|
|
663
|
-
`logout` or `quickstart cleanup`
|
|
664
|
+
`logout` or `quickstart cleanup` forgets it here — the token itself stays valid until it expires), or `DECIDIO_SESSION_TOKEN` supplies it for headless shells. What lands on disk in `.env`: the agent's floor-limited
|
|
664
665
|
API token, its locally-generated private signing key, and a webhook secret (used only in
|
|
665
666
|
operator deployments) — `init` adds `.env` to `.gitignore` for you; move secrets to a secret
|
|
666
667
|
manager for production.
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { readFileSync, writeFileSync, existsSync, appendFileSync, chmodSync, rmSync, openSync, writeSync, fsyncSync, closeSync, renameSync, mkdirSync } from "node:fs";
|
|
3
3
|
import { randomBytes } from "node:crypto";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
|
-
import { join as joinPath } from "node:path";
|
|
5
|
+
import { join as joinPath, resolve as resolvePath, sep as pathSep } from "node:path";
|
|
6
6
|
import { createServer } from "node:http";
|
|
7
7
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
8
8
|
import { createInterface } from "node:readline";
|
|
@@ -378,12 +378,15 @@ function assertNotTracked(path) {
|
|
|
378
378
|
}
|
|
379
379
|
function ensureGitignore() {
|
|
380
380
|
const entries = [".env", ".env.quickstart", ".env.*.bak", ".env.*.tmp", ".decidio-pending/", ".decidio-token-journal"];
|
|
381
|
-
const
|
|
381
|
+
const creating = !existsSync(".gitignore");
|
|
382
|
+
if (creating)
|
|
383
|
+
entries.push("node_modules/");
|
|
384
|
+
const existing = creating ? "" : readFileSync(".gitignore", "utf8");
|
|
382
385
|
const missing = entries.filter((e) => !existing.split(/\r?\n/).some((l) => l.trim() === e || l.trim() === e.replace(/\/$/, "")));
|
|
383
386
|
if (!missing.length)
|
|
384
387
|
return;
|
|
385
388
|
appendFileSync(".gitignore", (existing && !existing.endsWith("\n") ? "\n" : "") + missing.join("\n") + "\n");
|
|
386
|
-
log(`✔ added ${missing.join(" + ")} to .gitignore (
|
|
389
|
+
log(`✔ ${creating ? "wrote" : "added"} ${missing.join(" + ")} to .gitignore (secret files here will not be committed)`);
|
|
387
390
|
}
|
|
388
391
|
function recordKindOf(credential) {
|
|
389
392
|
try {
|
|
@@ -396,7 +399,7 @@ function recordKindOf(credential) {
|
|
|
396
399
|
}
|
|
397
400
|
}
|
|
398
401
|
function sessionReminder() {
|
|
399
|
-
log(` ⚠ agent code launched from THIS terminal inherits your sign-in — run logout first (it
|
|
402
|
+
log(` ⚠ agent code launched from THIS terminal inherits your sign-in — run logout first (it forgets the sign-in here; the token itself stays valid until it expires); if you`);
|
|
400
403
|
log(` exported DECIDIO_SESSION_TOKEN, unset it ${dim("(bash/zsh: unset DECIDIO_SESSION_TOKEN · PowerShell: Remove-Item Env:DECIDIO_SESSION_TOKEN)")}`);
|
|
401
404
|
}
|
|
402
405
|
const TTY_OUT = !!process.stdout.isTTY && !process.env.NO_COLOR && process.env.TERM !== "dumb";
|
|
@@ -409,7 +412,7 @@ const visibleLength = (s) => s.replace(/\x1b\[[0-9;]*m|\x1b\]8;;[^\x1b]*\x1b\\/g
|
|
|
409
412
|
function frameWidth(rows) {
|
|
410
413
|
const cols = (process.stdout.columns ?? 0) > 20 ? process.stdout.columns : 120;
|
|
411
414
|
const widest = rows.reduce((m, r) => Math.max(m, visibleLength(r)), 0);
|
|
412
|
-
return Math.
|
|
415
|
+
return Math.min(cols - 1, Math.max(FRAME_WIDTH, widest + 4));
|
|
413
416
|
}
|
|
414
417
|
function block(n, title, rows, tone) {
|
|
415
418
|
const tint = tone === "choice" ? (process.env.TERM?.includes("256") || process.env.COLORTERM || process.env.WT_SESSION ? "38;5;208" : "33") : tone === "good" ? "32" : tone === "bad" ? "31" : null;
|
|
@@ -538,7 +541,7 @@ function endSession() {
|
|
|
538
541
|
}
|
|
539
542
|
}
|
|
540
543
|
async function loginFlow(purpose, emailArg) {
|
|
541
|
-
log(purpose === "Signing in" ? `Sign in once — 30 days, or until this terminal closes, logout, or cleanup.` : `${purpose} needs your Decidio workspace sign-in — once: 30 days, or until this terminal closes, logout, or cleanup.`);
|
|
544
|
+
log(purpose === "Signing in" ? `Sign in once — kept on this computer for 30 days, or until this terminal closes, logout, or cleanup.` : `${purpose} needs your Decidio workspace sign-in — once: kept on this computer for 30 days, or until this terminal closes, logout, or cleanup.`);
|
|
542
545
|
const email = emailArg ?? await ask(" email: ");
|
|
543
546
|
if (!email) {
|
|
544
547
|
log(" ✘ no email given - re-run when you have it.");
|
|
@@ -617,9 +620,12 @@ async function cmdLogin(emailArg) {
|
|
|
617
620
|
const token = await loginFlow("Signing in", emailArg);
|
|
618
621
|
return token ? 0 : 1;
|
|
619
622
|
}
|
|
623
|
+
const TRUTH_SESSION = "The session token itself stays valid until it expires (up to 30 days) — there is no server-side revocation yet";
|
|
620
624
|
function cmdLogout() {
|
|
621
|
-
if (endSession())
|
|
622
|
-
log("✔ signed out — the stored sign-in is removed.");
|
|
625
|
+
if (endSession()) {
|
|
626
|
+
log("✔ signed out — the stored sign-in is removed from this computer.");
|
|
627
|
+
log(` ${TRUTH_SESSION}; if you exported DECIDIO_SESSION_TOKEN or pasted the link anywhere else, those copies still work.`);
|
|
628
|
+
}
|
|
623
629
|
else
|
|
624
630
|
log("• no stored sign-in on this machine for this Decidio.");
|
|
625
631
|
if (process.env.DECIDIO_SESSION_TOKEN)
|
|
@@ -1148,7 +1154,8 @@ async function cmdQuickstart(opts = {}) {
|
|
|
1148
1154
|
const session = await acquireSession("The quickstart");
|
|
1149
1155
|
if (!session)
|
|
1150
1156
|
return 1;
|
|
1151
|
-
const
|
|
1157
|
+
const prior = readEnvFile();
|
|
1158
|
+
const envFile = ["DECIDIO_AGENT_KEY", "DECIDIO_AGENT_ID", "DECIDIO_AGENT_DID", "DECIDIO_API_TOKEN"].some((k) => (prior[k] ?? "").trim()) ? ".env.quickstart" : ENV_PATH;
|
|
1152
1159
|
if (!assertNotTracked(envFile))
|
|
1153
1160
|
return 1;
|
|
1154
1161
|
ensureGitignore();
|
|
@@ -1470,6 +1477,7 @@ async function cmdQuickstart(opts = {}) {
|
|
|
1470
1477
|
}
|
|
1471
1478
|
block("④", "The record", [
|
|
1472
1479
|
`✔ VALID — ${fname} ${dim("(signature + content binding, offline, PINNED to your workspace issuer)")}`,
|
|
1480
|
+
`${bold("decision")} payInvoice $86,000 · REJECTED · routed to a human by policy (no auto-approve rule for this agent)`,
|
|
1473
1481
|
`${bold("record")} record kind: ${recordKindOf(rec.body.credential) ?? "?"} ${dim("— the denial is sealed too")}`,
|
|
1474
1482
|
`${bold("issuer")} ${issuer} ${dim("· your trust anchor: verify --issuer <did> <receipt.json>")}`,
|
|
1475
1483
|
], "bad");
|
|
@@ -1554,6 +1562,7 @@ async function cmdQuickstart(opts = {}) {
|
|
|
1554
1562
|
const tier = detail.body?.record?.confirmation?.status;
|
|
1555
1563
|
block("④", "The receipt", [
|
|
1556
1564
|
`✔ VALID — ${fname} ${dim("(signature + content binding, offline, PINNED to your workspace issuer)")}`,
|
|
1565
|
+
`${bold("decision")} payInvoice $86,000 · APPROVED · routed to a human by policy (no auto-approve rule for this agent)`,
|
|
1557
1566
|
`${bold("record")} record kind: ${recordKindOf(rec.body.credential) ?? "?"}${tier ? ` · evidence: ${tier}` : ""} ${dim("— the receipt seals the DECISION; execution evidence lives on the record")}`,
|
|
1558
1567
|
`${bold("issuer")} ${issuer} ${dim("· your trust anchor: verify --issuer <did> <receipt.json>")}`,
|
|
1559
1568
|
], "good");
|
|
@@ -1753,7 +1762,7 @@ async function quickstartCleanup(session, envFile) {
|
|
|
1753
1762
|
log(` ${process.platform === "win32" ? "Remove-Item -Recurse .decidio-pending" : "rm -r .decidio-pending"}`);
|
|
1754
1763
|
}
|
|
1755
1764
|
if (endSession())
|
|
1756
|
-
log(` ✔ signed out — the stored sign-in is
|
|
1765
|
+
log(` ✔ signed out — the stored sign-in is removed from this computer (the token itself stays valid until it expires; npx @decidio/sdk login to sign in again).`);
|
|
1757
1766
|
else if (process.env.DECIDIO_SESSION_TOKEN)
|
|
1758
1767
|
log(` • DECIDIO_SESSION_TOKEN is still exported in this shell — unset it when you are done.`);
|
|
1759
1768
|
return 0;
|
|
@@ -1886,8 +1895,9 @@ THE TOUR
|
|
|
1886
1895
|
|
|
1887
1896
|
SIGN IN (once)
|
|
1888
1897
|
npx @decidio/sdk login [email] sign in ONCE: the CLI emails you a link, you paste it; the sign-in
|
|
1889
|
-
|
|
1890
|
-
npx @decidio/sdk logout
|
|
1898
|
+
is kept on this computer 30 days, or until this terminal closes, logout, or cleanup
|
|
1899
|
+
npx @decidio/sdk logout forget the stored sign-in on this computer (the token itself stays valid
|
|
1900
|
+
until it expires — there is no server-side revocation yet)
|
|
1891
1901
|
|
|
1892
1902
|
YOUR AGENT AND ITS TOKENS
|
|
1893
1903
|
npx @decidio/sdk init [agentId] sign in, register the agent, mint its API token, write .env
|
|
@@ -1923,7 +1933,8 @@ NOTES
|
|
|
1923
1933
|
DECIDIO_API_URL says otherwise; the target host is announced on stderr each run. "verify" is
|
|
1924
1934
|
fully offline — it touches no network and reads no .env.
|
|
1925
1935
|
Update check: network commands ask the public npm registry once a day whether a newer version exists. If so,
|
|
1926
|
-
an interactive run asks "Upgrade now? [y/n]" first (y upgrades
|
|
1936
|
+
an interactive run asks "Upgrade now? [y/n]" first (y upgrades the way you installed - global, or in the
|
|
1937
|
+
project for a local install; under npx it prints the @latest form - and re-runs your command; n exits); a headless
|
|
1927
1938
|
run prints the notice and continues (DECIDIO_REQUIRE_LATEST=1 makes it exit). DECIDIO_NO_UPDATE_CHECK=1 skips
|
|
1928
1939
|
the check. Nothing is sent to Decidio; verify never checks.
|
|
1929
1940
|
Help: --help (or -h) after any command prints this page - one page for every command.
|
|
@@ -1976,13 +1987,23 @@ async function latestPublished() {
|
|
|
1976
1987
|
}
|
|
1977
1988
|
}
|
|
1978
1989
|
async function updateGate(cmd, argv) {
|
|
1979
|
-
if (!cmd || !GATED_CMDS.has(cmd) || SHELL_ENV.DECIDIO_NO_UPDATE_CHECK || VERSION === "unknown" || VERSION.includes("-"))
|
|
1990
|
+
if (!cmd || !GATED_CMDS.has(cmd) || SHELL_ENV.DECIDIO_NO_UPDATE_CHECK || SHELL_ENV.DECIDIO_UPDATE_REEXEC || VERSION === "unknown" || VERSION.includes("-"))
|
|
1980
1991
|
return null;
|
|
1981
1992
|
const latest = await latestPublished();
|
|
1982
1993
|
if (!latest || !semverNewer(latest, VERSION))
|
|
1983
1994
|
return null;
|
|
1984
|
-
const
|
|
1985
|
-
const
|
|
1995
|
+
const entry = process.argv[1] ?? "";
|
|
1996
|
+
const underNpx = /[\\/]_npx[\\/]/.test(entry);
|
|
1997
|
+
const localRoot = (() => {
|
|
1998
|
+
const m = /^(.*?)[\\/]node_modules[\\/]@decidio[\\/]sdk[\\/]/.exec(entry);
|
|
1999
|
+
if (!m)
|
|
2000
|
+
return null;
|
|
2001
|
+
const norm = (s) => (process.platform === "win32" ? s.toLowerCase() : s);
|
|
2002
|
+
const root = resolvePath(m[1]);
|
|
2003
|
+
const cwd = norm(process.cwd());
|
|
2004
|
+
return cwd === norm(root) || cwd.startsWith(norm(root) + pathSep) ? root : null;
|
|
2005
|
+
})();
|
|
2006
|
+
const upgradeCmd = underNpx ? `npx @decidio/sdk@latest ${argv.slice(2).join(" ")}` : localRoot ? "npm i @decidio/sdk@latest" : "npm i -g @decidio/sdk@latest";
|
|
1986
2007
|
const notice = `${latest} is available (you have ${VERSION}).`;
|
|
1987
2008
|
if (!(process.stdin.isTTY && process.stdout.isTTY)) {
|
|
1988
2009
|
err(`⚠ ${notice} Upgrade: ${upgradeCmd}`);
|
|
@@ -2005,14 +2026,14 @@ async function updateGate(cmd, argv) {
|
|
|
2005
2026
|
log(` would run: ${upgradeCmd}`);
|
|
2006
2027
|
return null;
|
|
2007
2028
|
}
|
|
2008
|
-
log(` upgrading: ${upgradeCmd}`);
|
|
2009
|
-
const up = spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", ["i", "-g", "@decidio/sdk@latest"], { stdio: "inherit", shell: process.platform === "win32", env: SHELL_ENV });
|
|
2029
|
+
log(` upgrading: ${upgradeCmd}${localRoot ? ` (in ${localRoot})` : ""}`);
|
|
2030
|
+
const up = spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", localRoot ? ["i", "@decidio/sdk@latest"] : ["i", "-g", "@decidio/sdk@latest"], { stdio: "inherit", shell: process.platform === "win32", env: SHELL_ENV, ...(localRoot ? { cwd: localRoot } : {}) });
|
|
2010
2031
|
if (up.status !== 0) {
|
|
2011
2032
|
err(`✘ the upgrade did not complete (exit ${up.status ?? "?"}) — run it by hand: ${upgradeCmd}`);
|
|
2012
2033
|
return 1;
|
|
2013
2034
|
}
|
|
2014
2035
|
log(` ✔ upgraded — re-running: decidio ${argv.slice(2).join(" ")}`);
|
|
2015
|
-
const rerun = spawnSync(process.execPath, [process.argv[1], ...argv.slice(2)], { stdio: "inherit", env: SHELL_ENV });
|
|
2036
|
+
const rerun = spawnSync(process.execPath, [process.argv[1], ...argv.slice(2)], { stdio: "inherit", env: { ...SHELL_ENV, DECIDIO_UPDATE_REEXEC: "1" } });
|
|
2016
2037
|
return rerun.status ?? 1;
|
|
2017
2038
|
}
|
|
2018
2039
|
async function main(argv) {
|
package/dist/resume.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface PendingAction {
|
|
|
37
37
|
/** The durable execution state machine (v2).
|
|
38
38
|
*
|
|
39
39
|
* parked → claimed_preinvoke → invoking → (executed_unreported | indeterminate) → reported
|
|
40
|
+
* plus the terminal `discarded` (a human or policy said NO: written from parked/claimed_preinvoke, never invoked).
|
|
40
41
|
*
|
|
41
42
|
* THE ONE RULE: nothing transitions BACK to parked once `invoking` has been written. Deletion
|
|
42
43
|
* is cleanup, never the single-use guarantee — that was the 0.1.x model, and a store whose
|
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.
|
|
8
|
+
version: 0.4.4 # 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.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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.4.
|
|
87
|
+
"@decidio/verify": "0.4.4"
|
|
88
88
|
},
|
|
89
89
|
"author": "OmniTwin Technologies Inc.",
|
|
90
90
|
"bugs": {
|