@decidio/sdk 0.8.0 → 0.8.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.
- package/dist/cli.d.ts +3 -3
- package/dist/cli.js +17 -6
- package/openapi.yaml +1 -1
- package/package.json +2 -2
package/dist/cli.d.ts
CHANGED
|
@@ -52,11 +52,11 @@ export declare const AGENTS_MD_START = "<!-- decidio:start -->";
|
|
|
52
52
|
export declare const AGENTS_MD_END = "<!-- decidio:end -->";
|
|
53
53
|
/** Decidio's public GitHub Action (github.com/OmniTwin/decidio-actions): one action, step request or verify. It fetches the job's own
|
|
54
54
|
* OIDC token (audience "decidio") - no repository secret - and fails the job in plain words when Decidio refuses. Pinned to the
|
|
55
|
-
* v1.0.
|
|
55
|
+
* v1.0.1 COMMIT, never a tag (invariant-guard 2026-10-20): the verify step enforces the approval in a production job with
|
|
56
56
|
* id-token: write, so a moved tag must not change it. Bump both pins together, with the release. */
|
|
57
|
-
export declare const DECIDIO_ACTION = "OmniTwin/decidio-actions@
|
|
57
|
+
export declare const DECIDIO_ACTION = "OmniTwin/decidio-actions@c4506075600edef9576db821c4de756c300c15fe # v1.0.1";
|
|
58
58
|
export declare const CHECKOUT_ACTION = "actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0";
|
|
59
|
-
export declare function githubRequestWorkflow(api: string, environment: string, branch?: string): string;
|
|
59
|
+
export declare function githubRequestWorkflow(api: string, environment: string, branch?: string, deployWorkflow?: string): string;
|
|
60
60
|
/** The verify step and the checkout of the approved commit: the first steps of any deploy job Decidio starts. */
|
|
61
61
|
export declare function githubVerifySteps(api: string): string;
|
|
62
62
|
export declare function githubDeployWorkflow(api: string, environment: string): string;
|
package/dist/cli.js
CHANGED
|
@@ -3667,6 +3667,10 @@ async function cmdGithubRequest(environment, justification) {
|
|
|
3667
3667
|
log(" An approval request for this commit was already open - that one stands.");
|
|
3668
3668
|
return 0;
|
|
3669
3669
|
}
|
|
3670
|
+
if (r.status === 200 && b.decision === "connected") {
|
|
3671
|
+
log(`✔ connected: Decidio heard this repository ask for ${environment}. This check asked for nothing; the next push asks a teammate.`);
|
|
3672
|
+
return 0;
|
|
3673
|
+
}
|
|
3670
3674
|
if (r.status === 200 && b.decision === "duplicate") {
|
|
3671
3675
|
err(`✘ ${String(b.error ?? "a person refused this commit before")}`);
|
|
3672
3676
|
err(` To ask again, say what changed: npx @decidio/sdk github request --environment ${environment} --justification "<what changed>"`);
|
|
@@ -3714,15 +3718,20 @@ function plainRepoPath(root, rel) {
|
|
|
3714
3718
|
}
|
|
3715
3719
|
return true;
|
|
3716
3720
|
}
|
|
3717
|
-
export const DECIDIO_ACTION = "OmniTwin/decidio-actions@
|
|
3721
|
+
export const DECIDIO_ACTION = "OmniTwin/decidio-actions@c4506075600edef9576db821c4de756c300c15fe # v1.0.1";
|
|
3718
3722
|
export const CHECKOUT_ACTION = "actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0";
|
|
3719
|
-
export function githubRequestWorkflow(api, environment, branch = "main") {
|
|
3723
|
+
export function githubRequestWorkflow(api, environment, branch = "main", deployWorkflow = ".github/workflows/deploy.yml") {
|
|
3720
3724
|
return `# Written by npx @decidio/sdk github init. Asks a teammate to approve each deploy; Decidio starts the deploy workflow once
|
|
3721
|
-
# approved. No repository secret: the job's own OIDC token is the credential.
|
|
3725
|
+
# approved. No repository secret: the job's own OIDC token is the credential. A push that changes only the two Decidio workflow
|
|
3726
|
+
# files asks for nothing; a run started by hand (or by Decidio's Check the connection) is a connection check that asks for nothing.
|
|
3722
3727
|
name: Ask Decidio to deploy
|
|
3723
3728
|
on:
|
|
3724
3729
|
push:
|
|
3725
3730
|
branches: [${branch}]
|
|
3731
|
+
paths-ignore:
|
|
3732
|
+
- .github/workflows/decidio-request.yml
|
|
3733
|
+
- ${deployWorkflow}
|
|
3734
|
+
workflow_dispatch:
|
|
3726
3735
|
permissions:
|
|
3727
3736
|
id-token: write
|
|
3728
3737
|
contents: read
|
|
@@ -3843,7 +3852,7 @@ async function cmdGithubInit(opts) {
|
|
|
3843
3852
|
};
|
|
3844
3853
|
const said = (rel, w, what) => w === "written" ? log(`✔ wrote ${rel} - ${what}`) : w === "kept" ? log(`· ${rel} already exists - kept as it is`) : err(`✘ ${rel}: a symbolic link is on its path - nothing was written through it`);
|
|
3845
3854
|
const reqRel = ".github/workflows/decidio-request.yml";
|
|
3846
|
-
said(reqRel, write(reqRel, githubRequestWorkflow(apiUrl, environment, branch)), `asks for approval on every push to ${branch} (edit the trigger to suit)`);
|
|
3855
|
+
said(reqRel, write(reqRel, githubRequestWorkflow(apiUrl, environment, branch, workflow)), `asks for approval on every push to ${branch} (edit the trigger to suit)`);
|
|
3847
3856
|
const dep = write(workflow, githubDeployWorkflow(apiUrl, environment));
|
|
3848
3857
|
said(workflow, dep, "the deploy Decidio starts once approved (replace ./deploy.sh with your deploy)");
|
|
3849
3858
|
if (dep === "kept") {
|
|
@@ -3874,7 +3883,9 @@ async function cmdGithubInit(opts) {
|
|
|
3874
3883
|
log(` 1. In Decidio: Connect → GitHub approvals → bind this repository with ${workflow} and the environment ${environment}.`);
|
|
3875
3884
|
log(` 2. In the repository's settings: restrict who may run ${workflow} to the Decidio app (workflow execution protections),`);
|
|
3876
3885
|
log(` so a deploy runs only when Decidio starts it.`);
|
|
3877
|
-
log(` 3. Commit the workflows and push
|
|
3886
|
+
log(` 3. Commit the workflows and push - that push asks for nothing (it changes only these files).`);
|
|
3887
|
+
log(` 4. Check the connection: Check the connection in Decidio, or gh workflow run decidio-request.yml - it asks for nothing.`);
|
|
3888
|
+
log(` Your next push to ${branch} asks a teammate.`);
|
|
3878
3889
|
return 0;
|
|
3879
3890
|
}
|
|
3880
3891
|
const USAGE = `✦ Decidio — the SDK command line
|
|
@@ -4004,7 +4015,7 @@ GITHUB DEPLOY APPROVALS (the Decidio GitHub App)
|
|
|
4004
4015
|
in a repository's checkout: writes the workflow that asks for approval
|
|
4005
4016
|
(.github/workflows/decidio-request.yml) and the deploy workflow when there is none
|
|
4006
4017
|
(an existing one is never changed: init prints the steps to add), both using
|
|
4007
|
-
Decidio's GitHub Action pinned to its v1.0.
|
|
4018
|
+
Decidio's GitHub Action pinned to its v1.0.1 commit; adds a link to Decidio for agents to AGENTS.md (--agents-md creates it) -
|
|
4008
4019
|
never a decision's text
|
|
4009
4020
|
npx @decidio/sdk github request --environment <name> [--justification "<what changed>"]
|
|
4010
4021
|
inside a GitHub Actions job (permissions id-token: write): ask a teammate to approve
|
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.
|
|
8
|
+
version: 0.8.1 # 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.8.
|
|
3
|
+
"version": "0.8.1",
|
|
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.8.
|
|
87
|
+
"@decidio/verify": "0.8.1"
|
|
88
88
|
},
|
|
89
89
|
"author": "OmniTwin Technologies Inc.",
|
|
90
90
|
"bugs": {
|