openvibers/openvibe.contracts Commits

0.381.0: Agent work contracts and portable effort receipts (#396)

OP OpenVibers committed 4 days ago · 9b0fd612d4 · 106 files, +6943 −4446

* Define agent work contracts and portable effort receipts

* Constrain assessment target basis to the admission vocabulary

* Document intervening version reservations for parallel contract PRs

* Expose concrete task default effort for auto requests

* Merge current Contracts main and reserve version 0.381.0

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed (#395)

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed

One shipped change as the API shows it: plain words without the PR number
or stage tag, kind (new, better, fixed or internal), one to three areas
from Blog's fixed list, and the commit and pull request for the row's
fold. Valid and invalid fixtures cover the kind, the area list and the
plain-words rule; the generated bundle, types and OpenAPI name 0.380.0.

* Name the 0.378.0 and 0.379.0 entries the open PRs bring

The history test counts every minor to the current release; #393 and
#394 are the pending 0.378.0 and 0.379.0 contracts and their entries
reconcile at merge.

* Merge origin/main into rc-contracts-changelog-entry-v2

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* Merge blog changelog contract for 0.381.0

* 0.379.0: Add the public exchange.market contract (#397)

* 0.381.0: Add public exchange market contract

* Keep market manifest aligned with existing CORS policy

* Merge main and use the next untagged Contracts version

* Cover empty market snapshots with stale metadata

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed (#395)

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed

One shipped change as the API shows it: plain words without the PR number
or stage tag, kind (new, better, fixed or internal), one to three areas
from Blog's fixed list, and the commit and pull request for the row's
fold. Valid and invalid fixtures cover the kind, the area list and the
plain-words rule; the generated bundle, types and OpenAPI name 0.380.0.

* Name the 0.378.0 and 0.379.0 entries the open PRs bring

The history test counts every minor to the current release; #393 and
#394 are the pending 0.378.0 and 0.379.0 contracts and their entries
reconcile at merge.

* Merge origin/main into rc-contracts-changelog-entry-v2

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* Merge blog changelog contract for 0.381.0

* Merge exchange market contract for 0.382.0

* 0.379.0: measured provider circuit health and request error classes (#398)

* 0.379.0: measured provider circuit health and request error classes

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed (#395)

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed

One shipped change as the API shows it: plain words without the PR number
or stage tag, kind (new, better, fixed or internal), one to three areas
from Blog's fixed list, and the commit and pull request for the row's
fold. Valid and invalid fixtures cover the kind, the area list and the
plain-words rule; the generated bundle, types and OpenAPI name 0.380.0.

* Name the 0.378.0 and 0.379.0 entries the open PRs bring

The history test counts every minor to the current release; #393 and
#394 are the pending 0.378.0 and 0.379.0 contracts and their entries
reconcile at merge.

* Merge origin/main into rc-contracts-changelog-entry-v2

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* Merge blog changelog contract for 0.381.0

* 0.379.0: Add the public exchange.market contract (#397)

* 0.381.0: Add public exchange market contract

* Keep market manifest aligned with existing CORS policy

* Merge main and use the next untagged Contracts version

* Cover empty market snapshots with stale metadata

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed (#395)

* 0.380.0: blog.changelog-entry@2 for the tagged updates feed

One shipped change as the API shows it: plain words without the PR number
or stage tag, kind (new, better, fixed or internal), one to three areas
from Blog's fixed list, and the commit and pull request for the row's
fold. Valid and invalid fixtures cover the kind, the area list and the
plain-words rule; the generated bundle, types and OpenAPI name 0.380.0.

* Name the 0.378.0 and 0.379.0 entries the open PRs bring

The history test counts every minor to the current release; #393 and
#394 are the pending 0.378.0 and 0.379.0 contracts and their entries
reconcile at merge.

* Merge origin/main into rc-contracts-changelog-entry-v2

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* 0.379.0: Exchange routing, request presets and generation contracts (#394)

* 0.379.0: Add Exchange routing, preset and generation contracts

* Reconcile Contracts 0.378 with Exchange schemas

* 0.379.0: Wiki rich articles — blocks, image suggestions and the writer (#393)

* 0.378.0: Wiki rich article contracts (blocks, image suggestions, the writer)

* Merge origin/main into w1/contracts-wiki-blocks and bump 0.378.0

* Merge origin/main and bump to 0.379.0 (0.378.0 is the Link rename)

* Merge wiki rich article contracts for 0.379.0

* Merge routing contracts and release version 0.380.0

* Merge blog changelog contract for 0.381.0

* Merge exchange market contract for 0.382.0

* Merge provider health contracts for 0.383.0

* Merge agent work and effort contracts for 0.384.0

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 77b6ed0a..d0620f5e 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -1,5 +1,9 @@
# Changelog
++## 0.384.0 — 2026-11-09
++
++- Agent work fabric: trigger, decision, immutable ticket mandate and budget, six report states, attention, and ordered stage vocabulary. Portable AI effort, concrete task-default effort, and optional effort/ladder receipt metadata.
++
## 0.383.0 — 2026-11-09
- `ai.provider@1`: measured per provider+model circuit health (status, failure class, plain reason and since when, retry/backoff, notify time); `ai.run-read-result@1`: `requests[].error_class`.
ddiff --git a/README.md b/README.md
iindex 1e489ea3..47c0dac3 100644
---- a/README.md
++++ b/README.md
@@@ -2,7 +2,7 @@
> Machine-readable contracts for the whole OpenVibe network.
--**Status:** alpha (first released in Wave 1; the release is package.json's `version`, tagged). At v0.383.0: 1193 schemas in `contracts/catalog.json`, 65 service manifests, 511 capability manifests, 13 namespace manifests and the staff capability map. Service repositories run `openvibe-contracts-check` and the pin-drift check in CI, and deployed services verify service and app tokens with `serviceAuth` in production. Consumers pin release tags (each repository's `STATUS.json` names its pin). `node scripts/docs-currency.js <root>` checks every checkout's README and `STATUS.json` against its code: the pins and versions they name, a library's consumer list, the deployed flag against the manifest, README links, and the paths and migrations they name. `node scripts/estate.js` generates `docs/ESTATE.md` and `manifests/repositories/` from the estate checkouts, and `--check` fails on drift (plan T1 step 3).
++**Status:** alpha (first released in Wave 1; the release is package.json's `version`, tagged). At v0.384.0: 1200 schemas in `contracts/catalog.json`, 65 service manifests, 511 capability manifests, 13 namespace manifests and the staff capability map. Service repositories run `openvibe-contracts-check` and the pin-drift check in CI, and deployed services verify service and app tokens with `serviceAuth` in production. Consumers pin release tags (each repository's `STATUS.json` names its pin). `node scripts/docs-currency.js <root>` checks every checkout's README and `STATUS.json` against its code: the pins and versions they name, a library's consumer list, the deployed flag against the manifest, README links, and the paths and migrations they name. `node scripts/estate.js` generates `docs/ESTATE.md` and `manifests/repositories/` from the estate checkouts, and `--check` fails on drift (plan T1 step 3).
**Plan:** OpenVibe Development Roadmap, Wave 1 (implementation plan rev 3, §3.1 and §18.11).
**License:** AGPL-3.0 (same as every OpenVibe service).
ddiff --git a/contracts/agent/attention.v1.json b/contracts/agent/attention.v1.json
nnew file mode 100644
iindex 00000000..11be9351
---- /dev/null
++++ b/contracts/agent/attention.v1.json
@@@ -0,0 +1,44 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/attention.v1.json",
++ "title": "AgentAttention",
++ "description": "One structured question awaiting a person. Authorized independent work may continue.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "ticket_id",
++ "question",
++ "state",
++ "created_at"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "ticket_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "question": {
++ "type": "string",
++ "minLength": 1
++ },
++ "state": {
++ "enum": [
++ "open",
++ "answered",
++ "dismissed"
++ ]
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "answer": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++}
ddiff --git a/contracts/agent/decision.v1.json b/contracts/agent/decision.v1.json
nnew file mode 100644
iindex 00000000..8e85c462
---- /dev/null
++++ b/contracts/agent/decision.v1.json
@@@ -0,0 +1,131 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/decision.v1.json",
++ "title": "AgentDecision",
++ "description": "Gate and assessment decision. Inferred work defaults to observe: record ignore with would_accept, never launch. Only an explicit human stop withdraws a mandate.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "trigger_ids",
++ "policy_version",
++ "decision",
++ "strength",
++ "direction",
++ "rule_assessments"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "trigger_ids": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "minItems": 1,
++ "uniqueItems": true
++ },
++ "policy_version": {
++ "type": "string",
++ "minLength": 1
++ },
++ "decision": {
++ "enum": [
++ "accept",
++ "stop",
++ "ignore",
++ "unavailable"
++ ]
++ },
++ "strength": {
++ "enum": [
++ "explicit",
++ "inferred"
++ ]
++ },
++ "direction": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "implementation_requested",
++ "target_basis",
++ "requires_design_decision",
++ "evidence"
++ ],
++ "properties": {
++ "implementation_requested": {
++ "type": "boolean"
++ },
++ "target_basis": {
++ "enum": [
++ "specified",
++ "existing-standard",
++ "undetermined"
++ ]
++ },
++ "requires_design_decision": {
++ "type": "boolean"
++ },
++ "evidence": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "trigger_id",
++ "quote"
++ ],
++ "properties": {
++ "trigger_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "quote": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++ }
++ }
++ }
++ },
++ "rule_assessments": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "rule_id",
++ "matched",
++ "reason"
++ ],
++ "properties": {
++ "matched": {
++ "type": "boolean"
++ },
++ "reason": {
++ "type": "string",
++ "minLength": 1
++ },
++ "rule_id": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++ }
++ },
++ "reason": {
++ "type": "string",
++ "minLength": 1
++ },
++ "would_accept": {
++ "type": "boolean"
++ },
++ "ignored_from_card": {
++ "type": "boolean"
++ }
++ }
++}
ddiff --git a/contracts/agent/report.v1.json b/contracts/agent/report.v1.json
nnew file mode 100644
iindex 00000000..4483a104
---- /dev/null
++++ b/contracts/agent/report.v1.json
@@@ -0,0 +1,75 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/report.v1.json",
++ "title": "AgentReport",
++ "description": "Executor report. A PR alone is not ready; a draft is blocked. human_action carries exactly one question unchanged to the person.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "ticket_id",
++ "assignment_id",
++ "state",
++ "summary",
++ "pr",
++ "tests_run",
++ "risks"
++ ],
++ "properties": {
++ "ticket_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "assignment_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "state": {
++ "enum": [
++ "progress",
++ "waiting",
++ "ready",
++ "blocked",
++ "failed",
++ "dropped"
++ ]
++ },
++ "summary": {
++ "type": "string",
++ "minLength": 1
++ },
++ "pr": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "uri"
++ },
++ "tests_run": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ }
++ },
++ "risks": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ }
++ },
++ "human_action": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "question"
++ ],
++ "properties": {
++ "question": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++ }
++ }
++}
ddiff --git a/contracts/agent/stage.v1.json b/contracts/agent/stage.v1.json
nnew file mode 100644
iindex 00000000..1f9e87d1
---- /dev/null
++++ b/contracts/agent/stage.v1.json
@@@ -0,0 +1,17 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/stage.v1.json",
++ "title": "AgentStage",
++ "description": "Closed open-ticket stages. First matching row wins: delivery failure, attention, ready report, blocked/failed report without a later human input, absent/pending assignment, waiting report/ended assignment, working. Labels and conditions: docs/agent-work.md.",
++ "type": "string",
++ "enum": [
++ "person/delivery",
++ "person/answer",
++ "person/review",
++ "person/blocked",
++ "person/failed",
++ "working/queued",
++ "idle",
++ "working"
++ ]
++}
ddiff --git a/contracts/agent/ticket.v1.json b/contracts/agent/ticket.v1.json
nnew file mode 100644
iindex 00000000..ea0dfc1d
---- /dev/null
++++ b/contracts/agent/ticket.v1.json
@@@ -0,0 +1,134 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/ticket.v1.json",
++ "title": "AgentTicket",
++ "description": "Authorized work with an immutable mandate. Policy changes notify, never cancel. Revalidate before resuming an ended ticket; bots and CI cannot resume it. Stage applies to open tickets.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "trigger_id",
++ "mandate",
++ "state",
++ "stage",
++ "threads"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "trigger_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "mandate": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "policy_version",
++ "scope",
++ "strength",
++ "matched_rules",
++ "actor",
++ "source_scope",
++ "budget"
++ ],
++ "properties": {
++ "policy_version": {
++ "type": "string",
++ "minLength": 1
++ },
++ "scope": {
++ "type": "string",
++ "minLength": 1
++ },
++ "strength": {
++ "enum": [
++ "explicit",
++ "inferred"
++ ]
++ },
++ "matched_rules": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "uniqueItems": true
++ },
++ "actor": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "source",
++ "id",
++ "kind"
++ ],
++ "properties": {
++ "source": {
++ "type": "string",
++ "minLength": 1
++ },
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "kind": {
++ "enum": [
++ "person",
++ "bot",
++ "system"
++ ]
++ }
++ }
++ },
++ "source_scope": {
++ "type": "string",
++ "minLength": 1
++ },
++ "budget": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "usd",
++ "tokens",
++ "wall_minutes"
++ ],
++ "properties": {
++ "usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "tokens": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "wall_minutes": {
++ "type": "number",
++ "minimum": 0
++ }
++ }
++ }
++ }
++ },
++ "state": {
++ "enum": [
++ "open",
++ "ended"
++ ]
++ },
++ "stage": {
++ "$ref": "stage.v1.json"
++ },
++ "threads": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "minItems": 1,
++ "uniqueItems": true
++ }
++ }
++}
ddiff --git a/contracts/agent/trigger.v1.json b/contracts/agent/trigger.v1.json
nnew file mode 100644
iindex 00000000..5dc57b6c
---- /dev/null
++++ b/contracts/agent/trigger.v1.json
@@@ -0,0 +1,85 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/trigger.v1.json",
++ "title": "AgentTrigger",
++ "description": "Immutable source event. Source-local actor identity grants no cross-source authority. Accepting an id twice creates one ticket.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "source",
++ "actor",
++ "source_scope",
++ "threads",
++ "occurred_at",
++ "text"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "source": {
++ "type": "string",
++ "minLength": 1
++ },
++ "actor": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "source",
++ "id",
++ "kind"
++ ],
++ "properties": {
++ "source": {
++ "type": "string",
++ "minLength": 1
++ },
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "kind": {
++ "enum": [
++ "person",
++ "bot",
++ "system"
++ ]
++ }
++ }
++ },
++ "source_scope": {
++ "type": "string",
++ "minLength": 1
++ },
++ "threads": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "minItems": 1,
++ "uniqueItems": true
++ },
++ "occurred_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "text": {
++ "type": "string",
++ "minLength": 1
++ },
++ "read_pointer": {
++ "type": "string",
++ "format": "uri"
++ },
++ "addresses_agent": {
++ "enum": [
++ "mention",
++ "direct",
++ "none"
++ ]
++ }
++ }
++}
ddiff --git a/contracts/ai/effort.v1.json b/contracts/ai/effort.v1.json
nnew file mode 100644
iindex 00000000..71027b4c
---- /dev/null
++++ b/contracts/ai/effort.v1.json
@@@ -0,0 +1,14 @@
++{
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/effort.v1.json",
++ "title": "AiEffort",
++ "description": "Portable reasoning effort. auto resolves to the task default; unsupported model controls are ignored and receipt effort_applied is null.",
++ "type": "string",
++ "enum": [
++ "auto",
++ "low",
++ "medium",
++ "high",
++ "max"
++ ]
++}
ddiff --git a/contracts/ai/run-request.v1.json b/contracts/ai/run-request.v1.json
iindex 44b40518..39050659 100644
---- a/contracts/ai/run-request.v1.json
++++ b/contracts/ai/run-request.v1.json
@@@ -19,7 +19,7 @@
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)+$",
"maxLength": 200,
-- "description": "Workflow key, <namespace>.<name> (live.chat_reply, news.summarize_story, network.site_copy…)."
++ "description": "Workflow key, <namespace>.<name> (live.chat_reply, news.summarize_story, network.site_copy\u2026)."
},
"version": {
"type": "integer",
@@@ -59,7 +59,11 @@
"description": "Keep raw prompts and responses in the request log, only when AI runs with raw debug logging on."
},
"latency": {
-- "enum": ["interactive", "background", "batch"],
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
"description": "The class the caller asks for: how long the caller may wait, and what the router may do with the wait. interactive (the default) answers as soon as the provider can; background may take minutes, and the run is priced on the cheapest tier that can wait (a Flex tier, a provider's off-peak hours, the host's own idle model); batch may take hours, and the run is queued and answered through a provider's own batch API. The class is the workflow's own (the route's constraints.latency_class): a caller may ask for a SLOWER class and never for a faster one. A faster ask is not refused: the run happens in the workflow's own class and the answer says so (run.latency_clamped)."
},
"deadline_hours": {
@@@ -83,6 +87,31 @@
}
},
"description": "Run with the person's own provider key (ai.credential@1) that this service stored, instead of a shared route: only that provider is called (no fallback), the result is never cached or taken from the cache, the shared paid budget is not spent, and the credential's own daily budget applies (429 quota.exceeded). Chat operations only (text, JSON, vision)."
++ },
++ "effort": {
++ "$ref": "effort.v1.json"
++ },
++ "ladder_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "rung": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "agent_role": {
++ "enum": [
++ "router",
++ "gate",
++ "assessor",
++ "worker",
++ "subagent",
++ "reviewer"
++ ]
++ },
++ "kind": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_.-]{0,99}$"
}
},
"anyOf": [
ddiff --git a/contracts/ai/run.v1.json b/contracts/ai/run.v1.json
iindex 59cd8a76..2b74b688 100644
---- a/contracts/ai/run.v1.json
++++ b/contracts/ai/run.v1.json
@@@ -4,96 +4,392 @@
"title": "AiRun",
"description": "A workflow run on OpenVibe.AI (ADR-015; server/runs.js decode): the `run` member of every run response (POST /api/v1/runs and the direct operations, GET /api/v1/runs/:id, cancel, retry) and each item of GET /api/v1/runs { runs }. Output is attributable to workflow + version + template version + route version + provider/model + run id, never to a person. A draft stays a draft: products store it with ai/ai_assisted authorship and publish nothing until a person reviews it. input keeps no inline media (replaced by data_url_sha256 and data_url_bytes) and no passthrough prompt ({ not_retained }); output is null until the run succeeded or was served from cache and then matches the workflow version's output_schema. requester is the token principal (service, app or mod). A run interrupted by a restart or shutdown ends failed with error.code run.interrupted. latency_class is the class the run really ran in, service_tier the tier it was priced on, and latency_clamped set when the caller asked for a faster class than the workflow allows. explain says why the run answered as it did: the task it read, the candidates it ranked and every attempt.",
"type": "object",
-- "required": ["id", "status", "workflow", "template", "route", "requester", "on_behalf_of", "attribution", "source_service", "target", "input", "output", "error", "synthetic", "provenance", "usage", "citations_count", "retry_of", "idempotency_key", "trace_id", "created_at", "started_at", "finished_at"],
++ "required": [
++ "id",
++ "status",
++ "workflow",
++ "template",
++ "route",
++ "requester",
++ "on_behalf_of",
++ "attribution",
++ "source_service",
++ "target",
++ "input",
++ "output",
++ "error",
++ "synthetic",
++ "provenance",
++ "usage",
++ "citations_count",
++ "retry_of",
++ "idempotency_key",
++ "trace_id",
++ "created_at",
++ "started_at",
++ "finished_at"
++ ],
"additionalProperties": false,
"properties": {
-- "id": { "type": "string", "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$" },
++ "id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
"status": {
-- "enum": ["queued", "running", "succeeded", "failed", "cancelled", "cached"],
++ "enum": [
++ "queued",
++ "running",
++ "succeeded",
++ "failed",
++ "cancelled",
++ "cached"
++ ],
"description": "Terminal: succeeded, failed, cancelled, cached (a scoped cache hit, no provider call; provenance.cached_from names the run it reused)."
},
"workflow": {
-- "type": "object", "required": ["key", "version"], "additionalProperties": false,
-- "properties": { "key": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } }
++ "type": "object",
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": "integer",
++ "minimum": 1
++ }
++ }
},
"template": {
-- "type": ["object", "null"], "required": ["key", "version"], "additionalProperties": false,
-- "properties": { "key": { "type": "string" }, "version": { "type": ["integer", "null"] } },
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
"description": "The prompt template of the workflow's llm step; null for workflows without one."
},
"route": {
-- "type": ["object", "null"], "required": ["key", "version"], "additionalProperties": false,
-- "properties": { "key": { "type": "string" }, "version": { "type": ["integer", "null"] } },
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
"description": "Provider route; version null while the route is unresolved or disabled."
},
-- "requester": { "$ref": "../identity/subject-ref.v1.json" },
-- "on_behalf_of": { "anyOf": [{ "$ref": "../identity/subject-ref.v1.json" }, { "type": "null" }] },
-- "attribution": { "anyOf": [{ "$ref": "../common/entity-ref.v1.json" }, { "type": "null" }] },
-- "source_service": { "type": ["string", "null"], "description": "The requester's service id when the requester is a service." },
-- "target": { "anyOf": [{ "$ref": "../common/entity-ref.v1.json" }, { "type": "null" }] },
-- "input": { "type": "object", "description": "The retained input (see the description)." },
-- "output": { "type": ["object", "null"], "description": "Workflow output, or null." },
++ "requester": {
++ "$ref": "../identity/subject-ref.v1.json"
++ },
++ "on_behalf_of": {
++ "anyOf": [
++ {
++ "$ref": "../identity/subject-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "attribution": {
++ "anyOf": [
++ {
++ "$ref": "../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "source_service": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "The requester's service id when the requester is a service."
++ },
++ "target": {
++ "anyOf": [
++ {
++ "$ref": "../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "input": {
++ "type": "object",
++ "description": "The retained input (see the description)."
++ },
++ "output": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "description": "Workflow output, or null."
++ },
"error": {
-- "type": ["object", "null"], "required": ["code", "detail"], "additionalProperties": false,
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "code",
++ "detail"
++ ],
++ "additionalProperties": false,
"properties": {
-- "code": { "type": "string", "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$", "description": "run.cancelled, run.interrupted, run.internal, output.invalid, output.empty, provider.unavailable, route.unavailable, source.unavailable, media.unresolvable…" },
-- "detail": { "type": ["string", "null"] }
++ "code": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$",
++ "description": "run.cancelled, run.interrupted, run.internal, output.invalid, output.empty, provider.unavailable, route.unavailable, source.unavailable, media.unresolvable\u2026"
++ },
++ "detail": {
++ "type": [
++ "string",
++ "null"
++ ]
++ }
}
},
-- "synthetic": { "type": "boolean", "description": "Produced by the stub provider; never served to production callers and never cached." },
++ "synthetic": {
++ "type": "boolean",
++ "description": "Produced by the stub provider; never served to production callers and never cached."
++ },
"provenance": {
-- "type": "object", "additionalProperties": false,
-- "required": ["origin", "workflow", "workflow_version", "template_version", "route", "route_version", "provider", "model", "fallback_used", "run_id", "cached_from", "synthetic"],
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "origin",
++ "workflow",
++ "workflow_version",
++ "template_version",
++ "route",
++ "route_version",
++ "provider",
++ "model",
++ "fallback_used",
++ "run_id",
++ "cached_from",
++ "synthetic"
++ ],
"properties": {
-- "origin": { "const": "ai" },
-- "workflow": { "type": "string" },
-- "workflow_version": { "type": "integer", "minimum": 1 },
-- "template_version": { "type": ["integer", "null"] },
-- "route": { "type": ["string", "null"] },
-- "route_version": { "type": ["integer", "null"] },
-- "provider": { "type": ["string", "null"] },
-- "model": { "type": ["string", "null"] },
-- "fallback_used": { "type": "boolean", "description": "The primary provider was degraded and the run fell back (ADR-015: fallbacks are recorded)." },
-- "run_id": { "type": "string", "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$" },
-- "cached_from": { "type": ["string", "null"], "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$" },
-- "synthetic": { "type": "boolean" }
++ "origin": {
++ "const": "ai"
++ },
++ "workflow": {
++ "type": "string"
++ },
++ "workflow_version": {
++ "type": "integer",
++ "minimum": 1
++ },
++ "template_version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "route": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "route_version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "provider": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "fallback_used": {
++ "type": "boolean",
++ "description": "The primary provider was degraded and the run fell back (ADR-015: fallbacks are recorded)."
++ },
++ "run_id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "cached_from": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "synthetic": {
++ "type": "boolean"
++ }
}
},
"usage": {
-- "type": "object", "required": ["tokens_in", "tokens_out", "cost_usd", "attempts"], "additionalProperties": false,
++ "type": "object",
++ "required": [
++ "tokens_in",
++ "tokens_out",
++ "cost_usd",
++ "attempts"
++ ],
++ "additionalProperties": false,
"properties": {
-- "tokens_in": { "type": "integer", "minimum": 0 },
-- "tokens_out": { "type": "integer", "minimum": 0 },
-- "cost_usd": { "type": "number", "minimum": 0 },
-- "attempts": { "type": "integer", "minimum": 0, "description": "Provider calls made (skipped routes not counted)." }
++ "tokens_in": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "tokens_out": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "attempts": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "Provider calls made (skipped routes not counted)."
++ }
}
},
-- "citations_count": { "type": "integer", "minimum": 0, "description": "Citations stored for the run (GET /api/v1/runs/:id/citations): the sources the workflow was given, and any the requester attached later." },
++ "citations_count": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "Citations stored for the run (GET /api/v1/runs/:id/citations): the sources the workflow was given, and any the requester attached later."
++ },
"latency_class": {
-- "enum": ["interactive", "background", "batch"],
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
"description": "The class the run really ran in: how long the caller was willing to wait. It is the workflow's own class (the route's constraints.latency_class) or a slower one the caller asked for (options.latency); a caller can never make a run faster than its workflow allows."
},
"service_tier": {
-- "type": ["string", "null"],
-- "enum": ["standard", "flex", "batch", "offpeak", "local", null],
++ "type": [
++ "string",
++ "null"
++ ],
++ "enum": [
++ "standard",
++ "flex",
++ "batch",
++ "offpeak",
++ "local",
++ null
++ ],
"description": "The tier the run was priced on: the tier the provider really served (standard, flex, batch) or the one the router chose (offpeak inside a provider's off-peak hours, local on the host's own model). Null while the run has not answered. A provider that does not say which tier it served is priced at the list price: a saving nobody confirmed is not a saving."
},
"latency_clamped": {
-- "type": ["object", "null"],
-- "required": ["asked", "used"],
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "asked",
++ "used"
++ ],
"additionalProperties": false,
"properties": {
-- "asked": { "enum": ["interactive", "background", "batch"], "description": "The class the caller asked for." },
-- "used": { "enum": ["interactive", "background", "batch"], "description": "The class the run really ran in." }
++ "asked": {
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
++ "description": "The class the caller asked for."
++ },
++ "used": {
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
++ "description": "The class the run really ran in."
++ }
},
"description": "Set when the caller asked for a faster class than the workflow allows: the class asked for and the class the run really ran in. The run is never refused for it."
},
-- "retry_of": { "type": ["string", "null"], "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$" },
-- "idempotency_key": { "type": ["string", "null"] },
-- "trace_id": { "type": ["string", "null"] },
-- "created_at": { "type": "string", "format": "date-time" },
-- "started_at": { "type": ["string", "null"], "format": "date-time" },
-- "finished_at": { "type": ["string", "null"], "format": "date-time" },
++ "retry_of": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "idempotency_key": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "trace_id": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "started_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "finished_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
"explain": {
"type": [
"object",
@@@ -401,6 +697,62 @@
}
],
"description": "What actually answered: the model and its source, and the machine when one did; null for a run outside a task."
++ },
++ "effort_requested": {
++ "$ref": "effort.v1.json"
++ },
++ "effort_applied": {
++ "anyOf": [
++ {
++ "enum": [
++ "low",
++ "medium",
++ "high",
++ "max"
++ ]
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "effort_rung": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "ladder_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "ladder": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "model",
++ "effort",
++ "cost_usd",
++ "outcome"
++ ],
++ "properties": {
++ "model": {
++ "type": "string",
++ "minLength": 1
++ },
++ "effort": {
++ "$ref": "effort.v1.json"
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "outcome": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++ }
}
}
}
ddiff --git a/contracts/ai/task-defaults.v1.json b/contracts/ai/task-defaults.v1.json
iindex a7dab712..b63f79d6 100644
---- a/contracts/ai/task-defaults.v1.json
++++ b/contracts/ai/task-defaults.v1.json
@@@ -57,6 +57,15 @@
],
"minimum": 0,
"maximum": 1000
++ },
++ "effort": {
++ "enum": [
++ "low",
++ "medium",
++ "high",
++ "max"
++ ],
++ "description": "Concrete effort used when a request selects auto. Omitted uses the workflow default, then medium."
}
},
"required": [
ddiff --git a/contracts/catalog.json b/contracts/catalog.json
iindex 5e6c3161..18d6371e 100644
---- a/contracts/catalog.json
++++ b/contracts/catalog.json
@@@ -1605,26 +1605,6 @@
"compatibility": "backward",
"status": "active"
},
-- {
-- "id": "ai.run-request",
-- "version": "1.0.0",
-- "owner": "ai",
-- "schema": "ai/run-request.v1.json",
-- "visibility": "first-party",
-- "compatibility": "backward",
-- "status": "active",
-- "adr": "ADR-015"
-- },
-- {
-- "id": "ai.run",
-- "version": "1.1.0",
-- "owner": "ai",
-- "schema": "ai/run.v1.json",
-- "visibility": "first-party",
-- "compatibility": "backward",
-- "status": "active",
-- "adr": "ADR-015"
-- },
{
"id": "ai.run-error",
"version": "1.0.0",
@@@ -10938,16 +10918,6 @@
"status": "active",
"adr": "ADR-001"
},
-- {
-- "id": "ai.task-defaults",
-- "version": "1.0.0",
-- "owner": "ai",
-- "schema": "ai/task-defaults.v1.json",
-- "visibility": "public",
-- "compatibility": "backward",
-- "status": "active",
-- "adr": "ADR-001"
-- },
{
"id": "git.change",
"version": "1.0.0",
@@@ -11004,6 +10974,99 @@
"visibility": "public",
"compatibility": "backward",
"status": "active"
++ },
++ {
++ "id": "ai.run-request",
++ "version": "1.1.0",
++ "owner": "ai",
++ "schema": "ai/run-request.v1.json",
++ "visibility": "first-party",
++ "compatibility": "backward",
++ "status": "active",
++ "adr": "ADR-015"
++ },
++ {
++ "id": "ai.run",
++ "version": "1.2.0",
++ "owner": "ai",
++ "schema": "ai/run.v1.json",
++ "visibility": "first-party",
++ "compatibility": "backward",
++ "status": "active",
++ "adr": "ADR-015"
++ },
++ {
++ "id": "ai.task-defaults",
++ "version": "1.1.0",
++ "owner": "ai",
++ "schema": "ai/task-defaults.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active",
++ "adr": "ADR-001"
++ },
++ {
++ "id": "agent.trigger",
++ "version": "1.0.0",
++ "owner": "actor",
++ "schema": "agent/trigger.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
++ },
++ {
++ "id": "agent.decision",
++ "version": "1.0.0",
++ "owner": "actor",
++ "schema": "agent/decision.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
++ },
++ {
++ "id": "agent.ticket",
++ "version": "1.0.0",
++ "owner": "actor",
++ "schema": "agent/ticket.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
++ },
++ {
++ "id": "agent.report",
++ "version": "1.0.0",
++ "owner": "actor",
++ "schema": "agent/report.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
++ },
++ {
++ "id": "agent.attention",
++ "version": "1.0.0",
++ "owner": "actor",
++ "schema": "agent/attention.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
++ },
++ {
++ "id": "agent.stage",
++ "version": "1.0.0",
++ "owner": "actor",
++ "schema": "agent/stage.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
++ },
++ {
++ "id": "ai.effort",
++ "version": "1.0.0",
++ "owner": "ai",
++ "schema": "ai/effort.v1.json",
++ "visibility": "public",
++ "compatibility": "backward",
++ "status": "active"
}
]
}
ddiff --git a/docs/agent-work.md b/docs/agent-work.md
nnew file mode 100644
iindex 00000000..1e708080
---- /dev/null
++++ b/docs/agent-work.md
@@@ -0,0 +1,56 @@
++# Agent work and effort
++
++Sources produce immutable `agent.trigger@1` events with source-local actor identities,
++receiving scopes, thread ids and original text. Correlation adds context; subscriptions
++route follow-ups without granting authority. A deterministic gate precedes assessment.
++`agent.decision@1` records accept, stop, ignore or unavailable, explicit/inferred strength,
++quoted direction evidence and per-rule assessments. Proactive inferred work defaults to
++observe: record ignore with `would_accept: true`; only auto mode may launch it.
++
++An accepted trigger creates one `agent.ticket@1`. Its immutable mandate records policy
++version, scope, strength, matched rules, actor, source scope and budget in USD, tokens
++and wall minutes. Zero is a real zero budget. Policy changes notify live work instead
++of cancelling it. Before resuming ended work, revalidate the mandate. Only human
++messages resume ended tickets; CI and bots cannot. Executors never widen a mandate.
++
++`agent.report@1` has exactly progress, waiting, ready, blocked, failed and dropped.
++Opening a PR alone is not readiness; draft PRs are blocked. Reports retain tests and
++risks and may ask exactly one `human_action.question`, forwarded unchanged.
++`agent.attention@1` stores that question and its resolution. Independent authorized
++work can continue while it is outstanding.
++
++## Open ticket stage
++
++`agent.stage@1` is a closed enum. Evaluate this table from top to bottom and stop at
++its first matching row. Do not infer attention from report prose. Ended tickets retain
++the last stage for history; the table applies only while open.
++
++| Value | Condition | Label |
++| --- | --- | --- |
++| person/delivery | An input delivery failed and has not cleared | Input undelivered |
++| person/answer | An open attention exists | Awaiting answer |
++| person/review | Latest report is ready | Awaiting review |
++| person/blocked | Latest report is blocked, with no subsequent human input | Blocked |
++| person/failed | Latest report is failed, with no subsequent human input | Failed |
++| working/queued | No assignment, or assignment pending | Queued |
++| idle | Latest report waiting, or assignment ended | Waiting for a trigger |
++| working | Everything else | Working |
++
++A successful delivery, new assignment or ticket end clears delivery failure. Human
++input releases blocked/failed work to the next matching stage. Table semantics follow
++[dsh-superagent execution](https://github.com/deepseek-ai/dsh-superagent/blob/8c32a9d/docs/003-execution.md).
++
++## Portable effort and receipts
++
++`ai.effort@1`: auto, low, medium, high, max. Auto selects the concrete effort in ai.task-defaults@1, then the workflow default, then medium. An explicit agent_role selects that role default. A provider
++without a supported control ignores the request and records `effort_applied: null`.
++`ai.run-request@1` accepts effort and optional ladder_id/rung. `ai.run@1` adds optional
++`effort_requested`, `effort_applied`, zero-based `effort_rung`, `ladder_id`, and `ladder`
++entries `{model, effort, cost_usd, outcome}`. Existing receipts remain valid. Applied
++is the portable level actually used, never auto; a clamped control records the clamped
++level. Ladder costs account for attempts, including failures, without exposing another
++person's receipts. These contracts specify data, not automatic permission to escalate.
++
++Actor will produce/consume the agent fabric and consume effort receipts. AI consumes
++effort requests and produces receipts; it does not authorize tickets. The service
++manifests describe that intended boundary without claiming live event publication.
ddiff --git a/fixtures/agent.attention/invalid/unknown.json b/fixtures/agent.attention/invalid/unknown.json
nnew file mode 100644
iindex 00000000..842ee837
---- /dev/null
++++ b/fixtures/agent.attention/invalid/unknown.json
@@@ -0,0 +1,8 @@
++{
++ "id": "att_1",
++ "ticket_id": "tkt_1",
++ "question": "Which target?",
++ "state": "open",
++ "created_at": "2026-11-09T12:00:00Z",
++ "unexpected": true
++}
ddiff --git a/fixtures/agent.attention/valid/example.json b/fixtures/agent.attention/valid/example.json
nnew file mode 100644
iindex 00000000..6ebaa0fc
---- /dev/null
++++ b/fixtures/agent.attention/valid/example.json
@@@ -0,0 +1,7 @@
++{
++ "id": "att_1",
++ "ticket_id": "tkt_1",
++ "question": "Which target?",
++ "state": "open",
++ "created_at": "2026-11-09T12:00:00Z"
++}
ddiff --git a/fixtures/agent.decision/invalid/target-basis.json b/fixtures/agent.decision/invalid/target-basis.json
nnew file mode 100644
iindex 00000000..22d41f78
---- /dev/null
++++ b/fixtures/agent.decision/invalid/target-basis.json
@@@ -0,0 +1,21 @@
++{
++ "id": "dec_1",
++ "trigger_ids": [
++ "trg_1"
++ ],
++ "policy_version": "1",
++ "decision": "accept",
++ "strength": "explicit",
++ "direction": {
++ "implementation_requested": true,
++ "target_basis": "guessed",
++ "requires_design_decision": false,
++ "evidence": [
++ {
++ "trigger_id": "trg_1",
++ "quote": "Fix the bug"
++ }
++ ]
++ },
++ "rule_assessments": []
++}
ddiff --git a/fixtures/agent.decision/invalid/unknown.json b/fixtures/agent.decision/invalid/unknown.json
nnew file mode 100644
iindex 00000000..fe4a6a01
---- /dev/null
++++ b/fixtures/agent.decision/invalid/unknown.json
@@@ -0,0 +1,22 @@
++{
++ "id": "dec_1",
++ "trigger_ids": [
++ "trg_1"
++ ],
++ "policy_version": "1",
++ "decision": "accept",
++ "strength": "explicit",
++ "direction": {
++ "implementation_requested": true,
++ "target_basis": "specified",
++ "requires_design_decision": false,
++ "evidence": [
++ {
++ "trigger_id": "trg_1",
++ "quote": "Fix the bug"
++ }
++ ]
++ },
++ "rule_assessments": [],
++ "unexpected": true
++}
ddiff --git a/fixtures/agent.decision/valid/example.json b/fixtures/agent.decision/valid/example.json
nnew file mode 100644
iindex 00000000..ed280f37
---- /dev/null
++++ b/fixtures/agent.decision/valid/example.json
@@@ -0,0 +1,21 @@
++{
++ "id": "dec_1",
++ "trigger_ids": [
++ "trg_1"
++ ],
++ "policy_version": "1",
++ "decision": "accept",
++ "strength": "explicit",
++ "direction": {
++ "implementation_requested": true,
++ "target_basis": "specified",
++ "requires_design_decision": false,
++ "evidence": [
++ {
++ "trigger_id": "trg_1",
++ "quote": "Fix the bug"
++ }
++ ]
++ },
++ "rule_assessments": []
++}
ddiff --git a/fixtures/agent.report/invalid/human_action.json b/fixtures/agent.report/invalid/human_action.json
nnew file mode 100644
iindex 00000000..4dc0b72f
---- /dev/null
++++ b/fixtures/agent.report/invalid/human_action.json
@@@ -0,0 +1,13 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "blocked",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": [],
++ "human_action": {
++ "question": "one",
++ "second_question": "two"
++ }
++}
ddiff --git a/fixtures/agent.report/invalid/state.json b/fixtures/agent.report/invalid/state.json
nnew file mode 100644
iindex 00000000..4f913515
---- /dev/null
++++ b/fixtures/agent.report/invalid/state.json
@@@ -0,0 +1,12 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "done",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": [],
++ "human_action": {
++ "question": "Which target?"
++ }
++}
ddiff --git a/fixtures/agent.report/invalid/unknown.json b/fixtures/agent.report/invalid/unknown.json
nnew file mode 100644
iindex 00000000..5900d47f
---- /dev/null
++++ b/fixtures/agent.report/invalid/unknown.json
@@@ -0,0 +1,13 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "blocked",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": [],
++ "human_action": {
++ "question": "Which target?"
++ },
++ "unexpected": true
++}
ddiff --git a/fixtures/agent.report/valid/dropped.json b/fixtures/agent.report/valid/dropped.json
nnew file mode 100644
iindex 00000000..5ce0952e
---- /dev/null
++++ b/fixtures/agent.report/valid/dropped.json
@@@ -0,0 +1,9 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "dropped",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": []
++}
ddiff --git a/fixtures/agent.report/valid/example.json b/fixtures/agent.report/valid/example.json
nnew file mode 100644
iindex 00000000..2cb09a42
---- /dev/null
++++ b/fixtures/agent.report/valid/example.json
@@@ -0,0 +1,12 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "blocked",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": [],
++ "human_action": {
++ "question": "Which target?"
++ }
++}
ddiff --git a/fixtures/agent.report/valid/failed.json b/fixtures/agent.report/valid/failed.json
nnew file mode 100644
iindex 00000000..767ab58c
---- /dev/null
++++ b/fixtures/agent.report/valid/failed.json
@@@ -0,0 +1,9 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "failed",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": []
++}
ddiff --git a/fixtures/agent.report/valid/progress.json b/fixtures/agent.report/valid/progress.json
nnew file mode 100644
iindex 00000000..30176fce
---- /dev/null
++++ b/fixtures/agent.report/valid/progress.json
@@@ -0,0 +1,9 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "progress",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": []
++}
ddiff --git a/fixtures/agent.report/valid/ready.json b/fixtures/agent.report/valid/ready.json
nnew file mode 100644
iindex 00000000..de84a775
---- /dev/null
++++ b/fixtures/agent.report/valid/ready.json
@@@ -0,0 +1,9 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "ready",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": []
++}
ddiff --git a/fixtures/agent.report/valid/waiting.json b/fixtures/agent.report/valid/waiting.json
nnew file mode 100644
iindex 00000000..85336556
---- /dev/null
++++ b/fixtures/agent.report/valid/waiting.json
@@@ -0,0 +1,9 @@
++{
++ "ticket_id": "tkt_1",
++ "assignment_id": "asn_1",
++ "state": "waiting",
++ "summary": "Need a target",
++ "pr": null,
++ "tests_run": [],
++ "risks": []
++}
ddiff --git a/fixtures/agent.stage/invalid/unknown.json b/fixtures/agent.stage/invalid/unknown.json
nnew file mode 100644
iindex 00000000..367077a7
---- /dev/null
++++ b/fixtures/agent.stage/invalid/unknown.json
@@@ -0,0 +1 @@
++"unknown"
ddiff --git a/fixtures/agent.stage/valid/example.json b/fixtures/agent.stage/valid/example.json
nnew file mode 100644
iindex 00000000..e173e9e9
---- /dev/null
++++ b/fixtures/agent.stage/valid/example.json
@@@ -0,0 +1 @@
++"working"
ddiff --git a/fixtures/agent.stage/valid/idle.json b/fixtures/agent.stage/valid/idle.json
nnew file mode 100644
iindex 00000000..b4a7aaa2
---- /dev/null
++++ b/fixtures/agent.stage/valid/idle.json
@@@ -0,0 +1 @@
++"idle"
ddiff --git a/fixtures/agent.stage/valid/person-answer.json b/fixtures/agent.stage/valid/person-answer.json
nnew file mode 100644
iindex 00000000..5eb7bfe2
---- /dev/null
++++ b/fixtures/agent.stage/valid/person-answer.json
@@@ -0,0 +1 @@
++"person/answer"
ddiff --git a/fixtures/agent.stage/valid/person-blocked.json b/fixtures/agent.stage/valid/person-blocked.json
nnew file mode 100644
iindex 00000000..62eceef2
---- /dev/null
++++ b/fixtures/agent.stage/valid/person-blocked.json
@@@ -0,0 +1 @@
++"person/blocked"
ddiff --git a/fixtures/agent.stage/valid/person-delivery.json b/fixtures/agent.stage/valid/person-delivery.json
nnew file mode 100644
iindex 00000000..b17b7cba
---- /dev/null
++++ b/fixtures/agent.stage/valid/person-delivery.json
@@@ -0,0 +1 @@
++"person/delivery"
ddiff --git a/fixtures/agent.stage/valid/person-failed.json b/fixtures/agent.stage/valid/person-failed.json
nnew file mode 100644
iindex 00000000..430e3a26
---- /dev/null
++++ b/fixtures/agent.stage/valid/person-failed.json
@@@ -0,0 +1 @@
++"person/failed"
ddiff --git a/fixtures/agent.stage/valid/person-review.json b/fixtures/agent.stage/valid/person-review.json
nnew file mode 100644
iindex 00000000..3c7f1ae0
---- /dev/null
++++ b/fixtures/agent.stage/valid/person-review.json
@@@ -0,0 +1 @@
++"person/review"
ddiff --git a/fixtures/agent.stage/valid/working-queued.json b/fixtures/agent.stage/valid/working-queued.json
nnew file mode 100644
iindex 00000000..dd93e6eb
---- /dev/null
++++ b/fixtures/agent.stage/valid/working-queued.json
@@@ -0,0 +1 @@
++"working/queued"
ddiff --git a/fixtures/agent.stage/valid/working.json b/fixtures/agent.stage/valid/working.json
nnew file mode 100644
iindex 00000000..e173e9e9
---- /dev/null
++++ b/fixtures/agent.stage/valid/working.json
@@@ -0,0 +1 @@
++"working"
ddiff --git a/fixtures/agent.ticket/invalid/budget.json b/fixtures/agent.ticket/invalid/budget.json
nnew file mode 100644
iindex 00000000..5575d53c
---- /dev/null
++++ b/fixtures/agent.ticket/invalid/budget.json
@@@ -0,0 +1,26 @@
++{
++ "id": "tkt_1",
++ "trigger_id": "trg_1",
++ "mandate": {
++ "policy_version": "1",
++ "scope": "Fix issue 1",
++ "strength": "explicit",
++ "matched_rules": [],
++ "actor": {
++ "source": "github",
++ "id": "owner",
++ "kind": "person"
++ },
++ "source_scope": "issues",
++ "budget": {
++ "usd": -1,
++ "tokens": 100000,
++ "wall_minutes": 30
++ }
++ },
++ "state": "open",
++ "stage": "working",
++ "threads": [
++ "issue:1"
++ ]
++}
ddiff --git a/fixtures/agent.ticket/invalid/unknown.json b/fixtures/agent.ticket/invalid/unknown.json
nnew file mode 100644
iindex 00000000..adce85bb
---- /dev/null
++++ b/fixtures/agent.ticket/invalid/unknown.json
@@@ -0,0 +1,27 @@
++{
++ "id": "tkt_1",
++ "trigger_id": "trg_1",
++ "mandate": {
++ "policy_version": "1",
++ "scope": "Fix issue 1",
++ "strength": "explicit",
++ "matched_rules": [],
++ "actor": {
++ "source": "github",
++ "id": "owner",
++ "kind": "person"
++ },
++ "source_scope": "issues",
++ "budget": {
++ "usd": 2,
++ "tokens": 100000,
++ "wall_minutes": 30
++ }
++ },
++ "state": "open",
++ "stage": "working",
++ "threads": [
++ "issue:1"
++ ],
++ "unexpected": true
++}
ddiff --git a/fixtures/agent.ticket/valid/example.json b/fixtures/agent.ticket/valid/example.json
nnew file mode 100644
iindex 00000000..c496f7dd
---- /dev/null
++++ b/fixtures/agent.ticket/valid/example.json
@@@ -0,0 +1,26 @@
++{
++ "id": "tkt_1",
++ "trigger_id": "trg_1",
++ "mandate": {
++ "policy_version": "1",
++ "scope": "Fix issue 1",
++ "strength": "explicit",
++ "matched_rules": [],
++ "actor": {
++ "source": "github",
++ "id": "owner",
++ "kind": "person"
++ },
++ "source_scope": "issues",
++ "budget": {
++ "usd": 2,
++ "tokens": 100000,
++ "wall_minutes": 30
++ }
++ },
++ "state": "open",
++ "stage": "working",
++ "threads": [
++ "issue:1"
++ ]
++}
ddiff --git a/fixtures/agent.trigger/invalid/unknown.json b/fixtures/agent.trigger/invalid/unknown.json
nnew file mode 100644
iindex 00000000..ee14d6cd
---- /dev/null
++++ b/fixtures/agent.trigger/invalid/unknown.json
@@@ -0,0 +1,16 @@
++{
++ "id": "trg_1",
++ "source": "github",
++ "actor": {
++ "source": "github",
++ "id": "owner",
++ "kind": "person"
++ },
++ "source_scope": "issues",
++ "threads": [
++ "issue:1"
++ ],
++ "occurred_at": "2026-11-09T12:00:00Z",
++ "text": "Fix the bug",
++ "unexpected": true
++}
ddiff --git a/fixtures/agent.trigger/valid/example.json b/fixtures/agent.trigger/valid/example.json
nnew file mode 100644
iindex 00000000..cc4d63fb
---- /dev/null
++++ b/fixtures/agent.trigger/valid/example.json
@@@ -0,0 +1,15 @@
++{
++ "id": "trg_1",
++ "source": "github",
++ "actor": {
++ "source": "github",
++ "id": "owner",
++ "kind": "person"
++ },
++ "source_scope": "issues",
++ "threads": [
++ "issue:1"
++ ],
++ "occurred_at": "2026-11-09T12:00:00Z",
++ "text": "Fix the bug"
++}
ddiff --git a/fixtures/ai.effort/invalid/unknown.json b/fixtures/ai.effort/invalid/unknown.json
nnew file mode 100644
iindex 00000000..367077a7
---- /dev/null
++++ b/fixtures/ai.effort/invalid/unknown.json
@@@ -0,0 +1 @@
++"unknown"
ddiff --git a/fixtures/ai.effort/valid/example.json b/fixtures/ai.effort/valid/example.json
nnew file mode 100644
iindex 00000000..aae8183d
---- /dev/null
++++ b/fixtures/ai.effort/valid/example.json
@@@ -0,0 +1 @@
++"auto"
ddiff --git a/fixtures/ai.effort/valid/high.json b/fixtures/ai.effort/valid/high.json
nnew file mode 100644
iindex 00000000..ade060b6
---- /dev/null
++++ b/fixtures/ai.effort/valid/high.json
@@@ -0,0 +1 @@
++"high"
ddiff --git a/fixtures/ai.effort/valid/low.json b/fixtures/ai.effort/valid/low.json
nnew file mode 100644
iindex 00000000..35ca9291
---- /dev/null
++++ b/fixtures/ai.effort/valid/low.json
@@@ -0,0 +1 @@
++"low"
ddiff --git a/fixtures/ai.effort/valid/max.json b/fixtures/ai.effort/valid/max.json
nnew file mode 100644
iindex 00000000..c3a88593
---- /dev/null
++++ b/fixtures/ai.effort/valid/max.json
@@@ -0,0 +1 @@
++"max"
ddiff --git a/fixtures/ai.effort/valid/medium.json b/fixtures/ai.effort/valid/medium.json
nnew file mode 100644
iindex 00000000..e57ce229
---- /dev/null
++++ b/fixtures/ai.effort/valid/medium.json
@@@ -0,0 +1 @@
++"medium"
ddiff --git a/fixtures/ai.run/invalid/unresolved-effort.json b/fixtures/ai.run/invalid/unresolved-effort.json
nnew file mode 100644
iindex 00000000..d031ee05
---- /dev/null
++++ b/fixtures/ai.run/invalid/unresolved-effort.json
@@@ -0,0 +1,140 @@
++{
++ "id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
++ "status": "succeeded",
++ "workflow": {
++ "key": "news.summarize_story",
++ "version": 2
++ },
++ "template": {
++ "key": "news.summarize_story",
++ "version": 3
++ },
++ "route": {
++ "key": "default.text",
++ "version": 1
++ },
++ "requester": {
++ "type": "service",
++ "id": "news"
++ },
++ "on_behalf_of": null,
++ "attribution": null,
++ "source_service": "news",
++ "target": {
++ "service": "news",
++ "type": "story",
++ "id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
++ },
++ "input": {
++ "topic": "Transit strike",
++ "sources": [
++ {
++ "source_type": "news.item",
++ "source_id": "itm_42"
++ }
++ ]
++ },
++ "output": {
++ "headline": "Transit strike begins",
++ "summary": "Workers walked out.",
++ "citations": [
++ 0
++ ],
++ "gaps": []
++ },
++ "error": null,
++ "synthetic": false,
++ "provenance": {
++ "origin": "ai",
++ "workflow": "news.summarize_story",
++ "workflow_version": 2,
++ "template_version": 3,
++ "route": "default.text",
++ "route_version": 1,
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "fallback_used": true,
++ "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
++ "cached_from": null,
++ "synthetic": false
++ },
++ "usage": {
++ "tokens_in": 1200,
++ "tokens_out": 300,
++ "cost_usd": 0.0081,
++ "attempts": 2
++ },
++ "citations_count": 1,
++ "retry_of": null,
++ "idempotency_key": null,
++ "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
++ "created_at": "2026-09-23T10:00:00.000Z",
++ "started_at": "2026-09-23T10:00:00.050Z",
++ "finished_at": "2026-09-23T10:00:04.200Z",
++ "explain": {
++ "objective": "cheapest",
++ "reasons": [
++ "the cheapest model that can do this job"
++ ],
++ "selected": "anthropic",
++ "candidates": [
++ {
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "eligible": true,
++ "excluded_reason": null,
++ "cost": 3e-06,
++ "latency": 900
++ },
++ {
++ "provider": "openai",
++ "model": "gpt-4o-mini",
++ "eligible": false,
++ "excluded_reason": "no_vision",
++ "cost": 1e-06,
++ "latency": 700
++ }
++ ],
++ "paid_by": "openvibe",
++ "task": {
++ "vision": true,
++ "tools": false,
++ "json": false,
++ "min_context": 1536,
++ "reasoning": "none",
++ "output": "text",
++ "weight": "standard"
++ },
++ "ranked": [
++ {
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "why": "the cheapest with vision",
++ "cost": 3,
++ "tier": "strong"
++ }
++ ],
++ "attempts": [
++ {
++ "key": "openvibe",
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "why": "the cheapest with vision",
++ "status": "ok",
++ "error": null
++ }
++ ]
++ },
++ "effort_requested": "auto",
++ "effort_applied": "auto",
++ "effort_rung": 0,
++ "ladder_id": "ticket-1",
++ "ladder": [
++ {
++ "model": "stub",
++ "effort": "low",
++ "cost_usd": 0,
++ "outcome": "succeeded"
++ }
++ ]
++}
ddiff --git a/fixtures/ai.run/valid/effort-ladder.json b/fixtures/ai.run/valid/effort-ladder.json
nnew file mode 100644
iindex 00000000..686a9119
---- /dev/null
++++ b/fixtures/ai.run/valid/effort-ladder.json
@@@ -0,0 +1,140 @@
++{
++ "id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
++ "status": "succeeded",
++ "workflow": {
++ "key": "news.summarize_story",
++ "version": 2
++ },
++ "template": {
++ "key": "news.summarize_story",
++ "version": 3
++ },
++ "route": {
++ "key": "default.text",
++ "version": 1
++ },
++ "requester": {
++ "type": "service",
++ "id": "news"
++ },
++ "on_behalf_of": null,
++ "attribution": null,
++ "source_service": "news",
++ "target": {
++ "service": "news",
++ "type": "story",
++ "id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
++ },
++ "input": {
++ "topic": "Transit strike",
++ "sources": [
++ {
++ "source_type": "news.item",
++ "source_id": "itm_42"
++ }
++ ]
++ },
++ "output": {
++ "headline": "Transit strike begins",
++ "summary": "Workers walked out.",
++ "citations": [
++ 0
++ ],
++ "gaps": []
++ },
++ "error": null,
++ "synthetic": false,
++ "provenance": {
++ "origin": "ai",
++ "workflow": "news.summarize_story",
++ "workflow_version": 2,
++ "template_version": 3,
++ "route": "default.text",
++ "route_version": 1,
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "fallback_used": true,
++ "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
++ "cached_from": null,
++ "synthetic": false
++ },
++ "usage": {
++ "tokens_in": 1200,
++ "tokens_out": 300,
++ "cost_usd": 0.0081,
++ "attempts": 2
++ },
++ "citations_count": 1,
++ "retry_of": null,
++ "idempotency_key": null,
++ "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
++ "created_at": "2026-09-23T10:00:00.000Z",
++ "started_at": "2026-09-23T10:00:00.050Z",
++ "finished_at": "2026-09-23T10:00:04.200Z",
++ "explain": {
++ "objective": "cheapest",
++ "reasons": [
++ "the cheapest model that can do this job"
++ ],
++ "selected": "anthropic",
++ "candidates": [
++ {
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "eligible": true,
++ "excluded_reason": null,
++ "cost": 3e-06,
++ "latency": 900
++ },
++ {
++ "provider": "openai",
++ "model": "gpt-4o-mini",
++ "eligible": false,
++ "excluded_reason": "no_vision",
++ "cost": 1e-06,
++ "latency": 700
++ }
++ ],
++ "paid_by": "openvibe",
++ "task": {
++ "vision": true,
++ "tools": false,
++ "json": false,
++ "min_context": 1536,
++ "reasoning": "none",
++ "output": "text",
++ "weight": "standard"
++ },
++ "ranked": [
++ {
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "why": "the cheapest with vision",
++ "cost": 3,
++ "tier": "strong"
++ }
++ ],
++ "attempts": [
++ {
++ "key": "openvibe",
++ "provider": "anthropic",
++ "model": "claude-sonnet",
++ "why": "the cheapest with vision",
++ "status": "ok",
++ "error": null
++ }
++ ]
++ },
++ "effort_requested": "auto",
++ "effort_applied": null,
++ "effort_rung": 0,
++ "ladder_id": "ticket-1",
++ "ladder": [
++ {
++ "model": "stub",
++ "effort": "low",
++ "cost_usd": 0,
++ "outcome": "succeeded"
++ }
++ ]
++}
ddiff --git a/fixtures/ai.task-defaults/invalid/recursive-effort.json b/fixtures/ai.task-defaults/invalid/recursive-effort.json
nnew file mode 100644
iindex 00000000..48a04737
---- /dev/null
++++ b/fixtures/ai.task-defaults/invalid/recursive-effort.json
@@@ -0,0 +1,15 @@
++{
++ "signed_out": {
++ "model": "openvibe/cheapest",
++ "source": "openvibe"
++ },
++ "signed_in": {
++ "model": "anthropic/claude-opus-5-5",
++ "source": "openvibe"
++ },
++ "fallbacks": [],
++ "image_model": null,
++ "search_engines": [],
++ "max_cost_usd": 0.5,
++ "effort": "auto"
++}
ddiff --git a/fixtures/ai.task-defaults/valid/effort.json b/fixtures/ai.task-defaults/valid/effort.json
nnew file mode 100644
iindex 00000000..8ce9d4be
---- /dev/null
++++ b/fixtures/ai.task-defaults/valid/effort.json
@@@ -0,0 +1,15 @@
++{
++ "signed_out": {
++ "model": "openvibe/cheapest",
++ "source": "openvibe"
++ },
++ "signed_in": {
++ "model": "anthropic/claude-opus-5-5",
++ "source": "openvibe"
++ },
++ "fallbacks": [],
++ "image_model": null,
++ "search_engines": [],
++ "max_cost_usd": 0.5,
++ "effort": "high"
++}
ddiff --git a/generated/json-schema/bundle.json b/generated/json-schema/bundle.json
iindex b642a84e..d34144f9 100644
---- a/generated/json-schema/bundle.json
++++ b/generated/json-schema/bundle.json
@@@ -16973,166 +16973,322 @@
}
}
},
-- "ai.run-request": {
++ "ai.run-error": {
"version": "1.0.0",
"owner": "ai",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/run-request.v1.json",
-- "title": "AiRunRequest",
-- "description": "Body of POST /api/v1/runs on OpenVibe.AI (capability ai.run.create; ADR-015). Runs the newest active version of a workflow (or the given active or deprecated version) on input that must match that workflow version's own input schema; per-workflow input and output schemas live in AI's registry (GET /api/v1/workflows/:key), not here. The token's ns claim limits which workflow namespaces may run (403 capability.namespace_denied). ?wait=ms waits for the result: 201 finished or served from cache, 202 still queued/running (poll GET /api/v1/runs/:id), 200 an idempotent replay. Errors are problem+json: 404 workflow.not_found, 409 workflow.inactive, 409 idempotency.conflict, 413 input.too_large, 422 input.invalid, 429 quota.exceeded or queue.full with Retry-After. The direct operations POST /api/v1/{chat,generate,summarize,classify,extract,enrich,embed} take the same fields (except workflow and version) with the input fields at the top level and run workflow ai.<op>. target (EntityRef): what the output is about, part of the cache scope and a run filter. attribution (EntityRef): what the spend is attributed to for quotas and usage. on_behalf_of (SubjectRef): the person or actor the caller acts for, part of the cache scope and per-actor quotas. options.latency asks for a slower class than the workflow allows (options.deadline_hours says how long a batch run may take); the run answers with the class it ran in (run.latency_class), the tier it was priced on (run.service_tier) and, when the ask was clamped, the class it really ran in (run.latency_clamped).",
++ "$id": "https://openvibe.network/contracts/ai/run-error.v1.json",
++ "title": "AiRunError",
++ "description": "ai.run-error@1: safe, actionable words for an AI or Actor run. Raw provider responses are never display text. The code map is shared across products.",
"type": "object",
-- "required": [],
"additionalProperties": false,
++ "required": [
++ "code",
++ "words",
++ "next",
++ "action"
++ ],
"properties": {
-- "task": {
++ "code": {
"type": "string",
-- "pattern": "^[a-z][a-z0-9_-]*\\.[a-z0-9_.-]{1,100}$",
-- "description": "A registered AI task (ai.task@1, GET /api/v1/tasks). Its workflow runs with the task's resolved choice; choice overrides it for this run."
++ "maxLength": 80
},
-- "choice": {
-- "$ref": "choice.v1.json"
++ "words": {
++ "type": "string",
++ "maxLength": 240
},
-- "workflow": {
++ "next": {
++ "type": "string",
++ "maxLength": 240
++ },
++ "action": {
++ "enum": [
++ "pick_model",
++ "add_key",
++ "retry",
++ "retry_later",
++ "open"
++ ]
++ },
++ "retry_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ }
++ }
++ }
++ },
++ "ai.call.recorded": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/events/payloads/ai.call.recorded.v1.json",
++ "title": "AiCallRecordedPayload",
++ "description": "ai.call.recorded v1 (plan L40, one AI meter across the network). One AI call, wherever it happened: OpenVibe.AI's own runs, a harness turn in Codes, an Actor task, Vibe, a local model on a person's own machine. who and where: subject (the person, or null when the call is anonymous), attribution (the site or app the call came from, free text such as 'site:design'), surface (the product surface, free text such as 'design.generate' or 'codes.turn'). what ran: system (ai, harness:claude-code, harness:codex, actor, node), provider, model, effort. who paid: paid_by (own_key, openvibe_key, plan, own_machine, free_tier, network_allowance, org_key) and paid_by_detail (for example 'anthropic ...a1b2' for a person's own key, or 'claude-max' for a plan). tokens: input (the UNCACHED input tokens), output, reasoning, cache_read, cache_write (with cache_write_ttl 5m or 1h), images, audio_seconds, video_seconds. money, in USD: list_cost_usd (what the tokens cost at the human-typed list prices), charged_usd (what the payer was actually charged), fee_usd (the network's fee on top), cache_saved_usd (what the cache saved against the plain input price). price_source says where the prices came from ('models', 'pricing', 'flat', or 'no cache price' when no cache price is typed and the cache tokens are priced at the input price), price_date the day the price was checked. how it went: latency_ms, ttft_ms, attempts, outcome. ids: run_id or turn_id, and at. The record carries NO prompt and NO answer text, ever. A ledger (OpenVibe.AI) rolls the records up; a record consumed twice is stored once (idempotent by system and run_id or turn_id). Envelope: subject { type: run, id: <run_id> } or { type: user, id: <subject> }, visibility internal, priority low, actor service:ai.",
++ "type": "object",
++ "required": [
++ "system",
++ "surface",
++ "paid_by",
++ "input",
++ "output",
++ "reasoning",
++ "cache_read",
++ "cache_write",
++ "cache_write_ttl",
++ "images",
++ "audio_seconds",
++ "video_seconds",
++ "list_cost_usd",
++ "charged_usd",
++ "fee_usd",
++ "cache_saved_usd",
++ "price_source",
++ "price_date",
++ "latency_ms",
++ "ttft_ms",
++ "attempts",
++ "outcome",
++ "at"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "subject": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 128,
++ "description": "The person the call was made for, or null when the call was anonymous."
++ },
++ "attribution": {
"type": "string",
-- "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)+$",
"maxLength": 200,
-- "description": "Workflow key, <namespace>.<name> (live.chat_reply, news.summarize_story, network.site_copy…)."
++ "description": "The site or app the call came from, as '<type>:<id>' (for example 'site:design'), empty when nothing is known."
},
-- "version": {
-- "type": "integer",
-- "minimum": 1,
-- "description": "Pin a workflow version (active or deprecated). Omitted: the newest active version."
++ "surface": {
++ "type": "string",
++ "maxLength": 200,
++ "description": "The product surface: 'design.generate', 'codes.turn', 'ai.generate'. Free text, so a new surface needs no new contract."
++ },
++ "system": {
++ "type": "string",
++ "maxLength": 100,
++ "description": "What ran: 'ai', 'harness:claude-code', 'harness:codex', 'actor', 'node'."
++ },
++ "provider": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 128
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 200
++ },
++ "effort": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 64,
++ "description": "The reasoning effort the call asked for, when it asked for one."
++ },
++ "paid_by": {
++ "type": "string",
++ "enum": [
++ "own_key",
++ "openvibe_key",
++ "plan",
++ "own_machine",
++ "free_tier",
++ "network_allowance",
++ "org_key"
++ ]
++ },
++ "paid_by_detail": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 200,
++ "description": "Which key or plan paid, for example 'anthropic ...a1b2' or 'claude-max'. Never a whole secret."
},
"input": {
-- "type": "object",
-- "description": "Workflow input; validated against the workflow version's input_schema. Default {}."
++ "type": "integer",
++ "minimum": 0,
++ "description": "The uncached input tokens. Cache reads and cache writes are counted on their own fields."
},
-- "target": {
-- "$ref": "../common/entity-ref.v1.json"
++ "output": {
++ "type": "integer",
++ "minimum": 0
},
-- "attribution": {
-- "$ref": "../common/entity-ref.v1.json"
++ "reasoning": {
++ "type": "integer",
++ "minimum": 0
},
-- "on_behalf_of": {
-- "$ref": "../identity/subject-ref.v1.json"
++ "cache_read": {
++ "type": "integer",
++ "minimum": 0
},
-- "idempotency_key": {
++ "cache_write": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "cache_write_ttl": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "enum": [
++ "5m",
++ "1h",
++ null
++ ],
++ "description": "How long the written cache entry lives, when the provider says."
++ },
++ "images": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "audio_seconds": {
++ "type": "number",
++ "minimum": 0
++ },
++ "video_seconds": {
++ "type": "number",
++ "minimum": 0
++ },
++ "list_cost_usd": {
++ "type": "number",
++ "minimum": 0,
++ "description": "What the tokens cost at the human-typed list prices."
++ },
++ "charged_usd": {
++ "type": "number",
++ "minimum": 0,
++ "description": "What the payer was actually charged. A person's own key is never charged here: 0."
++ },
++ "fee_usd": {
++ "type": "number",
++ "minimum": 0,
++ "description": "The network's fee on top of the cost, when the OpenVibe key paid."
++ },
++ "cache_saved_usd": {
++ "type": "number",
++ "minimum": 0,
++ "description": "What the cached tokens saved against the plain input price."
++ },
++ "price_source": {
"type": "string",
-- "pattern": "^[A-Za-z0-9._:-]{8,128}$",
-- "description": "Same (requester, key) returns the existing run; a different workflow or input under it is 409 idempotency.conflict. The Idempotency-Key header is used when this is absent."
++ "maxLength": 64,
++ "description": "Where the prices came from: 'models' (a person's typed model row), 'pricing' (AI_PRICING_JSON), 'flat' (the flat rates), 'no cache price' (no cache price is typed, so the cache tokens are priced at the input price)."
},
-- "options": {
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "cache": {
-- "type": "boolean",
-- "default": true,
-- "description": "false skips the scoped cache lookup and store."
-- },
-- "debug": {
-- "type": "boolean",
-- "default": false,
-- "description": "Keep raw prompts and responses in the request log, only when AI runs with raw debug logging on."
-- },
-- "latency": {
-- "enum": [
-- "interactive",
-- "background",
-- "batch"
-- ],
-- "description": "The class the caller asks for: how long the caller may wait, and what the router may do with the wait. interactive (the default) answers as soon as the provider can; background may take minutes, and the run is priced on the cheapest tier that can wait (a Flex tier, a provider's off-peak hours, the host's own idle model); batch may take hours, and the run is queued and answered through a provider's own batch API. The class is the workflow's own (the route's constraints.latency_class): a caller may ask for a SLOWER class and never for a faster one. A faster ask is not refused: the run happens in the workflow's own class and the answer says so (run.latency_clamped)."
-- },
-- "deadline_hours": {
-- "type": "integer",
-- "minimum": 1,
-- "maximum": 72,
-- "description": "For a batch run: how long the answer may take, in hours (1 to 72). The run is queued and answered within the deadline; a deadline the provider cannot meet sends the run back to the ordinary path. Omitted: the service's own default."
-- }
-- }
++ "price_date": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
++ "description": "The day the price was checked, when it was."
},
-- "credential": {
-- "type": "object",
-- "additionalProperties": false,
-- "required": [
-- "subject"
++ "latency_ms": {
++ "type": [
++ "integer",
++ "null"
],
-- "properties": {
-- "subject": {
-- "type": "string",
-- "pattern": "^usr_[0-9A-HJKMNP-TV-Z]{26}$"
-- }
-- },
-- "description": "Run with the person's own provider key (ai.credential@1) that this service stored, instead of a shared route: only that provider is called (no fallback), the result is never cached or taken from the cache, the shared paid budget is not spent, and the credential's own daily budget applies (429 quota.exceeded). Chat operations only (text, JSON, vision)."
-- }
-- },
-- "anyOf": [
-- {
-- "required": [
-- "workflow"
-- ]
++ "minimum": 0
},
-- {
-- "required": [
-- "task"
++ "ttft_ms": {
++ "type": [
++ "integer",
++ "null"
++ ],
++ "minimum": 0,
++ "description": "Time to the first token, when the call streamed and it was measured."
++ },
++ "attempts": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "outcome": {
++ "type": "string",
++ "enum": [
++ "succeeded",
++ "failed",
++ "cancelled",
++ "cached"
]
++ },
++ "run_id": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 100
++ },
++ "turn_id": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "maxLength": 100
++ },
++ "at": {
++ "type": "string",
++ "format": "date-time"
}
-- ]
++ }
}
},
-- "ai.run": {
-- "version": "1.1.0",
++ "ai.run.queued": {
++ "version": "1.0.0",
"owner": "ai",
-- "status": "active",
++ "status": "planned",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/run.v1.json",
-- "title": "AiRun",
-- "description": "A workflow run on OpenVibe.AI (ADR-015; server/runs.js decode): the `run` member of every run response (POST /api/v1/runs and the direct operations, GET /api/v1/runs/:id, cancel, retry) and each item of GET /api/v1/runs { runs }. Output is attributable to workflow + version + template version + route version + provider/model + run id, never to a person. A draft stays a draft: products store it with ai/ai_assisted authorship and publish nothing until a person reviews it. input keeps no inline media (replaced by data_url_sha256 and data_url_bytes) and no passthrough prompt ({ not_retained }); output is null until the run succeeded or was served from cache and then matches the workflow version's output_schema. requester is the token principal (service, app or mod). A run interrupted by a restart or shutdown ends failed with error.code run.interrupted. latency_class is the class the run really ran in, service_tier the tier it was priced on, and latency_clamped set when the caller asked for a faster class than the workflow allows. explain says why the run answered as it did: the task it read, the candidates it ranked and every attempt.",
++ "$id": "https://openvibe.network/contracts/events/payloads/ai.run.queued.v1.json",
++ "title": "AiRunQueuedPayload",
++ "description": "ai.run.queued v1 (OpenVibe.AI server/runs.js create). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run was stored queued (it then runs inline within ?wait or on the worker). Not published for a cache hit (ai.run.cached) or a create refused by quota or a full queue. A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority low, actor service:ai.",
"type": "object",
"required": [
-- "id",
++ "run_id",
"status",
"workflow",
-- "template",
-- "route",
"requester",
"on_behalf_of",
-- "attribution",
-- "source_service",
"target",
-- "input",
-- "output",
-- "error",
++ "attribution",
++ "provider",
++ "model",
++ "fallback_used",
"synthetic",
-- "provenance",
++ "cached_from",
"usage",
++ "error",
"citations_count",
"retry_of",
-- "idempotency_key",
-- "trace_id",
"created_at",
-- "started_at",
"finished_at"
],
"additionalProperties": false,
"properties": {
-- "id": {
++ "run_id": {
"type": "string",
"pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
},
"status": {
-- "enum": [
-- "queued",
-- "running",
-- "succeeded",
-- "failed",
-- "cancelled",
-- "cached"
-- ],
-- "description": "Terminal: succeeded, failed, cancelled, cached (a scoped cache hit, no provider call; provenance.cached_from names the run it reused)."
++ "const": "queued"
},
"workflow": {
"type": "object",
@@@ -17151,208 +17307,225 @@
}
}
},
-- "template": {
-- "type": [
-- "object",
-- "null"
-- ],
-- "required": [
-- "key",
-- "version"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "key": {
-- "type": "string"
-- },
-- "version": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- }
-- },
-- "description": "The prompt template of the workflow's llm step; null for workflows without one."
-- },
-- "route": {
-- "type": [
-- "object",
-- "null"
-- ],
-- "required": [
-- "key",
-- "version"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "key": {
-- "type": "string"
-- },
-- "version": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- }
-- },
-- "description": "Provider route; version null while the route is unresolved or disabled."
-- },
"requester": {
-- "$ref": "../identity/subject-ref.v1.json"
++ "$ref": "../../identity/subject-ref.v1.json"
},
"on_behalf_of": {
"anyOf": [
{
-- "$ref": "../identity/subject-ref.v1.json"
++ "$ref": "../../identity/subject-ref.v1.json"
},
{
"type": "null"
}
]
},
-- "attribution": {
++ "target": {
"anyOf": [
{
-- "$ref": "../common/entity-ref.v1.json"
++ "$ref": "../../common/entity-ref.v1.json"
},
{
"type": "null"
}
]
},
-- "source_service": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "The requester's service id when the requester is a service."
-- },
-- "target": {
++ "attribution": {
"anyOf": [
{
-- "$ref": "../common/entity-ref.v1.json"
++ "$ref": "../../common/entity-ref.v1.json"
},
{
"type": "null"
}
]
},
-- "input": {
-- "type": "object",
-- "description": "The retained input (see the description)."
-- },
-- "output": {
++ "provider": {
"type": [
-- "object",
++ "string",
"null"
],
-- "description": "Workflow output, or null."
++ "description": "Provider that produced the output; null before a provider call and for cached runs."
},
-- "error": {
++ "model": {
"type": [
-- "object",
++ "string",
"null"
-- ],
-- "required": [
-- "code",
-- "detail"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "code": {
-- "type": "string",
-- "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$",
-- "description": "run.cancelled, run.interrupted, run.internal, output.invalid, output.empty, provider.unavailable, route.unavailable, source.unavailable, media.unresolvable…"
-- },
-- "detail": {
-- "type": [
-- "string",
-- "null"
-- ]
-- }
-- }
++ ]
++ },
++ "fallback_used": {
++ "type": "boolean"
},
"synthetic": {
"type": "boolean",
-- "description": "Produced by the stub provider; never served to production callers and never cached."
++ "description": "Stub provider output."
},
-- "provenance": {
++ "cached_from": {
++ "type": "null"
++ },
++ "usage": {
"type": "object",
-- "additionalProperties": false,
"required": [
-- "origin",
-- "workflow",
-- "workflow_version",
-- "template_version",
-- "route",
-- "route_version",
-- "provider",
-- "model",
-- "fallback_used",
-- "run_id",
-- "cached_from",
-- "synthetic"
++ "tokens_in",
++ "tokens_out",
++ "cost_usd",
++ "attempts"
],
++ "additionalProperties": false,
"properties": {
-- "origin": {
-- "const": "ai"
-- },
-- "workflow": {
-- "type": "string"
++ "tokens_in": {
++ "type": "integer",
++ "minimum": 0
},
-- "workflow_version": {
++ "tokens_out": {
"type": "integer",
-- "minimum": 1
++ "minimum": 0
},
-- "template_version": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- },
-- "route": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "route_version": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- },
-- "provider": {
-- "type": [
-- "string",
-- "null"
-- ]
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
},
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
++ "attempts": {
++ "type": "integer",
++ "minimum": 0
++ }
++ }
++ },
++ "error": {
++ "type": "null"
++ },
++ "citations_count": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "retry_of": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "finished_at": {
++ "type": "null"
++ }
++ }
++ }
++ },
++ "ai.run.succeeded": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "planned",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/events/payloads/ai.run.succeeded.v1.json",
++ "title": "AiRunSucceededPayload",
++ "description": "ai.run.succeeded v1 (OpenVibe.AI server/runs.js execute). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run finished with output that matched the workflow output schema. The output itself is not in the event: a consumer that needs it reads GET /api/v1/runs/:id with ai.run.read (own runs only). A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority important, actor service:ai.",
++ "type": "object",
++ "required": [
++ "run_id",
++ "status",
++ "workflow",
++ "requester",
++ "on_behalf_of",
++ "target",
++ "attribution",
++ "provider",
++ "model",
++ "fallback_used",
++ "synthetic",
++ "cached_from",
++ "usage",
++ "error",
++ "citations_count",
++ "retry_of",
++ "created_at",
++ "finished_at"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "run_id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "status": {
++ "const": "succeeded"
++ },
++ "workflow": {
++ "type": "object",
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
},
-- "fallback_used": {
-- "type": "boolean",
-- "description": "The primary provider was degraded and the run fell back (ADR-015: fallbacks are recorded)."
++ "version": {
++ "type": "integer",
++ "minimum": 1
++ }
++ }
++ },
++ "requester": {
++ "$ref": "../../identity/subject-ref.v1.json"
++ },
++ "on_behalf_of": {
++ "anyOf": [
++ {
++ "$ref": "../../identity/subject-ref.v1.json"
},
-- "run_id": {
-- "type": "string",
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "target": {
++ "anyOf": [
++ {
++ "$ref": "../../common/entity-ref.v1.json"
},
-- "cached_from": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "attribution": {
++ "anyOf": [
++ {
++ "$ref": "../../common/entity-ref.v1.json"
},
-- "synthetic": {
-- "type": "boolean"
++ {
++ "type": "null"
}
-- }
++ ]
++ },
++ "provider": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "Provider that produced the output; null before a provider call and for cached runs."
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "fallback_used": {
++ "type": "boolean"
++ },
++ "synthetic": {
++ "type": "boolean",
++ "description": "Stub provider output."
++ },
++ "cached_from": {
++ "type": "null"
},
"usage": {
"type": "object",
@@@ -17378,261 +17551,553 @@
},
"attempts": {
"type": "integer",
-- "minimum": 0,
-- "description": "Provider calls made (skipped routes not counted)."
++ "minimum": 0
}
}
},
++ "error": {
++ "type": "null"
++ },
"citations_count": {
"type": "integer",
-- "minimum": 0,
-- "description": "Citations stored for the run (GET /api/v1/runs/:id/citations): the sources the workflow was given, and any the requester attached later."
-- },
-- "latency_class": {
-- "enum": [
-- "interactive",
-- "background",
-- "batch"
-- ],
-- "description": "The class the run really ran in: how long the caller was willing to wait. It is the workflow's own class (the route's constraints.latency_class) or a slower one the caller asked for (options.latency); a caller can never make a run faster than its workflow allows."
++ "minimum": 0
},
-- "service_tier": {
++ "retry_of": {
"type": [
"string",
"null"
],
-- "enum": [
-- "standard",
-- "flex",
-- "batch",
-- "offpeak",
-- "local",
-- null
-- ],
-- "description": "The tier the run was priced on: the tier the provider really served (standard, flex, batch) or the one the router chose (offpeak inside a provider's off-peak hours, local on the host's own model). Null while the run has not answered. A provider that does not say which tier it served is priced at the list price: a saving nobody confirmed is not a saving."
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
},
-- "latency_clamped": {
-- "type": [
-- "object",
-- "null"
-- ],
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "finished_at": {
++ "type": "string",
++ "format": "date-time"
++ }
++ }
++ }
++ },
++ "ai.run.failed": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "planned",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/events/payloads/ai.run.failed.v1.json",
++ "title": "AiRunFailedPayload",
++ "description": "ai.run.failed v1 (OpenVibe.AI server/runs.js execute / recoverInterrupted). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run ended failed: a provider, route, source or output error, run.internal, or run.interrupted after a restart or shutdown (retryable with POST /api/v1/runs/:id/retry unless its input was not retained). A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority important, actor service:ai.",
++ "type": "object",
++ "required": [
++ "run_id",
++ "status",
++ "workflow",
++ "requester",
++ "on_behalf_of",
++ "target",
++ "attribution",
++ "provider",
++ "model",
++ "fallback_used",
++ "synthetic",
++ "cached_from",
++ "usage",
++ "error",
++ "citations_count",
++ "retry_of",
++ "created_at",
++ "finished_at"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "run_id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "status": {
++ "const": "failed"
++ },
++ "workflow": {
++ "type": "object",
"required": [
-- "asked",
-- "used"
++ "key",
++ "version"
],
"additionalProperties": false,
"properties": {
-- "asked": {
-- "enum": [
-- "interactive",
-- "background",
-- "batch"
-- ],
-- "description": "The class the caller asked for."
++ "key": {
++ "type": "string"
},
-- "used": {
-- "enum": [
-- "interactive",
-- "background",
-- "batch"
-- ],
-- "description": "The class the run really ran in."
++ "version": {
++ "type": "integer",
++ "minimum": 1
}
-- },
-- "description": "Set when the caller asked for a faster class than the workflow allows: the class asked for and the class the run really ran in. The run is never refused for it."
++ }
},
-- "retry_of": {
++ "requester": {
++ "$ref": "../../identity/subject-ref.v1.json"
++ },
++ "on_behalf_of": {
++ "anyOf": [
++ {
++ "$ref": "../../identity/subject-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "target": {
++ "anyOf": [
++ {
++ "$ref": "../../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "attribution": {
++ "anyOf": [
++ {
++ "$ref": "../../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "provider": {
"type": [
"string",
"null"
],
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ "description": "Provider that produced the output; null before a provider call and for cached runs."
},
-- "idempotency_key": {
++ "model": {
"type": [
"string",
"null"
]
},
-- "trace_id": {
-- "type": [
-- "string",
-- "null"
-- ]
++ "fallback_used": {
++ "type": "boolean"
},
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
++ "synthetic": {
++ "type": "boolean",
++ "description": "Stub provider output."
},
-- "started_at": {
++ "cached_from": {
++ "type": "null"
++ },
++ "usage": {
++ "type": "object",
++ "required": [
++ "tokens_in",
++ "tokens_out",
++ "cost_usd",
++ "attempts"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "tokens_in": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "tokens_out": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "attempts": {
++ "type": "integer",
++ "minimum": 0
++ }
++ }
++ },
++ "error": {
++ "type": "object",
++ "required": [
++ "code",
++ "detail"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "code": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$"
++ },
++ "detail": {
++ "type": [
++ "string",
++ "null"
++ ]
++ }
++ }
++ },
++ "citations_count": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "retry_of": {
"type": [
"string",
"null"
],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "created_at": {
++ "type": "string",
"format": "date-time"
},
"finished_at": {
-- "type": [
-- "string",
-- "null"
-- ],
++ "type": "string",
"format": "date-time"
++ }
++ }
++ }
++ },
++ "ai.run.cached": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "planned",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/events/payloads/ai.run.cached.v1.json",
++ "title": "AiRunCachedPayload",
++ "description": "ai.run.cached v1 (OpenVibe.AI server/runs.js create). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A create was served from the scoped cache: no provider call, cached_from names the run whose output was reused. A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority low, actor service:ai.",
++ "type": "object",
++ "required": [
++ "run_id",
++ "status",
++ "workflow",
++ "requester",
++ "on_behalf_of",
++ "target",
++ "attribution",
++ "provider",
++ "model",
++ "fallback_used",
++ "synthetic",
++ "cached_from",
++ "usage",
++ "error",
++ "citations_count",
++ "retry_of",
++ "created_at",
++ "finished_at"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "run_id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
},
-- "explain": {
-- "type": [
-- "object",
-- "null"
-- ],
-- "description": "Why the run answered as it did: the task-aware router's explain (L33 P3, L36 Y7). task is the requirement set it read from the request, ranked the candidates it considered and why, attempts every provider it tried with why it was chosen and why it failed, and the placement view it ranked from (objective, reasons, selected, candidates). A run that never reached a provider has no explain.",
++ "status": {
++ "const": "cached"
++ },
++ "workflow": {
++ "type": "object",
"required": [
-- "objective",
-- "reasons",
-- "selected",
-- "candidates"
++ "key",
++ "version"
],
"additionalProperties": false,
"properties": {
-- "objective": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "The objective the pool planned with (cheapest, balanced, correctness, own-keys, own-machine), or null for a pinned route."
++ "key": {
++ "type": "string"
},
-- "reasons": {
-- "type": "array",
-- "items": {
-- "type": "string"
-- },
-- "description": "Why the router chose what it chose, in words."
++ "version": {
++ "type": "integer",
++ "minimum": 1
++ }
++ }
++ },
++ "requester": {
++ "$ref": "../../identity/subject-ref.v1.json"
++ },
++ "on_behalf_of": {
++ "anyOf": [
++ {
++ "$ref": "../../identity/subject-ref.v1.json"
},
-- "selected": {
-- "type": [
-- "string",
-- "object",
-- "null"
-- ],
-- "description": "The provider that answered (provider, or provider/model, or the machine that answered), or null when nothing answered."
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "target": {
++ "anyOf": [
++ {
++ "$ref": "../../common/entity-ref.v1.json"
},
-- "candidates": {
-- "type": "array",
-- "description": "Every candidate the pool considered, with why it was excluded when it was.",
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "attribution": {
++ "anyOf": [
++ {
++ "$ref": "../../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "provider": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "Provider that produced the output; null before a provider call and for cached runs."
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "fallback_used": {
++ "type": "boolean"
++ },
++ "synthetic": {
++ "type": "boolean",
++ "description": "Stub provider output."
++ },
++ "cached_from": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "usage": {
++ "type": "object",
++ "required": [
++ "tokens_in",
++ "tokens_out",
++ "cost_usd",
++ "attempts"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "tokens_in": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "tokens_out": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "attempts": {
++ "type": "integer",
++ "minimum": 0
++ }
++ }
++ },
++ "error": {
++ "type": "null"
++ },
++ "citations_count": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "retry_of": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "finished_at": {
++ "type": "string",
++ "format": "date-time"
++ }
++ }
++ }
++ },
++ "ai.definition-version-request": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/definition-version-request.v1.json",
++ "title": "AiDefinitionVersionRequest",
++ "description": "ai.definition-version-request@1: bodies of ai.workflow.manage on OpenVibe.AI. An edit is always a new version (the previous one stays readable); fields left out are taken from the newest existing version. POST /api/v1/templates/:key/versions: a prompt template (input_schema and output_schema must compile as JSON Schema; visibility public, first-party or internal). POST /api/v1/workflows/:key/versions (key <namespace>.<name>): steps (at least one; kind llm (naming an existing template), passthrough, transcribe or embed), schemas, default route, cache mode. POST /api/v1/routes/:key/versions: primary { provider, model } and fallbacks (every provider must exist), or alias_of another route. POST …/:key/versions/:version/status: { status } (templates and workflows draft|active|deprecated|archived; routes active|disabled). Refusals are 422 ai.invalid.",
++ "anyOf": [
++ {
++ "type": "object",
++ "properties": {
++ "name": {
++ "type": "string"
++ },
++ "description": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "input_schema": {
++ "type": "object",
++ "description": "A JSON Schema the run input must match."
++ },
++ "output_schema": {
++ "type": "object",
++ "description": "A JSON Schema the output must match."
++ },
++ "system_prompt": {
++ "type": "string"
++ },
++ "user_prompt": {
++ "type": "string"
++ },
++ "default_route": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "owner": {
++ "type": "string"
++ },
++ "visibility": {
++ "enum": [
++ "public",
++ "first-party",
++ "internal"
++ ]
++ },
++ "status": {
++ "enum": [
++ "draft",
++ "active",
++ "deprecated",
++ "archived"
++ ]
++ },
++ "metadata": {
++ "type": "object"
++ }
++ }
++ },
++ {
++ "type": "object",
++ "properties": {
++ "name": {
++ "type": "string"
++ },
++ "description": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "namespace": {
++ "type": "string"
++ },
++ "input_schema": {
++ "type": "object",
++ "description": "A JSON Schema."
++ },
++ "output_schema": {
++ "type": "object",
++ "description": "A JSON Schema."
++ },
++ "steps": {
++ "type": "array",
++ "minItems": 1,
"items": {
"type": "object",
"required": [
-- "provider"
++ "kind"
],
-- "additionalProperties": true,
"properties": {
-- "provider": {
-- "type": "string"
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "eligible": {
-- "type": "boolean"
-- },
-- "excluded_reason": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "cost": {
-- "type": [
-- "number",
-- "null"
++ "kind": {
++ "enum": [
++ "llm",
++ "passthrough",
++ "transcribe",
++ "embed"
]
},
-- "latency": {
-- "type": [
-- "number",
-- "null"
-- ]
++ "template": {
++ "type": "string"
}
}
}
},
-- "paid_by": {
++ "default_route": {
"type": [
"string",
"null"
-- ],
-- "description": "Who paid for the run: the network, the person's own key, their own machine, or a project's own provider."
++ ]
},
-- "task": {
++ "cache_mode": {
++ "enum": [
++ "none",
++ "private",
++ "service"
++ ]
++ },
++ "cache_ttl_sec": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "status": {
++ "enum": [
++ "draft",
++ "active",
++ "deprecated",
++ "archived"
++ ]
++ },
++ "metadata": {
++ "type": "object"
++ }
++ }
++ },
++ {
++ "type": "object",
++ "properties": {
++ "primary": {
"type": "object",
-- "description": "The requirement set the router read off the request, with no model call.",
"required": [
-- "vision",
-- "tools",
-- "json",
-- "min_context",
-- "reasoning",
-- "output",
-- "weight"
++ "provider"
],
-- "additionalProperties": false,
"properties": {
-- "vision": {
-- "type": "boolean",
-- "description": "The request carried a picture."
-- },
-- "tools": {
-- "type": "boolean",
-- "description": "The request carried tools."
-- },
-- "json": {
-- "type": "boolean",
-- "description": "The request asked for JSON out."
-- },
-- "min_context": {
-- "type": "integer",
-- "minimum": 0,
-- "description": "The context window the request needs, in tokens."
-- },
-- "reasoning": {
-- "enum": [
-- "none",
-- "some",
-- "deep"
-- ],
-- "description": "How much thinking the request asked for."
-- },
-- "output": {
-- "enum": [
-- "text",
-- "image",
-- "audio",
-- "video"
-- ],
-- "description": "What the request wants out."
++ "provider": {
++ "type": "string"
},
-- "weight": {
-- "enum": [
-- "light",
-- "standard",
-- "heavy"
-- ],
-- "description": "How heavy the work is."
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
}
}
},
-- "ranked": {
++ "fallbacks": {
"type": "array",
-- "maxItems": 5,
-- "description": "The candidates the router ranked for this task, best first, each with its reason.",
"items": {
"type": "object",
"required": [
-- "provider",
-- "why"
++ "provider"
],
-- "additionalProperties": true,
"properties": {
"provider": {
"type": "string"
@@@ -17642,1166 +18107,926 @@
"string",
"null"
]
-- },
-- "why": {
-- "type": "string",
-- "description": "Why this candidate is here (the cheapest with vision, the strong tier, warm cache)."
-- },
-- "cost": {
-- "type": [
-- "number",
-- "null"
-- ],
-- "description": "The input price per million tokens, or null when the price is unknown."
-- },
-- "tier": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "The catalogue's strength tier: fast, balanced, strong or frontier."
}
}
}
},
-- "attempts": {
-- "type": "array",
-- "description": "Every attempt, in order: why it was chosen, and what went wrong when it failed.",
-- "items": {
-- "type": "object",
-- "required": [
-- "provider",
-- "status"
-- ],
-- "additionalProperties": true,
-- "properties": {
-- "key": {
-- "type": "string",
-- "description": "Which key or wallet paid for the attempt; never a key."
-- },
-- "provider": {
-- "type": "string"
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "why": {
-- "type": "string",
-- "description": "Why this provider was tried."
-- },
-- "status": {
-- "enum": [
-- "ok",
-- "failed",
-- "timeout",
-- "skipped"
-- ]
-- },
-- "error": {
-- "type": [
-- "string",
-- "null"
-- ]
-- }
-- }
-- }
++ "options": {
++ "type": "object"
},
-- "bench": {
++ "max_output_tokens": {
"type": [
-- "object",
++ "integer",
"null"
-- ],
-- "description": "The Bench evidence the route used, when it opted in."
++ ]
},
-- "usage_readings": {
-- "type": "array",
-- "items": {
-- "type": "object"
-- },
-- "description": "The billing readings of the run, when it has any."
++ "response_format": {
++ "enum": [
++ "text",
++ "json"
++ ]
},
-- "task_choice": {
++ "timeout_ms": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "alias_of": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "status": {
++ "enum": [
++ "active",
++ "disabled"
++ ]
++ }
++ }
++ }
++ ]
++ }
++ },
++ "ai.definition-version-result": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/definition-version-result.v1.json",
++ "title": "AiDefinitionVersionResult",
++ "description": "ai.definition-version-result@1: answers of ai.workflow.manage on OpenVibe.AI. POST …/:key/versions → 201 { template | workflow | route } (the new version, whole: prompts and schemas for a template, steps for a workflow, primary/fallbacks for a route); POST …/versions/:version/status → { template | workflow | route: { key, version, status } }.",
++ "anyOf": [
++ {
++ "type": "object",
++ "required": [
++ "template"
++ ],
++ "properties": {
++ "template": {
"type": "object",
-- "description": "A run started from an AI task (ai.task@1): the task it read, the choice it resolved, why that choice won and which fallback answered.",
"required": [
-- "task",
-- "requested",
-- "answered",
-- "why",
-- "fallback_index"
++ "key",
++ "version",
++ "status"
],
-- "additionalProperties": false,
"properties": {
-- "task": {
-- "type": "string",
-- "description": "The task's name."
-- },
-- "requested": {
-- "$ref": "choice.v1.json"
++ "key": {
++ "type": "string"
},
-- "answered": {
-- "$ref": "choice.v1.json"
++ "version": {
++ "type": "integer",
++ "minimum": 1
},
-- "why": {
-- "enum": [
-- "run",
-- "saved",
-- "kind",
-- "owner",
-- "builtin"
-- ],
-- "description": "Which resolution step picked it: the run's own choice (run), the person's saved choice (saved), their kind default (kind), the owner's task default (owner) or the built-in."
++ "status": {
++ "type": "string"
++ }
++ }
++ }
++ }
++ },
++ {
++ "type": "object",
++ "required": [
++ "workflow"
++ ],
++ "properties": {
++ "workflow": {
++ "type": "object",
++ "required": [
++ "key",
++ "version",
++ "status"
++ ],
++ "properties": {
++ "key": {
++ "type": "string"
},
-- "fallback_index": {
++ "version": {
"type": "integer",
-- "minimum": 0,
-- "description": "0 when the chosen model answered; otherwise the position of the fallback that did."
++ "minimum": 1
++ },
++ "status": {
++ "type": "string"
}
}
}
}
},
-- "choice": {
-- "anyOf": [
-- {
-- "$ref": "choice.v1.json"
++ {
++ "type": "object",
++ "required": [
++ "route"
++ ],
++ "properties": {
++ "route": {
++ "type": "object",
++ "required": [
++ "key",
++ "version",
++ "status"
++ ],
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": "integer",
++ "minimum": 1
++ },
++ "status": {
++ "type": "string"
++ }
++ }
++ }
++ }
++ }
++ ]
++ }
++ },
++ "ai.model": {
++ "version": "1.1.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/model.v1.json",
++ "title": "AiModel",
++ "description": "ai.model@1: a catalog entry for one model in OpenVibe.AI's registry. The legacy provider/model fields stay for existing readers; new catalog fields (id, family, variant, quant, revision, sha256, license, context, capabilities, modalities, retail rate and availability) are optional so older documents remain valid. Exact ids follow `<org>/<model>[:<quant>]@<revision>`; dynamic aliases such as `openvibe/auto` may be enumerated in `aliases`. Money fields are integer nano-USD per million tokens, as strings.",
++ "type": "object",
++ "required": [
++ "provider_key",
++ "model_key",
++ "type",
++ "status",
++ "cost",
++ "supports"
++ ],
++ "$defs": {
++ "money-nano-usd": {
++ "type": "string",
++ "pattern": "^[0-9]{1,19}$",
++ "description": "Integer nano-USD (1e-9 USD), stored as a string."
++ }
++ },
++ "properties": {
++ "provider_key": {
++ "type": "string"
++ },
++ "model_key": {
++ "type": "string",
++ "maxLength": 200
++ },
++ "display_name": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "type": {
++ "enum": [
++ "chat",
++ "vision",
++ "embedding",
++ "stt"
++ ]
++ },
++ "status": {
++ "enum": [
++ "active",
++ "disabled"
++ ]
++ },
++ "context_window": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "max_output": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "cost": {
++ "type": "object",
++ "properties": {
++ "in_per_mtok": {
++ "type": [
++ "number",
++ "null"
++ ]
},
-- {
-- "type": "null"
++ "out_per_mtok": {
++ "type": [
++ "number",
++ "null"
++ ]
++ },
++ "cached_per_mtok": {
++ "type": [
++ "number",
++ "null"
++ ]
++ }
++ }
++ },
++ "supports": {
++ "type": "object",
++ "properties": {
++ "json": {
++ "type": "boolean"
++ },
++ "tools": {
++ "type": "boolean"
++ },
++ "streaming": {
++ "type": "boolean"
++ },
++ "vision": {
++ "type": "boolean"
}
++ }
++ },
++ "id": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?@[a-zA-Z0-9._-]+$",
++ "description": "Exact model id: `<org>/<model>[:<quant>]@<revision>`.",
++ "maxLength": 256
++ },
++ "aliases": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "enum": [
++ "openvibe",
++ "openvibe/auto",
++ "openvibe/economy",
++ "openvibe/balanced",
++ "openvibe/fast",
++ "openvibe/private"
++ ]
++ },
++ "description": "Dynamic policy aliases that resolve to this model."
++ },
++ "family": {
++ "type": "string",
++ "description": "Creator and underlying model family, e.g. `qwen3`."
++ },
++ "variant": {
++ "type": "string",
++ "enum": [
++ "original",
++ "abliterated",
++ "finetuned",
++ "merged",
++ "lora"
],
-- "description": "The choice the run was started with, when it was started from a task or a choice; null otherwise."
++ "description": "How the weights were produced."
},
-- "answered": {
-- "anyOf": [
-- {
-- "$ref": "choice.v1.json"
++ "quant": {
++ "type": "string",
++ "description": "Quantization label, e.g. `q4_k_m`."
++ },
++ "revision": {
++ "type": "string",
++ "description": "Artifact revision or commit hash."
++ },
++ "sha256": {
++ "type": "string",
++ "pattern": "^[a-f0-9]{64}$",
++ "description": "SHA-256 of the weight file or manifest."
++ },
++ "license": {
++ "type": "string",
++ "description": "SPDX license identifier or custom license name."
++ },
++ "context": {
++ "type": "integer",
++ "minimum": 1,
++ "description": "Maximum context length in tokens."
++ },
++ "capabilities": {
++ "type": "object",
++ "properties": {
++ "tools": {
++ "type": "boolean"
},
-- {
-- "type": "null"
++ "json": {
++ "type": "boolean"
++ },
++ "vision": {
++ "type": "boolean"
++ },
++ "stream": {
++ "type": "boolean"
++ }
++ }
++ },
++ "modalities": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "enum": [
++ "text",
++ "image",
++ "audio",
++ "video"
++ ]
++ },
++ "description": "Input/output modalities the model supports."
++ },
++ "retail_rate": {
++ "type": "object",
++ "description": "Customer retail price, immutable rate version and nano-USD per-million-token component rates.",
++ "properties": {
++ "version": {
++ "type": "string"
++ },
++ "input_nano_usd_per_m": {
++ "$ref": "#/$defs/money-nano-usd"
++ },
++ "cached_read_nano_usd_per_m": {
++ "$ref": "#/$defs/money-nano-usd"
++ },
++ "cache_write_nano_usd_per_m": {
++ "$ref": "#/$defs/money-nano-usd"
++ },
++ "output_nano_usd_per_m": {
++ "$ref": "#/$defs/money-nano-usd"
++ },
++ "per_request_nano_usd": {
++ "$ref": "#/$defs/money-nano-usd"
}
++ }
++ },
++ "availability": {
++ "type": "string",
++ "enum": [
++ "available",
++ "limited",
++ "unavailable",
++ "deprecated"
],
-- "description": "What actually answered: the model and its source, and the machine when one did; null for a run outside a task."
++ "description": "Whether the model can be chosen for new requests."
++ },
++ "metadata": {
++ "type": "object"
++ },
++ "created_at": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "updated_at": {
++ "type": [
++ "string",
++ "null"
++ ]
}
}
}
},
-- "ai.run-error": {
++ "ai.model-artifact": {
"version": "1.0.0",
"owner": "ai",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/run-error.v1.json",
-- "title": "AiRunError",
-- "description": "ai.run-error@1: safe, actionable words for an AI or Actor run. Raw provider responses are never display text. The code map is shared across products.",
++ "$id": "https://openvibe.network/contracts/ai/model-artifact.v1.json",
++ "title": "AiModelArtifact",
++ "description": "ai.model-artifact@1: one pinned revision/variant/quantization of a model family. Identified by an exact id (`<org>/<model>[:<quant>]@<revision>`), with its weight SHA-256, tokenizer revision, license and provenance.",
"type": "object",
-- "additionalProperties": false,
"required": [
-- "code",
-- "words",
-- "next",
-- "action"
++ "id",
++ "family",
++ "variant",
++ "quant",
++ "revision",
++ "sha256",
++ "license"
],
++ "additionalProperties": false,
"properties": {
-- "code": {
++ "id": {
"type": "string",
-- "maxLength": 80
++ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?@[a-zA-Z0-9._-]+$",
++ "maxLength": 256,
++ "description": "Exact artifact id: `<org>/<model>[:<quant>]@<revision>`."
},
-- "words": {
++ "family": {
"type": "string",
-- "maxLength": 240
++ "description": "Underlying model family, e.g. `qwen3`."
},
-- "next": {
++ "variant": {
"type": "string",
-- "maxLength": 240
-- },
-- "action": {
"enum": [
-- "pick_model",
-- "add_key",
-- "retry",
-- "retry_later",
-- "open"
-- ]
++ "original",
++ "abliterated",
++ "finetuned",
++ "merged",
++ "lora"
++ ],
++ "description": "How the weights were produced."
},
-- "retry_at": {
++ "quant": {
++ "type": "string",
++ "description": "Quantization label, e.g. `q4_k_m` or `fp16`."
++ },
++ "revision": {
++ "type": "string",
++ "description": "Artifact revision or commit hash."
++ },
++ "sha256": {
++ "type": "string",
++ "pattern": "^[a-f0-9]{64}$",
++ "description": "SHA-256 of the weight file or signed manifest."
++ },
++ "tokenizer_revision": {
"type": [
"string",
"null"
],
++ "description": "Tokenizer/chat-template revision used with this artifact."
++ },
++ "license": {
++ "type": "string",
++ "description": "SPDX license identifier or custom license name."
++ },
++ "source_url": {
++ "type": "string",
++ "format": "uri",
++ "description": "Canonical download or provenance URL."
++ },
++ "context": {
++ "type": "integer",
++ "minimum": 1,
++ "description": "Maximum context length in tokens."
++ },
++ "created_at": {
++ "type": "string",
"format": "date-time"
}
}
}
},
-- "ai.call.recorded": {
++ "ai.inference-deployment": {
"version": "1.0.0",
"owner": "ai",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/events/payloads/ai.call.recorded.v1.json",
-- "title": "AiCallRecordedPayload",
-- "description": "ai.call.recorded v1 (plan L40, one AI meter across the network). One AI call, wherever it happened: OpenVibe.AI's own runs, a harness turn in Codes, an Actor task, Vibe, a local model on a person's own machine. who and where: subject (the person, or null when the call is anonymous), attribution (the site or app the call came from, free text such as 'site:design'), surface (the product surface, free text such as 'design.generate' or 'codes.turn'). what ran: system (ai, harness:claude-code, harness:codex, actor, node), provider, model, effort. who paid: paid_by (own_key, openvibe_key, plan, own_machine, free_tier, network_allowance, org_key) and paid_by_detail (for example 'anthropic ...a1b2' for a person's own key, or 'claude-max' for a plan). tokens: input (the UNCACHED input tokens), output, reasoning, cache_read, cache_write (with cache_write_ttl 5m or 1h), images, audio_seconds, video_seconds. money, in USD: list_cost_usd (what the tokens cost at the human-typed list prices), charged_usd (what the payer was actually charged), fee_usd (the network's fee on top), cache_saved_usd (what the cache saved against the plain input price). price_source says where the prices came from ('models', 'pricing', 'flat', or 'no cache price' when no cache price is typed and the cache tokens are priced at the input price), price_date the day the price was checked. how it went: latency_ms, ttft_ms, attempts, outcome. ids: run_id or turn_id, and at. The record carries NO prompt and NO answer text, ever. A ledger (OpenVibe.AI) rolls the records up; a record consumed twice is stored once (idempotent by system and run_id or turn_id). Envelope: subject { type: run, id: <run_id> } or { type: user, id: <subject> }, visibility internal, priority low, actor service:ai.",
++ "$id": "https://openvibe.network/contracts/ai/inference-deployment.v1.json",
++ "title": "AiInferenceDeployment",
++ "description": "ai.inference-deployment@1: a loaded inference deployment for a pinned artifact. Describes where it runs, its trust tier, commercial rights, health, limits and the rate card that prices its supply cost.",
"type": "object",
"required": [
-- "system",
-- "surface",
-- "paid_by",
-- "input",
-- "output",
-- "reasoning",
-- "cache_read",
-- "cache_write",
-- "cache_write_ttl",
-- "images",
-- "audio_seconds",
-- "video_seconds",
-- "list_cost_usd",
-- "charged_usd",
-- "fee_usd",
-- "cache_saved_usd",
-- "price_source",
-- "price_date",
-- "latency_ms",
-- "ttft_ms",
-- "attempts",
-- "outcome",
-- "at"
++ "id",
++ "artifact_id",
++ "region",
++ "status"
],
"additionalProperties": false,
"properties": {
-- "subject": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "maxLength": 128,
-- "description": "The person the call was made for, or null when the call was anonymous."
-- },
-- "attribution": {
++ "id": {
"type": "string",
-- "maxLength": 200,
-- "description": "The site or app the call came from, as '<type>:<id>' (for example 'site:design'), empty when nothing is known."
++ "maxLength": 256,
++ "description": "Deployment id, unique within OpenVibe.AI."
},
-- "surface": {
++ "artifact_id": {
"type": "string",
-- "maxLength": 200,
-- "description": "The product surface: 'design.generate', 'codes.turn', 'ai.generate'. Free text, so a new surface needs no new contract."
++ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?@[a-zA-Z0-9._-]+$",
++ "maxLength": 256,
++ "description": "Exact artifact id this deployment loads."
},
-- "system": {
++ "region": {
"type": "string",
-- "maxLength": 100,
-- "description": "What ran: 'ai', 'harness:claude-code', 'harness:codex', 'actor', 'node'."
++ "description": "Deployment region or residency label."
},
-- "provider": {
-- "type": [
-- "string",
-- "null"
++ "trust_tier": {
++ "type": "string",
++ "enum": [
++ "first_party",
++ "owner_node",
++ "approved_wholesale",
++ "unverified"
],
-- "maxLength": 128
++ "description": "Who operates the deployment and what data may reach it."
},
-- "model": {
++ "operator": {
++ "type": "string",
++ "description": "Operator slug or `owner:<subject_id>` for a private machine."
++ },
++ "host": {
"type": [
"string",
"null"
],
-- "maxLength": 200
++ "description": "Internal host identifier; never exposed to untrusted callers."
},
-- "effort": {
++ "endpoint": {
"type": [
"string",
"null"
],
-- "maxLength": 64,
-- "description": "The reasoning effort the call asked for, when it asked for one."
++ "format": "uri",
++ "description": "Service endpoint for this deployment (internal or partner)."
},
-- "paid_by": {
++ "status": {
"type": "string",
"enum": [
-- "own_key",
-- "openvibe_key",
-- "plan",
-- "own_machine",
-- "free_tier",
-- "network_allowance",
-- "org_key"
-- ]
++ "warming",
++ "ready",
++ "full",
++ "degraded",
++ "offline"
++ ],
++ "description": "Current load/health state."
},
-- "paid_by_detail": {
++ "loaded_at": {
"type": [
"string",
"null"
],
-- "maxLength": 200,
-- "description": "Which key or plan paid, for example 'anthropic ...a1b2' or 'claude-max'. Never a whole secret."
-- },
-- "input": {
-- "type": "integer",
-- "minimum": 0,
-- "description": "The uncached input tokens. Cache reads and cache writes are counted on their own fields."
-- },
-- "output": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "reasoning": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cache_read": {
-- "type": "integer",
-- "minimum": 0
++ "format": "date-time"
},
-- "cache_write": {
-- "type": "integer",
-- "minimum": 0
++ "limits": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "max_concurrency": {
++ "type": "integer",
++ "minimum": 1
++ },
++ "context_tokens": {
++ "type": "integer",
++ "minimum": 1
++ },
++ "max_output_tokens": {
++ "type": "integer",
++ "minimum": 1
++ }
++ }
},
-- "cache_write_ttl": {
++ "supply_rate_card_id": {
"type": [
"string",
"null"
],
++ "description": "Reference to the supply rate card (platform.rate-card@1) that prices this deployment."
++ },
++ "provider_access": {
++ "type": "string",
"enum": [
-- "5m",
-- "1h",
-- null
-- ],
-- "description": "How long the written cache entry lives, when the provider says."
-- },
-- "images": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "audio_seconds": {
-- "type": "number",
-- "minimum": 0
-- },
-- "video_seconds": {
-- "type": "number",
-- "minimum": 0
-- },
-- "list_cost_usd": {
-- "type": "number",
-- "minimum": 0,
-- "description": "What the tokens cost at the human-typed list prices."
-- },
-- "charged_usd": {
-- "type": "number",
-- "minimum": 0,
-- "description": "What the payer was actually charged. A person's own key is never charged here: 0."
-- },
-- "fee_usd": {
-- "type": "number",
-- "minimum": 0,
-- "description": "The network's fee on top of the cost, when the OpenVibe key paid."
-- },
-- "cache_saved_usd": {
-- "type": "number",
-- "minimum": 0,
-- "description": "What the cached tokens saved against the plain input price."
-- },
-- "price_source": {
-- "type": "string",
-- "maxLength": 64,
-- "description": "Where the prices came from: 'models' (a person's typed model row), 'pricing' (AI_PRICING_JSON), 'flat' (the flat rates), 'no cache price' (no cache price is typed, so the cache tokens are priced at the input price)."
-- },
-- "price_date": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
-- "description": "The day the price was checked, when it was."
-- },
-- "latency_ms": {
-- "type": [
-- "integer",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "ttft_ms": {
-- "type": [
-- "integer",
-- "null"
++ "OWN_DEPLOYMENT",
++ "AUTHORIZED_WHOLESALE",
++ "CUSTOMER_BYOK",
++ "RESTRICTED",
++ "UNVERIFIED"
],
-- "minimum": 0,
-- "description": "Time to the first token, when the call streamed and it was measured."
-- },
-- "attempts": {
-- "type": "integer",
-- "minimum": 0
++ "description": "Commercial eligibility for paid managed routes."
},
-- "outcome": {
++ "commercial_rights": {
"type": "string",
"enum": [
-- "succeeded",
-- "failed",
-- "cancelled",
-- "cached"
-- ]
-- },
-- "run_id": {
-- "type": [
-- "string",
-- "null"
++ "OWN_DEPLOYMENT",
++ "AUTHORIZED_WHOLESALE",
++ "CUSTOMER_BYOK",
++ "RESTRICTED",
++ "UNVERIFIED"
],
-- "maxLength": 100
++ "description": "Resale authority recorded for this deployment."
},
-- "turn_id": {
++ "privacy_policy": {
"type": [
"string",
"null"
],
-- "maxLength": 100
++ "description": "Retention/zero-retention policy label."
},
-- "at": {
++ "health": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "healthy": {
++ "type": "boolean"
++ },
++ "last_check_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "reason": {
++ "type": [
++ "string",
++ "null"
++ ]
++ }
++ }
++ },
++ "updated_at": {
"type": "string",
"format": "date-time"
}
}
}
},
-- "ai.run.queued": {
++ "ai.route-explain": {
"version": "1.0.0",
"owner": "ai",
-- "status": "planned",
++ "status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/events/payloads/ai.run.queued.v1.json",
-- "title": "AiRunQueuedPayload",
-- "description": "ai.run.queued v1 (OpenVibe.AI server/runs.js create). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run was stored queued (it then runs inline within ?wait or on the worker). Not published for a cache hit (ai.run.cached) or a create refused by quota or a full queue. A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority low, actor service:ai.",
++ "$id": "https://openvibe.network/contracts/ai/route-explain.v1.json",
++ "title": "AiRouteExplain",
++ "description": "ai.route-explain@1: why OpenVibe.AI chose a model/deployment for a request. Lists the chosen candidate, rejected candidates with reasons, the objective (policy), the pre-flight cost estimate and the final actual cost. Money fields are integer nano-USD, as strings.",
"type": "object",
"required": [
-- "run_id",
-- "status",
-- "workflow",
-- "requester",
-- "on_behalf_of",
-- "target",
-- "attribution",
-- "provider",
-- "model",
-- "fallback_used",
-- "synthetic",
-- "cached_from",
-- "usage",
-- "error",
-- "citations_count",
-- "retry_of",
-- "created_at",
-- "finished_at"
++ "chosen",
++ "rejected",
++ "objective",
++ "estimate"
],
"additionalProperties": false,
++ "$defs": {
++ "money-nano-usd": {
++ "type": "string",
++ "pattern": "^[0-9]{1,19}$",
++ "description": "Integer nano-USD (1e-9 USD), stored as a string."
++ }
++ },
"properties": {
-- "run_id": {
++ "chosen": {
"type": "string",
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ "description": "Exact id of the model/deployment that answered."
},
-- "status": {
-- "const": "queued"
++ "rejected": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "required": [
++ "id",
++ "reason"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "id": {
++ "type": "string",
++ "description": "Exact id of the rejected candidate."
++ },
++ "reason": {
++ "type": "string",
++ "description": "Human-readable exclusion reason, without secrets or internal host IPs."
++ }
++ }
++ }
},
-- "workflow": {
++ "objective": {
++ "type": "string",
++ "enum": [
++ "cheapest",
++ "balanced",
++ "fastest",
++ "best",
++ "private",
++ "exact"
++ ],
++ "description": "Routing policy used for this request."
++ },
++ "estimate": {
"type": "object",
"required": [
-- "key",
-- "version"
++ "charge_nano_usd"
],
"additionalProperties": false,
"properties": {
-- "key": {
-- "type": "string"
++ "charge_nano_usd": {
++ "$ref": "#/$defs/money-nano-usd"
},
-- "version": {
++ "input_tokens": {
"type": "integer",
-- "minimum": 1
-- }
-- }
-- },
-- "requester": {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- "on_behalf_of": {
-- "anyOf": [
-- {
-- "$ref": "../../identity/subject-ref.v1.json"
++ "minimum": 0
},
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "target": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
++ "cached_read_tokens": {
++ "type": "integer",
++ "minimum": 0
},
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "attribution": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
++ "cache_write_tokens": {
++ "type": "integer",
++ "minimum": 0
},
-- {
-- "type": "null"
++ "output_tokens": {
++ "type": "integer",
++ "minimum": 0
}
-- ]
-- },
-- "provider": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Provider that produced the output; null before a provider call and for cached runs."
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "fallback_used": {
-- "type": "boolean"
-- },
-- "synthetic": {
-- "type": "boolean",
-- "description": "Stub provider output."
-- },
-- "cached_from": {
-- "type": "null"
++ }
},
-- "usage": {
++ "actual": {
"type": "object",
-- "required": [
-- "tokens_in",
-- "tokens_out",
-- "cost_usd",
-- "attempts"
-- ],
"additionalProperties": false,
"properties": {
-- "tokens_in": {
++ "charge_nano_usd": {
++ "$ref": "#/$defs/money-nano-usd"
++ },
++ "input_tokens": {
"type": "integer",
"minimum": 0
},
-- "tokens_out": {
++ "cached_read_tokens": {
"type": "integer",
"minimum": 0
},
-- "cost_usd": {
-- "type": "number",
++ "cache_write_tokens": {
++ "type": "integer",
"minimum": 0
},
-- "attempts": {
++ "output_tokens": {
"type": "integer",
"minimum": 0
}
}
},
-- "error": {
-- "type": "null"
-- },
-- "citations_count": {
-- "type": "integer",
-- "minimum": 0
++ "policy": {
++ "type": "string",
++ "description": "Name of the policy/profile that produced the choice."
},
-- "retry_of": {
++ "fallback_reason": {
"type": [
"string",
"null"
],
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
-- },
-- "finished_at": {
-- "type": "null"
++ "description": "If the first choice could not be used, why the chosen deployment was selected instead."
}
}
}
},
-- "ai.run.succeeded": {
++ "ai.model-list": {
"version": "1.0.0",
"owner": "ai",
-- "status": "planned",
++ "status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/events/payloads/ai.run.succeeded.v1.json",
-- "title": "AiRunSucceededPayload",
-- "description": "ai.run.succeeded v1 (OpenVibe.AI server/runs.js execute). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run finished with output that matched the workflow output schema. The output itself is not in the event: a consumer that needs it reads GET /api/v1/runs/:id with ai.run.read (own runs only). A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority important, actor service:ai.",
++ "$id": "https://openvibe.network/contracts/ai/model-list.v1.json",
++ "title": "AiModelList",
++ "description": "ai.model-list@1: paginated list of model catalog entries returned by GET /v1/models.",
"type": "object",
"required": [
-- "run_id",
-- "status",
-- "workflow",
-- "requester",
-- "on_behalf_of",
-- "target",
-- "attribution",
-- "provider",
-- "model",
-- "fallback_used",
-- "synthetic",
-- "cached_from",
-- "usage",
-- "error",
-- "citations_count",
-- "retry_of",
-- "created_at",
-- "finished_at"
++ "models",
++ "count"
],
"additionalProperties": false,
"properties": {
-- "run_id": {
-- "type": "string",
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "status": {
-- "const": "succeeded"
-- },
-- "workflow": {
-- "type": "object",
-- "required": [
-- "key",
-- "version"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "key": {
-- "type": "string"
-- },
-- "version": {
-- "type": "integer",
-- "minimum": 1
-- }
-- }
-- },
-- "requester": {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- "on_behalf_of": {
-- "anyOf": [
-- {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "target": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "attribution": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "provider": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Provider that produced the output; null before a provider call and for cached runs."
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "fallback_used": {
-- "type": "boolean"
-- },
-- "synthetic": {
-- "type": "boolean",
-- "description": "Stub provider output."
-- },
-- "cached_from": {
-- "type": "null"
-- },
-- "usage": {
-- "type": "object",
-- "required": [
-- "tokens_in",
-- "tokens_out",
-- "cost_usd",
-- "attempts"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "tokens_in": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "tokens_out": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cost_usd": {
-- "type": "number",
-- "minimum": 0
-- },
-- "attempts": {
-- "type": "integer",
-- "minimum": 0
-- }
++ "models": {
++ "type": "array",
++ "items": {
++ "$ref": "model.v1.json"
}
},
-- "error": {
-- "type": "null"
-- },
-- "citations_count": {
++ "count": {
"type": "integer",
-- "minimum": 0
++ "minimum": 0,
++ "description": "Number of models in this response."
},
-- "retry_of": {
++ "cursor": {
"type": [
"string",
"null"
],
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
-- },
-- "finished_at": {
-- "type": "string",
-- "format": "date-time"
++ "description": "Opaque cursor for the next page."
}
}
}
},
-- "ai.run.failed": {
++ "ai.model-read-result": {
"version": "1.0.0",
"owner": "ai",
-- "status": "planned",
++ "status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/events/payloads/ai.run.failed.v1.json",
-- "title": "AiRunFailedPayload",
-- "description": "ai.run.failed v1 (OpenVibe.AI server/runs.js execute / recoverInterrupted). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A run ended failed: a provider, route, source or output error, run.internal, or run.interrupted after a restart or shutdown (retryable with POST /api/v1/runs/:id/retry unless its input was not retained). A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority important, actor service:ai.",
++ "$id": "https://openvibe.network/contracts/ai/model-read-result.v1.json",
++ "title": "AiModelReadResult",
++ "description": "ai.model-read-result@1: response from GET /v1/models (a list) or GET /v1/models/:id (a single model).",
"type": "object",
-- "required": [
-- "run_id",
-- "status",
-- "workflow",
-- "requester",
-- "on_behalf_of",
-- "target",
-- "attribution",
-- "provider",
-- "model",
-- "fallback_used",
-- "synthetic",
-- "cached_from",
-- "usage",
-- "error",
-- "citations_count",
-- "retry_of",
-- "created_at",
-- "finished_at"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "run_id": {
-- "type": "string",
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "status": {
-- "const": "failed"
-- },
-- "workflow": {
-- "type": "object",
-- "required": [
-- "key",
-- "version"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "key": {
-- "type": "string"
-- },
-- "version": {
-- "type": "integer",
-- "minimum": 1
-- }
-- }
-- },
-- "requester": {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- "on_behalf_of": {
-- "anyOf": [
-- {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "target": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "attribution": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "provider": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Provider that produced the output; null before a provider call and for cached runs."
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "fallback_used": {
-- "type": "boolean"
-- },
-- "synthetic": {
-- "type": "boolean",
-- "description": "Stub provider output."
-- },
-- "cached_from": {
-- "type": "null"
-- },
-- "usage": {
-- "type": "object",
-- "required": [
-- "tokens_in",
-- "tokens_out",
-- "cost_usd",
-- "attempts"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "tokens_in": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "tokens_out": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cost_usd": {
-- "type": "number",
-- "minimum": 0
-- },
-- "attempts": {
-- "type": "integer",
-- "minimum": 0
-- }
-- }
-- },
-- "error": {
-- "type": "object",
-- "required": [
-- "code",
-- "detail"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "code": {
-- "type": "string",
-- "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$"
-- },
-- "detail": {
-- "type": [
-- "string",
-- "null"
-- ]
-- }
-- }
-- },
-- "citations_count": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "retry_of": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
-- },
-- "finished_at": {
-- "type": "string",
-- "format": "date-time"
-- }
-- }
-- }
-- },
-- "ai.run.cached": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "planned",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/events/payloads/ai.run.cached.v1.json",
-- "title": "AiRunCachedPayload",
-- "description": "ai.run.cached v1 (OpenVibe.AI server/runs.js create). PLANNED: AI does not publish run events yet (its manifest notes list ai.run.queued|succeeded|failed|cached once the Events client is wired in); this is the shape it is to send. A create was served from the scoped cache: no provider call, cached_from names the run whose output was reused. A projection of ai.run@1 without input or output (ADR-015: request metadata, never raw prompts). requester is the token principal that created the run (service, app or mod). Envelope: subject { type: run, id: <run_id> }, visibility internal, priority low, actor service:ai.",
-- "type": "object",
-- "required": [
-- "run_id",
-- "status",
-- "workflow",
-- "requester",
-- "on_behalf_of",
-- "target",
-- "attribution",
-- "provider",
-- "model",
-- "fallback_used",
-- "synthetic",
-- "cached_from",
-- "usage",
-- "error",
-- "citations_count",
-- "retry_of",
-- "created_at",
-- "finished_at"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "run_id": {
-- "type": "string",
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "status": {
-- "const": "cached"
-- },
-- "workflow": {
-- "type": "object",
-- "required": [
-- "key",
-- "version"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "key": {
-- "type": "string"
-- },
-- "version": {
-- "type": "integer",
-- "minimum": 1
-- }
-- }
-- },
-- "requester": {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- "on_behalf_of": {
-- "anyOf": [
-- {
-- "$ref": "../../identity/subject-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "target": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "attribution": {
-- "anyOf": [
-- {
-- "$ref": "../../common/entity-ref.v1.json"
-- },
-- {
-- "type": "null"
-- }
-- ]
-- },
-- "provider": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Provider that produced the output; null before a provider call and for cached runs."
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "fallback_used": {
-- "type": "boolean"
-- },
-- "synthetic": {
-- "type": "boolean",
-- "description": "Stub provider output."
-- },
-- "cached_from": {
-- "type": "string",
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "usage": {
-- "type": "object",
-- "required": [
-- "tokens_in",
-- "tokens_out",
-- "cost_usd",
-- "attempts"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "tokens_in": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "tokens_out": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cost_usd": {
-- "type": "number",
-- "minimum": 0
-- },
-- "attempts": {
-- "type": "integer",
-- "minimum": 0
-- }
-- }
-- },
-- "error": {
-- "type": "null"
-- },
-- "citations_count": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "retry_of": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
++ "anyOf": [
++ {
++ "$ref": "model-list.v1.json"
},
-- "finished_at": {
-- "type": "string",
-- "format": "date-time"
++ {
++ "$ref": "model.v1.json"
}
-- }
++ ]
}
},
-- "ai.definition-version-request": {
++ "ai.provider-manage-request": {
"version": "1.0.0",
"owner": "ai",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/definition-version-request.v1.json",
-- "title": "AiDefinitionVersionRequest",
-- "description": "ai.definition-version-request@1: bodies of ai.workflow.manage on OpenVibe.AI. An edit is always a new version (the previous one stays readable); fields left out are taken from the newest existing version. POST /api/v1/templates/:key/versions: a prompt template (input_schema and output_schema must compile as JSON Schema; visibility public, first-party or internal). POST /api/v1/workflows/:key/versions (key <namespace>.<name>): steps (at least one; kind llm (naming an existing template), passthrough, transcribe or embed), schemas, default route, cache mode. POST /api/v1/routes/:key/versions: primary { provider, model } and fallbacks (every provider must exist), or alias_of another route. POST …/:key/versions/:version/status: { status } (templates and workflows draft|active|deprecated|archived; routes active|disabled). Refusals are 422 ai.invalid.",
++ "$id": "https://openvibe.network/contracts/ai/provider-manage-request.v1.json",
++ "title": "AiProviderManageRequest",
++ "description": "ai.provider-manage-request@1: bodies of ai.provider.manage on OpenVibe.AI. POST /api/v1/providers creates or replaces a provider (key required) and PATCH /api/v1/providers/:key changes one (fields left out keep their value); a body carrying api_key or secret is refused (422: send secret_ref env:NAME, never a secret value). POST /api/v1/models (provider_key and model_key required) and PATCH /api/v1/models/:provider/:model upsert a model. POST /api/v1/quotas upserts a quota (scope_type and window required; scope_id too unless global; the same scope, window and workflow_prefix is one quota). POST /api/v1/providers/:key/disable|enable|reset and DELETE /api/v1/cache[?workflow=] take no body. Unknown fields are ignored.",
"anyOf": [
{
"type": "object",
++ "not": {
++ "anyOf": [
++ {
++ "required": [
++ "api_key"
++ ]
++ },
++ {
++ "required": [
++ "secret"
++ ]
++ }
++ ]
++ },
"properties": {
-- "name": {
++ "key": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$"
++ },
++ "display_name": {
"type": "string"
},
-- "description": {
-- "type": [
-- "string",
-- "null"
++ "kind": {
++ "enum": [
++ "stub",
++ "openai",
++ "anthropic",
++ "http",
++ "whisper"
]
},
-- "input_schema": {
-- "type": "object",
-- "description": "A JSON Schema the run input must match."
++ "status": {
++ "enum": [
++ "active",
++ "disabled"
++ ]
},
-- "output_schema": {
-- "type": "object",
-- "description": "A JSON Schema the output must match."
++ "base_url": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^https?://\\S+$"
},
-- "system_prompt": {
-- "type": "string"
++ "auth_mode": {
++ "enum": [
++ "none",
++ "bearer",
++ "x-api-key"
++ ]
},
-- "user_prompt": {
-- "type": "string"
++ "secret_ref": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^(env:[A-Z][A-Z0-9_]{0,63})?$"
},
-- "default_route": {
++ "default_model": {
"type": [
"string",
"null"
]
},
-- "owner": {
-- "type": "string"
++ "capabilities": {
++ "type": "array",
++ "items": {
++ "enum": [
++ "chat",
++ "generate",
++ "summarize",
++ "classify",
++ "extract",
++ "enrich",
++ "embed",
++ "vision",
++ "json",
++ "transcribe"
++ ]
++ }
},
-- "visibility": {
-- "enum": [
-- "public",
-- "first-party",
-- "internal"
-- ]
++ "timeout_ms": {
++ "type": [
++ "integer",
++ "string"
++ ],
++ "description": "Clamped to 1000..600000."
},
-- "status": {
-- "enum": [
-- "draft",
-- "active",
-- "deprecated",
-- "archived"
++ "priority": {
++ "type": [
++ "number",
++ "string"
]
},
"metadata": {
@@@ -18812,143 +19037,140 @@
{
"type": "object",
"properties": {
-- "name": {
++ "provider_key": {
"type": "string"
},
-- "description": {
-- "type": [
-- "string",
-- "null"
-- ]
++ "model_key": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 200
},
-- "namespace": {
++ "display_name": {
"type": "string"
},
-- "input_schema": {
-- "type": "object",
-- "description": "A JSON Schema."
-- },
-- "output_schema": {
-- "type": "object",
-- "description": "A JSON Schema."
-- },
-- "steps": {
-- "type": "array",
-- "minItems": 1,
-- "items": {
-- "type": "object",
-- "required": [
-- "kind"
-- ],
-- "properties": {
-- "kind": {
-- "enum": [
-- "llm",
-- "passthrough",
-- "transcribe",
-- "embed"
-- ]
-- },
-- "template": {
-- "type": "string"
-- }
-- }
-- }
-- },
-- "default_route": {
-- "type": [
-- "string",
-- "null"
++ "type": {
++ "enum": [
++ "chat",
++ "vision",
++ "embedding",
++ "stt"
]
},
-- "cache_mode": {
++ "status": {
"enum": [
-- "none",
-- "private",
-- "service"
++ "active",
++ "disabled"
]
},
-- "cache_ttl_sec": {
++ "context_window": {
"type": [
"integer",
"null"
]
},
-- "status": {
-- "enum": [
-- "draft",
-- "active",
-- "deprecated",
-- "archived"
++ "max_output": {
++ "type": [
++ "integer",
++ "null"
]
},
-- "metadata": {
-- "type": "object"
-- }
-- }
-- },
-- {
-- "type": "object",
-- "properties": {
-- "primary": {
++ "cost": {
"type": "object",
-- "required": [
-- "provider"
-- ],
"properties": {
-- "provider": {
-- "type": "string"
++ "in_per_mtok": {
++ "type": [
++ "number",
++ "null"
++ ]
},
-- "model": {
++ "out_per_mtok": {
"type": [
-- "string",
++ "number",
++ "null"
++ ]
++ },
++ "cached_per_mtok": {
++ "type": [
++ "number",
"null"
]
}
}
},
-- "fallbacks": {
-- "type": "array",
-- "items": {
-- "type": "object",
-- "required": [
-- "provider"
-- ],
-- "properties": {
-- "provider": {
-- "type": "string"
-- },
-- "model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- }
++ "supports": {
++ "type": "object",
++ "properties": {
++ "json": {
++ "type": "boolean"
++ },
++ "tools": {
++ "type": "boolean"
++ },
++ "streaming": {
++ "type": "boolean"
++ },
++ "vision": {
++ "type": "boolean"
}
}
},
-- "options": {
++ "metadata": {
"type": "object"
-- },
-- "max_output_tokens": {
-- "type": [
-- "integer",
-- "null"
++ }
++ }
++ },
++ {
++ "type": "object",
++ "required": [
++ "scope_type",
++ "window"
++ ],
++ "properties": {
++ "scope_type": {
++ "enum": [
++ "global",
++ "service",
++ "actor",
++ "attribution"
]
},
-- "response_format": {
++ "scope_id": {
++ "type": "string",
++ "maxLength": 200,
++ "description": "* on a non-global scope = each one separately."
++ },
++ "window": {
"enum": [
-- "text",
-- "json"
++ "minute",
++ "hour",
++ "day"
]
},
-- "timeout_ms": {
++ "max_requests": {
"type": [
-- "integer",
++ "number",
++ "string",
"null"
-- ]
++ ],
++ "minimum": 0
},
-- "alias_of": {
++ "max_tokens": {
++ "type": [
++ "number",
++ "string",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "max_cost_usd": {
++ "type": [
++ "number",
++ "string",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "workflow_prefix": {
"type": [
"string",
"null"
@@@ -18961,71 +19183,58 @@
]
}
}
++ },
++ {
++ "$ref": "../common/no-body.v1.json"
}
]
}
},
-- "ai.definition-version-result": {
++ "ai.provider-manage-result": {
"version": "1.0.0",
"owner": "ai",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/definition-version-result.v1.json",
-- "title": "AiDefinitionVersionResult",
-- "description": "ai.definition-version-result@1: answers of ai.workflow.manage on OpenVibe.AI. POST …/:key/versions → 201 { template | workflow | route } (the new version, whole: prompts and schemas for a template, steps for a workflow, primary/fallbacks for a route); POST …/versions/:version/status → { template | workflow | route: { key, version, status } }.",
++ "$id": "https://openvibe.network/contracts/ai/provider-manage-result.v1.json",
++ "title": "AiProviderManageResult",
++ "description": "ai.provider-manage-result@1: answers of ai.provider.manage on OpenVibe.AI. Provider create/update/disable/enable → { provider } (201 on POST); POST …/reset → { health } (the circuit breaker, closed again); model upserts → { model }; POST /api/v1/quotas → 201 { quota } (the stored row); DELETE /api/v1/cache → { removed } (entries purged). Every change is audited.",
"anyOf": [
{
"type": "object",
"required": [
-- "template"
++ "provider"
],
"properties": {
-- "template": {
-- "type": "object",
-- "required": [
-- "key",
-- "version",
-- "status"
-- ],
-- "properties": {
-- "key": {
-- "type": "string"
-- },
-- "version": {
-- "type": "integer",
-- "minimum": 1
-- },
-- "status": {
-- "type": "string"
-- }
-- }
++ "provider": {
++ "$ref": "provider.v1.json"
}
}
},
{
"type": "object",
"required": [
-- "workflow"
++ "health"
],
"properties": {
-- "workflow": {
++ "health": {
"type": "object",
"required": [
-- "key",
-- "version",
-- "status"
++ "state"
],
"properties": {
-- "key": {
++ "provider_key": {
"type": "string"
},
-- "version": {
-- "type": "integer",
-- "minimum": 1
++ "state": {
++ "enum": [
++ "closed",
++ "open",
++ "half_open"
++ ]
},
-- "status": {
-- "type": "string"
++ "consecutive_failures": {
++ "type": "integer"
}
}
}
@@@ -19034,23 +19243,65 @@
{
"type": "object",
"required": [
-- "route"
++ "model"
],
"properties": {
-- "route": {
++ "model": {
++ "$ref": "model.v1.json"
++ }
++ }
++ },
++ {
++ "type": "object",
++ "required": [
++ "quota"
++ ],
++ "properties": {
++ "quota": {
"type": "object",
"required": [
-- "key",
-- "version",
++ "id",
++ "scope_type",
++ "scope_id",
++ "window",
"status"
],
"properties": {
-- "key": {
++ "id": {
++ "type": "integer"
++ },
++ "scope_type": {
"type": "string"
},
-- "version": {
-- "type": "integer",
-- "minimum": 1
++ "scope_id": {
++ "type": "string"
++ },
++ "window": {
++ "type": "string"
++ },
++ "max_requests": {
++ "type": [
++ "number",
++ "null"
++ ]
++ },
++ "max_tokens": {
++ "type": [
++ "number",
++ "null"
++ ]
++ },
++ "max_cost_usd": {
++ "type": [
++ "number",
++ "null"
++ ]
++ },
++ "workflow_prefix": {
++ "type": [
++ "string",
++ "null"
++ ]
},
"status": {
"type": "string"
@@@ -19058,42 +19309,44 @@
}
}
}
++ },
++ {
++ "type": "object",
++ "required": [
++ "removed"
++ ],
++ "properties": {
++ "removed": {
++ "type": "integer",
++ "minimum": 0
++ }
++ }
}
]
}
},
-- "ai.model": {
-- "version": "1.1.0",
++ "ai.provider": {
++ "version": "1.0.0",
"owner": "ai",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/model.v1.json",
-- "title": "AiModel",
-- "description": "ai.model@1: a catalog entry for one model in OpenVibe.AI's registry. The legacy provider/model fields stay for existing readers; new catalog fields (id, family, variant, quant, revision, sha256, license, context, capabilities, modalities, retail rate and availability) are optional so older documents remain valid. Exact ids follow `<org>/<model>[:<quant>]@<revision>`; dynamic aliases such as `openvibe/auto` may be enumerated in `aliases`. Money fields are integer nano-USD per million tokens, as strings.",
++ "$id": "https://openvibe.network/contracts/ai/provider.v1.json",
++ "title": "AiProvider",
++ "description": "ai.provider@1: one model provider as OpenVibe.AI's registry API shows it (server/registry.js publicProvider): never a secret value, only the secret reference name (env:NAME) and whether it resolves (credentials), plus the measured circuit-breaker health. health.state is the provider roll-up; health.circuits is one entry per provider+model offer, with the failure class and the plain reason.",
"type": "object",
"required": [
-- "provider_key",
-- "model_key",
-- "type",
++ "key",
++ "kind",
"status",
-- "cost",
-- "supports"
++ "auth_mode",
++ "capabilities",
++ "credentials"
],
-- "$defs": {
-- "money-nano-usd": {
-- "type": "string",
-- "pattern": "^[0-9]{1,19}$",
-- "description": "Integer nano-USD (1e-9 USD), stored as a string."
-- }
-- },
"properties": {
-- "provider_key": {
-- "type": "string"
-- },
-- "model_key": {
++ "key": {
"type": "string",
-- "maxLength": 200
++ "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$"
},
"display_name": {
"type": [
@@@ -19101,12 +19354,13 @@
"null"
]
},
-- "type": {
++ "kind": {
"enum": [
-- "chat",
-- "vision",
-- "embedding",
-- "stt"
++ "stub",
++ "openai",
++ "anthropic",
++ "http",
++ "whisper"
]
},
"status": {
@@@ -19115,183 +19369,70 @@
"disabled"
]
},
-- "context_window": {
++ "base_url": {
"type": [
-- "integer",
++ "string",
"null"
]
},
-- "max_output": {
-- "type": [
-- "integer",
-- "null"
++ "auth_mode": {
++ "enum": [
++ "none",
++ "bearer",
++ "x-api-key"
]
},
-- "cost": {
-- "type": "object",
-- "properties": {
-- "in_per_mtok": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "out_per_mtok": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "cached_per_mtok": {
-- "type": [
-- "number",
-- "null"
-- ]
-- }
-- }
-- },
-- "supports": {
-- "type": "object",
-- "properties": {
-- "json": {
-- "type": "boolean"
-- },
-- "tools": {
-- "type": "boolean"
-- },
-- "streaming": {
-- "type": "boolean"
-- },
-- "vision": {
-- "type": "boolean"
-- }
-- }
-- },
-- "id": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?@[a-zA-Z0-9._-]+$",
-- "description": "Exact model id: `<org>/<model>[:<quant>]@<revision>`.",
-- "maxLength": 256
-- },
-- "aliases": {
-- "type": "array",
-- "items": {
-- "type": "string",
-- "enum": [
-- "openvibe",
-- "openvibe/auto",
-- "openvibe/economy",
-- "openvibe/balanced",
-- "openvibe/fast",
-- "openvibe/private"
-- ]
-- },
-- "description": "Dynamic policy aliases that resolve to this model."
-- },
-- "family": {
-- "type": "string",
-- "description": "Creator and underlying model family, e.g. `qwen3`."
-- },
-- "variant": {
-- "type": "string",
-- "enum": [
-- "original",
-- "abliterated",
-- "finetuned",
-- "merged",
-- "lora"
++ "secret_ref": {
++ "type": [
++ "string",
++ "null"
],
-- "description": "How the weights were produced."
-- },
-- "quant": {
-- "type": "string",
-- "description": "Quantization label, e.g. `q4_k_m`."
-- },
-- "revision": {
-- "type": "string",
-- "description": "Artifact revision or commit hash."
-- },
-- "sha256": {
-- "type": "string",
-- "pattern": "^[a-f0-9]{64}$",
-- "description": "SHA-256 of the weight file or manifest."
-- },
-- "license": {
-- "type": "string",
-- "description": "SPDX license identifier or custom license name."
++ "description": "env:NAME, a reference; never the secret."
},
-- "context": {
-- "type": "integer",
-- "minimum": 1,
-- "description": "Maximum context length in tokens."
++ "default_model": {
++ "type": [
++ "string",
++ "null"
++ ]
},
"capabilities": {
-- "type": "object",
-- "properties": {
-- "tools": {
-- "type": "boolean"
-- },
-- "json": {
-- "type": "boolean"
-- },
-- "vision": {
-- "type": "boolean"
-- },
-- "stream": {
-- "type": "boolean"
-- }
-- }
-- },
-- "modalities": {
"type": "array",
"items": {
-- "type": "string",
"enum": [
-- "text",
-- "image",
-- "audio",
-- "video"
++ "chat",
++ "generate",
++ "summarize",
++ "classify",
++ "extract",
++ "enrich",
++ "embed",
++ "vision",
++ "json",
++ "transcribe"
]
-- },
-- "description": "Input/output modalities the model supports."
-- },
-- "retail_rate": {
-- "type": "object",
-- "description": "Customer retail price, immutable rate version and nano-USD per-million-token component rates.",
-- "properties": {
-- "version": {
-- "type": "string"
-- },
-- "input_nano_usd_per_m": {
-- "$ref": "#/$defs/money-nano-usd"
-- },
-- "cached_read_nano_usd_per_m": {
-- "$ref": "#/$defs/money-nano-usd"
-- },
-- "cache_write_nano_usd_per_m": {
-- "$ref": "#/$defs/money-nano-usd"
-- },
-- "output_nano_usd_per_m": {
-- "$ref": "#/$defs/money-nano-usd"
-- },
-- "per_request_nano_usd": {
-- "$ref": "#/$defs/money-nano-usd"
-- }
}
},
-- "availability": {
-- "type": "string",
-- "enum": [
-- "available",
-- "limited",
-- "unavailable",
-- "deprecated"
-- ],
-- "description": "Whether the model can be chosen for new requests."
++ "timeout_ms": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "priority": {
++ "type": [
++ "number",
++ "null"
++ ]
},
"metadata": {
"type": "object"
},
++ "origin": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
"created_at": {
"type": [
"string",
@@@ -19303,1047 +19444,90 @@
"string",
"null"
]
-- }
-- }
-- }
-- },
-- "ai.model-artifact": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/model-artifact.v1.json",
-- "title": "AiModelArtifact",
-- "description": "ai.model-artifact@1: one pinned revision/variant/quantization of a model family. Identified by an exact id (`<org>/<model>[:<quant>]@<revision>`), with its weight SHA-256, tokenizer revision, license and provenance.",
-- "type": "object",
-- "required": [
-- "id",
-- "family",
-- "variant",
-- "quant",
-- "revision",
-- "sha256",
-- "license"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "id": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?@[a-zA-Z0-9._-]+$",
-- "maxLength": 256,
-- "description": "Exact artifact id: `<org>/<model>[:<quant>]@<revision>`."
-- },
-- "family": {
-- "type": "string",
-- "description": "Underlying model family, e.g. `qwen3`."
-- },
-- "variant": {
-- "type": "string",
-- "enum": [
-- "original",
-- "abliterated",
-- "finetuned",
-- "merged",
-- "lora"
-- ],
-- "description": "How the weights were produced."
-- },
-- "quant": {
-- "type": "string",
-- "description": "Quantization label, e.g. `q4_k_m` or `fp16`."
-- },
-- "revision": {
-- "type": "string",
-- "description": "Artifact revision or commit hash."
-- },
-- "sha256": {
-- "type": "string",
-- "pattern": "^[a-f0-9]{64}$",
-- "description": "SHA-256 of the weight file or signed manifest."
-- },
-- "tokenizer_revision": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Tokenizer/chat-template revision used with this artifact."
-- },
-- "license": {
-- "type": "string",
-- "description": "SPDX license identifier or custom license name."
-- },
-- "source_url": {
-- "type": "string",
-- "format": "uri",
-- "description": "Canonical download or provenance URL."
-- },
-- "context": {
-- "type": "integer",
-- "minimum": 1,
-- "description": "Maximum context length in tokens."
-- },
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
-- }
-- }
-- }
-- },
-- "ai.inference-deployment": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/inference-deployment.v1.json",
-- "title": "AiInferenceDeployment",
-- "description": "ai.inference-deployment@1: a loaded inference deployment for a pinned artifact. Describes where it runs, its trust tier, commercial rights, health, limits and the rate card that prices its supply cost.",
-- "type": "object",
-- "required": [
-- "id",
-- "artifact_id",
-- "region",
-- "status"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "id": {
-- "type": "string",
-- "maxLength": 256,
-- "description": "Deployment id, unique within OpenVibe.AI."
-- },
-- "artifact_id": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?@[a-zA-Z0-9._-]+$",
-- "maxLength": 256,
-- "description": "Exact artifact id this deployment loads."
-- },
-- "region": {
-- "type": "string",
-- "description": "Deployment region or residency label."
-- },
-- "trust_tier": {
-- "type": "string",
-- "enum": [
-- "first_party",
-- "owner_node",
-- "approved_wholesale",
-- "unverified"
-- ],
-- "description": "Who operates the deployment and what data may reach it."
-- },
-- "operator": {
-- "type": "string",
-- "description": "Operator slug or `owner:<subject_id>` for a private machine."
-- },
-- "host": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Internal host identifier; never exposed to untrusted callers."
-- },
-- "endpoint": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "format": "uri",
-- "description": "Service endpoint for this deployment (internal or partner)."
},
-- "status": {
-- "type": "string",
++ "credentials": {
"enum": [
-- "warming",
-- "ready",
-- "full",
-- "degraded",
-- "offline"
-- ],
-- "description": "Current load/health state."
++ "not_required",
++ "configured",
++ "missing"
++ ]
},
-- "loaded_at": {
++ "health": {
"type": [
-- "string",
++ "object",
"null"
],
-- "format": "date-time"
-- },
-- "limits": {
-- "type": "object",
-- "additionalProperties": false,
"properties": {
-- "max_concurrency": {
-- "type": "integer",
-- "minimum": 1
++ "provider_key": {
++ "type": "string"
},
-- "context_tokens": {
-- "type": "integer",
-- "minimum": 1
++ "state": {
++ "enum": [
++ "closed",
++ "open",
++ "half_open"
++ ]
},
-- "max_output_tokens": {
-- "type": "integer",
-- "minimum": 1
-- }
-- }
-- },
-- "supply_rate_card_id": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Reference to the supply rate card (platform.rate-card@1) that prices this deployment."
-- },
-- "provider_access": {
-- "type": "string",
-- "enum": [
-- "OWN_DEPLOYMENT",
-- "AUTHORIZED_WHOLESALE",
-- "CUSTOMER_BYOK",
-- "RESTRICTED",
-- "UNVERIFIED"
-- ],
-- "description": "Commercial eligibility for paid managed routes."
-- },
-- "commercial_rights": {
-- "type": "string",
-- "enum": [
-- "OWN_DEPLOYMENT",
-- "AUTHORIZED_WHOLESALE",
-- "CUSTOMER_BYOK",
-- "RESTRICTED",
-- "UNVERIFIED"
-- ],
-- "description": "Resale authority recorded for this deployment."
-- },
-- "privacy_policy": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Retention/zero-retention policy label."
-- },
-- "health": {
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "healthy": {
-- "type": "boolean"
++ "consecutive_failures": {
++ "type": "integer"
},
-- "last_check_at": {
++ "model_key": {
"type": [
"string",
"null"
],
-- "format": "date-time"
++ "description": "The offer this circuit belongs to; absent on the provider roll-up."
},
-- "reason": {
++ "failure_class": {
"type": [
"string",
"null"
-- ]
-- }
-- }
-- },
-- "updated_at": {
-- "type": "string",
-- "format": "date-time"
-- }
-- }
-- }
-- },
-- "ai.route-explain": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/route-explain.v1.json",
-- "title": "AiRouteExplain",
-- "description": "ai.route-explain@1: why OpenVibe.AI chose a model/deployment for a request. Lists the chosen candidate, rejected candidates with reasons, the objective (policy), the pre-flight cost estimate and the final actual cost. Money fields are integer nano-USD, as strings.",
-- "type": "object",
-- "required": [
-- "chosen",
-- "rejected",
-- "objective",
-- "estimate"
-- ],
-- "additionalProperties": false,
-- "$defs": {
-- "money-nano-usd": {
-- "type": "string",
-- "pattern": "^[0-9]{1,19}$",
-- "description": "Integer nano-USD (1e-9 USD), stored as a string."
-- }
-- },
-- "properties": {
-- "chosen": {
-- "type": "string",
-- "description": "Exact id of the model/deployment that answered."
-- },
-- "rejected": {
-- "type": "array",
-- "items": {
-- "type": "object",
-- "required": [
-- "id",
-- "reason"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "id": {
-- "type": "string",
-- "description": "Exact id of the rejected candidate."
-- },
-- "reason": {
-- "type": "string",
-- "description": "Human-readable exclusion reason, without secrets or internal host IPs."
-- }
-- }
-- }
-- },
-- "objective": {
-- "type": "string",
-- "enum": [
-- "cheapest",
-- "balanced",
-- "fastest",
-- "best",
-- "private",
-- "exact"
-- ],
-- "description": "Routing policy used for this request."
-- },
-- "estimate": {
-- "type": "object",
-- "required": [
-- "charge_nano_usd"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "charge_nano_usd": {
-- "$ref": "#/$defs/money-nano-usd"
-- },
-- "input_tokens": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cached_read_tokens": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cache_write_tokens": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "output_tokens": {
-- "type": "integer",
-- "minimum": 0
-- }
-- }
-- },
-- "actual": {
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "charge_nano_usd": {
-- "$ref": "#/$defs/money-nano-usd"
-- },
-- "input_tokens": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cached_read_tokens": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "cache_write_tokens": {
-- "type": "integer",
-- "minimum": 0
-- },
-- "output_tokens": {
-- "type": "integer",
-- "minimum": 0
-- }
-- }
-- },
-- "policy": {
-- "type": "string",
-- "description": "Name of the policy/profile that produced the choice."
-- },
-- "fallback_reason": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "If the first choice could not be used, why the chosen deployment was selected instead."
-- }
-- }
-- }
-- },
-- "ai.model-list": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/model-list.v1.json",
-- "title": "AiModelList",
-- "description": "ai.model-list@1: paginated list of model catalog entries returned by GET /v1/models.",
-- "type": "object",
-- "required": [
-- "models",
-- "count"
-- ],
-- "additionalProperties": false,
-- "properties": {
-- "models": {
-- "type": "array",
-- "items": {
-- "$ref": "model.v1.json"
-- }
-- },
-- "count": {
-- "type": "integer",
-- "minimum": 0,
-- "description": "Number of models in this response."
-- },
-- "cursor": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Opaque cursor for the next page."
-- }
-- }
-- }
-- },
-- "ai.model-read-result": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/model-read-result.v1.json",
-- "title": "AiModelReadResult",
-- "description": "ai.model-read-result@1: response from GET /v1/models (a list) or GET /v1/models/:id (a single model).",
-- "type": "object",
-- "anyOf": [
-- {
-- "$ref": "model-list.v1.json"
-- },
-- {
-- "$ref": "model.v1.json"
-- }
-- ]
-- }
-- },
-- "ai.provider-manage-request": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/provider-manage-request.v1.json",
-- "title": "AiProviderManageRequest",
-- "description": "ai.provider-manage-request@1: bodies of ai.provider.manage on OpenVibe.AI. POST /api/v1/providers creates or replaces a provider (key required) and PATCH /api/v1/providers/:key changes one (fields left out keep their value); a body carrying api_key or secret is refused (422: send secret_ref env:NAME, never a secret value). POST /api/v1/models (provider_key and model_key required) and PATCH /api/v1/models/:provider/:model upsert a model. POST /api/v1/quotas upserts a quota (scope_type and window required; scope_id too unless global; the same scope, window and workflow_prefix is one quota). POST /api/v1/providers/:key/disable|enable|reset and DELETE /api/v1/cache[?workflow=] take no body. Unknown fields are ignored.",
-- "anyOf": [
-- {
-- "type": "object",
-- "not": {
-- "anyOf": [
-- {
-- "required": [
-- "api_key"
-- ]
-- },
-- {
-- "required": [
-- "secret"
-- ]
-- }
-- ]
-- },
-- "properties": {
-- "key": {
-- "type": "string",
-- "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$"
-- },
-- "display_name": {
-- "type": "string"
-- },
-- "kind": {
++ ],
"enum": [
-- "stub",
-- "openai",
-- "anthropic",
-- "http",
-- "whisper"
-- ]
++ "balance",
++ "auth",
++ "rate_limit",
++ "transient",
++ "request",
++ null
++ ],
++ "description": "Why the offer's circuit opened, or its last failure: balance, auth, rate_limit, transient or request."
},
"status": {
-- "enum": [
-- "active",
-- "disabled"
-- ]
-- },
-- "base_url": {
"type": [
"string",
"null"
],
-- "pattern": "^https?://\\S+$"
-- },
-- "auth_mode": {
"enum": [
-- "none",
-- "bearer",
-- "x-api-key"
-- ]
++ "up",
++ "degraded",
++ "down",
++ null
++ ],
++ "description": "The measured status: down while the circuit is open, degraded when over 5% of at least 10 requests in the last hour failed, up otherwise."
},
-- "secret_ref": {
++ "status_reason": {
"type": [
"string",
"null"
],
-- "pattern": "^(env:[A-Z][A-Z0-9_]{0,63})?$"
++ "description": "Plain words for a degraded or down offer: 'the provider says the account is out of credit', 'the key was refused' or 'too many errors in the last hour'."
},
-- "default_model": {
++ "status_since": {
"type": [
"string",
"null"
-- ]
-- },
-- "capabilities": {
-- "type": "array",
-- "items": {
-- "enum": [
-- "chat",
-- "generate",
-- "summarize",
-- "classify",
-- "extract",
-- "enrich",
-- "embed",
-- "vision",
-- "json",
-- "transcribe"
-- ]
-- }
++ ],
++ "description": "When the current status began (ISO 8601)."
},
-- "timeout_ms": {
++ "retry_at": {
"type": [
"integer",
-- "string"
++ "null"
],
-- "description": "Clamped to 1000..600000."
++ "description": "Epoch ms a half-open probe may run; after a failed probe the pause starts again."
},
-- "priority": {
-- "type": [
-- "number",
-- "string"
-- ]
-- },
-- "metadata": {
-- "type": "object"
-- }
-- }
-- },
-- {
-- "type": "object",
-- "properties": {
-- "provider_key": {
-- "type": "string"
-- },
-- "model_key": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 200
-- },
-- "display_name": {
-- "type": "string"
-- },
-- "type": {
-- "enum": [
-- "chat",
-- "vision",
-- "embedding",
-- "stt"
-- ]
-- },
-- "status": {
-- "enum": [
-- "active",
-- "disabled"
-- ]
-- },
-- "context_window": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- },
-- "max_output": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- },
-- "cost": {
-- "type": "object",
-- "properties": {
-- "in_per_mtok": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "out_per_mtok": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "cached_per_mtok": {
-- "type": [
-- "number",
-- "null"
-- ]
-- }
-- }
-- },
-- "supports": {
-- "type": "object",
-- "properties": {
-- "json": {
-- "type": "boolean"
-- },
-- "tools": {
-- "type": "boolean"
-- },
-- "streaming": {
-- "type": "boolean"
-- },
-- "vision": {
-- "type": "boolean"
-- }
-- }
-- },
-- "metadata": {
-- "type": "object"
-- }
-- }
-- },
-- {
-- "type": "object",
-- "required": [
-- "scope_type",
-- "window"
-- ],
-- "properties": {
-- "scope_type": {
-- "enum": [
-- "global",
-- "service",
-- "actor",
-- "attribution"
-- ]
-- },
-- "scope_id": {
-- "type": "string",
-- "maxLength": 200,
-- "description": "* on a non-global scope = each one separately."
-- },
-- "window": {
-- "enum": [
-- "minute",
-- "hour",
-- "day"
-- ]
-- },
-- "max_requests": {
-- "type": [
-- "number",
-- "string",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "max_tokens": {
-- "type": [
-- "number",
-- "string",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "max_cost_usd": {
-- "type": [
-- "number",
-- "string",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "workflow_prefix": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "status": {
-- "enum": [
-- "active",
-- "disabled"
-- ]
-- }
-- }
-- },
-- {
-- "$ref": "../common/no-body.v1.json"
-- }
-- ]
-- }
-- },
-- "ai.provider-manage-result": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/provider-manage-result.v1.json",
-- "title": "AiProviderManageResult",
-- "description": "ai.provider-manage-result@1: answers of ai.provider.manage on OpenVibe.AI. Provider create/update/disable/enable → { provider } (201 on POST); POST …/reset → { health } (the circuit breaker, closed again); model upserts → { model }; POST /api/v1/quotas → 201 { quota } (the stored row); DELETE /api/v1/cache → { removed } (entries purged). Every change is audited.",
-- "anyOf": [
-- {
-- "type": "object",
-- "required": [
-- "provider"
-- ],
-- "properties": {
-- "provider": {
-- "$ref": "provider.v1.json"
-- }
-- }
-- },
-- {
-- "type": "object",
-- "required": [
-- "health"
-- ],
-- "properties": {
-- "health": {
-- "type": "object",
-- "required": [
-- "state"
-- ],
-- "properties": {
-- "provider_key": {
-- "type": "string"
-- },
-- "state": {
-- "enum": [
-- "closed",
-- "open",
-- "half_open"
-- ]
-- },
-- "consecutive_failures": {
-- "type": "integer"
-- }
-- }
-- }
-- }
-- },
-- {
-- "type": "object",
-- "required": [
-- "model"
-- ],
-- "properties": {
-- "model": {
-- "$ref": "model.v1.json"
-- }
-- }
-- },
-- {
-- "type": "object",
-- "required": [
-- "quota"
-- ],
-- "properties": {
-- "quota": {
-- "type": "object",
-- "required": [
-- "id",
-- "scope_type",
-- "scope_id",
-- "window",
-- "status"
-- ],
-- "properties": {
-- "id": {
-- "type": "integer"
-- },
-- "scope_type": {
-- "type": "string"
-- },
-- "scope_id": {
-- "type": "string"
-- },
-- "window": {
-- "type": "string"
-- },
-- "max_requests": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "max_tokens": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "max_cost_usd": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "workflow_prefix": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "status": {
-- "type": "string"
-- }
-- }
-- }
-- }
-- },
-- {
-- "type": "object",
-- "required": [
-- "removed"
-- ],
-- "properties": {
-- "removed": {
-- "type": "integer",
-- "minimum": 0
-- }
-- }
-- }
-- ]
-- }
-- },
-- "ai.provider": {
-- "version": "1.0.0",
-- "owner": "ai",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/ai/provider.v1.json",
-- "title": "AiProvider",
-- "description": "ai.provider@1: one model provider as OpenVibe.AI's registry API shows it (server/registry.js publicProvider): never a secret value, only the secret reference name (env:NAME) and whether it resolves (credentials), plus the measured circuit-breaker health. health.state is the provider roll-up; health.circuits is one entry per provider+model offer, with the failure class and the plain reason.",
-- "type": "object",
-- "required": [
-- "key",
-- "kind",
-- "status",
-- "auth_mode",
-- "capabilities",
-- "credentials"
-- ],
-- "properties": {
-- "key": {
-- "type": "string",
-- "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$"
-- },
-- "display_name": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "kind": {
-- "enum": [
-- "stub",
-- "openai",
-- "anthropic",
-- "http",
-- "whisper"
-- ]
-- },
-- "status": {
-- "enum": [
-- "active",
-- "disabled"
-- ]
-- },
-- "base_url": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "auth_mode": {
-- "enum": [
-- "none",
-- "bearer",
-- "x-api-key"
-- ]
-- },
-- "secret_ref": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "env:NAME, a reference; never the secret."
-- },
-- "default_model": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "capabilities": {
-- "type": "array",
-- "items": {
-- "enum": [
-- "chat",
-- "generate",
-- "summarize",
-- "classify",
-- "extract",
-- "enrich",
-- "embed",
-- "vision",
-- "json",
-- "transcribe"
-- ]
-- }
-- },
-- "timeout_ms": {
-- "type": [
-- "integer",
-- "null"
-- ]
-- },
-- "priority": {
-- "type": [
-- "number",
-- "null"
-- ]
-- },
-- "metadata": {
-- "type": "object"
-- },
-- "origin": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "created_at": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "updated_at": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "credentials": {
-- "enum": [
-- "not_required",
-- "configured",
-- "missing"
-- ]
-- },
-- "health": {
-- "type": [
-- "object",
-- "null"
-- ],
-- "properties": {
-- "provider_key": {
-- "type": "string"
-- },
-- "state": {
-- "enum": [
-- "closed",
-- "open",
-- "half_open"
-- ]
-- },
-- "consecutive_failures": {
-- "type": "integer"
-- },
-- "model_key": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "The offer this circuit belongs to; absent on the provider roll-up."
-- },
-- "failure_class": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "enum": [
-- "balance",
-- "auth",
-- "rate_limit",
-- "transient",
-- "request",
-- null
-- ],
-- "description": "Why the offer's circuit opened, or its last failure: balance, auth, rate_limit, transient or request."
-- },
-- "status": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "enum": [
-- "up",
-- "degraded",
-- "down",
-- null
-- ],
-- "description": "The measured status: down while the circuit is open, degraded when over 5% of at least 10 requests in the last hour failed, up otherwise."
-- },
-- "status_reason": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "Plain words for a degraded or down offer: 'the provider says the account is out of credit', 'the key was refused' or 'too many errors in the last hour'."
-- },
-- "status_since": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "description": "When the current status began (ISO 8601)."
-- },
-- "retry_at": {
-- "type": [
-- "integer",
-- "null"
-- ],
-- "description": "Epoch ms a half-open probe may run; after a failed probe the pause starts again."
-- },
-- "backoff_ms": {
++ "backoff_ms": {
"type": [
"integer",
"null"
@@@ -120512,40 +119696,1768 @@
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*\\.[a-z0-9_.-]{1,100}$"
},
-- "kind": {
-- "enum": [
-- "text",
-- "code",
-- "vision",
-- "image",
-- "search"
++ "kind": {
++ "enum": [
++ "text",
++ "code",
++ "vision",
++ "image",
++ "search"
++ ]
++ },
++ "sentence": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 300
++ },
++ "default": {
++ "$ref": "choice.v1.json"
++ },
++ "service": {
++ "type": "string"
++ },
++ "workflow": {
++ "type": "string"
++ }
++ },
++ "required": [
++ "name",
++ "kind",
++ "sentence",
++ "default"
++ ]
++ }
++ },
++ "git.change": {
++ "version": "1.0.0",
++ "owner": "git",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/git/change.v1.json",
++ "title": "GitChange",
++ "description": "Git G2 change metadata. Community thread is hidden; Git authorizes repository access. PostgreSQL bigint numbers may be decimal strings.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "number",
++ "repo_id",
++ "title",
++ "body",
++ "author",
++ "state",
++ "thread_id",
++ "created_at",
++ "closed_at",
++ "source_repo_id",
++ "base_ref",
++ "head_ref",
++ "head_sha",
++ "merge_sha",
++ "branch_deleted_at",
++ "diff_base_sha"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "number": {
++ "type": [
++ "integer",
++ "string"
++ ],
++ "pattern": "^[1-9][0-9]*$",
++ "minimum": 1
++ },
++ "repo_id": {
++ "type": "string"
++ },
++ "title": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 200
++ },
++ "body": {
++ "type": "string",
++ "maxLength": 10000
++ },
++ "author": {
++ "type": "string"
++ },
++ "state": {
++ "enum": [
++ "open",
++ "closed",
++ "merged"
++ ]
++ },
++ "thread_id": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "closed_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "source_repo_id": {
++ "type": "string"
++ },
++ "base_ref": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 255
++ },
++ "head_ref": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 255
++ },
++ "head_sha": {
++ "type": "string",
++ "pattern": "^[a-f0-9]{40,64}$"
++ },
++ "merge_sha": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^[a-f0-9]{40,64}$"
++ },
++ "branch_deleted_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "diff_base_sha": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^[a-f0-9]{40,64}$"
++ }
++ }
++ }
++ },
++ "git.issue": {
++ "version": "1.0.0",
++ "owner": "git",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/git/issue.v1.json",
++ "title": "GitIssue",
++ "description": "Git G2 issue metadata. Community thread is hidden; Git authorizes repository access. PostgreSQL bigint numbers may be decimal strings.",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "number",
++ "repo_id",
++ "title",
++ "body",
++ "author",
++ "state",
++ "thread_id",
++ "created_at",
++ "closed_at",
++ "labels"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "pattern": "^iss_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "number": {
++ "type": [
++ "integer",
++ "string"
++ ],
++ "pattern": "^[1-9][0-9]*$",
++ "minimum": 1
++ },
++ "repo_id": {
++ "type": "string"
++ },
++ "title": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 200
++ },
++ "body": {
++ "type": "string",
++ "maxLength": 10000
++ },
++ "author": {
++ "type": "string"
++ },
++ "state": {
++ "enum": [
++ "open",
++ "closed"
++ ]
++ },
++ "thread_id": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "closed_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "labels": {
++ "type": "array",
++ "maxItems": 20,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[A-Za-z0-9_ -]{1,40}$"
++ }
++ }
++ }
++ }
++ },
++ "exchange.compat-routing": {
++ "version": "1.0.0",
++ "owner": "exchange",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/exchange/compat-routing.v1.json",
++ "title": "ExchangeCompatRouting",
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "model": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 256
++ },
++ "models": {
++ "type": "array",
++ "minItems": 1,
++ "maxItems": 8,
++ "items": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 256
++ }
++ },
++ "provider": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "order": {
++ "type": "array",
++ "maxItems": 64,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ }
++ },
++ "only": {
++ "type": "array",
++ "maxItems": 64,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ }
++ },
++ "ignore": {
++ "type": "array",
++ "maxItems": 64,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ }
++ },
++ "allow_fallbacks": {
++ "type": "boolean"
++ },
++ "sort": {
++ "enum": [
++ "price",
++ "throughput",
++ "latency",
++ "quality",
++ "value"
++ ]
++ },
++ "max_price": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "prompt": {
++ "type": "number",
++ "minimum": 0
++ },
++ "completion": {
++ "type": "number",
++ "minimum": 0
++ }
++ }
++ },
++ "data_collection": {
++ "enum": [
++ "allow",
++ "deny"
++ ]
++ },
++ "zdr": {
++ "type": "boolean"
++ }
++ }
++ },
++ "usage": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "include": {
++ "type": "boolean"
++ }
++ }
++ }
++ },
++ "description": "OpenRouter-compatible model fallback and provider policy controls. Prices are USD per million tokens."
++ }
++ },
++ "exchange.request-preset": {
++ "version": "1.0.0",
++ "owner": "exchange",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/exchange/request-preset.v1.json",
++ "title": "ExchangeRequestPreset",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "name"
++ ],
++ "anyOf": [
++ {
++ "required": [
++ "model"
++ ]
++ },
++ {
++ "required": [
++ "models"
++ ]
++ }
++ ],
++ "properties": {
++ "model": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 256
++ },
++ "models": {
++ "type": "array",
++ "minItems": 1,
++ "maxItems": 8,
++ "items": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 256
++ }
++ },
++ "provider": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "order": {
++ "type": "array",
++ "maxItems": 64,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ }
++ },
++ "only": {
++ "type": "array",
++ "maxItems": 64,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ }
++ },
++ "ignore": {
++ "type": "array",
++ "maxItems": 64,
++ "uniqueItems": true,
++ "items": {
++ "type": "string",
++ "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ }
++ },
++ "allow_fallbacks": {
++ "type": "boolean"
++ },
++ "sort": {
++ "enum": [
++ "price",
++ "throughput",
++ "latency",
++ "quality",
++ "value"
++ ]
++ },
++ "max_price": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "prompt": {
++ "type": "number",
++ "minimum": 0
++ },
++ "completion": {
++ "type": "number",
++ "minimum": 0
++ }
++ }
++ },
++ "data_collection": {
++ "enum": [
++ "allow",
++ "deny"
++ ]
++ },
++ "zdr": {
++ "type": "boolean"
++ }
++ }
++ },
++ "name": {
++ "type": "string",
++ "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
++ },
++ "system": {
++ "type": "string",
++ "maxLength": 32000
++ },
++ "temperature": {
++ "type": "number",
++ "minimum": 0,
++ "maximum": 2
++ },
++ "top_p": {
++ "type": "number",
++ "minimum": 0,
++ "maximum": 1
++ },
++ "max_tokens": {
++ "type": "integer",
++ "minimum": 1,
++ "maximum": 64000
++ },
++ "seed": {
++ "type": "integer"
++ },
++ "response_format": {
++ "type": "object"
++ }
++ },
++ "description": "A person-owned request preset with model fallbacks, system prompt, routing and sampling defaults."
++ }
++ },
++ "exchange.generation": {
++ "version": "1.0.0",
++ "owner": "exchange",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/exchange/generation.v1.json",
++ "title": "ExchangeGeneration",
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "id",
++ "model",
++ "provider",
++ "cost",
++ "total_cost",
++ "latency",
++ "tokens_prompt",
++ "tokens_completion",
++ "created_at"
++ ],
++ "properties": {
++ "id": {
++ "type": "string",
++ "minLength": 1,
++ "maxLength": 256
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "provider": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "cost": {
++ "type": "number",
++ "minimum": 0
++ },
++ "total_cost": {
++ "type": "number",
++ "minimum": 0
++ },
++ "latency": {
++ "type": "number",
++ "minimum": 0
++ },
++ "tokens_prompt": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "tokens_completion": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ }
++ },
++ "description": "Owner-scoped request accounting. Cost is USD and latency is milliseconds; prompts and outputs are excluded."
++ }
++ },
++ "exchange.market": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/exchange/market.v1.json",
++ "title": "ExchangeMarket",
++ "description": "Public own-page provider offers, enabled or not; prices are observations, not routing quotes. Paged by limit (1-500) and cursor, filterable by maker, open_weights and kind. No credentials or account identifiers. Model metadata preserves per-field provenance and stale state.",
++ "type": "object",
++ "required": [
++ "$schema",
++ "generated_at",
++ "metadata",
++ "total_models",
++ "total_offers",
++ "offers",
++ "next_cursor"
++ ],
++ "properties": {
++ "$schema": {
++ "const": "exchange.market@1"
++ },
++ "generated_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "metadata": {
++ "type": "object",
++ "required": [
++ "source",
++ "checked_at",
++ "stale"
++ ],
++ "properties": {
++ "source": {
++ "const": "https://models.dev/api.json"
++ },
++ "checked_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "stale": {
++ "type": "boolean"
++ }
++ },
++ "additionalProperties": false
++ },
++ "total_models": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "total_offers": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "next_cursor": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "offers": {
++ "type": "array",
++ "maxItems": 500,
++ "items": {
++ "type": "object",
++ "required": [
++ "maker",
++ "licence",
++ "release_date",
++ "knowledge_cutoff",
++ "price_checked_at",
++ "model",
++ "provider",
++ "provider_name",
++ "provider_model",
++ "name",
++ "routed",
++ "uncensored",
++ "context",
++ "max_output",
++ "kind",
++ "provider_access",
++ "open_weights",
++ "price_source",
++ "price",
++ "field_sources",
++ "modalities"
++ ],
++ "properties": {
++ "maker": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "licence": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "release_date": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "knowledge_cutoff": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "price_checked_at": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "model": {
++ "type": "string",
++ "minLength": 1
++ },
++ "provider": {
++ "type": "string",
++ "minLength": 1
++ },
++ "provider_name": {
++ "type": "string",
++ "minLength": 1
++ },
++ "provider_model": {
++ "type": "string",
++ "minLength": 1
++ },
++ "name": {
++ "type": "string",
++ "minLength": 1
++ },
++ "routed": {
++ "type": "boolean"
++ },
++ "uncensored": {
++ "type": "boolean"
++ },
++ "context": {
++ "type": [
++ "number",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "max_output": {
++ "type": [
++ "number",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "kind": {
++ "enum": [
++ "chat",
++ "embedding",
++ "stt",
++ "image"
++ ]
++ },
++ "provider_access": {
++ "enum": [
++ "OWN_DEPLOYMENT",
++ "AUTHORIZED_WHOLESALE",
++ "CUSTOMER_BYOK",
++ "UNVERIFIED",
++ "RESTRICTED"
++ ]
++ },
++ "open_weights": {
++ "type": [
++ "boolean",
++ "null"
++ ]
++ },
++ "price_source": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "uri"
++ },
++ "price": {
++ "type": "object",
++ "required": [
++ "in",
++ "out",
++ "cached",
++ "currency",
++ "per"
++ ],
++ "properties": {
++ "in": {
++ "type": [
++ "number",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "out": {
++ "type": [
++ "number",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "cached": {
++ "type": [
++ "number",
++ "null"
++ ],
++ "minimum": 0
++ },
++ "currency": {
++ "const": "USD"
++ },
++ "per": {
++ "const": "1M tokens"
++ }
++ },
++ "additionalProperties": false
++ },
++ "field_sources": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "maker": {
++ "type": "string",
++ "format": "uri"
++ },
++ "context": {
++ "type": "string",
++ "format": "uri"
++ },
++ "max_output": {
++ "type": "string",
++ "format": "uri"
++ },
++ "open_weights": {
++ "type": "string",
++ "format": "uri"
++ },
++ "licence": {
++ "type": "string",
++ "format": "uri"
++ },
++ "release_date": {
++ "type": "string",
++ "format": "uri"
++ },
++ "knowledge_cutoff": {
++ "type": "string",
++ "format": "uri"
++ },
++ "modalities": {
++ "type": "string",
++ "format": "uri"
++ }
++ }
++ },
++ "modalities": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "input",
++ "output"
++ ],
++ "properties": {
++ "input": {
++ "type": "array",
++ "items": {
++ "type": "string"
++ }
++ },
++ "output": {
++ "type": "array",
++ "items": {
++ "type": "string"
++ }
++ }
++ },
++ "additionalProperties": false
++ }
++ },
++ "additionalProperties": false
++ }
++ }
++ },
++ "additionalProperties": false
++ }
++ },
++ "ai.run-request": {
++ "version": "1.1.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/run-request.v1.json",
++ "title": "AiRunRequest",
++ "description": "Body of POST /api/v1/runs on OpenVibe.AI (capability ai.run.create; ADR-015). Runs the newest active version of a workflow (or the given active or deprecated version) on input that must match that workflow version's own input schema; per-workflow input and output schemas live in AI's registry (GET /api/v1/workflows/:key), not here. The token's ns claim limits which workflow namespaces may run (403 capability.namespace_denied). ?wait=ms waits for the result: 201 finished or served from cache, 202 still queued/running (poll GET /api/v1/runs/:id), 200 an idempotent replay. Errors are problem+json: 404 workflow.not_found, 409 workflow.inactive, 409 idempotency.conflict, 413 input.too_large, 422 input.invalid, 429 quota.exceeded or queue.full with Retry-After. The direct operations POST /api/v1/{chat,generate,summarize,classify,extract,enrich,embed} take the same fields (except workflow and version) with the input fields at the top level and run workflow ai.<op>. target (EntityRef): what the output is about, part of the cache scope and a run filter. attribution (EntityRef): what the spend is attributed to for quotas and usage. on_behalf_of (SubjectRef): the person or actor the caller acts for, part of the cache scope and per-actor quotas. options.latency asks for a slower class than the workflow allows (options.deadline_hours says how long a batch run may take); the run answers with the class it ran in (run.latency_class), the tier it was priced on (run.service_tier) and, when the ask was clamped, the class it really ran in (run.latency_clamped).",
++ "type": "object",
++ "required": [],
++ "additionalProperties": false,
++ "properties": {
++ "task": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_-]*\\.[a-z0-9_.-]{1,100}$",
++ "description": "A registered AI task (ai.task@1, GET /api/v1/tasks). Its workflow runs with the task's resolved choice; choice overrides it for this run."
++ },
++ "choice": {
++ "$ref": "choice.v1.json"
++ },
++ "workflow": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)+$",
++ "maxLength": 200,
++ "description": "Workflow key, <namespace>.<name> (live.chat_reply, news.summarize_story, network.site_copy…)."
++ },
++ "version": {
++ "type": "integer",
++ "minimum": 1,
++ "description": "Pin a workflow version (active or deprecated). Omitted: the newest active version."
++ },
++ "input": {
++ "type": "object",
++ "description": "Workflow input; validated against the workflow version's input_schema. Default {}."
++ },
++ "target": {
++ "$ref": "../common/entity-ref.v1.json"
++ },
++ "attribution": {
++ "$ref": "../common/entity-ref.v1.json"
++ },
++ "on_behalf_of": {
++ "$ref": "../identity/subject-ref.v1.json"
++ },
++ "idempotency_key": {
++ "type": "string",
++ "pattern": "^[A-Za-z0-9._:-]{8,128}$",
++ "description": "Same (requester, key) returns the existing run; a different workflow or input under it is 409 idempotency.conflict. The Idempotency-Key header is used when this is absent."
++ },
++ "options": {
++ "type": "object",
++ "additionalProperties": false,
++ "properties": {
++ "cache": {
++ "type": "boolean",
++ "default": true,
++ "description": "false skips the scoped cache lookup and store."
++ },
++ "debug": {
++ "type": "boolean",
++ "default": false,
++ "description": "Keep raw prompts and responses in the request log, only when AI runs with raw debug logging on."
++ },
++ "latency": {
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
++ "description": "The class the caller asks for: how long the caller may wait, and what the router may do with the wait. interactive (the default) answers as soon as the provider can; background may take minutes, and the run is priced on the cheapest tier that can wait (a Flex tier, a provider's off-peak hours, the host's own idle model); batch may take hours, and the run is queued and answered through a provider's own batch API. The class is the workflow's own (the route's constraints.latency_class): a caller may ask for a SLOWER class and never for a faster one. A faster ask is not refused: the run happens in the workflow's own class and the answer says so (run.latency_clamped)."
++ },
++ "deadline_hours": {
++ "type": "integer",
++ "minimum": 1,
++ "maximum": 72,
++ "description": "For a batch run: how long the answer may take, in hours (1 to 72). The run is queued and answered within the deadline; a deadline the provider cannot meet sends the run back to the ordinary path. Omitted: the service's own default."
++ }
++ }
++ },
++ "credential": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "subject"
++ ],
++ "properties": {
++ "subject": {
++ "type": "string",
++ "pattern": "^usr_[0-9A-HJKMNP-TV-Z]{26}$"
++ }
++ },
++ "description": "Run with the person's own provider key (ai.credential@1) that this service stored, instead of a shared route: only that provider is called (no fallback), the result is never cached or taken from the cache, the shared paid budget is not spent, and the credential's own daily budget applies (429 quota.exceeded). Chat operations only (text, JSON, vision)."
++ },
++ "effort": {
++ "$ref": "effort.v1.json"
++ },
++ "ladder_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "rung": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "agent_role": {
++ "enum": [
++ "router",
++ "gate",
++ "assessor",
++ "worker",
++ "subagent",
++ "reviewer"
++ ]
++ },
++ "kind": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_.-]{0,99}$"
++ }
++ },
++ "anyOf": [
++ {
++ "required": [
++ "workflow"
++ ]
++ },
++ {
++ "required": [
++ "task"
++ ]
++ }
++ ]
++ }
++ },
++ "ai.run": {
++ "version": "1.2.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/run.v1.json",
++ "title": "AiRun",
++ "description": "A workflow run on OpenVibe.AI (ADR-015; server/runs.js decode): the `run` member of every run response (POST /api/v1/runs and the direct operations, GET /api/v1/runs/:id, cancel, retry) and each item of GET /api/v1/runs { runs }. Output is attributable to workflow + version + template version + route version + provider/model + run id, never to a person. A draft stays a draft: products store it with ai/ai_assisted authorship and publish nothing until a person reviews it. input keeps no inline media (replaced by data_url_sha256 and data_url_bytes) and no passthrough prompt ({ not_retained }); output is null until the run succeeded or was served from cache and then matches the workflow version's output_schema. requester is the token principal (service, app or mod). A run interrupted by a restart or shutdown ends failed with error.code run.interrupted. latency_class is the class the run really ran in, service_tier the tier it was priced on, and latency_clamped set when the caller asked for a faster class than the workflow allows. explain says why the run answered as it did: the task it read, the candidates it ranked and every attempt.",
++ "type": "object",
++ "required": [
++ "id",
++ "status",
++ "workflow",
++ "template",
++ "route",
++ "requester",
++ "on_behalf_of",
++ "attribution",
++ "source_service",
++ "target",
++ "input",
++ "output",
++ "error",
++ "synthetic",
++ "provenance",
++ "usage",
++ "citations_count",
++ "retry_of",
++ "idempotency_key",
++ "trace_id",
++ "created_at",
++ "started_at",
++ "finished_at"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "status": {
++ "enum": [
++ "queued",
++ "running",
++ "succeeded",
++ "failed",
++ "cancelled",
++ "cached"
++ ],
++ "description": "Terminal: succeeded, failed, cancelled, cached (a scoped cache hit, no provider call; provenance.cached_from names the run it reused)."
++ },
++ "workflow": {
++ "type": "object",
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": "integer",
++ "minimum": 1
++ }
++ }
++ },
++ "template": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
++ "description": "The prompt template of the workflow's llm step; null for workflows without one."
++ },
++ "route": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "key",
++ "version"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "key": {
++ "type": "string"
++ },
++ "version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
++ "description": "Provider route; version null while the route is unresolved or disabled."
++ },
++ "requester": {
++ "$ref": "../identity/subject-ref.v1.json"
++ },
++ "on_behalf_of": {
++ "anyOf": [
++ {
++ "$ref": "../identity/subject-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "attribution": {
++ "anyOf": [
++ {
++ "$ref": "../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "source_service": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "The requester's service id when the requester is a service."
++ },
++ "target": {
++ "anyOf": [
++ {
++ "$ref": "../common/entity-ref.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "input": {
++ "type": "object",
++ "description": "The retained input (see the description)."
++ },
++ "output": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "description": "Workflow output, or null."
++ },
++ "error": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "code",
++ "detail"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "code": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$",
++ "description": "run.cancelled, run.interrupted, run.internal, output.invalid, output.empty, provider.unavailable, route.unavailable, source.unavailable, media.unresolvable…"
++ },
++ "detail": {
++ "type": [
++ "string",
++ "null"
++ ]
++ }
++ }
++ },
++ "synthetic": {
++ "type": "boolean",
++ "description": "Produced by the stub provider; never served to production callers and never cached."
++ },
++ "provenance": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "origin",
++ "workflow",
++ "workflow_version",
++ "template_version",
++ "route",
++ "route_version",
++ "provider",
++ "model",
++ "fallback_used",
++ "run_id",
++ "cached_from",
++ "synthetic"
++ ],
++ "properties": {
++ "origin": {
++ "const": "ai"
++ },
++ "workflow": {
++ "type": "string"
++ },
++ "workflow_version": {
++ "type": "integer",
++ "minimum": 1
++ },
++ "template_version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "route": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "route_version": {
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "provider": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "fallback_used": {
++ "type": "boolean",
++ "description": "The primary provider was degraded and the run fell back (ADR-015: fallbacks are recorded)."
++ },
++ "run_id": {
++ "type": "string",
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "cached_from": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "synthetic": {
++ "type": "boolean"
++ }
++ }
++ },
++ "usage": {
++ "type": "object",
++ "required": [
++ "tokens_in",
++ "tokens_out",
++ "cost_usd",
++ "attempts"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "tokens_in": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "tokens_out": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "attempts": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "Provider calls made (skipped routes not counted)."
++ }
++ }
++ },
++ "citations_count": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "Citations stored for the run (GET /api/v1/runs/:id/citations): the sources the workflow was given, and any the requester attached later."
++ },
++ "latency_class": {
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
++ "description": "The class the run really ran in: how long the caller was willing to wait. It is the workflow's own class (the route's constraints.latency_class) or a slower one the caller asked for (options.latency); a caller can never make a run faster than its workflow allows."
++ },
++ "service_tier": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "enum": [
++ "standard",
++ "flex",
++ "batch",
++ "offpeak",
++ "local",
++ null
++ ],
++ "description": "The tier the run was priced on: the tier the provider really served (standard, flex, batch) or the one the router chose (offpeak inside a provider's off-peak hours, local on the host's own model). Null while the run has not answered. A provider that does not say which tier it served is priced at the list price: a saving nobody confirmed is not a saving."
++ },
++ "latency_clamped": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "required": [
++ "asked",
++ "used"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "asked": {
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
++ "description": "The class the caller asked for."
++ },
++ "used": {
++ "enum": [
++ "interactive",
++ "background",
++ "batch"
++ ],
++ "description": "The class the run really ran in."
++ }
++ },
++ "description": "Set when the caller asked for a faster class than the workflow allows: the class asked for and the class the run really ran in. The run is never refused for it."
++ },
++ "retry_of": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
++ },
++ "idempotency_key": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "trace_id": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "started_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "finished_at": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "format": "date-time"
++ },
++ "explain": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "description": "Why the run answered as it did: the task-aware router's explain (L33 P3, L36 Y7). task is the requirement set it read from the request, ranked the candidates it considered and why, attempts every provider it tried with why it was chosen and why it failed, and the placement view it ranked from (objective, reasons, selected, candidates). A run that never reached a provider has no explain.",
++ "required": [
++ "objective",
++ "reasons",
++ "selected",
++ "candidates"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "objective": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "The objective the pool planned with (cheapest, balanced, correctness, own-keys, own-machine), or null for a pinned route."
++ },
++ "reasons": {
++ "type": "array",
++ "items": {
++ "type": "string"
++ },
++ "description": "Why the router chose what it chose, in words."
++ },
++ "selected": {
++ "type": [
++ "string",
++ "object",
++ "null"
++ ],
++ "description": "The provider that answered (provider, or provider/model, or the machine that answered), or null when nothing answered."
++ },
++ "candidates": {
++ "type": "array",
++ "description": "Every candidate the pool considered, with why it was excluded when it was.",
++ "items": {
++ "type": "object",
++ "required": [
++ "provider"
++ ],
++ "additionalProperties": true,
++ "properties": {
++ "provider": {
++ "type": "string"
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "eligible": {
++ "type": "boolean"
++ },
++ "excluded_reason": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "cost": {
++ "type": [
++ "number",
++ "null"
++ ]
++ },
++ "latency": {
++ "type": [
++ "number",
++ "null"
++ ]
++ }
++ }
++ }
++ },
++ "paid_by": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "Who paid for the run: the network, the person's own key, their own machine, or a project's own provider."
++ },
++ "task": {
++ "type": "object",
++ "description": "The requirement set the router read off the request, with no model call.",
++ "required": [
++ "vision",
++ "tools",
++ "json",
++ "min_context",
++ "reasoning",
++ "output",
++ "weight"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "vision": {
++ "type": "boolean",
++ "description": "The request carried a picture."
++ },
++ "tools": {
++ "type": "boolean",
++ "description": "The request carried tools."
++ },
++ "json": {
++ "type": "boolean",
++ "description": "The request asked for JSON out."
++ },
++ "min_context": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "The context window the request needs, in tokens."
++ },
++ "reasoning": {
++ "enum": [
++ "none",
++ "some",
++ "deep"
++ ],
++ "description": "How much thinking the request asked for."
++ },
++ "output": {
++ "enum": [
++ "text",
++ "image",
++ "audio",
++ "video"
++ ],
++ "description": "What the request wants out."
++ },
++ "weight": {
++ "enum": [
++ "light",
++ "standard",
++ "heavy"
++ ],
++ "description": "How heavy the work is."
++ }
++ }
++ },
++ "ranked": {
++ "type": "array",
++ "maxItems": 5,
++ "description": "The candidates the router ranked for this task, best first, each with its reason.",
++ "items": {
++ "type": "object",
++ "required": [
++ "provider",
++ "why"
++ ],
++ "additionalProperties": true,
++ "properties": {
++ "provider": {
++ "type": "string"
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "why": {
++ "type": "string",
++ "description": "Why this candidate is here (the cheapest with vision, the strong tier, warm cache)."
++ },
++ "cost": {
++ "type": [
++ "number",
++ "null"
++ ],
++ "description": "The input price per million tokens, or null when the price is unknown."
++ },
++ "tier": {
++ "type": [
++ "string",
++ "null"
++ ],
++ "description": "The catalogue's strength tier: fast, balanced, strong or frontier."
++ }
++ }
++ }
++ },
++ "attempts": {
++ "type": "array",
++ "description": "Every attempt, in order: why it was chosen, and what went wrong when it failed.",
++ "items": {
++ "type": "object",
++ "required": [
++ "provider",
++ "status"
++ ],
++ "additionalProperties": true,
++ "properties": {
++ "key": {
++ "type": "string",
++ "description": "Which key or wallet paid for the attempt; never a key."
++ },
++ "provider": {
++ "type": "string"
++ },
++ "model": {
++ "type": [
++ "string",
++ "null"
++ ]
++ },
++ "why": {
++ "type": "string",
++ "description": "Why this provider was tried."
++ },
++ "status": {
++ "enum": [
++ "ok",
++ "failed",
++ "timeout",
++ "skipped"
++ ]
++ },
++ "error": {
++ "type": [
++ "string",
++ "null"
++ ]
++ }
++ }
++ }
++ },
++ "bench": {
++ "type": [
++ "object",
++ "null"
++ ],
++ "description": "The Bench evidence the route used, when it opted in."
++ },
++ "usage_readings": {
++ "type": "array",
++ "items": {
++ "type": "object"
++ },
++ "description": "The billing readings of the run, when it has any."
++ },
++ "task_choice": {
++ "type": "object",
++ "description": "A run started from an AI task (ai.task@1): the task it read, the choice it resolved, why that choice won and which fallback answered.",
++ "required": [
++ "task",
++ "requested",
++ "answered",
++ "why",
++ "fallback_index"
++ ],
++ "additionalProperties": false,
++ "properties": {
++ "task": {
++ "type": "string",
++ "description": "The task's name."
++ },
++ "requested": {
++ "$ref": "choice.v1.json"
++ },
++ "answered": {
++ "$ref": "choice.v1.json"
++ },
++ "why": {
++ "enum": [
++ "run",
++ "saved",
++ "kind",
++ "owner",
++ "builtin"
++ ],
++ "description": "Which resolution step picked it: the run's own choice (run), the person's saved choice (saved), their kind default (kind), the owner's task default (owner) or the built-in."
++ },
++ "fallback_index": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "0 when the chosen model answered; otherwise the position of the fallback that did."
++ }
++ }
++ }
++ }
++ },
++ "choice": {
++ "anyOf": [
++ {
++ "$ref": "choice.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "description": "The choice the run was started with, when it was started from a task or a choice; null otherwise."
++ },
++ "answered": {
++ "anyOf": [
++ {
++ "$ref": "choice.v1.json"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "description": "What actually answered: the model and its source, and the machine when one did; null for a run outside a task."
++ },
++ "effort_requested": {
++ "$ref": "effort.v1.json"
++ },
++ "effort_applied": {
++ "anyOf": [
++ {
++ "enum": [
++ "low",
++ "medium",
++ "high",
++ "max"
++ ]
++ },
++ {
++ "type": "null"
++ }
]
},
-- "sentence": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 300
-- },
-- "default": {
-- "$ref": "choice.v1.json"
++ "effort_rung": {
++ "type": "integer",
++ "minimum": 0
},
-- "service": {
-- "type": "string"
++ "ladder_id": {
++ "type": "string",
++ "minLength": 1
},
-- "workflow": {
-- "type": "string"
++ "ladder": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "model",
++ "effort",
++ "cost_usd",
++ "outcome"
++ ],
++ "properties": {
++ "model": {
++ "type": "string",
++ "minLength": 1
++ },
++ "effort": {
++ "$ref": "effort.v1.json"
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "outcome": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++ }
}
-- },
-- "required": [
-- "name",
-- "kind",
-- "sentence",
-- "default"
-- ]
++ }
}
},
"ai.task-defaults": {
-- "version": "1.0.0",
++ "version": "1.1.0",
"owner": "ai",
"status": "active",
"schema": {
@@@ -120607,6 +121519,15 @@
],
"minimum": 0,
"maximum": 1000
++ },
++ "effort": {
++ "enum": [
++ "low",
++ "medium",
++ "high",
++ "max"
++ ],
++ "description": "Concrete effort used when a request selects auto. Omitted uses the workflow default, then medium."
}
},
"required": [
@@@ -120619,835 +121540,539 @@
]
}
},
-- "git.change": {
++ "agent.trigger": {
"version": "1.0.0",
-- "owner": "git",
++ "owner": "actor",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/git/change.v1.json",
-- "title": "GitChange",
-- "description": "Git G2 change metadata. Community thread is hidden; Git authorizes repository access. PostgreSQL bigint numbers may be decimal strings.",
++ "$id": "https://openvibe.network/contracts/agent/trigger.v1.json",
++ "title": "AgentTrigger",
++ "description": "Immutable source event. Source-local actor identity grants no cross-source authority. Accepting an id twice creates one ticket.",
"type": "object",
"additionalProperties": false,
"required": [
"id",
-- "number",
-- "repo_id",
-- "title",
-- "body",
-- "author",
-- "state",
-- "thread_id",
-- "created_at",
-- "closed_at",
-- "source_repo_id",
-- "base_ref",
-- "head_ref",
-- "head_sha",
-- "merge_sha",
-- "branch_deleted_at",
-- "diff_base_sha"
++ "source",
++ "actor",
++ "source_scope",
++ "threads",
++ "occurred_at",
++ "text"
],
"properties": {
"id": {
"type": "string",
-- "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "number": {
-- "type": [
-- "integer",
-- "string"
-- ],
-- "pattern": "^[1-9][0-9]*$",
-- "minimum": 1
-- },
-- "repo_id": {
-- "type": "string"
-- },
-- "title": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 200
++ "minLength": 1
},
-- "body": {
++ "source": {
"type": "string",
-- "maxLength": 10000
-- },
-- "author": {
-- "type": "string"
-- },
-- "state": {
-- "enum": [
-- "open",
-- "closed",
-- "merged"
-- ]
++ "minLength": 1
},
-- "thread_id": {
-- "type": [
-- "string",
-- "null"
-- ]
++ "actor": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "source",
++ "id",
++ "kind"
++ ],
++ "properties": {
++ "source": {
++ "type": "string",
++ "minLength": 1
++ },
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "kind": {
++ "enum": [
++ "person",
++ "bot",
++ "system"
++ ]
++ }
++ }
},
-- "created_at": {
++ "source_scope": {
"type": "string",
-- "format": "date-time"
-- },
-- "closed_at": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "format": "date-time"
++ "minLength": 1
},
-- "source_repo_id": {
-- "type": "string"
++ "threads": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "minItems": 1,
++ "uniqueItems": true
},
-- "base_ref": {
++ "occurred_at": {
"type": "string",
-- "minLength": 1,
-- "maxLength": 255
++ "format": "date-time"
},
-- "head_ref": {
++ "text": {
"type": "string",
-- "minLength": 1,
-- "maxLength": 255
++ "minLength": 1
},
-- "head_sha": {
++ "read_pointer": {
"type": "string",
-- "pattern": "^[a-f0-9]{40,64}$"
-- },
-- "merge_sha": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "pattern": "^[a-f0-9]{40,64}$"
-- },
-- "branch_deleted_at": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "format": "date-time"
++ "format": "uri"
},
-- "diff_base_sha": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "pattern": "^[a-f0-9]{40,64}$"
++ "addresses_agent": {
++ "enum": [
++ "mention",
++ "direct",
++ "none"
++ ]
}
}
}
},
-- "git.issue": {
++ "agent.decision": {
"version": "1.0.0",
-- "owner": "git",
++ "owner": "actor",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/git/issue.v1.json",
-- "title": "GitIssue",
-- "description": "Git G2 issue metadata. Community thread is hidden; Git authorizes repository access. PostgreSQL bigint numbers may be decimal strings.",
++ "$id": "https://openvibe.network/contracts/agent/decision.v1.json",
++ "title": "AgentDecision",
++ "description": "Gate and assessment decision. Inferred work defaults to observe: record ignore with would_accept, never launch. Only an explicit human stop withdraws a mandate.",
"type": "object",
"additionalProperties": false,
"required": [
"id",
-- "number",
-- "repo_id",
-- "title",
-- "body",
-- "author",
-- "state",
-- "thread_id",
-- "created_at",
-- "closed_at",
-- "labels"
++ "trigger_ids",
++ "policy_version",
++ "decision",
++ "strength",
++ "direction",
++ "rule_assessments"
],
"properties": {
"id": {
"type": "string",
-- "pattern": "^iss_[0-9A-HJKMNP-TV-Z]{26}$"
-- },
-- "number": {
-- "type": [
-- "integer",
-- "string"
-- ],
-- "pattern": "^[1-9][0-9]*$",
-- "minimum": 1
-- },
-- "repo_id": {
-- "type": "string"
++ "minLength": 1
},
-- "title": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 200
++ "trigger_ids": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "minItems": 1,
++ "uniqueItems": true
},
-- "body": {
++ "policy_version": {
"type": "string",
-- "maxLength": 10000
-- },
-- "author": {
-- "type": "string"
++ "minLength": 1
},
-- "state": {
++ "decision": {
"enum": [
-- "open",
-- "closed"
++ "accept",
++ "stop",
++ "ignore",
++ "unavailable"
]
},
-- "thread_id": {
-- "type": [
-- "string",
-- "null"
++ "strength": {
++ "enum": [
++ "explicit",
++ "inferred"
]
},
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
-- },
-- "closed_at": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "format": "date-time"
-- },
-- "labels": {
-- "type": "array",
-- "maxItems": 20,
-- "uniqueItems": true,
-- "items": {
-- "type": "string",
-- "pattern": "^[A-Za-z0-9_ -]{1,40}$"
-- }
-- }
-- }
-- }
-- },
-- "exchange.compat-routing": {
-- "version": "1.0.0",
-- "owner": "exchange",
-- "status": "active",
-- "schema": {
-- "$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/exchange/compat-routing.v1.json",
-- "title": "ExchangeCompatRouting",
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "model": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 256
-- },
-- "models": {
-- "type": "array",
-- "minItems": 1,
-- "maxItems": 8,
-- "items": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 256
-- }
-- },
-- "provider": {
++ "direction": {
"type": "object",
"additionalProperties": false,
++ "required": [
++ "implementation_requested",
++ "target_basis",
++ "requires_design_decision",
++ "evidence"
++ ],
"properties": {
-- "order": {
-- "type": "array",
-- "maxItems": 64,
-- "uniqueItems": true,
-- "items": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]{1,100}$"
-- }
-- },
-- "only": {
-- "type": "array",
-- "maxItems": 64,
-- "uniqueItems": true,
-- "items": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]{1,100}$"
-- }
-- },
-- "ignore": {
-- "type": "array",
-- "maxItems": 64,
-- "uniqueItems": true,
-- "items": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]{1,100}$"
-- }
-- },
-- "allow_fallbacks": {
++ "implementation_requested": {
"type": "boolean"
},
-- "sort": {
++ "target_basis": {
"enum": [
-- "price",
-- "throughput",
-- "latency",
-- "quality",
-- "value"
++ "specified",
++ "existing-standard",
++ "undetermined"
]
},
-- "max_price": {
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "prompt": {
-- "type": "number",
-- "minimum": 0
-- },
-- "completion": {
-- "type": "number",
-- "minimum": 0
++ "requires_design_decision": {
++ "type": "boolean"
++ },
++ "evidence": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "trigger_id",
++ "quote"
++ ],
++ "properties": {
++ "trigger_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "quote": {
++ "type": "string",
++ "minLength": 1
++ }
}
}
-- },
-- "data_collection": {
-- "enum": [
-- "allow",
-- "deny"
-- ]
-- },
-- "zdr": {
-- "type": "boolean"
}
}
},
-- "usage": {
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "include": {
-- "type": "boolean"
++ "rule_assessments": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "rule_id",
++ "matched",
++ "reason"
++ ],
++ "properties": {
++ "matched": {
++ "type": "boolean"
++ },
++ "reason": {
++ "type": "string",
++ "minLength": 1
++ },
++ "rule_id": {
++ "type": "string",
++ "minLength": 1
++ }
}
}
++ },
++ "reason": {
++ "type": "string",
++ "minLength": 1
++ },
++ "would_accept": {
++ "type": "boolean"
++ },
++ "ignored_from_card": {
++ "type": "boolean"
}
-- },
-- "description": "OpenRouter-compatible model fallback and provider policy controls. Prices are USD per million tokens."
++ }
}
},
-- "exchange.request-preset": {
++ "agent.ticket": {
"version": "1.0.0",
-- "owner": "exchange",
++ "owner": "actor",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/exchange/request-preset.v1.json",
-- "title": "ExchangeRequestPreset",
++ "$id": "https://openvibe.network/contracts/agent/ticket.v1.json",
++ "title": "AgentTicket",
++ "description": "Authorized work with an immutable mandate. Policy changes notify, never cancel. Revalidate before resuming an ended ticket; bots and CI cannot resume it. Stage applies to open tickets.",
"type": "object",
"additionalProperties": false,
"required": [
-- "name"
-- ],
-- "anyOf": [
-- {
-- "required": [
-- "model"
-- ]
-- },
-- {
-- "required": [
-- "models"
-- ]
-- }
++ "id",
++ "trigger_id",
++ "mandate",
++ "state",
++ "stage",
++ "threads"
],
"properties": {
-- "model": {
++ "id": {
"type": "string",
-- "minLength": 1,
-- "maxLength": 256
++ "minLength": 1
},
-- "models": {
-- "type": "array",
-- "minItems": 1,
-- "maxItems": 8,
-- "items": {
-- "type": "string",
-- "minLength": 1,
-- "maxLength": 256
-- }
++ "trigger_id": {
++ "type": "string",
++ "minLength": 1
},
-- "provider": {
++ "mandate": {
"type": "object",
"additionalProperties": false,
++ "required": [
++ "policy_version",
++ "scope",
++ "strength",
++ "matched_rules",
++ "actor",
++ "source_scope",
++ "budget"
++ ],
"properties": {
-- "order": {
-- "type": "array",
-- "maxItems": 64,
-- "uniqueItems": true,
-- "items": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]{1,100}$"
-- }
++ "policy_version": {
++ "type": "string",
++ "minLength": 1
},
-- "only": {
-- "type": "array",
-- "maxItems": 64,
-- "uniqueItems": true,
-- "items": {
-- "type": "string",
-- "pattern": "^[a-zA-Z0-9._-]{1,100}$"
-- }
++ "scope": {
++ "type": "string",
++ "minLength": 1
},
-- "ignore": {
++ "strength": {
++ "enum": [
++ "explicit",
++ "inferred"
++ ]
++ },
++ "matched_rules": {
"type": "array",
-- "maxItems": 64,
-- "uniqueItems": true,
"items": {
"type": "string",
-- "pattern": "^[a-zA-Z0-9._-]{1,100}$"
++ "minLength": 1
++ },
++ "uniqueItems": true
++ },
++ "actor": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "source",
++ "id",
++ "kind"
++ ],
++ "properties": {
++ "source": {
++ "type": "string",
++ "minLength": 1
++ },
++ "id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "kind": {
++ "enum": [
++ "person",
++ "bot",
++ "system"
++ ]
++ }
}
},
-- "allow_fallbacks": {
-- "type": "boolean"
-- },
-- "sort": {
-- "enum": [
-- "price",
-- "throughput",
-- "latency",
-- "quality",
-- "value"
-- ]
++ "source_scope": {
++ "type": "string",
++ "minLength": 1
},
-- "max_price": {
++ "budget": {
"type": "object",
"additionalProperties": false,
++ "required": [
++ "usd",
++ "tokens",
++ "wall_minutes"
++ ],
"properties": {
-- "prompt": {
++ "usd": {
"type": "number",
"minimum": 0
},
-- "completion": {
++ "tokens": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "wall_minutes": {
"type": "number",
"minimum": 0
}
}
-- },
-- "data_collection": {
-- "enum": [
-- "allow",
-- "deny"
-- ]
-- },
-- "zdr": {
-- "type": "boolean"
}
}
},
-- "name": {
-- "type": "string",
-- "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
-- },
-- "system": {
-- "type": "string",
-- "maxLength": 32000
-- },
-- "temperature": {
-- "type": "number",
-- "minimum": 0,
-- "maximum": 2
-- },
-- "top_p": {
-- "type": "number",
-- "minimum": 0,
-- "maximum": 1
-- },
-- "max_tokens": {
-- "type": "integer",
-- "minimum": 1,
-- "maximum": 64000
++ "state": {
++ "enum": [
++ "open",
++ "ended"
++ ]
},
-- "seed": {
-- "type": "integer"
++ "stage": {
++ "$ref": "stage.v1.json"
},
-- "response_format": {
-- "type": "object"
++ "threads": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ },
++ "minItems": 1,
++ "uniqueItems": true
}
-- },
-- "description": "A person-owned request preset with model fallbacks, system prompt, routing and sampling defaults."
++ }
}
},
-- "exchange.generation": {
++ "agent.report": {
"version": "1.0.0",
-- "owner": "exchange",
++ "owner": "actor",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/exchange/generation.v1.json",
-- "title": "ExchangeGeneration",
++ "$id": "https://openvibe.network/contracts/agent/report.v1.json",
++ "title": "AgentReport",
++ "description": "Executor report. A PR alone is not ready; a draft is blocked. human_action carries exactly one question unchanged to the person.",
"type": "object",
"additionalProperties": false,
"required": [
-- "id",
-- "model",
-- "provider",
-- "cost",
-- "total_cost",
-- "latency",
-- "tokens_prompt",
-- "tokens_completion",
-- "created_at"
++ "ticket_id",
++ "assignment_id",
++ "state",
++ "summary",
++ "pr",
++ "tests_run",
++ "risks"
],
"properties": {
-- "id": {
++ "ticket_id": {
"type": "string",
-- "minLength": 1,
-- "maxLength": 256
++ "minLength": 1
},
-- "model": {
-- "type": [
-- "string",
-- "null"
++ "assignment_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "state": {
++ "enum": [
++ "progress",
++ "waiting",
++ "ready",
++ "blocked",
++ "failed",
++ "dropped"
]
},
-- "provider": {
++ "summary": {
++ "type": "string",
++ "minLength": 1
++ },
++ "pr": {
"type": [
"string",
"null"
-- ]
-- },
-- "cost": {
-- "type": "number",
-- "minimum": 0
-- },
-- "total_cost": {
-- "type": "number",
-- "minimum": 0
-- },
-- "latency": {
-- "type": "number",
-- "minimum": 0
++ ],
++ "format": "uri"
},
-- "tokens_prompt": {
-- "type": "integer",
-- "minimum": 0
++ "tests_run": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ }
},
-- "tokens_completion": {
-- "type": "integer",
-- "minimum": 0
++ "risks": {
++ "type": "array",
++ "items": {
++ "type": "string",
++ "minLength": 1
++ }
},
-- "created_at": {
-- "type": "string",
-- "format": "date-time"
++ "human_action": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "question"
++ ],
++ "properties": {
++ "question": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
}
-- },
-- "description": "Owner-scoped request accounting. Cost is USD and latency is milliseconds; prompts and outputs are excluded."
++ }
}
},
-- "exchange.market": {
++ "agent.attention": {
"version": "1.0.0",
-- "owner": "ai",
++ "owner": "actor",
"status": "active",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
-- "$id": "https://openvibe.network/contracts/exchange/market.v1.json",
-- "title": "ExchangeMarket",
-- "description": "Public own-page provider offers, enabled or not; prices are observations, not routing quotes. Paged by limit (1-500) and cursor, filterable by maker, open_weights and kind. No credentials or account identifiers. Model metadata preserves per-field provenance and stale state.",
++ "$id": "https://openvibe.network/contracts/agent/attention.v1.json",
++ "title": "AgentAttention",
++ "description": "One structured question awaiting a person. Authorized independent work may continue.",
"type": "object",
++ "additionalProperties": false,
"required": [
-- "$schema",
-- "generated_at",
-- "metadata",
-- "total_models",
-- "total_offers",
-- "offers",
-- "next_cursor"
++ "id",
++ "ticket_id",
++ "question",
++ "state",
++ "created_at"
],
"properties": {
-- "$schema": {
-- "const": "exchange.market@1"
-- },
-- "generated_at": {
++ "id": {
"type": "string",
-- "format": "date-time"
-- },
-- "metadata": {
-- "type": "object",
-- "required": [
-- "source",
-- "checked_at",
-- "stale"
-- ],
-- "properties": {
-- "source": {
-- "const": "https://models.dev/api.json"
-- },
-- "checked_at": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "format": "date-time"
-- },
-- "stale": {
-- "type": "boolean"
-- }
-- },
-- "additionalProperties": false
++ "minLength": 1
},
-- "total_models": {
-- "type": "integer",
-- "minimum": 0
++ "ticket_id": {
++ "type": "string",
++ "minLength": 1
},
-- "total_offers": {
-- "type": "integer",
-- "minimum": 0
++ "question": {
++ "type": "string",
++ "minLength": 1
},
-- "next_cursor": {
-- "type": [
-- "string",
-- "null"
++ "state": {
++ "enum": [
++ "open",
++ "answered",
++ "dismissed"
]
},
-- "offers": {
-- "type": "array",
-- "maxItems": 500,
-- "items": {
-- "type": "object",
-- "required": [
-- "maker",
-- "licence",
-- "release_date",
-- "knowledge_cutoff",
-- "price_checked_at",
-- "model",
-- "provider",
-- "provider_name",
-- "provider_model",
-- "name",
-- "routed",
-- "uncensored",
-- "context",
-- "max_output",
-- "kind",
-- "provider_access",
-- "open_weights",
-- "price_source",
-- "price",
-- "field_sources",
-- "modalities"
-- ],
-- "properties": {
-- "maker": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "licence": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "release_date": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "knowledge_cutoff": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "price_checked_at": {
-- "type": [
-- "string",
-- "null"
-- ]
-- },
-- "model": {
-- "type": "string",
-- "minLength": 1
-- },
-- "provider": {
-- "type": "string",
-- "minLength": 1
-- },
-- "provider_name": {
-- "type": "string",
-- "minLength": 1
-- },
-- "provider_model": {
-- "type": "string",
-- "minLength": 1
-- },
-- "name": {
-- "type": "string",
-- "minLength": 1
-- },
-- "routed": {
-- "type": "boolean"
-- },
-- "uncensored": {
-- "type": "boolean"
-- },
-- "context": {
-- "type": [
-- "number",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "max_output": {
-- "type": [
-- "number",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "kind": {
-- "enum": [
-- "chat",
-- "embedding",
-- "stt",
-- "image"
-- ]
-- },
-- "provider_access": {
-- "enum": [
-- "OWN_DEPLOYMENT",
-- "AUTHORIZED_WHOLESALE",
-- "CUSTOMER_BYOK",
-- "UNVERIFIED",
-- "RESTRICTED"
-- ]
-- },
-- "open_weights": {
-- "type": [
-- "boolean",
-- "null"
-- ]
-- },
-- "price_source": {
-- "type": [
-- "string",
-- "null"
-- ],
-- "format": "uri"
-- },
-- "price": {
-- "type": "object",
-- "required": [
-- "in",
-- "out",
-- "cached",
-- "currency",
-- "per"
-- ],
-- "properties": {
-- "in": {
-- "type": [
-- "number",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "out": {
-- "type": [
-- "number",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "cached": {
-- "type": [
-- "number",
-- "null"
-- ],
-- "minimum": 0
-- },
-- "currency": {
-- "const": "USD"
-- },
-- "per": {
-- "const": "1M tokens"
-- }
-- },
-- "additionalProperties": false
-- },
-- "field_sources": {
-- "type": "object",
-- "additionalProperties": false,
-- "properties": {
-- "maker": {
-- "type": "string",
-- "format": "uri"
-- },
-- "context": {
-- "type": "string",
-- "format": "uri"
-- },
-- "max_output": {
-- "type": "string",
-- "format": "uri"
-- },
-- "open_weights": {
-- "type": "string",
-- "format": "uri"
-- },
-- "licence": {
-- "type": "string",
-- "format": "uri"
-- },
-- "release_date": {
-- "type": "string",
-- "format": "uri"
-- },
-- "knowledge_cutoff": {
-- "type": "string",
-- "format": "uri"
-- },
-- "modalities": {
-- "type": "string",
-- "format": "uri"
-- }
-- }
-- },
-- "modalities": {
-- "type": [
-- "object",
-- "null"
-- ],
-- "required": [
-- "input",
-- "output"
-- ],
-- "properties": {
-- "input": {
-- "type": "array",
-- "items": {
-- "type": "string"
-- }
-- },
-- "output": {
-- "type": "array",
-- "items": {
-- "type": "string"
-- }
-- }
-- },
-- "additionalProperties": false
-- }
-- },
-- "additionalProperties": false
-- }
++ "created_at": {
++ "type": "string",
++ "format": "date-time"
++ },
++ "answer": {
++ "type": "string",
++ "minLength": 1
}
-- },
-- "additionalProperties": false
++ }
++ }
++ },
++ "agent.stage": {
++ "version": "1.0.0",
++ "owner": "actor",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/agent/stage.v1.json",
++ "title": "AgentStage",
++ "description": "Closed open-ticket stages. First matching row wins: delivery failure, attention, ready report, blocked/failed report without a later human input, absent/pending assignment, waiting report/ended assignment, working. Labels and conditions: docs/agent-work.md.",
++ "type": "string",
++ "enum": [
++ "person/delivery",
++ "person/answer",
++ "person/review",
++ "person/blocked",
++ "person/failed",
++ "working/queued",
++ "idle",
++ "working"
++ ]
++ }
++ },
++ "ai.effort": {
++ "version": "1.0.0",
++ "owner": "ai",
++ "status": "active",
++ "schema": {
++ "$schema": "https://json-schema.org/draft/2020-12/schema",
++ "$id": "https://openvibe.network/contracts/ai/effort.v1.json",
++ "title": "AiEffort",
++ "description": "Portable reasoning effort. auto resolves to the task default; unsupported model controls are ignored and receipt effort_applied is null.",
++ "type": "string",
++ "enum": [
++ "auto",
++ "low",
++ "medium",
++ "high",
++ "max"
++ ]
}
}
}
ddiff --git a/generated/openapi/actor.json b/generated/openapi/actor.json
iindex 462352c3..b2d9fe0a 100644
---- a/generated/openapi/actor.json
++++ b/generated/openapi/actor.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Actor API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Actor as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Actor as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/ai.json b/generated/openapi/ai.json
iindex e764ffe1..021d3eb3 100644
---- a/generated/openapi/ai.json
++++ b/generated/openapi/ai.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.AI API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.AI as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.AI as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
@@@ -5875,6 +5875,18 @@
}
]
},
++ "ai.effort.v1": {
++ "title": "AiEffort",
++ "description": "Portable reasoning effort. auto resolves to the task default; unsupported model controls are ignored and receipt effort_applied is null.",
++ "type": "string",
++ "enum": [
++ "auto",
++ "low",
++ "medium",
++ "high",
++ "max"
++ ]
++ },
"ai.me-credential-list.v1": {
"title": "AiMeCredentialListV1",
"description": "ai.me-credential-list@1 (OpenVibe.AI; L36 Y1): GET /api/v1/me/credentials — every provider key the person holds themselves, without any key. Ordered by provider so a page can render it steadily.",
@@@ -7817,6 +7829,31 @@
}
},
"description": "Run with the person's own provider key (ai.credential@1) that this service stored, instead of a shared route: only that provider is called (no fallback), the result is never cached or taken from the cache, the shared paid budget is not spent, and the credential's own daily budget applies (429 quota.exceeded). Chat operations only (text, JSON, vision)."
++ },
++ "effort": {
++ "$ref": "#/components/schemas/ai.effort.v1"
++ },
++ "ladder_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "rung": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "agent_role": {
++ "enum": [
++ "router",
++ "gate",
++ "assessor",
++ "worker",
++ "subagent",
++ "reviewer"
++ ]
++ },
++ "kind": {
++ "type": "string",
++ "pattern": "^[a-z][a-z0-9_.-]{0,99}$"
}
},
"anyOf": [
@@@ -8529,6 +8566,62 @@
}
],
"description": "What actually answered: the model and its source, and the machine when one did; null for a run outside a task."
++ },
++ "effort_requested": {
++ "$ref": "#/components/schemas/ai.effort.v1"
++ },
++ "effort_applied": {
++ "anyOf": [
++ {
++ "enum": [
++ "low",
++ "medium",
++ "high",
++ "max"
++ ]
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "effort_rung": {
++ "type": "integer",
++ "minimum": 0
++ },
++ "ladder_id": {
++ "type": "string",
++ "minLength": 1
++ },
++ "ladder": {
++ "type": "array",
++ "items": {
++ "type": "object",
++ "additionalProperties": false,
++ "required": [
++ "model",
++ "effort",
++ "cost_usd",
++ "outcome"
++ ],
++ "properties": {
++ "model": {
++ "type": "string",
++ "minLength": 1
++ },
++ "effort": {
++ "$ref": "#/components/schemas/ai.effort.v1"
++ },
++ "cost_usd": {
++ "type": "number",
++ "minimum": 0
++ },
++ "outcome": {
++ "type": "string",
++ "minLength": 1
++ }
++ }
++ }
}
}
},
ddiff --git a/generated/openapi/bench.json b/generated/openapi/bench.json
iindex 1591b22c..590c70fb 100644
---- a/generated/openapi/bench.json
++++ b/generated/openapi/bench.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Bench API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Bench as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Bench as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/billing.json b/generated/openapi/billing.json
iindex f9b311ef..9fa7de06 100644
---- a/generated/openapi/billing.json
++++ b/generated/openapi/billing.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Billing API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Billing as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Billing as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/blog.json b/generated/openapi/blog.json
iindex a2aa5f3d..7c515a37 100644
---- a/generated/openapi/blog.json
++++ b/generated/openapi/blog.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Blog API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Blog as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Blog as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/bot.json b/generated/openapi/bot.json
iindex 1ea9fbac..910563e9 100644
---- a/generated/openapi/bot.json
++++ b/generated/openapi/bot.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Bot API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Bot as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Bot as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/chat.json b/generated/openapi/chat.json
iindex 19e9b014..03b56998 100644
---- a/generated/openapi/chat.json
++++ b/generated/openapi/chat.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Chat API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Chat as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Chat as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/codes.json b/generated/openapi/codes.json
iindex 519e354d..235531b3 100644
---- a/generated/openapi/codes.json
++++ b/generated/openapi/codes.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Codes API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Codes as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Codes as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/community.json b/generated/openapi/community.json
iindex ed81586c..d57098f3 100644
---- a/generated/openapi/community.json
++++ b/generated/openapi/community.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Community API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Community as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Community as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/connect.json b/generated/openapi/connect.json
iindex 86582c2b..cdf5c509 100644
---- a/generated/openapi/connect.json
++++ b/generated/openapi/connect.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe Connect API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe Connect as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe Connect as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/coupons.json b/generated/openapi/coupons.json
iindex 4774bb76..be693f97 100644
---- a/generated/openapi/coupons.json
++++ b/generated/openapi/coupons.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Coupons API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Coupons as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Coupons as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/deals.json b/generated/openapi/deals.json
iindex 6c5ac5a4..203dd92d 100644
---- a/generated/openapi/deals.json
++++ b/generated/openapi/deals.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Deals API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Deals as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Deals as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/design.json b/generated/openapi/design.json
iindex 4e7451f5..07e5281d 100644
---- a/generated/openapi/design.json
++++ b/generated/openapi/design.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Design API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Design as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Design as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/domains.json b/generated/openapi/domains.json
iindex ed78ad23..e9d12115 100644
---- a/generated/openapi/domains.json
++++ b/generated/openapi/domains.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Domains API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Domains as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Domains as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/events.json b/generated/openapi/events.json
iindex 23aff446..635b5651 100644
---- a/generated/openapi/events.json
++++ b/generated/openapi/events.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Events API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Events as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Events as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/exchange.json b/generated/openapi/exchange.json
iindex a0d0226d..0b1af836 100644
---- a/generated/openapi/exchange.json
++++ b/generated/openapi/exchange.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Exchange API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Exchange as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Exchange as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/food.json b/generated/openapi/food.json
iindex 3455f970..68fd34e2 100644
---- a/generated/openapi/food.json
++++ b/generated/openapi/food.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Food API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Food as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Food as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/games.json b/generated/openapi/games.json
iindex 65df5b9a..c1abb6a7 100644
---- a/generated/openapi/games.json
++++ b/generated/openapi/games.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Games API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Games as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Games as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/git.json b/generated/openapi/git.json
iindex 26890425..a97015f7 100644
---- a/generated/openapi/git.json
++++ b/generated/openapi/git.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Git API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Git as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Git as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/host.json b/generated/openapi/host.json
iindex c1a359cc..e5ff3c92 100644
---- a/generated/openapi/host.json
++++ b/generated/openapi/host.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Host API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Host as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Host as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/inventory.json b/generated/openapi/inventory.json
iindex f5236069..a310d289 100644
---- a/generated/openapi/inventory.json
++++ b/generated/openapi/inventory.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Inventory API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Inventory as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Inventory as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/live.json b/generated/openapi/live.json
iindex 6cd5d927..4fdfeff2 100644
---- a/generated/openapi/live.json
++++ b/generated/openapi/live.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Live API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Live as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Live as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/mail.json b/generated/openapi/mail.json
iindex d651c8f0..e814bcea 100644
---- a/generated/openapi/mail.json
++++ b/generated/openapi/mail.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Mail API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Mail as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Mail as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/media-hub.json b/generated/openapi/media-hub.json
iindex a8cfc7dc..93832579 100644
---- a/generated/openapi/media-hub.json
++++ b/generated/openapi/media-hub.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.MediaHub API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.MediaHub as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.MediaHub as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/media.json b/generated/openapi/media.json
iindex f1f95909..84e0b7aa 100644
---- a/generated/openapi/media.json
++++ b/generated/openapi/media.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Media API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Media as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Media as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/network.json b/generated/openapi/network.json
iindex 7fa50839..f256f464 100644
---- a/generated/openapi/network.json
++++ b/generated/openapi/network.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Network API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Network as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Network as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/news.json b/generated/openapi/news.json
iindex dcce0267..94f43202 100644
---- a/generated/openapi/news.json
++++ b/generated/openapi/news.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.News API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.News as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.News as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/openre.json b/generated/openapi/openre.json
iindex 37cfd257..ad389582 100644
---- a/generated/openapi/openre.json
++++ b/generated/openapi/openre.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenRestream API",
-- "version": "0.383.0",
-- "description": "Routes of OpenRestream as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenRestream as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/play.json b/generated/openapi/play.json
iindex 05aefaa5..a23e4bc9 100644
---- a/generated/openapi/play.json
++++ b/generated/openapi/play.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Play API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Play as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Play as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/quest.json b/generated/openapi/quest.json
iindex 0b7da812..e3bd9eb8 100644
---- a/generated/openapi/quest.json
++++ b/generated/openapi/quest.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Quest API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Quest as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Quest as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/report.json b/generated/openapi/report.json
iindex bc4d81d3..8227a80e 100644
---- a/generated/openapi/report.json
++++ b/generated/openapi/report.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Report API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Report as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Report as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/reviews.json b/generated/openapi/reviews.json
iindex 9e85c62c..3b714254 100644
---- a/generated/openapi/reviews.json
++++ b/generated/openapi/reviews.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Reviews API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Reviews as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Reviews as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/run.json b/generated/openapi/run.json
iindex 520cb7cf..c2e6f81a 100644
---- a/generated/openapi/run.json
++++ b/generated/openapi/run.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Run API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Run as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Run as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/search.json b/generated/openapi/search.json
iindex abc58f0a..1e141d58 100644
---- a/generated/openapi/search.json
++++ b/generated/openapi/search.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Search API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Search as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Search as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/services.json b/generated/openapi/services.json
iindex 1609adbe..0b2287c0 100644
---- a/generated/openapi/services.json
++++ b/generated/openapi/services.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Services API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Services as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Services as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/sources.json b/generated/openapi/sources.json
iindex 9dd2673b..3920198e 100644
---- a/generated/openapi/sources.json
++++ b/generated/openapi/sources.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Sources API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Sources as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Sources as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/space.json b/generated/openapi/space.json
iindex cac438fc..4325b9dd 100644
---- a/generated/openapi/space.json
++++ b/generated/openapi/space.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Space API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Space as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Space as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/tips.json b/generated/openapi/tips.json
iindex 8f4de417..88a2c680 100644
---- a/generated/openapi/tips.json
++++ b/generated/openapi/tips.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Tips API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Tips as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Tips as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/today.json b/generated/openapi/today.json
iindex 34da8b66..89699f80 100644
---- a/generated/openapi/today.json
++++ b/generated/openapi/today.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Today API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Today as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Today as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/tools.json b/generated/openapi/tools.json
iindex 8fe503ae..34b80752 100644
---- a/generated/openapi/tools.json
++++ b/generated/openapi/tools.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Tools API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Tools as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Tools as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/trade.json b/generated/openapi/trade.json
iindex 7a26cc7a..adadf1c4 100644
---- a/generated/openapi/trade.json
++++ b/generated/openapi/trade.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Trade API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Trade as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Trade as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/vip.json b/generated/openapi/vip.json
iindex 234699c2..6216792a 100644
---- a/generated/openapi/vip.json
++++ b/generated/openapi/vip.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.VIP API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.VIP as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.VIP as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/vision.json b/generated/openapi/vision.json
iindex 9bd32d45..b5657fa9 100644
---- a/generated/openapi/vision.json
++++ b/generated/openapi/vision.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Vision API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Vision as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Vision as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/watch.json b/generated/openapi/watch.json
iindex eb41e8ba..3f667e2e 100644
---- a/generated/openapi/watch.json
++++ b/generated/openapi/watch.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Watch API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Watch as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Watch as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/wiki.json b/generated/openapi/wiki.json
iindex 4c4e5d27..91a745fa 100644
---- a/generated/openapi/wiki.json
++++ b/generated/openapi/wiki.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Wiki API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Wiki as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Wiki as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/work.json b/generated/openapi/work.json
iindex c702b5b2..7e70dfa6 100644
---- a/generated/openapi/work.json
++++ b/generated/openapi/work.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Work API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Work as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Work as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/openapi/zone.json b/generated/openapi/zone.json
iindex 4c2e9195..1a3537b4 100644
---- a/generated/openapi/zone.json
++++ b/generated/openapi/zone.json
@@@ -3,8 +3,8 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "OpenVibe.Zone API",
-- "version": "0.383.0",
-- "description": "Routes of OpenVibe.Zone as the OpenVibe contracts describe them (openvibe-contracts 0.383.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
++ "version": "0.384.0",
++ "description": "Routes of OpenVibe.Zone as the OpenVibe contracts describe them (openvibe-contracts 0.384.0): each operation lists the capabilities it performs; a token for the service's audience must carry one of them unless the route is open. Generated by openvibe-contracts lib/openapi.js; do not edit.",
"license": {
"name": "MIT",
"identifier": "MIT"
ddiff --git a/generated/typescript/index.d.ts b/generated/typescript/index.d.ts
iindex cab42b6c..0a7fd0d3 100644
---- a/generated/typescript/index.d.ts
++++ b/generated/typescript/index.d.ts
@@@ -162656,568 +162656,6 @@ export interface AiAttributionQuota {
updated_at: string;
}
--/** [email protected] (owner: ai) */
--/**
-- * Body of POST /api/v1/runs on OpenVibe.AI (capability ai.run.create; ADR-015). Runs the newest active version of a workflow (or the given active or deprecated version) on input that must match that workflow version's own input schema; per-workflow input and output schemas live in AI's registry (GET /api/v1/workflows/:key), not here. The token's ns claim limits which workflow namespaces may run (403 capability.namespace_denied). ?wait=ms waits for the result: 201 finished or served from cache, 202 still queued/running (poll GET /api/v1/runs/:id), 200 an idempotent replay. Errors are problem+json: 404 workflow.not_found, 409 workflow.inactive, 409 idempotency.conflict, 413 input.too_large, 422 input.invalid, 429 quota.exceeded or queue.full with Retry-After. The direct operations POST /api/v1/{chat,generate,summarize,classify,extract,enrich,embed} take the same fields (except workflow and version) with the input fields at the top level and run workflow ai.<op>. target (EntityRef): what the output is about, part of the cache scope and a run filter. attribution (EntityRef): what the spend is attributed to for quotas and usage. on_behalf_of (SubjectRef): the person or actor the caller acts for, part of the cache scope and per-actor quotas. options.latency asks for a slower class than the workflow allows (options.deadline_hours says how long a batch run may take); the run answers with the class it ran in (run.latency_class), the tier it was priced on (run.service_tier) and, when the ask was clamped, the class it really ran in (run.latency_clamped).
-- */
--export type AiRunRequest = {
-- [k: string]: unknown | undefined;
--} & {
-- /**
-- * A registered AI task (ai.task@1, GET /api/v1/tasks). Its workflow runs with the task's resolved choice; choice overrides it for this run.
-- */
-- task?: string;
-- choice?: AiChoiceV1;
-- /**
-- * Workflow key, <namespace>.<name> (live.chat_reply, news.summarize_story, network.site_copy…).
-- */
-- workflow?: string;
-- /**
-- * Pin a workflow version (active or deprecated). Omitted: the newest active version.
-- */
-- version?: number;
-- /**
-- * Workflow input; validated against the workflow version's input_schema. Default {}.
-- */
-- input?: {};
-- target?: EntityRef;
-- attribution?: EntityRef;
-- on_behalf_of?: SubjectRef;
-- /**
-- * Same (requester, key) returns the existing run; a different workflow or input under it is 409 idempotency.conflict. The Idempotency-Key header is used when this is absent.
-- */
-- idempotency_key?: string;
-- options?: {
-- /**
-- * false skips the scoped cache lookup and store.
-- */
-- cache?: boolean;
-- /**
-- * Keep raw prompts and responses in the request log, only when AI runs with raw debug logging on.
-- */
-- debug?: boolean;
-- /**
-- * The class the caller asks for: how long the caller may wait, and what the router may do with the wait. interactive (the default) answers as soon as the provider can; background may take minutes, and the run is priced on the cheapest tier that can wait (a Flex tier, a provider's off-peak hours, the host's own idle model); batch may take hours, and the run is queued and answered through a provider's own batch API. The class is the workflow's own (the route's constraints.latency_class): a caller may ask for a SLOWER class and never for a faster one. A faster ask is not refused: the run happens in the workflow's own class and the answer says so (run.latency_clamped).
-- */
-- latency?: "interactive" | "background" | "batch";
-- /**
-- * For a batch run: how long the answer may take, in hours (1 to 72). The run is queued and answered within the deadline; a deadline the provider cannot meet sends the run back to the ordinary path. Omitted: the service's own default.
-- */
-- deadline_hours?: number;
-- };
-- /**
-- * Run with the person's own provider key (ai.credential@1) that this service stored, instead of a shared route: only that provider is called (no fallback), the result is never cached or taken from the cache, the shared paid budget is not spent, and the credential's own daily budget applies (429 quota.exceeded). Chat operations only (text, JSON, vision).
-- */
-- credential?: {
-- subject: string;
-- };
--};
--
--/** [email protected] (owner: ai) */
--/**
-- * A workflow run on OpenVibe.AI (ADR-015; server/runs.js decode): the `run` member of every run response (POST /api/v1/runs and the direct operations, GET /api/v1/runs/:id, cancel, retry) and each item of GET /api/v1/runs { runs }. Output is attributable to workflow + version + template version + route version + provider/model + run id, never to a person. A draft stays a draft: products store it with ai/ai_assisted authorship and publish nothing until a person reviews it. input keeps no inline media (replaced by data_url_sha256 and data_url_bytes) and no passthrough prompt ({ not_retained }); output is null until the run succeeded or was served from cache and then matches the workflow version's output_schema. requester is the token principal (service, app or mod). A run interrupted by a restart or shutdown ends failed with error.code run.interrupted. latency_class is the class the run really ran in, service_tier the tier it was priced on, and latency_clamped set when the caller asked for a faster class than the workflow allows. explain says why the run answered as it did: the task it read, the candidates it ranked and every attempt.
-- */
--export interface AiRun {
-- id: string;
-- /**
-- * Terminal: succeeded, failed, cancelled, cached (a scoped cache hit, no provider call; provenance.cached_from names the run it reused).
-- */
-- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "cached";
-- workflow: {
-- key: string;
-- version: number;
-- };
-- /**
-- * The prompt template of the workflow's llm step; null for workflows without one.
-- */
-- template: {
-- key: string;
-- version: number | null;
-- } | null;
-- /**
-- * Provider route; version null while the route is unresolved or disabled.
-- */
-- route: {
-- key: string;
-- version: number | null;
-- } | null;
-- requester: SubjectRef;
-- on_behalf_of: SubjectRef | null;
-- attribution: EntityRef | null;
-- /**
-- * The requester's service id when the requester is a service.
-- */
-- source_service: string | null;
-- target: EntityRef | null;
-- /**
-- * The retained input (see the description).
-- */
-- input: {};
-- /**
-- * Workflow output, or null.
-- */
-- output: {} | null;
-- error: {
-- /**
-- * run.cancelled, run.interrupted, run.internal, output.invalid, output.empty, provider.unavailable, route.unavailable, source.unavailable, media.unresolvable…
-- */
-- code: string;
-- detail: string | null;
-- } | null;
-- /**
-- * Produced by the stub provider; never served to production callers and never cached.
-- */
-- synthetic: boolean;
-- provenance: {
-- origin: "ai";
-- workflow: string;
-- workflow_version: number;
-- template_version: number | null;
-- route: string | null;
-- route_version: number | null;
-- provider: string | null;
-- model: string | null;
-- /**
-- * The primary provider was degraded and the run fell back (ADR-015: fallbacks are recorded).
-- */
-- fallback_used: boolean;
-- run_id: string;
-- cached_from: string | null;
-- synthetic: boolean;
-- };
-- usage: {
-- tokens_in: number;
-- tokens_out: number;
-- cost_usd: number;
-- /**
-- * Provider calls made (skipped routes not counted).
-- */
-- attempts: number;
-- };
-- /**
-- * Citations stored for the run (GET /api/v1/runs/:id/citations): the sources the workflow was given, and any the requester attached later.
-- */
-- citations_count: number;
-- /**
-- * The class the run really ran in: how long the caller was willing to wait. It is the workflow's own class (the route's constraints.latency_class) or a slower one the caller asked for (options.latency); a caller can never make a run faster than its workflow allows.
-- */
-- latency_class?: "interactive" | "background" | "batch";
-- /**
-- * The tier the run was priced on: the tier the provider really served (standard, flex, batch) or the one the router chose (offpeak inside a provider's off-peak hours, local on the host's own model). Null while the run has not answered. A provider that does not say which tier it served is priced at the list price: a saving nobody confirmed is not a saving.
-- */
-- service_tier?: "standard" | "flex" | "batch" | "offpeak" | "local" | null;
-- /**
-- * Set when the caller asked for a faster class than the workflow allows: the class asked for and the class the run really ran in. The run is never refused for it.
-- */
-- latency_clamped?: {
-- /**
-- * The class the caller asked for.
-- */
-- asked: "interactive" | "background" | "batch";
-- /**
-- * The class the run really ran in.
-- */
-- used: "interactive" | "background" | "batch";
-- } | null;
-- retry_of: string | null;
-- idempotency_key: string | null;
-- trace_id: string | null;
-- created_at: string;
-- started_at: string | null;
-- finished_at: string | null;
-- /**
-- * Why the run answered as it did: the task-aware router's explain (L33 P3, L36 Y7). task is the requirement set it read from the request, ranked the candidates it considered and why, attempts every provider it tried with why it was chosen and why it failed, and the placement view it ranked from (objective, reasons, selected, candidates). A run that never reached a provider has no explain.
-- */
-- explain?: {
-- /**
-- * The objective the pool planned with (cheapest, balanced, correctness, own-keys, own-machine), or null for a pinned route.
-- */
-- objective: string | null;
-- /**
-- * Why the router chose what it chose, in words.
-- */
-- reasons: string[];
-- /**
-- * The provider that answered (provider, or provider/model, or the machine that answered), or null when nothing answered.
-- */
-- selected: string | {} | null;
-- /**
-- * Every candidate the pool considered, with why it was excluded when it was.
-- */
-- candidates: {
-- provider: string;
-- model?: string | null;
-- eligible?: boolean;
-- excluded_reason?: string | null;
-- cost?: number | null;
-- latency?: number | null;
-- [k: string]: unknown | undefined;
-- }[];
-- /**
-- * Who paid for the run: the network, the person's own key, their own machine, or a project's own provider.
-- */
-- paid_by?: string | null;
-- /**
-- * The requirement set the router read off the request, with no model call.
-- */
-- task?: {
-- /**
-- * The request carried a picture.
-- */
-- vision: boolean;
-- /**
-- * The request carried tools.
-- */
-- tools: boolean;
-- /**
-- * The request asked for JSON out.
-- */
-- json: boolean;
-- /**
-- * The context window the request needs, in tokens.
-- */
-- min_context: number;
-- /**
-- * How much thinking the request asked for.
-- */
-- reasoning: "none" | "some" | "deep";
-- /**
-- * What the request wants out.
-- */
-- output: "text" | "image" | "audio" | "video";
-- /**
-- * How heavy the work is.
-- */
-- weight: "light" | "standard" | "heavy";
-- };
-- /**
-- * The candidates the router ranked for this task, best first, each with its reason.
-- *
-- * @maxItems 5
-- */
-- ranked?:
-- | []
-- | [
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- }
-- ]
-- | [
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- }
-- ]
-- | [
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- }
-- ]
-- | [
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- }
-- ]
-- | [
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- },
-- {
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
-- */
-- why: string;
-- /**
-- * The input price per million tokens, or null when the price is unknown.
-- */
-- cost?: number | null;
-- /**
-- * The catalogue's strength tier: fast, balanced, strong or frontier.
-- */
-- tier?: string | null;
-- [k: string]: unknown | undefined;
-- }
-- ];
-- /**
-- * Every attempt, in order: why it was chosen, and what went wrong when it failed.
-- */
-- attempts?: {
-- /**
-- * Which key or wallet paid for the attempt; never a key.
-- */
-- key?: string;
-- provider: string;
-- model?: string | null;
-- /**
-- * Why this provider was tried.
-- */
-- why?: string;
-- status: "ok" | "failed" | "timeout" | "skipped";
-- error?: string | null;
-- [k: string]: unknown | undefined;
-- }[];
-- /**
-- * The Bench evidence the route used, when it opted in.
-- */
-- bench?: {} | null;
-- /**
-- * The billing readings of the run, when it has any.
-- */
-- usage_readings?: {}[];
-- /**
-- * A run started from an AI task (ai.task@1): the task it read, the choice it resolved, why that choice won and which fallback answered.
-- */
-- task_choice?: {
-- /**
-- * The task's name.
-- */
-- task: string;
-- requested: AiChoiceV1;
-- answered: AiChoiceV1;
-- /**
-- * Which resolution step picked it: the run's own choice (run), the person's saved choice (saved), their kind default (kind), the owner's task default (owner) or the built-in.
-- */
-- why: "run" | "saved" | "kind" | "owner" | "builtin";
-- /**
-- * 0 when the chosen model answered; otherwise the position of the fallback that did.
-- */
-- fallback_index: number;
-- };
-- } | null;
-- /**
-- * The choice the run was started with, when it was started from a task or a choice; null otherwise.
-- */
-- choice?: AiChoiceV1 | null;
-- /**
-- * What actually answered: the model and its source, and the machine when one did; null for a run outside a task.
-- */
-- answered?: AiChoiceV1 | null;
--}
--
/** [email protected] (owner: ai) */
/**
* ai.run-error@1: safe, actionable words for an AI or Actor run. Raw provider responses are never display text. The code map is shared across products.
@@@ -326969,288 +326407,6 @@ export interface AiTaskV1 {
workflow?: string;
}
--/** [email protected] (owner: ai) */
--/**
-- * The owner's default for one task (GET|PUT /api/v1/admin/task-defaults, owner or admin role): the choice signed out and signed in, an ordered list of fallbacks, the image model for image tasks, the search engines in order for search tasks, and a per-run cost ceiling in USD. A change is audited and reaches services within a minute.
-- */
--export interface AiTaskDefaultsV1 {
-- signed_out: AiChoiceV1;
-- signed_in: AiChoiceV1;
-- /**
-- * @maxItems 10
-- */
-- fallbacks:
-- | []
-- | [AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
-- | [
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1,
-- AiChoiceV1
-- ];
-- image_model: AiChoiceV1 | null;
-- /**
-- * @maxItems 10
-- */
-- search_engines:
-- | []
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ]
-- | [
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- },
-- {
-- engine: string;
-- enabled: boolean;
-- }
-- ];
-- max_cost_usd: number | null;
--}
--
/** [email protected] (owner: git) */
/**
* Git G2 change metadata. Community thread is hidden; Git authorizes repository access. PostgreSQL bigint numbers may be decimal strings.
@@@ -327602,3 +326758,1003 @@ export interface ExchangeMarket {
} | null;
}[];
}
++
++/** [email protected] (owner: ai) */
++/**
++ * Body of POST /api/v1/runs on OpenVibe.AI (capability ai.run.create; ADR-015). Runs the newest active version of a workflow (or the given active or deprecated version) on input that must match that workflow version's own input schema; per-workflow input and output schemas live in AI's registry (GET /api/v1/workflows/:key), not here. The token's ns claim limits which workflow namespaces may run (403 capability.namespace_denied). ?wait=ms waits for the result: 201 finished or served from cache, 202 still queued/running (poll GET /api/v1/runs/:id), 200 an idempotent replay. Errors are problem+json: 404 workflow.not_found, 409 workflow.inactive, 409 idempotency.conflict, 413 input.too_large, 422 input.invalid, 429 quota.exceeded or queue.full with Retry-After. The direct operations POST /api/v1/{chat,generate,summarize,classify,extract,enrich,embed} take the same fields (except workflow and version) with the input fields at the top level and run workflow ai.<op>. target (EntityRef): what the output is about, part of the cache scope and a run filter. attribution (EntityRef): what the spend is attributed to for quotas and usage. on_behalf_of (SubjectRef): the person or actor the caller acts for, part of the cache scope and per-actor quotas. options.latency asks for a slower class than the workflow allows (options.deadline_hours says how long a batch run may take); the run answers with the class it ran in (run.latency_class), the tier it was priced on (run.service_tier) and, when the ask was clamped, the class it really ran in (run.latency_clamped).
++ */
++export type AiRunRequest = {
++ [k: string]: unknown | undefined;
++} & {
++ /**
++ * A registered AI task (ai.task@1, GET /api/v1/tasks). Its workflow runs with the task's resolved choice; choice overrides it for this run.
++ */
++ task?: string;
++ choice?: AiChoiceV1;
++ /**
++ * Workflow key, <namespace>.<name> (live.chat_reply, news.summarize_story, network.site_copy…).
++ */
++ workflow?: string;
++ /**
++ * Pin a workflow version (active or deprecated). Omitted: the newest active version.
++ */
++ version?: number;
++ /**
++ * Workflow input; validated against the workflow version's input_schema. Default {}.
++ */
++ input?: {};
++ target?: EntityRef;
++ attribution?: EntityRef;
++ on_behalf_of?: SubjectRef;
++ /**
++ * Same (requester, key) returns the existing run; a different workflow or input under it is 409 idempotency.conflict. The Idempotency-Key header is used when this is absent.
++ */
++ idempotency_key?: string;
++ options?: {
++ /**
++ * false skips the scoped cache lookup and store.
++ */
++ cache?: boolean;
++ /**
++ * Keep raw prompts and responses in the request log, only when AI runs with raw debug logging on.
++ */
++ debug?: boolean;
++ /**
++ * The class the caller asks for: how long the caller may wait, and what the router may do with the wait. interactive (the default) answers as soon as the provider can; background may take minutes, and the run is priced on the cheapest tier that can wait (a Flex tier, a provider's off-peak hours, the host's own idle model); batch may take hours, and the run is queued and answered through a provider's own batch API. The class is the workflow's own (the route's constraints.latency_class): a caller may ask for a SLOWER class and never for a faster one. A faster ask is not refused: the run happens in the workflow's own class and the answer says so (run.latency_clamped).
++ */
++ latency?: "interactive" | "background" | "batch";
++ /**
++ * For a batch run: how long the answer may take, in hours (1 to 72). The run is queued and answered within the deadline; a deadline the provider cannot meet sends the run back to the ordinary path. Omitted: the service's own default.
++ */
++ deadline_hours?: number;
++ };
++ /**
++ * Run with the person's own provider key (ai.credential@1) that this service stored, instead of a shared route: only that provider is called (no fallback), the result is never cached or taken from the cache, the shared paid budget is not spent, and the credential's own daily budget applies (429 quota.exceeded). Chat operations only (text, JSON, vision).
++ */
++ credential?: {
++ subject: string;
++ };
++ effort?: AiEffort;
++ ladder_id?: string;
++ rung?: number;
++ agent_role?: "router" | "gate" | "assessor" | "worker" | "subagent" | "reviewer";
++ kind?: string;
++};
++
++/** [email protected] (owner: ai) */
++/**
++ * A workflow run on OpenVibe.AI (ADR-015; server/runs.js decode): the `run` member of every run response (POST /api/v1/runs and the direct operations, GET /api/v1/runs/:id, cancel, retry) and each item of GET /api/v1/runs { runs }. Output is attributable to workflow + version + template version + route version + provider/model + run id, never to a person. A draft stays a draft: products store it with ai/ai_assisted authorship and publish nothing until a person reviews it. input keeps no inline media (replaced by data_url_sha256 and data_url_bytes) and no passthrough prompt ({ not_retained }); output is null until the run succeeded or was served from cache and then matches the workflow version's output_schema. requester is the token principal (service, app or mod). A run interrupted by a restart or shutdown ends failed with error.code run.interrupted. latency_class is the class the run really ran in, service_tier the tier it was priced on, and latency_clamped set when the caller asked for a faster class than the workflow allows. explain says why the run answered as it did: the task it read, the candidates it ranked and every attempt.
++ */
++export interface AiRun {
++ id: string;
++ /**
++ * Terminal: succeeded, failed, cancelled, cached (a scoped cache hit, no provider call; provenance.cached_from names the run it reused).
++ */
++ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "cached";
++ workflow: {
++ key: string;
++ version: number;
++ };
++ /**
++ * The prompt template of the workflow's llm step; null for workflows without one.
++ */
++ template: {
++ key: string;
++ version: number | null;
++ } | null;
++ /**
++ * Provider route; version null while the route is unresolved or disabled.
++ */
++ route: {
++ key: string;
++ version: number | null;
++ } | null;
++ requester: SubjectRef;
++ on_behalf_of: SubjectRef | null;
++ attribution: EntityRef | null;
++ /**
++ * The requester's service id when the requester is a service.
++ */
++ source_service: string | null;
++ target: EntityRef | null;
++ /**
++ * The retained input (see the description).
++ */
++ input: {};
++ /**
++ * Workflow output, or null.
++ */
++ output: {} | null;
++ error: {
++ /**
++ * run.cancelled, run.interrupted, run.internal, output.invalid, output.empty, provider.unavailable, route.unavailable, source.unavailable, media.unresolvable…
++ */
++ code: string;
++ detail: string | null;
++ } | null;
++ /**
++ * Produced by the stub provider; never served to production callers and never cached.
++ */
++ synthetic: boolean;
++ provenance: {
++ origin: "ai";
++ workflow: string;
++ workflow_version: number;
++ template_version: number | null;
++ route: string | null;
++ route_version: number | null;
++ provider: string | null;
++ model: string | null;
++ /**
++ * The primary provider was degraded and the run fell back (ADR-015: fallbacks are recorded).
++ */
++ fallback_used: boolean;
++ run_id: string;
++ cached_from: string | null;
++ synthetic: boolean;
++ };
++ usage: {
++ tokens_in: number;
++ tokens_out: number;
++ cost_usd: number;
++ /**
++ * Provider calls made (skipped routes not counted).
++ */
++ attempts: number;
++ };
++ /**
++ * Citations stored for the run (GET /api/v1/runs/:id/citations): the sources the workflow was given, and any the requester attached later.
++ */
++ citations_count: number;
++ /**
++ * The class the run really ran in: how long the caller was willing to wait. It is the workflow's own class (the route's constraints.latency_class) or a slower one the caller asked for (options.latency); a caller can never make a run faster than its workflow allows.
++ */
++ latency_class?: "interactive" | "background" | "batch";
++ /**
++ * The tier the run was priced on: the tier the provider really served (standard, flex, batch) or the one the router chose (offpeak inside a provider's off-peak hours, local on the host's own model). Null while the run has not answered. A provider that does not say which tier it served is priced at the list price: a saving nobody confirmed is not a saving.
++ */
++ service_tier?: "standard" | "flex" | "batch" | "offpeak" | "local" | null;
++ /**
++ * Set when the caller asked for a faster class than the workflow allows: the class asked for and the class the run really ran in. The run is never refused for it.
++ */
++ latency_clamped?: {
++ /**
++ * The class the caller asked for.
++ */
++ asked: "interactive" | "background" | "batch";
++ /**
++ * The class the run really ran in.
++ */
++ used: "interactive" | "background" | "batch";
++ } | null;
++ retry_of: string | null;
++ idempotency_key: string | null;
++ trace_id: string | null;
++ created_at: string;
++ started_at: string | null;
++ finished_at: string | null;
++ /**
++ * Why the run answered as it did: the task-aware router's explain (L33 P3, L36 Y7). task is the requirement set it read from the request, ranked the candidates it considered and why, attempts every provider it tried with why it was chosen and why it failed, and the placement view it ranked from (objective, reasons, selected, candidates). A run that never reached a provider has no explain.
++ */
++ explain?: {
++ /**
++ * The objective the pool planned with (cheapest, balanced, correctness, own-keys, own-machine), or null for a pinned route.
++ */
++ objective: string | null;
++ /**
++ * Why the router chose what it chose, in words.
++ */
++ reasons: string[];
++ /**
++ * The provider that answered (provider, or provider/model, or the machine that answered), or null when nothing answered.
++ */
++ selected: string | {} | null;
++ /**
++ * Every candidate the pool considered, with why it was excluded when it was.
++ */
++ candidates: {
++ provider: string;
++ model?: string | null;
++ eligible?: boolean;
++ excluded_reason?: string | null;
++ cost?: number | null;
++ latency?: number | null;
++ [k: string]: unknown | undefined;
++ }[];
++ /**
++ * Who paid for the run: the network, the person's own key, their own machine, or a project's own provider.
++ */
++ paid_by?: string | null;
++ /**
++ * The requirement set the router read off the request, with no model call.
++ */
++ task?: {
++ /**
++ * The request carried a picture.
++ */
++ vision: boolean;
++ /**
++ * The request carried tools.
++ */
++ tools: boolean;
++ /**
++ * The request asked for JSON out.
++ */
++ json: boolean;
++ /**
++ * The context window the request needs, in tokens.
++ */
++ min_context: number;
++ /**
++ * How much thinking the request asked for.
++ */
++ reasoning: "none" | "some" | "deep";
++ /**
++ * What the request wants out.
++ */
++ output: "text" | "image" | "audio" | "video";
++ /**
++ * How heavy the work is.
++ */
++ weight: "light" | "standard" | "heavy";
++ };
++ /**
++ * The candidates the router ranked for this task, best first, each with its reason.
++ *
++ * @maxItems 5
++ */
++ ranked?:
++ | []
++ | [
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ }
++ ]
++ | [
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ }
++ ]
++ | [
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ }
++ ]
++ | [
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ }
++ ]
++ | [
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ },
++ {
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this candidate is here (the cheapest with vision, the strong tier, warm cache).
++ */
++ why: string;
++ /**
++ * The input price per million tokens, or null when the price is unknown.
++ */
++ cost?: number | null;
++ /**
++ * The catalogue's strength tier: fast, balanced, strong or frontier.
++ */
++ tier?: string | null;
++ [k: string]: unknown | undefined;
++ }
++ ];
++ /**
++ * Every attempt, in order: why it was chosen, and what went wrong when it failed.
++ */
++ attempts?: {
++ /**
++ * Which key or wallet paid for the attempt; never a key.
++ */
++ key?: string;
++ provider: string;
++ model?: string | null;
++ /**
++ * Why this provider was tried.
++ */
++ why?: string;
++ status: "ok" | "failed" | "timeout" | "skipped";
++ error?: string | null;
++ [k: string]: unknown | undefined;
++ }[];
++ /**
++ * The Bench evidence the route used, when it opted in.
++ */
++ bench?: {} | null;
++ /**
++ * The billing readings of the run, when it has any.
++ */
++ usage_readings?: {}[];
++ /**
++ * A run started from an AI task (ai.task@1): the task it read, the choice it resolved, why that choice won and which fallback answered.
++ */
++ task_choice?: {
++ /**
++ * The task's name.
++ */
++ task: string;
++ requested: AiChoiceV1;
++ answered: AiChoiceV1;
++ /**
++ * Which resolution step picked it: the run's own choice (run), the person's saved choice (saved), their kind default (kind), the owner's task default (owner) or the built-in.
++ */
++ why: "run" | "saved" | "kind" | "owner" | "builtin";
++ /**
++ * 0 when the chosen model answered; otherwise the position of the fallback that did.
++ */
++ fallback_index: number;
++ };
++ } | null;
++ /**
++ * The choice the run was started with, when it was started from a task or a choice; null otherwise.
++ */
++ choice?: AiChoiceV1 | null;
++ /**
++ * What actually answered: the model and its source, and the machine when one did; null for a run outside a task.
++ */
++ answered?: AiChoiceV1 | null;
++ effort_requested?: AiEffort;
++ effort_applied?: ("low" | "medium" | "high" | "max") | null;
++ effort_rung?: number;
++ ladder_id?: string;
++ ladder?: {
++ model: string;
++ effort: AiEffort;
++ cost_usd: number;
++ outcome: string;
++ }[];
++}
++
++/** [email protected] (owner: ai) */
++/**
++ * The owner's default for one task (GET|PUT /api/v1/admin/task-defaults, owner or admin role): the choice signed out and signed in, an ordered list of fallbacks, the image model for image tasks, the search engines in order for search tasks, and a per-run cost ceiling in USD. A change is audited and reaches services within a minute.
++ */
++export interface AiTaskDefaultsV1 {
++ signed_out: AiChoiceV1;
++ signed_in: AiChoiceV1;
++ /**
++ * @maxItems 10
++ */
++ fallbacks:
++ | []
++ | [AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1, AiChoiceV1]
++ | [
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1,
++ AiChoiceV1
++ ];
++ image_model: AiChoiceV1 | null;
++ /**
++ * @maxItems 10
++ */
++ search_engines:
++ | []
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ]
++ | [
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ },
++ {
++ engine: string;
++ enabled: boolean;
++ }
++ ];
++ max_cost_usd: number | null;
++ /**
++ * Concrete effort used when a request selects auto. Omitted uses the workflow default, then medium.
++ */
++ effort?: "low" | "medium" | "high" | "max";
++}
++
++/** [email protected] (owner: actor) */
++/**
++ * Immutable source event. Source-local actor identity grants no cross-source authority. Accepting an id twice creates one ticket.
++ */
++export interface AgentTrigger {
++ id: string;
++ source: string;
++ actor: {
++ source: string;
++ id: string;
++ kind: "person" | "bot" | "system";
++ };
++ source_scope: string;
++ /**
++ * @minItems 1
++ */
++ threads: [string, ...string[]];
++ occurred_at: string;
++ text: string;
++ read_pointer?: string;
++ addresses_agent?: "mention" | "direct" | "none";
++}
++
++/** [email protected] (owner: actor) */
++/**
++ * Gate and assessment decision. Inferred work defaults to observe: record ignore with would_accept, never launch. Only an explicit human stop withdraws a mandate.
++ */
++export interface AgentDecision {
++ id: string;
++ /**
++ * @minItems 1
++ */
++ trigger_ids: [string, ...string[]];
++ policy_version: string;
++ decision: "accept" | "stop" | "ignore" | "unavailable";
++ strength: "explicit" | "inferred";
++ direction: {
++ implementation_requested: boolean;
++ target_basis: "specified" | "existing-standard" | "undetermined";
++ requires_design_decision: boolean;
++ evidence: {
++ trigger_id: string;
++ quote: string;
++ }[];
++ };
++ rule_assessments: {
++ matched: boolean;
++ reason: string;
++ rule_id: string;
++ }[];
++ reason?: string;
++ would_accept?: boolean;
++ ignored_from_card?: boolean;
++}
++
++/** [email protected] (owner: actor) */
++/**
++ * Authorized work with an immutable mandate. Policy changes notify, never cancel. Revalidate before resuming an ended ticket; bots and CI cannot resume it. Stage applies to open tickets.
++ */
++export interface AgentTicket {
++ id: string;
++ trigger_id: string;
++ mandate: {
++ policy_version: string;
++ scope: string;
++ strength: "explicit" | "inferred";
++ matched_rules: string[];
++ actor: {
++ source: string;
++ id: string;
++ kind: "person" | "bot" | "system";
++ };
++ source_scope: string;
++ budget: {
++ usd: number;
++ tokens: number;
++ wall_minutes: number;
++ };
++ };
++ state: "open" | "ended";
++ stage: AgentStage;
++ /**
++ * @minItems 1
++ */
++ threads: [string, ...string[]];
++}
++
++/** [email protected] (owner: actor) */
++/**
++ * Executor report. A PR alone is not ready; a draft is blocked. human_action carries exactly one question unchanged to the person.
++ */
++export interface AgentReport {
++ ticket_id: string;
++ assignment_id: string;
++ state: "progress" | "waiting" | "ready" | "blocked" | "failed" | "dropped";
++ summary: string;
++ pr: string | null;
++ tests_run: string[];
++ risks: string[];
++ human_action?: {
++ question: string;
++ };
++}
++
++/** [email protected] (owner: actor) */
++/**
++ * One structured question awaiting a person. Authorized independent work may continue.
++ */
++export interface AgentAttention {
++ id: string;
++ ticket_id: string;
++ question: string;
++ state: "open" | "answered" | "dismissed";
++ created_at: string;
++ answer?: string;
++}
++
++/** [email protected] (owner: actor) */
++/**
++ * Closed open-ticket stages. First matching row wins: delivery failure, attention, ready report, blocked/failed report without a later human input, absent/pending assignment, waiting report/ended assignment, working. Labels and conditions: docs/agent-work.md.
++ */
++export type AgentStage =
++ | "person/delivery"
++ | "person/answer"
++ | "person/review"
++ | "person/blocked"
++ | "person/failed"
++ | "working/queued"
++ | "idle"
++ | "working";
++
++/** [email protected] (owner: ai) */
++/**
++ * Portable reasoning effort. auto resolves to the task default; unsupported model controls are ignored and receipt effort_applied is null.
++ */
++export type AiEffort = "auto" | "low" | "medium" | "high" | "max";
ddiff --git a/manifests/services/actor.json b/manifests/services/actor.json
iindex 47ae2d9d..96981776 100644
---- a/manifests/services/actor.json
++++ b/manifests/services/actor.json
@@@ -95,7 +95,7 @@
"none": "no claims: a task runs in the process that accepted it"
}
},
-- "notes": "Port 4950, unit openvibe-actor.service. OpenVibe's own general agent and the router for agent work (plan T17, ADR-044): POST /api/v1/tasks takes a task in plain words, a mode and a budget; the planner (openvibe-sdk/placement) picks an agent system, runs it, has a second model family check the result and answers with the result, the cost and the explanation (platform.task@1). Agent systems: the OpenVibe runtime (a tool-using model that acts through OpenVibe services: Search, Tools), other platforms' agents (OpenAI's Responses agent with web search) and an open model on OpenVibe's own hardware for private mode; coding work goes to OpenVibe.Codes. Consumes OpenVibe.Network (SSO with PKCE S256 as OAuth client actor, JWKS for app and person tokens), OpenVibe.Search (public reads) and OpenVibe.Tools (tools.tool.run). Owns its tasks and their event logs; model provider keys are the operator's (BYO keys through OpenVibe.AI come next). Ask Actor from chat (plan T17 reach): a signed-in person's \"@actor <task>\" in OpenVibe's global chat or their own channel (chat.message.created) becomes their task with public tools only (never their computers, robots or code), and the answer is posted back in the room through OpenVibe.Chat's service API (chat.message.send). The agent.* namespace is the network's, like provider.*: any first-party mode (Chat, Codes, Run, Watch, Live, Surf) publishes agent.step.started|updated|ended into it with the person's subject, and Actor keeps the one timeline behind the Dock (GET /api/v1/agent/timeline). Actor registers the family here (one producer per event type) and consumes what the modes publish.",
++ "notes": "Port 4950, unit openvibe-actor.service. OpenVibe's own general agent and the router for agent work (plan T17, ADR-044): POST /api/v1/tasks takes a task in plain words, a mode and a budget; the planner (openvibe-sdk/placement) picks an agent system, runs it, has a second model family check the result and answers with the result, the cost and the explanation (platform.task@1). Agent systems: the OpenVibe runtime (a tool-using model that acts through OpenVibe services: Search, Tools), other platforms' agents (OpenAI's Responses agent with web search) and an open model on OpenVibe's own hardware for private mode; coding work goes to OpenVibe.Codes. Consumes OpenVibe.Network (SSO with PKCE S256 as OAuth client actor, JWKS for app and person tokens), OpenVibe.Search (public reads) and OpenVibe.Tools (tools.tool.run). Owns its tasks and their event logs; model provider keys are the operator's (BYO keys through OpenVibe.AI come next). Ask Actor from chat (plan T17 reach): a signed-in person's \"@actor <task>\" in OpenVibe's global chat or their own channel (chat.message.created) becomes their task with public tools only (never their computers, robots or code), and the answer is posted back in the room through OpenVibe.Chat's service API (chat.message.send). The agent.* namespace is the network's, like provider.*: any first-party mode (Chat, Codes, Run, Watch, Live, Surf) publishes agent.step.started|updated|ended into it with the person's subject, and Actor keeps the one timeline behind the Dock (GET /api/v1/agent/timeline). Actor registers the family here (one producer per event type) and consumes what the modes publish. Plans to produce and consume agent.trigger@1, agent.decision@1, agent.ticket@1, agent.report@1 and agent.attention@1; consumes agent.stage@1 and ai.effort@1 with ai.run@1 effort and ladder receipts. These contracts describe the planned fabric, not live event publication.",
"health": "/api/health",
"ready": "/api/ready",
"internalOrigin": "http://127.0.0.1:4950",
ddiff --git a/manifests/services/ai.json b/manifests/services/ai.json
iindex d5faf2dd..e723e445 100644
---- a/manifests/services/ai.json
++++ b/manifests/services/ai.json
@@@ -97,7 +97,7 @@
"none": "no claims: one process owns its PostgreSQL database (ov_ai); a run is taken with a compare-and-set on its status (queued \u2192 running)"
}
},
-- "notes": "Providers, models, routing profiles, versioned prompt templates and workflows, runs, request logs, citations, scoped cache, quotas and audit. Workflow output is a draft/evidence package attributed to workflow + model + run. ai.run.queued|succeeded|failed|cached have payload contracts (v0.30.0, status planned): AI publishes them once its Events client is wired in; it publishes none today. ai.run.create takes ai.run-request@1 and returns ai.run@1.",
++ "notes": "Providers, models, routing profiles, versioned prompt templates and workflows, runs, request logs, citations, scoped cache, quotas and audit. Workflow output is a draft/evidence package attributed to workflow + model + run. ai.run.queued|succeeded|failed|cached have payload contracts (v0.30.0, status planned): AI publishes them once its Events client is wired in; it publishes none today. ai.run.create takes ai.run-request@1 and returns ai.run@1. Produces ai.run@1 effort_requested, effort_applied, effort_rung and ladder receipts; consumes ai.effort@1 and ai.run-request@1 effort/ladder metadata. Actor consumes those receipts; AI does not authorize agent tickets.",
"machineRoles": [
{
"id": "ai.host",
ddiff --git a/package-lock.json b/package-lock.json
iindex b447c3f7..2faf0469 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -1,12 +1,12 @@
{
"name": "openvibe-contracts",
-- "version": "0.383.0",
++ "version": "0.384.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openvibe-contracts",
-- "version": "0.383.0",
++ "version": "0.384.0",
"license": "AGPL-3.0-only",
"dependencies": {
"ajv": "^8.17.1",
ddiff --git a/package.json b/package.json
iindex 9bbf5c04..c7f4c35e 100644
---- a/package.json
++++ b/package.json
@@@ -1,6 +1,6 @@
{
"name": "openvibe-contracts",
-- "version": "0.383.0",
++ "version": "0.384.0",
"description": "Machine-readable contracts for the OpenVibe network: schemas, manifests, ids, error envelope, capability checks.",
"main": "index.js",
"types": "generated/typescript/index.d.ts",