@decidio/sdk 0.2.1 → 0.3.0

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/openapi.yaml CHANGED
@@ -260,6 +260,13 @@ paths:
260
260
  content:
261
261
  application/json:
262
262
  schema: { $ref: "#/components/schemas/StatusResponse" }
263
+ "400":
264
+ description: >
265
+ `INVALID_DECISION_ID` - the id is not a usable decision id (empty, whitespace-padded,
266
+ control characters, a path, or over 128 characters). Deliberately NOT the 404 below: a
267
+ malformed id is not a decision that might exist somewhere else, and answering "unknown
268
+ decision" would send you looking for something that could never have been issued. The
269
+ check runs BEFORE any lookup, so this response reveals nothing about existence.
263
270
  "401": { description: missing/invalid agent token }
264
271
  "404": { description: unknown decision }
265
272
  /agent/confirm:
@@ -272,6 +279,14 @@ paths:
272
279
  evidence. The caller does not choose it and this endpoint does not always grant the top
273
280
  one. The credential sealed at decision time is immutable; evidence accrues on the record,
274
281
  never inside the sealed bytes.
282
+
283
+
284
+ A SUPPLIED-BUT-REFUSED executionReport CAPS THE TIER at `execution_unconfirmed`, whatever
285
+ else the report would have earned — and deliberately BELOW `agent_asserted`. A failed
286
+ attestation is weaker evidence than never claiming one; the opposite ordering would reward
287
+ sending a forged report over sending none. The server verifies the report and derives the
288
+ tier on the SAME path, so a refused attestation can no longer land on a receipt beside
289
+ `application_confirmed`.
275
290
  requestBody:
276
291
  required: true
277
292
  content:
@@ -287,6 +302,29 @@ paths:
287
302
  application/json:
288
303
  schema: { $ref: "#/components/schemas/ConfirmResponse" }
289
304
  "401": { description: missing/invalid agent token }
305
+ "404": { description: unknown decision, or one this agent is not bound to }
306
+ "409":
307
+ description: >
308
+ The gate refuses to attach execution evidence to this decision AT ALL. This is not a
309
+ report failure, and a client must not treat it as one — handle it separately from a
310
+ 5xx. `code` is either:
311
+
312
+ `TERMINALLY_DENIED` — a human or a policy DENIED this decision. If your action ran, it
313
+ ran against a refusal: do NOT re-run it, and investigate how it executed without an
314
+ approval. A denial is terminal and cannot be reconciled or retried.
315
+
316
+ `NOT_AUTHORIZED` — this is not an approved, sealed decision, so there is nothing for
317
+ evidence to attach to yet. If you are confirming early, wait for the approval. If your
318
+ action already ran, it ran WITHOUT authority.
319
+
320
+ Not retryable in either case: the same request will be refused the same way.
321
+ content:
322
+ application/json:
323
+ schema:
324
+ type: object
325
+ properties:
326
+ code: { type: string, enum: [TERMINALLY_DENIED, NOT_AUTHORIZED] }
327
+ message: { type: string }
290
328
  x-webhooks:
291
329
  resume:
292
330
  post:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decidio/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
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",
@@ -55,11 +55,6 @@
55
55
  "verifiable-credentials"
56
56
  ],
57
57
  "homepage": "https://decidioai.com/developers/",
58
- "repository": {
59
- "type": "git",
60
- "url": "git+https://github.com/OmniTwin/Decidio.git",
61
- "directory": "packages/decidio-guard"
62
- },
63
58
  "publishConfig": {
64
59
  "access": "public"
65
60
  },
@@ -87,7 +82,7 @@
87
82
  "prepublishOnly": "npm run typecheck && npm run build"
88
83
  },
89
84
  "dependencies": {
90
- "@decidio/verify": "0.2.1"
85
+ "@decidio/verify": "0.3.0"
91
86
  },
92
87
  "author": "OmniTwin Technologies Inc.",
93
88
  "bugs": {