diff --git a/.gitignore b/.gitignore
index a8fdd94..a2fbacd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ dist/
*.tsbuildinfo
.env
.env.*
+target
diff --git a/README.md b/README.md
index 9472d0a..97e7527 100644
--- a/README.md
+++ b/README.md
@@ -1,32 +1,89 @@
-# rivethub-workflows
+# rivethub-plugins
-Workflows for RivetHub, and the start of its plugin system: custom parts of RivetHub that anyone can add. A plugin that
-proves valuable for everyone gets promoted into the platform, with its domain moving into a
-[rivethub-runtime](https://github.com/philbert440/rivethub-runtime) context and its payloads into the contract.
+Plug-ins for RivetHub, and the SDKs and templates for writing them. A plug-in is a program that runs in its own process on
+one node and reaches the runtime only over its published contract (row B17 and notes 50 to 60 of the
+[rivethub-runtime](https://github.com/philbert440/rivethub-runtime) CONTRACT): rh starts it, proxies clients to its
+views, delivers its events and offers its tools to agents through `rh mcp`. A plug-in that proves valuable for everyone
+gets promoted into the platform, with its domain moving into a runtime context and its payloads into the contract.
-Workflows run outside the runtime and talk to it only through its published contract, the same way every client does.
+## Layout
+
+- `packages/contract`: `@rivethub/contract`, the runtime's schemas and the types generated from them.
+- `packages/plugin-sdk`: `@rivethub/plugin-sdk`, for plug-ins in TypeScript, with the `rivethub-plugin-dev` harness.
+- `rust/rivethub-plugin`: the `rivethub-plugin` crate, for plug-ins in Rust, in a Cargo workspace of its own.
+- `templates/typescript`, `templates/rust`: a checklist plug-in in each language to start from: a page with a form and
+ a list (and a canvas board in TypeScript), an `add_item` agent tool and a `session.placed` subscription.
+- `templates/javascript`: the same checklist with its canvas board, in JavaScript that Node runs as it is, and a
+ `GUIDE.md` for an agent building from it. It is the template rh's plug-in creator scaffolds from.
## The contract
`contract.json` pins a runtime commit. `npm run contract` fetches that commit's `contract/sent.schema.json` and
-`contract/accepted.schema.json`, vendors them under `packages/contract/schema/`, and generates the
-`@rivethub/contract` types:
+`contract/accepted.schema.json`, vendors them under `packages/contract/schema/`, and generates:
-- `Sent`: what the runtime sends (responses, events).
-- `Accepted`: what the runtime accepts (requests, capture batches).
+- the `@rivethub/contract` types: `Sent`, what the runtime sends (responses, events), and `Accepted`, what it accepts
+ (requests, and a plug-in's answers);
+- `rust/rivethub-plugin/src/contract.rs`, the plug-in types (the manifest, views, canvas, events, jobs, tools, the
+ plug-in API and `GatewayError`) as Rust, from the accepted schema.
To move to a newer runtime, set `ref` in `contract.json` to a commit on the runtime's `main`, run `npm run contract`, and
-commit the schema and type diff in its own PR. If a workflow needs something the contract doesn't offer, propose the
+commit the schema and type diff in its own PR. If a plug-in needs something the contract doesn't offer, propose the
change to the runtime first.
+## Writing a plug-in
+
+A plug-in is a directory holding `rivethub-plugin.json` and the program its `run.command` starts. Both SDKs answer what rh
+asks on the plug-in socket (`GET /health`, views, actions, canvas events, tools, events and jobs), drop an event
+delivery they have already handled (by `seq`), pass `settings.changed` and the starting settings to the settings
+handler, and call rh on the plug-in API socket with the per-start token: the plug-in's own record, `viewsChanged`,
+`notify`, and any route its permissions name.
+
+```ts
+await serve({
+ views: { main: () => ({ title: 'Checklist', blocks: [] }) },
+ actions: { add: ({ values }) => [{ type: 'refresh' }] },
+ tools: { add_item: ({ title }) => `Added ${String(title)}` },
+ events: { 'session.placed': ({ sessionId }) => {} },
+})
+```
+
+```rust
+Plugin::new(state)
+ .view("main", |state, request| async move { Ok(view(&state)) })
+ .tool("add_item", |state, call| async move { add(&state, call.parse()?) })
+ .events(|state, delivery| async move { record(&state, delivery.event) })
+ .serve()
+ .await
+```
+
+On Linux rh confines a plug-in with Landlock to its own directory, its data and run folders and the program it runs, so
+a TypeScript plug-in runs a bundle (`npm run build` writes `dist/plugin.js` with esbuild) rather than sources that
+import from outside its directory, and a Rust plug-in runs its release binary.
+
+`rivethub-plugin-dev
` starts a plug-in the way rh does, standing in for its own `/api/plugin` routes, and reads
+commands from stdin (`view main`, `action add {"values":{"title":"x"}}`, `tool add_item {"title":"x"}`,
+`event session.placed {...}`, `job `), printing each answer. To run one on a node, `POST /api/plugins` with
+`{"path": ""}` and enable it from a paired device.
+
+## Templates on a node
+
+rh's plug-in creator (note 70 of the runtime's CONTRACT) lets an agent on a node scaffold a plug-in from a template,
+edit it, install it and read its log through `rh mcp`. rh carries no templates; it reads them from the node's
+`/plugin-templates/` (`~/.rivethub/plugin-templates/` unless the state folder moved), one folder each, and never
+fetches one. `npm run templates:install` writes the templates that need no build there: the `javascript` folder with
+`sdk/`, the SDK's own TypeScript sources, which Node 22.18 and later runs without a build. Pass another state folder as
+`npm run templates:install -- `. Run it again after pulling a newer SDK; plug-ins already scaffolded keep the
+SDK they were made with.
+
## Rules
-- Talk to the runtime only over its HTTP and WebSocket API. Never read its database or files.
-- Types come from `@rivethub/contract`. Never hand-write a DTO.
+- Talk to the runtime only over its HTTP and WebSocket API and the plug-in sockets. Never read its database or files.
+- Types come from `@rivethub/contract` and the generated `contract` module. Never hand-write a DTO.
- No code comments: names and types carry the meaning.
- Conventional Commits, authored by people, with no AI attribution trailers or text.
## Checks
-`npm run check` runs what CI runs: Biome lint and format, `tsc` in strict mode, the tests, the contract freshness check
-and the privacy scan. Run it before every push.
+`npm run check` runs what CI runs: Biome lint and format, `tsc` in strict mode, the tests, the contract freshness check,
+the privacy scan, and `npm run rust` (rustfmt, Clippy with warnings as errors, and the tests, for the crate and the Rust
+template). Run it before every push.
diff --git a/contract.json b/contract.json
index 6d5d7fa..55ed360 100644
--- a/contract.json
+++ b/contract.json
@@ -1,4 +1,4 @@
{
"repository": "philbert440/rivethub-runtime",
- "ref": "ba386c48eca72acb93d9a26bafb9abd30a48253f"
+ "ref": "5d5cc2744c01cb9f991b65b74b9a859b1d35f517"
}
diff --git a/package-lock.json b/package-lock.json
index 4b65fc5..adedb40 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,13 @@
{
- "name": "rivethub-workflows",
+ "name": "rivethub-plugins",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "rivethub-workflows",
+ "name": "rivethub-plugins",
"workspaces": [
- "packages/*"
+ "packages/*",
+ "templates/typescript"
],
"devDependencies": {
"@biomejs/biome": "2.5.15",
@@ -229,6 +230,448 @@
"node": ">=14.21.3"
}
},
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",
+ "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz",
+ "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz",
+ "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz",
+ "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz",
+ "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz",
+ "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz",
+ "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz",
+ "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz",
+ "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz",
+ "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz",
+ "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz",
+ "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz",
+ "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz",
+ "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz",
+ "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz",
+ "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",
+ "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz",
+ "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz",
+ "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz",
+ "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz",
+ "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz",
+ "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz",
+ "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/@jsdevtools/ono": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
@@ -240,6 +683,10 @@
"resolved": "packages/contract",
"link": true
},
+ "node_modules/@rivethub/plugin-sdk": {
+ "resolved": "packages/plugin-sdk",
+ "link": true
+ },
"node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
@@ -621,6 +1068,52 @@
],
"license": "PSF-2.0"
},
+ "node_modules/checklist-ts": {
+ "resolved": "templates/typescript",
+ "link": true
+ },
+ "node_modules/esbuild": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz",
+ "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.28.2",
+ "@esbuild/android-arm": "0.28.2",
+ "@esbuild/android-arm64": "0.28.2",
+ "@esbuild/android-x64": "0.28.2",
+ "@esbuild/darwin-arm64": "0.28.2",
+ "@esbuild/darwin-x64": "0.28.2",
+ "@esbuild/freebsd-arm64": "0.28.2",
+ "@esbuild/freebsd-x64": "0.28.2",
+ "@esbuild/linux-arm": "0.28.2",
+ "@esbuild/linux-arm64": "0.28.2",
+ "@esbuild/linux-ia32": "0.28.2",
+ "@esbuild/linux-loong64": "0.28.2",
+ "@esbuild/linux-mips64el": "0.28.2",
+ "@esbuild/linux-ppc64": "0.28.2",
+ "@esbuild/linux-riscv64": "0.28.2",
+ "@esbuild/linux-s390x": "0.28.2",
+ "@esbuild/linux-x64": "0.28.2",
+ "@esbuild/netbsd-arm64": "0.28.2",
+ "@esbuild/netbsd-x64": "0.28.2",
+ "@esbuild/openbsd-arm64": "0.28.2",
+ "@esbuild/openbsd-x64": "0.28.2",
+ "@esbuild/openharmony-arm64": "0.28.2",
+ "@esbuild/sunos-x64": "0.28.2",
+ "@esbuild/win32-arm64": "0.28.2",
+ "@esbuild/win32-ia32": "0.28.2",
+ "@esbuild/win32-x64": "0.28.2"
+ }
+ },
"node_modules/fdir": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
@@ -792,7 +1285,27 @@
},
"packages/contract": {
"name": "@rivethub/contract",
- "version": "0.0.0"
+ "version": "0.7.0"
+ },
+ "packages/plugin-sdk": {
+ "name": "@rivethub/plugin-sdk",
+ "version": "0.7.0",
+ "dependencies": {
+ "@rivethub/contract": "0.7.0"
+ },
+ "bin": {
+ "rivethub-plugin-dev": "src/dev.ts"
+ }
+ },
+ "templates/typescript": {
+ "name": "checklist-ts",
+ "version": "0.1.0",
+ "dependencies": {
+ "@rivethub/plugin-sdk": "0.7.0"
+ },
+ "devDependencies": {
+ "esbuild": "0.28.2"
+ }
}
}
}
diff --git a/package.json b/package.json
index ee71e43..3811e67 100644
--- a/package.json
+++ b/package.json
@@ -1,22 +1,25 @@
{
- "name": "rivethub-workflows",
+ "name": "rivethub-plugins",
"private": true,
"type": "module",
"engines": {
"node": ">=22.19.0"
},
"workspaces": [
- "packages/*"
+ "packages/*",
+ "templates/typescript"
],
"scripts": {
- "check": "npm run lint && npm run typecheck && npm test && npm run contract:check && npm run privacy",
+ "check": "npm run lint && npm run typecheck && npm test && npm run contract:check && npm run privacy && npm run rust",
"lint": "biome check .",
"format": "biome check --write .",
"typecheck": "tsc",
"test": "node --test 'tests/**/*.test.ts'",
"contract": "node scripts/contract.ts",
"contract:check": "node scripts/contract.ts --check",
- "privacy": "node scripts/privacy.ts --tracked"
+ "templates:install": "node scripts/templates.ts",
+ "privacy": "node scripts/privacy.ts --tracked",
+ "rust": "cargo fmt --check --manifest-path rust/rivethub-plugin/Cargo.toml && cargo clippy --locked --all-targets --manifest-path rust/rivethub-plugin/Cargo.toml -- -D warnings && cargo test --locked --manifest-path rust/rivethub-plugin/Cargo.toml && cargo fmt --check --manifest-path templates/rust/Cargo.toml && cargo clippy --locked --all-targets --manifest-path templates/rust/Cargo.toml -- -D warnings"
},
"devDependencies": {
"@biomejs/biome": "2.5.15",
diff --git a/packages/contract/package.json b/packages/contract/package.json
index 96d3a11..d249d0a 100644
--- a/packages/contract/package.json
+++ b/packages/contract/package.json
@@ -1,6 +1,6 @@
{
"name": "@rivethub/contract",
- "version": "0.0.0",
+ "version": "0.7.0",
"private": true,
"type": "module",
"exports": {
diff --git a/packages/contract/schema/accepted.schema.json b/packages/contract/schema/accepted.schema.json
index 7eb15ef..6ccc381 100644
--- a/packages/contract/schema/accepted.schema.json
+++ b/packages/contract/schema/accepted.schema.json
@@ -1,8 +1,8 @@
{
- "$id": "https://github.com/philbert440/rivethub-runtime/contract/0.1.0/accepted.schema.json",
+ "$id": "https://github.com/philbert440/rivethub-runtime/contract/0.7.0/accepted.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RivetHub contract (accepted by the runtime)",
- "version": "0.1.0",
+ "version": "0.7.0",
"$defs": {
"AgentPreset": {
"type": "object",
@@ -97,8 +97,8 @@
"hermes",
"codex",
"opencode",
- "pi",
- "qwen-code",
+ "omp",
+ "dsh",
"cursor",
"cowork"
]
@@ -333,6 +333,250 @@
"agent"
]
},
+ "HubProjectDefaults": {
+ "type": "object",
+ "properties": {
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ThinkingLevel"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "harnessId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "node": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "directory": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ }
+ },
+ "ThinkingLevel": {
+ "type": "string",
+ "enum": [
+ "off",
+ "low",
+ "medium",
+ "high",
+ "xhigh"
+ ]
+ },
+ "HubProject": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "order": {
+ "type": "number",
+ "format": "double",
+ "default": 0.0
+ },
+ "createdAt": {
+ "type": "integer",
+ "format": "int64",
+ "default": 0
+ },
+ "defaults": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HubProjectDefaults"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
+ "HubLastSession": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "key",
+ "at"
+ ]
+ },
+ "HubSessionMode": {
+ "type": "string",
+ "enum": [
+ "chat",
+ "terminal"
+ ]
+ },
+ "HubState": {
+ "type": "object",
+ "properties": {
+ "projects": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HubProject"
+ },
+ "default": []
+ },
+ "defaultProjectId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "membership": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "default": {}
+ },
+ "names": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "default": {}
+ },
+ "archived": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "pinned": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "hidden": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "modes": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/HubSessionMode"
+ },
+ "default": {}
+ },
+ "lastSession": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HubLastSession"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "HubStateResponse": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "state": {
+ "$ref": "#/$defs/HubState"
+ }
+ },
+ "required": [
+ "version",
+ "state"
+ ]
+ },
+ "HubStatePutRequest": {
+ "type": "object",
+ "properties": {
+ "baseVersion": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "state": {
+ "$ref": "#/$defs/HubState"
+ }
+ },
+ "required": [
+ "baseVersion",
+ "state"
+ ]
+ },
+ "hub.state": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "version": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "v",
+ "version"
+ ]
+ },
+ "ProtocolVersion": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ },
"HarnessDescriptor": {
"type": "object",
"properties": {
@@ -513,6 +757,12 @@
"null"
]
},
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"directory": {
"type": [
"string",
@@ -580,345 +830,44 @@
}
]
},
- "CatalogCommand": {
+ "CatalogAgentsResponse": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "argHint": {
- "type": [
- "string",
- "null"
- ]
- },
- "source": {
- "type": "string"
+ "agents": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CatalogAgent"
+ }
}
},
"required": [
- "name",
- "description",
- "source"
+ "agents"
]
},
- "CatalogExecutorEntry": {
+ "MeshOverview": {
"type": "object",
"properties": {
- "key": {
- "type": "string"
- },
- "capabilities": {
- "$ref": "#/$defs/HarnessExecutorCapabilities"
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
},
- "commands": {
+ "nodes": {
"type": "array",
"items": {
- "$ref": "#/$defs/CatalogCommand"
+ "$ref": "#/$defs/MeshOverviewNode"
}
- },
- "harnessId": {
- "anyOf": [
- {
- "$ref": "#/$defs/HarnessId"
- },
- {
- "type": "null"
- }
- ]
- },
- "implemented": {
- "type": [
- "boolean",
- "null"
- ]
- }
- },
- "required": [
- "key",
- "capabilities",
- "commands"
- ]
- },
- "HarnessExecutorCapabilities": {
- "type": "object",
- "properties": {
- "steerable": {
- "type": "boolean"
- },
- "multiTurn": {
- "type": "boolean"
- },
- "structuredStream": {
- "type": "boolean"
- },
- "usageInResult": {
- "type": "boolean"
- },
- "sessionIdCapture": {
- "type": "boolean"
- },
- "slashCommands": {
- "type": "boolean"
- },
- "effortSelection": {
- "type": "boolean"
- },
- "mcpInjection": {
- "$ref": "#/$defs/McpInjection"
- }
- },
- "required": [
- "steerable",
- "multiTurn",
- "structuredStream",
- "usageInResult",
- "sessionIdCapture",
- "slashCommands",
- "effortSelection",
- "mcpInjection"
- ]
- },
- "McpInjection": {
- "type": "string",
- "enum": [
- "flag",
- "cwdFile",
- "persistentConfig",
- "none"
- ]
- },
- "CatalogSkillEntry": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "description"
- ]
- },
- "CatalogSheet": {
- "type": "object",
- "properties": {
- "node": {
- "type": "string"
- },
- "agents": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogAgent"
- }
- },
- "executors": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogExecutorEntry"
- }
- },
- "tools": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "skills": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogSkillEntry"
- }
- }
- },
- "required": [
- "node",
- "agents",
- "executors",
- "tools",
- "skills"
- ]
- },
- "CatalogAgentsResponse": {
- "type": "object",
- "properties": {
- "agents": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogAgent"
- }
- }
- },
- "required": [
- "agents"
- ]
- },
- "OutcomeBucket": {
- "type": "object",
- "properties": {
- "tasks": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "completed": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "failed": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "verified": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "refuted": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "escalated": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "diverged": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "divergenceRate": {
- "type": "number",
- "format": "double"
- },
- "totalCostUsd": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "avgDurationMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- }
- },
- "required": [
- "tasks",
- "completed",
- "failed",
- "verified",
- "refuted",
- "escalated",
- "diverged",
- "divergenceRate"
- ]
- },
- "OutcomesFilter": {
- "type": "object",
- "properties": {
- "since": {
- "type": [
- "string",
- "null"
- ],
- "format": "date-time"
- },
- "until": {
- "type": [
- "string",
- "null"
- ],
- "format": "date-time"
- },
- "agentId": {
- "type": [
- "string",
- "null"
- ]
- },
- "origin": {
- "type": [
- "string",
- "null"
- ]
- }
- }
- },
- "OutcomesResponse": {
- "type": "object",
- "properties": {
- "filter": {
- "$ref": "#/$defs/OutcomesFilter"
- },
- "totals": {
- "$ref": "#/$defs/OutcomeBucket"
- },
- "byAgent": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/OutcomeBucket"
- }
- },
- "byExecutor": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/OutcomeBucket"
- }
- },
- "byDay": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/OutcomeBucket"
- }
- }
- },
- "required": [
- "filter",
- "totals",
- "byAgent",
- "byExecutor",
- "byDay"
- ]
- },
- "MeshOverview": {
- "type": "object",
- "properties": {
- "updatedAt": {
- "type": "integer",
- "format": "int64"
- },
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/MeshOverviewNode"
- }
- }
- },
- "required": [
- "updatedAt",
- "nodes"
- ]
- },
- "MeshOverviewNode": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ }
+ },
+ "required": [
+ "updatedAt",
+ "nodes"
+ ]
+ },
+ "MeshOverviewNode": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
"name": {
"type": "string"
@@ -946,6 +895,18 @@
"type": "null"
}
]
+ },
+ "version": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "revision": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -1828,12 +1789,6 @@
}
]
},
- "ProtocolVersion": {
- "type": "integer",
- "format": "uint8",
- "minimum": 0,
- "maximum": 255
- },
"AudioStatus": {
"type": "object",
"properties": {
@@ -2214,12 +2169,28 @@
"null"
]
},
- "tag": {
- "type": [
- "string",
- "null"
- ]
- }
+ "role": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Role"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "tool_name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tag": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
},
"required": [
"query"
@@ -2245,6 +2216,15 @@
"both"
]
},
+ "Role": {
+ "type": "string",
+ "enum": [
+ "system",
+ "user",
+ "assistant",
+ "tool"
+ ]
+ },
"MemoryHitSource": {
"type": "string",
"enum": [
@@ -2389,15 +2369,6 @@
"content"
]
},
- "Role": {
- "type": "string",
- "enum": [
- "system",
- "user",
- "assistant",
- "tool"
- ]
- },
"MemoryFallback": {
"type": "string",
"enum": [
@@ -3217,6 +3188,165 @@
"messages"
]
},
+ "VectorState": {
+ "type": "string",
+ "enum": [
+ "embedded",
+ "pending",
+ "failed",
+ "skipped"
+ ]
+ },
+ "MemorySummaryNode": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "parentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "kind": {
+ "$ref": "#/$defs/SummaryKind"
+ },
+ "content": {
+ "type": "string"
+ },
+ "messageCount": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "earliestAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "latestAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "sourceMessageIds": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "vector": {
+ "$ref": "#/$defs/VectorState"
+ }
+ },
+ "required": [
+ "id",
+ "level",
+ "kind",
+ "content",
+ "messageCount",
+ "createdAt",
+ "sourceMessageIds",
+ "vector"
+ ]
+ },
+ "MemoryMessageTally": {
+ "type": "object",
+ "properties": {
+ "total": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "user": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "assistant": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "system": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "tool": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "embedded": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "pending": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "failed": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "skipped": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "total",
+ "user",
+ "assistant",
+ "system",
+ "tool",
+ "embedded",
+ "pending",
+ "failed",
+ "skipped"
+ ]
+ },
+ "MemorySummaryDagResponse": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "type": "string"
+ },
+ "summaries": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/MemorySummaryNode"
+ }
+ },
+ "messages": {
+ "$ref": "#/$defs/MemoryMessageTally"
+ }
+ },
+ "required": [
+ "sessionId",
+ "summaries",
+ "messages"
+ ]
+ },
"TopTool": {
"type": "object",
"properties": {
@@ -4216,6 +4346,18 @@
"items": {
"$ref": "#/$defs/DegradedProvider"
}
+ },
+ "version": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "revision": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -4426,72 +4568,233 @@
"cmd"
]
},
- "TranscriptTurn": {
+ "SessionDeleted": {
"type": "object",
"properties": {
- "role": {
- "$ref": "#/$defs/Role"
+ "ok": {
+ "type": "boolean"
},
- "text": {
- "type": "string"
+ "session": {
+ "$ref": "#/$defs/SessionId"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "conversations": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "messages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "summaries": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
}
},
"required": [
- "role",
- "text"
+ "ok",
+ "session",
+ "conversations",
+ "messages",
+ "summaries"
]
},
- "TranscriptResponse": {
+ "SessionDeleteRequest": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
- "command": {
- "type": "string"
- },
- "turns": {
+ "sessions": {
"type": "array",
"items": {
- "$ref": "#/$defs/TranscriptTurn"
+ "$ref": "#/$defs/SessionId"
}
- },
- "contextWindow": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "compactAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "contextSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/ContextSource"
- },
- {
- "type": "null"
- }
- ]
}
},
"required": [
- "id",
+ "sessions"
+ ]
+ },
+ "SessionDeleteError": {
+ "type": "string",
+ "enum": [
+ "session is live",
+ "not found",
+ "delete failed"
+ ]
+ },
+ "SessionDeleteRefused": {
+ "type": "object",
+ "properties": {
+ "session": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "ok": {
+ "type": "boolean"
+ },
+ "error": {
+ "$ref": "#/$defs/SessionDeleteError"
+ }
+ },
+ "required": [
+ "session",
+ "ok",
+ "error"
+ ]
+ },
+ "SessionDeleteResult": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionDeleted"
+ },
+ {
+ "$ref": "#/$defs/SessionDeleteRefused"
+ }
+ ]
+ },
+ "SessionDeleteResults": {
+ "type": "object",
+ "properties": {
+ "results": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionDeleteResult"
+ }
+ }
+ },
+ "required": [
+ "results"
+ ]
+ },
+ "SessionTrashReason": {
+ "type": "string",
+ "enum": [
+ "empty",
+ "one-word-reply"
+ ]
+ },
+ "SessionTrashCandidate": {
+ "type": "object",
+ "properties": {
+ "session": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "harness": {
+ "$ref": "#/$defs/HarnessId"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "reason": {
+ "$ref": "#/$defs/SessionTrashReason"
+ },
+ "userTurns": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "reply": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "session",
+ "harness",
+ "updatedAt",
+ "reason",
+ "userTurns"
+ ]
+ },
+ "SessionTrashList": {
+ "type": "object",
+ "properties": {
+ "candidates": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionTrashCandidate"
+ }
+ }
+ },
+ "required": [
+ "candidates"
+ ]
+ },
+ "TranscriptTurn": {
+ "type": "object",
+ "properties": {
+ "role": {
+ "$ref": "#/$defs/Role"
+ },
+ "text": {
+ "type": "string"
+ },
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "role",
+ "text"
+ ]
+ },
+ "TranscriptResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "command": {
+ "type": "string"
+ },
+ "turns": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TranscriptTurn"
+ }
+ },
+ "contextWindow": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "compactAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "contextSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ContextSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "id",
"command",
"turns"
]
@@ -4695,22 +4998,43 @@
"string",
"null"
]
+ },
+ "attachments": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/UserTurnAttachment"
+ }
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "workingDir": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
"text"
]
},
- "ThinkingLevel": {
- "type": "string",
- "enum": [
- "off",
- "low",
- "medium",
- "high",
- "xhigh"
- ]
- },
"SessionPostAccepted": {
"type": "object",
"properties": {
@@ -4737,6 +5061,45 @@
"message"
]
},
+ "SessionSteerRequest": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "attachments": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/UserTurnAttachment"
+ }
+ }
+ },
+ "required": [
+ "text"
+ ]
+ },
+ "SessionSteerResponse": {
+ "type": "object",
+ "properties": {
+ "outcome": {
+ "$ref": "#/$defs/SteerOutcome"
+ }
+ },
+ "required": [
+ "outcome"
+ ]
+ },
+ "SteerOutcome": {
+ "type": "string",
+ "enum": [
+ "steered",
+ "startedNewTurn",
+ "promptRequired"
+ ]
+ },
"SessionWsClientMessage": {
"type": "object",
"properties": {
@@ -4972,11 +5335,34 @@
}
]
},
+ "attachments": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/TranscriptAttachment"
+ }
+ },
"complete": {
"type": "boolean"
},
"compact": {
"type": "boolean"
+ },
+ "startedAtMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "endedAtMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
@@ -5042,15 +5428,44 @@
"tool_result"
]
},
- "TranscriptWsFrame": {
+ "TranscriptAttachment": {
"type": "object",
"properties": {
- "session": {
+ "mediaType": {
"type": "string"
},
- "rev": {
- "type": "integer",
- "format": "uint64",
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "uri": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "uploadId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "mediaType"
+ ]
+ },
+ "TranscriptWsFrame": {
+ "type": "object",
+ "properties": {
+ "session": {
+ "type": "string"
+ },
+ "rev": {
+ "type": "integer",
+ "format": "uint64",
"minimum": 0
},
"from": {
@@ -5136,6 +5551,53 @@
"contextSource"
]
},
+ "SessionPreviewKind": {
+ "type": "string",
+ "enum": [
+ "running",
+ "asking",
+ "approval",
+ "said"
+ ]
+ },
+ "SessionPreview": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "kind": {
+ "$ref": "#/$defs/SessionPreviewKind"
+ },
+ "text": {
+ "type": "string"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "sessionId",
+ "kind",
+ "text",
+ "at"
+ ]
+ },
+ "SessionPreviewList": {
+ "type": "object",
+ "properties": {
+ "previews": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionPreview"
+ }
+ }
+ },
+ "required": [
+ "previews"
+ ]
+ },
"HarnessTurnAccepted": {
"type": "object",
"properties": {
@@ -5254,6 +5716,16 @@
}
]
},
+ "startupContext": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StartupContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"redirectedTo": {
"anyOf": [
{
@@ -5263,6 +5735,16 @@
"type": "null"
}
]
+ },
+ "switches": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionSwitches"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
@@ -5293,6 +5775,165 @@
"protocol"
]
},
+ "StartupContext": {
+ "type": "object",
+ "properties": {
+ "topicId": {
+ "type": "string"
+ },
+ "sections": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/StartupSection"
+ }
+ },
+ "tokens": {
+ "type": "integer",
+ "format": "uint",
+ "minimum": 0
+ },
+ "deliveredVia": {
+ "$ref": "#/$defs/DeliveredVia"
+ }
+ },
+ "required": [
+ "topicId",
+ "sections",
+ "tokens",
+ "deliveredVia"
+ ]
+ },
+ "StartupSection": {
+ "type": "object",
+ "properties": {
+ "kind": {
+ "$ref": "#/$defs/StartupKind"
+ },
+ "title": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "sources": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/StartupSource"
+ }
+ }
+ },
+ "required": [
+ "kind",
+ "title",
+ "text",
+ "sources"
+ ]
+ },
+ "StartupKind": {
+ "type": "string",
+ "enum": [
+ "topic",
+ "recent",
+ "relevant"
+ ]
+ },
+ "StartupSource": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "session": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "required": [
+ "session"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "wiki": {
+ "$ref": "#/$defs/WikiSlug"
+ }
+ },
+ "required": [
+ "wiki"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "WikiSlug": {
+ "type": "string"
+ },
+ "DeliveredVia": {
+ "type": "string",
+ "enum": [
+ "metaAppend",
+ "cliFlag",
+ "none"
+ ]
+ },
+ "SessionSwitches": {
+ "type": "object",
+ "properties": {
+ "model": {
+ "type": "boolean"
+ },
+ "effort": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "model",
+ "effort"
+ ]
+ },
+ "HarnessSessionTitleRequest": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "title"
+ ]
+ },
+ "HarnessSessionForkRequest": {
+ "type": "object",
+ "properties": {
+ "prompts": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "prompts"
+ ]
+ },
+ "HarnessToolOutput": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "isError": {
+ "type": "boolean"
+ },
+ "truncated": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "text",
+ "isError",
+ "truncated"
+ ]
+ },
"HarnessSocketRefusalCode": {
"type": "string",
"enum": [
@@ -5402,6 +6043,12 @@
"format": "uint16",
"minimum": 0,
"maximum": 65535
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
}
},
@@ -5979,6 +6626,9 @@
"id": {
"type": "string"
},
+ "uri": {
+ "type": "string"
+ },
"name": {
"type": "string"
},
@@ -6003,6 +6653,7 @@
},
"required": [
"id",
+ "uri",
"name",
"bytes",
"mediaType",
@@ -6638,9 +7289,6 @@
"slug"
]
},
- "WikiSlug": {
- "type": "string"
- },
"WikiHistoryEntry": {
"type": "object",
"properties": {
@@ -6687,6 +7335,40 @@
"string",
"null"
]
+ },
+ "conversationId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "channel": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -6735,7 +7417,8 @@
"conversation",
"task",
"leaf",
- "extract-wiki"
+ "extract-wiki",
+ "user"
]
},
"WikiSourceSpan": {
@@ -6846,6 +7529,12 @@
"items": {
"type": "string"
}
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -6925,7 +7614,7 @@
"stalest": {
"type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/WikiTopic"
}
}
},
@@ -6960,9 +7649,15 @@
},
"excerpt": {
"type": "string"
- }
- },
- "required": [
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
"slug",
"title",
"tags",
@@ -6991,4298 +7686,8430 @@
"total"
]
},
- "AgentEvent": {
- "type": "object",
- "properties": {
- "v": {
- "$ref": "#/$defs/ProtocolVersion"
- },
- "session": {
- "type": "string"
- }
- },
- "required": [
- "v",
- "session"
- ],
+ "ProposalState": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "approved",
+ "rejected"
+ ]
+ },
+ "Proposer": {
+ "type": "string",
+ "enum": [
+ "categorizer",
+ "backfill"
+ ]
+ },
+ "TidyChange": {
"oneOf": [
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.start"
- },
- "title": {
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": [
- "string",
- "null"
- ]
+ "const": "merge"
},
- "harness": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionHarness"
- },
- {
- "type": "null"
- }
- ]
+ "source": {
+ "type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "into": {
+ "type": "string"
}
},
"required": [
- "type"
+ "kind",
+ "source",
+ "into"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.end"
+ "const": "move"
},
- "ts": {
+ "topic": {
+ "type": "string"
+ },
+ "parent": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
}
},
"required": [
- "type"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "message.user"
+ "const": "rename"
},
- "text": {
+ "topic": {
"type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "name": {
+ "type": "string"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "topic",
+ "name"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "message.agent"
+ "const": "close"
},
- "text": {
+ "topic": {
"type": "string"
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
- },
- "durationMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/AgentUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "thinking.delta"
+ "const": "delete"
},
- "text": {
+ "topic": {
"type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "tool.start"
+ "const": "createTopic"
},
- "tool": {
+ "topic": {
"type": "string"
},
- "args": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
+ "name": {
+ "type": "string"
},
- "ts": {
+ "parent": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
+ },
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "default": []
+ },
+ "conversations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
}
},
"required": [
- "type",
- "tool"
+ "kind",
+ "topic",
+ "name"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "task.plan"
+ "const": "fileInto"
},
- "tasks": {
+ "topic": {
+ "type": "string"
+ },
+ "sessions": {
"type": "array",
"items": {
- "type": "string"
- }
+ "$ref": "#/$defs/SessionId"
+ },
+ "default": []
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "conversations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
}
},
"required": [
- "type",
- "tasks"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "task.check"
+ "const": "mergePage"
},
- "index": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "page": {
+ "type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "into": {
+ "type": "string"
}
},
"required": [
- "type",
- "index"
+ "kind",
+ "page",
+ "into"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "activity"
- },
- "activity": {
- "$ref": "#/$defs/Activity"
+ "const": "removePage"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "page": {
+ "type": "string"
}
},
"required": [
- "type",
- "activity"
+ "kind",
+ "page"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "turn.end"
+ "const": "addType"
},
- "ts": {
+ "topic": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "parent": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
}
},
"required": [
- "type"
+ "kind",
+ "topic",
+ "name"
]
}
- ],
- "unevaluatedProperties": true
+ ]
},
- "SessionHarness": {
- "type": "string"
+ "TidySample": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "lastActive": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "id"
+ ]
},
- "AgentUsage": {
+ "TidyEvidence": {
"type": "object",
"properties": {
- "promptTokens": {
+ "sessions": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
- "completionTokens": {
+ "samples": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidySample"
+ },
+ "default": []
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "TidyProposal": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "batchId": {
+ "type": "string"
+ },
+ "change": {
+ "$ref": "#/$defs/TidyChange"
+ },
+ "reason": {
+ "type": "string"
+ },
+ "evidence": {
+ "$ref": "#/$defs/TidyEvidence"
+ },
+ "proposedBy": {
+ "$ref": "#/$defs/Proposer"
+ },
+ "proposedAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "state": {
+ "$ref": "#/$defs/ProposalState"
+ },
+ "decidedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "id",
+ "batchId",
+ "change",
+ "reason",
+ "evidence",
+ "proposedBy",
+ "proposedAt",
+ "state"
+ ]
+ },
+ "TidyBatch": {
+ "type": "object",
+ "properties": {
+ "batchId": {
+ "type": "string"
+ },
+ "proposedBy": {
+ "$ref": "#/$defs/Proposer"
+ },
+ "proposedAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "proposals": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyProposal"
+ }
+ }
+ },
+ "required": [
+ "batchId",
+ "proposedBy",
+ "proposedAt",
+ "proposals"
+ ]
+ },
+ "TidyPending": {
+ "type": "object",
+ "properties": {
+ "batches": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyBatch"
+ }
+ }
+ },
+ "required": [
+ "batches"
+ ]
+ },
+ "TidyFailure": {
+ "type": "object",
+ "properties": {
+ "proposalId": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "proposalId",
+ "error"
+ ]
+ },
+ "TidyBatchDecision": {
+ "type": "object",
+ "properties": {
+ "decided": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyProposal"
+ }
+ },
+ "failed": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyFailure"
+ },
+ "default": []
+ }
+ },
+ "required": [
+ "decided"
+ ]
+ },
+ "FilingUpkeep": {
+ "type": "object",
+ "properties": {
+ "categorizer": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
- "cachedTokens": {
+ "you": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "uncategorized": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "leftOut": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "correctionsLastWeek": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"required": [
- "promptTokens",
- "completionTokens",
- "cachedTokens"
+ "categorizer",
+ "you",
+ "uncategorized",
+ "leftOut",
+ "correctionsLastWeek"
]
},
- "AgentEventKind": {
+ "EntityTypeCount": {
+ "type": "object",
+ "properties": {
+ "typeId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "entities": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "typeId",
+ "name",
+ "entities"
+ ]
+ },
+ "WikiUpkeep": {
+ "type": "object",
+ "properties": {
+ "topicPages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "entityTypes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/EntityTypeCount"
+ }
+ },
+ "loosePages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "topicPages",
+ "entityTypes",
+ "loosePages"
+ ]
+ },
+ "WorkerActivity": {
+ "type": "object",
+ "properties": {
+ "lastFinishedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "failing": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "failing"
+ ]
+ },
+ "WorkerUpkeep": {
+ "type": "object",
+ "properties": {
+ "embedder": {
+ "$ref": "#/$defs/WorkerActivity"
+ },
+ "summarizer": {
+ "$ref": "#/$defs/WorkerActivity"
+ },
+ "categorizer": {
+ "$ref": "#/$defs/WorkerActivity"
+ },
+ "wikiBuilder": {
+ "$ref": "#/$defs/WorkerActivity"
+ }
+ },
+ "required": [
+ "embedder",
+ "summarizer",
+ "categorizer",
+ "wikiBuilder"
+ ]
+ },
+ "MemoryUpkeep": {
+ "type": "object",
+ "properties": {
+ "filing": {
+ "$ref": "#/$defs/FilingUpkeep"
+ },
+ "wiki": {
+ "$ref": "#/$defs/WikiUpkeep"
+ },
+ "workers": {
+ "$ref": "#/$defs/WorkerUpkeep"
+ },
+ "pendingProposals": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "filing",
+ "wiki",
+ "workers",
+ "pendingProposals"
+ ]
+ },
+ "TopicDirectory": {
"oneOf": [
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.start"
- },
- "title": {
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": [
- "string",
- "null"
- ]
+ "const": "local"
},
- "harness": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionHarness"
- },
- {
- "type": "null"
- }
- ]
+ "node": {
+ "type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "path": {
+ "type": "string"
}
},
"required": [
- "type"
+ "kind",
+ "node",
+ "path"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.end"
+ "const": "shared"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message.user"
- },
- "text": {
- "type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "text"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message.agent"
- },
- "text": {
- "type": "string"
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
- },
- "durationMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/AgentUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "text"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "thinking.delta"
- },
- "text": {
- "type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "text"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool.start"
- },
- "tool": {
+ "path": {
"type": "string"
- },
- "args": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "tool"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "task.plan"
- },
- "tasks": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "tasks"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "task.check"
- },
- "index": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "index"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "activity"
- },
- "activity": {
- "$ref": "#/$defs/Activity"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "activity"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "turn.end"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
}
},
"required": [
- "type"
+ "kind",
+ "path"
]
}
]
},
- "LiveSessionSummary": {
+ "TopicKind": {
+ "type": "string",
+ "enum": [
+ "work",
+ "type",
+ "entity"
+ ]
+ },
+ "PlacedBy": {
+ "type": "string",
+ "enum": [
+ "you",
+ "categorizer"
+ ]
+ },
+ "TopicRecord": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
+ "kind": {
+ "$ref": "#/$defs/TopicKind",
+ "default": "work"
+ },
+ "slug": {
+ "type": "string"
+ },
"name": {
"type": "string"
},
- "harness": {
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "directory": {
"anyOf": [
{
- "$ref": "#/$defs/SessionHarness"
+ "$ref": "#/$defs/TopicDirectory"
},
{
"type": "null"
}
]
},
- "lastEventTs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "pty": {
- "type": [
- "string",
- "null"
- ]
+ "createdAt": {
+ "type": "integer",
+ "format": "int64"
},
- "contextWindow": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
},
- "compactAt": {
+ "closedAt": {
"type": [
"integer",
"null"
],
- "format": "uint64",
- "minimum": 0
- },
- "contextSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/ContextSource"
- },
- {
- "type": "null"
- }
- ]
+ "format": "int64"
}
},
"required": [
"id",
- "name"
+ "slug",
+ "name",
+ "aliases",
+ "createdAt",
+ "updatedAt"
]
},
- "SessionLogLine": {
+ "TopicSummary": {
"type": "object",
"properties": {
- "who": {
+ "id": {
"type": "string"
},
- "text": {
+ "kind": {
+ "$ref": "#/$defs/TopicKind",
+ "default": "work"
+ },
+ "slug": {
"type": "string"
- }
- },
- "required": [
- "who",
- "text"
- ]
- },
- "SessionView": {
- "type": "object",
- "properties": {
- "title": {
+ },
+ "name": {
"type": "string"
},
- "activity": {
- "$ref": "#/$defs/Activity"
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "tool": {
+ "parent": {
"type": [
"string",
"null"
]
},
- "tasks": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "directory": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDirectory"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "thought": {
- "type": "string"
+ "createdAt": {
+ "type": "integer",
+ "format": "int64"
},
- "lastMessage": {
- "type": "string"
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
},
- "log": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/SessionLogLine"
- }
+ "closedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
},
- "term": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "sessionCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
},
- "ended": {
- "type": "boolean"
+ "lastActive": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "title",
- "activity",
- "tasks",
- "thought",
- "lastMessage",
- "log",
- "term",
- "ended"
+ "id",
+ "slug",
+ "name",
+ "aliases",
+ "createdAt",
+ "updatedAt",
+ "sessionCount"
]
},
- "LiveSessionList": {
+ "TopicList": {
"type": "object",
"properties": {
- "sessions": {
+ "topics": {
"type": "array",
"items": {
- "$ref": "#/$defs/LiveSessionSummary"
+ "$ref": "#/$defs/TopicSummary"
}
}
},
"required": [
- "sessions"
+ "topics"
]
},
- "StateResponse": {
+ "TopicCreateRequest": {
"type": "object",
"properties": {
- "session": {
- "type": "string"
+ "kind": {
+ "$ref": "#/$defs/TopicKind",
+ "default": "work"
},
- "state": {
- "$ref": "#/$defs/SessionView"
- }
- },
- "required": [
- "session",
- "state"
- ]
- },
- "snapshot": {
- "type": "object",
- "properties": {
- "v": {
- "$ref": "#/$defs/ProtocolVersion"
+ "name": {
+ "type": "string"
},
- "sessions": {
+ "aliases": {
"type": "array",
"items": {
- "$ref": "#/$defs/LiveSessionSummary"
- }
+ "type": "string"
+ },
+ "default": []
},
- "rooms": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/SessionView"
- }
- }
- },
- "required": [
- "v",
- "sessions",
- "rooms"
- ]
- },
- "session.removed": {
- "type": "object",
- "properties": {
- "v": {
- "$ref": "#/$defs/ProtocolVersion"
+ "parent": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "session": {
- "type": "string"
+ "directory": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDirectory"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
+ "additionalProperties": false,
"required": [
- "v",
- "session"
- ]
- },
- "SessionBroadcast": {
- "anyOf": [
- {
- "$ref": "#/$defs/snapshot"
- },
- {
- "$ref": "#/$defs/session.removed"
- },
- {
- "$ref": "#/$defs/AgentEvent"
- }
+ "name"
]
},
- "CaptureBatchRequest": {
+ "WikiPageEdit": {
"type": "object",
"properties": {
- "session_key": {
- "type": "string"
- },
- "agent": {
- "type": "string"
- },
- "channel": {
+ "currentState": {
"type": [
"string",
"null"
]
},
- "title": {
+ "article": {
"type": [
"string",
"null"
]
- },
- "settings": {
+ }
+ },
+ "additionalProperties": false
+ },
+ "TopicUpdate": {
+ "type": "object",
+ "properties": {
+ "name": {
"type": [
- "object",
+ "string",
"null"
- ],
- "additionalProperties": true
+ ]
},
- "task_id": {
+ "aliases": {
"type": [
- "string",
+ "array",
"null"
- ]
+ ],
+ "items": {
+ "type": "string"
+ }
},
- "finalize": {
+ "parent": {
"type": [
- "boolean",
+ "string",
"null"
]
},
- "created_at": {
+ "directory": {
"anyOf": [
{
- "$ref": "#/$defs/Millis"
+ "$ref": "#/$defs/TopicDirectory"
},
{
"type": "null"
}
]
- },
- "updated_at": {
- "anyOf": [
- {
- "$ref": "#/$defs/Millis"
- },
- {
- "type": "null"
- }
- ]
- },
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CaptureMessage"
- }
}
},
- "required": [
- "session_key",
- "agent",
- "messages"
- ]
+ "additionalProperties": false
},
- "CaptureMessage": {
+ "TopicMergeRequest": {
"type": "object",
"properties": {
- "event_id": {
- "type": "string"
- },
- "role": {
- "$ref": "#/$defs/Role"
- },
- "content": {
+ "into": {
"type": "string"
- },
- "tool_name": {
- "type": [
- "string",
- "null"
- ]
- },
- "tool_args": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
- },
- "tool_result": {
- "type": [
- "string",
- "null"
- ]
- },
- "metadata": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
- },
- "created_at": {
- "anyOf": [
- {
- "$ref": "#/$defs/Millis"
- },
- {
- "type": "null"
- }
- ]
}
},
+ "additionalProperties": false,
"required": [
- "event_id",
- "role",
- "content"
+ "into"
]
},
- "CaptureResult": {
+ "TopicPlacement": {
"type": "object",
"properties": {
- "ok": {
- "type": "boolean"
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
},
- "conversation_id": {
+ "topicId": {
"type": "string"
},
- "inserted": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
},
- "skipped": {
+ "at": {
"type": "integer",
- "format": "uint64",
- "minimum": 0
+ "format": "int64"
}
},
"required": [
- "ok",
- "conversation_id",
- "inserted",
- "skipped"
- ]
- },
- "HookEventName": {
- "type": "string",
- "enum": [
- "provider:before",
- "provider:after",
- "provider:error",
- "tool:before",
- "tool:after",
- "session:start",
- "session:end",
- "turn:before",
- "turn:after",
- "turn:reflect",
- "skill:before",
- "skill:after",
- "compact:before",
- "compact:after",
- "delegation:before",
- "delegation:after"
+ "sessionId",
+ "topicId",
+ "by",
+ "at"
]
},
- "HookContextBase": {
+ "TopicSuggestion": {
"type": "object",
"properties": {
- "agentId": {
+ "name": {
+ "type": "string"
+ },
+ "topicId": {
"type": [
"string",
"null"
]
},
- "sessionId": {
+ "parentId": {
"type": [
"string",
"null"
]
- },
- "timestamp": {
- "type": "integer",
- "format": "int64"
- },
- "metadata": {
- "type": "object",
- "additionalProperties": true
}
},
"required": [
- "timestamp",
- "metadata"
- ]
- },
- "ReflectionSource": {
- "type": "string",
- "enum": [
- "complexity",
- "periodic",
- "manual"
- ]
- },
- "DelegationHookStatus": {
- "type": "string",
- "enum": [
- "completed",
- "failed",
- "timeout",
- "cached"
+ "name"
]
},
- "HookUsage": {
+ "PlacementReply": {
"type": "object",
"properties": {
- "promptTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "placement": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicPlacement"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "completionTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "suggestion": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicSuggestion"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "PlacementRequest": {
+ "type": "object",
+ "properties": {
+ "topicId": {
+ "type": "string"
}
},
+ "additionalProperties": false,
"required": [
- "promptTokens",
- "completionTokens"
+ "topicId"
]
},
- "SessionTokens": {
+ "SessionHistoryMark": {
"type": "object",
"properties": {
- "prompt": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
},
- "completion": {
+ "markedAt": {
"type": "integer",
- "format": "uint64",
- "minimum": 0
+ "format": "int64"
}
},
"required": [
- "prompt",
- "completion"
+ "sessionId",
+ "markedAt"
]
},
- "TurnComplexity": {
+ "SessionHistoryList": {
"type": "object",
"properties": {
- "toolCallCount": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "hadErrorRecovery": {
- "type": "boolean"
- },
- "hadUserCorrection": {
- "type": "boolean"
- },
- "uniqueTools": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionHistoryMark"
+ }
}
},
"required": [
- "toolCallCount",
- "hadErrorRecovery",
- "hadUserCorrection",
- "uniqueTools"
+ "sessions"
]
},
- "HookContext": {
+ "TopicSession": {
"type": "object",
"properties": {
- "agentId": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "title": {
"type": [
"string",
"null"
]
},
- "sessionId": {
+ "lastActive": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "node": {
"type": [
"string",
"null"
]
},
- "timestamp": {
- "type": "integer",
- "format": "int64"
+ "parentSessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "metadata": {
- "type": "object",
- "additionalProperties": true
+ "taskId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
- "timestamp",
- "metadata"
- ],
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "provider:before"
- },
- "providerId": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/Message"
- }
- },
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
- }
+ "sessionId",
+ "topicId",
+ "by",
+ "at"
+ ]
+ },
+ "TopicSessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicSession"
+ }
+ },
+ "conversations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicConversation"
},
- "required": [
- "event",
- "providerId",
- "model",
- "messages"
+ "default": []
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "TopicConversation": {
+ "type": "object",
+ "properties": {
+ "conversationId": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "channel": {
+ "type": "string"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "provider:after"
- },
- "providerId": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "latencyMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "lastActive": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "node": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "conversationId",
+ "topicId",
+ "by",
+ "at",
+ "channel"
+ ]
+ },
+ "TopicFiling": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicSession"
+ }
+ },
+ "conversations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicConversation"
+ }
+ },
+ "history": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionHistoryMark"
+ }
+ }
+ },
+ "required": [
+ "sessions",
+ "conversations",
+ "history"
+ ]
+ },
+ "SessionSuggestion": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "name": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "sessionId",
+ "name"
+ ]
+ },
+ "SessionSuggestionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionSuggestion"
+ }
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "ConversationPlacement": {
+ "type": "object",
+ "properties": {
+ "conversationId": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "conversationId",
+ "topicId",
+ "by",
+ "at"
+ ]
+ },
+ "ConversationPlacementReply": {
+ "type": "object",
+ "properties": {
+ "placement": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ConversationPlacement"
},
- "hasToolCalls": {
- "type": "boolean"
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "providerId",
- "model",
- "latencyMs",
- "hasToolCalls"
]
+ }
+ }
+ },
+ "TopicPage": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "$ref": "#/$defs/TopicRecord"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "provider:error"
- },
- "providerId": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "error": {
- "type": "string"
+ "page": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/WikiPageResponse"
},
- "statusCode": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint16",
- "minimum": 0,
- "maximum": 65535
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "providerId",
- "model",
- "error"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "tool:before"
- },
- "toolName": {
- "type": "string"
- },
- "args": {
- "type": "object",
- "additionalProperties": true
- },
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "blockReason": {
- "type": [
- "string",
- "null"
- ]
- }
+ "mentions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicMention"
},
- "required": [
- "event",
- "toolName",
- "args"
+ "default": []
+ }
+ },
+ "required": [
+ "topic"
+ ]
+ },
+ "TopicMention": {
+ "type": "object",
+ "properties": {
+ "topicId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "topicId",
+ "name"
+ ]
+ },
+ "DecisionStatus": {
+ "type": "string",
+ "enum": [
+ "active",
+ "superseded"
+ ]
+ },
+ "TopicDecision": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/DecisionStatus"
+ },
+ "supersededBy": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "tool:after"
- },
- "toolName": {
- "type": "string"
+ "by": {
+ "type": "string"
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
},
- "args": {
- "type": "object",
- "additionalProperties": true
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "id",
+ "topicId",
+ "text",
+ "status",
+ "by",
+ "createdAt",
+ "updatedAt"
+ ]
+ },
+ "TopicDecisionList": {
+ "type": "object",
+ "properties": {
+ "decisions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicDecision"
+ }
+ }
+ },
+ "required": [
+ "decisions"
+ ]
+ },
+ "DecisionCreateRequest": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
},
- "result": {
- "type": "object",
- "additionalProperties": true
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "DecisionUpdate": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "DecisionSupersedeRequest": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
},
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
+ "DecisionSuperseded": {
+ "type": "object",
+ "properties": {
+ "superseded": {
+ "$ref": "#/$defs/TopicDecision"
+ },
+ "replacement": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDecision"
},
- "isError": {
- "type": "boolean"
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "toolName",
- "args",
- "result",
- "durationMs",
- "isError"
]
+ }
+ },
+ "required": [
+ "superseded"
+ ]
+ },
+ "AgentEvent": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
},
+ "session": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "v",
+ "session"
+ ],
+ "oneOf": [
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:start"
+ "const": "session.start"
},
- "platform": {
+ "title": {
"type": [
"string",
"null"
]
},
- "userId": {
+ "name": {
"type": [
"string",
"null"
]
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionHarness"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event"
+ "type"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:end"
+ "const": "session.end"
},
- "turnCount": {
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint32",
- "minimum": 0
- },
- "totalTokens": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionTokens"
- },
- {
- "type": "null"
- }
- ]
+ "format": "int64"
}
},
"required": [
- "event"
+ "type"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:before"
+ "const": "message.user"
},
- "userMessage": {
- "$ref": "#/$defs/Message"
+ "text": {
+ "type": "string"
},
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "skipReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "userMessage"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:after"
+ "const": "message.agent"
},
- "response": {
+ "text": {
"type": "string"
},
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "iterations": {
- "type": "integer",
- "format": "uint32",
+ "durationMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
"minimum": 0
},
- "aborted": {
- "type": "boolean"
- },
"usage": {
"anyOf": [
{
- "$ref": "#/$defs/HookUsage"
+ "$ref": "#/$defs/AgentUsage"
},
{
"type": "null"
}
]
+ },
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "aborted"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:reflect"
+ "const": "thinking.delta"
},
- "response": {
+ "text": {
"type": "string"
},
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "complexity": {
- "$ref": "#/$defs/TurnComplexity"
- },
- "source": {
- "$ref": "#/$defs/ReflectionSource"
- },
- "userMessage": {
- "$ref": "#/$defs/Message"
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "complexity",
- "source",
- "userMessage"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "skill:before"
- },
- "skillName": {
- "type": "string"
+ "const": "tool.start"
},
- "skillLocation": {
+ "tool": {
"type": "string"
},
- "matchedTriggers": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "matchScore": {
- "type": "number",
- "format": "double"
- },
- "skip": {
+ "args": {
"type": [
- "boolean",
+ "object",
"null"
- ]
+ ],
+ "additionalProperties": true
},
- "skipReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "skillName",
- "skillLocation",
- "matchedTriggers",
- "matchScore"
+ "type",
+ "tool"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "skill:after"
- },
- "skillName": {
- "type": "string"
- },
- "success": {
- "type": "boolean"
+ "const": "task.plan"
},
- "toolsUsed": {
+ "tasks": {
"type": "array",
"items": {
"type": "string"
}
},
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "skillName",
- "success",
- "toolsUsed",
- "iterations",
- "durationMs"
+ "type",
+ "tasks"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "compact:before"
+ "const": "task.check"
},
- "messageCount": {
+ "index": {
"type": "integer",
- "format": "uint64",
+ "format": "uint32",
"minimum": 0
+ },
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "messageCount"
+ "type",
+ "index"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "compact:after"
+ "const": "activity"
},
- "remainingMessages": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "activity": {
+ "$ref": "#/$defs/Activity"
},
- "summary": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "remainingMessages"
+ "type",
+ "activity"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "delegation:before"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
- },
- "task": {
- "type": "string"
- },
- "chainDepth": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "const": "turn.end"
},
- "blocked": {
+ "ts": {
"type": [
- "boolean",
- "null"
- ]
- },
- "blockReason": {
- "type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "chainDepth"
+ "type"
]
+ }
+ ],
+ "unevaluatedProperties": true
+ },
+ "SessionHarness": {
+ "type": "string"
+ },
+ "AgentUsage": {
+ "type": "object",
+ "properties": {
+ "promptTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completionTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
},
+ "cachedTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "promptTokens",
+ "completionTokens",
+ "cachedTokens"
+ ]
+ },
+ "AgentEventKind": {
+ "oneOf": [
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "delegation:after"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
- },
- "task": {
- "type": "string"
+ "const": "session.start"
},
- "status": {
- "$ref": "#/$defs/DelegationHookStatus"
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "usage": {
+ "harness": {
"anyOf": [
{
- "$ref": "#/$defs/HookUsage"
+ "$ref": "#/$defs/SessionHarness"
},
{
"type": "null"
}
]
},
- "toolsUsed": {
+ "ts": {
"type": [
- "array",
+ "integer",
"null"
],
- "items": {
- "type": "string"
- }
- },
- "cached": {
- "type": "boolean"
+ "format": "int64"
}
},
"required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "status",
- "durationMs",
- "cached"
- ]
- }
- ]
- },
- "Message": {
- "type": "object",
- "properties": {
- "role": {
- "$ref": "#/$defs/Role"
- },
- "content": {
- "$ref": "#/$defs/MessageContent"
- },
- "reasoning": {
- "type": [
- "string",
- "null"
- ]
- },
- "toolCalls": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/ToolCall"
- }
- },
- "toolCallId": {
- "type": [
- "string",
- "null"
+ "type"
]
- }
- },
- "required": [
- "role",
- "content"
- ]
- },
- "MessageContent": {
- "anyOf": [
- {
- "type": "string"
},
{
- "type": "array",
- "items": {
- "$ref": "#/$defs/ContentPart"
- }
- }
- ]
- },
- "ToolCall": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "arguments": {
"type": "object",
- "additionalProperties": true
- },
- "thoughtSignature": {
- "type": [
- "string",
- "null"
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.end"
+ },
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "type"
]
- }
- },
- "required": [
- "id",
- "name",
- "arguments"
- ]
- },
- "HookContextKind": {
- "oneOf": [
+ },
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:before"
- },
- "providerId": {
- "type": "string"
+ "const": "message.user"
},
- "model": {
+ "text": {
"type": "string"
},
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/Message"
- }
- },
- "skip": {
+ "ts": {
"type": [
- "boolean",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "messages"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:after"
+ "const": "message.agent"
},
- "providerId": {
+ "text": {
"type": "string"
},
"model": {
- "type": "string"
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "durationMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
},
"usage": {
"anyOf": [
{
- "$ref": "#/$defs/HookUsage"
+ "$ref": "#/$defs/AgentUsage"
},
{
"type": "null"
}
]
},
- "latencyMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "hasToolCalls": {
- "type": "boolean"
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "latencyMs",
- "hasToolCalls"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:error"
- },
- "providerId": {
- "type": "string"
- },
- "model": {
- "type": "string"
+ "const": "thinking.delta"
},
- "error": {
+ "text": {
"type": "string"
},
- "statusCode": {
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint16",
- "minimum": 0,
- "maximum": 65535
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "error"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "tool:before"
+ "const": "tool.start"
},
- "toolName": {
+ "tool": {
"type": "string"
},
"args": {
- "type": "object",
- "additionalProperties": true
- },
- "blocked": {
"type": [
- "boolean",
+ "object",
"null"
- ]
+ ],
+ "additionalProperties": true
},
- "blockReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "toolName",
- "args"
+ "type",
+ "tool"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "tool:after"
- },
- "toolName": {
- "type": "string"
- },
- "args": {
- "type": "object",
- "additionalProperties": true
- },
- "result": {
- "type": "object",
- "additionalProperties": true
+ "const": "task.plan"
},
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "tasks": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "isError": {
- "type": "boolean"
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "toolName",
- "args",
- "result",
- "durationMs",
- "isError"
+ "type",
+ "tasks"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:start"
+ "const": "task.check"
},
- "platform": {
- "type": [
- "string",
- "null"
- ]
+ "index": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
},
- "userId": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event"
+ "type",
+ "index"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:end"
+ "const": "activity"
},
- "turnCount": {
+ "activity": {
+ "$ref": "#/$defs/Activity"
+ },
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint32",
- "minimum": 0
- },
- "totalTokens": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionTokens"
- },
- {
- "type": "null"
- }
- ]
+ "format": "int64"
}
},
"required": [
- "event"
+ "type",
+ "activity"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:before"
- },
- "userMessage": {
- "$ref": "#/$defs/Message"
- },
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
+ "const": "turn.end"
},
- "skipReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "userMessage"
+ "type"
]
+ }
+ ]
+ },
+ "ContextUsageSource": {
+ "type": "string",
+ "enum": [
+ "harness",
+ "last-call"
+ ]
+ },
+ "LiveSessionSummary": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "turn:after"
- },
- "response": {
- "type": "string"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "aborted": {
- "type": "boolean"
+ "name": {
+ "type": "string"
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionHarness"
},
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "aborted"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "turn:reflect"
- },
- "response": {
- "type": "string"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "complexity": {
- "$ref": "#/$defs/TurnComplexity"
- },
- "source": {
- "$ref": "#/$defs/ReflectionSource"
+ "lastEventTs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "pty": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "contextWindow": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "compactAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "contextSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ContextSource"
},
- "userMessage": {
- "$ref": "#/$defs/Message"
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "complexity",
- "source",
- "userMessage"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
+ "SessionLogLine": {
+ "type": "object",
+ "properties": {
+ "who": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "who",
+ "text"
+ ]
+ },
+ "SessionView": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "activity": {
+ "$ref": "#/$defs/Activity"
+ },
+ "tool": {
+ "type": [
+ "string",
+ "null"
]
},
- {
+ "tasks": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "thought": {
+ "type": "string"
+ },
+ "lastMessage": {
+ "type": "string"
+ },
+ "log": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionLogLine"
+ }
+ },
+ "term": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "ended": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "title",
+ "activity",
+ "tasks",
+ "thought",
+ "lastMessage",
+ "log",
+ "term",
+ "ended"
+ ]
+ },
+ "LiveSessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/LiveSessionSummary"
+ }
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "StateResponse": {
+ "type": "object",
+ "properties": {
+ "session": {
+ "type": "string"
+ },
+ "state": {
+ "$ref": "#/$defs/SessionView"
+ }
+ },
+ "required": [
+ "session",
+ "state"
+ ]
+ },
+ "snapshot": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/LiveSessionSummary"
+ }
+ },
+ "rooms": {
"type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "skill:before"
- },
- "skillName": {
- "type": "string"
- },
- "skillLocation": {
- "type": "string"
+ "additionalProperties": {
+ "$ref": "#/$defs/SessionView"
+ }
+ }
+ },
+ "required": [
+ "v",
+ "sessions",
+ "rooms"
+ ]
+ },
+ "session.removed": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "session": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "v",
+ "session"
+ ]
+ },
+ "SessionBroadcast": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "CaptureBatchRequest": {
+ "type": "object",
+ "properties": {
+ "session_key": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ },
+ "channel": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "settings": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ },
+ "task_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "finalize": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Millis"
},
- "matchedTriggers": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "matchScore": {
- "type": "number",
- "format": "double"
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updated_at": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Millis"
},
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CaptureMessage"
+ }
+ }
+ },
+ "required": [
+ "session_key",
+ "agent",
+ "messages"
+ ]
+ },
+ "CaptureMessage": {
+ "type": "object",
+ "properties": {
+ "event_id": {
+ "type": "string"
+ },
+ "role": {
+ "$ref": "#/$defs/Role"
+ },
+ "content": {
+ "type": "string"
+ },
+ "tool_name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tool_args": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ },
+ "tool_result": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "metadata": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Millis"
},
- "skipReason": {
- "type": [
- "string",
- "null"
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "skillName",
- "skillLocation",
- "matchedTriggers",
- "matchScore"
]
+ }
+ },
+ "required": [
+ "event_id",
+ "role",
+ "content"
+ ]
+ },
+ "CaptureResult": {
+ "type": "object",
+ "properties": {
+ "ok": {
+ "type": "boolean"
+ },
+ "conversation_id": {
+ "type": "string"
+ },
+ "inserted": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "skipped": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "ok",
+ "conversation_id",
+ "inserted",
+ "skipped"
+ ]
+ },
+ "HookEventName": {
+ "type": "string",
+ "enum": [
+ "provider:before",
+ "provider:after",
+ "provider:error",
+ "tool:before",
+ "tool:after",
+ "session:start",
+ "session:end",
+ "turn:before",
+ "turn:after",
+ "turn:reflect",
+ "skill:before",
+ "skill:after",
+ "compact:before",
+ "compact:after",
+ "delegation:before",
+ "delegation:after"
+ ]
+ },
+ "HookContextBase": {
+ "type": "object",
+ "properties": {
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "timestamp": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "metadata": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ },
+ "required": [
+ "timestamp",
+ "metadata"
+ ]
+ },
+ "ReflectionSource": {
+ "type": "string",
+ "enum": [
+ "complexity",
+ "periodic",
+ "manual"
+ ]
+ },
+ "DelegationHookStatus": {
+ "type": "string",
+ "enum": [
+ "completed",
+ "failed",
+ "timeout",
+ "cached"
+ ]
+ },
+ "HookUsage": {
+ "type": "object",
+ "properties": {
+ "promptTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completionTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "promptTokens",
+ "completionTokens"
+ ]
+ },
+ "SessionTokens": {
+ "type": "object",
+ "properties": {
+ "prompt": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completion": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "prompt",
+ "completion"
+ ]
+ },
+ "TurnComplexity": {
+ "type": "object",
+ "properties": {
+ "toolCallCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "hadErrorRecovery": {
+ "type": "boolean"
+ },
+ "hadUserCorrection": {
+ "type": "boolean"
+ },
+ "uniqueTools": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "toolCallCount",
+ "hadErrorRecovery",
+ "hadUserCorrection",
+ "uniqueTools"
+ ]
+ },
+ "HookContext": {
+ "type": "object",
+ "properties": {
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "timestamp": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "metadata": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ },
+ "required": [
+ "timestamp",
+ "metadata"
+ ],
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:before"
+ },
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "messages"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:after"
+ },
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "latencyMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "hasToolCalls": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "latencyMs",
+ "hasToolCalls"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:error"
+ },
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "statusCode": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint16",
+ "minimum": 0,
+ "maximum": 65535
+ }
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "error"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "tool:before"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "toolName",
+ "args"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "tool:after"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "result": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "isError": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "toolName",
+ "args",
+ "result",
+ "durationMs",
+ "isError"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "session:start"
+ },
+ "platform": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "userId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "session:end"
+ },
+ "turnCount": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "totalTokens": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionTokens"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:before"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "skipReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "userMessage"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:after"
+ },
+ "response": {
+ "type": "string"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "aborted": {
+ "type": "boolean"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "aborted"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:reflect"
+ },
+ "response": {
+ "type": "string"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "complexity": {
+ "$ref": "#/$defs/TurnComplexity"
+ },
+ "source": {
+ "$ref": "#/$defs/ReflectionSource"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "required": [
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "complexity",
+ "source",
+ "userMessage"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:before"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "skillLocation": {
+ "type": "string"
+ },
+ "matchedTriggers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "matchScore": {
+ "type": "number",
+ "format": "double"
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "skipReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "skillLocation",
+ "matchedTriggers",
+ "matchScore"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:after"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "success": {
+ "type": "boolean"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "success",
+ "toolsUsed",
+ "iterations",
+ "durationMs"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "compact:before"
+ },
+ "messageCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "event",
+ "messageCount"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "compact:after"
+ },
+ "remainingMessages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "summary": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "remainingMessages"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:before"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "chainDepth": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "chainDepth"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:after"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/DelegationHookStatus"
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "toolsUsed": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "cached": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "status",
+ "durationMs",
+ "cached"
+ ]
+ }
+ ]
+ },
+ "Message": {
+ "type": "object",
+ "properties": {
+ "role": {
+ "$ref": "#/$defs/Role"
+ },
+ "content": {
+ "$ref": "#/$defs/MessageContent"
+ },
+ "reasoning": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "toolCalls": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/ToolCall"
+ }
+ },
+ "toolCallId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "role",
+ "content"
+ ]
+ },
+ "MessageContent": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ContentPart"
+ }
+ }
+ ]
+ },
+ "ToolCall": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "arguments": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "thoughtSignature": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "arguments"
+ ]
+ },
+ "HookContextKind": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:before"
+ },
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "messages"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:after"
+ },
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "latencyMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "hasToolCalls": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "latencyMs",
+ "hasToolCalls"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:error"
+ },
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "statusCode": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint16",
+ "minimum": 0,
+ "maximum": 65535
+ }
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "error"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "tool:before"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "toolName",
+ "args"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "tool:after"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "result": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "isError": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "toolName",
+ "args",
+ "result",
+ "durationMs",
+ "isError"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "session:start"
+ },
+ "platform": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "userId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "session:end"
+ },
+ "turnCount": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "totalTokens": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionTokens"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:before"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "skipReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "userMessage"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:after"
+ },
+ "response": {
+ "type": "string"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "aborted": {
+ "type": "boolean"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "aborted"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:reflect"
+ },
+ "response": {
+ "type": "string"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "complexity": {
+ "$ref": "#/$defs/TurnComplexity"
+ },
+ "source": {
+ "$ref": "#/$defs/ReflectionSource"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "required": [
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "complexity",
+ "source",
+ "userMessage"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:before"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "skillLocation": {
+ "type": "string"
+ },
+ "matchedTriggers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "matchScore": {
+ "type": "number",
+ "format": "double"
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "skipReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "skillLocation",
+ "matchedTriggers",
+ "matchScore"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:after"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "success": {
+ "type": "boolean"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "success",
+ "toolsUsed",
+ "iterations",
+ "durationMs"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "compact:before"
+ },
+ "messageCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "event",
+ "messageCount"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "compact:after"
+ },
+ "remainingMessages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "summary": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "remainingMessages"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:before"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "chainDepth": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "chainDepth"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:after"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/DelegationHookStatus"
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "toolsUsed": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "cached": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "status",
+ "durationMs",
+ "cached"
+ ]
+ }
+ ]
+ },
+ "HookPipelineError": {
+ "type": "object",
+ "properties": {
+ "hookId": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "hookId",
+ "error"
+ ]
+ },
+ "HookPipelineResult": {
+ "type": "object",
+ "properties": {
+ "context": {
+ "$ref": "#/$defs/HookContext"
+ },
+ "aborted": {
+ "type": "boolean"
+ },
+ "skipped": {
+ "type": "boolean"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HookPipelineError"
+ }
+ },
+ "ran": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "context",
+ "aborted",
+ "skipped",
+ "errors",
+ "ran"
+ ]
+ },
+ "HookErrorMode": {
+ "type": "string",
+ "enum": [
+ "continue",
+ "abort",
+ "retry"
+ ]
+ },
+ "HookConfig": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "event": {
+ "$ref": "#/$defs/HookEventName"
+ },
+ "type": {
+ "$ref": "#/$defs/HookConfigKind"
+ },
+ "target": {
+ "type": "string"
+ },
+ "priority": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "onError": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookErrorMode"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agentFilter": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "toolFilter": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "enabled": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "event",
+ "type",
+ "target"
+ ]
+ },
+ "HookConfigKind": {
+ "type": "string",
+ "enum": [
+ "shell",
+ "http",
+ "internal"
+ ]
+ },
+ "RosterCommand": {
+ "type": "string",
+ "enum": [
+ "claude",
+ "grok",
+ "kimi",
+ "opencode",
+ "hermes",
+ "codex",
+ "omp",
+ "dsh",
+ "cursor",
+ "cowork"
+ ]
+ },
+ "ApprovalDecision": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny",
+ "allow-session"
+ ]
+ },
+ "ApprovalOutcome": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny",
+ "allow-session",
+ "external"
+ ]
+ },
+ "HarnessStatus": {
+ "type": "string",
+ "enum": [
+ "working",
+ "blocked",
+ "idle"
+ ]
+ },
+ "StatusPhase": {
+ "type": "string",
+ "enum": [
+ "thinking",
+ "tool",
+ "writing",
+ "prompt"
+ ]
+ },
+ "StatusSource": {
+ "type": "string",
+ "enum": [
+ "herdr",
+ "transcript",
+ "hooks",
+ "protocol"
+ ]
+ },
+ "HarnessEvent": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "assistant-delta"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "text": {
+ "type": "string"
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "reasoning-delta"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "text": {
+ "type": "string"
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tool-use"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "toolCallId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "toolCallId",
+ "name",
+ "input"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tool-update"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "toolCallId": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "toolCallId",
+ "input"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tool-result"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "toolCallId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "output": {
+ "type": "string"
+ },
+ "isError": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "toolCallId",
+ "name",
+ "output"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "approval-request"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "requestId": {
+ "type": "string"
+ },
+ "toolCallId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "reason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "options": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/ApprovalOption"
+ }
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "requestId",
+ "name",
+ "input"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "approval-resolved"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "requestId": {
+ "type": "string"
+ },
+ "decision": {
+ "$ref": "#/$defs/ApprovalOutcome"
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "requestId",
+ "decision"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session-created"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "summary": {
+ "$ref": "#/$defs/HarnessSessionSummary"
+ },
+ "supersedes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "summary"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "plan"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "entries": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PlanEntry"
+ }
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "entries"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "turn-complete"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "stopReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/LlmUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modelMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "type",
+ "sessionId"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "context"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "used": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "window": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "source": {
+ "$ref": "#/$defs/ContextUsageSource"
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "used",
+ "source"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "error"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "code": {
+ "type": "string"
+ },
+ "deliveryId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "message": {
+ "type": "string"
+ },
+ "retryable": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "code",
+ "message"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session-updated"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "status": {
+ "$ref": "#/$defs/HarnessSessionStatus"
+ },
+ "previousSessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "supersedes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "status"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "transcript"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "rev": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "from": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "total": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "turns": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HarnessTranscriptTurn"
+ }
+ },
+ "command": {
+ "$ref": "#/$defs/RosterCommand"
+ },
+ "truncatedBefore": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "contextWindow": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "compactAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "contextSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ContextSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "rev",
+ "from",
+ "total",
+ "turns",
+ "command"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "status"
+ }
+ },
+ "$ref": "#/$defs/HarnessStatusFrame",
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "prompt"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "promptId": {
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/$defs/PromptKind"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "questions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PromptQuestion"
+ }
+ },
+ "resolved": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/PromptResolution"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "screen": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/PromptScreen"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "promptId",
+ "kind",
+ "toolName",
+ "questions"
+ ]
+ }
+ ]
+ },
+ "ApprovalOption": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "label"
+ ]
+ },
+ "HarnessSessionSummary": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "harnessId": {
+ "$ref": "#/$defs/HarnessId"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "cwd": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "createdAt": {
+ "$ref": "#/$defs/Millis"
+ },
+ "updatedAt": {
+ "$ref": "#/$defs/Millis"
+ },
+ "status": {
+ "$ref": "#/$defs/HarnessSessionStatus"
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "supersedes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentSessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agentName": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "taskId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "transport": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Transport"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "startupContext": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StartupContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "sessionId",
+ "harnessId",
+ "createdAt",
+ "updatedAt",
+ "status"
+ ],
+ "additionalProperties": true
+ },
+ "PlanEntry": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/PlanStatus"
+ }
+ },
+ "required": [
+ "content",
+ "status"
+ ]
+ },
+ "PlanStatus": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "in_progress",
+ "completed"
+ ]
+ },
+ "LlmUsage": {
+ "type": "object",
+ "properties": {
+ "promptTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completionTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "reasoningTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cachedTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cacheCreationTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cacheReadTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "promptTokens",
+ "completionTokens"
+ ]
+ },
+ "StatusTool": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "toolCallId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "HarnessStatusFrame": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "status": {
+ "$ref": "#/$defs/HarnessStatus"
+ },
+ "since": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "phase": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusPhase"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "tool": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusTool"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "promptId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "sessionId",
+ "status",
+ "since"
+ ]
+ },
+ "PromptKind": {
+ "type": "string",
+ "enum": [
+ "ask-user"
+ ]
+ },
+ "PromptQuestion": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "header": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "multiSelect": {
+ "type": "boolean"
+ },
+ "freeText": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PromptOption"
+ }
+ }
+ },
+ "required": [
+ "multiSelect",
+ "options"
+ ]
+ },
+ "PromptOption": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "label"
+ ]
+ },
+ "PromptResolution": {
+ "type": "object",
+ "properties": {
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "answerText": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "at"
+ ]
+ },
+ "PromptScreen": {
+ "type": "object",
+ "properties": {
+ "current": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "total": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "current",
+ "total"
+ ]
+ },
+ "HarnessCapabilities": {
+ "type": "object",
+ "properties": {
+ "interrupt": {
+ "type": "boolean"
+ },
+ "resume": {
+ "type": "boolean"
+ },
+ "approvals": {
+ "type": "boolean"
+ },
+ "steering": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "liveStream": {
+ "type": "boolean"
+ },
+ "listSessions": {
+ "type": "boolean"
+ },
+ "drive": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "turnOptions": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "launchModel": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "imageAttachments": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "models": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/HarnessModelOption"
+ }
+ },
+ "modelsSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessModelsSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "efforts": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/EffortOption"
+ }
+ },
+ "modelFlag": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effortFlag": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "interrupt",
+ "resume",
+ "approvals",
+ "liveStream",
+ "listSessions"
+ ]
+ },
+ "HarnessModelOption": {
+ "type": "object",
+ "properties": {
+ "inputModalities": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "isDefault": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "efforts": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/EffortOption"
+ }
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ]
+ },
+ "EffortOption": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "isDefault": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ]
+ },
+ "HarnessModelsSource": {
+ "type": "string",
+ "enum": [
+ "discovered",
+ "config",
+ "merged",
+ "static"
+ ]
+ },
+ "HarnessControlCapabilities": {
+ "type": "object",
+ "properties": {
+ "interrupt": {
+ "type": "boolean"
+ },
+ "resume": {
+ "type": "boolean"
+ },
+ "approvals": {
+ "type": "boolean"
+ },
+ "steering": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "interrupt",
+ "resume",
+ "approvals"
+ ]
+ },
+ "HarnessObservationCapabilities": {
+ "type": "object",
+ "properties": {
+ "liveStream": {
+ "type": "boolean"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "skill:after"
- },
- "skillName": {
- "type": "string"
- },
- "success": {
- "type": "boolean"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "listSessions": {
+ "type": "boolean"
+ },
+ "drive": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "liveStream",
+ "listSessions"
+ ]
+ },
+ "HarnessSessionCreateRequest": {
+ "type": "object",
+ "properties": {
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
},
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "skillName",
- "success",
- "toolsUsed",
- "iterations",
- "durationMs"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "compact:before"
- },
- "messageCount": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- }
- },
- "required": [
- "event",
- "messageCount"
+ "model": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "compact:after"
- },
- "remainingMessages": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "summary": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "event",
- "remainingMessages"
+ "cwd": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "delegation:before"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
- },
- "task": {
- "type": "string"
- },
- "chainDepth": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "blockReason": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "chainDepth"
+ "agentId": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "delegation:after"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
- },
- "task": {
- "type": "string"
- },
- "status": {
- "$ref": "#/$defs/DelegationHookStatus"
- },
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "toolsUsed": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
- },
- "cached": {
- "type": "boolean"
- }
- },
- "required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "status",
- "durationMs",
- "cached"
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "prompt": {
+ "type": [
+ "string",
+ "null"
]
}
+ }
+ },
+ "HarnessSessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HarnessSessionSummary"
+ }
+ }
+ },
+ "required": [
+ "sessions"
]
},
- "HookPipelineError": {
+ "HarnessOffering": {
"type": "object",
"properties": {
- "hookId": {
- "type": "string"
+ "harnessId": {
+ "$ref": "#/$defs/HarnessId"
},
- "error": {
- "type": "string"
+ "chat": {
+ "type": "boolean"
+ },
+ "capabilities": {
+ "$ref": "#/$defs/HarnessCapabilities"
}
},
"required": [
- "hookId",
- "error"
+ "harnessId",
+ "chat",
+ "capabilities"
]
},
- "HookPipelineResult": {
+ "HarnessOfferingList": {
"type": "object",
"properties": {
- "context": {
- "$ref": "#/$defs/HookContext"
- },
- "aborted": {
- "type": "boolean"
- },
- "skipped": {
- "type": "boolean"
- },
- "errors": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/HookPipelineError"
- }
- },
- "ran": {
+ "harnesses": {
"type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/HarnessOffering"
}
}
},
"required": [
- "context",
- "aborted",
- "skipped",
- "errors",
- "ran"
+ "harnesses"
]
},
- "HookErrorMode": {
+ "HarnessCode": {
"type": "string",
"enum": [
- "continue",
- "abort",
- "retry"
+ "invalid_session_id",
+ "bad_request",
+ "session_id_collision",
+ "turn_in_flight",
+ "capability_unsupported",
+ "unknown_approval",
+ "unknown_prompt",
+ "turn_failed"
]
},
- "HookConfig": {
+ "HarnessStoreSession": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "event": {
- "$ref": "#/$defs/HookEventName"
- },
- "type": {
- "$ref": "#/$defs/HookConfigKind"
+ "command": {
+ "$ref": "#/$defs/RosterCommand"
},
- "target": {
+ "title": {
"type": "string"
},
- "priority": {
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "parentSessionId": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
},
- "onError": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookErrorMode"
- },
- {
- "type": "null"
- }
+ "agentName": {
+ "type": [
+ "string",
+ "null"
]
},
- "agentFilter": {
+ "model": {
"type": [
- "array",
+ "string",
"null"
- ],
- "items": {
- "type": "string"
- }
+ ]
},
- "toolFilter": {
+ "taskId": {
"type": [
- "array",
+ "string",
"null"
- ],
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "command",
+ "title",
+ "updatedAt"
+ ]
+ },
+ "HarnessStoreSessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/HarnessStoreSession"
}
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "task.done": {
+ "type": "object",
+ "properties": {
+ "taskId": {
+ "type": "string"
},
- "description": {
+ "status": {
+ "$ref": "#/$defs/TaskStatus"
+ },
+ "parentSessionId": {
"type": [
"string",
"null"
]
},
- "enabled": {
+ "childSessionId": {
"type": [
- "boolean",
+ "string",
"null"
]
+ },
+ "ts": {
+ "type": "integer",
+ "format": "int64"
}
},
"required": [
- "id",
- "event",
- "type",
- "target"
+ "taskId",
+ "status",
+ "ts"
]
},
- "HookConfigKind": {
+ "TaskVerdict": {
"type": "string",
"enum": [
- "shell",
- "http",
- "internal"
+ "completed",
+ "failed",
+ "killed",
+ "timeout",
+ "budget-exceeded"
]
},
- "RosterCommand": {
+ "CriterionKind": {
"type": "string",
"enum": [
- "claude",
- "grok",
- "kimi",
- "opencode",
- "hermes",
- "codex",
- "pi",
- "qwen",
- "cursor",
- "cowork"
+ "manual",
+ "automated"
]
},
- "ApprovalDecision": {
- "type": "string",
- "enum": [
- "allow",
- "deny",
- "allowSession"
+ "AcceptanceCriterion": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/$defs/CriterionKind"
+ },
+ "check": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "description",
+ "kind"
]
},
- "ApprovalOutcome": {
- "type": "string",
- "enum": [
- "allow",
- "deny",
- "allowSession",
- "external"
+ "TaskBudget": {
+ "type": "object",
+ "properties": {
+ "maxTurns": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "maxWallClockMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ }
+ },
+ "TaskUsage": {
+ "type": "object",
+ "properties": {
+ "inputTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "outputTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "totalTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "turns": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "wallClockMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "turns",
+ "wallClockMs"
]
},
- "HarnessStatus": {
+ "Effort": {
"type": "string",
"enum": [
- "working",
- "blocked",
- "idle"
+ "low",
+ "medium",
+ "high"
]
},
- "StatusPhase": {
- "type": "string",
- "enum": [
- "thinking",
- "tool",
- "writing",
- "prompt"
+ "TaskResult": {
+ "type": "object",
+ "properties": {
+ "verdict": {
+ "$ref": "#/$defs/TaskVerdict"
+ },
+ "summary": {
+ "type": "string"
+ },
+ "usage": {
+ "$ref": "#/$defs/TaskUsage"
+ },
+ "error": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "verdict",
+ "summary",
+ "usage"
]
},
- "StatusSource": {
+ "LogLevel": {
"type": "string",
"enum": [
- "herdr",
- "transcript",
- "hooks",
- "protocol"
+ "debug",
+ "info",
+ "warn",
+ "error"
]
},
- "HarnessEvent": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "assistant-delta"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "text": {
- "type": "string"
- },
- "turnId": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "type",
- "sessionId",
- "text"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "reasoning-delta"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "text": {
- "type": "string"
- },
- "turnId": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "type",
- "sessionId",
- "text"
- ]
+ "TaskWire": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool-use"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "toolCallId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "input": {
- "type": "object",
- "additionalProperties": true
- },
- "turnId": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "type",
- "sessionId",
- "toolCallId",
- "name",
- "input"
- ]
+ "goal": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool-result"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "toolCallId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "output": {
- "type": "string"
- },
- "isError": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "turnId": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "type",
- "sessionId",
- "toolCallId",
- "name",
- "output"
- ]
+ "acceptanceCriteria": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/AcceptanceCriterion"
+ }
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "approval-request"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "requestId": {
- "type": "string"
- },
- "toolCallId": {
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": "string"
- },
- "input": {
- "type": "object",
- "additionalProperties": true
- },
- "reason": {
- "type": [
- "string",
- "null"
- ]
- },
- "options": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/ApprovalOption"
- }
- }
- },
- "required": [
- "type",
- "sessionId",
- "requestId",
- "name",
- "input"
- ]
+ "agentId": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "approval-resolved"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "requestId": {
- "type": "string"
+ "node": {
+ "type": "string"
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
},
- "decision": {
- "$ref": "#/$defs/ApprovalOutcome"
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "sessionId",
- "requestId",
- "decision"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "session-created"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "summary": {
- "$ref": "#/$defs/HarnessSessionSummary"
- },
- "supersedes": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "sessionId",
- "summary"
+ "model": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "turn-complete"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "turnId": {
- "type": [
- "string",
- "null"
- ]
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "requestedBy": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentTaskId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "depth": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ },
+ "childSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "budget": {
+ "$ref": "#/$defs/TaskBudget"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskUsage"
},
- "stopReason": {
- "type": [
- "string",
- "null"
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "sessionId"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "error"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "code": {
- "type": "string"
- },
- "deliveryId": {
- "type": [
- "string",
- "null"
- ]
- },
- "message": {
- "type": "string"
+ "status": {
+ "$ref": "#/$defs/TaskStatus"
+ },
+ "error": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "result": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskResult"
},
- "retryable": {
- "type": [
- "boolean",
- "null"
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "sessionId",
- "code",
- "message"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "session-updated"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "status": {
- "$ref": "#/$defs/HarnessSessionStatus"
- },
- "previousSessionId": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
- },
- "supersedes": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
+ "createdAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "startedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "completedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "durationMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "id",
+ "goal",
+ "acceptanceCriteria",
+ "agentId",
+ "node",
+ "depth",
+ "budget",
+ "status",
+ "createdAt"
+ ]
+ },
+ "TaskCreateRequest": {
+ "type": "object",
+ "properties": {
+ "goal": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "nodeAffinity": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "acceptanceCriteria": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/AcceptanceCriterion"
+ }
+ },
+ "budget": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskBudget"
},
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "sessionId",
- "status"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "transcript"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "rev": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "from": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "total": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "turns": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/HarnessTranscriptTurn"
- }
- },
- "command": {
- "$ref": "#/$defs/RosterCommand"
- },
- "truncatedBefore": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "contextWindow": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "compactAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
+ "parentSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ThinkingLevel"
},
- "contextSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/ContextSource"
- },
- {
- "type": "null"
- }
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "sessionId",
- "rev",
- "from",
- "total",
- "turns",
- "command"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "status"
- }
- },
- "$ref": "#/$defs/HarnessStatusFrame",
- "required": [
- "type"
+ "workingDir": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "prompt"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "promptId": {
- "type": "string"
- },
- "kind": {
- "$ref": "#/$defs/PromptKind"
- },
- "toolName": {
- "type": "string"
- },
- "questions": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/PromptQuestion"
- }
- },
- "resolved": {
- "anyOf": [
- {
- "$ref": "#/$defs/PromptResolution"
- },
- {
- "type": "null"
- }
- ]
+ "requestedBy": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": true
+ },
+ "TaskResponse": {
+ "type": "object",
+ "properties": {
+ "task": {
+ "$ref": "#/$defs/TaskWire"
+ }
+ },
+ "required": [
+ "task"
+ ]
+ },
+ "TasksListResponse": {
+ "type": "object",
+ "properties": {
+ "tasks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TaskWire"
+ }
+ }
+ },
+ "required": [
+ "tasks"
+ ]
+ },
+ "TaskKillResponse": {
+ "type": "object",
+ "properties": {
+ "ok": {
+ "type": "boolean"
+ },
+ "prior": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskStatus"
},
- "screen": {
- "anyOf": [
- {
- "$ref": "#/$defs/PromptScreen"
- },
- {
- "type": "null"
- }
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "sessionId",
- "promptId",
- "kind",
- "toolName",
- "questions"
]
}
+ },
+ "required": [
+ "ok"
]
},
- "ApprovalOption": {
+ "TaskWaitTimeoutResponse": {
"type": "object",
"properties": {
- "key": {
+ "error": {
"type": "string"
},
- "label": {
- "type": "string"
+ "task": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskWire"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
- "key",
- "label"
+ "error"
]
},
- "HarnessSessionSummary": {
+ "MemorySearchResult": {
"type": "object",
"properties": {
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "harnessId": {
- "$ref": "#/$defs/HarnessId"
- },
- "title": {
- "type": [
- "string",
- "null"
- ]
- },
- "cwd": {
- "type": [
- "string",
- "null"
+ "chunk": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MemoryChunkMatch"
+ },
+ {
+ "type": "null"
+ }
]
},
- "createdAt": {
- "$ref": "#/$defs/Millis"
- },
- "updatedAt": {
- "$ref": "#/$defs/Millis"
+ "id": {
+ "type": "string"
},
- "status": {
- "$ref": "#/$defs/HarnessSessionStatus"
+ "source": {
+ "$ref": "#/$defs/MemoryHitSource"
},
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
+ "content": {
+ "type": "string"
},
- "supersedes": {
+ "role": {
"anyOf": [
{
- "$ref": "#/$defs/SessionId"
+ "$ref": "#/$defs/Role"
},
{
"type": "null"
}
]
},
- "model": {
+ "agent": {
"type": [
"string",
"null"
]
},
- "parentSessionId": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
+ "relevanceScore": {
+ "type": "number",
+ "format": "double"
},
- "agentName": {
+ "createdAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "sessionId": {
"type": [
"string",
"null"
]
- },
- "taskId": {
+ }
+ },
+ "required": [
+ "id",
+ "source",
+ "content",
+ "relevanceScore",
+ "createdAt"
+ ]
+ },
+ "PluginId": {
+ "type": "string",
+ "pattern": "^[a-z](-?[a-z0-9])+$",
+ "maxLength": 24
+ },
+ "ToolName": {
+ "type": "string",
+ "pattern": "^[a-z](_?[a-z0-9])*$",
+ "maxLength": 24
+ },
+ "RouteName": {
+ "type": "string",
+ "pattern": "^[a-z0-9][a-z0-9_-]*$",
+ "maxLength": 64
+ },
+ "PluginManifest": {
+ "type": "object",
+ "properties": {
+ "$schema": {
"type": [
"string",
"null"
]
},
- "effort": {
+ "manifest": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "id": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "icon": {
"type": [
"string",
"null"
]
},
- "transport": {
- "anyOf": [
- {
- "$ref": "#/$defs/Transport"
- },
- {
- "type": "null"
- }
- ]
+ "run": {
+ "$ref": "#/$defs/PluginRun"
+ },
+ "permissions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Permission"
+ }
+ },
+ "settings": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewField"
+ }
+ },
+ "tools": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginTool"
+ }
+ },
+ "contributes": {
+ "$ref": "#/$defs/PluginContributions",
+ "default": {}
+ },
+ "jobs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginJob"
+ }
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginEventKind"
+ }
}
},
+ "additionalProperties": false,
"required": [
- "sessionId",
- "harnessId",
- "createdAt",
- "updatedAt",
- "status"
- ],
- "additionalProperties": true
+ "manifest",
+ "id",
+ "name",
+ "version",
+ "description",
+ "run"
+ ]
},
- "StatusTool": {
+ "PluginRun": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
+ "command": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "toolCallId": {
+ "env": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "readyTimeoutMs": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "uint64",
+ "minimum": 0
}
},
+ "additionalProperties": false,
"required": [
- "name"
+ "command"
]
},
- "HarnessStatusFrame": {
+ "Permission": {
+ "type": "string",
+ "enum": [
+ "memory.read",
+ "memory.write",
+ "sessions.read",
+ "sessions.control",
+ "topics.read",
+ "topics.write",
+ "tasks.read",
+ "tasks.delegate",
+ "agents.read",
+ "notifications.send",
+ "host.files.read",
+ "host.files.write",
+ "host.network",
+ "host.exec"
+ ]
+ },
+ "ViewField": {
"type": "object",
"properties": {
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "key": {
+ "type": "string"
},
- "status": {
- "$ref": "#/$defs/HarnessStatus"
+ "label": {
+ "type": "string"
},
- "since": {
- "type": "integer",
- "format": "int64"
+ "input": {
+ "$ref": "#/$defs/ViewInput"
},
- "source": {
+ "value": {
"anyOf": [
{
- "$ref": "#/$defs/StatusSource"
+ "$ref": "#/$defs/ViewValue"
},
{
"type": "null"
}
]
},
- "phase": {
- "anyOf": [
- {
- "$ref": "#/$defs/StatusPhase"
+ "required": {
+ "type": "boolean"
+ },
+ "help": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "placeholder": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "key",
+ "label",
+ "input"
+ ]
+ },
+ "ViewInput": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "multiline": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "secret"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "number"
+ },
+ "min": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "max": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "step": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "toggle"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "select"
},
- {
- "type": "null"
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewOption"
+ }
+ },
+ "multiple": {
+ "type": "boolean"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "options"
]
},
- "tool": {
- "anyOf": [
- {
- "$ref": "#/$defs/StatusTool"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "file"
},
- {
- "type": "null"
+ "multiple": {
+ "type": "boolean"
+ },
+ "accept": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
]
+ }
+ ]
+ },
+ "ViewOption": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
},
- "promptId": {
- "type": [
- "string",
- "null"
- ]
+ "label": {
+ "type": "string"
}
},
+ "additionalProperties": false,
"required": [
- "sessionId",
- "status",
- "since"
- ]
- },
- "PromptKind": {
- "type": "string",
- "enum": [
- "ask-user"
+ "value",
+ "label"
]
},
- "PromptQuestion": {
- "type": "object",
- "properties": {
- "question": {
- "type": [
- "string",
- "null"
- ]
+ "ViewValue": {
+ "anyOf": [
+ {
+ "type": "boolean"
},
- "header": {
- "type": [
- "string",
- "null"
- ]
+ {
+ "type": "number",
+ "format": "double"
},
- "multiSelect": {
- "type": "boolean"
+ {
+ "type": "string"
},
- "freeText": {
- "type": [
- "boolean",
- "null"
- ]
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "options": {
+ {
"type": "array",
"items": {
- "$ref": "#/$defs/PromptOption"
+ "$ref": "#/$defs/ViewFile"
}
}
- },
- "required": [
- "multiSelect",
- "options"
]
},
- "PromptOption": {
+ "ViewFile": {
"type": "object",
"properties": {
- "label": {
+ "name": {
"type": "string"
},
- "description": {
- "type": [
- "string",
- "null"
- ]
+ "mimeType": {
+ "type": "string"
+ },
+ "data": {
+ "type": "string"
}
},
+ "additionalProperties": false,
"required": [
- "label"
+ "name",
+ "mimeType",
+ "data"
]
},
- "PromptResolution": {
+ "PluginTool": {
"type": "object",
"properties": {
- "at": {
- "type": "integer",
- "format": "int64"
+ "name": {
+ "$ref": "#/$defs/ToolName"
},
- "answerText": {
+ "title": {
"type": [
"string",
"null"
]
+ },
+ "description": {
+ "type": "string"
+ },
+ "inputSchema": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "hints": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginToolHint"
+ }
}
},
+ "additionalProperties": false,
"required": [
- "at"
+ "name",
+ "description",
+ "inputSchema"
]
},
- "PromptScreen": {
- "type": "object",
- "properties": {
- "current": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "total": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- }
- },
- "required": [
- "current",
- "total"
+ "PluginToolHint": {
+ "type": "string",
+ "enum": [
+ "readOnly",
+ "destructive",
+ "idempotent",
+ "openWorld"
]
},
- "HarnessCapabilities": {
+ "PluginContributions": {
"type": "object",
"properties": {
- "interrupt": {
- "type": "boolean"
- },
- "resume": {
- "type": "boolean"
- },
- "approvals": {
- "type": "boolean"
- },
- "liveStream": {
- "type": "boolean"
- },
- "listSessions": {
- "type": "boolean"
- },
- "drive": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "turnOptions": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "launchModel": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "imageAttachments": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "models": {
- "type": [
- "array",
- "null"
- ],
+ "pages": {
+ "type": "array",
"items": {
- "$ref": "#/$defs/HarnessModelOption"
+ "$ref": "#/$defs/PluginPage"
}
},
- "modelsSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/HarnessModelsSource"
- },
- {
- "type": "null"
- }
- ]
+ "topicCards": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginTopicCard"
+ }
},
- "efforts": {
- "type": [
- "array",
- "null"
- ],
+ "sessionActions": {
+ "type": "array",
"items": {
- "$ref": "#/$defs/EffortOption"
+ "$ref": "#/$defs/PluginSessionAction"
}
+ }
+ },
+ "additionalProperties": false
+ },
+ "PluginPage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "title": {
+ "type": "string"
},
- "modelFlag": {
+ "icon": {
"type": [
"string",
"null"
]
},
- "effortFlag": {
- "type": [
- "string",
- "null"
- ]
+ "view": {
+ "$ref": "#/$defs/RouteName"
}
},
+ "additionalProperties": false,
"required": [
- "interrupt",
- "resume",
- "approvals",
- "liveStream",
- "listSessions"
+ "id",
+ "title",
+ "view"
]
},
- "HarnessModelOption": {
+ "PluginTopicCard": {
"type": "object",
"properties": {
- "inputModalities": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
- },
"id": {
- "type": "string"
+ "$ref": "#/$defs/RouteName"
},
- "label": {
+ "title": {
"type": "string"
},
- "isDefault": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "efforts": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/EffortOption"
- }
+ "view": {
+ "$ref": "#/$defs/RouteName"
}
},
+ "additionalProperties": false,
"required": [
"id",
- "label"
+ "title",
+ "view"
]
},
- "EffortOption": {
+ "PluginSessionAction": {
"type": "object",
"properties": {
"id": {
- "type": "string"
+ "$ref": "#/$defs/RouteName"
},
- "label": {
+ "title": {
"type": "string"
},
- "isDefault": {
+ "icon": {
"type": [
- "boolean",
+ "string",
"null"
]
+ },
+ "action": {
+ "$ref": "#/$defs/ViewAction"
}
},
+ "additionalProperties": false,
"required": [
"id",
- "label"
- ]
- },
- "HarnessModelsSource": {
- "type": "string",
- "enum": [
- "discovered",
- "config",
- "merged",
- "static"
+ "title",
+ "action"
]
},
- "HarnessControlCapabilities": {
- "type": "object",
- "properties": {
- "interrupt": {
- "type": "boolean"
+ "ViewAction": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "call"
+ },
+ "action": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "action"
+ ]
},
- "resume": {
- "type": "boolean"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "navigate"
+ },
+ "view": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ },
+ "replace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "view"
+ ]
},
- "approvals": {
- "type": "boolean"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "dialog"
+ },
+ "view": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "view"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "back"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "refresh"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "toast"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTone"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "copy"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "openSession"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "openTopic"
+ },
+ "topicId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "topicId"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "openUrl"
+ },
+ "url": {
+ "type": "string",
+ "format": "uri"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "url"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "download"
+ },
+ "path": {
+ "type": "string"
+ },
+ "filename": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "path"
+ ]
}
- },
- "required": [
- "interrupt",
- "resume",
- "approvals"
]
},
- "HarnessObservationCapabilities": {
+ "ViewTone": {
+ "type": "string",
+ "enum": [
+ "neutral",
+ "info",
+ "success",
+ "warning",
+ "danger"
+ ]
+ },
+ "PluginJob": {
"type": "object",
"properties": {
- "liveStream": {
- "type": "boolean"
+ "id": {
+ "$ref": "#/$defs/RouteName"
},
- "listSessions": {
- "type": "boolean"
+ "title": {
+ "type": "string"
},
- "drive": {
+ "schedule": {
"type": [
- "boolean",
+ "string",
"null"
]
+ },
+ "timeoutMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
}
},
+ "additionalProperties": false,
"required": [
- "liveStream",
- "listSessions"
+ "id",
+ "title"
]
},
- "HarnessSessionList": {
+ "PluginEventKind": {
+ "type": "string",
+ "enum": [
+ "session.started",
+ "session.idle",
+ "session.ended",
+ "session.placed",
+ "summary.written",
+ "task.done"
+ ]
+ },
+ "View": {
"type": "object",
"properties": {
- "sessions": {
+ "title": {
+ "type": "string"
+ },
+ "subtitle": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "toolbar": {
"type": "array",
"items": {
- "$ref": "#/$defs/HarnessSessionSummary"
+ "$ref": "#/$defs/ViewButton"
+ }
+ },
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
}
}
},
+ "additionalProperties": false,
"required": [
- "sessions"
+ "title",
+ "blocks"
]
},
- "HarnessOffering": {
+ "ViewButton": {
"type": "object",
"properties": {
- "harnessId": {
- "$ref": "#/$defs/HarnessId"
+ "label": {
+ "type": "string"
},
- "chat": {
- "type": "boolean"
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "capabilities": {
- "$ref": "#/$defs/HarnessCapabilities"
- }
- },
- "required": [
- "harnessId",
- "chat",
- "capabilities"
- ]
- },
- "HarnessOfferingList": {
- "type": "object",
- "properties": {
- "harnesses": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/HarnessOffering"
- }
+ "style": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewButtonStyle"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "action": {
+ "$ref": "#/$defs/ViewAction"
+ },
+ "confirm": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewConfirm"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "disabled": {
+ "type": "boolean"
}
},
+ "additionalProperties": false,
"required": [
- "harnesses"
+ "label",
+ "action"
]
},
- "HarnessCode": {
+ "ViewButtonStyle": {
"type": "string",
"enum": [
- "invalid_session_id",
- "bad_request",
- "session_id_collision",
- "turn_in_flight",
- "capability_unsupported",
- "unknown_approval",
- "unknown_prompt"
+ "primary",
+ "secondary",
+ "danger"
]
},
- "HarnessStoreSession": {
+ "ViewConfirm": {
"type": "object",
"properties": {
- "id": {
+ "title": {
"type": "string"
},
- "command": {
- "$ref": "#/$defs/RosterCommand"
+ "text": {
+ "type": "string"
+ },
+ "confirmLabel": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "title",
+ "text"
+ ]
+ },
+ "ViewBlock": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "section"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "subtitle": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ },
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
+ },
+ "collapsed": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "blocks"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "split"
+ },
+ "primary": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
+ },
+ "secondary": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
+ },
+ "ratio": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "primary",
+ "secondary"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tabs"
+ },
+ "tabs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewTab"
+ }
+ },
+ "selected": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/RouteName"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "tabs"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTone"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "monospace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "markdown"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "code"
+ },
+ "text": {
+ "type": "string"
+ },
+ "language": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "follow": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "image"
+ },
+ "path": {
+ "type": "string"
+ },
+ "alt": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "path",
+ "alt"
+ ]
},
- "title": {
- "type": "string"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "properties"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewProperty"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
+ ]
},
- "updatedAt": {
- "type": "integer",
- "format": "int64"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "progress"
+ },
+ "value": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "label": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
+ ]
},
- "parentSessionId": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "notice"
+ },
+ "tone": {
+ "$ref": "#/$defs/ViewTone"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "text": {
+ "type": "string"
+ },
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "tone",
+ "text"
]
},
- "agentName": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "list"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewListItem"
+ }
+ },
+ "empty": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewEmpty"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
]
},
- "model": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "table"
+ },
+ "columns": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewColumn"
+ }
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewRow"
+ }
+ },
+ "empty": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewEmpty"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "columns",
+ "rows"
]
},
- "taskId": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "breadcrumbs"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewCrumb"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "actions"
+ },
+ "buttons": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "buttons"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "form"
+ },
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewField"
+ }
+ },
+ "buttons": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "fields",
+ "buttons"
]
- }
- },
- "required": [
- "id",
- "command",
- "title",
- "updatedAt"
- ]
- },
- "HarnessStoreSessionList": {
- "type": "object",
- "properties": {
- "sessions": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/HarnessStoreSession"
- }
- }
- },
- "required": [
- "sessions"
- ]
- },
- "TaskExecutorKind": {
- "type": "string",
- "enum": [
- "chat-loop",
- "harness-session",
- "mesh"
- ]
- },
- "TaskVerdict": {
- "type": "string",
- "enum": [
- "completed",
- "failed",
- "killed",
- "timeout",
- "budget-exceeded"
- ]
- },
- "ContextRefKind": {
- "type": "string",
- "enum": [
- "conversation",
- "message",
- "task",
- "file",
- "url",
- "wiki"
- ]
- },
- "ContextRef": {
- "type": "object",
- "properties": {
- "kind": {
- "$ref": "#/$defs/ContextRefKind"
},
- "ref": {
- "type": "string"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "canvas"
+ },
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "scene": {
+ "$ref": "#/$defs/CanvasScene"
+ },
+ "height": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "readOnly": {
+ "type": "boolean"
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasMenuItem"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "scene"
+ ]
},
- "note": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "webPanel"
+ },
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "entry": {
+ "type": "string"
+ },
+ "height": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "entry"
]
}
- },
- "required": [
- "kind",
- "ref"
- ]
- },
- "CriterionKind": {
- "type": "string",
- "enum": [
- "manual",
- "automated"
]
},
- "AcceptanceCriterion": {
+ "ViewTab": {
"type": "object",
"properties": {
"id": {
- "type": "string"
+ "$ref": "#/$defs/RouteName"
},
- "description": {
+ "title": {
"type": "string"
},
- "kind": {
- "$ref": "#/$defs/CriterionKind"
- },
- "check": {
+ "badge": {
"type": [
"string",
"null"
]
+ },
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
}
},
+ "additionalProperties": false,
"required": [
"id",
- "description",
- "kind"
+ "title",
+ "blocks"
]
},
- "TaskBudget": {
+ "ViewProperty": {
"type": "object",
"properties": {
- "maxUsd": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "maxTokens": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "maxTurns": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint32",
- "minimum": 0
+ "label": {
+ "type": "string"
},
- "maxWallClockMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
+ "value": {
+ "$ref": "#/$defs/ViewInline"
}
- }
+ },
+ "additionalProperties": false,
+ "required": [
+ "label",
+ "value"
+ ]
},
- "TaskUsage": {
- "type": "object",
- "properties": {
- "inputTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "outputTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "ViewInline": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTone"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "monospace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
},
- "totalTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "badge"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "$ref": "#/$defs/ViewTone"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text",
+ "tone"
+ ]
},
- "costUsd": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "time"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTimeStyle"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "at"
+ ]
},
- "turns": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "duration"
+ },
+ "ms": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "ms"
+ ]
},
- "wallClockMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- }
- },
- "required": [
- "inputTokens",
- "outputTokens",
- "totalTokens",
- "turns",
- "wallClockMs"
- ]
- },
- "Effort": {
- "type": "string",
- "enum": [
- "low",
- "medium",
- "high"
- ]
- },
- "TaskIsolation": {
- "type": "string",
- "enum": [
- "inherit",
- "isolated"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "bytes"
+ },
+ "value": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "value"
+ ]
+ }
]
},
- "TaskPromptMode": {
+ "ViewTimeStyle": {
"type": "string",
"enum": [
- "task",
- "heartbeat"
+ "relative",
+ "absolute"
]
},
- "TaskSpec": {
+ "ViewListItem": {
"type": "object",
"properties": {
- "delegation": {
+ "id": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "subtitle": {
"type": [
- "boolean",
+ "string",
"null"
]
},
- "meshFrom": {
+ "icon": {
"type": [
"string",
"null"
]
},
- "taskId": {
+ "trailing": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewInline"
+ }
+ },
+ "action": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "title"
+ ]
+ },
+ "ViewEmpty": {
+ "type": "object",
+ "properties": {
+ "title": {
"type": "string"
},
- "agentId": {
+ "text": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "button": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewButton"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "title"
+ ]
+ },
+ "ViewColumn": {
+ "type": "object",
+ "properties": {
+ "title": {
"type": "string"
},
- "goal": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAlign"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "sortable": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "title"
+ ]
+ },
+ "ViewAlign": {
+ "type": "string",
+ "enum": [
+ "start",
+ "center",
+ "end"
+ ]
+ },
+ "ViewRow": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "resolvedContext": {
+ "cells": {
"type": "array",
"items": {
- "$ref": "#/$defs/ContextRef"
+ "$ref": "#/$defs/ViewInline"
}
},
- "acceptanceCriteria": {
+ "action": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "menu": {
"type": "array",
"items": {
- "$ref": "#/$defs/AcceptanceCriterion"
+ "$ref": "#/$defs/ViewButton"
}
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "cells"
+ ]
+ },
+ "ViewCrumb": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
},
- "budget": {
- "$ref": "#/$defs/TaskBudget",
- "default": {}
- },
- "tools": {
- "type": [
- "array",
- "null"
- ],
+ "action": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "label"
+ ]
+ },
+ "CanvasScene": {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/CanvasItem"
}
},
- "workingDir": {
- "type": [
- "string",
- "null"
- ]
- },
- "model": {
- "type": [
- "string",
- "null"
+ "grid": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CanvasGrid"
+ },
+ {
+ "type": "null"
+ }
]
},
- "effort": {
+ "viewport": {
"anyOf": [
{
- "$ref": "#/$defs/Effort"
+ "$ref": "#/$defs/CanvasViewport"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "items"
+ ]
+ },
+ "CanvasItem": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "node"
+ },
+ "id": {
+ "type": "string"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "width": {
+ "type": "number",
+ "format": "double"
+ },
+ "height": {
+ "type": "number",
+ "format": "double"
+ },
+ "shapes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasShape"
+ }
+ },
+ "anchors": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasAnchor"
+ }
+ },
+ "tooltip": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasMenuItem"
+ }
+ },
+ "locked": {
+ "type": "boolean"
+ },
+ "decorative": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "x",
+ "y",
+ "width",
+ "height",
+ "shapes"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "connector"
+ },
+ "id": {
+ "type": "string"
+ },
+ "from": {
+ "$ref": "#/$defs/CanvasEnd"
+ },
+ "to": {
+ "$ref": "#/$defs/CanvasEnd"
+ },
+ "route": {
+ "$ref": "#/$defs/CanvasRoute"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "dashed": {
+ "type": "boolean"
+ },
+ "arrow": {
+ "$ref": "#/$defs/CanvasArrow"
+ },
+ "label": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- {
- "type": "null"
+ "tooltip": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasMenuItem"
+ }
+ },
+ "decorative": {
+ "type": "boolean"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "from",
+ "to",
+ "route",
+ "arrow"
]
- },
- "systemPromptAppend": {
- "type": [
- "string",
- "null"
- ]
- },
- "isolation": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskIsolation"
+ }
+ ]
+ },
+ "CanvasShape": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "rect"
},
- {
- "type": "null"
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "width": {
+ "type": "number",
+ "format": "double"
+ },
+ "height": {
+ "type": "number",
+ "format": "double"
+ },
+ "radius": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "width",
+ "height"
]
},
- "promptMode": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskPromptMode"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ellipse"
},
- {
- "type": "null"
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "width": {
+ "type": "number",
+ "format": "double"
+ },
+ "height": {
+ "type": "number",
+ "format": "double"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "width",
+ "height"
]
},
- "excludeTools": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
- },
- "resumeMessage": {
- "type": [
- "string",
- "null"
- ]
- },
- "session": {
- "type": "string"
- },
- "permissionDecisions": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/TaskPermissionDecision"
- }
- },
- "presetId": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "text": {
+ "type": "string"
+ },
+ "size": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "weight": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CanvasWeight"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAlign"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "maxWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "monospace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "text"
]
},
- "presetName": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "path"
+ },
+ "d": {
+ "type": "string"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "dashed": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "d"
]
},
- "auditOnly": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "icon"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "name": {
+ "type": "string"
+ },
+ "size": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "name"
]
}
- },
- "required": [
- "taskId",
- "agentId",
- "goal",
- "resolvedContext",
- "acceptanceCriteria",
- "session"
- ],
- "additionalProperties": true
+ ]
+ },
+ "ColorRole": {
+ "type": "string",
+ "enum": [
+ "surface",
+ "surfaceContainer",
+ "surfaceContainerHigh",
+ "primary",
+ "primaryContainer",
+ "onPrimary",
+ "onPrimaryContainer",
+ "secondaryContainer",
+ "onSurface",
+ "onSurfaceVariant",
+ "outline",
+ "outlineVariant",
+ "info",
+ "success",
+ "warning",
+ "danger",
+ "category1",
+ "category2",
+ "category3",
+ "category4",
+ "category5",
+ "category6"
+ ]
+ },
+ "CanvasWeight": {
+ "type": "string",
+ "enum": [
+ "regular",
+ "medium",
+ "bold"
+ ]
},
- "TaskPermissionDecision": {
+ "CanvasAnchor": {
"type": "object",
"properties": {
- "requestId": {
+ "id": {
"type": "string"
},
- "tool": {
- "type": "string"
+ "x": {
+ "type": "number",
+ "format": "double"
},
- "decision": {
- "$ref": "#/$defs/TaskPermissionOutcome"
+ "y": {
+ "type": "number",
+ "format": "double"
},
- "at": {
- "type": "integer",
- "format": "int64"
+ "side": {
+ "$ref": "#/$defs/CanvasSide"
},
- "message": {
- "type": [
- "string",
- "null"
- ]
+ "direction": {
+ "$ref": "#/$defs/CanvasDirection"
}
},
+ "additionalProperties": false,
"required": [
- "requestId",
- "tool",
- "decision",
- "at"
+ "id",
+ "x",
+ "y",
+ "side",
+ "direction"
]
},
- "TaskPermissionOutcome": {
+ "CanvasSide": {
"type": "string",
"enum": [
- "allow",
- "deny",
- "timeout"
+ "top",
+ "right",
+ "bottom",
+ "left"
]
},
- "ArtifactKind": {
+ "CanvasDirection": {
"type": "string",
"enum": [
- "file",
- "url",
- "commit",
- "message"
+ "in",
+ "out",
+ "both"
]
},
- "TaskArtifact": {
+ "CanvasMenuItem": {
"type": "object",
"properties": {
- "kind": {
- "$ref": "#/$defs/ArtifactKind"
+ "id": {
+ "type": "string"
},
- "ref": {
+ "label": {
"type": "string"
},
- "note": {
+ "icon": {
"type": [
"string",
"null"
]
- }
- },
- "required": [
- "kind",
- "ref"
- ]
- },
- "CriterionReport": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
},
- "met": {
+ "danger": {
"type": "boolean"
- },
- "evidence": {
- "type": "string",
- "default": ""
}
},
+ "additionalProperties": false,
"required": [
"id",
- "met"
+ "label"
]
},
- "TaskResult": {
+ "CanvasEnd": {
"type": "object",
"properties": {
- "verdict": {
- "$ref": "#/$defs/TaskVerdict"
- },
- "summary": {
+ "node": {
"type": "string"
},
- "output": {
- "type": [
- "string",
- "null"
- ]
- },
- "artifacts": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/TaskArtifact"
- }
- },
- "criteriaSelfReport": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/CriterionReport"
- }
- },
- "usage": {
- "$ref": "#/$defs/TaskUsage"
- },
- "error": {
+ "anchor": {
"type": [
"string",
"null"
]
}
},
+ "additionalProperties": false,
"required": [
- "verdict",
- "summary",
- "artifacts",
- "usage"
+ "node"
+ ]
+ },
+ "CanvasRoute": {
+ "type": "string",
+ "enum": [
+ "straight",
+ "curved",
+ "orthogonal"
]
},
- "EvalVerdict": {
+ "CanvasArrow": {
"type": "string",
"enum": [
- "verified",
- "refuted",
- "escalated"
+ "none",
+ "end",
+ "start",
+ "both"
]
},
- "EvalOutcome": {
+ "CanvasGrid": {
"type": "object",
"properties": {
- "verdict": {
- "$ref": "#/$defs/EvalVerdict"
- },
- "attempts": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "verifierTaskIds": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "criteriaReport": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CriterionReport"
- }
+ "size": {
+ "type": "number",
+ "format": "double"
},
- "diverged": {
+ "snap": {
"type": "boolean"
- },
- "escalatedAt": {
- "type": [
- "string",
- "null"
- ],
- "format": "date-time"
}
},
+ "additionalProperties": false,
"required": [
- "verdict",
- "attempts",
- "verifierTaskIds",
- "criteriaReport",
- "diverged"
+ "size"
]
},
- "ExecutorTurnCapabilities": {
+ "CanvasViewport": {
"type": "object",
"properties": {
- "steerable": {
- "type": "boolean"
+ "x": {
+ "type": "number",
+ "format": "double"
},
- "multiTurn": {
- "type": "boolean"
+ "y": {
+ "type": "number",
+ "format": "double"
},
- "structuredStream": {
- "type": "boolean"
+ "zoom": {
+ "type": "number",
+ "format": "double"
}
},
+ "additionalProperties": false,
"required": [
- "steerable",
- "multiTurn",
- "structuredStream"
+ "x",
+ "y",
+ "zoom"
]
},
- "ExecutorResultCapabilities": {
+ "ViewRequest": {
"type": "object",
"properties": {
- "usageInResult": {
- "type": "boolean"
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
},
- "sessionIdCapture": {
- "type": "boolean"
+ "context": {
+ "$ref": "#/$defs/ViewContext",
+ "default": {}
}
},
- "required": [
- "usageInResult",
- "sessionIdCapture"
- ]
+ "additionalProperties": false
},
- "ExecutorInteractionCapabilities": {
+ "ViewContext": {
"type": "object",
"properties": {
- "slashCommands": {
- "type": "boolean"
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "effortSelection": {
- "type": "boolean"
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
- "required": [
- "slashCommands",
- "effortSelection"
- ]
+ "additionalProperties": false
},
- "TaskApprovalRequest": {
+ "ViewActionRequest": {
"type": "object",
"properties": {
- "taskId": {
- "type": "string"
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
},
- "requestId": {
- "type": "string"
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
},
- "name": {
+ "context": {
+ "$ref": "#/$defs/ViewContext",
+ "default": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ "ViewActionResult": {
+ "type": "object",
+ "properties": {
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewAction"
+ },
+ "default": []
+ }
+ },
+ "additionalProperties": false
+ },
+ "ViewActionRefusal": {
+ "type": "object",
+ "properties": {
+ "message": {
"type": "string"
},
- "input": {
+ "fields": {
"type": "object",
- "additionalProperties": true
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message"
+ ]
+ },
+ "CanvasEventRequest": {
+ "type": "object",
+ "properties": {
+ "event": {
+ "$ref": "#/$defs/CanvasEvent"
},
- "toolCallId": {
+ "params": {
"type": [
- "string",
+ "object",
"null"
- ]
+ ],
+ "additionalProperties": true
+ },
+ "context": {
+ "$ref": "#/$defs/ViewContext",
+ "default": {}
}
},
+ "additionalProperties": false,
"required": [
- "taskId",
- "requestId",
- "name",
- "input"
+ "event"
]
},
- "TaskEvent": {
+ "CanvasEvent": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "den"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
+ "const": "selected"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "moved"
},
- "event": {
- "$ref": "#/$defs/AgentEvent"
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasPosition"
+ }
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "event"
+ "items"
]
},
{
@@ -11290,22 +16117,20 @@
"properties": {
"type": {
"type": "string",
- "const": "turn.start"
+ "const": "connected"
},
- "ts": {
- "type": "integer",
- "format": "int64"
+ "from": {
+ "$ref": "#/$defs/CanvasEnd"
},
- "turn": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "to": {
+ "$ref": "#/$defs/CanvasEnd"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "turn"
+ "from",
+ "to"
]
},
{
@@ -11313,36 +16138,19 @@
"properties": {
"type": {
"type": "string",
- "const": "turn.end"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
- },
- "turn": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "usage": {
- "$ref": "#/$defs/TaskUsage"
+ "const": "deleted"
},
- "harnessSessionId": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "turn",
- "usage"
+ "items"
]
},
{
@@ -11350,26 +16158,16 @@
"properties": {
"type": {
"type": "string",
- "const": "session.spawned"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
+ "const": "activated"
},
- "nativeSessionId": {
+ "item": {
"type": "string"
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "nativeSessionId"
+ "item"
]
},
{
@@ -11377,51 +16175,95 @@
"properties": {
"type": {
"type": "string",
- "const": "cost"
+ "const": "menu"
},
- "ts": {
- "type": "integer",
- "format": "int64"
+ "item": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "choice": {
+ "type": "string"
},
- "deltaUsd": {
+ "x": {
"type": "number",
"format": "double"
},
- "totalUsd": {
+ "y": {
"type": "number",
"format": "double"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "deltaUsd",
- "totalUsd"
+ "choice",
+ "x",
+ "y"
]
+ }
+ ]
+ },
+ "CanvasPosition": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "x",
+ "y"
+ ]
+ },
+ "CanvasResponse": {
+ "type": "object",
+ "properties": {
+ "ops": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasOp"
+ },
+ "default": []
},
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewAction"
+ },
+ "default": []
+ }
+ },
+ "additionalProperties": false
+ },
+ "CanvasOp": {
+ "oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "log"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
- },
- "level": {
- "$ref": "#/$defs/LogLevel"
+ "const": "upsert"
},
- "message": {
- "type": "string"
+ "item": {
+ "$ref": "#/$defs/CanvasItem"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "level",
- "message"
+ "item"
]
},
{
@@ -11429,39 +16271,222 @@
"properties": {
"type": {
"type": "string",
- "const": "approval-request"
+ "const": "remove"
},
- "ts": {
- "type": "integer",
- "format": "int64"
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "ids"
+ ]
+ }
+ ]
+ },
+ "PanelTheme": {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "$ref": "#/$defs/PanelScheme"
+ },
+ "colors": {
+ "type": "object",
+ "properties": {
+ "category1": {
+ "type": "string"
},
- "taskId": {
+ "category2": {
"type": "string"
},
- "requestId": {
+ "category3": {
"type": "string"
},
- "name": {
+ "category4": {
"type": "string"
},
- "input": {
- "type": "object",
- "additionalProperties": true
+ "category5": {
+ "type": "string"
},
- "toolCallId": {
+ "category6": {
+ "type": "string"
+ },
+ "danger": {
+ "type": "string"
+ },
+ "info": {
+ "type": "string"
+ },
+ "onPrimary": {
+ "type": "string"
+ },
+ "onPrimaryContainer": {
+ "type": "string"
+ },
+ "onSurface": {
+ "type": "string"
+ },
+ "onSurfaceVariant": {
+ "type": "string"
+ },
+ "outline": {
+ "type": "string"
+ },
+ "outlineVariant": {
+ "type": "string"
+ },
+ "primary": {
+ "type": "string"
+ },
+ "primaryContainer": {
+ "type": "string"
+ },
+ "secondaryContainer": {
+ "type": "string"
+ },
+ "success": {
+ "type": "string"
+ },
+ "surface": {
+ "type": "string"
+ },
+ "surfaceContainer": {
+ "type": "string"
+ },
+ "surfaceContainerHigh": {
+ "type": "string"
+ },
+ "warning": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "fontFamily": {
+ "type": "string"
+ },
+ "fontMono": {
+ "type": "string"
+ },
+ "fontSize": {
+ "type": "number",
+ "format": "double"
+ },
+ "radius": {
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scheme",
+ "colors",
+ "fontFamily",
+ "fontMono",
+ "fontSize",
+ "radius"
+ ]
+ },
+ "PanelScheme": {
+ "type": "string",
+ "enum": [
+ "light",
+ "dark"
+ ]
+ },
+ "PanelHostMessage": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "init"
+ },
+ "theme": {
+ "$ref": "#/$defs/PanelTheme"
+ },
+ "params": {
"type": [
- "string",
+ "object",
"null"
- ]
+ ],
+ "additionalProperties": true
+ },
+ "context": {
+ "$ref": "#/$defs/ViewContext"
+ },
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "node": {
+ "type": "string"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "taskId",
- "requestId",
- "name",
- "input"
+ "theme",
+ "context",
+ "plugin",
+ "node"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "theme"
+ },
+ "theme": {
+ "$ref": "#/$defs/PanelTheme"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "theme"
+ ]
+ }
+ ]
+ },
+ "PanelMessage": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ready"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "resize"
+ },
+ "height": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "height"
]
},
{
@@ -11469,393 +16494,673 @@
"properties": {
"type": {
"type": "string",
- "const": "approval-resolved"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
- },
- "taskId": {
- "type": "string"
+ "const": "action"
},
- "requestId": {
- "type": "string"
- },
- "decision": {
- "$ref": "#/$defs/TaskPermissionOutcome"
+ "action": {
+ "$ref": "#/$defs/ViewAction"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "taskId",
- "requestId",
- "decision"
+ "action"
]
}
]
},
- "LogLevel": {
- "type": "string",
- "enum": [
- "debug",
- "info",
- "warn",
- "error"
+ "PluginList": {
+ "type": "object",
+ "properties": {
+ "node": {
+ "type": "string"
+ },
+ "plugins": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginRecord"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "node",
+ "plugins"
]
},
- "TaskWire": {
+ "PluginRecord": {
"type": "object",
"properties": {
"id": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "node": {
"type": "string"
},
- "goal": {
+ "path": {
"type": "string"
},
- "contextRefs": {
+ "manifest": {
+ "$ref": "#/$defs/PluginManifest"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "state": {
+ "$ref": "#/$defs/PluginState"
+ },
+ "granted": {
"type": "array",
"items": {
- "$ref": "#/$defs/ContextRef"
+ "$ref": "#/$defs/Permission"
}
},
- "acceptanceCriteria": {
+ "pending": {
"type": "array",
"items": {
- "$ref": "#/$defs/AcceptanceCriterion"
+ "$ref": "#/$defs/Permission"
}
},
- "spec": {
- "$ref": "#/$defs/TaskSpec"
- },
- "executor": {
- "$ref": "#/$defs/TaskExecutorKind"
- },
- "executorTarget": {
+ "error": {
"type": [
"string",
"null"
]
},
- "agentId": {
- "type": "string"
- },
- "requestedBy": {
- "type": [
- "string",
- "null"
+ "lastExit": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/PluginExit"
+ },
+ {
+ "type": "null"
+ }
]
},
- "origin": {
- "type": "string"
+ "restarts": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
},
- "parentTaskId": {
+ "startedAt": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
},
- "chainDepth": {
+ "installedAt": {
"type": "integer",
- "format": "uint32",
- "minimum": 0
+ "format": "int64"
},
- "nodeAffinity": {
+ "jobs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginJobStatus"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "node",
+ "path",
+ "manifest",
+ "enabled",
+ "state",
+ "granted",
+ "pending",
+ "restarts",
+ "installedAt",
+ "jobs"
+ ]
+ },
+ "PluginState": {
+ "type": "string",
+ "enum": [
+ "disabled",
+ "awaitingApproval",
+ "starting",
+ "running",
+ "backoff",
+ "invalid"
+ ]
+ },
+ "PluginExit": {
+ "type": "object",
+ "properties": {
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "code": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int32"
},
- "claimedBy": {
+ "signal": {
"type": [
"string",
"null"
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "at"
+ ]
+ },
+ "PluginJobStatus": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
},
- "budget": {
- "$ref": "#/$defs/TaskBudget"
- },
- "usage": {
+ "lastRun": {
"anyOf": [
{
- "$ref": "#/$defs/TaskUsage"
+ "$ref": "#/$defs/PluginJobRun"
},
{
"type": "null"
}
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ]
+ },
+ "PluginJobRun": {
+ "type": "object",
+ "properties": {
+ "runId": {
+ "type": "string"
},
- "status": {
- "$ref": "#/$defs/TaskStatus"
- },
- "attempt": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "trigger": {
+ "$ref": "#/$defs/PluginJobTrigger"
},
- "maxAttempts": {
+ "startedAt": {
"type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "pendingMessage": {
- "type": [
- "string",
- "null"
- ]
+ "format": "int64"
},
- "error": {
+ "finishedAt": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
},
- "result": {
+ "outcome": {
"anyOf": [
{
- "$ref": "#/$defs/TaskResult"
+ "$ref": "#/$defs/PluginJobOutcome"
},
{
"type": "null"
}
]
},
- "conversationId": {
- "type": [
- "string",
- "null"
- ]
+ "message": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "runId",
+ "trigger",
+ "startedAt"
+ ]
+ },
+ "PluginJobTrigger": {
+ "type": "string",
+ "enum": [
+ "schedule",
+ "manual"
+ ]
+ },
+ "PluginJobOutcome": {
+ "type": "string",
+ "enum": [
+ "succeeded",
+ "failed"
+ ]
+ },
+ "PluginInstallRequest": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "path"
+ ]
+ },
+ "PluginEnableRequest": {
+ "type": "object",
+ "properties": {
+ "approve": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Permission"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "PluginLogs": {
+ "type": "object",
+ "properties": {
+ "lines": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginLogLine"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "lines"
+ ]
+ },
+ "PluginLogLine": {
+ "type": "object",
+ "properties": {
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "stream": {
+ "$ref": "#/$defs/PluginLogStream"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "at",
+ "stream",
+ "text"
+ ]
+ },
+ "PluginLogStream": {
+ "type": "string",
+ "enum": [
+ "stdout",
+ "stderr",
+ "host"
+ ]
+ },
+ "PluginSettings": {
+ "type": "object",
+ "properties": {
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
+ },
+ "secretsSet": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "values"
+ ]
+ },
+ "PluginSettingsUpdate": {
+ "type": "object",
+ "properties": {
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewValue"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "values"
+ ]
+ },
+ "plugin.changed": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
+ }
+ },
+ "required": [
+ "v",
+ "plugin"
+ ]
+ },
+ "plugin.views": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
},
- "sessionKey": {
- "type": [
- "string",
- "null"
- ]
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
},
- "harnessSessionIds": {
+ "views": {
"type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/RouteName"
}
+ }
+ },
+ "required": [
+ "v",
+ "plugin",
+ "views"
+ ]
+ },
+ "PluginToolList": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
},
- "eval": {
- "anyOf": [
- {
- "$ref": "#/$defs/EvalOutcome"
- },
- {
- "type": "null"
- }
- ]
+ "tools": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginToolEntry"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "version",
+ "tools"
+ ]
+ },
+ "PluginToolEntry": {
+ "type": "object",
+ "properties": {
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
},
- "evalAttempt": {
+ "tool": {
+ "$ref": "#/$defs/PluginTool"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "plugin",
+ "tool"
+ ]
+ },
+ "PluginEventDelivery": {
+ "type": "object",
+ "properties": {
+ "seq": {
"type": "integer",
- "format": "uint32",
+ "format": "uint64",
"minimum": 0
},
- "createdAt": {
+ "at": {
"type": "integer",
"format": "int64"
},
- "startedAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "lastHeartbeatAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "completedAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "durationMs": {
- "type": [
- "integer",
- "null"
- ],
+ "missed": {
+ "type": "integer",
"format": "uint64",
"minimum": 0
},
- "pendingApprovals": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/TaskApprovalRequest"
- }
+ "event": {
+ "$ref": "#/$defs/PluginEvent"
}
},
+ "additionalProperties": false,
"required": [
- "id",
- "goal",
- "contextRefs",
- "acceptanceCriteria",
- "spec",
- "executor",
- "agentId",
- "origin",
- "chainDepth",
- "budget",
- "status",
- "attempt",
- "maxAttempts",
- "harnessSessionIds",
- "evalAttempt",
- "createdAt"
+ "seq",
+ "at",
+ "missed",
+ "event"
]
},
- "TaskCreateRequest": {
- "type": "object",
- "properties": {
- "goal": {
- "type": "string"
- },
- "agentId": {
- "type": "string"
- },
- "executor": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskExecutorKind"
+ "PluginEvent": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.started"
},
- {
- "type": "null"
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
]
},
- "executorTarget": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.idle"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
]
},
- "requestedBy": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.ended"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
]
},
- "parentTaskId": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.placed"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId",
+ "topicId",
+ "by"
]
},
- "chainDepth": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint32",
- "minimum": 0
- },
- "nodeAffinity": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "summary.written"
+ },
+ "summaryId": {
+ "type": "string"
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "kind": {
+ "$ref": "#/$defs/SummaryKind"
+ },
+ "level": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "summaryId",
+ "kind",
+ "level"
]
},
- "spec": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskSpec"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "task.done"
},
- {
- "type": "null"
+ "taskId": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/TaskStatus"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "taskId",
+ "status"
]
},
- "budget": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskBudget"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "settings.changed"
},
- {
- "type": "null"
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "values"
]
- },
- "contextRefs": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/ContextRef"
- }
- },
- "acceptanceCriteria": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/AcceptanceCriterion"
- }
- }
- },
- "required": [
- "goal",
- "agentId"
- ]
- },
- "TaskResponse": {
- "type": "object",
- "properties": {
- "task": {
- "$ref": "#/$defs/TaskWire"
}
- },
- "required": [
- "task"
]
},
- "TasksListResponse": {
+ "PluginJobRequest": {
"type": "object",
"properties": {
- "tasks": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/TaskWire"
- }
+ "runId": {
+ "type": "string"
+ },
+ "trigger": {
+ "$ref": "#/$defs/PluginJobTrigger"
+ },
+ "scheduledAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
+ "additionalProperties": false,
"required": [
- "tasks"
+ "runId",
+ "trigger"
]
},
- "TaskSteerAccepted": {
+ "PluginJobResult": {
"type": "object",
"properties": {
- "ok": {
- "type": "boolean"
+ "outcome": {
+ "$ref": "#/$defs/PluginJobOutcome"
+ },
+ "message": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
+ "additionalProperties": false,
"required": [
- "ok"
+ "outcome"
]
},
- "TaskKillResponse": {
+ "PluginToolCall": {
"type": "object",
"properties": {
- "ok": {
- "type": "boolean"
+ "arguments": {
+ "type": "object",
+ "additionalProperties": true
},
- "prior": {
+ "sessionId": {
"anyOf": [
{
- "$ref": "#/$defs/TaskStatus"
+ "$ref": "#/$defs/SessionId"
},
{
"type": "null"
@@ -11863,214 +17168,165 @@
]
}
},
+ "additionalProperties": false,
"required": [
- "ok"
+ "arguments"
]
},
- "TaskApprovalAccepted": {
+ "PluginToolResult": {
"type": "object",
"properties": {
- "ok": {
+ "text": {
+ "type": "string"
+ },
+ "isError": {
"type": "boolean"
}
},
+ "additionalProperties": false,
"required": [
- "ok"
+ "text"
]
},
- "TaskApprovalWaitResponse": {
+ "PluginSelf": {
"type": "object",
"properties": {
- "approval": {
- "$ref": "#/$defs/TaskApprovalRequest"
+ "id": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "node": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "permissions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Permission"
+ }
+ },
+ "settings": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
+ },
+ "dataDir": {
+ "type": "string"
}
},
+ "additionalProperties": false,
"required": [
- "approval"
+ "id",
+ "node",
+ "version",
+ "permissions",
+ "settings",
+ "dataDir"
]
},
- "TaskWaitTimeoutResponse": {
+ "PluginViewsChanged": {
"type": "object",
"properties": {
- "error": {
- "type": "string"
- },
- "task": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskWire"
- },
- {
- "type": "null"
- }
- ]
+ "views": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/RouteName"
+ }
}
},
+ "additionalProperties": false,
"required": [
- "error"
+ "views"
]
},
- "TaskOverrides": {
+ "PluginNotify": {
"type": "object",
"properties": {
- "delegation": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "meshFrom": {
- "type": [
- "string",
- "null"
- ]
- },
- "presetId": {
- "type": [
- "string",
- "null"
- ]
- },
- "presetName": {
- "type": [
- "string",
- "null"
- ]
- },
- "permissionDecisions": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/TaskPermissionDecision"
- }
- },
- "auditOnly": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "workingDir": {
- "type": [
- "string",
- "null"
- ]
+ "title": {
+ "type": "string"
},
- "model": {
+ "text": {
"type": [
"string",
"null"
]
},
- "effort": {
+ "tone": {
"anyOf": [
{
- "$ref": "#/$defs/Effort"
+ "$ref": "#/$defs/ViewTone"
},
{
"type": "null"
}
]
},
- "systemPromptAppend": {
- "type": [
- "string",
- "null"
- ]
- },
- "isolation": {
+ "action": {
"anyOf": [
{
- "$ref": "#/$defs/TaskIsolation"
+ "$ref": "#/$defs/ViewAction"
},
{
"type": "null"
}
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "title"
+ ]
+ },
+ "plugin.notification": {
+ "type": "object",
+ "properties": {
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
},
- "promptMode": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskPromptMode"
- },
- {
- "type": "null"
- }
- ]
+ "node": {
+ "type": "string"
},
- "excludeTools": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
+ "title": {
+ "type": "string"
},
- "resumeMessage": {
+ "text": {
"type": [
"string",
"null"
]
- }
- },
- "additionalProperties": true
- },
- "MemorySearchResult": {
- "type": "object",
- "properties": {
- "chunk": {
+ },
+ "tone": {
"anyOf": [
{
- "$ref": "#/$defs/MemoryChunkMatch"
+ "$ref": "#/$defs/ViewTone"
},
{
"type": "null"
}
]
},
- "id": {
- "type": "string"
- },
- "source": {
- "$ref": "#/$defs/MemoryHitSource"
- },
- "content": {
- "type": "string"
- },
- "role": {
+ "action": {
"anyOf": [
{
- "$ref": "#/$defs/Role"
+ "$ref": "#/$defs/ViewAction"
},
{
"type": "null"
}
]
},
- "agent": {
- "type": [
- "string",
- "null"
- ]
- },
- "relevanceScore": {
- "type": "number",
- "format": "double"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
+ "ts": {
+ "type": "integer",
+ "format": "int64"
}
},
"required": [
- "id",
- "source",
- "content",
- "relevanceScore",
- "createdAt"
+ "plugin",
+ "node",
+ "title",
+ "ts"
]
}
}
diff --git a/packages/contract/schema/sent.schema.json b/packages/contract/schema/sent.schema.json
index 2384aad..d063648 100644
--- a/packages/contract/schema/sent.schema.json
+++ b/packages/contract/schema/sent.schema.json
@@ -1,8 +1,8 @@
{
- "$id": "https://github.com/philbert440/rivethub-runtime/contract/0.1.0/sent.schema.json",
+ "$id": "https://github.com/philbert440/rivethub-runtime/contract/0.7.0/sent.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RivetHub contract (sent by the runtime)",
- "version": "0.1.0",
+ "version": "0.7.0",
"$defs": {
"AgentPreset": {
"type": "object",
@@ -97,8 +97,8 @@
"hermes",
"codex",
"opencode",
- "pi",
- "qwen-code",
+ "omp",
+ "dsh",
"cursor",
"cowork"
]
@@ -336,6 +336,261 @@
"agent"
]
},
+ "HubProjectDefaults": {
+ "type": "object",
+ "properties": {
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ThinkingLevel"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "harnessId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "node": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "directory": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ }
+ },
+ "ThinkingLevel": {
+ "type": "string",
+ "enum": [
+ "off",
+ "low",
+ "medium",
+ "high",
+ "xhigh"
+ ]
+ },
+ "HubProject": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "order": {
+ "type": "number",
+ "format": "double",
+ "default": 0.0
+ },
+ "createdAt": {
+ "type": "integer",
+ "format": "int64",
+ "default": 0
+ },
+ "defaults": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HubProjectDefaults"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "order",
+ "createdAt"
+ ]
+ },
+ "HubLastSession": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "key",
+ "at"
+ ]
+ },
+ "HubSessionMode": {
+ "type": "string",
+ "enum": [
+ "chat",
+ "terminal"
+ ]
+ },
+ "HubState": {
+ "type": "object",
+ "properties": {
+ "projects": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HubProject"
+ },
+ "default": []
+ },
+ "defaultProjectId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "membership": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "default": {}
+ },
+ "names": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "default": {}
+ },
+ "archived": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "pinned": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "hidden": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "modes": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/HubSessionMode"
+ },
+ "default": {}
+ },
+ "lastSession": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HubLastSession"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "projects",
+ "membership",
+ "names",
+ "archived",
+ "pinned",
+ "hidden",
+ "modes"
+ ]
+ },
+ "HubStateResponse": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "state": {
+ "$ref": "#/$defs/HubState"
+ }
+ },
+ "required": [
+ "version",
+ "state"
+ ]
+ },
+ "HubStatePutRequest": {
+ "type": "object",
+ "properties": {
+ "baseVersion": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "state": {
+ "$ref": "#/$defs/HubState"
+ }
+ },
+ "required": [
+ "baseVersion",
+ "state"
+ ]
+ },
+ "hub.state": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "version": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "v",
+ "version"
+ ]
+ },
+ "ProtocolVersion": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ },
"HarnessDescriptor": {
"type": "object",
"properties": {
@@ -516,6 +771,12 @@
"null"
]
},
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"directory": {
"type": [
"string",
@@ -583,332 +844,31 @@
}
]
},
- "CatalogCommand": {
+ "CatalogAgentsResponse": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "argHint": {
- "type": [
- "string",
- "null"
- ]
- },
- "source": {
- "type": "string"
+ "agents": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CatalogAgent"
+ }
}
},
"required": [
- "name",
- "description",
- "source"
+ "agents"
]
},
- "CatalogExecutorEntry": {
+ "MeshOverview": {
"type": "object",
"properties": {
- "key": {
- "type": "string"
- },
- "capabilities": {
- "$ref": "#/$defs/HarnessExecutorCapabilities"
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
},
- "commands": {
+ "nodes": {
"type": "array",
"items": {
- "$ref": "#/$defs/CatalogCommand"
- }
- },
- "harnessId": {
- "anyOf": [
- {
- "$ref": "#/$defs/HarnessId"
- },
- {
- "type": "null"
- }
- ]
- },
- "implemented": {
- "type": [
- "boolean",
- "null"
- ]
- }
- },
- "required": [
- "key",
- "capabilities",
- "commands"
- ]
- },
- "HarnessExecutorCapabilities": {
- "type": "object",
- "properties": {
- "steerable": {
- "type": "boolean"
- },
- "multiTurn": {
- "type": "boolean"
- },
- "structuredStream": {
- "type": "boolean"
- },
- "usageInResult": {
- "type": "boolean"
- },
- "sessionIdCapture": {
- "type": "boolean"
- },
- "slashCommands": {
- "type": "boolean"
- },
- "effortSelection": {
- "type": "boolean"
- },
- "mcpInjection": {
- "$ref": "#/$defs/McpInjection"
- }
- },
- "required": [
- "steerable",
- "multiTurn",
- "structuredStream",
- "usageInResult",
- "sessionIdCapture",
- "slashCommands",
- "effortSelection",
- "mcpInjection"
- ]
- },
- "McpInjection": {
- "type": "string",
- "enum": [
- "flag",
- "cwdFile",
- "persistentConfig",
- "none"
- ]
- },
- "CatalogSkillEntry": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "description"
- ]
- },
- "CatalogSheet": {
- "type": "object",
- "properties": {
- "node": {
- "type": "string"
- },
- "agents": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogAgent"
- }
- },
- "executors": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogExecutorEntry"
- }
- },
- "tools": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "skills": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogSkillEntry"
- }
- }
- },
- "required": [
- "node",
- "agents",
- "executors",
- "tools",
- "skills"
- ]
- },
- "CatalogAgentsResponse": {
- "type": "object",
- "properties": {
- "agents": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CatalogAgent"
- }
- }
- },
- "required": [
- "agents"
- ]
- },
- "OutcomeBucket": {
- "type": "object",
- "properties": {
- "tasks": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "completed": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "failed": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "verified": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "refuted": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "escalated": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "diverged": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "divergenceRate": {
- "type": "number",
- "format": "double"
- },
- "totalCostUsd": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "avgDurationMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- }
- },
- "required": [
- "tasks",
- "completed",
- "failed",
- "verified",
- "refuted",
- "escalated",
- "diverged",
- "divergenceRate"
- ]
- },
- "OutcomesFilter": {
- "type": "object",
- "properties": {
- "since": {
- "type": [
- "string",
- "null"
- ],
- "format": "date-time"
- },
- "until": {
- "type": [
- "string",
- "null"
- ],
- "format": "date-time"
- },
- "agentId": {
- "type": [
- "string",
- "null"
- ]
- },
- "origin": {
- "type": [
- "string",
- "null"
- ]
- }
- }
- },
- "OutcomesResponse": {
- "type": "object",
- "properties": {
- "filter": {
- "$ref": "#/$defs/OutcomesFilter"
- },
- "totals": {
- "$ref": "#/$defs/OutcomeBucket"
- },
- "byAgent": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/OutcomeBucket"
- }
- },
- "byExecutor": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/OutcomeBucket"
- }
- },
- "byDay": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/OutcomeBucket"
- }
- }
- },
- "required": [
- "filter",
- "totals",
- "byAgent",
- "byExecutor",
- "byDay"
- ]
- },
- "MeshOverview": {
- "type": "object",
- "properties": {
- "updatedAt": {
- "type": "integer",
- "format": "int64"
- },
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/MeshOverviewNode"
+ "$ref": "#/$defs/MeshOverviewNode"
}
}
},
@@ -949,6 +909,18 @@
"type": "null"
}
]
+ },
+ "version": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "revision": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -1834,12 +1806,6 @@
}
]
},
- "ProtocolVersion": {
- "type": "integer",
- "format": "uint8",
- "minimum": 0,
- "maximum": 255
- },
"AudioStatus": {
"type": "object",
"properties": {
@@ -2220,6 +2186,22 @@
"null"
]
},
+ "role": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Role"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "tool_name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"tag": {
"type": [
"string",
@@ -2251,6 +2233,15 @@
"both"
]
},
+ "Role": {
+ "type": "string",
+ "enum": [
+ "system",
+ "user",
+ "assistant",
+ "tool"
+ ]
+ },
"MemoryHitSource": {
"type": "string",
"enum": [
@@ -2395,16 +2386,7 @@
"content"
]
},
- "Role": {
- "type": "string",
- "enum": [
- "system",
- "user",
- "assistant",
- "tool"
- ]
- },
- "MemoryFallback": {
+ "MemoryFallback": {
"type": "string",
"enum": [
"trigram"
@@ -3223,6 +3205,165 @@
"messages"
]
},
+ "VectorState": {
+ "type": "string",
+ "enum": [
+ "embedded",
+ "pending",
+ "failed",
+ "skipped"
+ ]
+ },
+ "MemorySummaryNode": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "parentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "kind": {
+ "$ref": "#/$defs/SummaryKind"
+ },
+ "content": {
+ "type": "string"
+ },
+ "messageCount": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "earliestAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "latestAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "sourceMessageIds": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "vector": {
+ "$ref": "#/$defs/VectorState"
+ }
+ },
+ "required": [
+ "id",
+ "level",
+ "kind",
+ "content",
+ "messageCount",
+ "createdAt",
+ "sourceMessageIds",
+ "vector"
+ ]
+ },
+ "MemoryMessageTally": {
+ "type": "object",
+ "properties": {
+ "total": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "user": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "assistant": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "system": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "tool": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "embedded": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "pending": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "failed": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "skipped": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "total",
+ "user",
+ "assistant",
+ "system",
+ "tool",
+ "embedded",
+ "pending",
+ "failed",
+ "skipped"
+ ]
+ },
+ "MemorySummaryDagResponse": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "type": "string"
+ },
+ "summaries": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/MemorySummaryNode"
+ }
+ },
+ "messages": {
+ "$ref": "#/$defs/MemoryMessageTally"
+ }
+ },
+ "required": [
+ "sessionId",
+ "summaries",
+ "messages"
+ ]
+ },
"TopTool": {
"type": "object",
"properties": {
@@ -4222,6 +4363,18 @@
"items": {
"$ref": "#/$defs/DegradedProvider"
}
+ },
+ "version": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "revision": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -4437,113 +4590,46 @@
"env"
]
},
- "TranscriptTurn": {
- "type": "object",
- "properties": {
- "role": {
- "$ref": "#/$defs/Role"
- },
- "text": {
- "type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "role",
- "text"
- ]
- },
- "TranscriptResponse": {
+ "SessionDeleted": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
- "command": {
- "type": "string"
+ "ok": {
+ "type": "boolean"
},
- "turns": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/TranscriptTurn"
- }
+ "session": {
+ "$ref": "#/$defs/SessionId"
},
- "contextWindow": {
- "type": [
- "integer",
- "null"
- ],
+ "conversations": {
+ "type": "integer",
"format": "uint64",
"minimum": 0
},
- "compactAt": {
- "type": [
- "integer",
- "null"
- ],
+ "messages": {
+ "type": "integer",
"format": "uint64",
"minimum": 0
},
- "contextSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/ContextSource"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "id",
- "command",
- "turns"
- ]
- },
- "ContextSource": {
- "type": "string",
- "enum": [
- "spawn",
- "default",
- "observed"
- ]
- },
- "SessionSummary": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "lastActive": {
- "type": "integer",
- "format": "int64"
- },
- "messages": {
+ "summaries": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"required": [
- "id",
- "lastActive",
- "messages"
+ "ok",
+ "session",
+ "conversations",
+ "messages",
+ "summaries"
]
},
- "SessionList": {
+ "SessionDeleteRequest": {
"type": "object",
"properties": {
"sessions": {
"type": "array",
"items": {
- "$ref": "#/$defs/SessionSummary"
+ "$ref": "#/$defs/SessionId"
}
}
},
@@ -4551,10 +4637,240 @@
"sessions"
]
},
- "MessageList": {
+ "SessionDeleteError": {
+ "type": "string",
+ "enum": [
+ "session is live",
+ "not found",
+ "delete failed"
+ ]
+ },
+ "SessionDeleteRefused": {
"type": "object",
"properties": {
- "messages": {
+ "session": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "ok": {
+ "type": "boolean"
+ },
+ "error": {
+ "$ref": "#/$defs/SessionDeleteError"
+ }
+ },
+ "required": [
+ "session",
+ "ok",
+ "error"
+ ]
+ },
+ "SessionDeleteResult": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionDeleted"
+ },
+ {
+ "$ref": "#/$defs/SessionDeleteRefused"
+ }
+ ]
+ },
+ "SessionDeleteResults": {
+ "type": "object",
+ "properties": {
+ "results": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionDeleteResult"
+ }
+ }
+ },
+ "required": [
+ "results"
+ ]
+ },
+ "SessionTrashReason": {
+ "type": "string",
+ "enum": [
+ "empty",
+ "one-word-reply"
+ ]
+ },
+ "SessionTrashCandidate": {
+ "type": "object",
+ "properties": {
+ "session": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "harness": {
+ "$ref": "#/$defs/HarnessId"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "reason": {
+ "$ref": "#/$defs/SessionTrashReason"
+ },
+ "userTurns": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "reply": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "session",
+ "harness",
+ "title",
+ "updatedAt",
+ "reason",
+ "userTurns",
+ "reply"
+ ]
+ },
+ "SessionTrashList": {
+ "type": "object",
+ "properties": {
+ "candidates": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionTrashCandidate"
+ }
+ }
+ },
+ "required": [
+ "candidates"
+ ]
+ },
+ "TranscriptTurn": {
+ "type": "object",
+ "properties": {
+ "role": {
+ "$ref": "#/$defs/Role"
+ },
+ "text": {
+ "type": "string"
+ },
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "role",
+ "text"
+ ]
+ },
+ "TranscriptResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "command": {
+ "type": "string"
+ },
+ "turns": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TranscriptTurn"
+ }
+ },
+ "contextWindow": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "compactAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "contextSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ContextSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "command",
+ "turns"
+ ]
+ },
+ "ContextSource": {
+ "type": "string",
+ "enum": [
+ "spawn",
+ "default",
+ "observed"
+ ]
+ },
+ "SessionSummary": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "lastActive": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "messages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "id",
+ "lastActive",
+ "messages"
+ ]
+ },
+ "SessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionSummary"
+ }
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "MessageList": {
+ "type": "object",
+ "properties": {
+ "messages": {
"type": "array",
"items": {
"$ref": "#/$defs/SessionMessage"
@@ -4706,22 +5022,43 @@
"string",
"null"
]
+ },
+ "attachments": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/UserTurnAttachment"
+ }
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "workingDir": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
"text"
]
},
- "ThinkingLevel": {
- "type": "string",
- "enum": [
- "off",
- "low",
- "medium",
- "high",
- "xhigh"
- ]
- },
"SessionPostAccepted": {
"type": "object",
"properties": {
@@ -4748,20 +5085,59 @@
"message"
]
},
- "SessionWsClientMessage": {
+ "SessionSteerRequest": {
"type": "object",
"properties": {
- "type": {
- "$ref": "#/$defs/SessionClientKind"
- },
- "session": {
+ "text": {
"type": "string"
- }
- },
- "required": [
- "type",
- "session"
- ]
+ },
+ "attachments": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/UserTurnAttachment"
+ }
+ }
+ },
+ "required": [
+ "text"
+ ]
+ },
+ "SessionSteerResponse": {
+ "type": "object",
+ "properties": {
+ "outcome": {
+ "$ref": "#/$defs/SteerOutcome"
+ }
+ },
+ "required": [
+ "outcome"
+ ]
+ },
+ "SteerOutcome": {
+ "type": "string",
+ "enum": [
+ "steered",
+ "startedNewTurn",
+ "promptRequired"
+ ]
+ },
+ "SessionWsClientMessage": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/$defs/SessionClientKind"
+ },
+ "session": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "session"
+ ]
},
"SessionClientKind": {
"type": "string",
@@ -4983,11 +5359,34 @@
}
]
},
+ "attachments": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/TranscriptAttachment"
+ }
+ },
"complete": {
"type": "boolean"
},
"compact": {
"type": "boolean"
+ },
+ "startedAtMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "endedAtMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
@@ -5053,6 +5452,35 @@
"tool_result"
]
},
+ "TranscriptAttachment": {
+ "type": "object",
+ "properties": {
+ "mediaType": {
+ "type": "string"
+ },
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "uri": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "uploadId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "mediaType"
+ ]
+ },
"TranscriptWsFrame": {
"type": "object",
"properties": {
@@ -5147,6 +5575,53 @@
"contextSource"
]
},
+ "SessionPreviewKind": {
+ "type": "string",
+ "enum": [
+ "running",
+ "asking",
+ "approval",
+ "said"
+ ]
+ },
+ "SessionPreview": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "kind": {
+ "$ref": "#/$defs/SessionPreviewKind"
+ },
+ "text": {
+ "type": "string"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "sessionId",
+ "kind",
+ "text",
+ "at"
+ ]
+ },
+ "SessionPreviewList": {
+ "type": "object",
+ "properties": {
+ "previews": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionPreview"
+ }
+ }
+ },
+ "required": [
+ "previews"
+ ]
+ },
"HarnessTurnAccepted": {
"type": "object",
"properties": {
@@ -5265,6 +5740,16 @@
}
]
},
+ "startupContext": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StartupContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"redirectedTo": {
"anyOf": [
{
@@ -5274,6 +5759,16 @@
"type": "null"
}
]
+ },
+ "switches": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionSwitches"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
@@ -5304,96 +5799,255 @@
"protocol"
]
},
- "HarnessSocketRefusalCode": {
+ "StartupContext": {
+ "type": "object",
+ "properties": {
+ "topicId": {
+ "type": "string"
+ },
+ "sections": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/StartupSection"
+ }
+ },
+ "tokens": {
+ "type": "integer",
+ "format": "uint",
+ "minimum": 0
+ },
+ "deliveredVia": {
+ "$ref": "#/$defs/DeliveredVia"
+ }
+ },
+ "required": [
+ "topicId",
+ "sections",
+ "tokens",
+ "deliveredVia"
+ ]
+ },
+ "StartupSection": {
+ "type": "object",
+ "properties": {
+ "kind": {
+ "$ref": "#/$defs/StartupKind"
+ },
+ "title": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "sources": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/StartupSource"
+ }
+ }
+ },
+ "required": [
+ "kind",
+ "title",
+ "text",
+ "sources"
+ ]
+ },
+ "StartupKind": {
"type": "string",
"enum": [
- "invalid_session_id",
- "forbidden"
+ "topic",
+ "recent",
+ "relevant"
]
},
- "HarnessSocketRefusal": {
+ "StartupSource": {
"oneOf": [
{
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "error"
- },
- "code": {
- "$ref": "#/$defs/HarnessSocketRefusalCode"
- },
- "message": {
- "type": "string"
+ "session": {
+ "$ref": "#/$defs/SessionId"
}
},
"required": [
- "type",
- "code",
- "message"
- ]
- }
- ]
- },
- "HarnessSocketMessage": {
- "oneOf": [
+ "session"
+ ],
+ "additionalProperties": false
+ },
{
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "sync"
+ "wiki": {
+ "$ref": "#/$defs/WikiSlug"
}
},
"required": [
- "type"
- ]
+ "wiki"
+ ],
+ "additionalProperties": false
}
]
},
- "TermSpawnRequest": {
+ "WikiSlug": {
+ "type": "string"
+ },
+ "DeliveredVia": {
+ "type": "string",
+ "enum": [
+ "metaAppend",
+ "cliFlag",
+ "none"
+ ]
+ },
+ "SessionSwitches": {
"type": "object",
"properties": {
- "command": {
- "type": [
- "string",
- "null"
- ]
- },
"model": {
- "type": [
- "string",
- "null"
- ]
+ "type": "boolean"
},
"effort": {
- "type": [
- "string",
- "null"
- ]
- },
- "session": {
- "type": [
- "string",
- "null"
- ]
- },
- "resume": {
- "type": [
- "string",
- "null"
- ]
- },
- "agentId": {
- "type": [
- "string",
- "null"
- ]
- },
- "force": {
- "type": [
- "boolean",
- "null"
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "model",
+ "effort"
+ ]
+ },
+ "HarnessSessionTitleRequest": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "title"
+ ]
+ },
+ "HarnessSessionForkRequest": {
+ "type": "object",
+ "properties": {
+ "prompts": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "prompts"
+ ]
+ },
+ "HarnessToolOutput": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "isError": {
+ "type": "boolean"
+ },
+ "truncated": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "text",
+ "isError",
+ "truncated"
+ ]
+ },
+ "HarnessSocketRefusalCode": {
+ "type": "string",
+ "enum": [
+ "invalid_session_id",
+ "forbidden"
+ ]
+ },
+ "HarnessSocketRefusal": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "error"
+ },
+ "code": {
+ "$ref": "#/$defs/HarnessSocketRefusalCode"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "code",
+ "message"
+ ]
+ }
+ ]
+ },
+ "HarnessSocketMessage": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "sync"
+ }
+ },
+ "required": [
+ "type"
+ ]
+ }
+ ]
+ },
+ "TermSpawnRequest": {
+ "type": "object",
+ "properties": {
+ "command": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "session": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "resume": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "force": {
+ "type": [
+ "boolean",
+ "null"
]
},
"cols": {
@@ -5413,6 +6067,12 @@
"format": "uint16",
"minimum": 0,
"maximum": 65535
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
}
},
@@ -5990,6 +6650,9 @@
"id": {
"type": "string"
},
+ "uri": {
+ "type": "string"
+ },
"name": {
"type": "string"
},
@@ -6014,6 +6677,7 @@
},
"required": [
"id",
+ "uri",
"name",
"bytes",
"mediaType",
@@ -6660,9 +7324,6 @@
"slug"
]
},
- "WikiSlug": {
- "type": "string"
- },
"WikiHistoryEntry": {
"type": "object",
"properties": {
@@ -6709,6 +7370,40 @@
"string",
"null"
]
+ },
+ "conversationId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "channel": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -6757,7 +7452,8 @@
"conversation",
"task",
"leaf",
- "extract-wiki"
+ "extract-wiki",
+ "user"
]
},
"WikiSourceSpan": {
@@ -6868,6 +7564,12 @@
"items": {
"type": "string"
}
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -6947,7 +7649,7 @@
"stalest": {
"type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/WikiTopic"
}
}
},
@@ -6982,6 +7684,12 @@
},
"excerpt": {
"type": "string"
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -7013,2697 +7721,2769 @@
"total"
]
},
- "AgentEvent": {
- "type": "object",
- "properties": {
- "v": {
- "$ref": "#/$defs/ProtocolVersion"
- },
- "session": {
- "type": "string"
- }
- },
- "required": [
- "v",
- "session"
- ],
+ "ProposalState": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "approved",
+ "rejected"
+ ]
+ },
+ "Proposer": {
+ "type": "string",
+ "enum": [
+ "categorizer",
+ "backfill"
+ ]
+ },
+ "TidyChange": {
"oneOf": [
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.start"
- },
- "title": {
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": [
- "string",
- "null"
- ]
+ "const": "merge"
},
- "harness": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionHarness"
- },
- {
- "type": "null"
- }
- ]
+ "source": {
+ "type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "into": {
+ "type": "string"
}
},
"required": [
- "type"
+ "kind",
+ "source",
+ "into"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.end"
+ "const": "move"
},
- "ts": {
+ "topic": {
+ "type": "string"
+ },
+ "parent": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
}
},
"required": [
- "type"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "message.user"
+ "const": "rename"
},
- "text": {
+ "topic": {
"type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "name": {
+ "type": "string"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "topic",
+ "name"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "message.agent"
+ "const": "close"
},
- "text": {
+ "topic": {
"type": "string"
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
- },
- "durationMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/AgentUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "thinking.delta"
+ "const": "delete"
},
- "text": {
+ "topic": {
"type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "topic"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "tool.start"
+ "const": "createTopic"
},
- "tool": {
+ "topic": {
"type": "string"
},
- "args": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
+ "name": {
+ "type": "string"
},
- "ts": {
+ "parent": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
+ },
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "default": []
+ },
+ "conversations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
}
},
"required": [
- "type",
- "tool"
+ "kind",
+ "topic",
+ "name",
+ "sessions",
+ "conversations"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "task.plan"
+ "const": "fileInto"
},
- "tasks": {
+ "topic": {
+ "type": "string"
+ },
+ "sessions": {
"type": "array",
"items": {
- "type": "string"
- }
+ "$ref": "#/$defs/SessionId"
+ },
+ "default": []
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "conversations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
}
},
"required": [
- "type",
- "tasks"
+ "kind",
+ "topic",
+ "sessions",
+ "conversations"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "task.check"
+ "const": "mergePage"
},
- "index": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "page": {
+ "type": "string"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "into": {
+ "type": "string"
}
},
"required": [
- "type",
- "index"
+ "kind",
+ "page",
+ "into"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "activity"
- },
- "activity": {
- "$ref": "#/$defs/Activity"
+ "const": "removePage"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "page": {
+ "type": "string"
}
},
"required": [
- "type",
- "activity"
+ "kind",
+ "page"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "turn.end"
+ "const": "addType"
},
- "ts": {
+ "topic": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "parent": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "int64"
+ ]
}
},
"required": [
- "type"
+ "kind",
+ "topic",
+ "name"
]
}
- ],
- "unevaluatedProperties": true
+ ]
},
- "SessionHarness": {
- "type": "string"
+ "TidySample": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "lastActive": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "id"
+ ]
},
- "AgentUsage": {
+ "TidyEvidence": {
"type": "object",
"properties": {
- "promptTokens": {
+ "sessions": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
- "completionTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "samples": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidySample"
+ },
+ "default": []
+ }
+ },
+ "required": [
+ "sessions",
+ "samples"
+ ]
+ },
+ "TidyProposal": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "cachedTokens": {
+ "batchId": {
+ "type": "string"
+ },
+ "change": {
+ "$ref": "#/$defs/TidyChange"
+ },
+ "reason": {
+ "type": "string"
+ },
+ "evidence": {
+ "$ref": "#/$defs/TidyEvidence"
+ },
+ "proposedBy": {
+ "$ref": "#/$defs/Proposer"
+ },
+ "proposedAt": {
"type": "integer",
- "format": "uint64",
- "minimum": 0
+ "format": "int64"
+ },
+ "state": {
+ "$ref": "#/$defs/ProposalState"
+ },
+ "decidedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "promptTokens",
- "completionTokens",
- "cachedTokens"
+ "id",
+ "batchId",
+ "change",
+ "reason",
+ "evidence",
+ "proposedBy",
+ "proposedAt",
+ "state"
]
},
- "AgentEventKind": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "session.start"
- },
- "title": {
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": [
- "string",
- "null"
- ]
- },
- "harness": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionHarness"
- },
- {
- "type": "null"
- }
- ]
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
+ "TidyBatch": {
+ "type": "object",
+ "properties": {
+ "batchId": {
+ "type": "string"
+ },
+ "proposedBy": {
+ "$ref": "#/$defs/Proposer"
+ },
+ "proposedAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "proposals": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyProposal"
+ }
+ }
+ },
+ "required": [
+ "batchId",
+ "proposedBy",
+ "proposedAt",
+ "proposals"
+ ]
+ },
+ "TidyPending": {
+ "type": "object",
+ "properties": {
+ "batches": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyBatch"
+ }
+ }
+ },
+ "required": [
+ "batches"
+ ]
+ },
+ "TidyFailure": {
+ "type": "object",
+ "properties": {
+ "proposalId": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "proposalId",
+ "error"
+ ]
+ },
+ "TidyBatchDecision": {
+ "type": "object",
+ "properties": {
+ "decided": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyProposal"
+ }
+ },
+ "failed": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TidyFailure"
},
- "required": [
- "type"
- ]
+ "default": []
+ }
+ },
+ "required": [
+ "decided",
+ "failed"
+ ]
+ },
+ "FilingUpkeep": {
+ "type": "object",
+ "properties": {
+ "categorizer": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "you": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "uncategorized": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "leftOut": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "correctionsLastWeek": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "categorizer",
+ "you",
+ "uncategorized",
+ "leftOut",
+ "correctionsLastWeek"
+ ]
+ },
+ "EntityTypeCount": {
+ "type": "object",
+ "properties": {
+ "typeId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "entities": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "typeId",
+ "name",
+ "entities"
+ ]
+ },
+ "WikiUpkeep": {
+ "type": "object",
+ "properties": {
+ "topicPages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "entityTypes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/EntityTypeCount"
+ }
+ },
+ "loosePages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "topicPages",
+ "entityTypes",
+ "loosePages"
+ ]
+ },
+ "WorkerActivity": {
+ "type": "object",
+ "properties": {
+ "lastFinishedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "failing": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "failing"
+ ]
+ },
+ "WorkerUpkeep": {
+ "type": "object",
+ "properties": {
+ "embedder": {
+ "$ref": "#/$defs/WorkerActivity"
+ },
+ "summarizer": {
+ "$ref": "#/$defs/WorkerActivity"
+ },
+ "categorizer": {
+ "$ref": "#/$defs/WorkerActivity"
+ },
+ "wikiBuilder": {
+ "$ref": "#/$defs/WorkerActivity"
+ }
+ },
+ "required": [
+ "embedder",
+ "summarizer",
+ "categorizer",
+ "wikiBuilder"
+ ]
+ },
+ "MemoryUpkeep": {
+ "type": "object",
+ "properties": {
+ "filing": {
+ "$ref": "#/$defs/FilingUpkeep"
},
+ "wiki": {
+ "$ref": "#/$defs/WikiUpkeep"
+ },
+ "workers": {
+ "$ref": "#/$defs/WorkerUpkeep"
+ },
+ "pendingProposals": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "filing",
+ "wiki",
+ "workers",
+ "pendingProposals"
+ ]
+ },
+ "TopicDirectory": {
+ "oneOf": [
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "session.end"
+ "const": "local"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ "node": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
}
},
"required": [
- "type"
+ "kind",
+ "node",
+ "path"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "kind": {
"type": "string",
- "const": "message.user"
+ "const": "shared"
},
- "text": {
+ "path": {
"type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
}
},
"required": [
- "type",
- "text"
+ "kind",
+ "path"
]
+ }
+ ]
+ },
+ "TopicKind": {
+ "type": "string",
+ "enum": [
+ "work",
+ "type",
+ "entity"
+ ]
+ },
+ "PlacedBy": {
+ "type": "string",
+ "enum": [
+ "you",
+ "categorizer"
+ ]
+ },
+ "TopicRecord": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message.agent"
- },
- "text": {
- "type": "string"
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
- },
- "durationMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/AgentUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "text"
- ]
+ "kind": {
+ "$ref": "#/$defs/TopicKind",
+ "default": "work"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "thinking.delta"
- },
- "text": {
- "type": "string"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "text"
- ]
+ "slug": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool.start"
- },
- "tool": {
- "type": "string"
- },
- "args": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "tool"
- ]
+ "name": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "task.plan"
- },
- "tasks": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "tasks"
- ]
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "task.check"
- },
- "index": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type",
- "index"
+ "parent": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "activity"
- },
- "activity": {
- "$ref": "#/$defs/Activity"
+ "directory": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDirectory"
},
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
+ {
+ "type": "null"
}
- },
- "required": [
- "type",
- "activity"
]
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "turn.end"
- },
- "ts": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- }
- },
- "required": [
- "type"
- ]
+ "createdAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "closedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
+ },
+ "required": [
+ "id",
+ "kind",
+ "slug",
+ "name",
+ "aliases",
+ "createdAt",
+ "updatedAt"
]
},
- "LiveSessionSummary": {
+ "TopicSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
+ "kind": {
+ "$ref": "#/$defs/TopicKind",
+ "default": "work"
+ },
+ "slug": {
+ "type": "string"
+ },
"name": {
"type": "string"
},
- "harness": {
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "directory": {
"anyOf": [
{
- "$ref": "#/$defs/SessionHarness"
+ "$ref": "#/$defs/TopicDirectory"
},
{
"type": "null"
}
]
},
- "lastEventTs": {
- "type": [
- "integer",
- "null"
- ],
+ "createdAt": {
+ "type": "integer",
"format": "int64"
},
- "pty": {
- "type": [
- "string",
- "null"
- ]
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
},
- "contextWindow": {
+ "closedAt": {
"type": [
"integer",
"null"
],
+ "format": "int64"
+ },
+ "sessionCount": {
+ "type": "integer",
"format": "uint64",
"minimum": 0
},
- "compactAt": {
+ "lastActive": {
"type": [
"integer",
"null"
],
- "format": "uint64",
- "minimum": 0
- },
- "contextSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/ContextSource"
- },
- {
- "type": "null"
- }
- ]
+ "format": "int64"
}
},
"required": [
"id",
- "name"
+ "kind",
+ "slug",
+ "name",
+ "aliases",
+ "createdAt",
+ "updatedAt",
+ "sessionCount"
]
},
- "SessionLogLine": {
+ "TopicList": {
"type": "object",
"properties": {
- "who": {
- "type": "string"
- },
- "text": {
- "type": "string"
+ "topics": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicSummary"
+ }
}
},
"required": [
- "who",
- "text"
+ "topics"
]
},
- "SessionView": {
+ "TopicCreateRequest": {
"type": "object",
"properties": {
- "title": {
+ "kind": {
+ "$ref": "#/$defs/TopicKind",
+ "default": "work"
+ },
+ "name": {
"type": "string"
},
- "activity": {
- "$ref": "#/$defs/Activity"
+ "aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
},
- "tool": {
+ "parent": {
"type": [
"string",
"null"
]
},
- "tasks": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "thought": {
- "type": "string"
- },
- "lastMessage": {
- "type": "string"
- },
- "log": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/SessionLogLine"
- }
- },
- "term": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "ended": {
- "type": "boolean"
- }
- },
- "required": [
- "title",
- "activity",
- "tasks",
- "thought",
- "lastMessage",
- "log",
- "term",
- "ended"
- ]
- },
- "LiveSessionList": {
- "type": "object",
- "properties": {
- "sessions": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/LiveSessionSummary"
- }
+ "directory": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDirectory"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
+ "additionalProperties": false,
"required": [
- "sessions"
+ "kind",
+ "name",
+ "aliases"
]
},
- "StateResponse": {
+ "WikiPageEdit": {
"type": "object",
"properties": {
- "session": {
- "type": "string"
+ "currentState": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "state": {
- "$ref": "#/$defs/SessionView"
+ "article": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
- "required": [
- "session",
- "state"
- ]
+ "additionalProperties": false
},
- "snapshot": {
+ "TopicUpdate": {
"type": "object",
"properties": {
- "v": {
- "$ref": "#/$defs/ProtocolVersion"
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "sessions": {
- "type": "array",
+ "aliases": {
+ "type": [
+ "array",
+ "null"
+ ],
"items": {
- "$ref": "#/$defs/LiveSessionSummary"
+ "type": "string"
}
},
- "rooms": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/SessionView"
- }
+ "parent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "directory": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDirectory"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
- "required": [
- "v",
- "sessions",
- "rooms"
- ]
+ "additionalProperties": false
},
- "session.removed": {
+ "TopicMergeRequest": {
"type": "object",
"properties": {
- "v": {
- "$ref": "#/$defs/ProtocolVersion"
- },
- "session": {
+ "into": {
"type": "string"
}
},
+ "additionalProperties": false,
"required": [
- "v",
- "session"
+ "into"
]
},
- "SessionBroadcast": {
- "anyOf": [
- {
- "$ref": "#/$defs/snapshot"
+ "TopicPlacement": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
},
- {
- "$ref": "#/$defs/session.removed"
+ "topicId": {
+ "type": "string"
},
- {
- "$ref": "#/$defs/AgentEvent"
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
}
+ },
+ "required": [
+ "sessionId",
+ "topicId",
+ "by",
+ "at"
]
},
- "CaptureBatchRequest": {
+ "TopicSuggestion": {
"type": "object",
"properties": {
- "session_key": {
- "type": "string"
- },
- "agent": {
+ "name": {
"type": "string"
},
- "channel": {
- "type": [
- "string",
- "null"
- ]
- },
- "title": {
+ "topicId": {
"type": [
"string",
"null"
]
},
- "settings": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
- },
- "task_id": {
+ "parentId": {
"type": [
"string",
"null"
]
- },
- "finalize": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "created_at": {
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "PlacementReply": {
+ "type": "object",
+ "properties": {
+ "placement": {
"anyOf": [
{
- "$ref": "#/$defs/Millis"
+ "$ref": "#/$defs/TopicPlacement"
},
{
"type": "null"
}
]
},
- "updated_at": {
+ "suggestion": {
"anyOf": [
{
- "$ref": "#/$defs/Millis"
+ "$ref": "#/$defs/TopicSuggestion"
},
{
"type": "null"
}
]
+ }
+ }
+ },
+ "PlacementRequest": {
+ "type": "object",
+ "properties": {
+ "topicId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "topicId"
+ ]
+ },
+ "SessionHistoryMark": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
},
- "messages": {
+ "markedAt": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "sessionId",
+ "markedAt"
+ ]
+ },
+ "SessionHistoryList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
"type": "array",
"items": {
- "$ref": "#/$defs/CaptureMessage"
+ "$ref": "#/$defs/SessionHistoryMark"
}
}
},
"required": [
- "session_key",
- "agent",
- "messages"
+ "sessions"
]
},
- "CaptureMessage": {
+ "TopicSession": {
"type": "object",
"properties": {
- "event_id": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "topicId": {
"type": "string"
},
- "role": {
- "$ref": "#/$defs/Role"
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
},
- "content": {
- "type": "string"
+ "at": {
+ "type": "integer",
+ "format": "int64"
},
- "tool_name": {
+ "title": {
"type": [
"string",
"null"
]
},
- "tool_args": {
+ "lastActive": {
"type": [
- "object",
+ "integer",
"null"
],
- "additionalProperties": true
+ "format": "int64"
},
- "tool_result": {
+ "node": {
"type": [
"string",
"null"
]
},
- "metadata": {
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": true
- },
- "created_at": {
+ "parentSessionId": {
"anyOf": [
{
- "$ref": "#/$defs/Millis"
+ "$ref": "#/$defs/SessionId"
},
{
"type": "null"
}
]
+ },
+ "taskId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
- "event_id",
- "role",
- "content"
+ "sessionId",
+ "topicId",
+ "by",
+ "at"
]
},
- "CaptureResult": {
+ "TopicSessionList": {
"type": "object",
"properties": {
- "ok": {
- "type": "boolean"
- },
- "conversation_id": {
- "type": "string"
- },
- "inserted": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicSession"
+ }
},
- "skipped": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "conversations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicConversation"
+ },
+ "default": []
}
},
"required": [
- "ok",
- "conversation_id",
- "inserted",
- "skipped"
- ]
- },
- "HookEventName": {
- "type": "string",
- "enum": [
- "provider:before",
- "provider:after",
- "provider:error",
- "tool:before",
- "tool:after",
- "session:start",
- "session:end",
- "turn:before",
- "turn:after",
- "turn:reflect",
- "skill:before",
- "skill:after",
- "compact:before",
- "compact:after",
- "delegation:before",
- "delegation:after"
+ "sessions",
+ "conversations"
]
},
- "HookContextBase": {
+ "TopicConversation": {
"type": "object",
"properties": {
- "agentId": {
+ "conversationId": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "channel": {
+ "type": "string"
+ },
+ "title": {
"type": [
"string",
"null"
]
},
- "sessionId": {
+ "lastActive": {
"type": [
- "string",
+ "integer",
"null"
- ]
- },
- "timestamp": {
- "type": "integer",
+ ],
"format": "int64"
},
- "metadata": {
- "type": "object",
- "additionalProperties": true
+ "node": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
- "timestamp",
- "metadata"
+ "conversationId",
+ "topicId",
+ "by",
+ "at",
+ "channel"
]
},
- "ReflectionSource": {
- "type": "string",
- "enum": [
- "complexity",
- "periodic",
- "manual"
- ]
- },
- "DelegationHookStatus": {
- "type": "string",
- "enum": [
- "completed",
- "failed",
- "timeout",
- "cached"
+ "TopicFiling": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicSession"
+ }
+ },
+ "conversations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicConversation"
+ }
+ },
+ "history": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionHistoryMark"
+ }
+ }
+ },
+ "required": [
+ "sessions",
+ "conversations",
+ "history"
]
},
- "HookUsage": {
+ "SessionSuggestion": {
"type": "object",
"properties": {
- "promptTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
},
- "completionTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "name": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
- "promptTokens",
- "completionTokens"
+ "sessionId",
+ "name"
]
},
- "SessionTokens": {
+ "SessionSuggestionList": {
"type": "object",
"properties": {
- "prompt": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "completion": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionSuggestion"
+ }
}
},
"required": [
- "prompt",
- "completion"
+ "sessions"
]
},
- "TurnComplexity": {
+ "ConversationPlacement": {
"type": "object",
"properties": {
- "toolCallCount": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "conversationId": {
+ "type": "string"
},
- "hadErrorRecovery": {
- "type": "boolean"
+ "topicId": {
+ "type": "string"
},
- "hadUserCorrection": {
- "type": "boolean"
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
},
- "uniqueTools": {
+ "at": {
"type": "integer",
- "format": "uint64",
- "minimum": 0
+ "format": "int64"
}
},
"required": [
- "toolCallCount",
- "hadErrorRecovery",
- "hadUserCorrection",
- "uniqueTools"
+ "conversationId",
+ "topicId",
+ "by",
+ "at"
]
},
- "HookContext": {
+ "ConversationPlacementReply": {
"type": "object",
"properties": {
- "agentId": {
- "type": [
- "string",
- "null"
+ "placement": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ConversationPlacement"
+ },
+ {
+ "type": "null"
+ }
]
+ }
+ }
+ },
+ "TopicPage": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "$ref": "#/$defs/TopicRecord"
},
- "sessionId": {
- "type": [
- "string",
- "null"
+ "page": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/WikiPageResponse"
+ },
+ {
+ "type": "null"
+ }
]
},
- "timestamp": {
+ "mentions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicMention"
+ },
+ "default": []
+ }
+ },
+ "required": [
+ "topic",
+ "mentions"
+ ]
+ },
+ "TopicMention": {
+ "type": "object",
+ "properties": {
+ "topicId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "topicId",
+ "name"
+ ]
+ },
+ "DecisionStatus": {
+ "type": "string",
+ "enum": [
+ "active",
+ "superseded"
+ ]
+ },
+ "TopicDecision": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/DecisionStatus"
+ },
+ "supersededBy": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "by": {
+ "type": "string"
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
"type": "integer",
"format": "int64"
},
- "metadata": {
- "type": "object",
- "additionalProperties": true
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
}
},
"required": [
- "timestamp",
- "metadata"
- ],
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "provider:before"
- },
- "providerId": {
- "type": "string"
+ "id",
+ "topicId",
+ "text",
+ "status",
+ "by",
+ "createdAt",
+ "updatedAt"
+ ]
+ },
+ "TopicDecisionList": {
+ "type": "object",
+ "properties": {
+ "decisions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TopicDecision"
+ }
+ }
+ },
+ "required": [
+ "decisions"
+ ]
+ },
+ "DecisionCreateRequest": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
},
- "model": {
- "type": "string"
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "DecisionUpdate": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "DecisionSupersedeRequest": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
},
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/Message"
- }
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
+ "DecisionSuperseded": {
+ "type": "object",
+ "properties": {
+ "superseded": {
+ "$ref": "#/$defs/TopicDecision"
+ },
+ "replacement": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TopicDecision"
},
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "providerId",
- "model",
- "messages"
]
+ }
+ },
+ "required": [
+ "superseded"
+ ]
+ },
+ "AgentEvent": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
},
+ "session": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "v",
+ "session"
+ ],
+ "oneOf": [
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:after"
+ "const": "session.start"
},
- "providerId": {
- "type": "string"
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "model": {
- "type": "string"
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "usage": {
+ "harness": {
"anyOf": [
{
- "$ref": "#/$defs/HookUsage"
+ "$ref": "#/$defs/SessionHarness"
},
{
"type": "null"
}
]
},
- "latencyMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "hasToolCalls": {
- "type": "boolean"
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "latencyMs",
- "hasToolCalls"
+ "type"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:error"
- },
- "providerId": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "error": {
- "type": "string"
+ "const": "session.end"
},
- "statusCode": {
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint16",
- "minimum": 0,
- "maximum": 65535
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "error"
+ "type"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "tool:before"
+ "const": "message.user"
},
- "toolName": {
+ "text": {
"type": "string"
},
- "args": {
- "type": "object",
- "additionalProperties": true
- },
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "blockReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "toolName",
- "args"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "tool:after"
+ "const": "message.agent"
},
- "toolName": {
+ "text": {
"type": "string"
},
- "args": {
- "type": "object",
- "additionalProperties": true
- },
- "result": {
- "type": "object",
- "additionalProperties": true
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
},
"durationMs": {
- "type": "integer",
+ "type": [
+ "integer",
+ "null"
+ ],
"format": "uint64",
"minimum": 0
},
- "isError": {
- "type": "boolean"
- }
- },
- "required": [
- "event",
- "toolName",
- "args",
- "result",
- "durationMs",
- "isError"
- ]
- },
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "session:start"
- },
- "platform": {
- "type": [
- "string",
- "null"
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AgentUsage"
+ },
+ {
+ "type": "null"
+ }
]
},
- "userId": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:end"
+ "const": "thinking.delta"
},
- "turnCount": {
+ "text": {
+ "type": "string"
+ },
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint32",
- "minimum": 0
- },
- "totalTokens": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionTokens"
- },
- {
- "type": "null"
- }
- ]
+ "format": "int64"
}
},
"required": [
- "event"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:before"
+ "const": "tool.start"
},
- "userMessage": {
- "$ref": "#/$defs/Message"
+ "tool": {
+ "type": "string"
},
- "skip": {
+ "args": {
"type": [
- "boolean",
+ "object",
"null"
- ]
+ ],
+ "additionalProperties": true
},
- "skipReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "userMessage"
+ "type",
+ "tool"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:after"
- },
- "response": {
- "type": "string"
+ "const": "task.plan"
},
- "toolsUsed": {
+ "tasks": {
"type": "array",
"items": {
"type": "string"
}
},
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "aborted": {
- "type": "boolean"
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "aborted"
+ "type",
+ "tasks"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "turn:reflect"
- },
- "response": {
- "type": "string"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "const": "task.check"
},
- "iterations": {
+ "index": {
"type": "integer",
"format": "uint32",
"minimum": 0
},
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "complexity": {
- "$ref": "#/$defs/TurnComplexity"
- },
- "source": {
- "$ref": "#/$defs/ReflectionSource"
- },
- "userMessage": {
- "$ref": "#/$defs/Message"
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "complexity",
- "source",
- "userMessage"
+ "type",
+ "index"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "skill:before"
- },
- "skillName": {
- "type": "string"
- },
- "skillLocation": {
- "type": "string"
- },
- "matchedTriggers": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "const": "activity"
},
- "matchScore": {
- "type": "number",
- "format": "double"
+ "activity": {
+ "$ref": "#/$defs/Activity"
},
- "skip": {
+ "ts": {
"type": [
- "boolean",
+ "integer",
"null"
- ]
- },
- "skipReason": {
- "type": [
- "string",
- "null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "skillName",
- "skillLocation",
- "matchedTriggers",
- "matchScore"
+ "type",
+ "activity"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "skill:after"
- },
- "skillName": {
- "type": "string"
- },
- "success": {
- "type": "boolean"
+ "const": "turn.end"
},
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ }
+ },
+ "required": [
+ "type"
+ ]
+ }
+ ],
+ "unevaluatedProperties": true
+ },
+ "SessionHarness": {
+ "type": "string"
+ },
+ "AgentUsage": {
+ "type": "object",
+ "properties": {
+ "promptTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completionTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cachedTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "promptTokens",
+ "completionTokens",
+ "cachedTokens"
+ ]
+ },
+ "AgentEventKind": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.start"
},
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "usage": {
+ "harness": {
"anyOf": [
{
- "$ref": "#/$defs/HookUsage"
+ "$ref": "#/$defs/SessionHarness"
},
{
"type": "null"
}
]
- }
- },
- "required": [
- "event",
- "skillName",
- "success",
- "toolsUsed",
- "iterations",
- "durationMs"
- ]
- },
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "compact:before"
},
- "messageCount": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "messageCount"
+ "type"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "compact:after"
- },
- "remainingMessages": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "const": "session.end"
},
- "summary": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "remainingMessages"
+ "type"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "delegation:before"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
+ "const": "message.user"
},
- "task": {
+ "text": {
"type": "string"
},
- "chainDepth": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "blockReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "chainDepth"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "delegation:after"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
+ "const": "message.agent"
},
- "task": {
+ "text": {
"type": "string"
},
- "status": {
- "$ref": "#/$defs/DelegationHookStatus"
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
},
"durationMs": {
- "type": "integer",
+ "type": [
+ "integer",
+ "null"
+ ],
"format": "uint64",
"minimum": 0
},
"usage": {
"anyOf": [
{
- "$ref": "#/$defs/HookUsage"
+ "$ref": "#/$defs/AgentUsage"
},
{
"type": "null"
}
]
},
- "toolsUsed": {
+ "ts": {
"type": [
- "array",
+ "integer",
"null"
],
- "items": {
- "type": "string"
- }
- },
- "cached": {
- "type": "boolean"
+ "format": "int64"
}
},
"required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "status",
- "durationMs",
- "cached"
- ]
- }
- ]
- },
- "Message": {
- "type": "object",
- "properties": {
- "role": {
- "$ref": "#/$defs/Role"
- },
- "content": {
- "$ref": "#/$defs/MessageContent"
- },
- "reasoning": {
- "type": [
- "string",
- "null"
+ "type",
+ "text"
]
},
- "toolCalls": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/ToolCall"
- }
- },
- "toolCallId": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "role",
- "content"
- ]
- },
- "MessageContent": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "$ref": "#/$defs/ContentPart"
- }
- }
- ]
- },
- "ToolCall": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "arguments": {
- "type": "object",
- "additionalProperties": true
- },
- "thoughtSignature": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "id",
- "name",
- "arguments"
- ]
- },
- "HookContextKind": {
- "oneOf": [
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:before"
- },
- "providerId": {
- "type": "string"
+ "const": "thinking.delta"
},
- "model": {
+ "text": {
"type": "string"
},
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/Message"
- }
- },
- "skip": {
+ "ts": {
"type": [
- "boolean",
+ "integer",
"null"
- ]
- }
- },
- "required": [
- "event",
- "providerId",
- "model",
- "messages"
- ]
- },
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "provider:after"
- },
- "providerId": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "latencyMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "hasToolCalls": {
- "type": "boolean"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "latencyMs",
- "hasToolCalls"
+ "type",
+ "text"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "provider:error"
- },
- "providerId": {
- "type": "string"
+ "const": "tool.start"
},
- "model": {
+ "tool": {
"type": "string"
},
- "error": {
- "type": "string"
+ "args": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
},
- "statusCode": {
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint16",
- "minimum": 0,
- "maximum": 65535
+ "format": "int64"
}
},
"required": [
- "event",
- "providerId",
- "model",
- "error"
+ "type",
+ "tool"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "tool:before"
- },
- "toolName": {
- "type": "string"
- },
- "args": {
- "type": "object",
- "additionalProperties": true
+ "const": "task.plan"
},
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
+ "tasks": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "blockReason": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "toolName",
- "args"
+ "type",
+ "tasks"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "tool:after"
- },
- "toolName": {
- "type": "string"
- },
- "args": {
- "type": "object",
- "additionalProperties": true
- },
- "result": {
- "type": "object",
- "additionalProperties": true
+ "const": "task.check"
},
- "durationMs": {
+ "index": {
"type": "integer",
- "format": "uint64",
+ "format": "uint32",
"minimum": 0
},
- "isError": {
- "type": "boolean"
+ "ts": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
"required": [
- "event",
- "toolName",
- "args",
- "result",
- "durationMs",
- "isError"
+ "type",
+ "index"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:start"
+ "const": "activity"
},
- "platform": {
- "type": [
- "string",
- "null"
- ]
+ "activity": {
+ "$ref": "#/$defs/Activity"
},
- "userId": {
+ "ts": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
}
},
"required": [
- "event"
+ "type",
+ "activity"
]
},
{
"type": "object",
"properties": {
- "event": {
+ "type": {
"type": "string",
- "const": "session:end"
+ "const": "turn.end"
},
- "turnCount": {
+ "ts": {
"type": [
"integer",
"null"
],
- "format": "uint32",
- "minimum": 0
- },
- "totalTokens": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionTokens"
- },
- {
- "type": "null"
- }
- ]
+ "format": "int64"
}
},
"required": [
- "event"
+ "type"
]
+ }
+ ]
+ },
+ "ContextUsageSource": {
+ "type": "string",
+ "enum": [
+ "harness",
+ "last-call"
+ ]
+ },
+ "LiveSessionSummary": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "turn:before"
- },
- "userMessage": {
- "$ref": "#/$defs/Message"
- },
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
+ "name": {
+ "type": "string"
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionHarness"
},
- "skipReason": {
- "type": [
- "string",
- "null"
- ]
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "userMessage"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "turn:after"
- },
- "response": {
- "type": "string"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "aborted": {
- "type": "boolean"
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "aborted"
+ "lastEventTs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "pty": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "turn:reflect"
- },
- "response": {
- "type": "string"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "complexity": {
- "$ref": "#/$defs/TurnComplexity"
- },
- "source": {
- "$ref": "#/$defs/ReflectionSource"
+ "contextWindow": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "compactAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "contextSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ContextSource"
},
- "userMessage": {
- "$ref": "#/$defs/Message"
+ {
+ "type": "null"
}
- },
- "required": [
- "event",
- "response",
- "toolsUsed",
- "iterations",
- "complexity",
- "source",
- "userMessage"
]
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
+ "SessionLogLine": {
+ "type": "object",
+ "properties": {
+ "who": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "skill:before"
- },
- "skillName": {
- "type": "string"
- },
- "skillLocation": {
- "type": "string"
- },
- "matchedTriggers": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "matchScore": {
- "type": "number",
- "format": "double"
- },
- "skip": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "skipReason": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "event",
- "skillName",
- "skillLocation",
- "matchedTriggers",
- "matchScore"
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "who",
+ "text"
+ ]
+ },
+ "SessionView": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "activity": {
+ "$ref": "#/$defs/Activity"
+ },
+ "tool": {
+ "type": [
+ "string",
+ "null"
]
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "skill:after"
- },
- "skillName": {
- "type": "string"
- },
- "success": {
- "type": "boolean"
- },
- "toolsUsed": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "iterations": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "event",
- "skillName",
- "success",
- "toolsUsed",
- "iterations",
- "durationMs"
- ]
+ "tasks": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "compact:before"
- },
- "messageCount": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- }
- },
- "required": [
- "event",
- "messageCount"
- ]
+ "thought": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "compact:after"
- },
- "remainingMessages": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "summary": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "event",
- "remainingMessages"
- ]
+ "lastMessage": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "delegation:before"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
- },
- "task": {
- "type": "string"
- },
- "chainDepth": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "blockReason": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "chainDepth"
- ]
+ "log": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SessionLogLine"
+ }
},
- {
- "type": "object",
- "properties": {
- "event": {
- "type": "string",
- "const": "delegation:after"
- },
- "fromAgent": {
- "type": "string"
- },
- "toAgent": {
- "type": "string"
- },
- "task": {
- "type": "string"
- },
- "status": {
- "$ref": "#/$defs/DelegationHookStatus"
- },
- "durationMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "usage": {
- "anyOf": [
- {
- "$ref": "#/$defs/HookUsage"
- },
- {
- "type": "null"
- }
- ]
- },
- "toolsUsed": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
- },
- "cached": {
- "type": "boolean"
- }
- },
- "required": [
- "event",
- "fromAgent",
- "toAgent",
- "task",
- "status",
- "durationMs",
- "cached"
- ]
+ "term": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "ended": {
+ "type": "boolean"
}
+ },
+ "required": [
+ "title",
+ "activity",
+ "tasks",
+ "thought",
+ "lastMessage",
+ "log",
+ "term",
+ "ended"
]
},
- "HookPipelineError": {
+ "LiveSessionList": {
"type": "object",
"properties": {
- "hookId": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/LiveSessionSummary"
+ }
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "StateResponse": {
+ "type": "object",
+ "properties": {
+ "session": {
"type": "string"
},
- "error": {
- "type": "string"
+ "state": {
+ "$ref": "#/$defs/SessionView"
}
},
"required": [
- "hookId",
- "error"
+ "session",
+ "state"
]
},
- "HookPipelineResult": {
+ "snapshot": {
"type": "object",
"properties": {
- "context": {
- "$ref": "#/$defs/HookContext"
- },
- "aborted": {
- "type": "boolean"
- },
- "skipped": {
- "type": "boolean"
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
},
- "errors": {
+ "sessions": {
"type": "array",
"items": {
- "$ref": "#/$defs/HookPipelineError"
+ "$ref": "#/$defs/LiveSessionSummary"
}
},
- "ran": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "rooms": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/SessionView"
+ }
}
},
"required": [
- "context",
- "aborted",
- "skipped",
- "errors",
- "ran"
+ "v",
+ "sessions",
+ "rooms"
]
},
- "HookErrorMode": {
+ "session.removed": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "session": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "v",
+ "session"
+ ]
+ },
+ "SessionBroadcast": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/snapshot"
+ },
+ {
+ "$ref": "#/$defs/session.removed"
+ },
+ {
+ "$ref": "#/$defs/hub.state"
+ },
+ {
+ "$ref": "#/$defs/plugin.changed"
+ },
+ {
+ "$ref": "#/$defs/plugin.views"
+ },
+ {
+ "$ref": "#/$defs/AgentEvent"
+ }
+ ]
+ },
+ "plugin.changed": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
+ }
+ },
+ "required": [
+ "v",
+ "plugin"
+ ]
+ },
+ "PluginId": {
"type": "string",
- "enum": [
- "continue",
- "abort",
- "retry"
+ "pattern": "^[a-z](-?[a-z0-9])+$",
+ "maxLength": 24
+ },
+ "plugin.views": {
+ "type": "object",
+ "properties": {
+ "v": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "views": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/RouteName"
+ }
+ }
+ },
+ "required": [
+ "v",
+ "plugin",
+ "views"
]
},
- "HookConfig": {
+ "RouteName": {
+ "type": "string",
+ "pattern": "^[a-z0-9][a-z0-9_-]*$",
+ "maxLength": 64
+ },
+ "CaptureBatchRequest": {
"type": "object",
"properties": {
- "id": {
+ "session_key": {
"type": "string"
},
- "event": {
- "$ref": "#/$defs/HookEventName"
+ "agent": {
+ "type": "string"
},
- "type": {
- "$ref": "#/$defs/HookConfigKind"
+ "channel": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "target": {
- "type": "string"
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "priority": {
+ "settings": {
"type": [
- "integer",
+ "object",
"null"
],
- "format": "int64"
+ "additionalProperties": true
},
- "onError": {
+ "task_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "finalize": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "created_at": {
"anyOf": [
{
- "$ref": "#/$defs/HookErrorMode"
+ "$ref": "#/$defs/Millis"
},
{
"type": "null"
}
]
},
- "agentFilter": {
- "type": [
- "array",
- "null"
- ],
+ "updated_at": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Millis"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "messages": {
+ "type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/CaptureMessage"
}
+ }
+ },
+ "required": [
+ "session_key",
+ "agent",
+ "messages"
+ ]
+ },
+ "CaptureMessage": {
+ "type": "object",
+ "properties": {
+ "event_id": {
+ "type": "string"
},
- "toolFilter": {
+ "role": {
+ "$ref": "#/$defs/Role"
+ },
+ "content": {
+ "type": "string"
+ },
+ "tool_name": {
"type": [
- "array",
+ "string",
+ "null"
+ ]
+ },
+ "tool_args": {
+ "type": [
+ "object",
"null"
],
- "items": {
- "type": "string"
- }
+ "additionalProperties": true
},
- "description": {
+ "tool_result": {
"type": [
"string",
"null"
]
},
- "enabled": {
+ "metadata": {
"type": [
- "boolean",
+ "object",
"null"
+ ],
+ "additionalProperties": true
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Millis"
+ },
+ {
+ "type": "null"
+ }
]
}
},
"required": [
- "id",
- "event",
- "type",
- "target"
+ "event_id",
+ "role",
+ "content"
]
},
- "HookConfigKind": {
- "type": "string",
- "enum": [
- "shell",
- "http",
- "internal"
+ "CaptureResult": {
+ "type": "object",
+ "properties": {
+ "ok": {
+ "type": "boolean"
+ },
+ "conversation_id": {
+ "type": "string"
+ },
+ "inserted": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "skipped": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "ok",
+ "conversation_id",
+ "inserted",
+ "skipped"
]
},
- "RosterCommand": {
+ "HookEventName": {
"type": "string",
"enum": [
- "claude",
- "grok",
- "kimi",
- "opencode",
- "hermes",
- "codex",
- "pi",
- "qwen",
- "cursor",
- "cowork"
+ "provider:before",
+ "provider:after",
+ "provider:error",
+ "tool:before",
+ "tool:after",
+ "session:start",
+ "session:end",
+ "turn:before",
+ "turn:after",
+ "turn:reflect",
+ "skill:before",
+ "skill:after",
+ "compact:before",
+ "compact:after",
+ "delegation:before",
+ "delegation:after"
]
},
- "ApprovalDecision": {
- "type": "string",
- "enum": [
- "allow",
- "deny",
- "allowSession"
+ "HookContextBase": {
+ "type": "object",
+ "properties": {
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "timestamp": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "metadata": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ },
+ "required": [
+ "timestamp",
+ "metadata"
]
},
- "ApprovalOutcome": {
+ "ReflectionSource": {
"type": "string",
"enum": [
- "allow",
- "deny",
- "allowSession",
- "external"
+ "complexity",
+ "periodic",
+ "manual"
]
},
- "HarnessStatus": {
+ "DelegationHookStatus": {
"type": "string",
"enum": [
- "working",
- "blocked",
- "idle"
+ "completed",
+ "failed",
+ "timeout",
+ "cached"
]
},
- "StatusPhase": {
- "type": "string",
- "enum": [
- "thinking",
- "tool",
- "writing",
- "prompt"
+ "HookUsage": {
+ "type": "object",
+ "properties": {
+ "promptTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completionTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "promptTokens",
+ "completionTokens"
]
},
- "StatusSource": {
- "type": "string",
- "enum": [
- "herdr",
- "transcript",
- "hooks",
- "protocol"
+ "SessionTokens": {
+ "type": "object",
+ "properties": {
+ "prompt": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completion": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "prompt",
+ "completion"
]
},
- "HarnessEvent": {
+ "TurnComplexity": {
+ "type": "object",
+ "properties": {
+ "toolCallCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "hadErrorRecovery": {
+ "type": "boolean"
+ },
+ "hadUserCorrection": {
+ "type": "boolean"
+ },
+ "uniqueTools": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "toolCallCount",
+ "hadErrorRecovery",
+ "hadUserCorrection",
+ "uniqueTools"
+ ]
+ },
+ "HookContext": {
+ "type": "object",
+ "properties": {
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "sessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "timestamp": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "metadata": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ },
+ "required": [
+ "timestamp",
+ "metadata"
+ ],
"oneOf": [
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "assistant-delta"
+ "const": "provider:before"
},
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "providerId": {
+ "type": "string"
},
- "text": {
+ "model": {
"type": "string"
},
- "turnId": {
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "skip": {
"type": [
- "string",
+ "boolean",
"null"
]
}
},
"required": [
- "type",
- "sessionId",
- "text"
+ "event",
+ "providerId",
+ "model",
+ "messages"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "reasoning-delta"
+ "const": "provider:after"
},
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "providerId": {
+ "type": "string"
},
- "text": {
+ "model": {
"type": "string"
},
- "turnId": {
- "type": [
- "string",
- "null"
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
]
+ },
+ "latencyMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "hasToolCalls": {
+ "type": "boolean"
}
},
"required": [
- "type",
- "sessionId",
- "text"
+ "event",
+ "providerId",
+ "model",
+ "latencyMs",
+ "hasToolCalls"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "tool-use"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "const": "provider:error"
},
- "toolCallId": {
+ "providerId": {
"type": "string"
},
- "name": {
+ "model": {
"type": "string"
},
- "input": {
- "type": "object",
- "additionalProperties": true
+ "error": {
+ "type": "string"
},
- "turnId": {
+ "statusCode": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "uint16",
+ "minimum": 0,
+ "maximum": 65535
}
},
"required": [
- "type",
- "sessionId",
- "toolCallId",
- "name",
- "input"
+ "event",
+ "providerId",
+ "model",
+ "error"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "tool-result"
+ "const": "tool:before"
},
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "toolCallId": {
- "type": "string"
- },
- "name": {
+ "toolName": {
"type": "string"
},
- "output": {
- "type": "string"
+ "args": {
+ "type": "object",
+ "additionalProperties": true
},
- "isError": {
+ "blocked": {
"type": [
"boolean",
"null"
]
},
- "turnId": {
+ "blockReason": {
"type": [
"string",
"null"
@@ -9711,104 +10491,90 @@
}
},
"required": [
- "type",
- "sessionId",
- "toolCallId",
- "name",
- "output"
+ "event",
+ "toolName",
+ "args"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "approval-request"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "const": "tool:after"
},
- "requestId": {
+ "toolName": {
"type": "string"
},
- "toolCallId": {
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": "string"
+ "args": {
+ "type": "object",
+ "additionalProperties": true
},
- "input": {
+ "result": {
"type": "object",
"additionalProperties": true
},
- "reason": {
- "type": [
- "string",
- "null"
- ]
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
},
- "options": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/ApprovalOption"
- }
+ "isError": {
+ "type": "boolean"
}
},
"required": [
- "type",
- "sessionId",
- "requestId",
- "name",
- "input"
+ "event",
+ "toolName",
+ "args",
+ "result",
+ "durationMs",
+ "isError"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "approval-resolved"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "const": "session:start"
},
- "requestId": {
- "type": "string"
+ "platform": {
+ "type": [
+ "string",
+ "null"
+ ]
},
- "decision": {
- "$ref": "#/$defs/ApprovalOutcome"
+ "userId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
- "type",
- "sessionId",
- "requestId",
- "decision"
+ "event"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "session-created"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "const": "session:end"
},
- "summary": {
- "$ref": "#/$defs/HarnessSessionSummary"
+ "turnCount": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
},
- "supersedes": {
+ "totalTokens": {
"anyOf": [
{
- "$ref": "#/$defs/SessionId"
+ "$ref": "#/$defs/SessionTokens"
},
{
"type": "null"
@@ -9817,28 +10583,26 @@
}
},
"required": [
- "type",
- "sessionId",
- "summary"
+ "event"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "turn-complete"
+ "const": "turn:before"
},
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "userMessage": {
+ "$ref": "#/$defs/Message"
},
- "turnId": {
+ "skip": {
"type": [
- "string",
+ "boolean",
"null"
]
},
- "stopReason": {
+ "skipReason": {
"type": [
"string",
"null"
@@ -9846,152 +10610,181 @@
}
},
"required": [
- "type",
- "sessionId"
+ "event",
+ "userMessage"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "error"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "const": "turn:after"
},
- "code": {
+ "response": {
"type": "string"
},
- "deliveryId": {
- "type": [
- "string",
- "null"
- ]
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "message": {
- "type": "string"
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
},
- "retryable": {
- "type": [
- "boolean",
- "null"
+ "aborted": {
+ "type": "boolean"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
]
}
},
"required": [
- "type",
- "sessionId",
- "code",
- "message"
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "aborted"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "session-updated"
+ "const": "turn:reflect"
},
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "response": {
+ "type": "string"
},
- "status": {
- "$ref": "#/$defs/HarnessSessionStatus"
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "previousSessionId": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
},
- "supersedes": {
+ "usage": {
"anyOf": [
{
- "$ref": "#/$defs/SessionId"
+ "$ref": "#/$defs/HookUsage"
},
{
"type": "null"
}
]
},
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
+ "complexity": {
+ "$ref": "#/$defs/TurnComplexity"
+ },
+ "source": {
+ "$ref": "#/$defs/ReflectionSource"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
}
},
"required": [
- "type",
- "sessionId",
- "status"
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "complexity",
+ "source",
+ "userMessage"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "transcript"
- },
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "const": "skill:before"
},
- "rev": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "from": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "skillName": {
+ "type": "string"
},
- "total": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "skillLocation": {
+ "type": "string"
},
- "turns": {
+ "matchedTriggers": {
"type": "array",
"items": {
- "$ref": "#/$defs/HarnessTranscriptTurn"
+ "type": "string"
}
},
- "command": {
- "$ref": "#/$defs/RosterCommand"
+ "matchScore": {
+ "type": "number",
+ "format": "double"
},
- "truncatedBefore": {
+ "skip": {
"type": [
"boolean",
"null"
]
},
- "contextWindow": {
+ "skipReason": {
"type": [
- "integer",
+ "string",
"null"
- ],
- "format": "uint64",
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "skillLocation",
+ "matchedTriggers",
+ "matchScore"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:after"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "success": {
+ "type": "boolean"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
"minimum": 0
},
- "compactAt": {
- "type": [
- "integer",
- "null"
- ],
+ "durationMs": {
+ "type": "integer",
"format": "uint64",
"minimum": 0
},
- "contextSource": {
+ "usage": {
"anyOf": [
{
- "$ref": "#/$defs/ContextSource"
+ "$ref": "#/$defs/HookUsage"
},
{
"type": "null"
@@ -10000,207 +10793,220 @@
}
},
"required": [
- "type",
- "sessionId",
- "rev",
- "from",
- "total",
- "turns",
- "command"
+ "event",
+ "skillName",
+ "success",
+ "toolsUsed",
+ "iterations",
+ "durationMs"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "status"
+ "const": "compact:before"
+ },
+ "messageCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
}
},
- "$ref": "#/$defs/HarnessStatusFrame",
"required": [
- "type"
+ "event",
+ "messageCount"
]
},
{
"type": "object",
"properties": {
- "type": {
+ "event": {
"type": "string",
- "const": "prompt"
+ "const": "compact:after"
},
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "remainingMessages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
},
- "promptId": {
+ "summary": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "remainingMessages"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:before"
+ },
+ "fromAgent": {
"type": "string"
},
- "kind": {
- "$ref": "#/$defs/PromptKind"
+ "toAgent": {
+ "type": "string"
},
- "toolName": {
+ "task": {
"type": "string"
},
- "questions": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/PromptQuestion"
- }
+ "chainDepth": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
},
- "resolved": {
- "anyOf": [
- {
- "$ref": "#/$defs/PromptResolution"
- },
- {
- "type": "null"
- }
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
]
},
- "screen": {
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "chainDepth"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:after"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/DelegationHookStatus"
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
"anyOf": [
{
- "$ref": "#/$defs/PromptScreen"
+ "$ref": "#/$defs/HookUsage"
},
{
"type": "null"
}
]
+ },
+ "toolsUsed": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "cached": {
+ "type": "boolean"
}
},
"required": [
- "type",
- "sessionId",
- "promptId",
- "kind",
- "toolName",
- "questions"
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "status",
+ "durationMs",
+ "cached"
]
}
]
},
- "ApprovalOption": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "label": {
- "type": "string"
- }
- },
- "required": [
- "key",
- "label"
- ]
- },
- "HarnessSessionSummary": {
+ "Message": {
"type": "object",
"properties": {
- "sessionId": {
- "$ref": "#/$defs/SessionId"
+ "role": {
+ "$ref": "#/$defs/Role"
},
- "harnessId": {
- "$ref": "#/$defs/HarnessId"
+ "content": {
+ "$ref": "#/$defs/MessageContent"
},
- "title": {
- "type": [
- "string",
- "null"
- ]
- },
- "cwd": {
- "type": [
- "string",
- "null"
- ]
- },
- "createdAt": {
- "$ref": "#/$defs/Millis"
- },
- "updatedAt": {
- "$ref": "#/$defs/Millis"
- },
- "status": {
- "$ref": "#/$defs/HarnessSessionStatus"
- },
- "blocked": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "supersedes": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
- },
- "parentSessionId": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
- },
- "agentName": {
+ "reasoning": {
"type": [
"string",
"null"
]
},
- "taskId": {
+ "toolCalls": {
"type": [
- "string",
+ "array",
"null"
- ]
+ ],
+ "items": {
+ "$ref": "#/$defs/ToolCall"
+ }
},
- "effort": {
+ "toolCallId": {
"type": [
"string",
"null"
]
- },
- "transport": {
- "anyOf": [
- {
- "$ref": "#/$defs/Transport"
- },
- {
- "type": "null"
- }
- ]
}
},
"required": [
- "sessionId",
- "harnessId",
- "createdAt",
- "updatedAt",
- "status"
- ],
- "additionalProperties": true
+ "role",
+ "content"
+ ]
},
- "StatusTool": {
+ "MessageContent": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ContentPart"
+ }
+ }
+ ]
+ },
+ "ToolCall": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"name": {
"type": "string"
},
- "toolCallId": {
+ "arguments": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "thoughtSignature": {
"type": [
"string",
"null"
@@ -10208,1105 +11014,5197 @@
}
},
"required": [
- "name"
+ "id",
+ "name",
+ "arguments"
]
},
- "HarnessStatusFrame": {
- "type": "object",
- "properties": {
- "sessionId": {
- "$ref": "#/$defs/SessionId"
- },
- "status": {
- "$ref": "#/$defs/HarnessStatus"
- },
- "since": {
- "type": "integer",
- "format": "int64"
- },
- "source": {
- "anyOf": [
- {
- "$ref": "#/$defs/StatusSource"
+ "HookContextKind": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:before"
},
- {
- "type": "null"
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
}
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "messages"
]
},
- "phase": {
- "anyOf": [
- {
- "$ref": "#/$defs/StatusPhase"
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:after"
},
- {
- "type": "null"
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "latencyMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "hasToolCalls": {
+ "type": "boolean"
}
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "latencyMs",
+ "hasToolCalls"
]
},
- "tool": {
- "anyOf": [
- {
- "$ref": "#/$defs/StatusTool"
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "provider:error"
},
- {
- "type": "null"
+ "providerId": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "statusCode": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint16",
+ "minimum": 0,
+ "maximum": 65535
}
+ },
+ "required": [
+ "event",
+ "providerId",
+ "model",
+ "error"
]
},
- "promptId": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "sessionId",
- "status",
- "since"
- ]
- },
- "PromptKind": {
- "type": "string",
- "enum": [
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "tool:before"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "toolName",
+ "args"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "tool:after"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "result": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "isError": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "toolName",
+ "args",
+ "result",
+ "durationMs",
+ "isError"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "session:start"
+ },
+ "platform": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "userId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "session:end"
+ },
+ "turnCount": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "totalTokens": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionTokens"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:before"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "skipReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "userMessage"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:after"
+ },
+ "response": {
+ "type": "string"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "aborted": {
+ "type": "boolean"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "aborted"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "turn:reflect"
+ },
+ "response": {
+ "type": "string"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "complexity": {
+ "$ref": "#/$defs/TurnComplexity"
+ },
+ "source": {
+ "$ref": "#/$defs/ReflectionSource"
+ },
+ "userMessage": {
+ "$ref": "#/$defs/Message"
+ }
+ },
+ "required": [
+ "event",
+ "response",
+ "toolsUsed",
+ "iterations",
+ "complexity",
+ "source",
+ "userMessage"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:before"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "skillLocation": {
+ "type": "string"
+ },
+ "matchedTriggers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "matchScore": {
+ "type": "number",
+ "format": "double"
+ },
+ "skip": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "skipReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "skillLocation",
+ "matchedTriggers",
+ "matchScore"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "skill:after"
+ },
+ "skillName": {
+ "type": "string"
+ },
+ "success": {
+ "type": "boolean"
+ },
+ "toolsUsed": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "iterations": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "skillName",
+ "success",
+ "toolsUsed",
+ "iterations",
+ "durationMs"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "compact:before"
+ },
+ "messageCount": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "event",
+ "messageCount"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "compact:after"
+ },
+ "remainingMessages": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "summary": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "remainingMessages"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:before"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "chainDepth": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "blockReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "chainDepth"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "event": {
+ "type": "string",
+ "const": "delegation:after"
+ },
+ "fromAgent": {
+ "type": "string"
+ },
+ "toAgent": {
+ "type": "string"
+ },
+ "task": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/DelegationHookStatus"
+ },
+ "durationMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "toolsUsed": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "cached": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event",
+ "fromAgent",
+ "toAgent",
+ "task",
+ "status",
+ "durationMs",
+ "cached"
+ ]
+ }
+ ]
+ },
+ "HookPipelineError": {
+ "type": "object",
+ "properties": {
+ "hookId": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "hookId",
+ "error"
+ ]
+ },
+ "HookPipelineResult": {
+ "type": "object",
+ "properties": {
+ "context": {
+ "$ref": "#/$defs/HookContext"
+ },
+ "aborted": {
+ "type": "boolean"
+ },
+ "skipped": {
+ "type": "boolean"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HookPipelineError"
+ }
+ },
+ "ran": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "context",
+ "aborted",
+ "skipped",
+ "errors",
+ "ran"
+ ]
+ },
+ "HookErrorMode": {
+ "type": "string",
+ "enum": [
+ "continue",
+ "abort",
+ "retry"
+ ]
+ },
+ "HookConfig": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "event": {
+ "$ref": "#/$defs/HookEventName"
+ },
+ "type": {
+ "$ref": "#/$defs/HookConfigKind"
+ },
+ "target": {
+ "type": "string"
+ },
+ "priority": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "onError": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HookErrorMode"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agentFilter": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "toolFilter": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "enabled": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "event",
+ "type",
+ "target"
+ ]
+ },
+ "HookConfigKind": {
+ "type": "string",
+ "enum": [
+ "shell",
+ "http",
+ "internal"
+ ]
+ },
+ "RosterCommand": {
+ "type": "string",
+ "enum": [
+ "claude",
+ "grok",
+ "kimi",
+ "opencode",
+ "hermes",
+ "codex",
+ "omp",
+ "dsh",
+ "cursor",
+ "cowork"
+ ]
+ },
+ "ApprovalDecision": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny",
+ "allow-session"
+ ]
+ },
+ "ApprovalOutcome": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny",
+ "allow-session",
+ "external"
+ ]
+ },
+ "HarnessStatus": {
+ "type": "string",
+ "enum": [
+ "working",
+ "blocked",
+ "idle"
+ ]
+ },
+ "StatusPhase": {
+ "type": "string",
+ "enum": [
+ "thinking",
+ "tool",
+ "writing",
+ "prompt"
+ ]
+ },
+ "StatusSource": {
+ "type": "string",
+ "enum": [
+ "herdr",
+ "transcript",
+ "hooks",
+ "protocol"
+ ]
+ },
+ "HarnessEvent": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "assistant-delta"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "text": {
+ "type": "string"
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "reasoning-delta"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "text": {
+ "type": "string"
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tool-use"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "toolCallId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "toolCallId",
+ "name",
+ "input"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tool-update"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "toolCallId": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "toolCallId",
+ "input"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tool-result"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "toolCallId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "output": {
+ "type": "string"
+ },
+ "isError": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "toolCallId",
+ "name",
+ "output"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "approval-request"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "requestId": {
+ "type": "string"
+ },
+ "toolCallId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "reason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "options": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/ApprovalOption"
+ }
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "requestId",
+ "name",
+ "input"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "approval-resolved"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "requestId": {
+ "type": "string"
+ },
+ "decision": {
+ "$ref": "#/$defs/ApprovalOutcome"
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "requestId",
+ "decision"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session-created"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "summary": {
+ "$ref": "#/$defs/HarnessSessionSummary"
+ },
+ "supersedes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "summary"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "plan"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "entries": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PlanEntry"
+ }
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "entries"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "turn-complete"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "turnId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "stopReason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/LlmUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modelMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "type",
+ "sessionId"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "context"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "used": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "window": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "source": {
+ "$ref": "#/$defs/ContextUsageSource"
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "used",
+ "source"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "error"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "code": {
+ "type": "string"
+ },
+ "deliveryId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "message": {
+ "type": "string"
+ },
+ "retryable": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "code",
+ "message"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session-updated"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "status": {
+ "$ref": "#/$defs/HarnessSessionStatus"
+ },
+ "previousSessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "supersedes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "status"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "transcript"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "rev": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "from": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "total": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "turns": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HarnessTranscriptTurn"
+ }
+ },
+ "command": {
+ "$ref": "#/$defs/RosterCommand"
+ },
+ "truncatedBefore": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "contextWindow": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "compactAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "contextSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ContextSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "rev",
+ "from",
+ "total",
+ "turns",
+ "command"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "status"
+ }
+ },
+ "$ref": "#/$defs/HarnessStatusFrame",
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "prompt"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "promptId": {
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/$defs/PromptKind"
+ },
+ "toolName": {
+ "type": "string"
+ },
+ "questions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PromptQuestion"
+ }
+ },
+ "resolved": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/PromptResolution"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "screen": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/PromptScreen"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "sessionId",
+ "promptId",
+ "kind",
+ "toolName",
+ "questions"
+ ]
+ }
+ ]
+ },
+ "ApprovalOption": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "label"
+ ]
+ },
+ "HarnessSessionSummary": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "harnessId": {
+ "$ref": "#/$defs/HarnessId"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "cwd": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "createdAt": {
+ "$ref": "#/$defs/Millis"
+ },
+ "updatedAt": {
+ "$ref": "#/$defs/Millis"
+ },
+ "status": {
+ "$ref": "#/$defs/HarnessSessionStatus"
+ },
+ "blocked": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "supersedes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentSessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agentName": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "taskId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "transport": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Transport"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "startupContext": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StartupContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "sessionId",
+ "harnessId",
+ "createdAt",
+ "updatedAt",
+ "status"
+ ],
+ "additionalProperties": true
+ },
+ "PlanEntry": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/PlanStatus"
+ }
+ },
+ "required": [
+ "content",
+ "status"
+ ]
+ },
+ "PlanStatus": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "in_progress",
+ "completed"
+ ]
+ },
+ "LlmUsage": {
+ "type": "object",
+ "properties": {
+ "promptTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "completionTokens": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ },
+ "reasoningTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cachedTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cacheCreationTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "cacheReadTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "promptTokens",
+ "completionTokens"
+ ]
+ },
+ "StatusTool": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "toolCallId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "HarnessStatusFrame": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "status": {
+ "$ref": "#/$defs/HarnessStatus"
+ },
+ "since": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "phase": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusPhase"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "tool": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusTool"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "promptId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "sessionId",
+ "status",
+ "since"
+ ]
+ },
+ "PromptKind": {
+ "type": "string",
+ "enum": [
"ask-user"
]
},
- "PromptQuestion": {
+ "PromptQuestion": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "header": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "multiSelect": {
+ "type": "boolean"
+ },
+ "freeText": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PromptOption"
+ }
+ }
+ },
+ "required": [
+ "multiSelect",
+ "options"
+ ]
+ },
+ "PromptOption": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "label"
+ ]
+ },
+ "PromptResolution": {
+ "type": "object",
+ "properties": {
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "answerText": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "at"
+ ]
+ },
+ "PromptScreen": {
+ "type": "object",
+ "properties": {
+ "current": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "total": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "current",
+ "total"
+ ]
+ },
+ "HarnessCapabilities": {
+ "type": "object",
+ "properties": {
+ "interrupt": {
+ "type": "boolean"
+ },
+ "resume": {
+ "type": "boolean"
+ },
+ "approvals": {
+ "type": "boolean"
+ },
+ "steering": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "liveStream": {
+ "type": "boolean"
+ },
+ "listSessions": {
+ "type": "boolean"
+ },
+ "drive": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "turnOptions": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "launchModel": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "imageAttachments": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "models": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/HarnessModelOption"
+ }
+ },
+ "modelsSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessModelsSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "efforts": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/EffortOption"
+ }
+ },
+ "modelFlag": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effortFlag": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "interrupt",
+ "resume",
+ "approvals",
+ "liveStream",
+ "listSessions"
+ ]
+ },
+ "HarnessModelOption": {
+ "type": "object",
+ "properties": {
+ "inputModalities": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "isDefault": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "efforts": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/EffortOption"
+ }
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ]
+ },
+ "EffortOption": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "isDefault": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ]
+ },
+ "HarnessModelsSource": {
+ "type": "string",
+ "enum": [
+ "discovered",
+ "config",
+ "merged",
+ "static"
+ ]
+ },
+ "HarnessControlCapabilities": {
+ "type": "object",
+ "properties": {
+ "interrupt": {
+ "type": "boolean"
+ },
+ "resume": {
+ "type": "boolean"
+ },
+ "approvals": {
+ "type": "boolean"
+ },
+ "steering": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "interrupt",
+ "resume",
+ "approvals"
+ ]
+ },
+ "HarnessObservationCapabilities": {
+ "type": "object",
+ "properties": {
+ "liveStream": {
+ "type": "boolean"
+ },
+ "listSessions": {
+ "type": "boolean"
+ },
+ "drive": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "liveStream",
+ "listSessions"
+ ]
+ },
+ "HarnessSessionCreateRequest": {
+ "type": "object",
+ "properties": {
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "cwd": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "prompt": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ }
+ },
+ "HarnessSessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HarnessSessionSummary"
+ }
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "HarnessOffering": {
+ "type": "object",
+ "properties": {
+ "harnessId": {
+ "$ref": "#/$defs/HarnessId"
+ },
+ "chat": {
+ "type": "boolean"
+ },
+ "capabilities": {
+ "$ref": "#/$defs/HarnessCapabilities"
+ }
+ },
+ "required": [
+ "harnessId",
+ "chat",
+ "capabilities"
+ ]
+ },
+ "HarnessOfferingList": {
+ "type": "object",
+ "properties": {
+ "harnesses": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HarnessOffering"
+ }
+ }
+ },
+ "required": [
+ "harnesses"
+ ]
+ },
+ "HarnessCode": {
+ "type": "string",
+ "enum": [
+ "invalid_session_id",
+ "bad_request",
+ "session_id_collision",
+ "turn_in_flight",
+ "capability_unsupported",
+ "unknown_approval",
+ "unknown_prompt",
+ "turn_failed"
+ ]
+ },
+ "HarnessStoreSession": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "command": {
+ "$ref": "#/$defs/RosterCommand"
+ },
+ "title": {
+ "type": "string"
+ },
+ "updatedAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "parentSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agentName": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "taskId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "command",
+ "title",
+ "updatedAt"
+ ]
+ },
+ "HarnessStoreSessionList": {
+ "type": "object",
+ "properties": {
+ "sessions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/HarnessStoreSession"
+ }
+ }
+ },
+ "required": [
+ "sessions"
+ ]
+ },
+ "task.done": {
+ "type": "object",
+ "properties": {
+ "taskId": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/TaskStatus"
+ },
+ "parentSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "childSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "ts": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "required": [
+ "taskId",
+ "status",
+ "ts"
+ ]
+ },
+ "TaskVerdict": {
+ "type": "string",
+ "enum": [
+ "completed",
+ "failed",
+ "killed",
+ "timeout",
+ "budget-exceeded"
+ ]
+ },
+ "CriterionKind": {
+ "type": "string",
+ "enum": [
+ "manual",
+ "automated"
+ ]
+ },
+ "AcceptanceCriterion": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/$defs/CriterionKind"
+ },
+ "check": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "description",
+ "kind"
+ ]
+ },
+ "TaskBudget": {
+ "type": "object",
+ "properties": {
+ "maxTurns": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "maxWallClockMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ }
+ },
+ "TaskUsage": {
+ "type": "object",
+ "properties": {
+ "inputTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "outputTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "totalTokens": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ },
+ "turns": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "wallClockMs": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "turns",
+ "wallClockMs"
+ ]
+ },
+ "Effort": {
+ "type": "string",
+ "enum": [
+ "low",
+ "medium",
+ "high"
+ ]
+ },
+ "TaskResult": {
+ "type": "object",
+ "properties": {
+ "verdict": {
+ "$ref": "#/$defs/TaskVerdict"
+ },
+ "summary": {
+ "type": "string"
+ },
+ "usage": {
+ "$ref": "#/$defs/TaskUsage"
+ },
+ "error": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "verdict",
+ "summary",
+ "usage"
+ ]
+ },
+ "LogLevel": {
+ "type": "string",
+ "enum": [
+ "debug",
+ "info",
+ "warn",
+ "error"
+ ]
+ },
+ "TaskWire": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "goal": {
+ "type": "string"
+ },
+ "acceptanceCriteria": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/AcceptanceCriterion"
+ }
+ },
+ "agentId": {
+ "type": "string"
+ },
+ "node": {
+ "type": "string"
+ },
+ "harness": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HarnessId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "requestedBy": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parentTaskId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "depth": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ },
+ "childSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "budget": {
+ "$ref": "#/$defs/TaskBudget"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskUsage"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "status": {
+ "$ref": "#/$defs/TaskStatus"
+ },
+ "error": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "result": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskResult"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "startedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "completedAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
+ },
+ "durationMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "id",
+ "goal",
+ "acceptanceCriteria",
+ "agentId",
+ "node",
+ "depth",
+ "budget",
+ "status",
+ "createdAt"
+ ]
+ },
+ "TaskCreateRequest": {
+ "type": "object",
+ "properties": {
+ "goal": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "agentId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "nodeAffinity": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "acceptanceCriteria": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/$defs/AcceptanceCriterion"
+ }
+ },
+ "budget": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskBudget"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "parentSessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "model": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "effort": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ThinkingLevel"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "workingDir": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "requestedBy": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": true
+ },
+ "TaskResponse": {
+ "type": "object",
+ "properties": {
+ "task": {
+ "$ref": "#/$defs/TaskWire"
+ }
+ },
+ "required": [
+ "task"
+ ]
+ },
+ "TasksListResponse": {
+ "type": "object",
+ "properties": {
+ "tasks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TaskWire"
+ }
+ }
+ },
+ "required": [
+ "tasks"
+ ]
+ },
+ "TaskKillResponse": {
+ "type": "object",
+ "properties": {
+ "ok": {
+ "type": "boolean"
+ },
+ "prior": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskStatus"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "ok"
+ ]
+ },
+ "TaskWaitTimeoutResponse": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "string"
+ },
+ "task": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TaskWire"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "error"
+ ]
+ },
+ "MemorySearchResult": {
+ "type": "object",
+ "properties": {
+ "chunk": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MemoryChunkMatch"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "id": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/$defs/MemoryHitSource"
+ },
+ "content": {
+ "type": "string"
+ },
+ "role": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Role"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "agent": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "relevanceScore": {
+ "type": "number",
+ "format": "double"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "sessionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "source",
+ "content",
+ "role",
+ "agent",
+ "relevanceScore",
+ "createdAt"
+ ]
+ },
+ "ToolName": {
+ "type": "string",
+ "pattern": "^[a-z](_?[a-z0-9])*$",
+ "maxLength": 24
+ },
+ "PluginManifest": {
+ "type": "object",
+ "properties": {
+ "$schema": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "manifest": {
+ "$ref": "#/$defs/ProtocolVersion"
+ },
+ "id": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "run": {
+ "$ref": "#/$defs/PluginRun"
+ },
+ "permissions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Permission"
+ }
+ },
+ "settings": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewField"
+ }
+ },
+ "tools": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginTool"
+ }
+ },
+ "contributes": {
+ "$ref": "#/$defs/PluginContributions",
+ "default": {}
+ },
+ "jobs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginJob"
+ }
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginEventKind"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "manifest",
+ "id",
+ "name",
+ "version",
+ "description",
+ "run",
+ "contributes"
+ ]
+ },
+ "PluginRun": {
+ "type": "object",
+ "properties": {
+ "command": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "env": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "readyTimeoutMs": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "command"
+ ]
+ },
+ "Permission": {
+ "type": "string",
+ "enum": [
+ "memory.read",
+ "memory.write",
+ "sessions.read",
+ "sessions.control",
+ "topics.read",
+ "topics.write",
+ "tasks.read",
+ "tasks.delegate",
+ "agents.read",
+ "notifications.send",
+ "host.files.read",
+ "host.files.write",
+ "host.network",
+ "host.exec"
+ ]
+ },
+ "ViewField": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "input": {
+ "$ref": "#/$defs/ViewInput"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewValue"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "required": {
+ "type": "boolean"
+ },
+ "help": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "placeholder": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "key",
+ "label",
+ "input"
+ ]
+ },
+ "ViewInput": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "multiline": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "secret"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "number"
+ },
+ "min": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "max": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "step": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "toggle"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "select"
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewOption"
+ }
+ },
+ "multiple": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "options"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "file"
+ },
+ "multiple": {
+ "type": "boolean"
+ },
+ "accept": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
+ ]
+ }
+ ]
+ },
+ "ViewOption": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "value",
+ "label"
+ ]
+ },
+ "ViewValue": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number",
+ "format": "double"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewFile"
+ }
+ }
+ ]
+ },
+ "ViewFile": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "mimeType": {
+ "type": "string"
+ },
+ "data": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "mimeType",
+ "data"
+ ]
+ },
+ "PluginTool": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/$defs/ToolName"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "description": {
+ "type": "string"
+ },
+ "inputSchema": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "hints": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginToolHint"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "description",
+ "inputSchema"
+ ]
+ },
+ "PluginToolHint": {
+ "type": "string",
+ "enum": [
+ "readOnly",
+ "destructive",
+ "idempotent",
+ "openWorld"
+ ]
+ },
+ "PluginContributions": {
+ "type": "object",
+ "properties": {
+ "pages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginPage"
+ }
+ },
+ "topicCards": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginTopicCard"
+ }
+ },
+ "sessionActions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginSessionAction"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "PluginPage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "title": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "view": {
+ "$ref": "#/$defs/RouteName"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "title",
+ "view"
+ ]
+ },
+ "PluginTopicCard": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "$ref": "#/$defs/RouteName"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "title",
+ "view"
+ ]
+ },
+ "PluginSessionAction": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "title": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "action": {
+ "$ref": "#/$defs/ViewAction"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "title",
+ "action"
+ ]
+ },
+ "ViewAction": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "call"
+ },
+ "action": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "action"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "navigate"
+ },
+ "view": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ },
+ "replace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "view"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "dialog"
+ },
+ "view": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "view"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "back"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "refresh"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "toast"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTone"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "copy"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "openSession"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "openTopic"
+ },
+ "topicId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "topicId"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "openUrl"
+ },
+ "url": {
+ "type": "string",
+ "format": "uri"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "url"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "download"
+ },
+ "path": {
+ "type": "string"
+ },
+ "filename": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "path"
+ ]
+ }
+ ]
+ },
+ "ViewTone": {
+ "type": "string",
+ "enum": [
+ "neutral",
+ "info",
+ "success",
+ "warning",
+ "danger"
+ ]
+ },
+ "PluginJob": {
"type": "object",
"properties": {
- "question": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "title": {
+ "type": "string"
+ },
+ "schedule": {
"type": [
"string",
"null"
]
},
- "header": {
+ "timeoutMs": {
"type": [
- "string",
+ "integer",
"null"
- ]
- },
- "multiSelect": {
- "type": "boolean"
+ ],
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "title"
+ ]
+ },
+ "PluginEventKind": {
+ "type": "string",
+ "enum": [
+ "session.started",
+ "session.idle",
+ "session.ended",
+ "session.placed",
+ "summary.written",
+ "task.done"
+ ]
+ },
+ "View": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
},
- "freeText": {
+ "subtitle": {
"type": [
- "boolean",
+ "string",
"null"
]
},
- "options": {
+ "toolbar": {
"type": "array",
"items": {
- "$ref": "#/$defs/PromptOption"
+ "$ref": "#/$defs/ViewButton"
+ }
+ },
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
}
}
},
+ "additionalProperties": false,
"required": [
- "multiSelect",
- "options"
+ "title",
+ "blocks"
]
},
- "PromptOption": {
+ "ViewButton": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
- "description": {
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "style": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewButtonStyle"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "action": {
+ "$ref": "#/$defs/ViewAction"
+ },
+ "confirm": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewConfirm"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "label",
+ "action"
+ ]
+ },
+ "ViewButtonStyle": {
+ "type": "string",
+ "enum": [
+ "primary",
+ "secondary",
+ "danger"
+ ]
+ },
+ "ViewConfirm": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "confirmLabel": {
"type": [
"string",
"null"
]
- }
- },
- "required": [
- "label"
- ]
- },
- "PromptResolution": {
- "type": "object",
- "properties": {
- "at": {
- "type": "integer",
- "format": "int64"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "title",
+ "text"
+ ]
+ },
+ "ViewBlock": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "section"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "subtitle": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ },
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
+ },
+ "collapsed": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "blocks"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "split"
+ },
+ "primary": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
+ },
+ "secondary": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewBlock"
+ }
+ },
+ "ratio": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "primary",
+ "secondary"
+ ]
},
- "answerText": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "tabs"
+ },
+ "tabs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewTab"
+ }
+ },
+ "selected": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/RouteName"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "tabs"
]
- }
- },
- "required": [
- "at"
- ]
- },
- "PromptScreen": {
- "type": "object",
- "properties": {
- "current": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "total": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- }
- },
- "required": [
- "current",
- "total"
- ]
- },
- "HarnessCapabilities": {
- "type": "object",
- "properties": {
- "interrupt": {
- "type": "boolean"
- },
- "resume": {
- "type": "boolean"
},
- "approvals": {
- "type": "boolean"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTone"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "monospace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
},
- "liveStream": {
- "type": "boolean"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "markdown"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
},
- "listSessions": {
- "type": "boolean"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "code"
+ },
+ "text": {
+ "type": "string"
+ },
+ "language": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "follow": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
},
- "drive": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "image"
+ },
+ "path": {
+ "type": "string"
+ },
+ "alt": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "path",
+ "alt"
]
},
- "turnOptions": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "properties"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewProperty"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
]
},
- "launchModel": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "progress"
+ },
+ "value": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "label": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type"
]
},
- "imageAttachments": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "notice"
+ },
+ "tone": {
+ "$ref": "#/$defs/ViewTone"
+ },
+ "title": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "text": {
+ "type": "string"
+ },
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "tone",
+ "text"
]
},
- "models": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/HarnessModelOption"
- }
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "list"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewListItem"
+ }
+ },
+ "empty": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewEmpty"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
+ ]
},
- "modelsSource": {
- "anyOf": [
- {
- "$ref": "#/$defs/HarnessModelsSource"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "table"
},
- {
- "type": "null"
+ "columns": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewColumn"
+ }
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewRow"
+ }
+ },
+ "empty": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewEmpty"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "columns",
+ "rows"
]
},
- "efforts": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/EffortOption"
- }
- },
- "modelFlag": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "breadcrumbs"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewCrumb"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
]
},
- "effortFlag": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "actions"
+ },
+ "buttons": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "buttons"
]
- }
- },
- "required": [
- "interrupt",
- "resume",
- "approvals",
- "liveStream",
- "listSessions"
- ]
- },
- "HarnessModelOption": {
- "type": "object",
- "properties": {
- "inputModalities": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
- },
- "id": {
- "type": "string"
- },
- "label": {
- "type": "string"
},
- "isDefault": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "form"
+ },
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewField"
+ }
+ },
+ "buttons": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "fields",
+ "buttons"
]
},
- "efforts": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/EffortOption"
- }
- }
- },
- "required": [
- "id",
- "label"
- ]
- },
- "EffortOption": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "label": {
- "type": "string"
- },
- "isDefault": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "canvas"
+ },
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "scene": {
+ "$ref": "#/$defs/CanvasScene"
+ },
+ "height": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "readOnly": {
+ "type": "boolean"
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasMenuItem"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "scene"
]
- }
- },
- "required": [
- "id",
- "label"
- ]
- },
- "HarnessModelsSource": {
- "type": "string",
- "enum": [
- "discovered",
- "config",
- "merged",
- "static"
- ]
- },
- "HarnessControlCapabilities": {
- "type": "object",
- "properties": {
- "interrupt": {
- "type": "boolean"
- },
- "resume": {
- "type": "boolean"
- },
- "approvals": {
- "type": "boolean"
- }
- },
- "required": [
- "interrupt",
- "resume",
- "approvals"
- ]
- },
- "HarnessObservationCapabilities": {
- "type": "object",
- "properties": {
- "liveStream": {
- "type": "boolean"
- },
- "listSessions": {
- "type": "boolean"
},
- "drive": {
- "type": [
- "boolean",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "webPanel"
+ },
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "entry": {
+ "type": "string"
+ },
+ "height": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint32",
+ "minimum": 0
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "entry"
]
}
- },
- "required": [
- "liveStream",
- "listSessions"
]
},
- "HarnessSessionList": {
+ "ViewTab": {
"type": "object",
"properties": {
- "sessions": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
+ },
+ "title": {
+ "type": "string"
+ },
+ "badge": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "blocks": {
"type": "array",
"items": {
- "$ref": "#/$defs/HarnessSessionSummary"
+ "$ref": "#/$defs/ViewBlock"
}
}
},
+ "additionalProperties": false,
"required": [
- "sessions"
+ "id",
+ "title",
+ "blocks"
]
},
- "HarnessOffering": {
+ "ViewProperty": {
"type": "object",
"properties": {
- "harnessId": {
- "$ref": "#/$defs/HarnessId"
- },
- "chat": {
- "type": "boolean"
+ "label": {
+ "type": "string"
},
- "capabilities": {
- "$ref": "#/$defs/HarnessCapabilities"
+ "value": {
+ "$ref": "#/$defs/ViewInline"
}
},
+ "additionalProperties": false,
"required": [
- "harnessId",
- "chat",
- "capabilities"
+ "label",
+ "value"
]
},
- "HarnessOfferingList": {
- "type": "object",
- "properties": {
- "harnesses": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/HarnessOffering"
- }
+ "ViewInline": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTone"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "icon": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "monospace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "badge"
+ },
+ "text": {
+ "type": "string"
+ },
+ "tone": {
+ "$ref": "#/$defs/ViewTone"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "text",
+ "tone"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "time"
+ },
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewTimeStyle"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "at"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "duration"
+ },
+ "ms": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "ms"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "bytes"
+ },
+ "value": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "value"
+ ]
}
- },
- "required": [
- "harnesses"
]
},
- "HarnessCode": {
+ "ViewTimeStyle": {
"type": "string",
"enum": [
- "invalid_session_id",
- "bad_request",
- "session_id_collision",
- "turn_in_flight",
- "capability_unsupported",
- "unknown_approval",
- "unknown_prompt"
+ "relative",
+ "absolute"
]
},
- "HarnessStoreSession": {
+ "ViewListItem": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "command": {
- "$ref": "#/$defs/RosterCommand"
- },
"title": {
"type": "string"
},
- "updatedAt": {
- "type": "integer",
- "format": "int64"
- },
- "parentSessionId": {
+ "subtitle": {
"type": [
"string",
"null"
]
},
- "agentName": {
+ "icon": {
"type": [
"string",
"null"
]
},
- "model": {
- "type": [
- "string",
- "null"
- ]
+ "trailing": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewInline"
+ }
},
- "taskId": {
- "type": [
- "string",
- "null"
+ "action": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAction"
+ },
+ {
+ "type": "null"
+ }
]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
}
},
+ "additionalProperties": false,
"required": [
"id",
- "command",
- "title",
- "updatedAt"
+ "title"
]
},
- "HarnessStoreSessionList": {
+ "ViewEmpty": {
"type": "object",
"properties": {
- "sessions": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/HarnessStoreSession"
- }
+ "title": {
+ "type": "string"
+ },
+ "text": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "button": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewButton"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
+ "additionalProperties": false,
"required": [
- "sessions"
- ]
- },
- "TaskExecutorKind": {
- "type": "string",
- "enum": [
- "chat-loop",
- "harness-session",
- "mesh"
- ]
- },
- "TaskVerdict": {
- "type": "string",
- "enum": [
- "completed",
- "failed",
- "killed",
- "timeout",
- "budget-exceeded"
- ]
- },
- "ContextRefKind": {
- "type": "string",
- "enum": [
- "conversation",
- "message",
- "task",
- "file",
- "url",
- "wiki"
+ "title"
]
},
- "ContextRef": {
+ "ViewColumn": {
"type": "object",
"properties": {
- "kind": {
- "$ref": "#/$defs/ContextRefKind"
- },
- "ref": {
+ "title": {
"type": "string"
},
- "note": {
- "type": [
- "string",
- "null"
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAlign"
+ },
+ {
+ "type": "null"
+ }
]
+ },
+ "sortable": {
+ "type": "boolean"
}
},
+ "additionalProperties": false,
"required": [
- "kind",
- "ref"
+ "title"
]
},
- "CriterionKind": {
+ "ViewAlign": {
"type": "string",
"enum": [
- "manual",
- "automated"
+ "start",
+ "center",
+ "end"
]
},
- "AcceptanceCriterion": {
+ "ViewRow": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "description": {
- "type": "string"
- },
- "kind": {
- "$ref": "#/$defs/CriterionKind"
+ "cells": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewInline"
+ }
},
- "check": {
- "type": [
- "string",
- "null"
+ "action": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAction"
+ },
+ {
+ "type": "null"
+ }
]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewButton"
+ }
}
},
+ "additionalProperties": false,
"required": [
"id",
- "description",
- "kind"
+ "cells"
]
},
- "TaskBudget": {
- "type": "object",
- "properties": {
- "maxUsd": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "maxTokens": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- },
- "maxTurns": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint32",
- "minimum": 0
- },
- "maxWallClockMs": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint64",
- "minimum": 0
- }
- }
- },
- "TaskUsage": {
+ "ViewCrumb": {
"type": "object",
"properties": {
- "inputTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "outputTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "totalTokens": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
- },
- "costUsd": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "turns": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "label": {
+ "type": "string"
},
- "wallClockMs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0
+ "action": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAction"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
+ "additionalProperties": false,
"required": [
- "inputTokens",
- "outputTokens",
- "totalTokens",
- "turns",
- "wallClockMs"
- ]
- },
- "Effort": {
- "type": "string",
- "enum": [
- "low",
- "medium",
- "high"
- ]
- },
- "TaskIsolation": {
- "type": "string",
- "enum": [
- "inherit",
- "isolated"
- ]
- },
- "TaskPromptMode": {
- "type": "string",
- "enum": [
- "task",
- "heartbeat"
+ "label"
]
},
- "TaskSpec": {
+ "CanvasScene": {
"type": "object",
"properties": {
- "delegation": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "meshFrom": {
- "type": [
- "string",
- "null"
- ]
- },
- "taskId": {
- "type": "string"
- },
- "agentId": {
- "type": "string"
- },
- "goal": {
- "type": "string"
- },
- "resolvedContext": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/ContextRef"
- }
- },
- "acceptanceCriteria": {
+ "items": {
"type": "array",
"items": {
- "$ref": "#/$defs/AcceptanceCriterion"
+ "$ref": "#/$defs/CanvasItem"
}
},
- "budget": {
- "$ref": "#/$defs/TaskBudget",
- "default": {}
+ "grid": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CanvasGrid"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "tools": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
+ "viewport": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CanvasViewport"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "items"
+ ]
+ },
+ "CanvasItem": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "node"
+ },
+ "id": {
+ "type": "string"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "width": {
+ "type": "number",
+ "format": "double"
+ },
+ "height": {
+ "type": "number",
+ "format": "double"
+ },
+ "shapes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasShape"
+ }
+ },
+ "anchors": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasAnchor"
+ }
+ },
+ "tooltip": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasMenuItem"
+ }
+ },
+ "locked": {
+ "type": "boolean"
+ },
+ "decorative": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "x",
+ "y",
+ "width",
+ "height",
+ "shapes"
+ ]
},
- "workingDir": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "connector"
+ },
+ "id": {
+ "type": "string"
+ },
+ "from": {
+ "$ref": "#/$defs/CanvasEnd"
+ },
+ "to": {
+ "$ref": "#/$defs/CanvasEnd"
+ },
+ "route": {
+ "$ref": "#/$defs/CanvasRoute"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "dashed": {
+ "type": "boolean"
+ },
+ "arrow": {
+ "$ref": "#/$defs/CanvasArrow"
+ },
+ "label": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tooltip": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "menu": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasMenuItem"
+ }
+ },
+ "decorative": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "id",
+ "from",
+ "to",
+ "route",
+ "arrow"
]
- },
- "model": {
- "type": [
- "string",
- "null"
+ }
+ ]
+ },
+ "CanvasShape": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "rect"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "width": {
+ "type": "number",
+ "format": "double"
+ },
+ "height": {
+ "type": "number",
+ "format": "double"
+ },
+ "radius": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "width",
+ "height"
]
},
- "effort": {
- "anyOf": [
- {
- "$ref": "#/$defs/Effort"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ellipse"
},
- {
- "type": "null"
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "width": {
+ "type": "number",
+ "format": "double"
+ },
+ "height": {
+ "type": "number",
+ "format": "double"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "width",
+ "height"
]
},
- "systemPromptAppend": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "text"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "text": {
+ "type": "string"
+ },
+ "size": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "weight": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CanvasWeight"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewAlign"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "maxWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "monospace": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "text"
]
},
- "isolation": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskIsolation"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "path"
},
- {
- "type": "null"
+ "d": {
+ "type": "string"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "dashed": {
+ "type": "boolean"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "d"
]
},
- "promptMode": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskPromptMode"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "icon"
},
- {
- "type": "null"
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ },
+ "name": {
+ "type": "string"
+ },
+ "size": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "format": "double"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ColorRole"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "x",
+ "y",
+ "name"
]
+ }
+ ]
+ },
+ "ColorRole": {
+ "type": "string",
+ "enum": [
+ "surface",
+ "surfaceContainer",
+ "surfaceContainerHigh",
+ "primary",
+ "primaryContainer",
+ "onPrimary",
+ "onPrimaryContainer",
+ "secondaryContainer",
+ "onSurface",
+ "onSurfaceVariant",
+ "outline",
+ "outlineVariant",
+ "info",
+ "success",
+ "warning",
+ "danger",
+ "category1",
+ "category2",
+ "category3",
+ "category4",
+ "category5",
+ "category6"
+ ]
+ },
+ "CanvasWeight": {
+ "type": "string",
+ "enum": [
+ "regular",
+ "medium",
+ "bold"
+ ]
+ },
+ "CanvasAnchor": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "excludeTools": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
+ "x": {
+ "type": "number",
+ "format": "double"
},
- "resumeMessage": {
- "type": [
- "string",
- "null"
- ]
+ "y": {
+ "type": "number",
+ "format": "double"
},
- "session": {
- "type": "string"
+ "side": {
+ "$ref": "#/$defs/CanvasSide"
},
- "permissionDecisions": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/TaskPermissionDecision"
- }
+ "direction": {
+ "$ref": "#/$defs/CanvasDirection"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "x",
+ "y",
+ "side",
+ "direction"
+ ]
+ },
+ "CanvasSide": {
+ "type": "string",
+ "enum": [
+ "top",
+ "right",
+ "bottom",
+ "left"
+ ]
+ },
+ "CanvasDirection": {
+ "type": "string",
+ "enum": [
+ "in",
+ "out",
+ "both"
+ ]
+ },
+ "CanvasMenuItem": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "presetId": {
- "type": [
- "string",
- "null"
- ]
+ "label": {
+ "type": "string"
},
- "presetName": {
+ "icon": {
"type": [
"string",
"null"
]
},
- "auditOnly": {
- "type": [
- "boolean",
- "null"
- ]
+ "danger": {
+ "type": "boolean"
}
},
+ "additionalProperties": false,
"required": [
- "taskId",
- "agentId",
- "goal",
- "resolvedContext",
- "acceptanceCriteria",
- "budget",
- "session"
- ],
- "additionalProperties": true
+ "id",
+ "label"
+ ]
},
- "TaskPermissionDecision": {
+ "CanvasEnd": {
"type": "object",
"properties": {
- "requestId": {
- "type": "string"
- },
- "tool": {
+ "node": {
"type": "string"
},
- "decision": {
- "$ref": "#/$defs/TaskPermissionOutcome"
- },
- "at": {
- "type": "integer",
- "format": "int64"
- },
- "message": {
+ "anchor": {
"type": [
"string",
"null"
]
}
},
+ "additionalProperties": false,
"required": [
- "requestId",
- "tool",
- "decision",
- "at"
+ "node"
]
},
- "TaskPermissionOutcome": {
+ "CanvasRoute": {
"type": "string",
"enum": [
- "allow",
- "deny",
- "timeout"
+ "straight",
+ "curved",
+ "orthogonal"
]
},
- "ArtifactKind": {
+ "CanvasArrow": {
"type": "string",
"enum": [
- "file",
- "url",
- "commit",
- "message"
+ "none",
+ "end",
+ "start",
+ "both"
]
},
- "TaskArtifact": {
+ "CanvasGrid": {
"type": "object",
"properties": {
- "kind": {
- "$ref": "#/$defs/ArtifactKind"
- },
- "ref": {
- "type": "string"
+ "size": {
+ "type": "number",
+ "format": "double"
},
- "note": {
- "type": [
- "string",
- "null"
- ]
+ "snap": {
+ "type": "boolean"
}
},
+ "additionalProperties": false,
"required": [
- "kind",
- "ref"
+ "size"
]
},
- "CriterionReport": {
+ "CanvasViewport": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
+ "x": {
+ "type": "number",
+ "format": "double"
},
- "met": {
- "type": "boolean"
+ "y": {
+ "type": "number",
+ "format": "double"
},
- "evidence": {
- "type": "string",
- "default": ""
+ "zoom": {
+ "type": "number",
+ "format": "double"
}
},
+ "additionalProperties": false,
"required": [
- "id",
- "met",
- "evidence"
+ "x",
+ "y",
+ "zoom"
]
},
- "TaskResult": {
+ "ViewRequest": {
"type": "object",
"properties": {
- "verdict": {
- "$ref": "#/$defs/TaskVerdict"
- },
- "summary": {
- "type": "string"
- },
- "output": {
- "type": [
- "string",
- "null"
- ]
- },
- "artifacts": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/TaskArtifact"
- }
- },
- "criteriaSelfReport": {
+ "params": {
"type": [
- "array",
+ "object",
"null"
],
- "items": {
- "$ref": "#/$defs/CriterionReport"
- }
- },
- "usage": {
- "$ref": "#/$defs/TaskUsage"
+ "additionalProperties": true
},
- "error": {
- "type": [
- "string",
- "null"
- ]
+ "context": {
+ "$ref": "#/$defs/ViewContext",
+ "default": {}
}
},
+ "additionalProperties": false,
"required": [
- "verdict",
- "summary",
- "artifacts",
- "usage"
- ]
- },
- "EvalVerdict": {
- "type": "string",
- "enum": [
- "verified",
- "refuted",
- "escalated"
+ "context"
]
},
- "EvalOutcome": {
+ "ViewContext": {
"type": "object",
"properties": {
- "verdict": {
- "$ref": "#/$defs/EvalVerdict"
- },
- "attempts": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "verifierTaskIds": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "criteriaReport": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/CriterionReport"
- }
- },
- "diverged": {
- "type": "boolean"
- },
- "escalatedAt": {
+ "topicId": {
"type": [
"string",
"null"
- ],
- "format": "date-time"
+ ]
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
- "required": [
- "verdict",
- "attempts",
- "verifierTaskIds",
- "criteriaReport",
- "diverged"
- ]
+ "additionalProperties": false
},
- "ExecutorTurnCapabilities": {
+ "ViewActionRequest": {
"type": "object",
"properties": {
- "steerable": {
- "type": "boolean"
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
},
- "multiTurn": {
- "type": "boolean"
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
},
- "structuredStream": {
- "type": "boolean"
+ "context": {
+ "$ref": "#/$defs/ViewContext",
+ "default": {}
}
},
+ "additionalProperties": false,
"required": [
- "steerable",
- "multiTurn",
- "structuredStream"
+ "context"
]
},
- "ExecutorResultCapabilities": {
+ "ViewActionResult": {
"type": "object",
"properties": {
- "usageInResult": {
- "type": "boolean"
- },
- "sessionIdCapture": {
- "type": "boolean"
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewAction"
+ },
+ "default": []
}
},
+ "additionalProperties": false,
"required": [
- "usageInResult",
- "sessionIdCapture"
+ "actions"
]
},
- "ExecutorInteractionCapabilities": {
+ "ViewActionRefusal": {
"type": "object",
"properties": {
- "slashCommands": {
- "type": "boolean"
+ "message": {
+ "type": "string"
},
- "effortSelection": {
- "type": "boolean"
+ "fields": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
}
},
+ "additionalProperties": false,
"required": [
- "slashCommands",
- "effortSelection"
+ "message"
]
},
- "TaskApprovalRequest": {
+ "CanvasEventRequest": {
"type": "object",
"properties": {
- "taskId": {
- "type": "string"
- },
- "requestId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "input": {
- "type": "object",
- "additionalProperties": true
+ "event": {
+ "$ref": "#/$defs/CanvasEvent"
},
- "toolCallId": {
+ "params": {
"type": [
- "string",
+ "object",
"null"
- ]
+ ],
+ "additionalProperties": true
+ },
+ "context": {
+ "$ref": "#/$defs/ViewContext",
+ "default": {}
}
},
+ "additionalProperties": false,
"required": [
- "taskId",
- "requestId",
- "name",
- "input"
+ "event",
+ "context"
]
},
- "TaskEvent": {
+ "CanvasEvent": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "den"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
+ "const": "selected"
},
- "event": {
- "$ref": "#/$defs/AgentEvent"
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "event"
+ "items"
]
},
{
@@ -11314,22 +16212,19 @@
"properties": {
"type": {
"type": "string",
- "const": "turn.start"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
+ "const": "moved"
},
- "turn": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasPosition"
+ }
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "turn"
+ "items"
]
},
{
@@ -11337,36 +16232,20 @@
"properties": {
"type": {
"type": "string",
- "const": "turn.end"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
- },
- "turn": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "const": "connected"
},
- "usage": {
- "$ref": "#/$defs/TaskUsage"
+ "from": {
+ "$ref": "#/$defs/CanvasEnd"
},
- "harnessSessionId": {
- "anyOf": [
- {
- "$ref": "#/$defs/SessionId"
- },
- {
- "type": "null"
- }
- ]
+ "to": {
+ "$ref": "#/$defs/CanvasEnd"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "turn",
- "usage"
+ "from",
+ "to"
]
},
{
@@ -11374,26 +16253,36 @@
"properties": {
"type": {
"type": "string",
- "const": "session.spawned"
+ "const": "deleted"
},
- "ts": {
- "type": "integer",
- "format": "int64"
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "items"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "activated"
},
- "nativeSessionId": {
+ "item": {
"type": "string"
- },
- "model": {
- "type": [
- "string",
- "null"
- ]
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "nativeSessionId"
+ "item"
]
},
{
@@ -11401,91 +16290,322 @@
"properties": {
"type": {
"type": "string",
- "const": "cost"
+ "const": "menu"
},
- "ts": {
- "type": "integer",
- "format": "int64"
+ "item": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "choice": {
+ "type": "string"
},
- "deltaUsd": {
+ "x": {
"type": "number",
"format": "double"
},
- "totalUsd": {
+ "y": {
"type": "number",
"format": "double"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "deltaUsd",
- "totalUsd"
+ "choice",
+ "x",
+ "y"
]
+ }
+ ]
+ },
+ "CanvasPosition": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "x": {
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "x",
+ "y"
+ ]
+ },
+ "CanvasResponse": {
+ "type": "object",
+ "properties": {
+ "ops": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/CanvasOp"
+ },
+ "default": []
},
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ViewAction"
+ },
+ "default": []
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "ops",
+ "actions"
+ ]
+ },
+ "CanvasOp": {
+ "oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "log"
+ "const": "upsert"
},
- "ts": {
- "type": "integer",
- "format": "int64"
+ "item": {
+ "$ref": "#/$defs/CanvasItem"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "item"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "remove"
},
- "level": {
- "$ref": "#/$defs/LogLevel"
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "ids"
+ ]
+ }
+ ]
+ },
+ "PanelTheme": {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "$ref": "#/$defs/PanelScheme"
+ },
+ "colors": {
+ "type": "object",
+ "properties": {
+ "category1": {
+ "type": "string"
},
- "message": {
+ "category2": {
+ "type": "string"
+ },
+ "category3": {
+ "type": "string"
+ },
+ "category4": {
+ "type": "string"
+ },
+ "category5": {
+ "type": "string"
+ },
+ "category6": {
+ "type": "string"
+ },
+ "danger": {
+ "type": "string"
+ },
+ "info": {
+ "type": "string"
+ },
+ "onPrimary": {
+ "type": "string"
+ },
+ "onPrimaryContainer": {
+ "type": "string"
+ },
+ "onSurface": {
+ "type": "string"
+ },
+ "onSurfaceVariant": {
+ "type": "string"
+ },
+ "outline": {
+ "type": "string"
+ },
+ "outlineVariant": {
+ "type": "string"
+ },
+ "primary": {
+ "type": "string"
+ },
+ "primaryContainer": {
+ "type": "string"
+ },
+ "secondaryContainer": {
+ "type": "string"
+ },
+ "success": {
+ "type": "string"
+ },
+ "surface": {
+ "type": "string"
+ },
+ "surfaceContainer": {
+ "type": "string"
+ },
+ "surfaceContainerHigh": {
+ "type": "string"
+ },
+ "warning": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "fontFamily": {
+ "type": "string"
+ },
+ "fontMono": {
+ "type": "string"
+ },
+ "fontSize": {
+ "type": "number",
+ "format": "double"
+ },
+ "radius": {
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scheme",
+ "colors",
+ "fontFamily",
+ "fontMono",
+ "fontSize",
+ "radius"
+ ]
+ },
+ "PanelScheme": {
+ "type": "string",
+ "enum": [
+ "light",
+ "dark"
+ ]
+ },
+ "PanelHostMessage": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "init"
+ },
+ "theme": {
+ "$ref": "#/$defs/PanelTheme"
+ },
+ "params": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": true
+ },
+ "context": {
+ "$ref": "#/$defs/ViewContext"
+ },
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "node": {
"type": "string"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "level",
- "message"
+ "theme",
+ "context",
+ "plugin",
+ "node"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "theme"
+ },
+ "theme": {
+ "$ref": "#/$defs/PanelTheme"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "theme"
]
+ }
+ ]
+ },
+ "PanelMessage": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ready"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "approval-request"
+ "const": "resize"
},
- "ts": {
+ "height": {
"type": "integer",
- "format": "int64"
- },
- "taskId": {
- "type": "string"
- },
- "requestId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "input": {
- "type": "object",
- "additionalProperties": true
- },
- "toolCallId": {
- "type": [
- "string",
- "null"
- ]
+ "format": "uint32",
+ "minimum": 0
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "taskId",
- "requestId",
- "name",
- "input"
+ "height"
]
},
{
@@ -11493,393 +16613,636 @@
"properties": {
"type": {
"type": "string",
- "const": "approval-resolved"
- },
- "ts": {
- "type": "integer",
- "format": "int64"
- },
- "taskId": {
- "type": "string"
- },
- "requestId": {
- "type": "string"
+ "const": "action"
},
- "decision": {
- "$ref": "#/$defs/TaskPermissionOutcome"
+ "action": {
+ "$ref": "#/$defs/ViewAction"
}
},
+ "additionalProperties": false,
"required": [
"type",
- "ts",
- "taskId",
- "requestId",
- "decision"
+ "action"
]
}
]
},
- "LogLevel": {
- "type": "string",
- "enum": [
- "debug",
- "info",
- "warn",
- "error"
+ "PluginList": {
+ "type": "object",
+ "properties": {
+ "node": {
+ "type": "string"
+ },
+ "plugins": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginRecord"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "node",
+ "plugins"
]
},
- "TaskWire": {
+ "PluginRecord": {
"type": "object",
"properties": {
"id": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "node": {
"type": "string"
},
- "goal": {
+ "path": {
"type": "string"
},
- "contextRefs": {
+ "manifest": {
+ "$ref": "#/$defs/PluginManifest"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "state": {
+ "$ref": "#/$defs/PluginState"
+ },
+ "granted": {
"type": "array",
"items": {
- "$ref": "#/$defs/ContextRef"
+ "$ref": "#/$defs/Permission"
}
},
- "acceptanceCriteria": {
+ "pending": {
"type": "array",
"items": {
- "$ref": "#/$defs/AcceptanceCriterion"
+ "$ref": "#/$defs/Permission"
}
},
- "spec": {
- "$ref": "#/$defs/TaskSpec"
- },
- "executor": {
- "$ref": "#/$defs/TaskExecutorKind"
- },
- "executorTarget": {
+ "error": {
"type": [
"string",
"null"
]
},
- "agentId": {
- "type": "string"
- },
- "requestedBy": {
- "type": [
- "string",
- "null"
+ "lastExit": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/PluginExit"
+ },
+ {
+ "type": "null"
+ }
]
},
- "origin": {
- "type": "string"
+ "restarts": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
},
- "parentTaskId": {
+ "startedAt": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
},
- "chainDepth": {
+ "installedAt": {
"type": "integer",
- "format": "uint32",
- "minimum": 0
+ "format": "int64"
},
- "nodeAffinity": {
+ "jobs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginJobStatus"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "node",
+ "path",
+ "manifest",
+ "enabled",
+ "state",
+ "granted",
+ "pending",
+ "restarts",
+ "installedAt",
+ "jobs"
+ ]
+ },
+ "PluginState": {
+ "type": "string",
+ "enum": [
+ "disabled",
+ "awaitingApproval",
+ "starting",
+ "running",
+ "backoff",
+ "invalid"
+ ]
+ },
+ "PluginExit": {
+ "type": "object",
+ "properties": {
+ "at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "code": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int32"
},
- "claimedBy": {
+ "signal": {
"type": [
"string",
"null"
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "at"
+ ]
+ },
+ "PluginJobStatus": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/$defs/RouteName"
},
- "budget": {
- "$ref": "#/$defs/TaskBudget"
- },
- "usage": {
+ "lastRun": {
"anyOf": [
{
- "$ref": "#/$defs/TaskUsage"
+ "$ref": "#/$defs/PluginJobRun"
},
{
"type": "null"
}
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ]
+ },
+ "PluginJobRun": {
+ "type": "object",
+ "properties": {
+ "runId": {
+ "type": "string"
},
- "status": {
- "$ref": "#/$defs/TaskStatus"
- },
- "attempt": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0
+ "trigger": {
+ "$ref": "#/$defs/PluginJobTrigger"
},
- "maxAttempts": {
+ "startedAt": {
"type": "integer",
- "format": "uint32",
- "minimum": 0
- },
- "pendingMessage": {
- "type": [
- "string",
- "null"
- ]
+ "format": "int64"
},
- "error": {
+ "finishedAt": {
"type": [
- "string",
+ "integer",
"null"
- ]
+ ],
+ "format": "int64"
},
- "result": {
+ "outcome": {
"anyOf": [
{
- "$ref": "#/$defs/TaskResult"
+ "$ref": "#/$defs/PluginJobOutcome"
},
{
"type": "null"
}
]
},
- "conversationId": {
+ "message": {
"type": [
"string",
"null"
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "runId",
+ "trigger",
+ "startedAt"
+ ]
+ },
+ "PluginJobTrigger": {
+ "type": "string",
+ "enum": [
+ "schedule",
+ "manual"
+ ]
+ },
+ "PluginJobOutcome": {
+ "type": "string",
+ "enum": [
+ "succeeded",
+ "failed"
+ ]
+ },
+ "PluginInstallRequest": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "path"
+ ]
+ },
+ "PluginEnableRequest": {
+ "type": "object",
+ "properties": {
+ "approve": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Permission"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "PluginLogs": {
+ "type": "object",
+ "properties": {
+ "lines": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginLogLine"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "lines"
+ ]
+ },
+ "PluginLogLine": {
+ "type": "object",
+ "properties": {
+ "at": {
+ "type": "integer",
+ "format": "int64"
},
- "sessionKey": {
- "type": [
- "string",
- "null"
- ]
+ "stream": {
+ "$ref": "#/$defs/PluginLogStream"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "at",
+ "stream",
+ "text"
+ ]
+ },
+ "PluginLogStream": {
+ "type": "string",
+ "enum": [
+ "stdout",
+ "stderr",
+ "host"
+ ]
+ },
+ "PluginSettings": {
+ "type": "object",
+ "properties": {
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
},
- "harnessSessionIds": {
+ "secretsSet": {
"type": "array",
"items": {
"type": "string"
}
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "values"
+ ]
+ },
+ "PluginSettingsUpdate": {
+ "type": "object",
+ "properties": {
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ViewValue"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "values"
+ ]
+ },
+ "PluginToolList": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer",
+ "format": "uint64",
+ "minimum": 0
},
- "eval": {
- "anyOf": [
- {
- "$ref": "#/$defs/EvalOutcome"
- },
- {
- "type": "null"
- }
- ]
+ "tools": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PluginToolEntry"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "version",
+ "tools"
+ ]
+ },
+ "PluginToolEntry": {
+ "type": "object",
+ "properties": {
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
},
- "evalAttempt": {
+ "tool": {
+ "$ref": "#/$defs/PluginTool"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "plugin",
+ "tool"
+ ]
+ },
+ "PluginEventDelivery": {
+ "type": "object",
+ "properties": {
+ "seq": {
"type": "integer",
- "format": "uint32",
+ "format": "uint64",
"minimum": 0
},
- "createdAt": {
+ "at": {
"type": "integer",
"format": "int64"
},
- "startedAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "lastHeartbeatAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "completedAt": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int64"
- },
- "durationMs": {
- "type": [
- "integer",
- "null"
- ],
+ "missed": {
+ "type": "integer",
"format": "uint64",
"minimum": 0
},
- "pendingApprovals": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/TaskApprovalRequest"
- }
+ "event": {
+ "$ref": "#/$defs/PluginEvent"
}
},
+ "additionalProperties": false,
"required": [
- "id",
- "goal",
- "contextRefs",
- "acceptanceCriteria",
- "spec",
- "executor",
- "agentId",
- "origin",
- "chainDepth",
- "budget",
- "status",
- "attempt",
- "maxAttempts",
- "harnessSessionIds",
- "evalAttempt",
- "createdAt"
+ "seq",
+ "at",
+ "missed",
+ "event"
]
},
- "TaskCreateRequest": {
- "type": "object",
- "properties": {
- "goal": {
- "type": "string"
- },
- "agentId": {
- "type": "string"
- },
- "executor": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskExecutorKind"
+ "PluginEvent": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.started"
},
- {
- "type": "null"
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "topicId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
]
},
- "executorTarget": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.idle"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
]
},
- "requestedBy": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.ended"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId"
]
},
- "parentTaskId": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "session.placed"
+ },
+ "sessionId": {
+ "$ref": "#/$defs/SessionId"
+ },
+ "topicId": {
+ "type": "string"
+ },
+ "by": {
+ "$ref": "#/$defs/PlacedBy"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "sessionId",
+ "topicId",
+ "by"
]
},
- "chainDepth": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint32",
- "minimum": 0
- },
- "nodeAffinity": {
- "type": [
- "string",
- "null"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "summary.written"
+ },
+ "summaryId": {
+ "type": "string"
+ },
+ "sessionId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "kind": {
+ "$ref": "#/$defs/SummaryKind"
+ },
+ "level": {
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "summaryId",
+ "kind",
+ "level"
]
},
- "spec": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskSpec"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "task.done"
},
- {
- "type": "null"
+ "taskId": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/$defs/TaskStatus"
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "taskId",
+ "status"
]
},
- "budget": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskBudget"
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "settings.changed"
},
- {
- "type": "null"
+ "values": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
}
+ },
+ "additionalProperties": false,
+ "required": [
+ "type",
+ "values"
]
- },
- "contextRefs": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/ContextRef"
- }
- },
- "acceptanceCriteria": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/AcceptanceCriterion"
- }
- }
- },
- "required": [
- "goal",
- "agentId"
- ]
- },
- "TaskResponse": {
- "type": "object",
- "properties": {
- "task": {
- "$ref": "#/$defs/TaskWire"
}
- },
- "required": [
- "task"
]
},
- "TasksListResponse": {
+ "PluginJobRequest": {
"type": "object",
"properties": {
- "tasks": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/TaskWire"
- }
+ "runId": {
+ "type": "string"
+ },
+ "trigger": {
+ "$ref": "#/$defs/PluginJobTrigger"
+ },
+ "scheduledAt": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64"
}
},
+ "additionalProperties": false,
"required": [
- "tasks"
+ "runId",
+ "trigger"
]
},
- "TaskSteerAccepted": {
+ "PluginJobResult": {
"type": "object",
"properties": {
- "ok": {
- "type": "boolean"
+ "outcome": {
+ "$ref": "#/$defs/PluginJobOutcome"
+ },
+ "message": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
+ "additionalProperties": false,
"required": [
- "ok"
+ "outcome"
]
},
- "TaskKillResponse": {
+ "PluginToolCall": {
"type": "object",
"properties": {
- "ok": {
- "type": "boolean"
+ "arguments": {
+ "type": "object",
+ "additionalProperties": true
},
- "prior": {
+ "sessionId": {
"anyOf": [
{
- "$ref": "#/$defs/TaskStatus"
+ "$ref": "#/$defs/SessionId"
},
{
"type": "null"
@@ -11887,216 +17250,165 @@
]
}
},
+ "additionalProperties": false,
"required": [
- "ok"
+ "arguments"
]
},
- "TaskApprovalAccepted": {
+ "PluginToolResult": {
"type": "object",
"properties": {
- "ok": {
+ "text": {
+ "type": "string"
+ },
+ "isError": {
"type": "boolean"
}
},
+ "additionalProperties": false,
"required": [
- "ok"
+ "text"
]
},
- "TaskApprovalWaitResponse": {
+ "PluginSelf": {
"type": "object",
"properties": {
- "approval": {
- "$ref": "#/$defs/TaskApprovalRequest"
+ "id": {
+ "$ref": "#/$defs/PluginId"
+ },
+ "node": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "permissions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Permission"
+ }
+ },
+ "settings": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/ViewValue"
+ }
+ },
+ "dataDir": {
+ "type": "string"
}
},
+ "additionalProperties": false,
"required": [
- "approval"
+ "id",
+ "node",
+ "version",
+ "permissions",
+ "settings",
+ "dataDir"
]
},
- "TaskWaitTimeoutResponse": {
+ "PluginViewsChanged": {
"type": "object",
"properties": {
- "error": {
- "type": "string"
- },
- "task": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskWire"
- },
- {
- "type": "null"
- }
- ]
+ "views": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/RouteName"
+ }
}
},
+ "additionalProperties": false,
"required": [
- "error"
+ "views"
]
},
- "TaskOverrides": {
+ "PluginNotify": {
"type": "object",
"properties": {
- "delegation": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "meshFrom": {
- "type": [
- "string",
- "null"
- ]
- },
- "presetId": {
- "type": [
- "string",
- "null"
- ]
- },
- "presetName": {
- "type": [
- "string",
- "null"
- ]
- },
- "permissionDecisions": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/$defs/TaskPermissionDecision"
- }
- },
- "auditOnly": {
- "type": [
- "boolean",
- "null"
- ]
- },
- "workingDir": {
- "type": [
- "string",
- "null"
- ]
+ "title": {
+ "type": "string"
},
- "model": {
+ "text": {
"type": [
"string",
"null"
]
},
- "effort": {
+ "tone": {
"anyOf": [
{
- "$ref": "#/$defs/Effort"
+ "$ref": "#/$defs/ViewTone"
},
{
"type": "null"
}
]
},
- "systemPromptAppend": {
- "type": [
- "string",
- "null"
- ]
- },
- "isolation": {
+ "action": {
"anyOf": [
{
- "$ref": "#/$defs/TaskIsolation"
+ "$ref": "#/$defs/ViewAction"
},
{
"type": "null"
}
]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "title"
+ ]
+ },
+ "plugin.notification": {
+ "type": "object",
+ "properties": {
+ "plugin": {
+ "$ref": "#/$defs/PluginId"
},
- "promptMode": {
- "anyOf": [
- {
- "$ref": "#/$defs/TaskPromptMode"
- },
- {
- "type": "null"
- }
- ]
+ "node": {
+ "type": "string"
},
- "excludeTools": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- }
+ "title": {
+ "type": "string"
},
- "resumeMessage": {
+ "text": {
"type": [
"string",
"null"
]
- }
- },
- "additionalProperties": true
- },
- "MemorySearchResult": {
- "type": "object",
- "properties": {
- "chunk": {
+ },
+ "tone": {
"anyOf": [
{
- "$ref": "#/$defs/MemoryChunkMatch"
+ "$ref": "#/$defs/ViewTone"
},
{
"type": "null"
}
]
},
- "id": {
- "type": "string"
- },
- "source": {
- "$ref": "#/$defs/MemoryHitSource"
- },
- "content": {
- "type": "string"
- },
- "role": {
+ "action": {
"anyOf": [
{
- "$ref": "#/$defs/Role"
+ "$ref": "#/$defs/ViewAction"
},
{
"type": "null"
}
]
},
- "agent": {
- "type": [
- "string",
- "null"
- ]
- },
- "relevanceScore": {
- "type": "number",
- "format": "double"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
+ "ts": {
+ "type": "integer",
+ "format": "int64"
}
},
"required": [
- "id",
- "source",
- "content",
- "role",
- "agent",
- "relevanceScore",
- "createdAt"
+ "plugin",
+ "node",
+ "title",
+ "ts"
]
}
}
diff --git a/packages/contract/src/accepted.ts b/packages/contract/src/accepted.ts
index 7053204..f2409a0 100644
--- a/packages/contract/src/accepted.ts
+++ b/packages/contract/src/accepted.ts
@@ -1,20 +1,11 @@
-// Generated from philbert440/rivethub-runtime@ba386c48eca72acb93d9a26bafb9abd30a48253f contract/accepted.schema.json by npm run contract. Do not edit.
+// Generated from philbert440/rivethub-runtime@5d5cc2744c01cb9f991b65b74b9a859b1d35f517 contract/accepted.schema.json by npm run contract. Do not edit.
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "HarnessId".
*/
export type HarnessId =
- | "claude-code"
- | "grok-build"
- | "kimi-code"
- | "hermes"
- | "codex"
- | "opencode"
- | "pi"
- | "qwen-code"
- | "cursor"
- | "cowork";
+ "claude-code" | "grok-build" | "kimi-code" | "hermes" | "codex" | "opencode" | "omp" | "dsh" | "cursor" | "cowork";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "KnownHarness".
@@ -25,6 +16,21 @@ export type KnownHarness = string;
* via the `definition` "AgentStoreBackend".
*/
export type AgentStoreBackend = "postgres" | "file";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ThinkingLevel".
+ */
+export type ThinkingLevel = "off" | "low" | "medium" | "high" | "xhigh";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubSessionMode".
+ */
+export type HubSessionMode = "chat" | "terminal";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ProtocolVersion".
+ */
+export type ProtocolVersion = number;
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "SessionId".
@@ -35,11 +41,6 @@ export type SessionId = string;
* via the `definition` "CatalogAgent".
*/
export type CatalogAgent = Preset | CatalogNode;
-/**
- * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "McpInjection".
- */
-export type McpInjection = "flag" | "cwdFile" | "persistentConfig" | "none";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "Activity".
@@ -137,11 +138,6 @@ export type AudioMicClientFrame =
| {
type: "stop";
};
-/**
- * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ProtocolVersion".
- */
-export type ProtocolVersion = number;
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "FileEntryKind".
@@ -179,14 +175,14 @@ export type BrowseWindow = "today" | "yesterday" | "this_morning" | "this_week"
export type MemoryScope = "messages" | "summaries" | "both";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryHitSource".
+ * via the `definition` "Role".
*/
-export type MemoryHitSource = "message" | "summary";
+export type Role = "system" | "user" | "assistant" | "tool";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "Role".
+ * via the `definition` "MemoryHitSource".
*/
-export type Role = "system" | "user" | "assistant" | "tool";
+export type MemoryHitSource = "message" | "summary";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "MemoryFallback".
@@ -235,6 +231,11 @@ export type ContentPart =
}
| MediaFields
| MediaFields1;
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "VectorState".
+ */
+export type VectorState = "embedded" | "pending" | "failed" | "skipped";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "MemoryHealthStatus".
@@ -265,6 +266,21 @@ export type ProjectRule = "git-remote" | "git-root" | "cwd-basename";
* via the `definition` "ProviderRecovery".
*/
export type ProviderRecovery = "retrying" | "permanent";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteError".
+ */
+export type SessionDeleteError = "session is live" | "not found" | "delete failed";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteResult".
+ */
+export type SessionDeleteResult = SessionDeleted | SessionDeleteRefused;
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionTrashReason".
+ */
+export type SessionTrashReason = "empty" | "one-word-reply";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "ContextSource".
@@ -277,9 +293,9 @@ export type ContextSource = "spawn" | "default" | "observed";
export type SessionMessageRole = "user" | "assistant";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ThinkingLevel".
+ * via the `definition` "SteerOutcome".
*/
-export type ThinkingLevel = "off" | "low" | "medium" | "high" | "xhigh";
+export type SteerOutcome = "steered" | "startedNewTurn" | "promptRequired";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "SessionClientKind".
@@ -328,6 +344,11 @@ export type TranscriptToolStatus = "running" | "done" | "error";
* via the `definition` "TranscriptBlock".
*/
export type TranscriptBlock = "thinking" | "text" | "tool_use" | "tool_result";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionPreviewKind".
+ */
+export type SessionPreviewKind = "running" | "asking" | "approval" | "said";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "Millis".
@@ -343,6 +364,32 @@ export type HarnessSessionStatus = "active" | "idle" | "ended" | "error";
* via the `definition` "Transport".
*/
export type Transport = "protocol";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "StartupKind".
+ */
+export type StartupKind = "topic" | "recent" | "relevant";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "StartupSource".
+ */
+export type StartupSource =
+ | {
+ session: SessionId;
+ }
+ | {
+ wiki: WikiSlug;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "WikiSlug".
+ */
+export type WikiSlug = string;
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeliveredVia".
+ */
+export type DeliveredVia = "metaAppend" | "cliFlag" | "none";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "HarnessSocketRefusalCode".
@@ -443,23 +490,107 @@ export type FinishReason = "stop" | "length" | "tool_calls" | "content_filter";
export type ErrorKind = "invalid_request_error" | "server_error";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSlug".
+ * via the `definition` "WikiSourceKind".
*/
-export type WikiSlug = string;
+export type WikiSourceKind = "summary" | "message" | "conversation" | "task" | "leaf" | "extract-wiki" | "user";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSourceKind".
+ * via the `definition` "ProposalState".
*/
-export type WikiSourceKind = "summary" | "message" | "conversation" | "task" | "leaf" | "extract-wiki";
+export type ProposalState = "pending" | "approved" | "rejected";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentEvent".
+ * via the `definition` "Proposer".
*/
-export type AgentEvent = {
- v: ProtocolVersion;
- session: string;
-} & AgentEvent1;
-export type AgentEvent1 =
+export type Proposer = "categorizer" | "backfill";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TidyChange".
+ */
+export type TidyChange =
+ | {
+ kind: "merge";
+ source: string;
+ into: string;
+ }
+ | {
+ kind: "move";
+ topic: string;
+ parent?: string | null;
+ }
+ | {
+ kind: "rename";
+ topic: string;
+ name: string;
+ }
+ | {
+ kind: "close";
+ topic: string;
+ }
+ | {
+ kind: "delete";
+ topic: string;
+ }
+ | {
+ kind: "createTopic";
+ topic: string;
+ name: string;
+ parent?: string | null;
+ aliases?: string[];
+ sessions?: SessionId[];
+ conversations?: string[];
+ }
+ | {
+ kind: "fileInto";
+ topic: string;
+ sessions?: SessionId[];
+ conversations?: string[];
+ }
+ | {
+ kind: "mergePage";
+ page: string;
+ into: string;
+ }
+ | {
+ kind: "removePage";
+ page: string;
+ }
+ | {
+ kind: "addType";
+ topic: string;
+ name: string;
+ parent?: string | null;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopicDirectory".
+ */
+export type TopicDirectory =
+ | {
+ kind: "local";
+ node: string;
+ path: string;
+ }
+ | {
+ kind: "shared";
+ path: string;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopicKind".
+ */
+export type TopicKind = "work" | "type" | "entity";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PlacedBy".
+ */
+export type PlacedBy = "you" | "categorizer";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DecisionStatus".
+ */
+export type DecisionStatus = "active" | "superseded";
+export type AgentEvent =
| {
type: "session.start";
title?: string | null;
@@ -584,9 +715,9 @@ export type AgentEventKind =
};
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionBroadcast".
+ * via the `definition` "ContextUsageSource".
*/
-export type SessionBroadcast = Snapshot | SessionRemoved | AgentEvent;
+export type ContextUsageSource = "harness" | "last-call";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "HookEventName".
@@ -904,17 +1035,17 @@ export type HookConfigKind = "shell" | "http" | "internal";
* via the `definition` "RosterCommand".
*/
export type RosterCommand =
- "claude" | "grok" | "kimi" | "opencode" | "hermes" | "codex" | "pi" | "qwen" | "cursor" | "cowork";
+ "claude" | "grok" | "kimi" | "opencode" | "hermes" | "codex" | "omp" | "dsh" | "cursor" | "cowork";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "ApprovalDecision".
*/
-export type ApprovalDecision = "allow" | "deny" | "allowSession";
+export type ApprovalDecision = "allow" | "deny" | "allow-session";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "ApprovalOutcome".
*/
-export type ApprovalOutcome = "allow" | "deny" | "allowSession" | "external";
+export type ApprovalOutcome = "allow" | "deny" | "allow-session" | "external";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "HarnessStatus".
@@ -957,6 +1088,15 @@ export type HarnessEvent =
};
turnId?: string | null;
}
+ | {
+ type: "tool-update";
+ sessionId: SessionId;
+ toolCallId: string;
+ input: {
+ [k: string]: unknown;
+ };
+ turnId?: string | null;
+ }
| {
type: "tool-result";
sessionId: SessionId;
@@ -990,11 +1130,25 @@ export type HarnessEvent =
summary: HarnessSessionSummary;
supersedes?: SessionId | null;
}
+ | {
+ type: "plan";
+ sessionId: SessionId;
+ entries: PlanEntry[];
+ }
| {
type: "turn-complete";
sessionId: SessionId;
turnId?: string | null;
stopReason?: string | null;
+ usage?: LlmUsage | null;
+ modelMs?: number | null;
+ }
+ | {
+ type: "context";
+ sessionId: SessionId;
+ used: number;
+ window?: number | null;
+ source: ContextUsageSource;
}
| {
type: "error";
@@ -1036,6 +1190,11 @@ export type HarnessEvent =
resolved?: PromptResolution | null;
screen?: PromptScreen | null;
};
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PlanStatus".
+ */
+export type PlanStatus = "pending" | "in_progress" | "completed";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "PromptKind".
@@ -1057,22 +1216,13 @@ export type HarnessCode =
| "turn_in_flight"
| "capability_unsupported"
| "unknown_approval"
- | "unknown_prompt";
-/**
- * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskExecutorKind".
- */
-export type TaskExecutorKind = "chat-loop" | "harness-session" | "mesh";
+ | "unknown_prompt"
+ | "turn_failed";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "TaskVerdict".
*/
export type TaskVerdict = "completed" | "failed" | "killed" | "timeout" | "budget-exceeded";
-/**
- * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ContextRefKind".
- */
-export type ContextRefKind = "conversation" | "message" | "task" | "file" | "url" | "wiki";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
* via the `definition` "CriterionKind".
@@ -1085,2763 +1235,4357 @@ export type CriterionKind = "manual" | "automated";
export type Effort = "low" | "medium" | "high";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskIsolation".
+ * via the `definition` "LogLevel".
*/
-export type TaskIsolation = "inherit" | "isolated";
+export type LogLevel = "debug" | "info" | "warn" | "error";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskPromptMode".
+ * via the `definition` "PluginId".
*/
-export type TaskPromptMode = "task" | "heartbeat";
+export type PluginId = string;
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskPermissionOutcome".
+ * via the `definition` "ToolName".
*/
-export type TaskPermissionOutcome = "allow" | "deny" | "timeout";
+export type ToolName = string;
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ArtifactKind".
+ * via the `definition` "RouteName".
*/
-export type ArtifactKind = "file" | "url" | "commit" | "message";
+export type RouteName = string;
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "EvalVerdict".
+ * via the `definition` "Permission".
*/
-export type EvalVerdict = "verified" | "refuted" | "escalated";
+export type Permission =
+ | "memory.read"
+ | "memory.write"
+ | "sessions.read"
+ | "sessions.control"
+ | "topics.read"
+ | "topics.write"
+ | "tasks.read"
+ | "tasks.delegate"
+ | "agents.read"
+ | "notifications.send"
+ | "host.files.read"
+ | "host.files.write"
+ | "host.network"
+ | "host.exec";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskEvent".
+ * via the `definition` "ViewInput".
*/
-export type TaskEvent =
- | {
- type: "den";
- ts: number;
- event: AgentEvent;
- }
- | {
- type: "turn.start";
- ts: number;
- turn: number;
- }
+export type ViewInput =
| {
- type: "turn.end";
- ts: number;
- turn: number;
- usage: TaskUsage;
- harnessSessionId?: SessionId | null;
+ type: "text";
+ multiline?: boolean;
}
| {
- type: "session.spawned";
- ts: number;
- nativeSessionId: string;
- model?: string | null;
+ type: "secret";
}
| {
- type: "cost";
- ts: number;
- deltaUsd: number;
- totalUsd: number;
+ type: "number";
+ min?: number | null;
+ max?: number | null;
+ step?: number | null;
}
| {
- type: "log";
- ts: number;
- level: LogLevel;
- message: string;
+ type: "toggle";
}
| {
- type: "approval-request";
- ts: number;
- taskId: string;
- requestId: string;
- name: string;
- input: {
- [k: string]: unknown;
- };
- toolCallId?: string | null;
+ type: "select";
+ options: ViewOption[];
+ multiple?: boolean;
}
| {
- type: "approval-resolved";
- ts: number;
- taskId: string;
- requestId: string;
- decision: TaskPermissionOutcome;
+ type: "file";
+ multiple?: boolean;
+ accept?: string[];
};
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "LogLevel".
+ * via the `definition` "ViewValue".
*/
-export type LogLevel = "debug" | "info" | "warn" | "error";
-
-export interface RivetHubContractAcceptedByTheRuntime {
- [k: string]: unknown;
-}
+export type ViewValue = boolean | number | string | string[] | ViewFile[];
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentPreset".
+ * via the `definition` "PluginToolHint".
*/
-export interface AgentPreset {
- id: string;
- name: string;
- color: string;
- harnessId?: HarnessId | null;
- model: string;
- effort: string;
- systemPrompt: string;
- node?: string | null;
- directory?: string | null;
- sharedLink?: boolean | null;
- nodeBaseUrl?: string | null;
- sortOrder?: number | null;
- createdAt: number;
- updatedAt: number;
- [k: string]: unknown;
-}
+export type PluginToolHint = "readOnly" | "destructive" | "idempotent" | "openWorld";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentsFile".
+ * via the `definition` "ViewAction".
*/
-export interface AgentsFile {
- agents: AgentPreset[];
-}
+export type ViewAction =
+ | {
+ type: "call";
+ action: RouteName;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ }
+ | {
+ type: "navigate";
+ view: RouteName;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ replace?: boolean;
+ }
+ | {
+ type: "dialog";
+ view: RouteName;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ }
+ | {
+ type: "back";
+ }
+ | {
+ type: "refresh";
+ }
+ | {
+ type: "toast";
+ text: string;
+ tone?: ViewTone | null;
+ }
+ | {
+ type: "copy";
+ text: string;
+ }
+ | {
+ type: "openSession";
+ sessionId: SessionId;
+ }
+ | {
+ type: "openTopic";
+ topicId: string;
+ }
+ | {
+ type: "openUrl";
+ url: string;
+ }
+ | {
+ type: "download";
+ path: string;
+ filename?: string | null;
+ };
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentPresetCreateRequest".
+ * via the `definition` "ViewTone".
*/
-export interface AgentPresetCreateRequest {
- name?: string;
- color?: string | null;
- harnessId?: KnownHarness | null;
- model?: string | null;
- effort?: string | null;
- systemPrompt?: string | null;
- node?: string | null;
- directory?: string | null;
- sharedLink?: boolean | null;
- nodeBaseUrl?: string | null;
- sortOrder?: number | null;
-}
+export type ViewTone = "neutral" | "info" | "success" | "warning" | "danger";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentPresetUpdate".
+ * via the `definition` "PluginEventKind".
*/
-export interface AgentPresetUpdate {
- name?: string | null;
- color?: string | null;
- harnessId?: KnownHarness | null;
- model?: string | null;
- effort?: string | null;
- systemPrompt?: string | null;
- node?: string | null;
- directory?: string | null;
- sharedLink?: boolean | null;
- nodeBaseUrl?: string | null;
- sortOrder?: number | null;
-}
+export type PluginEventKind =
+ "session.started" | "session.idle" | "session.ended" | "session.placed" | "summary.written" | "task.done";
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentListResponse".
+ * via the `definition` "ViewButtonStyle".
*/
-export interface AgentListResponse {
- agents: AgentPreset[];
- node: string;
+export type ViewButtonStyle = "primary" | "secondary" | "danger";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewBlock".
+ */
+export type ViewBlock =
+ | {
+ type: "section";
+ title?: string | null;
+ subtitle?: string | null;
+ actions?: ViewButton[];
+ blocks: ViewBlock[];
+ collapsed?: boolean | null;
+ }
+ | {
+ type: "split";
+ primary: ViewBlock[];
+ secondary: ViewBlock[];
+ ratio?: number | null;
+ }
+ | {
+ type: "tabs";
+ tabs: ViewTab[];
+ selected?: RouteName | null;
+ }
+ | {
+ type: "text";
+ text: string;
+ tone?: ViewTone | null;
+ monospace?: boolean;
+ }
+ | {
+ type: "markdown";
+ text: string;
+ }
+ | {
+ type: "code";
+ text: string;
+ language?: string | null;
+ follow?: boolean;
+ }
+ | {
+ type: "image";
+ path: string;
+ alt: string;
+ }
+ | {
+ type: "properties";
+ items: ViewProperty[];
+ }
+ | {
+ type: "progress";
+ value?: number | null;
+ label?: string | null;
+ }
+ | {
+ type: "notice";
+ tone: ViewTone;
+ title?: string | null;
+ text: string;
+ actions?: ViewButton[];
+ }
+ | {
+ type: "list";
+ items: ViewListItem[];
+ empty?: ViewEmpty | null;
+ }
+ | {
+ type: "table";
+ columns: ViewColumn[];
+ rows: ViewRow[];
+ empty?: ViewEmpty | null;
+ }
+ | {
+ type: "breadcrumbs";
+ items: ViewCrumb[];
+ }
+ | {
+ type: "actions";
+ buttons: ViewButton[];
+ }
+ | {
+ type: "form";
+ id: RouteName;
+ fields: ViewField[];
+ buttons: ViewButton[];
+ }
+ | {
+ type: "canvas";
+ id: RouteName;
+ scene: CanvasScene;
+ height?: number | null;
+ readOnly?: boolean;
+ menu?: CanvasMenuItem[];
+ }
+ | {
+ type: "webPanel";
+ id: RouteName;
+ entry: string;
+ height?: number | null;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewInline".
+ */
+export type ViewInline =
+ | {
+ type: "text";
+ text: string;
+ tone?: ViewTone | null;
+ icon?: string | null;
+ monospace?: boolean;
+ }
+ | {
+ type: "badge";
+ text: string;
+ tone: ViewTone;
+ }
+ | {
+ type: "time";
+ at: number;
+ style?: ViewTimeStyle | null;
+ }
+ | {
+ type: "duration";
+ ms: number;
+ }
+ | {
+ type: "bytes";
+ value: number;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewTimeStyle".
+ */
+export type ViewTimeStyle = "relative" | "absolute";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewAlign".
+ */
+export type ViewAlign = "start" | "center" | "end";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasItem".
+ */
+export type CanvasItem =
+ | {
+ type: "node";
+ id: string;
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ shapes: CanvasShape[];
+ anchors?: CanvasAnchor[];
+ tooltip?: string | null;
+ menu?: CanvasMenuItem[];
+ locked?: boolean;
+ decorative?: boolean;
+ }
+ | {
+ type: "connector";
+ id: string;
+ from: CanvasEnd;
+ to: CanvasEnd;
+ route: CanvasRoute;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ dashed?: boolean;
+ arrow: CanvasArrow;
+ label?: string | null;
+ tooltip?: string | null;
+ menu?: CanvasMenuItem[];
+ decorative?: boolean;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasShape".
+ */
+export type CanvasShape =
+ | {
+ type: "rect";
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ radius?: number | null;
+ fill?: ColorRole | null;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ }
+ | {
+ type: "ellipse";
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ fill?: ColorRole | null;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ }
+ | {
+ type: "text";
+ x: number;
+ y: number;
+ text: string;
+ size?: number | null;
+ weight?: CanvasWeight | null;
+ color?: ColorRole | null;
+ align?: ViewAlign | null;
+ maxWidth?: number | null;
+ monospace?: boolean;
+ }
+ | {
+ type: "path";
+ d: string;
+ fill?: ColorRole | null;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ dashed?: boolean;
+ }
+ | {
+ type: "icon";
+ x: number;
+ y: number;
+ name: string;
+ size?: number | null;
+ color?: ColorRole | null;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ColorRole".
+ */
+export type ColorRole =
+ | "surface"
+ | "surfaceContainer"
+ | "surfaceContainerHigh"
+ | "primary"
+ | "primaryContainer"
+ | "onPrimary"
+ | "onPrimaryContainer"
+ | "secondaryContainer"
+ | "onSurface"
+ | "onSurfaceVariant"
+ | "outline"
+ | "outlineVariant"
+ | "info"
+ | "success"
+ | "warning"
+ | "danger"
+ | "category1"
+ | "category2"
+ | "category3"
+ | "category4"
+ | "category5"
+ | "category6";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasWeight".
+ */
+export type CanvasWeight = "regular" | "medium" | "bold";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasSide".
+ */
+export type CanvasSide = "top" | "right" | "bottom" | "left";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasDirection".
+ */
+export type CanvasDirection = "in" | "out" | "both";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasRoute".
+ */
+export type CanvasRoute = "straight" | "curved" | "orthogonal";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasArrow".
+ */
+export type CanvasArrow = "none" | "end" | "start" | "both";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasEvent".
+ */
+export type CanvasEvent =
+ | {
+ type: "selected";
+ items: string[];
+ }
+ | {
+ type: "moved";
+ items: CanvasPosition[];
+ }
+ | {
+ type: "connected";
+ from: CanvasEnd;
+ to: CanvasEnd;
+ }
+ | {
+ type: "deleted";
+ items: string[];
+ }
+ | {
+ type: "activated";
+ item: string;
+ }
+ | {
+ type: "menu";
+ item?: string | null;
+ choice: string;
+ x: number;
+ y: number;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasOp".
+ */
+export type CanvasOp =
+ | {
+ type: "upsert";
+ item: CanvasItem;
+ }
+ | {
+ type: "remove";
+ ids: string[];
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelScheme".
+ */
+export type PanelScheme = "light" | "dark";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelHostMessage".
+ */
+export type PanelHostMessage =
+ | {
+ type: "init";
+ theme: PanelTheme;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ context: ViewContext1;
+ plugin: PluginId;
+ node: string;
+ }
+ | {
+ type: "theme";
+ theme: PanelTheme;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelMessage".
+ */
+export type PanelMessage =
+ | {
+ type: "ready";
+ }
+ | {
+ type: "resize";
+ height: number;
+ }
+ | {
+ type: "action";
+ action: ViewAction;
+ };
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginState".
+ */
+export type PluginState = "disabled" | "awaitingApproval" | "starting" | "running" | "backoff" | "invalid";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginJobTrigger".
+ */
+export type PluginJobTrigger = "schedule" | "manual";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginJobOutcome".
+ */
+export type PluginJobOutcome = "succeeded" | "failed";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginLogStream".
+ */
+export type PluginLogStream = "stdout" | "stderr" | "host";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginEvent".
+ */
+export type PluginEvent =
+ | {
+ type: "session.started";
+ sessionId: SessionId;
+ topicId?: string | null;
+ }
+ | {
+ type: "session.idle";
+ sessionId: SessionId;
+ }
+ | {
+ type: "session.ended";
+ sessionId: SessionId;
+ }
+ | {
+ type: "session.placed";
+ sessionId: SessionId;
+ topicId: string;
+ by: PlacedBy;
+ }
+ | {
+ type: "summary.written";
+ summaryId: string;
+ sessionId?: SessionId | null;
+ kind: SummaryKind;
+ level: number;
+ }
+ | {
+ type: "task.done";
+ taskId: string;
+ status: TaskStatus;
+ }
+ | {
+ type: "settings.changed";
+ values: {
+ [k: string]: ViewValue;
+ };
+ };
+
+export interface RivetHubContractAcceptedByTheRuntime {
+ [k: string]: unknown;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentPreset".
+ */
+export interface AgentPreset {
+ id: string;
+ name: string;
+ color: string;
+ harnessId?: HarnessId | null;
+ model: string;
+ effort: string;
+ systemPrompt: string;
+ node?: string | null;
+ directory?: string | null;
+ sharedLink?: boolean | null;
+ nodeBaseUrl?: string | null;
+ sortOrder?: number | null;
+ createdAt: number;
+ updatedAt: number;
+ [k: string]: unknown;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentsFile".
+ */
+export interface AgentsFile {
+ agents: AgentPreset[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentPresetCreateRequest".
+ */
+export interface AgentPresetCreateRequest {
+ name?: string;
+ color?: string | null;
+ harnessId?: KnownHarness | null;
+ model?: string | null;
+ effort?: string | null;
+ systemPrompt?: string | null;
+ node?: string | null;
+ directory?: string | null;
+ sharedLink?: boolean | null;
+ nodeBaseUrl?: string | null;
+ sortOrder?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentPresetUpdate".
+ */
+export interface AgentPresetUpdate {
+ name?: string | null;
+ color?: string | null;
+ harnessId?: KnownHarness | null;
+ model?: string | null;
+ effort?: string | null;
+ systemPrompt?: string | null;
+ node?: string | null;
+ directory?: string | null;
+ sharedLink?: boolean | null;
+ nodeBaseUrl?: string | null;
+ sortOrder?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentListResponse".
+ */
+export interface AgentListResponse {
+ agents: AgentPreset[];
+ node: string;
directoryRoot?: string | null;
sharedDir?: string | null;
backend?: AgentStoreBackend | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentResponse".
+ * via the `definition` "AgentResponse".
+ */
+export interface AgentResponse {
+ agent: AgentPreset;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubProjectDefaults".
+ */
+export interface HubProjectDefaults {
+ agentId?: string | null;
+ model?: string | null;
+ effort?: ThinkingLevel | null;
+ harnessId?: HarnessId | null;
+ node?: string | null;
+ directory?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubProject".
+ */
+export interface HubProject {
+ id: string;
+ name: string;
+ order?: number;
+ createdAt?: number;
+ defaults?: HubProjectDefaults | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubLastSession".
+ */
+export interface HubLastSession {
+ key: string;
+ at: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubState".
+ */
+export interface HubState {
+ projects?: HubProject[];
+ defaultProjectId?: string | null;
+ membership?: {
+ [k: string]: string;
+ };
+ names?: {
+ [k: string]: string;
+ };
+ archived?: string[];
+ pinned?: string[];
+ hidden?: string[];
+ modes?: {
+ [k: string]: HubSessionMode;
+ };
+ lastSession?: HubLastSession | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubStateResponse".
+ */
+export interface HubStateResponse {
+ version: number;
+ state: HubState;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubStatePutRequest".
+ */
+export interface HubStatePutRequest {
+ baseVersion: number;
+ state: HubState;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "hub.state".
+ */
+export interface HubState1 {
+ v: ProtocolVersion;
+ version: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessDescriptor".
+ */
+export interface HarnessDescriptor {
+ installed?: boolean | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DelegatedSessionLink".
+ */
+export interface DelegatedSessionLink {
+ taskId: string;
+ parentTaskId?: string | null;
+ spawnedSessionId: SessionId;
+ parentSessionId: SessionId;
+ agentName?: string | null;
+ model?: string | null;
+ owner?: string | null;
+ harnessId?: HarnessId | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "UserTurnAttachment".
+ */
+export interface UserTurnAttachment {
+ mime: string;
+ pathOrUri: string;
+ name?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "UserTurn".
+ */
+export interface UserTurn {
+ deliveryId?: string | null;
+ model?: string | null;
+ effort?: string | null;
+ text: string;
+ attachments?: UserTurnAttachment[] | null;
+ systemPrompt?: string | null;
+ bypassDialogGate?: boolean | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SendUserTurnResult".
+ */
+export interface SendUserTurnResult {
+ dismissedDialog?: boolean | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "preset".
+ */
+export interface Preset {
+ id: string;
+ name: string;
+ node: string;
+ local: boolean;
+ harnessId?: HarnessId | null;
+ model?: string | null;
+ effort?: string | null;
+ directory?: string | null;
+ implemented?: boolean | null;
+ gap?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CatalogNode".
+ */
+export interface CatalogNode {
+ id: string;
+ node: string;
+ local: boolean;
+ provider?: string | null;
+ model?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CatalogAgentsResponse".
+ */
+export interface CatalogAgentsResponse {
+ agents: CatalogAgent[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshOverview".
+ */
+export interface MeshOverview {
+ updatedAt: number;
+ nodes: MeshOverviewNode[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshOverviewNode".
+ */
+export interface MeshOverviewNode {
+ id: string;
+ name: string;
+ denUrl: string;
+ online: boolean;
+ sessions?: number | null;
+ latest?: MeshLatest | null;
+ version?: string | null;
+ revision?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshLatest".
+ */
+export interface MeshLatest {
+ activity: Activity;
+ title: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "NodeCapabilities".
+ */
+export interface NodeCapabilities {
+ subsystems: Subsystems;
+ harnesses: HarnessCapability[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "Subsystems".
+ */
+export interface Subsystems {
+ den: boolean;
+ devices: boolean;
+ mesh: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessCapability".
+ */
+export interface HarnessCapability {
+ harnessId: HarnessId;
+ list: boolean;
+ read: boolean;
+ drive: boolean;
+ resume: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessInspectCapability".
+ */
+export interface HarnessInspectCapability {
+ list: boolean;
+ read: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessDriveCapability".
+ */
+export interface HarnessDriveCapability {
+ drive: boolean;
+ resume: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshDevice".
+ */
+export interface MeshDevice {
+ id: string;
+ name: string;
+ publicKey: string;
+ address: string;
+ createdAt: number;
+ enrolledAt?: number | null;
+ lastHandshake?: number | null;
+ pgRole?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceListResponse".
+ */
+export interface DeviceListResponse {
+ devices: MeshDevice[];
+ pending: PendingEnrollment[];
+ relayConfigured: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PendingEnrollment".
+ */
+export interface PendingEnrollment {
+ id: string;
+ name: string;
+ address: string;
+ createdAt: number;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "StoredPending".
+ */
+export interface StoredPending {
+ id: string;
+ name: string;
+ token: string;
+ address: string;
+ createdAt: number;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceRosterFile".
+ */
+export interface DeviceRosterFile {
+ v: number;
+ devices: MeshDevice[];
+ pending: StoredPending[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceCreateRequest".
+ */
+export interface DeviceCreateRequest {
+ name?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "rivet-mesh-enroll".
+ */
+export interface RivetMeshEnroll {
+ v: number;
+ gateway: string;
+ token: string;
+ config: DeviceEnrollConfig;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceEnrollConfig".
+ */
+export interface DeviceEnrollConfig {
+ sharedHost: string;
+ sharedExport: string;
+ pgUrl: string;
+ embedUrl: string;
+ wgEndpoint: string;
+ wgPeerPublicKey: string;
+ wgAddress: string;
+ wgAllowedIps: string;
+ homeSubnet: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceCreateResponse".
+ */
+export interface DeviceCreateResponse {
+ pending: PendingEnrollment;
+ qr: RivetMeshEnroll;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "EnrolledDevice".
+ */
+export interface EnrolledDevice {
+ id: string;
+ name: string;
+ address: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SignedCertificate".
+ */
+export interface SignedCertificate {
+ leaf: string;
+ chain: string[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceEnrollResponse".
+ */
+export interface DeviceEnrollResponse {
+ ok: boolean;
+ device: EnrolledDevice;
+ config: DeviceEnrollConfig;
+ certificate: SignedCertificate;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PairRedeemResponse".
+ */
+export interface PairRedeemResponse {
+ deviceId: string;
+ certificate: SignedCertificate;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PairingRecord".
+ */
+export interface PairingRecord {
+ v: number;
+ deviceId: string;
+ name: string;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceEnrollRequest".
+ */
+export interface DeviceEnrollRequest {
+ token?: string | null;
+ publicKey?: string | null;
+ name?: string | null;
+ csr?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingCode".
+ */
+export interface PhonePairingCode {
+ deviceId: string;
+ gateway: string;
+ expiresAt: number;
+ qrText: string;
+ reshown: number;
+ addedToUsers: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingStatus".
+ */
+export interface PhonePairingStatus {
+ state: PhonePairingState;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingAvailability".
+ */
+export interface PhonePairingAvailability {
+ available: boolean;
+ reason?: string | null;
+ gateway?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingRequest".
+ */
+export interface PhonePairingRequest {
+ name: string;
+ host?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AudioStatus".
+ */
+export interface AudioStatus {
+ enabled: boolean;
+ backend: AudioBackend;
+ device: string;
+ sampleRate: number;
+ channels: number;
+ format: AudioFormat;
+ fifoPath: string;
+ armed: boolean;
+ publisherId?: string | null;
+ armedAt?: number | null;
+ bytesWritten: number;
+ runtimeReady: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "AudioHealth".
+ */
+export interface AudioHealth {
+ ok: boolean;
+ runtimeReady: boolean;
+ fifoPath: string;
+ message?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "VoiceSpeakRequest".
+ */
+export interface VoiceSpeakRequest {
+ input: string;
+ instructions?: string | null;
+ voice?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "VoiceTranscribeResponse".
+ */
+export interface VoiceTranscribeResponse {
+ text: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceFileEntry".
+ */
+export interface DeviceFileEntry {
+ name: string;
+ type: FileEntryKind;
+ size: number;
+ mtime: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "FilesListResponse".
+ */
+export interface FilesListResponse {
+ path: string;
+ root: string;
+ entries: DeviceFileEntry[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "StagedUploadResponse".
+ */
+export interface StagedUploadResponse {
+ uri: string;
+ name: string;
+ mime: string;
+ size: number;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "FileEntry".
+ */
+export interface FileEntry {
+ name: string;
+ type: FileKind;
+ size: number;
+ mtime: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "FileList".
+ */
+export interface FileList {
+ path: string;
+ root: string;
+ entries: FileEntry[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "FileChanged".
+ */
+export interface FileChanged {
+ ok: boolean;
+ path: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySearchToolArgs".
+ */
+export interface MemorySearchToolArgs {
+ since?: string | null;
+ before?: string | null;
+ window?: BrowseWindow | null;
+ expand?: boolean | null;
+ synthesize?: boolean | null;
+ query: string;
+ mode?: SearchMode | null;
+ scope?: MemoryScope | null;
+ limit?: number | null;
+ agent?: string | null;
+ role?: Role | null;
+ tool_name?: string | null;
+ tag?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySearchHit".
+ */
+export interface MemorySearchHit {
+ chunk?: MemoryChunkMatch | null;
+ id: string;
+ source: MemoryHitSource;
+ content: string;
+ createdAt: string;
+ score: number;
+ role?: Role | null;
+ agent?: string | null;
+ kind?: SummaryKind | null;
+ toolName?: string | null;
+ conversationId?: string | null;
+ sessionId?: string | null;
+ fallback?: MemoryFallback | null;
+ tags?: TagWire[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryChunkMatch".
+ */
+export interface MemoryChunkMatch {
+ index: number;
+ total: number;
+ charStart: number;
+ charEnd: number;
+ content: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagWire".
+ */
+export interface TagWire {
+ id: string;
+ entityType: TagEntityType;
+ entityId: string;
+ key: string;
+ value: string;
+ display: string;
+ source: string;
+ state: TagState;
+ confidence?: number | null;
+ proposedBy: string;
+ reason: string;
+ decidedBy?: string | null;
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryDegraded".
+ */
+export interface MemoryDegraded {
+ reason: string;
+ effect: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySearchResponse".
+ */
+export interface MemorySearchResponse {
+ query: string;
+ scope: MemoryScope;
+ degraded?: MemoryDegraded | null;
+ fallback?: MemoryFallback | null;
+ results: MemorySearchHit[];
+ expanded?: MemoryEntry[];
+ synthesis?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryEntry".
+ */
+export interface MemoryEntry {
+ id?: string | null;
+ sessionId: string;
+ agent: string;
+ channel: string;
+ role: Role;
+ content: string;
+ toolName?: string | null;
+ toolArgs?: {
+ [k: string]: unknown;
+ } | null;
+ toolResult?: string | null;
+ metadata?: {
+ [k: string]: unknown;
+ } | null;
+ createdAt?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryBrowseToolArgs".
+ */
+export interface MemoryBrowseToolArgs {
+ conversation_id?: string | null;
+ include_tools?: boolean | null;
+ since?: string | null;
+ before?: string | null;
+ window?: BrowseWindow | null;
+ agent?: string | null;
+ tag?: string | null;
+ limit?: number | null;
+ order?: MemoryBrowseOrder | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryAppendToolArgs".
+ */
+export interface MemoryAppendToolArgs {
+ session_id: string;
+ content: string;
+ role: Role;
+ tool_name?: string | null;
+ tool_args?: {
+ [k: string]: unknown;
+ } | null;
+ tool_result?: string | null;
+ event_id?: string | null;
+ agent?: string | null;
+ persona?: string | null;
+ source?: string | null;
+ channel?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryIngestMessage".
+ */
+export interface MemoryIngestMessage {
+ role: Role;
+ content: string;
+ created_at?: string | null;
+ tool_calls?: MemoryIngestToolCall[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryIngestToolCall".
+ */
+export interface MemoryIngestToolCall {
+ id?: string | null;
+ name: string;
+ input?: {
+ [k: string]: unknown;
+ } | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryIngestSessionToolArgs".
+ */
+export interface MemoryIngestSessionToolArgs {
+ session_id: string;
+ messages: MemoryIngestMessage[];
+ agent?: string | null;
+ persona?: string | null;
+ source?: string | null;
+ channel?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryGetFullToolArgs".
+ */
+export interface MemoryGetFullToolArgs {
+ id?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsToolArgs".
+ */
+export interface MemoryTagsToolArgs {
+ entity_type?: string | null;
+ entity_id?: string | null;
+ session_key?: string | null;
+ agent?: string | null;
+ key?: string | null;
+ value?: string | null;
+ tag?: string | null;
+ display?: string | null;
+ state?: TagState | null;
+ ids?: string[] | null;
+ session_keys?: string[] | null;
+ entries?: TagEntryPair[] | null;
+ parent_value?: string | null;
+ aliases?: string[] | null;
+ from?: string | null;
+ into?: string | null;
+ reason?: string | null;
+ decided_by?: string | null;
+ limit?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagEntryPair".
+ */
+export interface TagEntryPair {
+ key: string;
+ value: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryToolResponse".
+ */
+export interface MemoryToolResponse {
+ ok: boolean;
+ result: ToolResult;
+}
+export interface MediaFields {
+ type: "image";
+}
+export interface MediaFields1 {
+ type: "video";
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MediaFields".
+ */
+export interface MediaFields2 {
+ data?: string | null;
+ url?: string | null;
+ mimeType?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryBrowseMessage".
+ */
+export interface MemoryBrowseMessage {
+ id: string;
+ role: Role;
+ agent?: string | null;
+ content: string;
+ createdAt: string;
+ conversationId?: string | null;
+ sessionId?: string | null;
+ toolName?: string | null;
+ tags?: TagWire[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryBrowseResponse".
+ */
+export interface MemoryBrowseResponse {
+ messages: MemoryBrowseMessage[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySummaryNode".
+ */
+export interface MemorySummaryNode {
+ id: string;
+ parentId?: string | null;
+ level: number;
+ kind: SummaryKind;
+ content: string;
+ messageCount: number;
+ earliestAt?: string | null;
+ latestAt?: string | null;
+ createdAt: string;
+ sourceMessageIds: string[];
+ vector: VectorState;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryMessageTally".
+ */
+export interface MemoryMessageTally {
+ total: number;
+ user: number;
+ assistant: number;
+ system: number;
+ tool: number;
+ embedded: number;
+ pending: number;
+ failed: number;
+ skipped: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySummaryDagResponse".
+ */
+export interface MemorySummaryDagResponse {
+ sessionId: string;
+ summaries: MemorySummaryNode[];
+ messages: MemoryMessageTally;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopTool".
+ */
+export interface TopTool {
+ tool: string;
+ count: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "RecentSession".
+ */
+export interface RecentSession {
+ sessionId: string;
+ title?: string | null;
+ agent: string;
+ lastActive: number;
+ messages: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryStatsResponse".
+ */
+export interface MemoryStatsResponse {
+ conversations: number;
+ messages: number;
+ toolCalls: number;
+ summaries: number;
+ embedQueueDepth: number;
+ embeddedMessages: number;
+ failedEmbeddings: number;
+ topTools: TopTool[];
+ recentSessions: RecentSession[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "EmbedHealth".
+ */
+export interface EmbedHealth {
+ status: EmbedStatus;
+ error?: string | null;
+ impact?: string | null;
+ checkedAt?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryHealthResponse".
+ */
+export interface MemoryHealthResponse {
+ observedAt?: string | null;
+ queueStatus?: QueueStatus | null;
+ queues?: QueueHealth | null;
+ compaction?: SummarizerHealth | null;
+ failedEmbeddings?: number | null;
+ skippedEmbeddings?: number | null;
+ capture?: CaptureHealth | null;
+ status: MemoryHealthStatus;
+ embeddings: EmbedHealth;
+ embedQueueDepth: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "QueueHealth".
+ */
+export interface QueueHealth {
+ task: string;
+ pending: number;
+ running: number;
+ scheduled: number;
+ dead: number;
+ oldestPendingMinutes?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SummarizerHealth".
+ */
+export interface SummarizerHealth {
+ eligible: boolean;
+ activeTail: boolean;
+ belowFloor: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CaptureHealth".
+ */
+export interface CaptureHealth {
+ status: CaptureStatus;
+ impact: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PendingTagWire".
+ */
+export interface PendingTagWire {
+ id: string;
+ entityType: TagEntityType;
+ entityId: string;
+ key: string;
+ value: string;
+ display: string;
+ source: string;
+ state: TagState;
+ confidence?: number | null;
+ proposedBy: string;
+ reason: string;
+ decidedBy?: string | null;
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+ action?: PendingTagAction | null;
+ sessionKey?: string | null;
+ title?: string | null;
+ agent?: string | null;
+ conversationId?: string | null;
+ excerpt?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsDecideRequest".
+ */
+export interface MemoryTagsDecideRequest {
+ ids?: string[] | null;
+ state?: TagState | null;
+ decided_by?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsAddRequest".
+ */
+export interface MemoryTagsAddRequest {
+ entity_type?: string | null;
+ entity_id?: string | null;
+ session_key?: string | null;
+ agent?: string | null;
+ tag?: string | null;
+ key?: string | null;
+ value?: string | null;
+ display?: string | null;
+ reason?: string | null;
+ decided_by?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsLookupRequest".
+ */
+export interface MemoryTagsLookupRequest {
+ session_keys?: string[] | null;
+ states?: string[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyEntry".
+ */
+export interface TagTaxonomyEntry {
+ key: string;
+ value: string;
+ display: string;
+ parentValue?: string | null;
+ aliases: string[];
+ state: TagState;
+ source: string;
+ reason: string;
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyWire".
+ */
+export interface TagTaxonomyWire {
+ key: string;
+ entries: TagTaxonomyEntry[];
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyUpsertRequest".
+ */
+export interface TagTaxonomyUpsertRequest {
+ key?: string | null;
+ value?: string | null;
+ display?: string | null;
+ parent_value?: string | null;
+ aliases?: string[] | null;
+ reason?: string | null;
+ decided_by?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyDecideRequest".
*/
-export interface AgentResponse {
- agent: AgentPreset;
+export interface TagTaxonomyDecideRequest {
+ entries?: TagEntryPair[] | null;
+ state?: TagState | null;
+ decided_by?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessDescriptor".
+ * via the `definition` "TagTaxonomyMerge".
*/
-export interface HarnessDescriptor {
- installed?: boolean | null;
+export interface TagTaxonomyMerge {
+ key: string;
+ from: string;
+ into: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DelegatedSessionLink".
+ * via the `definition` "TagTaxonomyMergeRequest".
*/
-export interface DelegatedSessionLink {
- taskId: string;
- parentTaskId?: string | null;
- spawnedSessionId: SessionId;
- parentSessionId: SessionId;
- agentName?: string | null;
- model?: string | null;
- owner?: string | null;
- harnessId?: HarnessId | null;
+export interface TagTaxonomyMergeRequest {
+ key?: string | null;
+ from?: string | null;
+ into?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "UserTurnAttachment".
+ * via the `definition` "TagTaxonomyMergeResult".
*/
-export interface UserTurnAttachment {
- mime: string;
- pathOrUri: string;
- name?: string | null;
+export interface TagTaxonomyMergeResult {
+ moved: number;
+ dropped: number;
+ into: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "UserTurn".
+ * via the `definition` "TagCount".
*/
-export interface UserTurn {
- deliveryId?: string | null;
- model?: string | null;
- effort?: string | null;
- text: string;
- attachments?: UserTurnAttachment[] | null;
- systemPrompt?: string | null;
- bypassDialogGate?: boolean | null;
+export interface TagCount {
+ key: string;
+ value: string;
+ display: string;
+ conversations: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SendUserTurnResult".
+ * via the `definition` "TagListResult".
*/
-export interface SendUserTurnResult {
- dismissedDialog?: boolean | null;
+export interface TagListResult {
+ tags: TagWire[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "preset".
+ * via the `definition` "PendingTagListResult".
*/
-export interface Preset {
- id: string;
- name: string;
- node: string;
- local: boolean;
- harnessId?: HarnessId | null;
- model?: string | null;
- directory?: string | null;
- implemented?: boolean | null;
- gap?: string | null;
+export interface PendingTagListResult {
+ tags: PendingTagWire[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogNode".
+ * via the `definition` "TagCountsResult".
*/
-export interface CatalogNode {
- id: string;
- node: string;
- local: boolean;
- provider?: string | null;
- model?: string | null;
+export interface TagCountsResult {
+ counts: TagCount[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogCommand".
+ * via the `definition` "TagTaxonomyListResult".
*/
-export interface CatalogCommand {
- name: string;
- description: string;
- argHint?: string | null;
- source: string;
+export interface TagTaxonomyListResult {
+ entries: TagTaxonomyEntry[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogExecutorEntry".
+ * via the `definition` "TagDecisionResult".
*/
-export interface CatalogExecutorEntry {
- key: string;
- capabilities: HarnessExecutorCapabilities;
- commands: CatalogCommand[];
- harnessId?: HarnessId | null;
- implemented?: boolean | null;
+export interface TagDecisionResult {
+ changed: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagAddResult".
+ */
+export interface TagAddResult {
+ tag: TagWire;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessExecutorCapabilities".
+ * via the `definition` "TagLookupResult".
*/
-export interface HarnessExecutorCapabilities {
- steerable: boolean;
- multiTurn: boolean;
- structuredStream: boolean;
- usageInResult: boolean;
- sessionIdCapture: boolean;
- slashCommands: boolean;
- effortSelection: boolean;
- mcpInjection: McpInjection;
+export interface TagLookupResult {
+ sessions: {
+ [k: string]: TagWire[];
+ };
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogSkillEntry".
+ * via the `definition` "TagTaxonomyUpsertResult".
*/
-export interface CatalogSkillEntry {
- name: string;
- description: string;
+export interface TagTaxonomyUpsertResult {
+ entry: TagTaxonomyEntry;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ProjectRuleResult".
+ */
+export interface ProjectRuleResult {
+ key: string;
+ rule: ProjectRule;
+ gitRoot?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogSheet".
+ * via the `definition` "HealthzResponse".
*/
-export interface CatalogSheet {
+export interface HealthzResponse {
+ ok: boolean;
+ sessions: number;
+ name: string;
node: string;
- agents: CatalogAgent[];
- executors: CatalogExecutorEntry[];
- tools: string[];
- skills: CatalogSkillEntry[];
+ degraded?: string | null;
+ degradedProviders?: DegradedProvider[];
+ version?: string | null;
+ revision?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogAgentsResponse".
+ * via the `definition` "DegradedProvider".
*/
-export interface CatalogAgentsResponse {
- agents: CatalogAgent[];
+export interface DegradedProvider {
+ id: string;
+ recovery: ProviderRecovery;
+ reason: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "OutcomeBucket".
+ * via the `definition` "GatewayError".
*/
-export interface OutcomeBucket {
- tasks: number;
- completed: number;
- failed: number;
- verified: number;
- refuted: number;
- escalated: number;
- diverged: number;
- divergenceRate: number;
- totalCostUsd?: number | null;
- avgDurationMs?: number | null;
+export interface GatewayError {
+ error: string;
+ detail?: string | null;
+ hint?: string | null;
+ code?: string | null;
+ harnessId?: HarnessId | null;
+ node?: string | null;
+ retryable?: boolean | null;
+ reason?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "OutcomesFilter".
+ * via the `definition` "OkReply".
*/
-export interface OutcomesFilter {
- since?: string | null;
- until?: string | null;
- agentId?: string | null;
- origin?: string | null;
+export interface OkReply {
+ ok: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "EventsIngested".
+ */
+export interface EventsIngested {
+ ok: boolean;
+ ingested: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PairRedeemRequest".
+ */
+export interface PairRedeemRequest {
+ token: string;
+ csr?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "OutcomesResponse".
+ * via the `definition` "RosterFile".
*/
-export interface OutcomesResponse {
- filter: OutcomesFilter;
- totals: OutcomeBucket;
- byAgent: {
- [k: string]: OutcomeBucket;
+export interface RosterFile {
+ default: string;
+ cwd?: string | null;
+ env?: {
+ [k: string]: string;
};
- byExecutor: {
- [k: string]: OutcomeBucket;
+ commands: {
+ [k: string]: RosterEntry;
};
- byDay: {
- [k: string]: OutcomeBucket;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "RosterEntry".
+ */
+export interface RosterEntry {
+ label: string;
+ cmd: string[];
+ room?: boolean | null;
+ cwd?: string | null;
+ env?: {
+ [k: string]: string;
};
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshOverview".
+ * via the `definition` "SessionDeleted".
*/
-export interface MeshOverview {
- updatedAt: number;
- nodes: MeshOverviewNode[];
+export interface SessionDeleted {
+ ok: boolean;
+ session: SessionId;
+ conversations: number;
+ messages: number;
+ summaries: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshOverviewNode".
+ * via the `definition` "SessionDeleteRequest".
*/
-export interface MeshOverviewNode {
+export interface SessionDeleteRequest {
+ sessions: SessionId[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteRefused".
+ */
+export interface SessionDeleteRefused {
+ session: SessionId;
+ ok: boolean;
+ error: SessionDeleteError;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteResults".
+ */
+export interface SessionDeleteResults {
+ results: SessionDeleteResult[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionTrashCandidate".
+ */
+export interface SessionTrashCandidate {
+ session: SessionId;
+ harness: HarnessId;
+ title?: string | null;
+ updatedAt: string;
+ reason: SessionTrashReason;
+ userTurns: number;
+ reply?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionTrashList".
+ */
+export interface SessionTrashList {
+ candidates: SessionTrashCandidate[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TranscriptTurn".
+ */
+export interface TranscriptTurn {
+ role: Role;
+ text: string;
+ ts?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TranscriptResponse".
+ */
+export interface TranscriptResponse {
id: string;
- name: string;
- denUrl: string;
- online: boolean;
- sessions?: number | null;
- latest?: MeshLatest | null;
+ command: string;
+ turns: TranscriptTurn[];
+ contextWindow?: number | null;
+ compactAt?: number | null;
+ contextSource?: ContextSource | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshLatest".
+ * via the `definition` "SessionSummary".
*/
-export interface MeshLatest {
- activity: Activity;
- title: string;
+export interface SessionSummary {
+ id: string;
+ lastActive: number;
+ messages: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "NodeCapabilities".
+ * via the `definition` "SessionList".
*/
-export interface NodeCapabilities {
- subsystems: Subsystems;
- harnesses: HarnessCapability[];
+export interface SessionList {
+ sessions: SessionSummary[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "Subsystems".
+ * via the `definition` "MessageList".
*/
-export interface Subsystems {
- den: boolean;
- devices: boolean;
- mesh: boolean;
+export interface MessageList {
+ messages: SessionMessage[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessCapability".
+ * via the `definition` "SessionMessage".
*/
-export interface HarnessCapability {
- harnessId: HarnessId;
- list: boolean;
- read: boolean;
- drive: boolean;
- resume: boolean;
+export interface SessionMessage {
+ id: string;
+ sessionId: string;
+ role: SessionMessageRole;
+ text: string;
+ ts: number;
+ usage?: MessageUsage | null;
+ model?: string | null;
+ durationMs?: number | null;
+ thinking?: boolean | null;
+ tools?: string[] | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessInspectCapability".
+ * via the `definition` "MessageUsage".
*/
-export interface HarnessInspectCapability {
- list: boolean;
- read: boolean;
+export interface MessageUsage {
+ promptTokens: number;
+ completionTokens: number;
+ cachedTokens: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessDriveCapability".
+ * via the `definition` "SessionPostRequest".
*/
-export interface HarnessDriveCapability {
- drive: boolean;
- resume: boolean;
+export interface SessionPostRequest {
+ excludeTools?: string[] | null;
+ text: string;
+ userId?: string | null;
+ agent?: string | null;
+ thinking?: ThinkingLevel | null;
+ systemPrompt?: string | null;
+ attachments?: UserTurnAttachment[] | null;
+ harness?: HarnessId | null;
+ model?: string | null;
+ workingDir?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshDevice".
+ * via the `definition` "SessionPostAccepted".
*/
-export interface MeshDevice {
- id: string;
- name: string;
- publicKey: string;
- address: string;
- createdAt: number;
- enrolledAt?: number | null;
- lastHandshake?: number | null;
- pgRole?: string | null;
+export interface SessionPostAccepted {
+ accepted: boolean;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceListResponse".
+ * via the `definition` "SessionPostReply".
*/
-export interface DeviceListResponse {
- devices: MeshDevice[];
- pending: PendingEnrollment[];
- relayConfigured: boolean;
+export interface SessionPostReply {
+ message: SessionMessage;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PendingEnrollment".
+ * via the `definition` "SessionSteerRequest".
*/
-export interface PendingEnrollment {
- id: string;
- name: string;
- address: string;
- createdAt: number;
- expiresAt: number;
+export interface SessionSteerRequest {
+ text: string;
+ attachments?: UserTurnAttachment[] | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StoredPending".
+ * via the `definition` "SessionSteerResponse".
*/
-export interface StoredPending {
- id: string;
- name: string;
- token: string;
- address: string;
- createdAt: number;
- expiresAt: number;
+export interface SessionSteerResponse {
+ outcome: SteerOutcome;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceRosterFile".
+ * via the `definition` "SessionWsClientMessage".
*/
-export interface DeviceRosterFile {
- v: number;
- devices: MeshDevice[];
- pending: StoredPending[];
+export interface SessionWsClientMessage {
+ type: SessionClientKind;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceCreateRequest".
+ * via the `definition` "StreamEvent".
*/
-export interface DeviceCreateRequest {
- name?: string | null;
+export interface StreamEvent {
+ type: StreamEventKind;
+ content: string;
+ metadata?: {
+ [k: string]: unknown;
+ } | null;
+}
+export interface TranscriptWsFrame {
+ kind: "transcript";
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "rivet-mesh-enroll".
+ * via the `definition` "HarnessTranscriptTurn".
*/
-export interface RivetMeshEnroll {
- v: number;
- gateway: string;
- token: string;
- config: DeviceEnrollConfig;
+export interface HarnessTranscriptTurn {
+ role: SessionMessageRole;
+ text: string;
+ thinking?: string | null;
+ tools?: HarnessTranscriptTool[] | null;
+ usage?: MessageUsage | null;
+ model?: string | null;
+ stopReason?: string | null;
+ lastBlock?: TranscriptBlock | null;
+ attachments?: TranscriptAttachment[] | null;
+ complete?: boolean;
+ compact?: boolean;
+ startedAtMs?: number | null;
+ endedAtMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceEnrollConfig".
+ * via the `definition` "HarnessTranscriptTool".
*/
-export interface DeviceEnrollConfig {
- sharedHost: string;
- sharedExport: string;
- pgUrl: string;
- embedUrl: string;
- wgEndpoint: string;
- wgPeerPublicKey: string;
- wgAddress: string;
- wgAllowedIps: string;
- homeSubnet: string;
+export interface HarnessTranscriptTool {
+ name: string;
+ status: TranscriptToolStatus;
+ args?: {
+ [k: string]: unknown;
+ } | null;
+ id?: string | null;
+ input?: {
+ [k: string]: unknown;
+ } | null;
+ resultText?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceCreateResponse".
+ * via the `definition` "TranscriptAttachment".
*/
-export interface DeviceCreateResponse {
- pending: PendingEnrollment;
- qr: RivetMeshEnroll;
+export interface TranscriptAttachment {
+ mediaType: string;
+ name?: string | null;
+ uri?: string | null;
+ uploadId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "EnrolledDevice".
+ * via the `definition` "TranscriptWsFrame".
*/
-export interface EnrolledDevice {
- id: string;
- name: string;
- address: string;
+export interface TranscriptWsFrame1 {
+ session: string;
+ rev: number;
+ from: number;
+ turns: HarnessTranscriptTurn[];
+ total: number;
+ command: string;
+ truncatedBefore?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SignedCertificate".
+ * via the `definition` "HarnessSessionTranscriptResponse".
*/
-export interface SignedCertificate {
- leaf: string;
- chain: string[];
+export interface HarnessSessionTranscriptResponse {
+ sessionId: SessionId;
+ harnessId: HarnessId;
+ turns: HarnessTranscriptTurn[];
+ contextWindow: number;
+ compactAt: number;
+ contextSource: ContextSource;
+ redirectedTo?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceEnrollResponse".
+ * via the `definition` "SessionPreview".
*/
-export interface DeviceEnrollResponse {
- ok: boolean;
- device: EnrolledDevice;
- config: DeviceEnrollConfig;
- certificate: SignedCertificate;
+export interface SessionPreview {
+ sessionId: SessionId;
+ kind: SessionPreviewKind;
+ text: string;
+ at: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PairRedeemResponse".
+ * via the `definition` "SessionPreviewList".
*/
-export interface PairRedeemResponse {
- deviceId: string;
- certificate: SignedCertificate;
+export interface SessionPreviewList {
+ previews: SessionPreview[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PairingRecord".
+ * via the `definition` "HarnessTurnAccepted".
*/
-export interface PairingRecord {
- v: number;
- deviceId: string;
- name: string;
- expiresAt: number;
+export interface HarnessTurnAccepted {
+ ok: boolean;
+ sessionId: SessionId;
+ redirectedTo?: SessionId | null;
+ dismissedDialog?: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceEnrollRequest".
+ * via the `definition` "HarnessSessionResponse".
*/
-export interface DeviceEnrollRequest {
- token?: string | null;
- publicKey?: string | null;
- name?: string | null;
- csr?: string | null;
+export interface HarnessSessionResponse {
+ sessionId: SessionId;
+ harnessId: HarnessId;
+ title?: string | null;
+ cwd?: string | null;
+ createdAt: Millis;
+ updatedAt: Millis;
+ status: HarnessSessionStatus;
+ blocked?: boolean | null;
+ supersedes?: SessionId | null;
+ model?: string | null;
+ parentSessionId?: SessionId | null;
+ agentName?: string | null;
+ taskId?: string | null;
+ effort?: string | null;
+ transport?: Transport | null;
+ startupContext?: StartupContext | null;
+ redirectedTo?: SessionId | null;
+ switches?: SessionSwitches | null;
+ [k: string]: unknown;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "StartupContext".
+ */
+export interface StartupContext {
+ topicId: string;
+ sections: StartupSection[];
+ tokens: number;
+ deliveredVia: DeliveredVia;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingCode".
+ * via the `definition` "StartupSection".
*/
-export interface PhonePairingCode {
- deviceId: string;
- gateway: string;
- expiresAt: number;
- qrText: string;
- reshown: number;
- addedToUsers: boolean;
+export interface StartupSection {
+ kind: StartupKind;
+ title: string;
+ text: string;
+ sources: StartupSource[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingStatus".
+ * via the `definition` "SessionSwitches".
*/
-export interface PhonePairingStatus {
- state: PhonePairingState;
+export interface SessionSwitches {
+ model: boolean;
+ effort: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingAvailability".
+ * via the `definition` "HarnessSessionTitleRequest".
*/
-export interface PhonePairingAvailability {
- available: boolean;
- reason?: string | null;
- gateway?: string | null;
+export interface HarnessSessionTitleRequest {
+ title: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingRequest".
+ * via the `definition` "HarnessSessionForkRequest".
*/
-export interface PhonePairingRequest {
- name: string;
- host?: string | null;
+export interface HarnessSessionForkRequest {
+ prompts: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AudioStatus".
+ * via the `definition` "HarnessToolOutput".
*/
-export interface AudioStatus {
- enabled: boolean;
- backend: AudioBackend;
- device: string;
- sampleRate: number;
- channels: number;
- format: AudioFormat;
- fifoPath: string;
- armed: boolean;
- publisherId?: string | null;
- armedAt?: number | null;
- bytesWritten: number;
- runtimeReady: boolean;
+export interface HarnessToolOutput {
+ text: string;
+ isError: boolean;
+ truncated: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AudioHealth".
+ * via the `definition` "TermSpawnRequest".
*/
-export interface AudioHealth {
- ok: boolean;
- runtimeReady: boolean;
- fifoPath: string;
- message?: string | null;
+export interface TermSpawnRequest {
+ command?: string | null;
+ model?: string | null;
+ effort?: string | null;
+ session?: string | null;
+ resume?: string | null;
+ agentId?: string | null;
+ force?: boolean | null;
+ cols?: number | null;
+ rows?: number | null;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "VoiceSpeakRequest".
+ * via the `definition` "TermAttachInfo".
*/
-export interface VoiceSpeakRequest {
- input: string;
- instructions?: string | null;
- voice?: string | null;
+export interface TermAttachInfo {
+ socket: string;
+ session: string;
+ host: string;
+ sshUser: string;
+ local: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "VoiceTranscribeResponse".
+ * via the `definition` "TermSpawnResponse".
*/
-export interface VoiceTranscribeResponse {
- text: string;
+export interface TermSpawnResponse {
+ harnessSessionId?: SessionId | null;
+ id: string;
+ denSession: string;
+ command: string;
+ cwd?: string | null;
+ pid: number;
+ createdAt: number;
+ mux?: Mux | null;
+ reattached?: boolean | null;
+ attach?: TermAttachInfo | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceFileEntry".
+ * via the `definition` "PtyInfo".
*/
-export interface DeviceFileEntry {
- name: string;
- type: FileEntryKind;
- size: number;
- mtime: string;
+export interface PtyInfo {
+ id: string;
+ denSession: string;
+ command: string;
+ state: PtyState;
+ pid?: number | null;
+ attached: number;
+ exitCode?: number | null;
+ createdAt: number;
+ lastOutputTs?: number | null;
+ cols?: number | null;
+ rows?: number | null;
+ mux?: Mux | null;
+ persisted?: boolean | null;
+ reattached?: boolean | null;
+ attach?: TermAttachInfo | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "FilesListResponse".
+ * via the `definition` "PtyList".
*/
-export interface FilesListResponse {
- path: string;
- root: string;
- entries: DeviceFileEntry[];
+export interface PtyList {
+ ptys: PtyInfo[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StagedUploadResponse".
+ * via the `definition` "TermCommand".
*/
-export interface StagedUploadResponse {
- uri: string;
- name: string;
- mime: string;
- size: number;
- expiresAt: number;
+export interface TermCommand {
+ id: string;
+ label: string;
+ room: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "FileEntry".
+ * via the `definition` "TermConfig".
*/
-export interface FileEntry {
- name: string;
- type: FileKind;
- size: number;
- mtime: number;
+export interface TermConfig {
+ enabled: boolean;
+ default: string;
+ maxPtys: number;
+ active: number;
+ commands: TermCommand[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "FileList".
+ * via the `definition` "TermInjectRequest".
*/
-export interface FileList {
- path: string;
- root: string;
- entries: FileEntry[];
+export interface TermInjectRequest {
+ session: string;
+ text: string;
+ submit?: boolean | null;
+ interrupt?: boolean | null;
+ bypassDialogGate?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "FileChanged".
+ * via the `definition` "TermInjectResponse".
*/
-export interface FileChanged {
+export interface TermInjectResponse {
ok: boolean;
- path: string;
+ ptyId: string;
+ dismissedDialog?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchToolArgs".
+ * via the `definition` "DeviceOwner".
*/
-export interface MemorySearchToolArgs {
- since?: string | null;
- before?: string | null;
- window?: BrowseWindow | null;
- expand?: boolean | null;
- synthesize?: boolean | null;
- query: string;
- mode?: SearchMode | null;
- scope?: MemoryScope | null;
- limit?: number | null;
- agent?: string | null;
- tag?: string | null;
+export interface DeviceOwner {
+ device?: string | null;
+ self: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchHit".
+ * via the `definition` "UploadCreated".
*/
-export interface MemorySearchHit {
- chunk?: MemoryChunkMatch | null;
+export interface UploadCreated {
id: string;
- source: MemoryHitSource;
- content: string;
- createdAt: string;
- score: number;
- role?: Role | null;
- agent?: string | null;
- kind?: SummaryKind | null;
- toolName?: string | null;
- conversationId?: string | null;
- sessionId?: string | null;
- fallback?: MemoryFallback | null;
- tags?: TagWire[] | null;
+ uri: string;
+ name: string;
+ bytes: number;
+ mediaType: string;
+ expiresAt: string;
+ session?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryChunkMatch".
+ * via the `definition` "UploadList".
*/
-export interface MemoryChunkMatch {
- index: number;
- total: number;
- charStart: number;
- charEnd: number;
- content: string;
+export interface UploadList {
+ uploads: UploadCreated[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagWire".
+ * via the `definition` "UsersRegistry".
*/
-export interface TagWire {
- id: string;
- entityType: TagEntityType;
- entityId: string;
- key: string;
- value: string;
- display: string;
- source: string;
- state: TagState;
- confidence?: number | null;
- proposedBy: string;
- reason: string;
- decidedBy?: string | null;
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
+export interface UsersRegistry {
+ ownerUserId: string;
+ unmappedIsOwner: boolean;
+ localStores?: boolean | null;
+ users: {
+ [k: string]: UserRecord;
+ };
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryDegraded".
+ * via the `definition` "UserRecord".
*/
-export interface MemoryDegraded {
- reason: string;
- effect: string;
+export interface UserRecord {
+ id?: string | null;
+ devices?: string[] | null;
+ pgUrl?: string | null;
+ envFile?: string | null;
+ persona?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchResponse".
+ * via the `definition` "ChatRequest".
*/
-export interface MemorySearchResponse {
- query: string;
- scope: MemoryScope;
- degraded?: MemoryDegraded | null;
- fallback?: MemoryFallback | null;
- results: MemorySearchHit[];
- expanded?: MemoryEntry[];
- synthesis?: string | null;
+export interface ChatRequest {
+ model: string;
+ messages: OpenAiMessage[];
+ stream?: boolean | null;
+ max_tokens?: number | null;
+ stream_options?: StreamOptions | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryEntry".
+ * via the `definition` "OpenAiMessage".
*/
-export interface MemoryEntry {
- id?: string | null;
- sessionId: string;
- agent: string;
- channel: string;
+export interface OpenAiMessage {
role: Role;
- content: string;
- toolName?: string | null;
- toolArgs?: {
- [k: string]: unknown;
- } | null;
- toolResult?: string | null;
- metadata?: {
- [k: string]: unknown;
- } | null;
- createdAt?: string | null;
+ content?: string | null;
+ reasoning_content?: string | null;
+ tool_calls?: MessageToolCall[] | null;
+ tool_call_id?: string | null;
+}
+export interface StreamedPlainToolCall {
+ type: "function";
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryBrowseToolArgs".
+ * via the `definition` "StreamOptions".
*/
-export interface MemoryBrowseToolArgs {
- conversation_id?: string | null;
- include_tools?: boolean | null;
- since?: string | null;
- before?: string | null;
- window?: BrowseWindow | null;
- agent?: string | null;
- tag?: string | null;
- limit?: number | null;
- order?: MemoryBrowseOrder | null;
+export interface StreamOptions {
+ include_usage: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryAppendToolArgs".
+ * via the `definition` "FunctionDelta".
*/
-export interface MemoryAppendToolArgs {
- session_id: string;
- content: string;
- role: Role;
- tool_name?: string | null;
- tool_args?: {
- [k: string]: unknown;
- } | null;
- tool_result?: string | null;
- event_id?: string | null;
- agent?: string | null;
- persona?: string | null;
- source?: string | null;
- channel?: string | null;
+export interface FunctionDelta {
+ name?: string | null;
+ arguments?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryIngestMessage".
+ * via the `definition` "StreamedPlainToolCall".
*/
-export interface MemoryIngestMessage {
- role: Role;
- content: string;
- created_at?: string | null;
- tool_calls?: MemoryIngestToolCall[] | null;
+export interface StreamedPlainToolCall1 {
+ index?: number | null;
+ id?: string | null;
+ function: FunctionDelta;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryIngestToolCall".
+ * via the `definition` "chat.completion".
*/
-export interface MemoryIngestToolCall {
- id?: string | null;
- name: string;
- input?: {
- [k: string]: unknown;
- } | null;
+export interface ChatCompletion {
+ id: string;
+ created: number;
+ model: string;
+ choices: CompletionChoice[];
+ usage?: Usage | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryIngestSessionToolArgs".
+ * via the `definition` "CompletionChoice".
*/
-export interface MemoryIngestSessionToolArgs {
- session_id: string;
- messages: MemoryIngestMessage[];
- agent?: string | null;
- persona?: string | null;
- source?: string | null;
- channel?: string | null;
+export interface CompletionChoice {
+ index: number;
+ message: OpenAiMessage;
+ finish_reason: FinishReason;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryGetFullToolArgs".
+ * via the `definition` "Usage".
*/
-export interface MemoryGetFullToolArgs {
- id?: string | null;
+export interface Usage {
+ prompt_tokens: number;
+ completion_tokens: number;
+ total_tokens: number;
+ prompt_tokens_details?: PromptTokensDetails | null;
+ completion_tokens_details?: CompletionTokensDetails | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsToolArgs".
+ * via the `definition` "PromptTokensDetails".
*/
-export interface MemoryTagsToolArgs {
- entity_type?: string | null;
- entity_id?: string | null;
- session_key?: string | null;
- agent?: string | null;
- key?: string | null;
- value?: string | null;
- tag?: string | null;
- display?: string | null;
- state?: TagState | null;
- ids?: string[] | null;
- session_keys?: string[] | null;
- entries?: TagEntryPair[] | null;
- parent_value?: string | null;
- aliases?: string[] | null;
- from?: string | null;
- into?: string | null;
- reason?: string | null;
- decided_by?: string | null;
- limit?: number | null;
+export interface PromptTokensDetails {
+ cached_tokens: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagEntryPair".
+ * via the `definition` "CompletionTokensDetails".
*/
-export interface TagEntryPair {
- key: string;
- value: string;
+export interface CompletionTokensDetails {
+ reasoning_tokens: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryToolResponse".
+ * via the `definition` "chat.completion.chunk".
*/
-export interface MemoryToolResponse {
- ok: boolean;
- result: ToolResult;
-}
-export interface MediaFields {
- type: "image";
+export interface ChatCompletionChunk {
+ id: string;
+ created: number;
+ model: string;
+ choices: ChunkChoice[];
+ usage?: Usage | null;
}
-export interface MediaFields1 {
- type: "video";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ChunkChoice".
+ */
+export interface ChunkChoice {
+ index: number;
+ delta: CompletionDelta;
+ finish_reason?: FinishReason | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MediaFields".
+ * via the `definition` "CompletionDelta".
*/
-export interface MediaFields2 {
- data?: string | null;
- url?: string | null;
- mimeType?: string | null;
+export interface CompletionDelta {
+ role?: Role | null;
+ content?: string | null;
+ reasoning_content?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryBrowseMessage".
+ * via the `definition` "list".
*/
-export interface MemoryBrowseMessage {
- id: string;
- role: Role;
- agent?: string | null;
- content: string;
- createdAt: string;
- conversationId?: string | null;
- sessionId?: string | null;
- toolName?: string | null;
- tags?: TagWire[] | null;
+export interface List {
+ data: Model[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryBrowseResponse".
+ * via the `definition` "model".
*/
-export interface MemoryBrowseResponse {
- messages: MemoryBrowseMessage[];
+export interface Model {
+ id: string;
+ created: number;
+ owned_by: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TopTool".
+ * via the `definition` "ErrorDetail".
*/
-export interface TopTool {
- tool: string;
- count: number;
+export interface ErrorDetail {
+ message: string;
+ type: ErrorKind;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "RecentSession".
+ * via the `definition` "ErrorResponse".
*/
-export interface RecentSession {
- sessionId: string;
- title?: string | null;
- agent: string;
- lastActive: number;
- messages: number;
+export interface ErrorResponse {
+ error: ErrorDetail;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryStatsResponse".
+ * via the `definition` "Conversation".
*/
-export interface MemoryStatsResponse {
- conversations: number;
- messages: number;
- toolCalls: number;
- summaries: number;
- embedQueueDepth: number;
- embeddedMessages: number;
- failedEmbeddings: number;
- topTools: TopTool[];
- recentSessions: RecentSession[];
+export interface Conversation {
+ id: string;
+ title: string;
+ createdAt: number;
+ updatedAt: number;
+ messages: OpenAiMessage[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "EmbedHealth".
+ * via the `definition` "Conversations".
*/
-export interface EmbedHealth {
- status: EmbedStatus;
- error?: string | null;
- impact?: string | null;
- checkedAt?: string | null;
+export interface Conversations {
+ conversations: Conversation[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryHealthResponse".
+ * via the `definition` "ConversationTitle".
*/
-export interface MemoryHealthResponse {
- observedAt?: string | null;
- queueStatus?: QueueStatus | null;
- queues?: QueueHealth | null;
- compaction?: SummarizerHealth | null;
- failedEmbeddings?: number | null;
- skippedEmbeddings?: number | null;
- capture?: CaptureHealth | null;
- status: MemoryHealthStatus;
- embeddings: EmbedHealth;
- embedQueueDepth: number;
+export interface ConversationTitle {
+ title: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "QueueHealth".
+ * via the `definition` "WikiQuery".
*/
-export interface QueueHealth {
- task: string;
- pending: number;
- running: number;
- scheduled: number;
- dead: number;
- oldestPendingMinutes?: number | null;
+export interface WikiQuery {
+ q?: string | null;
+ tag?: string | null;
+ limit?: number | null;
+ offset?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SummarizerHealth".
+ * via the `definition` "WikiPageQuery".
*/
-export interface SummarizerHealth {
- eligible: boolean;
- activeTail: boolean;
- belowFloor: boolean;
+export interface WikiPageQuery {
+ slug: WikiSlug;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureHealth".
+ * via the `definition` "WikiHistoryEntry".
*/
-export interface CaptureHealth {
- status: CaptureStatus;
- impact: string;
+export interface WikiHistoryEntry {
+ date: string;
+ title: string;
+ body: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PendingTagWire".
+ * via the `definition` "WikiCitation".
*/
-export interface PendingTagWire {
- id: string;
- entityType: TagEntityType;
- entityId: string;
- key: string;
- value: string;
- display: string;
- source: string;
- state: TagState;
- confidence?: number | null;
- proposedBy: string;
- reason: string;
- decidedBy?: string | null;
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
- action?: PendingTagAction | null;
- sessionKey?: string | null;
+export interface WikiCitation {
+ summaryId: string;
+ date?: Millis | null;
+ kind?: string | null;
+ note?: string | null;
+ conversationId?: string | null;
+ sessionId?: SessionId | null;
title?: string | null;
- agent?: string | null;
+ channel?: string | null;
+ topicId?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "WikiSource".
+ */
+export interface WikiSource {
+ kind: WikiSourceKind;
+ ids: string[];
conversationId?: string | null;
- excerpt?: string | null;
+ span?: WikiSourceSpan | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsDecideRequest".
+ * via the `definition` "WikiSourceSpan".
*/
-export interface MemoryTagsDecideRequest {
- ids?: string[] | null;
- state?: TagState | null;
- decided_by?: string | null;
+export interface WikiSourceSpan {
+ earliest: Millis;
+ latest: Millis;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsAddRequest".
+ * via the `definition` "WikiPageResponse".
*/
-export interface MemoryTagsAddRequest {
- entity_type?: string | null;
- entity_id?: string | null;
- session_key?: string | null;
- agent?: string | null;
- tag?: string | null;
- key?: string | null;
- value?: string | null;
- display?: string | null;
- reason?: string | null;
- decided_by?: string | null;
+export interface WikiPageResponse {
+ slug: string;
+ title: string;
+ aliases: string[];
+ tags: string[];
+ entities: string[];
+ currentState: string;
+ article?: string | null;
+ seeAlso?: string[] | null;
+ history: WikiHistoryEntry[];
+ citations: WikiCitation[];
+ markdown: string;
+ sources: WikiSource[];
+ gitSha?: string | null;
+ lastVerified?: Millis | null;
+ updatedAt: Millis;
+ related?: string[] | null;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsLookupRequest".
+ * via the `definition` "WikiMissSuggestion".
*/
-export interface MemoryTagsLookupRequest {
- session_keys?: string[] | null;
- states?: string[] | null;
+export interface WikiMissSuggestion {
+ slug: string;
+ title: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyEntry".
+ * via the `definition` "WikiMissBody".
*/
-export interface TagTaxonomyEntry {
- key: string;
- value: string;
- display: string;
- parentValue?: string | null;
- aliases: string[];
- state: TagState;
- source: string;
- reason: string;
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
+export interface WikiMissBody {
+ error: string;
+ suggestions: WikiMissSuggestion[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyWire".
+ * via the `definition` "WikiRedLink".
*/
-export interface TagTaxonomyWire {
- key: string;
- entries: TagTaxonomyEntry[];
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
+export interface WikiRedLink {
+ entity: string;
+ referencedBy: string[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyUpsertRequest".
+ * via the `definition` "WikiGapsResponse".
*/
-export interface TagTaxonomyUpsertRequest {
- key?: string | null;
- value?: string | null;
- display?: string | null;
- parent_value?: string | null;
- aliases?: string[] | null;
- reason?: string | null;
- decided_by?: string | null;
+export interface WikiGapsResponse {
+ redLinks: WikiRedLink[];
+ stalest: WikiTopic[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyDecideRequest".
+ * via the `definition` "WikiTopic".
*/
-export interface TagTaxonomyDecideRequest {
- entries?: TagEntryPair[] | null;
- state?: TagState | null;
- decided_by?: string | null;
+export interface WikiTopic {
+ slug: string;
+ title: string;
+ tags: string[];
+ entities: string[];
+ updatedAt: Millis;
+ excerpt: string;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyMerge".
+ * via the `definition` "WikiTopicList".
*/
-export interface TagTaxonomyMerge {
- key: string;
- from: string;
- into: string;
+export interface WikiTopicList {
+ topics: WikiTopic[];
+ total: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyMergeRequest".
+ * via the `definition` "TidySample".
*/
-export interface TagTaxonomyMergeRequest {
- key?: string | null;
- from?: string | null;
- into?: string | null;
+export interface TidySample {
+ id: string;
+ title?: string | null;
+ lastActive?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyMergeResult".
+ * via the `definition` "TidyEvidence".
*/
-export interface TagTaxonomyMergeResult {
- moved: number;
- dropped: number;
- into: string;
+export interface TidyEvidence {
+ sessions: number;
+ samples?: TidySample[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagCount".
+ * via the `definition` "TidyProposal".
*/
-export interface TagCount {
- key: string;
- value: string;
- display: string;
- conversations: number;
+export interface TidyProposal {
+ id: string;
+ batchId: string;
+ change: TidyChange;
+ reason: string;
+ evidence: TidyEvidence;
+ proposedBy: Proposer;
+ proposedAt: number;
+ state: ProposalState;
+ decidedAt?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagListResult".
+ * via the `definition` "TidyBatch".
*/
-export interface TagListResult {
- tags: TagWire[];
+export interface TidyBatch {
+ batchId: string;
+ proposedBy: Proposer;
+ proposedAt: number;
+ proposals: TidyProposal[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PendingTagListResult".
+ * via the `definition` "TidyPending".
*/
-export interface PendingTagListResult {
- tags: PendingTagWire[];
+export interface TidyPending {
+ batches: TidyBatch[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagCountsResult".
+ * via the `definition` "TidyFailure".
*/
-export interface TagCountsResult {
- counts: TagCount[];
+export interface TidyFailure {
+ proposalId: string;
+ error: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyListResult".
+ * via the `definition` "TidyBatchDecision".
*/
-export interface TagTaxonomyListResult {
- entries: TagTaxonomyEntry[];
+export interface TidyBatchDecision {
+ decided: TidyProposal[];
+ failed?: TidyFailure[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagDecisionResult".
+ * via the `definition` "FilingUpkeep".
*/
-export interface TagDecisionResult {
- changed: number;
+export interface FilingUpkeep {
+ categorizer: number;
+ you: number;
+ uncategorized: number;
+ leftOut: number;
+ correctionsLastWeek: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagAddResult".
+ * via the `definition` "EntityTypeCount".
*/
-export interface TagAddResult {
- tag: TagWire;
+export interface EntityTypeCount {
+ typeId: string;
+ name: string;
+ entities: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagLookupResult".
+ * via the `definition` "WikiUpkeep".
*/
-export interface TagLookupResult {
- sessions: {
- [k: string]: TagWire[];
- };
+export interface WikiUpkeep {
+ topicPages: number;
+ entityTypes: EntityTypeCount[];
+ loosePages: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyUpsertResult".
+ * via the `definition` "WorkerActivity".
*/
-export interface TagTaxonomyUpsertResult {
- entry: TagTaxonomyEntry;
+export interface WorkerActivity {
+ lastFinishedAt?: number | null;
+ failing: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ProjectRuleResult".
+ * via the `definition` "WorkerUpkeep".
*/
-export interface ProjectRuleResult {
- key: string;
- rule: ProjectRule;
- gitRoot?: string | null;
+export interface WorkerUpkeep {
+ embedder: WorkerActivity;
+ summarizer: WorkerActivity;
+ categorizer: WorkerActivity;
+ wikiBuilder: WorkerActivity;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HealthzResponse".
+ * via the `definition` "MemoryUpkeep".
*/
-export interface HealthzResponse {
- ok: boolean;
- sessions: number;
+export interface MemoryUpkeep {
+ filing: FilingUpkeep;
+ wiki: WikiUpkeep;
+ workers: WorkerUpkeep;
+ pendingProposals: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopicRecord".
+ */
+export interface TopicRecord {
+ id: string;
+ kind?: "work" | "type" | "entity";
+ slug: string;
name: string;
- node: string;
- degraded?: string | null;
- degradedProviders?: DegradedProvider[];
+ aliases: string[];
+ parent?: string | null;
+ directory?: TopicDirectory | null;
+ createdAt: number;
+ updatedAt: number;
+ closedAt?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DegradedProvider".
+ * via the `definition` "TopicSummary".
*/
-export interface DegradedProvider {
+export interface TopicSummary {
id: string;
- recovery: ProviderRecovery;
- reason: string;
+ kind?: "work" | "type" | "entity";
+ slug: string;
+ name: string;
+ aliases: string[];
+ parent?: string | null;
+ directory?: TopicDirectory | null;
+ createdAt: number;
+ updatedAt: number;
+ closedAt?: number | null;
+ sessionCount: number;
+ lastActive?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "GatewayError".
+ * via the `definition` "TopicList".
*/
-export interface GatewayError {
- error: string;
- detail?: string | null;
- hint?: string | null;
- code?: string | null;
- harnessId?: HarnessId | null;
- node?: string | null;
- retryable?: boolean | null;
- reason?: string | null;
+export interface TopicList {
+ topics: TopicSummary[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "OkReply".
+ * via the `definition` "TopicCreateRequest".
*/
-export interface OkReply {
- ok: boolean;
+export interface TopicCreateRequest {
+ kind?: "work" | "type" | "entity";
+ name: string;
+ aliases?: string[];
+ parent?: string | null;
+ directory?: TopicDirectory | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "EventsIngested".
+ * via the `definition` "WikiPageEdit".
*/
-export interface EventsIngested {
- ok: boolean;
- ingested: number;
+export interface WikiPageEdit {
+ currentState?: string | null;
+ article?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PairRedeemRequest".
+ * via the `definition` "TopicUpdate".
*/
-export interface PairRedeemRequest {
- token: string;
- csr?: string | null;
+export interface TopicUpdate {
+ name?: string | null;
+ aliases?: string[] | null;
+ parent?: string | null;
+ directory?: TopicDirectory | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "RosterFile".
+ * via the `definition` "TopicMergeRequest".
*/
-export interface RosterFile {
- default: string;
- cwd?: string | null;
- env?: {
- [k: string]: string;
- };
- commands: {
- [k: string]: RosterEntry;
- };
+export interface TopicMergeRequest {
+ into: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "RosterEntry".
+ * via the `definition` "TopicPlacement".
*/
-export interface RosterEntry {
- label: string;
- cmd: string[];
- room?: boolean | null;
- cwd?: string | null;
- env?: {
- [k: string]: string;
- };
+export interface TopicPlacement {
+ sessionId: SessionId;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TranscriptTurn".
+ * via the `definition` "TopicSuggestion".
*/
-export interface TranscriptTurn {
- role: Role;
- text: string;
- ts?: number | null;
+export interface TopicSuggestion {
+ name: string;
+ topicId?: string | null;
+ parentId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TranscriptResponse".
+ * via the `definition` "PlacementReply".
*/
-export interface TranscriptResponse {
- id: string;
- command: string;
- turns: TranscriptTurn[];
- contextWindow?: number | null;
- compactAt?: number | null;
- contextSource?: ContextSource | null;
+export interface PlacementReply {
+ placement?: TopicPlacement | null;
+ suggestion?: TopicSuggestion | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionSummary".
+ * via the `definition` "PlacementRequest".
*/
-export interface SessionSummary {
- id: string;
- lastActive: number;
- messages: number;
+export interface PlacementRequest {
+ topicId: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionList".
+ * via the `definition` "SessionHistoryMark".
*/
-export interface SessionList {
- sessions: SessionSummary[];
+export interface SessionHistoryMark {
+ sessionId: SessionId;
+ markedAt: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MessageList".
+ * via the `definition` "SessionHistoryList".
*/
-export interface MessageList {
- messages: SessionMessage[];
+export interface SessionHistoryList {
+ sessions: SessionHistoryMark[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionMessage".
+ * via the `definition` "TopicSession".
*/
-export interface SessionMessage {
- id: string;
- sessionId: string;
- role: SessionMessageRole;
- text: string;
- ts: number;
- usage?: MessageUsage | null;
- model?: string | null;
- durationMs?: number | null;
- thinking?: boolean | null;
- tools?: string[] | null;
+export interface TopicSession {
+ sessionId: SessionId;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
+ title?: string | null;
+ lastActive?: number | null;
+ node?: string | null;
+ parentSessionId?: SessionId | null;
+ taskId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MessageUsage".
+ * via the `definition` "TopicSessionList".
*/
-export interface MessageUsage {
- promptTokens: number;
- completionTokens: number;
- cachedTokens: number;
+export interface TopicSessionList {
+ sessions: TopicSession[];
+ conversations?: TopicConversation[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionPostRequest".
+ * via the `definition` "TopicConversation".
*/
-export interface SessionPostRequest {
- excludeTools?: string[] | null;
- text: string;
- userId?: string | null;
- agent?: string | null;
- thinking?: ThinkingLevel | null;
- systemPrompt?: string | null;
+export interface TopicConversation {
+ conversationId: string;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
+ channel: string;
+ title?: string | null;
+ lastActive?: number | null;
+ node?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionPostAccepted".
+ * via the `definition` "TopicFiling".
*/
-export interface SessionPostAccepted {
- accepted: boolean;
- session: string;
+export interface TopicFiling {
+ sessions: TopicSession[];
+ conversations: TopicConversation[];
+ history: SessionHistoryMark[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionPostReply".
+ * via the `definition` "SessionSuggestion".
*/
-export interface SessionPostReply {
- message: SessionMessage;
+export interface SessionSuggestion {
+ sessionId: SessionId;
+ name: string;
+ topicId?: string | null;
+ parentId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionWsClientMessage".
+ * via the `definition` "SessionSuggestionList".
*/
-export interface SessionWsClientMessage {
- type: SessionClientKind;
- session: string;
+export interface SessionSuggestionList {
+ sessions: SessionSuggestion[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StreamEvent".
+ * via the `definition` "ConversationPlacement".
*/
-export interface StreamEvent {
- type: StreamEventKind;
- content: string;
- metadata?: {
- [k: string]: unknown;
- } | null;
-}
-export interface TranscriptWsFrame {
- kind: "transcript";
+export interface ConversationPlacement {
+ conversationId: string;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessTranscriptTurn".
+ * via the `definition` "ConversationPlacementReply".
*/
-export interface HarnessTranscriptTurn {
- role: SessionMessageRole;
- text: string;
- thinking?: string | null;
- tools?: HarnessTranscriptTool[] | null;
- usage?: MessageUsage | null;
- model?: string | null;
- stopReason?: string | null;
- lastBlock?: TranscriptBlock | null;
- complete?: boolean;
- compact?: boolean;
+export interface ConversationPlacementReply {
+ placement?: ConversationPlacement | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessTranscriptTool".
+ * via the `definition` "TopicPage".
*/
-export interface HarnessTranscriptTool {
- name: string;
- status: TranscriptToolStatus;
- args?: {
- [k: string]: unknown;
- } | null;
- id?: string | null;
- input?: {
- [k: string]: unknown;
- } | null;
- resultText?: string | null;
+export interface TopicPage {
+ topic: TopicRecord;
+ page?: WikiPageResponse | null;
+ mentions?: TopicMention[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TranscriptWsFrame".
+ * via the `definition` "TopicMention".
*/
-export interface TranscriptWsFrame1 {
- session: string;
- rev: number;
- from: number;
- turns: HarnessTranscriptTurn[];
- total: number;
- command: string;
- truncatedBefore?: boolean | null;
+export interface TopicMention {
+ topicId: string;
+ name: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionTranscriptResponse".
+ * via the `definition` "TopicDecision".
*/
-export interface HarnessSessionTranscriptResponse {
- sessionId: SessionId;
- harnessId: HarnessId;
- turns: HarnessTranscriptTurn[];
- contextWindow: number;
- compactAt: number;
- contextSource: ContextSource;
- redirectedTo?: SessionId | null;
+export interface TopicDecision {
+ id: string;
+ topicId: string;
+ text: string;
+ status: DecisionStatus;
+ supersededBy?: string | null;
+ by: string;
+ sessionId?: SessionId | null;
+ createdAt: number;
+ updatedAt: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessTurnAccepted".
+ * via the `definition` "TopicDecisionList".
*/
-export interface HarnessTurnAccepted {
- ok: boolean;
- sessionId: SessionId;
- redirectedTo?: SessionId | null;
- dismissedDialog?: boolean;
+export interface TopicDecisionList {
+ decisions: TopicDecision[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionResponse".
+ * via the `definition` "DecisionCreateRequest".
*/
-export interface HarnessSessionResponse {
- sessionId: SessionId;
- harnessId: HarnessId;
- title?: string | null;
- cwd?: string | null;
- createdAt: Millis;
- updatedAt: Millis;
- status: HarnessSessionStatus;
- blocked?: boolean | null;
- supersedes?: SessionId | null;
- model?: string | null;
- parentSessionId?: SessionId | null;
- agentName?: string | null;
- taskId?: string | null;
- effort?: string | null;
- transport?: Transport | null;
- redirectedTo?: SessionId | null;
- [k: string]: unknown;
+export interface DecisionCreateRequest {
+ text: string;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermSpawnRequest".
+ * via the `definition` "DecisionUpdate".
*/
-export interface TermSpawnRequest {
- command?: string | null;
- model?: string | null;
- effort?: string | null;
- session?: string | null;
- resume?: string | null;
- agentId?: string | null;
- force?: boolean | null;
- cols?: number | null;
- rows?: number | null;
+export interface DecisionUpdate {
+ text: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermAttachInfo".
+ * via the `definition` "DecisionSupersedeRequest".
*/
-export interface TermAttachInfo {
- socket: string;
- session: string;
- host: string;
- sshUser: string;
- local: boolean;
+export interface DecisionSupersedeRequest {
+ text?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermSpawnResponse".
+ * via the `definition` "DecisionSuperseded".
*/
-export interface TermSpawnResponse {
- harnessSessionId?: SessionId | null;
- id: string;
- denSession: string;
- command: string;
- cwd?: string | null;
- pid: number;
- createdAt: number;
- mux?: Mux | null;
- reattached?: boolean | null;
- attach?: TermAttachInfo | null;
+export interface DecisionSuperseded {
+ superseded: TopicDecision;
+ replacement?: TopicDecision | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PtyInfo".
+ * via the `definition` "AgentUsage".
*/
-export interface PtyInfo {
- id: string;
- denSession: string;
- command: string;
- state: PtyState;
- pid?: number | null;
- attached: number;
- exitCode?: number | null;
- createdAt: number;
- lastOutputTs?: number | null;
- cols?: number | null;
- rows?: number | null;
- mux?: Mux | null;
- persisted?: boolean | null;
- reattached?: boolean | null;
- attach?: TermAttachInfo | null;
+export interface AgentUsage {
+ promptTokens: number;
+ completionTokens: number;
+ cachedTokens: number;
+}
+export interface AgentEvent1 {
+ v: ProtocolVersion;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PtyList".
+ * via the `definition` "LiveSessionSummary".
*/
-export interface PtyList {
- ptys: PtyInfo[];
+export interface LiveSessionSummary {
+ id: string;
+ name: string;
+ harness?: SessionHarness | null;
+ lastEventTs?: number | null;
+ pty?: string | null;
+ contextWindow?: number | null;
+ compactAt?: number | null;
+ contextSource?: ContextSource | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermCommand".
+ * via the `definition` "SessionLogLine".
*/
-export interface TermCommand {
- id: string;
- label: string;
- room: boolean;
+export interface SessionLogLine {
+ who: string;
+ text: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermConfig".
+ * via the `definition` "SessionView".
*/
-export interface TermConfig {
- enabled: boolean;
- default: string;
- maxPtys: number;
- active: number;
- commands: TermCommand[];
+export interface SessionView {
+ title: string;
+ activity: Activity;
+ tool?: string | null;
+ tasks: string[];
+ thought: string;
+ lastMessage: string;
+ log: SessionLogLine[];
+ term: string[];
+ ended: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermInjectRequest".
+ * via the `definition` "LiveSessionList".
*/
-export interface TermInjectRequest {
- session: string;
- text: string;
- submit?: boolean | null;
- interrupt?: boolean | null;
- bypassDialogGate?: boolean | null;
+export interface LiveSessionList {
+ sessions: LiveSessionSummary[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TermInjectResponse".
+ * via the `definition` "StateResponse".
*/
-export interface TermInjectResponse {
- ok: boolean;
- ptyId: string;
- dismissedDialog?: boolean | null;
+export interface StateResponse {
+ session: string;
+ state: SessionView;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceOwner".
+ * via the `definition` "snapshot".
*/
-export interface DeviceOwner {
- device?: string | null;
- self: boolean;
+export interface Snapshot {
+ v: ProtocolVersion;
+ sessions: LiveSessionSummary[];
+ rooms: {
+ [k: string]: SessionView;
+ };
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "UploadCreated".
+ * via the `definition` "session.removed".
*/
-export interface UploadCreated {
- id: string;
- name: string;
- bytes: number;
- mediaType: string;
- expiresAt: string;
- session?: string | null;
+export interface SessionRemoved {
+ v: ProtocolVersion;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "UploadList".
+ * via the `definition` "SessionBroadcast".
*/
-export interface UploadList {
- uploads: UploadCreated[];
+export interface SessionBroadcast {
+ [k: string]: unknown;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "UsersRegistry".
+ * via the `definition` "CaptureBatchRequest".
*/
-export interface UsersRegistry {
- ownerUserId: string;
- unmappedIsOwner: boolean;
- localStores?: boolean | null;
- users: {
- [k: string]: UserRecord;
- };
+export interface CaptureBatchRequest {
+ session_key: string;
+ agent: string;
+ channel?: string | null;
+ title?: string | null;
+ settings?: {
+ [k: string]: unknown;
+ } | null;
+ task_id?: string | null;
+ finalize?: boolean | null;
+ created_at?: Millis | null;
+ updated_at?: Millis | null;
+ messages: CaptureMessage[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "UserRecord".
+ * via the `definition` "CaptureMessage".
*/
-export interface UserRecord {
- id?: string | null;
- devices?: string[] | null;
- pgUrl?: string | null;
- envFile?: string | null;
- persona?: string | null;
+export interface CaptureMessage {
+ event_id: string;
+ role: Role;
+ content: string;
+ tool_name?: string | null;
+ tool_args?: {
+ [k: string]: unknown;
+ } | null;
+ tool_result?: string | null;
+ metadata?: {
+ [k: string]: unknown;
+ } | null;
+ created_at?: Millis | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ChatRequest".
+ * via the `definition` "CaptureResult".
*/
-export interface ChatRequest {
- model: string;
- messages: OpenAiMessage[];
- stream?: boolean | null;
- max_tokens?: number | null;
- stream_options?: StreamOptions | null;
+export interface CaptureResult {
+ ok: boolean;
+ conversation_id: string;
+ inserted: number;
+ skipped: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "OpenAiMessage".
+ * via the `definition` "HookContextBase".
*/
-export interface OpenAiMessage {
- role: Role;
- content?: string | null;
- reasoning_content?: string | null;
- tool_calls?: MessageToolCall[] | null;
- tool_call_id?: string | null;
-}
-export interface StreamedPlainToolCall {
- type: "function";
+export interface HookContextBase {
+ agentId?: string | null;
+ sessionId?: string | null;
+ timestamp: number;
+ metadata: {
+ [k: string]: unknown;
+ };
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StreamOptions".
+ * via the `definition` "HookUsage".
*/
-export interface StreamOptions {
- include_usage: boolean;
+export interface HookUsage {
+ promptTokens: number;
+ completionTokens: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "FunctionDelta".
+ * via the `definition` "SessionTokens".
*/
-export interface FunctionDelta {
- name?: string | null;
- arguments?: string | null;
+export interface SessionTokens {
+ prompt: number;
+ completion: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StreamedPlainToolCall".
+ * via the `definition` "TurnComplexity".
*/
-export interface StreamedPlainToolCall1 {
- index?: number | null;
- id?: string | null;
- function: FunctionDelta;
+export interface TurnComplexity {
+ toolCallCount: number;
+ hadErrorRecovery: boolean;
+ hadUserCorrection: boolean;
+ uniqueTools: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "chat.completion".
+ * via the `definition` "Message".
*/
-export interface ChatCompletion {
- id: string;
- created: number;
- model: string;
- choices: CompletionChoice[];
- usage?: Usage | null;
+export interface Message {
+ role: Role;
+ content: MessageContent;
+ reasoning?: string | null;
+ toolCalls?: ToolCall[] | null;
+ toolCallId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CompletionChoice".
+ * via the `definition` "ToolCall".
*/
-export interface CompletionChoice {
- index: number;
- message: OpenAiMessage;
- finish_reason: FinishReason;
+export interface ToolCall {
+ id: string;
+ name: string;
+ arguments: {
+ [k: string]: unknown;
+ };
+ thoughtSignature?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "Usage".
+ * via the `definition` "HookPipelineError".
*/
-export interface Usage {
- prompt_tokens: number;
- completion_tokens: number;
- total_tokens: number;
- prompt_tokens_details?: PromptTokensDetails | null;
- completion_tokens_details?: CompletionTokensDetails | null;
+export interface HookPipelineError {
+ hookId: string;
+ error: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptTokensDetails".
+ * via the `definition` "HookPipelineResult".
*/
-export interface PromptTokensDetails {
- cached_tokens: number;
+export interface HookPipelineResult {
+ context: HookContext;
+ aborted: boolean;
+ skipped: boolean;
+ errors: HookPipelineError[];
+ ran: string[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CompletionTokensDetails".
+ * via the `definition` "HookConfig".
*/
-export interface CompletionTokensDetails {
- reasoning_tokens: number;
+export interface HookConfig {
+ id: string;
+ event: HookEventName;
+ type: HookConfigKind;
+ target: string;
+ priority?: number | null;
+ onError?: HookErrorMode | null;
+ agentFilter?: string[] | null;
+ toolFilter?: string[] | null;
+ description?: string | null;
+ enabled?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "chat.completion.chunk".
+ * via the `definition` "ApprovalOption".
*/
-export interface ChatCompletionChunk {
- id: string;
- created: number;
- model: string;
- choices: ChunkChoice[];
- usage?: Usage | null;
+export interface ApprovalOption {
+ key: string;
+ label: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ChunkChoice".
+ * via the `definition` "HarnessSessionSummary".
*/
-export interface ChunkChoice {
- index: number;
- delta: CompletionDelta;
- finish_reason?: FinishReason | null;
+export interface HarnessSessionSummary {
+ sessionId: SessionId;
+ harnessId: HarnessId;
+ title?: string | null;
+ cwd?: string | null;
+ createdAt: Millis;
+ updatedAt: Millis;
+ status: HarnessSessionStatus;
+ blocked?: boolean | null;
+ supersedes?: SessionId | null;
+ model?: string | null;
+ parentSessionId?: SessionId | null;
+ agentName?: string | null;
+ taskId?: string | null;
+ effort?: string | null;
+ transport?: Transport | null;
+ startupContext?: StartupContext | null;
+ [k: string]: unknown;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CompletionDelta".
+ * via the `definition` "PlanEntry".
*/
-export interface CompletionDelta {
- role?: Role | null;
- content?: string | null;
- reasoning_content?: string | null;
+export interface PlanEntry {
+ content: string;
+ status: PlanStatus;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "list".
+ * via the `definition` "LlmUsage".
*/
-export interface List {
- data: Model[];
+export interface LlmUsage {
+ promptTokens: number;
+ completionTokens: number;
+ reasoningTokens?: number | null;
+ cachedTokens?: number | null;
+ cacheCreationTokens?: number | null;
+ cacheReadTokens?: number | null;
+}
+export interface HarnessStatusFrame {
+ type: "status";
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "model".
+ * via the `definition` "PromptQuestion".
*/
-export interface Model {
- id: string;
- created: number;
- owned_by: string;
+export interface PromptQuestion {
+ question?: string | null;
+ header?: string | null;
+ multiSelect: boolean;
+ freeText?: boolean | null;
+ options: PromptOption[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ErrorDetail".
+ * via the `definition` "PromptOption".
*/
-export interface ErrorDetail {
- message: string;
- type: ErrorKind;
+export interface PromptOption {
+ label: string;
+ description?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ErrorResponse".
+ * via the `definition` "PromptResolution".
*/
-export interface ErrorResponse {
- error: ErrorDetail;
+export interface PromptResolution {
+ at: number;
+ answerText?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "Conversation".
+ * via the `definition` "PromptScreen".
*/
-export interface Conversation {
- id: string;
- title: string;
- createdAt: number;
- updatedAt: number;
- messages: OpenAiMessage[];
+export interface PromptScreen {
+ current: number;
+ total: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "Conversations".
+ * via the `definition` "StatusTool".
*/
-export interface Conversations {
- conversations: Conversation[];
+export interface StatusTool {
+ name: string;
+ toolCallId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ConversationTitle".
+ * via the `definition` "HarnessStatusFrame".
*/
-export interface ConversationTitle {
- title: string;
+export interface HarnessStatusFrame1 {
+ sessionId: SessionId;
+ status: HarnessStatus;
+ since: number;
+ source?: StatusSource | null;
+ phase?: StatusPhase | null;
+ tool?: StatusTool | null;
+ promptId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiQuery".
+ * via the `definition` "HarnessCapabilities".
*/
-export interface WikiQuery {
- q?: string | null;
- tag?: string | null;
- limit?: number | null;
- offset?: number | null;
+export interface HarnessCapabilities {
+ interrupt: boolean;
+ resume: boolean;
+ approvals: boolean;
+ steering?: boolean | null;
+ liveStream: boolean;
+ listSessions: boolean;
+ drive?: boolean | null;
+ turnOptions?: boolean | null;
+ launchModel?: boolean | null;
+ imageAttachments?: boolean | null;
+ models?: HarnessModelOption[] | null;
+ modelsSource?: HarnessModelsSource | null;
+ efforts?: EffortOption[] | null;
+ modelFlag?: string | null;
+ effortFlag?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiPageQuery".
+ * via the `definition` "HarnessModelOption".
*/
-export interface WikiPageQuery {
- slug: WikiSlug;
+export interface HarnessModelOption {
+ inputModalities?: string[] | null;
+ id: string;
+ label: string;
+ isDefault?: boolean | null;
+ efforts?: EffortOption[] | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiHistoryEntry".
+ * via the `definition` "EffortOption".
*/
-export interface WikiHistoryEntry {
- date: string;
- title: string;
- body: string;
+export interface EffortOption {
+ id: string;
+ label: string;
+ isDefault?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiCitation".
+ * via the `definition` "HarnessControlCapabilities".
*/
-export interface WikiCitation {
- summaryId: string;
- date?: Millis | null;
- kind?: string | null;
- note?: string | null;
+export interface HarnessControlCapabilities {
+ interrupt: boolean;
+ resume: boolean;
+ approvals: boolean;
+ steering?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSource".
+ * via the `definition` "HarnessObservationCapabilities".
*/
-export interface WikiSource {
- kind: WikiSourceKind;
- ids: string[];
- conversationId?: string | null;
- span?: WikiSourceSpan | null;
+export interface HarnessObservationCapabilities {
+ liveStream: boolean;
+ listSessions: boolean;
+ drive?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSourceSpan".
+ * via the `definition` "HarnessSessionCreateRequest".
*/
-export interface WikiSourceSpan {
- earliest: Millis;
- latest: Millis;
+export interface HarnessSessionCreateRequest {
+ harness?: HarnessId | null;
+ model?: string | null;
+ cwd?: string | null;
+ agentId?: string | null;
+ topicId?: string | null;
+ prompt?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiPageResponse".
+ * via the `definition` "HarnessSessionList".
*/
-export interface WikiPageResponse {
- slug: string;
- title: string;
- aliases: string[];
- tags: string[];
- entities: string[];
- currentState: string;
- article?: string | null;
- seeAlso?: string[] | null;
- history: WikiHistoryEntry[];
- citations: WikiCitation[];
- markdown: string;
- sources: WikiSource[];
- gitSha?: string | null;
- lastVerified?: Millis | null;
- updatedAt: Millis;
- related?: string[] | null;
+export interface HarnessSessionList {
+ sessions: HarnessSessionSummary[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiMissSuggestion".
+ * via the `definition` "HarnessOffering".
*/
-export interface WikiMissSuggestion {
- slug: string;
- title: string;
+export interface HarnessOffering {
+ harnessId: HarnessId;
+ chat: boolean;
+ capabilities: HarnessCapabilities;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiMissBody".
+ * via the `definition` "HarnessOfferingList".
*/
-export interface WikiMissBody {
- error: string;
- suggestions: WikiMissSuggestion[];
+export interface HarnessOfferingList {
+ harnesses: HarnessOffering[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiRedLink".
+ * via the `definition` "HarnessStoreSession".
*/
-export interface WikiRedLink {
- entity: string;
- referencedBy: string[];
+export interface HarnessStoreSession {
+ id: string;
+ command: RosterCommand;
+ title: string;
+ updatedAt: number;
+ parentSessionId?: string | null;
+ agentName?: string | null;
+ model?: string | null;
+ taskId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiGapsResponse".
+ * via the `definition` "HarnessStoreSessionList".
*/
-export interface WikiGapsResponse {
- redLinks: WikiRedLink[];
- stalest: string[];
+export interface HarnessStoreSessionList {
+ sessions: HarnessStoreSession[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiTopic".
+ * via the `definition` "task.done".
*/
-export interface WikiTopic {
- slug: string;
- title: string;
- tags: string[];
- entities: string[];
- updatedAt: Millis;
- excerpt: string;
+export interface TaskDone {
+ taskId: string;
+ status: TaskStatus;
+ parentSessionId?: string | null;
+ childSessionId?: string | null;
+ ts: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiTopicList".
+ * via the `definition` "AcceptanceCriterion".
*/
-export interface WikiTopicList {
- topics: WikiTopic[];
- total: number;
+export interface AcceptanceCriterion {
+ id: string;
+ description: string;
+ kind: CriterionKind;
+ check?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentUsage".
+ * via the `definition` "TaskBudget".
*/
-export interface AgentUsage {
- promptTokens: number;
- completionTokens: number;
- cachedTokens: number;
+export interface TaskBudget {
+ maxTurns?: number | null;
+ maxWallClockMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "LiveSessionSummary".
+ * via the `definition` "TaskUsage".
*/
-export interface LiveSessionSummary {
- id: string;
- name: string;
- harness?: SessionHarness | null;
- lastEventTs?: number | null;
- pty?: string | null;
- contextWindow?: number | null;
- compactAt?: number | null;
- contextSource?: ContextSource | null;
+export interface TaskUsage {
+ inputTokens?: number | null;
+ outputTokens?: number | null;
+ totalTokens?: number | null;
+ turns: number;
+ wallClockMs: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionLogLine".
+ * via the `definition` "TaskResult".
*/
-export interface SessionLogLine {
- who: string;
- text: string;
+export interface TaskResult {
+ verdict: TaskVerdict;
+ summary: string;
+ usage: TaskUsage;
+ error?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionView".
+ * via the `definition` "TaskWire".
*/
-export interface SessionView {
- title: string;
- activity: Activity;
- tool?: string | null;
- tasks: string[];
- thought: string;
- lastMessage: string;
- log: SessionLogLine[];
- term: string[];
- ended: boolean;
+export interface TaskWire {
+ id: string;
+ goal: string;
+ acceptanceCriteria: AcceptanceCriterion[];
+ agentId: string;
+ node: string;
+ harness?: HarnessId | null;
+ model?: string | null;
+ effort?: string | null;
+ requestedBy?: string | null;
+ parentSessionId?: string | null;
+ parentTaskId?: string | null;
+ depth: number;
+ childSessionId?: string | null;
+ budget: TaskBudget;
+ usage?: TaskUsage | null;
+ status: TaskStatus;
+ error?: string | null;
+ result?: TaskResult | null;
+ createdAt: number;
+ startedAt?: number | null;
+ completedAt?: number | null;
+ durationMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "LiveSessionList".
+ * via the `definition` "TaskCreateRequest".
*/
-export interface LiveSessionList {
- sessions: LiveSessionSummary[];
+export interface TaskCreateRequest {
+ goal?: string | null;
+ agentId?: string | null;
+ nodeAffinity?: string | null;
+ acceptanceCriteria?: AcceptanceCriterion[] | null;
+ budget?: TaskBudget | null;
+ parentSessionId?: string | null;
+ model?: string | null;
+ effort?: ThinkingLevel | null;
+ workingDir?: string | null;
+ requestedBy?: string | null;
+ [k: string]: unknown;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StateResponse".
+ * via the `definition` "TaskResponse".
*/
-export interface StateResponse {
- session: string;
- state: SessionView;
+export interface TaskResponse {
+ task: TaskWire;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "snapshot".
+ * via the `definition` "TasksListResponse".
*/
-export interface Snapshot {
- v: ProtocolVersion;
- sessions: LiveSessionSummary[];
- rooms: {
- [k: string]: SessionView;
- };
+export interface TasksListResponse {
+ tasks: TaskWire[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "session.removed".
+ * via the `definition` "TaskKillResponse".
*/
-export interface SessionRemoved {
- v: ProtocolVersion;
- session: string;
+export interface TaskKillResponse {
+ ok: boolean;
+ prior?: TaskStatus | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureBatchRequest".
+ * via the `definition` "TaskWaitTimeoutResponse".
*/
-export interface CaptureBatchRequest {
- session_key: string;
- agent: string;
- channel?: string | null;
- title?: string | null;
- settings?: {
- [k: string]: unknown;
- } | null;
- task_id?: string | null;
- finalize?: boolean | null;
- created_at?: Millis | null;
- updated_at?: Millis | null;
- messages: CaptureMessage[];
+export interface TaskWaitTimeoutResponse {
+ error: string;
+ task?: TaskWire | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureMessage".
+ * via the `definition` "MemorySearchResult".
*/
-export interface CaptureMessage {
- event_id: string;
- role: Role;
+export interface MemorySearchResult {
+ chunk?: MemoryChunkMatch | null;
+ id: string;
+ source: MemoryHitSource;
content: string;
- tool_name?: string | null;
- tool_args?: {
- [k: string]: unknown;
- } | null;
- tool_result?: string | null;
- metadata?: {
- [k: string]: unknown;
- } | null;
- created_at?: Millis | null;
+ role?: Role | null;
+ agent?: string | null;
+ relevanceScore: number;
+ createdAt: string;
+ sessionId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureResult".
+ * via the `definition` "PluginManifest".
*/
-export interface CaptureResult {
- ok: boolean;
- conversation_id: string;
- inserted: number;
- skipped: number;
+export interface PluginManifest {
+ $schema?: string | null;
+ manifest: ProtocolVersion;
+ id: PluginId;
+ name: string;
+ version: string;
+ description: string;
+ icon?: string | null;
+ run: PluginRun;
+ permissions?: Permission[];
+ settings?: ViewField[];
+ tools?: PluginTool[];
+ contributes?: PluginContributions;
+ jobs?: PluginJob[];
+ events?: PluginEventKind[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HookContextBase".
+ * via the `definition` "PluginRun".
*/
-export interface HookContextBase {
- agentId?: string | null;
- sessionId?: string | null;
- timestamp: number;
- metadata: {
- [k: string]: unknown;
+export interface PluginRun {
+ command: string[];
+ env?: {
+ [k: string]: string;
};
+ readyTimeoutMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HookUsage".
+ * via the `definition` "ViewField".
*/
-export interface HookUsage {
- promptTokens: number;
- completionTokens: number;
+export interface ViewField {
+ key: string;
+ label: string;
+ input: ViewInput;
+ value?: ViewValue | null;
+ required?: boolean;
+ help?: string | null;
+ placeholder?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionTokens".
+ * via the `definition` "ViewOption".
*/
-export interface SessionTokens {
- prompt: number;
- completion: number;
+export interface ViewOption {
+ value: string;
+ label: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TurnComplexity".
+ * via the `definition` "ViewFile".
*/
-export interface TurnComplexity {
- toolCallCount: number;
- hadErrorRecovery: boolean;
- hadUserCorrection: boolean;
- uniqueTools: number;
+export interface ViewFile {
+ name: string;
+ mimeType: string;
+ data: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "Message".
+ * via the `definition` "PluginTool".
*/
-export interface Message {
- role: Role;
- content: MessageContent;
- reasoning?: string | null;
- toolCalls?: ToolCall[] | null;
- toolCallId?: string | null;
+export interface PluginTool {
+ name: ToolName;
+ title?: string | null;
+ description: string;
+ inputSchema: {
+ [k: string]: unknown;
+ };
+ hints?: PluginToolHint[];
+}
+export interface PluginContributions {
+ pages?: PluginPage[];
+ topicCards?: PluginTopicCard[];
+ sessionActions?: PluginSessionAction[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ToolCall".
+ * via the `definition` "PluginPage".
*/
-export interface ToolCall {
- id: string;
- name: string;
- arguments: {
- [k: string]: unknown;
- };
- thoughtSignature?: string | null;
+export interface PluginPage {
+ id: RouteName;
+ title: string;
+ icon?: string | null;
+ view: RouteName;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HookPipelineError".
+ * via the `definition` "PluginTopicCard".
*/
-export interface HookPipelineError {
- hookId: string;
- error: string;
+export interface PluginTopicCard {
+ id: RouteName;
+ title: string;
+ view: RouteName;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HookPipelineResult".
+ * via the `definition` "PluginSessionAction".
*/
-export interface HookPipelineResult {
- context: HookContext;
- aborted: boolean;
- skipped: boolean;
- errors: HookPipelineError[];
- ran: string[];
+export interface PluginSessionAction {
+ id: RouteName;
+ title: string;
+ icon?: string | null;
+ action: ViewAction;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HookConfig".
+ * via the `definition` "PluginJob".
*/
-export interface HookConfig {
- id: string;
- event: HookEventName;
- type: HookConfigKind;
- target: string;
- priority?: number | null;
- onError?: HookErrorMode | null;
- agentFilter?: string[] | null;
- toolFilter?: string[] | null;
- description?: string | null;
- enabled?: boolean | null;
+export interface PluginJob {
+ id: RouteName;
+ title: string;
+ schedule?: string | null;
+ timeoutMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ApprovalOption".
+ * via the `definition` "PluginContributions".
*/
-export interface ApprovalOption {
- key: string;
- label: string;
+export interface PluginContributions1 {
+ pages?: PluginPage[];
+ topicCards?: PluginTopicCard[];
+ sessionActions?: PluginSessionAction[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionSummary".
+ * via the `definition` "View".
*/
-export interface HarnessSessionSummary {
- sessionId: SessionId;
- harnessId: HarnessId;
- title?: string | null;
- cwd?: string | null;
- createdAt: Millis;
- updatedAt: Millis;
- status: HarnessSessionStatus;
- blocked?: boolean | null;
- supersedes?: SessionId | null;
- model?: string | null;
- parentSessionId?: SessionId | null;
- agentName?: string | null;
- taskId?: string | null;
- effort?: string | null;
- transport?: Transport | null;
- [k: string]: unknown;
+export interface View {
+ title: string;
+ subtitle?: string | null;
+ toolbar?: ViewButton[];
+ blocks: ViewBlock[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewButton".
+ */
+export interface ViewButton {
+ label: string;
+ icon?: string | null;
+ style?: ViewButtonStyle | null;
+ action: ViewAction;
+ confirm?: ViewConfirm | null;
+ disabled?: boolean;
}
-export interface HarnessStatusFrame {
- type: "status";
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewConfirm".
+ */
+export interface ViewConfirm {
+ title: string;
+ text: string;
+ confirmLabel?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptQuestion".
+ * via the `definition` "ViewTab".
*/
-export interface PromptQuestion {
- question?: string | null;
- header?: string | null;
- multiSelect: boolean;
- freeText?: boolean | null;
- options: PromptOption[];
+export interface ViewTab {
+ id: RouteName;
+ title: string;
+ badge?: string | null;
+ blocks: ViewBlock[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptOption".
+ * via the `definition` "ViewProperty".
*/
-export interface PromptOption {
+export interface ViewProperty {
label: string;
- description?: string | null;
+ value: ViewInline;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptResolution".
+ * via the `definition` "ViewListItem".
*/
-export interface PromptResolution {
- at: number;
- answerText?: string | null;
+export interface ViewListItem {
+ id: string;
+ title: string;
+ subtitle?: string | null;
+ icon?: string | null;
+ trailing?: ViewInline[];
+ action?: ViewAction | null;
+ menu?: ViewButton[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptScreen".
+ * via the `definition` "ViewEmpty".
*/
-export interface PromptScreen {
- current: number;
- total: number;
+export interface ViewEmpty {
+ title: string;
+ text?: string | null;
+ button?: ViewButton | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "StatusTool".
+ * via the `definition` "ViewColumn".
*/
-export interface StatusTool {
- name: string;
- toolCallId?: string | null;
+export interface ViewColumn {
+ title: string;
+ align?: ViewAlign | null;
+ sortable?: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessStatusFrame".
+ * via the `definition` "ViewRow".
*/
-export interface HarnessStatusFrame1 {
- sessionId: SessionId;
- status: HarnessStatus;
- since: number;
- source?: StatusSource | null;
- phase?: StatusPhase | null;
- tool?: StatusTool | null;
- promptId?: string | null;
+export interface ViewRow {
+ id: string;
+ cells: ViewInline[];
+ action?: ViewAction | null;
+ menu?: ViewButton[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessCapabilities".
+ * via the `definition` "ViewCrumb".
*/
-export interface HarnessCapabilities {
- interrupt: boolean;
- resume: boolean;
- approvals: boolean;
- liveStream: boolean;
- listSessions: boolean;
- drive?: boolean | null;
- turnOptions?: boolean | null;
- launchModel?: boolean | null;
- imageAttachments?: boolean | null;
- models?: HarnessModelOption[] | null;
- modelsSource?: HarnessModelsSource | null;
- efforts?: EffortOption[] | null;
- modelFlag?: string | null;
- effortFlag?: string | null;
+export interface ViewCrumb {
+ label: string;
+ action?: ViewAction | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessModelOption".
+ * via the `definition` "CanvasScene".
*/
-export interface HarnessModelOption {
- inputModalities?: string[] | null;
+export interface CanvasScene {
+ items: CanvasItem[];
+ grid?: CanvasGrid | null;
+ viewport?: CanvasViewport | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasAnchor".
+ */
+export interface CanvasAnchor {
id: string;
- label: string;
- isDefault?: boolean | null;
- efforts?: EffortOption[] | null;
+ x: number;
+ y: number;
+ side: CanvasSide;
+ direction: CanvasDirection;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "EffortOption".
+ * via the `definition` "CanvasMenuItem".
*/
-export interface EffortOption {
+export interface CanvasMenuItem {
id: string;
label: string;
- isDefault?: boolean | null;
+ icon?: string | null;
+ danger?: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessControlCapabilities".
+ * via the `definition` "CanvasEnd".
*/
-export interface HarnessControlCapabilities {
- interrupt: boolean;
- resume: boolean;
- approvals: boolean;
+export interface CanvasEnd {
+ node: string;
+ anchor?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessObservationCapabilities".
+ * via the `definition` "CanvasGrid".
*/
-export interface HarnessObservationCapabilities {
- liveStream: boolean;
- listSessions: boolean;
- drive?: boolean | null;
+export interface CanvasGrid {
+ size: number;
+ snap?: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionList".
+ * via the `definition` "CanvasViewport".
*/
-export interface HarnessSessionList {
- sessions: HarnessSessionSummary[];
+export interface CanvasViewport {
+ x: number;
+ y: number;
+ zoom: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessOffering".
+ * via the `definition` "ViewRequest".
*/
-export interface HarnessOffering {
- harnessId: HarnessId;
- chat: boolean;
- capabilities: HarnessCapabilities;
+export interface ViewRequest {
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ context?: ViewContext;
+}
+export interface ViewContext {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessOfferingList".
+ * via the `definition` "ViewContext".
*/
-export interface HarnessOfferingList {
- harnesses: HarnessOffering[];
+export interface ViewContext1 {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessStoreSession".
+ * via the `definition` "ViewActionRequest".
*/
-export interface HarnessStoreSession {
- id: string;
- command: RosterCommand;
- title: string;
- updatedAt: number;
- parentSessionId?: string | null;
- agentName?: string | null;
- model?: string | null;
- taskId?: string | null;
+export interface ViewActionRequest {
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ values?: {
+ [k: string]: ViewValue;
+ };
+ context?: ViewContext2;
+}
+export interface ViewContext2 {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessStoreSessionList".
+ * via the `definition` "ViewActionResult".
*/
-export interface HarnessStoreSessionList {
- sessions: HarnessStoreSession[];
+export interface ViewActionResult {
+ actions?: ViewAction[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ContextRef".
+ * via the `definition` "ViewActionRefusal".
*/
-export interface ContextRef {
- kind: ContextRefKind;
- ref: string;
- note?: string | null;
+export interface ViewActionRefusal {
+ message: string;
+ fields?: {
+ [k: string]: string;
+ };
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "AcceptanceCriterion".
+ * via the `definition` "CanvasEventRequest".
*/
-export interface AcceptanceCriterion {
+export interface CanvasEventRequest {
+ event: CanvasEvent;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ context?: ViewContext3;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasPosition".
+ */
+export interface CanvasPosition {
id: string;
- description: string;
- kind: CriterionKind;
- check?: string | null;
+ x: number;
+ y: number;
+}
+export interface ViewContext3 {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasResponse".
+ */
+export interface CanvasResponse {
+ ops?: CanvasOp[];
+ actions?: ViewAction[];
+}
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelTheme".
+ */
+export interface PanelTheme {
+ scheme: PanelScheme;
+ colors: {
+ category1?: string;
+ category2?: string;
+ category3?: string;
+ category4?: string;
+ category5?: string;
+ category6?: string;
+ danger?: string;
+ info?: string;
+ onPrimary?: string;
+ onPrimaryContainer?: string;
+ onSurface?: string;
+ onSurfaceVariant?: string;
+ outline?: string;
+ outlineVariant?: string;
+ primary?: string;
+ primaryContainer?: string;
+ secondaryContainer?: string;
+ success?: string;
+ surface?: string;
+ surfaceContainer?: string;
+ surfaceContainerHigh?: string;
+ warning?: string;
+ };
+ fontFamily: string;
+ fontMono: string;
+ fontSize: number;
+ radius: number;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskBudget".
+ * via the `definition` "PluginList".
*/
-export interface TaskBudget {
- maxUsd?: number | null;
- maxTokens?: number | null;
- maxTurns?: number | null;
- maxWallClockMs?: number | null;
+export interface PluginList {
+ node: string;
+ plugins: PluginRecord[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskUsage".
+ * via the `definition` "PluginRecord".
*/
-export interface TaskUsage {
- inputTokens: number;
- outputTokens: number;
- totalTokens: number;
- costUsd?: number | null;
- turns: number;
- wallClockMs: number;
+export interface PluginRecord {
+ id: PluginId;
+ node: string;
+ path: string;
+ manifest: PluginManifest;
+ enabled: boolean;
+ state: PluginState;
+ granted: Permission[];
+ pending: Permission[];
+ error?: string | null;
+ lastExit?: PluginExit | null;
+ restarts: number;
+ startedAt?: number | null;
+ installedAt: number;
+ jobs: PluginJobStatus[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskSpec".
+ * via the `definition` "PluginExit".
*/
-export interface TaskSpec {
- delegation?: boolean | null;
- meshFrom?: string | null;
- taskId: string;
- agentId: string;
- goal: string;
- resolvedContext: ContextRef[];
- acceptanceCriteria: AcceptanceCriterion[];
- budget?: TaskBudget1;
- tools?: string[] | null;
- workingDir?: string | null;
- model?: string | null;
- effort?: Effort | null;
- systemPromptAppend?: string | null;
- isolation?: TaskIsolation | null;
- promptMode?: TaskPromptMode | null;
- excludeTools?: string[] | null;
- resumeMessage?: string | null;
- session: string;
- permissionDecisions?: TaskPermissionDecision[] | null;
- presetId?: string | null;
- presetName?: string | null;
- auditOnly?: boolean | null;
- [k: string]: unknown;
+export interface PluginExit {
+ at: number;
+ code?: number | null;
+ signal?: string | null;
}
-export interface TaskBudget1 {
- maxUsd?: number | null;
- maxTokens?: number | null;
- maxTurns?: number | null;
- maxWallClockMs?: number | null;
+/**
+ * This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginJobStatus".
+ */
+export interface PluginJobStatus {
+ id: RouteName;
+ lastRun?: PluginJobRun | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskPermissionDecision".
+ * via the `definition` "PluginJobRun".
*/
-export interface TaskPermissionDecision {
- requestId: string;
- tool: string;
- decision: TaskPermissionOutcome;
- at: number;
+export interface PluginJobRun {
+ runId: string;
+ trigger: PluginJobTrigger;
+ startedAt: number;
+ finishedAt?: number | null;
+ outcome?: PluginJobOutcome | null;
message?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskArtifact".
+ * via the `definition` "PluginInstallRequest".
*/
-export interface TaskArtifact {
- kind: ArtifactKind;
- ref: string;
- note?: string | null;
+export interface PluginInstallRequest {
+ path: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "CriterionReport".
+ * via the `definition` "PluginEnableRequest".
*/
-export interface CriterionReport {
- id: string;
- met: boolean;
- evidence?: string;
+export interface PluginEnableRequest {
+ approve?: Permission[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskResult".
+ * via the `definition` "PluginLogs".
*/
-export interface TaskResult {
- verdict: TaskVerdict;
- summary: string;
- output?: string | null;
- artifacts: TaskArtifact[];
- criteriaSelfReport?: CriterionReport[] | null;
- usage: TaskUsage;
- error?: string | null;
+export interface PluginLogs {
+ lines: PluginLogLine[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "EvalOutcome".
+ * via the `definition` "PluginLogLine".
*/
-export interface EvalOutcome {
- verdict: EvalVerdict;
- attempts: number;
- verifierTaskIds: string[];
- criteriaReport: CriterionReport[];
- diverged: boolean;
- escalatedAt?: string | null;
+export interface PluginLogLine {
+ at: number;
+ stream: PluginLogStream;
+ text: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ExecutorTurnCapabilities".
+ * via the `definition` "PluginSettings".
*/
-export interface ExecutorTurnCapabilities {
- steerable: boolean;
- multiTurn: boolean;
- structuredStream: boolean;
+export interface PluginSettings {
+ values: {
+ [k: string]: ViewValue;
+ };
+ secretsSet?: string[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ExecutorResultCapabilities".
+ * via the `definition` "PluginSettingsUpdate".
*/
-export interface ExecutorResultCapabilities {
- usageInResult: boolean;
- sessionIdCapture: boolean;
+export interface PluginSettingsUpdate {
+ values: {
+ [k: string]: ViewValue | null;
+ };
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "ExecutorInteractionCapabilities".
+ * via the `definition` "plugin.changed".
*/
-export interface ExecutorInteractionCapabilities {
- slashCommands: boolean;
- effortSelection: boolean;
+export interface PluginChanged {
+ v: ProtocolVersion;
+ plugin: PluginId;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskApprovalRequest".
+ * via the `definition` "plugin.views".
*/
-export interface TaskApprovalRequest {
- taskId: string;
- requestId: string;
- name: string;
- input: {
- [k: string]: unknown;
- };
- toolCallId?: string | null;
+export interface PluginViews {
+ v: ProtocolVersion;
+ plugin: PluginId;
+ views: RouteName[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskWire".
+ * via the `definition` "PluginToolList".
*/
-export interface TaskWire {
- id: string;
- goal: string;
- contextRefs: ContextRef[];
- acceptanceCriteria: AcceptanceCriterion[];
- spec: TaskSpec;
- executor: TaskExecutorKind;
- executorTarget?: string | null;
- agentId: string;
- requestedBy?: string | null;
- origin: string;
- parentTaskId?: string | null;
- chainDepth: number;
- nodeAffinity?: string | null;
- claimedBy?: string | null;
- budget: TaskBudget;
- usage?: TaskUsage | null;
- status: TaskStatus;
- attempt: number;
- maxAttempts: number;
- pendingMessage?: string | null;
- error?: string | null;
- result?: TaskResult | null;
- conversationId?: string | null;
- sessionKey?: string | null;
- harnessSessionIds: string[];
- eval?: EvalOutcome | null;
- evalAttempt: number;
- createdAt: number;
- startedAt?: number | null;
- lastHeartbeatAt?: number | null;
- completedAt?: number | null;
- durationMs?: number | null;
- pendingApprovals?: TaskApprovalRequest[] | null;
+export interface PluginToolList {
+ version: number;
+ tools: PluginToolEntry[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskCreateRequest".
+ * via the `definition` "PluginToolEntry".
*/
-export interface TaskCreateRequest {
- goal: string;
- agentId: string;
- executor?: TaskExecutorKind | null;
- executorTarget?: string | null;
- requestedBy?: string | null;
- parentTaskId?: string | null;
- chainDepth?: number | null;
- nodeAffinity?: string | null;
- spec?: TaskSpec | null;
- budget?: TaskBudget | null;
- contextRefs?: ContextRef[] | null;
- acceptanceCriteria?: AcceptanceCriterion[] | null;
+export interface PluginToolEntry {
+ plugin: PluginId;
+ tool: PluginTool;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskResponse".
+ * via the `definition` "PluginEventDelivery".
*/
-export interface TaskResponse {
- task: TaskWire;
+export interface PluginEventDelivery {
+ seq: number;
+ at: number;
+ missed: number;
+ event: PluginEvent;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TasksListResponse".
+ * via the `definition` "PluginJobRequest".
*/
-export interface TasksListResponse {
- tasks: TaskWire[];
+export interface PluginJobRequest {
+ runId: string;
+ trigger: PluginJobTrigger;
+ scheduledAt?: number | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskSteerAccepted".
+ * via the `definition` "PluginJobResult".
*/
-export interface TaskSteerAccepted {
- ok: boolean;
+export interface PluginJobResult {
+ outcome: PluginJobOutcome;
+ message?: string | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskKillResponse".
+ * via the `definition` "PluginToolCall".
*/
-export interface TaskKillResponse {
- ok: boolean;
- prior?: TaskStatus | null;
+export interface PluginToolCall {
+ arguments: {
+ [k: string]: unknown;
+ };
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskApprovalAccepted".
+ * via the `definition` "PluginToolResult".
*/
-export interface TaskApprovalAccepted {
- ok: boolean;
+export interface PluginToolResult {
+ text: string;
+ isError?: boolean;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskApprovalWaitResponse".
+ * via the `definition` "PluginSelf".
*/
-export interface TaskApprovalWaitResponse {
- approval: TaskApprovalRequest;
+export interface PluginSelf {
+ id: PluginId;
+ node: string;
+ version: string;
+ permissions: Permission[];
+ settings: {
+ [k: string]: ViewValue;
+ };
+ dataDir: string;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskWaitTimeoutResponse".
+ * via the `definition` "PluginViewsChanged".
*/
-export interface TaskWaitTimeoutResponse {
- error: string;
- task?: TaskWire | null;
+export interface PluginViewsChanged {
+ views: RouteName[];
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskOverrides".
+ * via the `definition` "PluginNotify".
*/
-export interface TaskOverrides {
- delegation?: boolean | null;
- meshFrom?: string | null;
- presetId?: string | null;
- presetName?: string | null;
- permissionDecisions?: TaskPermissionDecision[] | null;
- auditOnly?: boolean | null;
- workingDir?: string | null;
- model?: string | null;
- effort?: Effort | null;
- systemPromptAppend?: string | null;
- isolation?: TaskIsolation | null;
- promptMode?: TaskPromptMode | null;
- excludeTools?: string[] | null;
- resumeMessage?: string | null;
- [k: string]: unknown;
+export interface PluginNotify {
+ title: string;
+ text?: string | null;
+ tone?: ViewTone | null;
+ action?: ViewAction | null;
}
/**
* This interface was referenced by `RivetHubContractAcceptedByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchResult".
+ * via the `definition` "plugin.notification".
*/
-export interface MemorySearchResult {
- chunk?: MemoryChunkMatch | null;
- id: string;
- source: MemoryHitSource;
- content: string;
- role?: Role | null;
- agent?: string | null;
- relevanceScore: number;
- createdAt: string;
+export interface PluginNotification {
+ plugin: PluginId;
+ node: string;
+ title: string;
+ text?: string | null;
+ tone?: ViewTone | null;
+ action?: ViewAction | null;
+ ts: number;
}
diff --git a/packages/contract/src/sent.ts b/packages/contract/src/sent.ts
index 9bf50d9..ddf9c74 100644
--- a/packages/contract/src/sent.ts
+++ b/packages/contract/src/sent.ts
@@ -1,20 +1,11 @@
-// Generated from philbert440/rivethub-runtime@ba386c48eca72acb93d9a26bafb9abd30a48253f contract/sent.schema.json by npm run contract. Do not edit.
+// Generated from philbert440/rivethub-runtime@5d5cc2744c01cb9f991b65b74b9a859b1d35f517 contract/sent.schema.json by npm run contract. Do not edit.
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "HarnessId".
*/
export type HarnessId =
- | "claude-code"
- | "grok-build"
- | "kimi-code"
- | "hermes"
- | "codex"
- | "opencode"
- | "pi"
- | "qwen-code"
- | "cursor"
- | "cowork";
+ "claude-code" | "grok-build" | "kimi-code" | "hermes" | "codex" | "opencode" | "omp" | "dsh" | "cursor" | "cowork";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "KnownHarness".
@@ -25,6 +16,21 @@ export type KnownHarness = string;
* via the `definition` "AgentStoreBackend".
*/
export type AgentStoreBackend = "postgres" | "file";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ThinkingLevel".
+ */
+export type ThinkingLevel = "off" | "low" | "medium" | "high" | "xhigh";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubSessionMode".
+ */
+export type HubSessionMode = "chat" | "terminal";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ProtocolVersion".
+ */
+export type ProtocolVersion = number;
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "SessionId".
@@ -35,11 +41,6 @@ export type SessionId = string;
* via the `definition` "CatalogAgent".
*/
export type CatalogAgent = Preset | CatalogNode;
-/**
- * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "McpInjection".
- */
-export type McpInjection = "flag" | "cwdFile" | "persistentConfig" | "none";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "Activity".
@@ -137,11 +138,6 @@ export type AudioMicClientFrame =
| {
type: "stop";
};
-/**
- * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ProtocolVersion".
- */
-export type ProtocolVersion = number;
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "FileEntryKind".
@@ -179,14 +175,14 @@ export type BrowseWindow = "today" | "yesterday" | "this_morning" | "this_week"
export type MemoryScope = "messages" | "summaries" | "both";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryHitSource".
+ * via the `definition` "Role".
*/
-export type MemoryHitSource = "message" | "summary";
+export type Role = "system" | "user" | "assistant" | "tool";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "Role".
+ * via the `definition` "MemoryHitSource".
*/
-export type Role = "system" | "user" | "assistant" | "tool";
+export type MemoryHitSource = "message" | "summary";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "MemoryFallback".
@@ -235,6 +231,11 @@ export type ContentPart =
}
| MediaFields
| MediaFields1;
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "VectorState".
+ */
+export type VectorState = "embedded" | "pending" | "failed" | "skipped";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "MemoryHealthStatus".
@@ -265,6 +266,21 @@ export type ProjectRule = "git-remote" | "git-root" | "cwd-basename";
* via the `definition` "ProviderRecovery".
*/
export type ProviderRecovery = "retrying" | "permanent";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteError".
+ */
+export type SessionDeleteError = "session is live" | "not found" | "delete failed";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteResult".
+ */
+export type SessionDeleteResult = SessionDeleted | SessionDeleteRefused;
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionTrashReason".
+ */
+export type SessionTrashReason = "empty" | "one-word-reply";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "ContextSource".
@@ -277,9 +293,9 @@ export type ContextSource = "spawn" | "default" | "observed";
export type SessionMessageRole = "user" | "assistant";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ThinkingLevel".
+ * via the `definition` "SteerOutcome".
*/
-export type ThinkingLevel = "off" | "low" | "medium" | "high" | "xhigh";
+export type SteerOutcome = "steered" | "startedNewTurn" | "promptRequired";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "SessionClientKind".
@@ -328,6 +344,11 @@ export type TranscriptToolStatus = "running" | "done" | "error";
* via the `definition` "TranscriptBlock".
*/
export type TranscriptBlock = "thinking" | "text" | "tool_use" | "tool_result";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionPreviewKind".
+ */
+export type SessionPreviewKind = "running" | "asking" | "approval" | "said";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "Millis".
@@ -343,6 +364,32 @@ export type HarnessSessionStatus = "active" | "idle" | "ended" | "error";
* via the `definition` "Transport".
*/
export type Transport = "protocol";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "StartupKind".
+ */
+export type StartupKind = "topic" | "recent" | "relevant";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "StartupSource".
+ */
+export type StartupSource =
+ | {
+ session: SessionId;
+ }
+ | {
+ wiki: WikiSlug;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "WikiSlug".
+ */
+export type WikiSlug = string;
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeliveredVia".
+ */
+export type DeliveredVia = "metaAppend" | "cliFlag" | "none";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "HarnessSocketRefusalCode".
@@ -443,14 +490,106 @@ export type FinishReason = "stop" | "length" | "tool_calls" | "content_filter";
export type ErrorKind = "invalid_request_error" | "server_error";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSlug".
+ * via the `definition` "WikiSourceKind".
*/
-export type WikiSlug = string;
+export type WikiSourceKind = "summary" | "message" | "conversation" | "task" | "leaf" | "extract-wiki" | "user";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSourceKind".
+ * via the `definition` "ProposalState".
+ */
+export type ProposalState = "pending" | "approved" | "rejected";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "Proposer".
+ */
+export type Proposer = "categorizer" | "backfill";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TidyChange".
+ */
+export type TidyChange =
+ | {
+ kind: "merge";
+ source: string;
+ into: string;
+ }
+ | {
+ kind: "move";
+ topic: string;
+ parent?: string | null;
+ }
+ | {
+ kind: "rename";
+ topic: string;
+ name: string;
+ }
+ | {
+ kind: "close";
+ topic: string;
+ }
+ | {
+ kind: "delete";
+ topic: string;
+ }
+ | {
+ kind: "createTopic";
+ topic: string;
+ name: string;
+ parent?: string | null;
+ aliases?: string[];
+ sessions: SessionId[];
+ conversations: string[];
+ }
+ | {
+ kind: "fileInto";
+ topic: string;
+ sessions: SessionId[];
+ conversations: string[];
+ }
+ | {
+ kind: "mergePage";
+ page: string;
+ into: string;
+ }
+ | {
+ kind: "removePage";
+ page: string;
+ }
+ | {
+ kind: "addType";
+ topic: string;
+ name: string;
+ parent?: string | null;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopicDirectory".
+ */
+export type TopicDirectory =
+ | {
+ kind: "local";
+ node: string;
+ path: string;
+ }
+ | {
+ kind: "shared";
+ path: string;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopicKind".
+ */
+export type TopicKind = "work" | "type" | "entity";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PlacedBy".
+ */
+export type PlacedBy = "you" | "categorizer";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DecisionStatus".
*/
-export type WikiSourceKind = "summary" | "message" | "conversation" | "task" | "leaf" | "extract-wiki";
+export type DecisionStatus = "active" | "superseded";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "AgentEvent".
@@ -582,11 +721,26 @@ export type AgentEventKind =
type: "turn.end";
ts?: number | null;
};
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ContextUsageSource".
+ */
+export type ContextUsageSource = "harness" | "last-call";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "SessionBroadcast".
*/
-export type SessionBroadcast = Snapshot | SessionRemoved | AgentEvent;
+export type SessionBroadcast = Snapshot | SessionRemoved | HubState1 | PluginChanged | PluginViews | AgentEvent;
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginId".
+ */
+export type PluginId = string;
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "RouteName".
+ */
+export type RouteName = string;
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "HookEventName".
@@ -904,17 +1058,17 @@ export type HookConfigKind = "shell" | "http" | "internal";
* via the `definition` "RosterCommand".
*/
export type RosterCommand =
- "claude" | "grok" | "kimi" | "opencode" | "hermes" | "codex" | "pi" | "qwen" | "cursor" | "cowork";
+ "claude" | "grok" | "kimi" | "opencode" | "hermes" | "codex" | "omp" | "dsh" | "cursor" | "cowork";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "ApprovalDecision".
*/
-export type ApprovalDecision = "allow" | "deny" | "allowSession";
+export type ApprovalDecision = "allow" | "deny" | "allow-session";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "ApprovalOutcome".
*/
-export type ApprovalOutcome = "allow" | "deny" | "allowSession" | "external";
+export type ApprovalOutcome = "allow" | "deny" | "allow-session" | "external";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "HarnessStatus".
@@ -957,6 +1111,15 @@ export type HarnessEvent =
};
turnId?: string | null;
}
+ | {
+ type: "tool-update";
+ sessionId: SessionId;
+ toolCallId: string;
+ input: {
+ [k: string]: unknown;
+ };
+ turnId?: string | null;
+ }
| {
type: "tool-result";
sessionId: SessionId;
@@ -990,11 +1153,25 @@ export type HarnessEvent =
summary: HarnessSessionSummary;
supersedes?: SessionId | null;
}
+ | {
+ type: "plan";
+ sessionId: SessionId;
+ entries: PlanEntry[];
+ }
| {
type: "turn-complete";
sessionId: SessionId;
turnId?: string | null;
stopReason?: string | null;
+ usage?: LlmUsage | null;
+ modelMs?: number | null;
+ }
+ | {
+ type: "context";
+ sessionId: SessionId;
+ used: number;
+ window?: number | null;
+ source: ContextUsageSource;
}
| {
type: "error";
@@ -1036,6 +1213,11 @@ export type HarnessEvent =
resolved?: PromptResolution | null;
screen?: PromptScreen | null;
};
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PlanStatus".
+ */
+export type PlanStatus = "pending" | "in_progress" | "completed";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "PromptKind".
@@ -1057,22 +1239,13 @@ export type HarnessCode =
| "turn_in_flight"
| "capability_unsupported"
| "unknown_approval"
- | "unknown_prompt";
-/**
- * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskExecutorKind".
- */
-export type TaskExecutorKind = "chat-loop" | "harness-session" | "mesh";
+ | "unknown_prompt"
+ | "turn_failed";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "TaskVerdict".
*/
export type TaskVerdict = "completed" | "failed" | "killed" | "timeout" | "budget-exceeded";
-/**
- * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ContextRefKind".
- */
-export type ContextRefKind = "conversation" | "message" | "task" | "file" | "url" | "wiki";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
* via the `definition` "CriterionKind".
@@ -1085,2763 +1258,4336 @@ export type CriterionKind = "manual" | "automated";
export type Effort = "low" | "medium" | "high";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskIsolation".
+ * via the `definition` "LogLevel".
+ */
+export type LogLevel = "debug" | "info" | "warn" | "error";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ToolName".
*/
-export type TaskIsolation = "inherit" | "isolated";
+export type ToolName = string;
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskPromptMode".
+ * via the `definition` "Permission".
*/
-export type TaskPromptMode = "task" | "heartbeat";
+export type Permission =
+ | "memory.read"
+ | "memory.write"
+ | "sessions.read"
+ | "sessions.control"
+ | "topics.read"
+ | "topics.write"
+ | "tasks.read"
+ | "tasks.delegate"
+ | "agents.read"
+ | "notifications.send"
+ | "host.files.read"
+ | "host.files.write"
+ | "host.network"
+ | "host.exec";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskPermissionOutcome".
+ * via the `definition` "ViewInput".
*/
-export type TaskPermissionOutcome = "allow" | "deny" | "timeout";
+export type ViewInput =
+ | {
+ type: "text";
+ multiline?: boolean;
+ }
+ | {
+ type: "secret";
+ }
+ | {
+ type: "number";
+ min?: number | null;
+ max?: number | null;
+ step?: number | null;
+ }
+ | {
+ type: "toggle";
+ }
+ | {
+ type: "select";
+ options: ViewOption[];
+ multiple?: boolean;
+ }
+ | {
+ type: "file";
+ multiple?: boolean;
+ accept?: string[];
+ };
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ArtifactKind".
+ * via the `definition` "ViewValue".
*/
-export type ArtifactKind = "file" | "url" | "commit" | "message";
+export type ViewValue = boolean | number | string | string[] | ViewFile[];
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "EvalVerdict".
+ * via the `definition` "PluginToolHint".
*/
-export type EvalVerdict = "verified" | "refuted" | "escalated";
+export type PluginToolHint = "readOnly" | "destructive" | "idempotent" | "openWorld";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskEvent".
+ * via the `definition` "ViewAction".
*/
-export type TaskEvent =
+export type ViewAction =
| {
- type: "den";
- ts: number;
- event: AgentEvent;
+ type: "call";
+ action: RouteName;
+ params?: {
+ [k: string]: unknown;
+ } | null;
}
| {
- type: "turn.start";
- ts: number;
- turn: number;
+ type: "navigate";
+ view: RouteName;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ replace?: boolean;
}
| {
- type: "turn.end";
- ts: number;
- turn: number;
- usage: TaskUsage;
- harnessSessionId?: SessionId | null;
+ type: "dialog";
+ view: RouteName;
+ params?: {
+ [k: string]: unknown;
+ } | null;
}
| {
- type: "session.spawned";
- ts: number;
- nativeSessionId: string;
- model?: string | null;
+ type: "back";
}
| {
- type: "cost";
- ts: number;
- deltaUsd: number;
- totalUsd: number;
+ type: "refresh";
}
| {
- type: "log";
- ts: number;
- level: LogLevel;
- message: string;
+ type: "toast";
+ text: string;
+ tone?: ViewTone | null;
}
| {
- type: "approval-request";
- ts: number;
- taskId: string;
- requestId: string;
- name: string;
- input: {
- [k: string]: unknown;
- };
- toolCallId?: string | null;
+ type: "copy";
+ text: string;
}
| {
- type: "approval-resolved";
- ts: number;
- taskId: string;
- requestId: string;
- decision: TaskPermissionOutcome;
+ type: "openSession";
+ sessionId: SessionId;
+ }
+ | {
+ type: "openTopic";
+ topicId: string;
+ }
+ | {
+ type: "openUrl";
+ url: string;
+ }
+ | {
+ type: "download";
+ path: string;
+ filename?: string | null;
};
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "LogLevel".
- */
-export type LogLevel = "debug" | "info" | "warn" | "error";
-
-export interface RivetHubContractSentByTheRuntime {
- [k: string]: unknown;
-}
-/**
- * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentPreset".
+ * via the `definition` "ViewTone".
*/
-export interface AgentPreset {
- id: string;
- name: string;
- color: string;
- harnessId?: HarnessId | null;
- model: string;
- effort: string;
- systemPrompt: string;
- node?: string | null;
- directory?: string | null;
- sharedLink?: boolean | null;
- nodeBaseUrl?: string | null;
- sortOrder?: number | null;
- createdAt: number;
- updatedAt: number;
- [k: string]: unknown;
-}
+export type ViewTone = "neutral" | "info" | "success" | "warning" | "danger";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentsFile".
+ * via the `definition` "PluginEventKind".
*/
-export interface AgentsFile {
- agents: AgentPreset[];
-}
+export type PluginEventKind =
+ "session.started" | "session.idle" | "session.ended" | "session.placed" | "summary.written" | "task.done";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentPresetCreateRequest".
+ * via the `definition` "ViewButtonStyle".
*/
-export interface AgentPresetCreateRequest {
- name: string;
- color?: string | null;
- harnessId?: KnownHarness | null;
- model?: string | null;
- effort?: string | null;
- systemPrompt?: string | null;
- node?: string | null;
- directory?: string | null;
- sharedLink?: boolean | null;
- nodeBaseUrl?: string | null;
- sortOrder?: number | null;
-}
+export type ViewButtonStyle = "primary" | "secondary" | "danger";
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentPresetUpdate".
+ * via the `definition` "ViewBlock".
*/
-export interface AgentPresetUpdate {
- name?: string | null;
- color?: string | null;
- harnessId?: KnownHarness | null;
- model?: string | null;
- effort?: string | null;
- systemPrompt?: string | null;
- node?: string | null;
- directory?: string | null;
- sharedLink?: boolean | null;
+export type ViewBlock =
+ | {
+ type: "section";
+ title?: string | null;
+ subtitle?: string | null;
+ actions?: ViewButton[];
+ blocks: ViewBlock[];
+ collapsed?: boolean | null;
+ }
+ | {
+ type: "split";
+ primary: ViewBlock[];
+ secondary: ViewBlock[];
+ ratio?: number | null;
+ }
+ | {
+ type: "tabs";
+ tabs: ViewTab[];
+ selected?: RouteName | null;
+ }
+ | {
+ type: "text";
+ text: string;
+ tone?: ViewTone | null;
+ monospace?: boolean;
+ }
+ | {
+ type: "markdown";
+ text: string;
+ }
+ | {
+ type: "code";
+ text: string;
+ language?: string | null;
+ follow?: boolean;
+ }
+ | {
+ type: "image";
+ path: string;
+ alt: string;
+ }
+ | {
+ type: "properties";
+ items: ViewProperty[];
+ }
+ | {
+ type: "progress";
+ value?: number | null;
+ label?: string | null;
+ }
+ | {
+ type: "notice";
+ tone: ViewTone;
+ title?: string | null;
+ text: string;
+ actions?: ViewButton[];
+ }
+ | {
+ type: "list";
+ items: ViewListItem[];
+ empty?: ViewEmpty | null;
+ }
+ | {
+ type: "table";
+ columns: ViewColumn[];
+ rows: ViewRow[];
+ empty?: ViewEmpty | null;
+ }
+ | {
+ type: "breadcrumbs";
+ items: ViewCrumb[];
+ }
+ | {
+ type: "actions";
+ buttons: ViewButton[];
+ }
+ | {
+ type: "form";
+ id: RouteName;
+ fields: ViewField[];
+ buttons: ViewButton[];
+ }
+ | {
+ type: "canvas";
+ id: RouteName;
+ scene: CanvasScene;
+ height?: number | null;
+ readOnly?: boolean;
+ menu?: CanvasMenuItem[];
+ }
+ | {
+ type: "webPanel";
+ id: RouteName;
+ entry: string;
+ height?: number | null;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewInline".
+ */
+export type ViewInline =
+ | {
+ type: "text";
+ text: string;
+ tone?: ViewTone | null;
+ icon?: string | null;
+ monospace?: boolean;
+ }
+ | {
+ type: "badge";
+ text: string;
+ tone: ViewTone;
+ }
+ | {
+ type: "time";
+ at: number;
+ style?: ViewTimeStyle | null;
+ }
+ | {
+ type: "duration";
+ ms: number;
+ }
+ | {
+ type: "bytes";
+ value: number;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewTimeStyle".
+ */
+export type ViewTimeStyle = "relative" | "absolute";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewAlign".
+ */
+export type ViewAlign = "start" | "center" | "end";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasItem".
+ */
+export type CanvasItem =
+ | {
+ type: "node";
+ id: string;
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ shapes: CanvasShape[];
+ anchors?: CanvasAnchor[];
+ tooltip?: string | null;
+ menu?: CanvasMenuItem[];
+ locked?: boolean;
+ decorative?: boolean;
+ }
+ | {
+ type: "connector";
+ id: string;
+ from: CanvasEnd;
+ to: CanvasEnd;
+ route: CanvasRoute;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ dashed?: boolean;
+ arrow: CanvasArrow;
+ label?: string | null;
+ tooltip?: string | null;
+ menu?: CanvasMenuItem[];
+ decorative?: boolean;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasShape".
+ */
+export type CanvasShape =
+ | {
+ type: "rect";
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ radius?: number | null;
+ fill?: ColorRole | null;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ }
+ | {
+ type: "ellipse";
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ fill?: ColorRole | null;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ }
+ | {
+ type: "text";
+ x: number;
+ y: number;
+ text: string;
+ size?: number | null;
+ weight?: CanvasWeight | null;
+ color?: ColorRole | null;
+ align?: ViewAlign | null;
+ maxWidth?: number | null;
+ monospace?: boolean;
+ }
+ | {
+ type: "path";
+ d: string;
+ fill?: ColorRole | null;
+ stroke?: ColorRole | null;
+ strokeWidth?: number | null;
+ dashed?: boolean;
+ }
+ | {
+ type: "icon";
+ x: number;
+ y: number;
+ name: string;
+ size?: number | null;
+ color?: ColorRole | null;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ColorRole".
+ */
+export type ColorRole =
+ | "surface"
+ | "surfaceContainer"
+ | "surfaceContainerHigh"
+ | "primary"
+ | "primaryContainer"
+ | "onPrimary"
+ | "onPrimaryContainer"
+ | "secondaryContainer"
+ | "onSurface"
+ | "onSurfaceVariant"
+ | "outline"
+ | "outlineVariant"
+ | "info"
+ | "success"
+ | "warning"
+ | "danger"
+ | "category1"
+ | "category2"
+ | "category3"
+ | "category4"
+ | "category5"
+ | "category6";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasWeight".
+ */
+export type CanvasWeight = "regular" | "medium" | "bold";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasSide".
+ */
+export type CanvasSide = "top" | "right" | "bottom" | "left";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasDirection".
+ */
+export type CanvasDirection = "in" | "out" | "both";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasRoute".
+ */
+export type CanvasRoute = "straight" | "curved" | "orthogonal";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasArrow".
+ */
+export type CanvasArrow = "none" | "end" | "start" | "both";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasEvent".
+ */
+export type CanvasEvent =
+ | {
+ type: "selected";
+ items: string[];
+ }
+ | {
+ type: "moved";
+ items: CanvasPosition[];
+ }
+ | {
+ type: "connected";
+ from: CanvasEnd;
+ to: CanvasEnd;
+ }
+ | {
+ type: "deleted";
+ items: string[];
+ }
+ | {
+ type: "activated";
+ item: string;
+ }
+ | {
+ type: "menu";
+ item?: string | null;
+ choice: string;
+ x: number;
+ y: number;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasOp".
+ */
+export type CanvasOp =
+ | {
+ type: "upsert";
+ item: CanvasItem;
+ }
+ | {
+ type: "remove";
+ ids: string[];
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelScheme".
+ */
+export type PanelScheme = "light" | "dark";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelHostMessage".
+ */
+export type PanelHostMessage =
+ | {
+ type: "init";
+ theme: PanelTheme;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ context: ViewContext1;
+ plugin: PluginId;
+ node: string;
+ }
+ | {
+ type: "theme";
+ theme: PanelTheme;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelMessage".
+ */
+export type PanelMessage =
+ | {
+ type: "ready";
+ }
+ | {
+ type: "resize";
+ height: number;
+ }
+ | {
+ type: "action";
+ action: ViewAction;
+ };
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginState".
+ */
+export type PluginState = "disabled" | "awaitingApproval" | "starting" | "running" | "backoff" | "invalid";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginJobTrigger".
+ */
+export type PluginJobTrigger = "schedule" | "manual";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginJobOutcome".
+ */
+export type PluginJobOutcome = "succeeded" | "failed";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginLogStream".
+ */
+export type PluginLogStream = "stdout" | "stderr" | "host";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginEvent".
+ */
+export type PluginEvent =
+ | {
+ type: "session.started";
+ sessionId: SessionId;
+ topicId?: string | null;
+ }
+ | {
+ type: "session.idle";
+ sessionId: SessionId;
+ }
+ | {
+ type: "session.ended";
+ sessionId: SessionId;
+ }
+ | {
+ type: "session.placed";
+ sessionId: SessionId;
+ topicId: string;
+ by: PlacedBy;
+ }
+ | {
+ type: "summary.written";
+ summaryId: string;
+ sessionId?: SessionId | null;
+ kind: SummaryKind;
+ level: number;
+ }
+ | {
+ type: "task.done";
+ taskId: string;
+ status: TaskStatus;
+ }
+ | {
+ type: "settings.changed";
+ values: {
+ [k: string]: ViewValue;
+ };
+ };
+
+export interface RivetHubContractSentByTheRuntime {
+ [k: string]: unknown;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentPreset".
+ */
+export interface AgentPreset {
+ id: string;
+ name: string;
+ color: string;
+ harnessId?: HarnessId | null;
+ model: string;
+ effort: string;
+ systemPrompt: string;
+ node?: string | null;
+ directory?: string | null;
+ sharedLink?: boolean | null;
+ nodeBaseUrl?: string | null;
+ sortOrder?: number | null;
+ createdAt: number;
+ updatedAt: number;
+ [k: string]: unknown;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentsFile".
+ */
+export interface AgentsFile {
+ agents: AgentPreset[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentPresetCreateRequest".
+ */
+export interface AgentPresetCreateRequest {
+ name: string;
+ color?: string | null;
+ harnessId?: KnownHarness | null;
+ model?: string | null;
+ effort?: string | null;
+ systemPrompt?: string | null;
+ node?: string | null;
+ directory?: string | null;
+ sharedLink?: boolean | null;
+ nodeBaseUrl?: string | null;
+ sortOrder?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentPresetUpdate".
+ */
+export interface AgentPresetUpdate {
+ name?: string | null;
+ color?: string | null;
+ harnessId?: KnownHarness | null;
+ model?: string | null;
+ effort?: string | null;
+ systemPrompt?: string | null;
+ node?: string | null;
+ directory?: string | null;
+ sharedLink?: boolean | null;
nodeBaseUrl?: string | null;
sortOrder?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentListResponse".
+ * via the `definition` "AgentListResponse".
+ */
+export interface AgentListResponse {
+ agents: AgentPreset[];
+ node: string;
+ directoryRoot?: string | null;
+ sharedDir?: string | null;
+ backend?: AgentStoreBackend | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AgentResponse".
+ */
+export interface AgentResponse {
+ agent: AgentPreset;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubProjectDefaults".
+ */
+export interface HubProjectDefaults {
+ agentId?: string | null;
+ model?: string | null;
+ effort?: ThinkingLevel | null;
+ harnessId?: HarnessId | null;
+ node?: string | null;
+ directory?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubProject".
+ */
+export interface HubProject {
+ id: string;
+ name: string;
+ order: number;
+ createdAt: number;
+ defaults?: HubProjectDefaults | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubLastSession".
+ */
+export interface HubLastSession {
+ key: string;
+ at: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubState".
+ */
+export interface HubState {
+ projects: HubProject[];
+ defaultProjectId?: string | null;
+ membership: {
+ [k: string]: string;
+ };
+ names: {
+ [k: string]: string;
+ };
+ archived: string[];
+ pinned: string[];
+ hidden: string[];
+ modes: {
+ [k: string]: HubSessionMode;
+ };
+ lastSession?: HubLastSession | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubStateResponse".
+ */
+export interface HubStateResponse {
+ version: number;
+ state: HubState;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HubStatePutRequest".
+ */
+export interface HubStatePutRequest {
+ baseVersion: number;
+ state: HubState;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "hub.state".
+ */
+export interface HubState1 {
+ v: ProtocolVersion;
+ version: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessDescriptor".
+ */
+export interface HarnessDescriptor {
+ installed?: boolean | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DelegatedSessionLink".
+ */
+export interface DelegatedSessionLink {
+ taskId: string;
+ parentTaskId?: string | null;
+ spawnedSessionId: SessionId;
+ parentSessionId: SessionId;
+ agentName?: string | null;
+ model?: string | null;
+ owner?: string | null;
+ harnessId?: HarnessId | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "UserTurnAttachment".
+ */
+export interface UserTurnAttachment {
+ mime: string;
+ pathOrUri: string;
+ name?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "UserTurn".
+ */
+export interface UserTurn {
+ deliveryId?: string | null;
+ model?: string | null;
+ effort?: string | null;
+ text: string;
+ attachments?: UserTurnAttachment[] | null;
+ systemPrompt?: string | null;
+ bypassDialogGate?: boolean | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SendUserTurnResult".
+ */
+export interface SendUserTurnResult {
+ dismissedDialog?: boolean | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "preset".
+ */
+export interface Preset {
+ id: string;
+ name: string;
+ node: string;
+ local: boolean;
+ harnessId?: HarnessId | null;
+ model?: string | null;
+ effort?: string | null;
+ directory?: string | null;
+ implemented?: boolean | null;
+ gap?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CatalogNode".
+ */
+export interface CatalogNode {
+ id: string;
+ node: string;
+ local: boolean;
+ provider?: string | null;
+ model?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CatalogAgentsResponse".
+ */
+export interface CatalogAgentsResponse {
+ agents: CatalogAgent[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshOverview".
+ */
+export interface MeshOverview {
+ updatedAt: number;
+ nodes: MeshOverviewNode[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshOverviewNode".
+ */
+export interface MeshOverviewNode {
+ id: string;
+ name: string;
+ denUrl: string;
+ online: boolean;
+ sessions?: number | null;
+ latest?: MeshLatest | null;
+ version?: string | null;
+ revision?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshLatest".
+ */
+export interface MeshLatest {
+ activity: Activity;
+ title: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "NodeCapabilities".
+ */
+export interface NodeCapabilities {
+ subsystems: Subsystems;
+ harnesses: HarnessCapability[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "Subsystems".
+ */
+export interface Subsystems {
+ den: boolean;
+ devices: boolean;
+ mesh: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessCapability".
+ */
+export interface HarnessCapability {
+ harnessId: HarnessId;
+ list: boolean;
+ read: boolean;
+ drive: boolean;
+ resume: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessInspectCapability".
+ */
+export interface HarnessInspectCapability {
+ list: boolean;
+ read: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HarnessDriveCapability".
+ */
+export interface HarnessDriveCapability {
+ drive: boolean;
+ resume: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MeshDevice".
+ */
+export interface MeshDevice {
+ id: string;
+ name: string;
+ publicKey: string;
+ address: string;
+ createdAt: number;
+ enrolledAt?: number | null;
+ lastHandshake?: number | null;
+ pgRole?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceListResponse".
+ */
+export interface DeviceListResponse {
+ devices: MeshDevice[];
+ pending: PendingEnrollment[];
+ relayConfigured: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PendingEnrollment".
+ */
+export interface PendingEnrollment {
+ id: string;
+ name: string;
+ address: string;
+ createdAt: number;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "StoredPending".
+ */
+export interface StoredPending {
+ id: string;
+ name: string;
+ token: string;
+ address: string;
+ createdAt: number;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceRosterFile".
+ */
+export interface DeviceRosterFile {
+ v: number;
+ devices: MeshDevice[];
+ pending: StoredPending[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceCreateRequest".
+ */
+export interface DeviceCreateRequest {
+ name: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "rivet-mesh-enroll".
+ */
+export interface RivetMeshEnroll {
+ v: number;
+ gateway: string;
+ token: string;
+ config: DeviceEnrollConfig;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceEnrollConfig".
+ */
+export interface DeviceEnrollConfig {
+ sharedHost: string;
+ sharedExport: string;
+ pgUrl: string;
+ embedUrl: string;
+ wgEndpoint: string;
+ wgPeerPublicKey: string;
+ wgAddress: string;
+ wgAllowedIps: string;
+ homeSubnet: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceCreateResponse".
+ */
+export interface DeviceCreateResponse {
+ pending: PendingEnrollment;
+ qr: RivetMeshEnroll;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "EnrolledDevice".
+ */
+export interface EnrolledDevice {
+ id: string;
+ name: string;
+ address: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SignedCertificate".
+ */
+export interface SignedCertificate {
+ leaf: string;
+ chain: string[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceEnrollResponse".
+ */
+export interface DeviceEnrollResponse {
+ ok: boolean;
+ device: EnrolledDevice;
+ config: DeviceEnrollConfig;
+ certificate: SignedCertificate;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PairRedeemResponse".
+ */
+export interface PairRedeemResponse {
+ deviceId: string;
+ certificate: SignedCertificate;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PairingRecord".
+ */
+export interface PairingRecord {
+ v: number;
+ deviceId: string;
+ name: string;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceEnrollRequest".
+ */
+export interface DeviceEnrollRequest {
+ token?: string | null;
+ publicKey?: string | null;
+ name?: string | null;
+ csr?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingCode".
+ */
+export interface PhonePairingCode {
+ deviceId: string;
+ gateway: string;
+ expiresAt: number;
+ qrText: string;
+ reshown: number;
+ addedToUsers: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingStatus".
+ */
+export interface PhonePairingStatus {
+ state: PhonePairingState;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingAvailability".
+ */
+export interface PhonePairingAvailability {
+ available: boolean;
+ reason?: string | null;
+ gateway?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PhonePairingRequest".
+ */
+export interface PhonePairingRequest {
+ name: string;
+ host?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AudioStatus".
+ */
+export interface AudioStatus {
+ enabled: boolean;
+ backend: AudioBackend;
+ device: string;
+ sampleRate: number;
+ channels: number;
+ format: AudioFormat;
+ fifoPath: string;
+ armed: boolean;
+ publisherId?: string | null;
+ armedAt?: number | null;
+ bytesWritten: number;
+ runtimeReady: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "AudioHealth".
+ */
+export interface AudioHealth {
+ ok: boolean;
+ runtimeReady: boolean;
+ fifoPath: string;
+ message?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "VoiceSpeakRequest".
+ */
+export interface VoiceSpeakRequest {
+ input: string;
+ instructions?: string | null;
+ voice?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "VoiceTranscribeResponse".
+ */
+export interface VoiceTranscribeResponse {
+ text: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DeviceFileEntry".
+ */
+export interface DeviceFileEntry {
+ name: string;
+ type: FileEntryKind;
+ size: number;
+ mtime: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "FilesListResponse".
+ */
+export interface FilesListResponse {
+ path: string;
+ root: string;
+ entries: DeviceFileEntry[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "StagedUploadResponse".
+ */
+export interface StagedUploadResponse {
+ uri: string;
+ name: string;
+ mime: string;
+ size: number;
+ expiresAt: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "FileEntry".
+ */
+export interface FileEntry {
+ name: string;
+ type: FileKind;
+ size: number;
+ mtime: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "FileList".
+ */
+export interface FileList {
+ path: string;
+ root: string;
+ entries: FileEntry[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "FileChanged".
+ */
+export interface FileChanged {
+ ok: boolean;
+ path: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySearchToolArgs".
+ */
+export interface MemorySearchToolArgs {
+ since?: string | null;
+ before?: string | null;
+ window?: BrowseWindow | null;
+ expand?: boolean | null;
+ synthesize?: boolean | null;
+ query: string;
+ mode?: SearchMode | null;
+ scope?: MemoryScope | null;
+ limit?: number | null;
+ agent?: string | null;
+ role?: Role | null;
+ tool_name?: string | null;
+ tag?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySearchHit".
+ */
+export interface MemorySearchHit {
+ chunk?: MemoryChunkMatch | null;
+ id: string;
+ source: MemoryHitSource;
+ content: string;
+ createdAt: string;
+ score: number;
+ role?: Role | null;
+ agent?: string | null;
+ kind?: SummaryKind | null;
+ toolName?: string | null;
+ conversationId?: string | null;
+ sessionId?: string | null;
+ fallback?: MemoryFallback | null;
+ tags?: TagWire[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryChunkMatch".
+ */
+export interface MemoryChunkMatch {
+ index: number;
+ total: number;
+ charStart: number;
+ charEnd: number;
+ content: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagWire".
+ */
+export interface TagWire {
+ id: string;
+ entityType: TagEntityType;
+ entityId: string;
+ key: string;
+ value: string;
+ display: string;
+ source: string;
+ state: TagState;
+ confidence?: number | null;
+ proposedBy: string;
+ reason: string;
+ decidedBy?: string | null;
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryDegraded".
+ */
+export interface MemoryDegraded {
+ reason: string;
+ effect: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySearchResponse".
+ */
+export interface MemorySearchResponse {
+ query: string;
+ scope: MemoryScope;
+ degraded?: MemoryDegraded | null;
+ fallback?: MemoryFallback | null;
+ results: MemorySearchHit[];
+ expanded?: MemoryEntry[];
+ synthesis?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryEntry".
+ */
+export interface MemoryEntry {
+ id?: string | null;
+ sessionId: string;
+ agent: string;
+ channel: string;
+ role: Role;
+ content: string;
+ toolName?: string | null;
+ toolArgs?: {
+ [k: string]: unknown;
+ } | null;
+ toolResult?: string | null;
+ metadata?: {
+ [k: string]: unknown;
+ } | null;
+ createdAt?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryBrowseToolArgs".
+ */
+export interface MemoryBrowseToolArgs {
+ conversation_id?: string | null;
+ include_tools?: boolean | null;
+ since?: string | null;
+ before?: string | null;
+ window?: BrowseWindow | null;
+ agent?: string | null;
+ tag?: string | null;
+ limit?: number | null;
+ order?: MemoryBrowseOrder | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryAppendToolArgs".
+ */
+export interface MemoryAppendToolArgs {
+ session_id: string;
+ content: string;
+ role: Role;
+ tool_name?: string | null;
+ tool_args?: {
+ [k: string]: unknown;
+ } | null;
+ tool_result?: string | null;
+ event_id?: string | null;
+ agent?: string | null;
+ persona?: string | null;
+ source?: string | null;
+ channel?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryIngestMessage".
+ */
+export interface MemoryIngestMessage {
+ role: Role;
+ content: string;
+ created_at?: string | null;
+ tool_calls?: MemoryIngestToolCall[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryIngestToolCall".
+ */
+export interface MemoryIngestToolCall {
+ id?: string | null;
+ name: string;
+ input?: {
+ [k: string]: unknown;
+ } | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryIngestSessionToolArgs".
+ */
+export interface MemoryIngestSessionToolArgs {
+ session_id: string;
+ messages: MemoryIngestMessage[];
+ agent?: string | null;
+ persona?: string | null;
+ source?: string | null;
+ channel?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryGetFullToolArgs".
+ */
+export interface MemoryGetFullToolArgs {
+ id?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsToolArgs".
+ */
+export interface MemoryTagsToolArgs {
+ entity_type?: string | null;
+ entity_id?: string | null;
+ session_key?: string | null;
+ agent?: string | null;
+ key?: string | null;
+ value?: string | null;
+ tag?: string | null;
+ display?: string | null;
+ state?: TagState | null;
+ ids?: string[] | null;
+ session_keys?: string[] | null;
+ entries?: TagEntryPair[] | null;
+ parent_value?: string | null;
+ aliases?: string[] | null;
+ from?: string | null;
+ into?: string | null;
+ reason?: string | null;
+ decided_by?: string | null;
+ limit?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagEntryPair".
+ */
+export interface TagEntryPair {
+ key: string;
+ value: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryToolResponse".
+ */
+export interface MemoryToolResponse {
+ ok: boolean;
+ result: ToolResult;
+}
+export interface MediaFields {
+ type: "image";
+}
+export interface MediaFields1 {
+ type: "video";
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MediaFields".
+ */
+export interface MediaFields2 {
+ data?: string | null;
+ url?: string | null;
+ mimeType?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryBrowseMessage".
+ */
+export interface MemoryBrowseMessage {
+ id: string;
+ role: Role;
+ agent?: string | null;
+ content: string;
+ createdAt: string;
+ conversationId?: string | null;
+ sessionId?: string | null;
+ toolName?: string | null;
+ tags?: TagWire[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryBrowseResponse".
+ */
+export interface MemoryBrowseResponse {
+ messages: MemoryBrowseMessage[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySummaryNode".
+ */
+export interface MemorySummaryNode {
+ id: string;
+ parentId?: string | null;
+ level: number;
+ kind: SummaryKind;
+ content: string;
+ messageCount: number;
+ earliestAt?: string | null;
+ latestAt?: string | null;
+ createdAt: string;
+ sourceMessageIds: string[];
+ vector: VectorState;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryMessageTally".
+ */
+export interface MemoryMessageTally {
+ total: number;
+ user: number;
+ assistant: number;
+ system: number;
+ tool: number;
+ embedded: number;
+ pending: number;
+ failed: number;
+ skipped: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemorySummaryDagResponse".
+ */
+export interface MemorySummaryDagResponse {
+ sessionId: string;
+ summaries: MemorySummaryNode[];
+ messages: MemoryMessageTally;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TopTool".
+ */
+export interface TopTool {
+ tool: string;
+ count: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "RecentSession".
+ */
+export interface RecentSession {
+ sessionId: string;
+ title?: string | null;
+ agent: string;
+ lastActive: number;
+ messages: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryStatsResponse".
+ */
+export interface MemoryStatsResponse {
+ conversations: number;
+ messages: number;
+ toolCalls: number;
+ summaries: number;
+ embedQueueDepth: number;
+ embeddedMessages: number;
+ failedEmbeddings: number;
+ topTools: TopTool[];
+ recentSessions: RecentSession[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "EmbedHealth".
+ */
+export interface EmbedHealth {
+ status: EmbedStatus;
+ error?: string | null;
+ impact?: string | null;
+ checkedAt?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryHealthResponse".
+ */
+export interface MemoryHealthResponse {
+ observedAt?: string | null;
+ queueStatus?: QueueStatus | null;
+ queues?: QueueHealth | null;
+ compaction?: SummarizerHealth | null;
+ failedEmbeddings?: number | null;
+ skippedEmbeddings?: number | null;
+ capture?: CaptureHealth | null;
+ status: MemoryHealthStatus;
+ embeddings: EmbedHealth;
+ embedQueueDepth: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "QueueHealth".
+ */
+export interface QueueHealth {
+ task: string;
+ pending: number;
+ running: number;
+ scheduled: number;
+ dead: number;
+ oldestPendingMinutes?: number | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SummarizerHealth".
+ */
+export interface SummarizerHealth {
+ eligible: boolean;
+ activeTail: boolean;
+ belowFloor: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CaptureHealth".
+ */
+export interface CaptureHealth {
+ status: CaptureStatus;
+ impact: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PendingTagWire".
+ */
+export interface PendingTagWire {
+ id: string;
+ entityType: TagEntityType;
+ entityId: string;
+ key: string;
+ value: string;
+ display: string;
+ source: string;
+ state: TagState;
+ confidence?: number | null;
+ proposedBy: string;
+ reason: string;
+ decidedBy?: string | null;
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+ action?: PendingTagAction | null;
+ sessionKey?: string | null;
+ title?: string | null;
+ agent?: string | null;
+ conversationId?: string | null;
+ excerpt?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsDecideRequest".
+ */
+export interface MemoryTagsDecideRequest {
+ ids?: string[] | null;
+ state?: TagState | null;
+ decided_by?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsAddRequest".
+ */
+export interface MemoryTagsAddRequest {
+ entity_type?: string | null;
+ entity_id?: string | null;
+ session_key?: string | null;
+ agent?: string | null;
+ tag?: string | null;
+ key?: string | null;
+ value?: string | null;
+ display?: string | null;
+ reason?: string | null;
+ decided_by?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "MemoryTagsLookupRequest".
+ */
+export interface MemoryTagsLookupRequest {
+ session_keys?: string[] | null;
+ states?: string[] | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyEntry".
+ */
+export interface TagTaxonomyEntry {
+ key: string;
+ value: string;
+ display: string;
+ parentValue?: string | null;
+ aliases: string[];
+ state: TagState;
+ source: string;
+ reason: string;
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyWire".
+ */
+export interface TagTaxonomyWire {
+ key: string;
+ entries: TagTaxonomyEntry[];
+ decidedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyUpsertRequest".
*/
-export interface AgentListResponse {
- agents: AgentPreset[];
- node: string;
- directoryRoot?: string | null;
- sharedDir?: string | null;
- backend?: AgentStoreBackend | null;
+export interface TagTaxonomyUpsertRequest {
+ key?: string | null;
+ value?: string | null;
+ display?: string | null;
+ parent_value?: string | null;
+ aliases?: string[] | null;
+ reason?: string | null;
+ decided_by?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentResponse".
+ * via the `definition` "TagTaxonomyDecideRequest".
*/
-export interface AgentResponse {
- agent: AgentPreset;
+export interface TagTaxonomyDecideRequest {
+ entries?: TagEntryPair[] | null;
+ state?: TagState | null;
+ decided_by?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessDescriptor".
+ * via the `definition` "TagTaxonomyMerge".
*/
-export interface HarnessDescriptor {
- installed?: boolean | null;
+export interface TagTaxonomyMerge {
+ key: string;
+ from: string;
+ into: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DelegatedSessionLink".
+ * via the `definition` "TagTaxonomyMergeRequest".
*/
-export interface DelegatedSessionLink {
- taskId: string;
- parentTaskId?: string | null;
- spawnedSessionId: SessionId;
- parentSessionId: SessionId;
- agentName?: string | null;
- model?: string | null;
- owner?: string | null;
- harnessId?: HarnessId | null;
+export interface TagTaxonomyMergeRequest {
+ key?: string | null;
+ from?: string | null;
+ into?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "UserTurnAttachment".
+ * via the `definition` "TagTaxonomyMergeResult".
*/
-export interface UserTurnAttachment {
- mime: string;
- pathOrUri: string;
- name?: string | null;
+export interface TagTaxonomyMergeResult {
+ moved: number;
+ dropped: number;
+ into: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "UserTurn".
+ * via the `definition` "TagCount".
*/
-export interface UserTurn {
- deliveryId?: string | null;
- model?: string | null;
- effort?: string | null;
- text: string;
- attachments?: UserTurnAttachment[] | null;
- systemPrompt?: string | null;
- bypassDialogGate?: boolean | null;
+export interface TagCount {
+ key: string;
+ value: string;
+ display: string;
+ conversations: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SendUserTurnResult".
+ * via the `definition` "TagListResult".
*/
-export interface SendUserTurnResult {
- dismissedDialog?: boolean | null;
+export interface TagListResult {
+ tags: TagWire[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "preset".
+ * via the `definition` "PendingTagListResult".
*/
-export interface Preset {
- id: string;
- name: string;
- node: string;
- local: boolean;
- harnessId?: HarnessId | null;
- model?: string | null;
- directory?: string | null;
- implemented?: boolean | null;
- gap?: string | null;
+export interface PendingTagListResult {
+ tags: PendingTagWire[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogNode".
+ * via the `definition` "TagCountsResult".
*/
-export interface CatalogNode {
- id: string;
- node: string;
- local: boolean;
- provider?: string | null;
- model?: string | null;
+export interface TagCountsResult {
+ counts: TagCount[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogCommand".
+ * via the `definition` "TagTaxonomyListResult".
*/
-export interface CatalogCommand {
- name: string;
- description: string;
- argHint?: string | null;
- source: string;
+export interface TagTaxonomyListResult {
+ entries: TagTaxonomyEntry[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogExecutorEntry".
+ * via the `definition` "TagDecisionResult".
*/
-export interface CatalogExecutorEntry {
- key: string;
- capabilities: HarnessExecutorCapabilities;
- commands: CatalogCommand[];
- harnessId?: HarnessId | null;
- implemented?: boolean | null;
+export interface TagDecisionResult {
+ changed: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessExecutorCapabilities".
+ * via the `definition` "TagAddResult".
*/
-export interface HarnessExecutorCapabilities {
- steerable: boolean;
- multiTurn: boolean;
- structuredStream: boolean;
- usageInResult: boolean;
- sessionIdCapture: boolean;
- slashCommands: boolean;
- effortSelection: boolean;
- mcpInjection: McpInjection;
+export interface TagAddResult {
+ tag: TagWire;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogSkillEntry".
+ * via the `definition` "TagLookupResult".
*/
-export interface CatalogSkillEntry {
- name: string;
- description: string;
+export interface TagLookupResult {
+ sessions: {
+ [k: string]: TagWire[];
+ };
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TagTaxonomyUpsertResult".
+ */
+export interface TagTaxonomyUpsertResult {
+ entry: TagTaxonomyEntry;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ProjectRuleResult".
+ */
+export interface ProjectRuleResult {
+ key: string;
+ rule: ProjectRule;
+ gitRoot?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogSheet".
+ * via the `definition` "HealthzResponse".
*/
-export interface CatalogSheet {
+export interface HealthzResponse {
+ ok: boolean;
+ sessions: number;
+ name: string;
node: string;
- agents: CatalogAgent[];
- executors: CatalogExecutorEntry[];
- tools: string[];
- skills: CatalogSkillEntry[];
+ degraded?: string | null;
+ degradedProviders?: DegradedProvider[];
+ version?: string | null;
+ revision?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CatalogAgentsResponse".
+ * via the `definition` "DegradedProvider".
*/
-export interface CatalogAgentsResponse {
- agents: CatalogAgent[];
+export interface DegradedProvider {
+ id: string;
+ recovery: ProviderRecovery;
+ reason: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "OutcomeBucket".
+ * via the `definition` "GatewayError".
*/
-export interface OutcomeBucket {
- tasks: number;
- completed: number;
- failed: number;
- verified: number;
- refuted: number;
- escalated: number;
- diverged: number;
- divergenceRate: number;
- totalCostUsd?: number | null;
- avgDurationMs?: number | null;
+export interface GatewayError {
+ error: string;
+ detail?: string | null;
+ hint?: string | null;
+ code?: string | null;
+ harnessId?: HarnessId | null;
+ node?: string | null;
+ retryable?: boolean | null;
+ reason?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "OutcomesFilter".
+ * via the `definition` "OkReply".
*/
-export interface OutcomesFilter {
- since?: string | null;
- until?: string | null;
- agentId?: string | null;
- origin?: string | null;
+export interface OkReply {
+ ok: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "EventsIngested".
+ */
+export interface EventsIngested {
+ ok: boolean;
+ ingested: number;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PairRedeemRequest".
+ */
+export interface PairRedeemRequest {
+ token: string;
+ csr?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "OutcomesResponse".
+ * via the `definition` "RosterFile".
*/
-export interface OutcomesResponse {
- filter: OutcomesFilter;
- totals: OutcomeBucket;
- byAgent: {
- [k: string]: OutcomeBucket;
+export interface RosterFile {
+ default: string;
+ cwd: string | null;
+ env: {
+ [k: string]: string;
};
- byExecutor: {
- [k: string]: OutcomeBucket;
+ commands: {
+ [k: string]: RosterEntry;
};
- byDay: {
- [k: string]: OutcomeBucket;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "RosterEntry".
+ */
+export interface RosterEntry {
+ label: string;
+ cmd: string[];
+ room: boolean | null;
+ cwd: string | null;
+ env: {
+ [k: string]: string;
};
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshOverview".
+ * via the `definition` "SessionDeleted".
*/
-export interface MeshOverview {
- updatedAt: number;
- nodes: MeshOverviewNode[];
+export interface SessionDeleted {
+ ok: boolean;
+ session: SessionId;
+ conversations: number;
+ messages: number;
+ summaries: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshOverviewNode".
+ * via the `definition` "SessionDeleteRequest".
*/
-export interface MeshOverviewNode {
- id: string;
- name: string;
- denUrl: string;
- online: boolean;
- sessions?: number | null;
- latest?: MeshLatest | null;
+export interface SessionDeleteRequest {
+ sessions: SessionId[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshLatest".
+ * via the `definition` "SessionDeleteRefused".
*/
-export interface MeshLatest {
- activity: Activity;
- title: string;
+export interface SessionDeleteRefused {
+ session: SessionId;
+ ok: boolean;
+ error: SessionDeleteError;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionDeleteResults".
+ */
+export interface SessionDeleteResults {
+ results: SessionDeleteResult[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionTrashCandidate".
+ */
+export interface SessionTrashCandidate {
+ session: SessionId;
+ harness: HarnessId;
+ title: string | null;
+ updatedAt: string;
+ reason: SessionTrashReason;
+ userTurns: number;
+ reply: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "SessionTrashList".
+ */
+export interface SessionTrashList {
+ candidates: SessionTrashCandidate[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "TranscriptTurn".
+ */
+export interface TranscriptTurn {
+ role: Role;
+ text: string;
+ ts?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "NodeCapabilities".
+ * via the `definition` "TranscriptResponse".
*/
-export interface NodeCapabilities {
- subsystems: Subsystems;
- harnesses: HarnessCapability[];
+export interface TranscriptResponse {
+ id: string;
+ command: string;
+ turns: TranscriptTurn[];
+ contextWindow?: number | null;
+ compactAt?: number | null;
+ contextSource?: ContextSource | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "Subsystems".
+ * via the `definition` "SessionSummary".
*/
-export interface Subsystems {
- den: boolean;
- devices: boolean;
- mesh: boolean;
+export interface SessionSummary {
+ id: string;
+ lastActive: number;
+ messages: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessCapability".
+ * via the `definition` "SessionList".
*/
-export interface HarnessCapability {
- harnessId: HarnessId;
- list: boolean;
- read: boolean;
- drive: boolean;
- resume: boolean;
+export interface SessionList {
+ sessions: SessionSummary[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessInspectCapability".
+ * via the `definition` "MessageList".
*/
-export interface HarnessInspectCapability {
- list: boolean;
- read: boolean;
+export interface MessageList {
+ messages: SessionMessage[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessDriveCapability".
+ * via the `definition` "SessionMessage".
*/
-export interface HarnessDriveCapability {
- drive: boolean;
- resume: boolean;
+export interface SessionMessage {
+ id: string;
+ sessionId: string;
+ role: SessionMessageRole;
+ text: string;
+ ts: number;
+ usage?: MessageUsage | null;
+ model?: string | null;
+ durationMs?: number | null;
+ thinking?: boolean | null;
+ tools?: string[] | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MeshDevice".
+ * via the `definition` "MessageUsage".
*/
-export interface MeshDevice {
- id: string;
- name: string;
- publicKey: string;
- address: string;
- createdAt: number;
- enrolledAt?: number | null;
- lastHandshake?: number | null;
- pgRole?: string | null;
+export interface MessageUsage {
+ promptTokens: number;
+ completionTokens: number;
+ cachedTokens: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceListResponse".
+ * via the `definition` "SessionPostRequest".
*/
-export interface DeviceListResponse {
- devices: MeshDevice[];
- pending: PendingEnrollment[];
- relayConfigured: boolean;
+export interface SessionPostRequest {
+ excludeTools?: string[] | null;
+ text: string;
+ userId?: string | null;
+ agent?: string | null;
+ thinking?: ThinkingLevel | null;
+ systemPrompt?: string | null;
+ attachments?: UserTurnAttachment[] | null;
+ harness?: HarnessId | null;
+ model?: string | null;
+ workingDir?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PendingEnrollment".
+ * via the `definition` "SessionPostAccepted".
*/
-export interface PendingEnrollment {
- id: string;
- name: string;
- address: string;
- createdAt: number;
- expiresAt: number;
+export interface SessionPostAccepted {
+ accepted: boolean;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StoredPending".
+ * via the `definition` "SessionPostReply".
*/
-export interface StoredPending {
- id: string;
- name: string;
- token: string;
- address: string;
- createdAt: number;
- expiresAt: number;
+export interface SessionPostReply {
+ message: SessionMessage;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceRosterFile".
+ * via the `definition` "SessionSteerRequest".
*/
-export interface DeviceRosterFile {
- v: number;
- devices: MeshDevice[];
- pending: StoredPending[];
+export interface SessionSteerRequest {
+ text: string;
+ attachments?: UserTurnAttachment[] | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceCreateRequest".
+ * via the `definition` "SessionSteerResponse".
*/
-export interface DeviceCreateRequest {
- name: string | null;
+export interface SessionSteerResponse {
+ outcome: SteerOutcome;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "rivet-mesh-enroll".
+ * via the `definition` "SessionWsClientMessage".
*/
-export interface RivetMeshEnroll {
- v: number;
- gateway: string;
- token: string;
- config: DeviceEnrollConfig;
+export interface SessionWsClientMessage {
+ type: SessionClientKind;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceEnrollConfig".
+ * via the `definition` "StreamEvent".
*/
-export interface DeviceEnrollConfig {
- sharedHost: string;
- sharedExport: string;
- pgUrl: string;
- embedUrl: string;
- wgEndpoint: string;
- wgPeerPublicKey: string;
- wgAddress: string;
- wgAllowedIps: string;
- homeSubnet: string;
+export interface StreamEvent {
+ type: StreamEventKind;
+ content: string;
+ metadata?: {
+ [k: string]: unknown;
+ } | null;
+}
+export interface TranscriptWsFrame {
+ kind: "transcript";
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceCreateResponse".
+ * via the `definition` "HarnessTranscriptTurn".
*/
-export interface DeviceCreateResponse {
- pending: PendingEnrollment;
- qr: RivetMeshEnroll;
+export interface HarnessTranscriptTurn {
+ role: SessionMessageRole;
+ text: string;
+ thinking?: string | null;
+ tools?: HarnessTranscriptTool[] | null;
+ usage?: MessageUsage | null;
+ model?: string | null;
+ stopReason?: string | null;
+ lastBlock?: TranscriptBlock | null;
+ attachments?: TranscriptAttachment[] | null;
+ complete?: boolean;
+ compact?: boolean;
+ startedAtMs?: number | null;
+ endedAtMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "EnrolledDevice".
+ * via the `definition` "HarnessTranscriptTool".
*/
-export interface EnrolledDevice {
- id: string;
+export interface HarnessTranscriptTool {
name: string;
- address: string;
+ status: TranscriptToolStatus;
+ args?: {
+ [k: string]: unknown;
+ } | null;
+ id?: string | null;
+ input?: {
+ [k: string]: unknown;
+ } | null;
+ resultText?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SignedCertificate".
+ * via the `definition` "TranscriptAttachment".
*/
-export interface SignedCertificate {
- leaf: string;
- chain: string[];
+export interface TranscriptAttachment {
+ mediaType: string;
+ name?: string | null;
+ uri?: string | null;
+ uploadId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceEnrollResponse".
+ * via the `definition` "TranscriptWsFrame".
*/
-export interface DeviceEnrollResponse {
- ok: boolean;
- device: EnrolledDevice;
- config: DeviceEnrollConfig;
- certificate: SignedCertificate;
+export interface TranscriptWsFrame1 {
+ session: string;
+ rev: number;
+ from: number;
+ turns: HarnessTranscriptTurn[];
+ total: number;
+ command: string;
+ truncatedBefore?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PairRedeemResponse".
+ * via the `definition` "HarnessSessionTranscriptResponse".
*/
-export interface PairRedeemResponse {
- deviceId: string;
- certificate: SignedCertificate;
+export interface HarnessSessionTranscriptResponse {
+ sessionId: SessionId;
+ harnessId: HarnessId;
+ turns: HarnessTranscriptTurn[];
+ contextWindow: number;
+ compactAt: number;
+ contextSource: ContextSource;
+ redirectedTo?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PairingRecord".
+ * via the `definition` "SessionPreview".
*/
-export interface PairingRecord {
- v: number;
- deviceId: string;
- name: string;
- expiresAt: number;
+export interface SessionPreview {
+ sessionId: SessionId;
+ kind: SessionPreviewKind;
+ text: string;
+ at: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceEnrollRequest".
+ * via the `definition` "SessionPreviewList".
*/
-export interface DeviceEnrollRequest {
- token?: string | null;
- publicKey?: string | null;
- name?: string | null;
- csr?: string | null;
+export interface SessionPreviewList {
+ previews: SessionPreview[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingCode".
+ * via the `definition` "HarnessTurnAccepted".
*/
-export interface PhonePairingCode {
- deviceId: string;
- gateway: string;
- expiresAt: number;
- qrText: string;
- reshown: number;
- addedToUsers: boolean;
+export interface HarnessTurnAccepted {
+ ok: boolean;
+ sessionId: SessionId;
+ redirectedTo?: SessionId | null;
+ dismissedDialog?: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingStatus".
+ * via the `definition` "HarnessSessionResponse".
*/
-export interface PhonePairingStatus {
- state: PhonePairingState;
+export interface HarnessSessionResponse {
+ sessionId: SessionId;
+ harnessId: HarnessId;
+ title?: string | null;
+ cwd?: string | null;
+ createdAt: Millis;
+ updatedAt: Millis;
+ status: HarnessSessionStatus;
+ blocked?: boolean | null;
+ supersedes?: SessionId | null;
+ model?: string | null;
+ parentSessionId?: SessionId | null;
+ agentName?: string | null;
+ taskId?: string | null;
+ effort?: string | null;
+ transport?: Transport | null;
+ startupContext?: StartupContext | null;
+ redirectedTo?: SessionId | null;
+ switches?: SessionSwitches | null;
+ [k: string]: unknown;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingAvailability".
+ * via the `definition` "StartupContext".
*/
-export interface PhonePairingAvailability {
- available: boolean;
- reason?: string | null;
- gateway?: string | null;
+export interface StartupContext {
+ topicId: string;
+ sections: StartupSection[];
+ tokens: number;
+ deliveredVia: DeliveredVia;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PhonePairingRequest".
+ * via the `definition` "StartupSection".
*/
-export interface PhonePairingRequest {
- name: string;
- host?: string | null;
+export interface StartupSection {
+ kind: StartupKind;
+ title: string;
+ text: string;
+ sources: StartupSource[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AudioStatus".
+ * via the `definition` "SessionSwitches".
*/
-export interface AudioStatus {
- enabled: boolean;
- backend: AudioBackend;
- device: string;
- sampleRate: number;
- channels: number;
- format: AudioFormat;
- fifoPath: string;
- armed: boolean;
- publisherId?: string | null;
- armedAt?: number | null;
- bytesWritten: number;
- runtimeReady: boolean;
+export interface SessionSwitches {
+ model: boolean;
+ effort: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AudioHealth".
+ * via the `definition` "HarnessSessionTitleRequest".
*/
-export interface AudioHealth {
- ok: boolean;
- runtimeReady: boolean;
- fifoPath: string;
- message?: string | null;
+export interface HarnessSessionTitleRequest {
+ title: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "VoiceSpeakRequest".
+ * via the `definition` "HarnessSessionForkRequest".
*/
-export interface VoiceSpeakRequest {
- input: string;
- instructions?: string | null;
- voice?: string | null;
+export interface HarnessSessionForkRequest {
+ prompts: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "VoiceTranscribeResponse".
+ * via the `definition` "HarnessToolOutput".
*/
-export interface VoiceTranscribeResponse {
+export interface HarnessToolOutput {
text: string;
+ isError: boolean;
+ truncated: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceFileEntry".
- */
-export interface DeviceFileEntry {
- name: string;
- type: FileEntryKind;
- size: number;
- mtime: string;
-}
-/**
- * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "FilesListResponse".
+ * via the `definition` "TermSpawnRequest".
*/
-export interface FilesListResponse {
- path: string;
- root: string;
- entries: DeviceFileEntry[];
+export interface TermSpawnRequest {
+ command?: string | null;
+ model?: string | null;
+ effort?: string | null;
+ session?: string | null;
+ resume?: string | null;
+ agentId?: string | null;
+ force?: boolean | null;
+ cols?: number | null;
+ rows?: number | null;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StagedUploadResponse".
+ * via the `definition` "TermAttachInfo".
*/
-export interface StagedUploadResponse {
- uri: string;
- name: string;
- mime: string;
- size: number;
- expiresAt: number;
+export interface TermAttachInfo {
+ socket: string;
+ session: string;
+ host: string;
+ sshUser: string;
+ local: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "FileEntry".
+ * via the `definition` "TermSpawnResponse".
*/
-export interface FileEntry {
- name: string;
- type: FileKind;
- size: number;
- mtime: number;
+export interface TermSpawnResponse {
+ harnessSessionId?: SessionId | null;
+ id: string;
+ denSession: string;
+ command: string;
+ cwd?: string | null;
+ pid: number;
+ createdAt: number;
+ mux?: Mux | null;
+ reattached?: boolean | null;
+ attach?: TermAttachInfo | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "FileList".
+ * via the `definition` "PtyInfo".
*/
-export interface FileList {
- path: string;
- root: string;
- entries: FileEntry[];
+export interface PtyInfo {
+ id: string;
+ denSession: string;
+ command: string;
+ state: PtyState;
+ pid?: number | null;
+ attached: number;
+ exitCode?: number | null;
+ createdAt: number;
+ lastOutputTs?: number | null;
+ cols?: number | null;
+ rows?: number | null;
+ mux?: Mux | null;
+ persisted?: boolean | null;
+ reattached?: boolean | null;
+ attach?: TermAttachInfo | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "FileChanged".
+ * via the `definition` "PtyList".
*/
-export interface FileChanged {
- ok: boolean;
- path: string;
+export interface PtyList {
+ ptys: PtyInfo[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchToolArgs".
+ * via the `definition` "TermCommand".
*/
-export interface MemorySearchToolArgs {
- since?: string | null;
- before?: string | null;
- window?: BrowseWindow | null;
- expand?: boolean | null;
- synthesize?: boolean | null;
- query: string;
- mode?: SearchMode | null;
- scope?: MemoryScope | null;
- limit?: number | null;
- agent?: string | null;
- tag?: string | null;
+export interface TermCommand {
+ id: string;
+ label: string;
+ room: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchHit".
+ * via the `definition` "TermConfig".
*/
-export interface MemorySearchHit {
- chunk?: MemoryChunkMatch | null;
- id: string;
- source: MemoryHitSource;
- content: string;
- createdAt: string;
- score: number;
- role?: Role | null;
- agent?: string | null;
- kind?: SummaryKind | null;
- toolName?: string | null;
- conversationId?: string | null;
- sessionId?: string | null;
- fallback?: MemoryFallback | null;
- tags?: TagWire[] | null;
+export interface TermConfig {
+ enabled: boolean;
+ default: string;
+ maxPtys: number;
+ active: number;
+ commands: TermCommand[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryChunkMatch".
+ * via the `definition` "TermInjectRequest".
*/
-export interface MemoryChunkMatch {
- index: number;
- total: number;
- charStart: number;
- charEnd: number;
- content: string;
+export interface TermInjectRequest {
+ session: string;
+ text: string;
+ submit?: boolean | null;
+ interrupt?: boolean | null;
+ bypassDialogGate?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagWire".
+ * via the `definition` "TermInjectResponse".
*/
-export interface TagWire {
- id: string;
- entityType: TagEntityType;
- entityId: string;
- key: string;
- value: string;
- display: string;
- source: string;
- state: TagState;
- confidence?: number | null;
- proposedBy: string;
- reason: string;
- decidedBy?: string | null;
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
+export interface TermInjectResponse {
+ ok: boolean;
+ ptyId: string;
+ dismissedDialog?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryDegraded".
+ * via the `definition` "DeviceOwner".
*/
-export interface MemoryDegraded {
- reason: string;
- effect: string;
+export interface DeviceOwner {
+ device?: string | null;
+ self: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchResponse".
+ * via the `definition` "UploadCreated".
*/
-export interface MemorySearchResponse {
- query: string;
- scope: MemoryScope;
- degraded?: MemoryDegraded | null;
- fallback?: MemoryFallback | null;
- results: MemorySearchHit[];
- expanded?: MemoryEntry[];
- synthesis?: string | null;
+export interface UploadCreated {
+ id: string;
+ uri: string;
+ name: string;
+ bytes: number;
+ mediaType: string;
+ expiresAt: string;
+ session?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryEntry".
+ * via the `definition` "UploadList".
*/
-export interface MemoryEntry {
- id?: string | null;
- sessionId: string;
- agent: string;
- channel: string;
- role: Role;
- content: string;
- toolName?: string | null;
- toolArgs?: {
- [k: string]: unknown;
- } | null;
- toolResult?: string | null;
- metadata?: {
- [k: string]: unknown;
- } | null;
- createdAt?: string | null;
+export interface UploadList {
+ uploads: UploadCreated[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryBrowseToolArgs".
+ * via the `definition` "UsersRegistry".
*/
-export interface MemoryBrowseToolArgs {
- conversation_id?: string | null;
- include_tools?: boolean | null;
- since?: string | null;
- before?: string | null;
- window?: BrowseWindow | null;
- agent?: string | null;
- tag?: string | null;
- limit?: number | null;
- order?: MemoryBrowseOrder | null;
+export interface UsersRegistry {
+ ownerUserId: string;
+ unmappedIsOwner: boolean;
+ localStores?: boolean | null;
+ users: {
+ [k: string]: UserRecord;
+ };
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryAppendToolArgs".
+ * via the `definition` "UserRecord".
*/
-export interface MemoryAppendToolArgs {
- session_id: string;
- content: string;
- role: Role;
- tool_name?: string | null;
- tool_args?: {
- [k: string]: unknown;
- } | null;
- tool_result?: string | null;
- event_id?: string | null;
- agent?: string | null;
+export interface UserRecord {
+ id?: string | null;
+ devices?: string[] | null;
+ pgUrl?: string | null;
+ envFile?: string | null;
persona?: string | null;
- source?: string | null;
- channel?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryIngestMessage".
+ * via the `definition` "ChatRequest".
*/
-export interface MemoryIngestMessage {
+export interface ChatRequest {
+ model: string;
+ messages: OpenAiMessage[];
+ stream: boolean | null;
+ max_tokens: number | null;
+ stream_options: StreamOptions | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "OpenAiMessage".
+ */
+export interface OpenAiMessage {
role: Role;
- content: string;
- created_at?: string | null;
- tool_calls?: MemoryIngestToolCall[] | null;
+ content: string | null;
+ reasoning_content?: string | null;
+ tool_calls?: MessageToolCall[] | null;
+ tool_call_id?: string | null;
+}
+export interface StreamedPlainToolCall {
+ type: "function";
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryIngestToolCall".
+ * via the `definition` "StreamOptions".
*/
-export interface MemoryIngestToolCall {
- id?: string | null;
- name: string;
- input?: {
- [k: string]: unknown;
- } | null;
+export interface StreamOptions {
+ include_usage: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryIngestSessionToolArgs".
+ * via the `definition` "FunctionDelta".
*/
-export interface MemoryIngestSessionToolArgs {
- session_id: string;
- messages: MemoryIngestMessage[];
- agent?: string | null;
- persona?: string | null;
- source?: string | null;
- channel?: string | null;
+export interface FunctionDelta {
+ name?: string | null;
+ arguments?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryGetFullToolArgs".
+ * via the `definition` "StreamedPlainToolCall".
*/
-export interface MemoryGetFullToolArgs {
+export interface StreamedPlainToolCall1 {
+ index?: number | null;
id?: string | null;
+ function: FunctionDelta;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsToolArgs".
+ * via the `definition` "chat.completion".
*/
-export interface MemoryTagsToolArgs {
- entity_type?: string | null;
- entity_id?: string | null;
- session_key?: string | null;
- agent?: string | null;
- key?: string | null;
- value?: string | null;
- tag?: string | null;
- display?: string | null;
- state?: TagState | null;
- ids?: string[] | null;
- session_keys?: string[] | null;
- entries?: TagEntryPair[] | null;
- parent_value?: string | null;
- aliases?: string[] | null;
- from?: string | null;
- into?: string | null;
- reason?: string | null;
- decided_by?: string | null;
- limit?: number | null;
+export interface ChatCompletion {
+ id: string;
+ created: number;
+ model: string;
+ choices: CompletionChoice[];
+ usage?: Usage | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagEntryPair".
+ * via the `definition` "CompletionChoice".
*/
-export interface TagEntryPair {
- key: string;
- value: string;
+export interface CompletionChoice {
+ index: number;
+ message: OpenAiMessage;
+ finish_reason: FinishReason;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryToolResponse".
+ * via the `definition` "Usage".
*/
-export interface MemoryToolResponse {
- ok: boolean;
- result: ToolResult;
-}
-export interface MediaFields {
- type: "image";
+export interface Usage {
+ prompt_tokens: number;
+ completion_tokens: number;
+ total_tokens: number;
+ prompt_tokens_details?: PromptTokensDetails | null;
+ completion_tokens_details?: CompletionTokensDetails | null;
}
-export interface MediaFields1 {
- type: "video";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PromptTokensDetails".
+ */
+export interface PromptTokensDetails {
+ cached_tokens: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MediaFields".
+ * via the `definition` "CompletionTokensDetails".
*/
-export interface MediaFields2 {
- data?: string | null;
- url?: string | null;
- mimeType?: string | null;
+export interface CompletionTokensDetails {
+ reasoning_tokens: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryBrowseMessage".
+ * via the `definition` "chat.completion.chunk".
*/
-export interface MemoryBrowseMessage {
+export interface ChatCompletionChunk {
id: string;
- role: Role;
- agent?: string | null;
- content: string;
- createdAt: string;
- conversationId?: string | null;
- sessionId?: string | null;
- toolName?: string | null;
- tags?: TagWire[] | null;
+ created: number;
+ model: string;
+ choices: ChunkChoice[];
+ usage?: Usage | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryBrowseResponse".
+ * via the `definition` "ChunkChoice".
*/
-export interface MemoryBrowseResponse {
- messages: MemoryBrowseMessage[];
+export interface ChunkChoice {
+ index: number;
+ delta: CompletionDelta;
+ finish_reason: FinishReason | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TopTool".
+ * via the `definition` "CompletionDelta".
*/
-export interface TopTool {
- tool: string;
- count: number;
+export interface CompletionDelta {
+ role?: Role | null;
+ content?: string | null;
+ reasoning_content?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "RecentSession".
+ * via the `definition` "list".
*/
-export interface RecentSession {
- sessionId: string;
- title?: string | null;
- agent: string;
- lastActive: number;
- messages: number;
+export interface List {
+ data: Model[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryStatsResponse".
+ * via the `definition` "model".
*/
-export interface MemoryStatsResponse {
- conversations: number;
- messages: number;
- toolCalls: number;
- summaries: number;
- embedQueueDepth: number;
- embeddedMessages: number;
- failedEmbeddings: number;
- topTools: TopTool[];
- recentSessions: RecentSession[];
+export interface Model {
+ id: string;
+ created: number;
+ owned_by: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "EmbedHealth".
+ * via the `definition` "ErrorDetail".
*/
-export interface EmbedHealth {
- status: EmbedStatus;
- error?: string | null;
- impact?: string | null;
- checkedAt?: string | null;
+export interface ErrorDetail {
+ message: string;
+ type: ErrorKind;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryHealthResponse".
+ * via the `definition` "ErrorResponse".
*/
-export interface MemoryHealthResponse {
- observedAt?: string | null;
- queueStatus?: QueueStatus | null;
- queues?: QueueHealth | null;
- compaction?: SummarizerHealth | null;
- failedEmbeddings?: number | null;
- skippedEmbeddings?: number | null;
- capture?: CaptureHealth | null;
- status: MemoryHealthStatus;
- embeddings: EmbedHealth;
- embedQueueDepth: number;
+export interface ErrorResponse {
+ error: ErrorDetail;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "QueueHealth".
+ * via the `definition` "Conversation".
*/
-export interface QueueHealth {
- task: string;
- pending: number;
- running: number;
- scheduled: number;
- dead: number;
- oldestPendingMinutes?: number | null;
+export interface Conversation {
+ id: string;
+ title: string;
+ createdAt: number;
+ updatedAt: number;
+ messages: OpenAiMessage[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SummarizerHealth".
+ * via the `definition` "Conversations".
*/
-export interface SummarizerHealth {
- eligible: boolean;
- activeTail: boolean;
- belowFloor: boolean;
+export interface Conversations {
+ conversations: Conversation[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureHealth".
+ * via the `definition` "ConversationTitle".
*/
-export interface CaptureHealth {
- status: CaptureStatus;
- impact: string;
+export interface ConversationTitle {
+ title: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PendingTagWire".
+ * via the `definition` "WikiQuery".
*/
-export interface PendingTagWire {
- id: string;
- entityType: TagEntityType;
- entityId: string;
- key: string;
- value: string;
- display: string;
- source: string;
- state: TagState;
- confidence?: number | null;
- proposedBy: string;
- reason: string;
- decidedBy?: string | null;
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
- action?: PendingTagAction | null;
- sessionKey?: string | null;
- title?: string | null;
- agent?: string | null;
- conversationId?: string | null;
- excerpt?: string | null;
+export interface WikiQuery {
+ q: string | null;
+ tag: string | null;
+ limit: number | null;
+ offset: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsDecideRequest".
+ * via the `definition` "WikiPageQuery".
*/
-export interface MemoryTagsDecideRequest {
- ids?: string[] | null;
- state?: TagState | null;
- decided_by?: string | null;
+export interface WikiPageQuery {
+ slug: WikiSlug;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsAddRequest".
+ * via the `definition` "WikiHistoryEntry".
*/
-export interface MemoryTagsAddRequest {
- entity_type?: string | null;
- entity_id?: string | null;
- session_key?: string | null;
- agent?: string | null;
- tag?: string | null;
- key?: string | null;
- value?: string | null;
- display?: string | null;
- reason?: string | null;
- decided_by?: string | null;
+export interface WikiHistoryEntry {
+ date: string;
+ title: string;
+ body: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemoryTagsLookupRequest".
+ * via the `definition` "WikiCitation".
*/
-export interface MemoryTagsLookupRequest {
- session_keys?: string[] | null;
- states?: string[] | null;
+export interface WikiCitation {
+ summaryId: string;
+ date?: Millis | null;
+ kind?: string | null;
+ note?: string | null;
+ conversationId?: string | null;
+ sessionId?: SessionId | null;
+ title?: string | null;
+ channel?: string | null;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyEntry".
+ * via the `definition` "WikiSource".
*/
-export interface TagTaxonomyEntry {
- key: string;
- value: string;
- display: string;
- parentValue?: string | null;
- aliases: string[];
- state: TagState;
- source: string;
- reason: string;
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
+export interface WikiSource {
+ kind: WikiSourceKind;
+ ids: string[];
+ conversationId?: string | null;
+ span?: WikiSourceSpan | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyWire".
+ * via the `definition` "WikiSourceSpan".
*/
-export interface TagTaxonomyWire {
- key: string;
- entries: TagTaxonomyEntry[];
- decidedAt?: string | null;
- createdAt: string;
- updatedAt: string;
+export interface WikiSourceSpan {
+ earliest: Millis;
+ latest: Millis;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyUpsertRequest".
+ * via the `definition` "WikiPageResponse".
*/
-export interface TagTaxonomyUpsertRequest {
- key?: string | null;
- value?: string | null;
- display?: string | null;
- parent_value?: string | null;
- aliases?: string[] | null;
- reason?: string | null;
- decided_by?: string | null;
+export interface WikiPageResponse {
+ slug: string;
+ title: string;
+ aliases: string[];
+ tags: string[];
+ entities: string[];
+ currentState: string;
+ article?: string | null;
+ seeAlso?: string[] | null;
+ history: WikiHistoryEntry[];
+ citations: WikiCitation[];
+ markdown: string;
+ sources: WikiSource[];
+ gitSha?: string | null;
+ lastVerified?: Millis | null;
+ updatedAt: Millis;
+ related?: string[] | null;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyDecideRequest".
+ * via the `definition` "WikiMissSuggestion".
*/
-export interface TagTaxonomyDecideRequest {
- entries?: TagEntryPair[] | null;
- state?: TagState | null;
- decided_by?: string | null;
+export interface WikiMissSuggestion {
+ slug: string;
+ title: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyMerge".
+ * via the `definition` "WikiMissBody".
*/
-export interface TagTaxonomyMerge {
- key: string;
- from: string;
- into: string;
+export interface WikiMissBody {
+ error: string;
+ suggestions: WikiMissSuggestion[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyMergeRequest".
+ * via the `definition` "WikiRedLink".
*/
-export interface TagTaxonomyMergeRequest {
- key?: string | null;
- from?: string | null;
- into?: string | null;
+export interface WikiRedLink {
+ entity: string;
+ referencedBy: string[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyMergeResult".
+ * via the `definition` "WikiGapsResponse".
*/
-export interface TagTaxonomyMergeResult {
- moved: number;
- dropped: number;
- into: string;
+export interface WikiGapsResponse {
+ redLinks: WikiRedLink[];
+ stalest: WikiTopic[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagCount".
+ * via the `definition` "WikiTopic".
*/
-export interface TagCount {
- key: string;
- value: string;
- display: string;
- conversations: number;
+export interface WikiTopic {
+ slug: string;
+ title: string;
+ tags: string[];
+ entities: string[];
+ updatedAt: Millis;
+ excerpt: string;
+ topicId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagListResult".
+ * via the `definition` "WikiTopicList".
*/
-export interface TagListResult {
- tags: TagWire[];
+export interface WikiTopicList {
+ topics: WikiTopic[];
+ total: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PendingTagListResult".
+ * via the `definition` "TidySample".
*/
-export interface PendingTagListResult {
- tags: PendingTagWire[];
+export interface TidySample {
+ id: string;
+ title?: string | null;
+ lastActive?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagCountsResult".
+ * via the `definition` "TidyEvidence".
*/
-export interface TagCountsResult {
- counts: TagCount[];
+export interface TidyEvidence {
+ sessions: number;
+ samples: TidySample[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyListResult".
+ * via the `definition` "TidyProposal".
*/
-export interface TagTaxonomyListResult {
- entries: TagTaxonomyEntry[];
+export interface TidyProposal {
+ id: string;
+ batchId: string;
+ change: TidyChange;
+ reason: string;
+ evidence: TidyEvidence;
+ proposedBy: Proposer;
+ proposedAt: number;
+ state: ProposalState;
+ decidedAt?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagDecisionResult".
+ * via the `definition` "TidyBatch".
*/
-export interface TagDecisionResult {
- changed: number;
+export interface TidyBatch {
+ batchId: string;
+ proposedBy: Proposer;
+ proposedAt: number;
+ proposals: TidyProposal[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagAddResult".
+ * via the `definition` "TidyPending".
*/
-export interface TagAddResult {
- tag: TagWire;
+export interface TidyPending {
+ batches: TidyBatch[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagLookupResult".
+ * via the `definition` "TidyFailure".
*/
-export interface TagLookupResult {
- sessions: {
- [k: string]: TagWire[];
- };
+export interface TidyFailure {
+ proposalId: string;
+ error: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TagTaxonomyUpsertResult".
+ * via the `definition` "TidyBatchDecision".
*/
-export interface TagTaxonomyUpsertResult {
- entry: TagTaxonomyEntry;
+export interface TidyBatchDecision {
+ decided: TidyProposal[];
+ failed: TidyFailure[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ProjectRuleResult".
+ * via the `definition` "FilingUpkeep".
*/
-export interface ProjectRuleResult {
- key: string;
- rule: ProjectRule;
- gitRoot?: string | null;
+export interface FilingUpkeep {
+ categorizer: number;
+ you: number;
+ uncategorized: number;
+ leftOut: number;
+ correctionsLastWeek: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HealthzResponse".
+ * via the `definition` "EntityTypeCount".
*/
-export interface HealthzResponse {
- ok: boolean;
- sessions: number;
+export interface EntityTypeCount {
+ typeId: string;
name: string;
- node: string;
- degraded?: string | null;
- degradedProviders?: DegradedProvider[];
+ entities: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DegradedProvider".
+ * via the `definition` "WikiUpkeep".
*/
-export interface DegradedProvider {
- id: string;
- recovery: ProviderRecovery;
- reason: string;
+export interface WikiUpkeep {
+ topicPages: number;
+ entityTypes: EntityTypeCount[];
+ loosePages: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "GatewayError".
- */
-export interface GatewayError {
- error: string;
- detail?: string | null;
- hint?: string | null;
- code?: string | null;
- harnessId?: HarnessId | null;
- node?: string | null;
- retryable?: boolean | null;
- reason?: string | null;
+ * via the `definition` "WorkerActivity".
+ */
+export interface WorkerActivity {
+ lastFinishedAt?: number | null;
+ failing: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "OkReply".
+ * via the `definition` "WorkerUpkeep".
*/
-export interface OkReply {
- ok: boolean;
+export interface WorkerUpkeep {
+ embedder: WorkerActivity;
+ summarizer: WorkerActivity;
+ categorizer: WorkerActivity;
+ wikiBuilder: WorkerActivity;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "EventsIngested".
+ * via the `definition` "MemoryUpkeep".
*/
-export interface EventsIngested {
- ok: boolean;
- ingested: number;
+export interface MemoryUpkeep {
+ filing: FilingUpkeep;
+ wiki: WikiUpkeep;
+ workers: WorkerUpkeep;
+ pendingProposals: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PairRedeemRequest".
+ * via the `definition` "TopicRecord".
*/
-export interface PairRedeemRequest {
- token: string;
- csr?: string | null;
+export interface TopicRecord {
+ id: string;
+ kind: "work" | "type" | "entity";
+ slug: string;
+ name: string;
+ aliases: string[];
+ parent?: string | null;
+ directory?: TopicDirectory | null;
+ createdAt: number;
+ updatedAt: number;
+ closedAt?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "RosterFile".
+ * via the `definition` "TopicSummary".
*/
-export interface RosterFile {
- default: string;
- cwd: string | null;
- env: {
- [k: string]: string;
- };
- commands: {
- [k: string]: RosterEntry;
- };
+export interface TopicSummary {
+ id: string;
+ kind: "work" | "type" | "entity";
+ slug: string;
+ name: string;
+ aliases: string[];
+ parent?: string | null;
+ directory?: TopicDirectory | null;
+ createdAt: number;
+ updatedAt: number;
+ closedAt?: number | null;
+ sessionCount: number;
+ lastActive?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "RosterEntry".
+ * via the `definition` "TopicList".
*/
-export interface RosterEntry {
- label: string;
- cmd: string[];
- room: boolean | null;
- cwd: string | null;
- env: {
- [k: string]: string;
- };
+export interface TopicList {
+ topics: TopicSummary[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TranscriptTurn".
+ * via the `definition` "TopicCreateRequest".
*/
-export interface TranscriptTurn {
- role: Role;
- text: string;
- ts?: number | null;
+export interface TopicCreateRequest {
+ kind: "work" | "type" | "entity";
+ name: string;
+ aliases: string[];
+ parent?: string | null;
+ directory?: TopicDirectory | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TranscriptResponse".
+ * via the `definition` "WikiPageEdit".
*/
-export interface TranscriptResponse {
- id: string;
- command: string;
- turns: TranscriptTurn[];
- contextWindow?: number | null;
- compactAt?: number | null;
- contextSource?: ContextSource | null;
+export interface WikiPageEdit {
+ currentState?: string | null;
+ article?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionSummary".
+ * via the `definition` "TopicUpdate".
*/
-export interface SessionSummary {
- id: string;
- lastActive: number;
- messages: number;
+export interface TopicUpdate {
+ name?: string | null;
+ aliases?: string[] | null;
+ parent?: string | null;
+ directory?: TopicDirectory | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionList".
+ * via the `definition` "TopicMergeRequest".
*/
-export interface SessionList {
- sessions: SessionSummary[];
+export interface TopicMergeRequest {
+ into: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MessageList".
+ * via the `definition` "TopicPlacement".
*/
-export interface MessageList {
- messages: SessionMessage[];
+export interface TopicPlacement {
+ sessionId: SessionId;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionMessage".
+ * via the `definition` "TopicSuggestion".
*/
-export interface SessionMessage {
- id: string;
- sessionId: string;
- role: SessionMessageRole;
- text: string;
- ts: number;
- usage?: MessageUsage | null;
- model?: string | null;
- durationMs?: number | null;
- thinking?: boolean | null;
- tools?: string[] | null;
+export interface TopicSuggestion {
+ name: string;
+ topicId?: string | null;
+ parentId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MessageUsage".
+ * via the `definition` "PlacementReply".
*/
-export interface MessageUsage {
- promptTokens: number;
- completionTokens: number;
- cachedTokens: number;
+export interface PlacementReply {
+ placement?: TopicPlacement | null;
+ suggestion?: TopicSuggestion | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionPostRequest".
+ * via the `definition` "PlacementRequest".
*/
-export interface SessionPostRequest {
- excludeTools?: string[] | null;
- text: string;
- userId?: string | null;
- agent?: string | null;
- thinking?: ThinkingLevel | null;
- systemPrompt?: string | null;
+export interface PlacementRequest {
+ topicId: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionPostAccepted".
+ * via the `definition` "SessionHistoryMark".
*/
-export interface SessionPostAccepted {
- accepted: boolean;
- session: string;
+export interface SessionHistoryMark {
+ sessionId: SessionId;
+ markedAt: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionPostReply".
+ * via the `definition` "SessionHistoryList".
*/
-export interface SessionPostReply {
- message: SessionMessage;
+export interface SessionHistoryList {
+ sessions: SessionHistoryMark[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionWsClientMessage".
+ * via the `definition` "TopicSession".
*/
-export interface SessionWsClientMessage {
- type: SessionClientKind;
- session: string;
+export interface TopicSession {
+ sessionId: SessionId;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
+ title?: string | null;
+ lastActive?: number | null;
+ node?: string | null;
+ parentSessionId?: SessionId | null;
+ taskId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StreamEvent".
+ * via the `definition` "TopicSessionList".
*/
-export interface StreamEvent {
- type: StreamEventKind;
- content: string;
- metadata?: {
- [k: string]: unknown;
- } | null;
-}
-export interface TranscriptWsFrame {
- kind: "transcript";
+export interface TopicSessionList {
+ sessions: TopicSession[];
+ conversations: TopicConversation[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessTranscriptTurn".
+ * via the `definition` "TopicConversation".
*/
-export interface HarnessTranscriptTurn {
- role: SessionMessageRole;
- text: string;
- thinking?: string | null;
- tools?: HarnessTranscriptTool[] | null;
- usage?: MessageUsage | null;
- model?: string | null;
- stopReason?: string | null;
- lastBlock?: TranscriptBlock | null;
- complete?: boolean;
- compact?: boolean;
+export interface TopicConversation {
+ conversationId: string;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
+ channel: string;
+ title?: string | null;
+ lastActive?: number | null;
+ node?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessTranscriptTool".
+ * via the `definition` "TopicFiling".
*/
-export interface HarnessTranscriptTool {
- name: string;
- status: TranscriptToolStatus;
- args?: {
- [k: string]: unknown;
- } | null;
- id?: string | null;
- input?: {
- [k: string]: unknown;
- } | null;
- resultText?: string | null;
+export interface TopicFiling {
+ sessions: TopicSession[];
+ conversations: TopicConversation[];
+ history: SessionHistoryMark[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TranscriptWsFrame".
+ * via the `definition` "SessionSuggestion".
*/
-export interface TranscriptWsFrame1 {
- session: string;
- rev: number;
- from: number;
- turns: HarnessTranscriptTurn[];
- total: number;
- command: string;
- truncatedBefore?: boolean | null;
+export interface SessionSuggestion {
+ sessionId: SessionId;
+ name: string;
+ topicId?: string | null;
+ parentId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionTranscriptResponse".
+ * via the `definition` "SessionSuggestionList".
*/
-export interface HarnessSessionTranscriptResponse {
- sessionId: SessionId;
- harnessId: HarnessId;
- turns: HarnessTranscriptTurn[];
- contextWindow: number;
- compactAt: number;
- contextSource: ContextSource;
- redirectedTo?: SessionId | null;
+export interface SessionSuggestionList {
+ sessions: SessionSuggestion[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessTurnAccepted".
+ * via the `definition` "ConversationPlacement".
*/
-export interface HarnessTurnAccepted {
- ok: boolean;
- sessionId: SessionId;
- redirectedTo?: SessionId | null;
- dismissedDialog?: boolean;
+export interface ConversationPlacement {
+ conversationId: string;
+ topicId: string;
+ by: PlacedBy;
+ at: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionResponse".
+ * via the `definition` "ConversationPlacementReply".
*/
-export interface HarnessSessionResponse {
- sessionId: SessionId;
- harnessId: HarnessId;
- title?: string | null;
- cwd?: string | null;
- createdAt: Millis;
- updatedAt: Millis;
- status: HarnessSessionStatus;
- blocked?: boolean | null;
- supersedes?: SessionId | null;
- model?: string | null;
- parentSessionId?: SessionId | null;
- agentName?: string | null;
- taskId?: string | null;
- effort?: string | null;
- transport?: Transport | null;
- redirectedTo?: SessionId | null;
- [k: string]: unknown;
+export interface ConversationPlacementReply {
+ placement?: ConversationPlacement | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermSpawnRequest".
+ * via the `definition` "TopicPage".
*/
-export interface TermSpawnRequest {
- command?: string | null;
- model?: string | null;
- effort?: string | null;
- session?: string | null;
- resume?: string | null;
- agentId?: string | null;
- force?: boolean | null;
- cols?: number | null;
- rows?: number | null;
+export interface TopicPage {
+ topic: TopicRecord;
+ page?: WikiPageResponse | null;
+ mentions: TopicMention[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermAttachInfo".
+ * via the `definition` "TopicMention".
*/
-export interface TermAttachInfo {
- socket: string;
- session: string;
- host: string;
- sshUser: string;
- local: boolean;
+export interface TopicMention {
+ topicId: string;
+ name: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermSpawnResponse".
+ * via the `definition` "TopicDecision".
*/
-export interface TermSpawnResponse {
- harnessSessionId?: SessionId | null;
+export interface TopicDecision {
id: string;
- denSession: string;
- command: string;
- cwd?: string | null;
- pid: number;
+ topicId: string;
+ text: string;
+ status: DecisionStatus;
+ supersededBy?: string | null;
+ by: string;
+ sessionId?: SessionId | null;
createdAt: number;
- mux?: Mux | null;
- reattached?: boolean | null;
- attach?: TermAttachInfo | null;
+ updatedAt: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PtyInfo".
+ * via the `definition` "TopicDecisionList".
*/
-export interface PtyInfo {
- id: string;
- denSession: string;
- command: string;
- state: PtyState;
- pid?: number | null;
- attached: number;
- exitCode?: number | null;
- createdAt: number;
- lastOutputTs?: number | null;
- cols?: number | null;
- rows?: number | null;
- mux?: Mux | null;
- persisted?: boolean | null;
- reattached?: boolean | null;
- attach?: TermAttachInfo | null;
+export interface TopicDecisionList {
+ decisions: TopicDecision[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "DecisionCreateRequest".
+ */
+export interface DecisionCreateRequest {
+ text: string;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PtyList".
+ * via the `definition` "DecisionUpdate".
*/
-export interface PtyList {
- ptys: PtyInfo[];
+export interface DecisionUpdate {
+ text: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermCommand".
+ * via the `definition` "DecisionSupersedeRequest".
*/
-export interface TermCommand {
- id: string;
- label: string;
- room: boolean;
+export interface DecisionSupersedeRequest {
+ text?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermConfig".
+ * via the `definition` "DecisionSuperseded".
*/
-export interface TermConfig {
- enabled: boolean;
- default: string;
- maxPtys: number;
- active: number;
- commands: TermCommand[];
+export interface DecisionSuperseded {
+ superseded: TopicDecision;
+ replacement?: TopicDecision | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermInjectRequest".
+ * via the `definition` "AgentUsage".
*/
-export interface TermInjectRequest {
- session: string;
- text: string;
- submit?: boolean | null;
- interrupt?: boolean | null;
- bypassDialogGate?: boolean | null;
+export interface AgentUsage {
+ promptTokens: number;
+ completionTokens: number;
+ cachedTokens: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TermInjectResponse".
+ * via the `definition` "LiveSessionSummary".
*/
-export interface TermInjectResponse {
- ok: boolean;
- ptyId: string;
- dismissedDialog?: boolean | null;
+export interface LiveSessionSummary {
+ id: string;
+ name: string;
+ harness?: SessionHarness | null;
+ lastEventTs?: number | null;
+ pty?: string | null;
+ contextWindow?: number | null;
+ compactAt?: number | null;
+ contextSource?: ContextSource | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "DeviceOwner".
+ * via the `definition` "SessionLogLine".
*/
-export interface DeviceOwner {
- device?: string | null;
- self: boolean;
+export interface SessionLogLine {
+ who: string;
+ text: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "UploadCreated".
+ * via the `definition` "SessionView".
*/
-export interface UploadCreated {
- id: string;
- name: string;
- bytes: number;
- mediaType: string;
- expiresAt: string;
- session?: string | null;
+export interface SessionView {
+ title: string;
+ activity: Activity;
+ tool?: string | null;
+ tasks: string[];
+ thought: string;
+ lastMessage: string;
+ log: SessionLogLine[];
+ term: string[];
+ ended: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "UploadList".
+ * via the `definition` "LiveSessionList".
*/
-export interface UploadList {
- uploads: UploadCreated[];
+export interface LiveSessionList {
+ sessions: LiveSessionSummary[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "UsersRegistry".
+ * via the `definition` "StateResponse".
*/
-export interface UsersRegistry {
- ownerUserId: string;
- unmappedIsOwner: boolean;
- localStores?: boolean | null;
- users: {
- [k: string]: UserRecord;
- };
+export interface StateResponse {
+ session: string;
+ state: SessionView;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "UserRecord".
+ * via the `definition` "snapshot".
*/
-export interface UserRecord {
- id?: string | null;
- devices?: string[] | null;
- pgUrl?: string | null;
- envFile?: string | null;
- persona?: string | null;
+export interface Snapshot {
+ v: ProtocolVersion;
+ sessions: LiveSessionSummary[];
+ rooms: {
+ [k: string]: SessionView;
+ };
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ChatRequest".
+ * via the `definition` "session.removed".
*/
-export interface ChatRequest {
- model: string;
- messages: OpenAiMessage[];
- stream: boolean | null;
- max_tokens: number | null;
- stream_options: StreamOptions | null;
+export interface SessionRemoved {
+ v: ProtocolVersion;
+ session: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "OpenAiMessage".
+ * via the `definition` "plugin.changed".
*/
-export interface OpenAiMessage {
- role: Role;
- content: string | null;
- reasoning_content?: string | null;
- tool_calls?: MessageToolCall[] | null;
- tool_call_id?: string | null;
+export interface PluginChanged {
+ v: ProtocolVersion;
+ plugin: PluginId;
}
-export interface StreamedPlainToolCall {
- type: "function";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "plugin.views".
+ */
+export interface PluginViews {
+ v: ProtocolVersion;
+ plugin: PluginId;
+ views: RouteName[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StreamOptions".
+ * via the `definition` "CaptureBatchRequest".
*/
-export interface StreamOptions {
- include_usage: boolean;
+export interface CaptureBatchRequest {
+ session_key: string;
+ agent: string;
+ channel?: string | null;
+ title?: string | null;
+ settings?: {
+ [k: string]: unknown;
+ } | null;
+ task_id?: string | null;
+ finalize?: boolean | null;
+ created_at?: Millis | null;
+ updated_at?: Millis | null;
+ messages: CaptureMessage[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "FunctionDelta".
+ * via the `definition` "CaptureMessage".
*/
-export interface FunctionDelta {
- name?: string | null;
- arguments?: string | null;
+export interface CaptureMessage {
+ event_id: string;
+ role: Role;
+ content: string;
+ tool_name?: string | null;
+ tool_args?: {
+ [k: string]: unknown;
+ } | null;
+ tool_result?: string | null;
+ metadata?: {
+ [k: string]: unknown;
+ } | null;
+ created_at?: Millis | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StreamedPlainToolCall".
+ * via the `definition` "CaptureResult".
*/
-export interface StreamedPlainToolCall1 {
- index?: number | null;
- id?: string | null;
- function: FunctionDelta;
+export interface CaptureResult {
+ ok: boolean;
+ conversation_id: string;
+ inserted: number;
+ skipped: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "chat.completion".
+ * via the `definition` "HookContextBase".
*/
-export interface ChatCompletion {
- id: string;
- created: number;
- model: string;
- choices: CompletionChoice[];
- usage?: Usage | null;
+export interface HookContextBase {
+ agentId?: string | null;
+ sessionId?: string | null;
+ timestamp: number;
+ metadata: {
+ [k: string]: unknown;
+ };
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CompletionChoice".
+ * via the `definition` "HookUsage".
*/
-export interface CompletionChoice {
- index: number;
- message: OpenAiMessage;
- finish_reason: FinishReason;
+export interface HookUsage {
+ promptTokens: number;
+ completionTokens: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "Usage".
+ * via the `definition` "SessionTokens".
*/
-export interface Usage {
- prompt_tokens: number;
- completion_tokens: number;
- total_tokens: number;
- prompt_tokens_details?: PromptTokensDetails | null;
- completion_tokens_details?: CompletionTokensDetails | null;
+export interface SessionTokens {
+ prompt: number;
+ completion: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptTokensDetails".
+ * via the `definition` "TurnComplexity".
*/
-export interface PromptTokensDetails {
- cached_tokens: number;
+export interface TurnComplexity {
+ toolCallCount: number;
+ hadErrorRecovery: boolean;
+ hadUserCorrection: boolean;
+ uniqueTools: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CompletionTokensDetails".
+ * via the `definition` "Message".
*/
-export interface CompletionTokensDetails {
- reasoning_tokens: number;
+export interface Message {
+ role: Role;
+ content: MessageContent;
+ reasoning?: string | null;
+ toolCalls?: ToolCall[] | null;
+ toolCallId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "chat.completion.chunk".
+ * via the `definition` "ToolCall".
*/
-export interface ChatCompletionChunk {
+export interface ToolCall {
id: string;
- created: number;
- model: string;
- choices: ChunkChoice[];
- usage?: Usage | null;
+ name: string;
+ arguments: {
+ [k: string]: unknown;
+ };
+ thoughtSignature?: string | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HookPipelineError".
+ */
+export interface HookPipelineError {
+ hookId: string;
+ error: string;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "HookPipelineResult".
+ */
+export interface HookPipelineResult {
+ context: HookContext;
+ aborted: boolean;
+ skipped: boolean;
+ errors: HookPipelineError[];
+ ran: string[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ChunkChoice".
+ * via the `definition` "HookConfig".
*/
-export interface ChunkChoice {
- index: number;
- delta: CompletionDelta;
- finish_reason: FinishReason | null;
+export interface HookConfig {
+ id: string;
+ event: HookEventName;
+ type: HookConfigKind;
+ target: string;
+ priority?: number | null;
+ onError?: HookErrorMode | null;
+ agentFilter?: string[] | null;
+ toolFilter?: string[] | null;
+ description?: string | null;
+ enabled?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CompletionDelta".
+ * via the `definition` "ApprovalOption".
*/
-export interface CompletionDelta {
- role?: Role | null;
- content?: string | null;
- reasoning_content?: string | null;
+export interface ApprovalOption {
+ key: string;
+ label: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "list".
+ * via the `definition` "HarnessSessionSummary".
*/
-export interface List {
- data: Model[];
+export interface HarnessSessionSummary {
+ sessionId: SessionId;
+ harnessId: HarnessId;
+ title?: string | null;
+ cwd?: string | null;
+ createdAt: Millis;
+ updatedAt: Millis;
+ status: HarnessSessionStatus;
+ blocked?: boolean | null;
+ supersedes?: SessionId | null;
+ model?: string | null;
+ parentSessionId?: SessionId | null;
+ agentName?: string | null;
+ taskId?: string | null;
+ effort?: string | null;
+ transport?: Transport | null;
+ startupContext?: StartupContext | null;
+ [k: string]: unknown;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "model".
+ * via the `definition` "PlanEntry".
*/
-export interface Model {
- id: string;
- created: number;
- owned_by: string;
+export interface PlanEntry {
+ content: string;
+ status: PlanStatus;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ErrorDetail".
+ * via the `definition` "LlmUsage".
*/
-export interface ErrorDetail {
- message: string;
- type: ErrorKind;
+export interface LlmUsage {
+ promptTokens: number;
+ completionTokens: number;
+ reasoningTokens?: number | null;
+ cachedTokens?: number | null;
+ cacheCreationTokens?: number | null;
+ cacheReadTokens?: number | null;
+}
+export interface HarnessStatusFrame {
+ type: "status";
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ErrorResponse".
+ * via the `definition` "PromptQuestion".
*/
-export interface ErrorResponse {
- error: ErrorDetail;
+export interface PromptQuestion {
+ question?: string | null;
+ header?: string | null;
+ multiSelect: boolean;
+ freeText?: boolean | null;
+ options: PromptOption[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "Conversation".
+ * via the `definition` "PromptOption".
*/
-export interface Conversation {
- id: string;
- title: string;
- createdAt: number;
- updatedAt: number;
- messages: OpenAiMessage[];
+export interface PromptOption {
+ label: string;
+ description?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "Conversations".
+ * via the `definition` "PromptResolution".
*/
-export interface Conversations {
- conversations: Conversation[];
+export interface PromptResolution {
+ at: number;
+ answerText?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ConversationTitle".
+ * via the `definition` "PromptScreen".
*/
-export interface ConversationTitle {
- title: string;
+export interface PromptScreen {
+ current: number;
+ total: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiQuery".
+ * via the `definition` "StatusTool".
*/
-export interface WikiQuery {
- q: string | null;
- tag: string | null;
- limit: number | null;
- offset: number | null;
+export interface StatusTool {
+ name: string;
+ toolCallId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiPageQuery".
+ * via the `definition` "HarnessStatusFrame".
*/
-export interface WikiPageQuery {
- slug: WikiSlug;
+export interface HarnessStatusFrame1 {
+ sessionId: SessionId;
+ status: HarnessStatus;
+ since: number;
+ source?: StatusSource | null;
+ phase?: StatusPhase | null;
+ tool?: StatusTool | null;
+ promptId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiHistoryEntry".
+ * via the `definition` "HarnessCapabilities".
*/
-export interface WikiHistoryEntry {
- date: string;
- title: string;
- body: string;
+export interface HarnessCapabilities {
+ interrupt: boolean;
+ resume: boolean;
+ approvals: boolean;
+ steering?: boolean | null;
+ liveStream: boolean;
+ listSessions: boolean;
+ drive?: boolean | null;
+ turnOptions?: boolean | null;
+ launchModel?: boolean | null;
+ imageAttachments?: boolean | null;
+ models?: HarnessModelOption[] | null;
+ modelsSource?: HarnessModelsSource | null;
+ efforts?: EffortOption[] | null;
+ modelFlag?: string | null;
+ effortFlag?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiCitation".
+ * via the `definition` "HarnessModelOption".
*/
-export interface WikiCitation {
- summaryId: string;
- date?: Millis | null;
- kind?: string | null;
- note?: string | null;
+export interface HarnessModelOption {
+ inputModalities?: string[] | null;
+ id: string;
+ label: string;
+ isDefault?: boolean | null;
+ efforts?: EffortOption[] | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSource".
+ * via the `definition` "EffortOption".
*/
-export interface WikiSource {
- kind: WikiSourceKind;
- ids: string[];
- conversationId?: string | null;
- span?: WikiSourceSpan | null;
+export interface EffortOption {
+ id: string;
+ label: string;
+ isDefault?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiSourceSpan".
+ * via the `definition` "HarnessControlCapabilities".
*/
-export interface WikiSourceSpan {
- earliest: Millis;
- latest: Millis;
+export interface HarnessControlCapabilities {
+ interrupt: boolean;
+ resume: boolean;
+ approvals: boolean;
+ steering?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiPageResponse".
+ * via the `definition` "HarnessObservationCapabilities".
*/
-export interface WikiPageResponse {
- slug: string;
- title: string;
- aliases: string[];
- tags: string[];
- entities: string[];
- currentState: string;
- article?: string | null;
- seeAlso?: string[] | null;
- history: WikiHistoryEntry[];
- citations: WikiCitation[];
- markdown: string;
- sources: WikiSource[];
- gitSha?: string | null;
- lastVerified?: Millis | null;
- updatedAt: Millis;
- related?: string[] | null;
+export interface HarnessObservationCapabilities {
+ liveStream: boolean;
+ listSessions: boolean;
+ drive?: boolean | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiMissSuggestion".
+ * via the `definition` "HarnessSessionCreateRequest".
*/
-export interface WikiMissSuggestion {
- slug: string;
- title: string;
+export interface HarnessSessionCreateRequest {
+ harness?: HarnessId | null;
+ model?: string | null;
+ cwd?: string | null;
+ agentId?: string | null;
+ topicId?: string | null;
+ prompt?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiMissBody".
+ * via the `definition` "HarnessSessionList".
*/
-export interface WikiMissBody {
- error: string;
- suggestions: WikiMissSuggestion[];
+export interface HarnessSessionList {
+ sessions: HarnessSessionSummary[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiRedLink".
+ * via the `definition` "HarnessOffering".
*/
-export interface WikiRedLink {
- entity: string;
- referencedBy: string[];
+export interface HarnessOffering {
+ harnessId: HarnessId;
+ chat: boolean;
+ capabilities: HarnessCapabilities;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiGapsResponse".
+ * via the `definition` "HarnessOfferingList".
*/
-export interface WikiGapsResponse {
- redLinks: WikiRedLink[];
- stalest: string[];
+export interface HarnessOfferingList {
+ harnesses: HarnessOffering[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiTopic".
+ * via the `definition` "HarnessStoreSession".
*/
-export interface WikiTopic {
- slug: string;
+export interface HarnessStoreSession {
+ id: string;
+ command: RosterCommand;
title: string;
- tags: string[];
- entities: string[];
- updatedAt: Millis;
- excerpt: string;
+ updatedAt: number;
+ parentSessionId?: string | null;
+ agentName?: string | null;
+ model?: string | null;
+ taskId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "WikiTopicList".
+ * via the `definition` "HarnessStoreSessionList".
*/
-export interface WikiTopicList {
- topics: WikiTopic[];
- total: number;
+export interface HarnessStoreSessionList {
+ sessions: HarnessStoreSession[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AgentUsage".
+ * via the `definition` "task.done".
*/
-export interface AgentUsage {
- promptTokens: number;
- completionTokens: number;
- cachedTokens: number;
+export interface TaskDone {
+ taskId: string;
+ status: TaskStatus;
+ parentSessionId?: string | null;
+ childSessionId?: string | null;
+ ts: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "LiveSessionSummary".
+ * via the `definition` "AcceptanceCriterion".
*/
-export interface LiveSessionSummary {
+export interface AcceptanceCriterion {
id: string;
- name: string;
- harness?: SessionHarness | null;
- lastEventTs?: number | null;
- pty?: string | null;
- contextWindow?: number | null;
- compactAt?: number | null;
- contextSource?: ContextSource | null;
+ description: string;
+ kind: CriterionKind;
+ check?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionLogLine".
+ * via the `definition` "TaskBudget".
*/
-export interface SessionLogLine {
- who: string;
- text: string;
+export interface TaskBudget {
+ maxTurns?: number | null;
+ maxWallClockMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionView".
+ * via the `definition` "TaskUsage".
*/
-export interface SessionView {
- title: string;
- activity: Activity;
- tool?: string | null;
- tasks: string[];
- thought: string;
- lastMessage: string;
- log: SessionLogLine[];
- term: string[];
- ended: boolean;
+export interface TaskUsage {
+ inputTokens?: number | null;
+ outputTokens?: number | null;
+ totalTokens?: number | null;
+ turns: number;
+ wallClockMs: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "LiveSessionList".
+ * via the `definition` "TaskResult".
*/
-export interface LiveSessionList {
- sessions: LiveSessionSummary[];
+export interface TaskResult {
+ verdict: TaskVerdict;
+ summary: string;
+ usage: TaskUsage;
+ error?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StateResponse".
+ * via the `definition` "TaskWire".
*/
-export interface StateResponse {
- session: string;
- state: SessionView;
+export interface TaskWire {
+ id: string;
+ goal: string;
+ acceptanceCriteria: AcceptanceCriterion[];
+ agentId: string;
+ node: string;
+ harness?: HarnessId | null;
+ model?: string | null;
+ effort?: string | null;
+ requestedBy?: string | null;
+ parentSessionId?: string | null;
+ parentTaskId?: string | null;
+ depth: number;
+ childSessionId?: string | null;
+ budget: TaskBudget;
+ usage?: TaskUsage | null;
+ status: TaskStatus;
+ error?: string | null;
+ result?: TaskResult | null;
+ createdAt: number;
+ startedAt?: number | null;
+ completedAt?: number | null;
+ durationMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "snapshot".
+ * via the `definition` "TaskCreateRequest".
*/
-export interface Snapshot {
- v: ProtocolVersion;
- sessions: LiveSessionSummary[];
- rooms: {
- [k: string]: SessionView;
- };
+export interface TaskCreateRequest {
+ goal?: string | null;
+ agentId?: string | null;
+ nodeAffinity?: string | null;
+ acceptanceCriteria?: AcceptanceCriterion[] | null;
+ budget?: TaskBudget | null;
+ parentSessionId?: string | null;
+ model?: string | null;
+ effort?: ThinkingLevel | null;
+ workingDir?: string | null;
+ requestedBy?: string | null;
+ [k: string]: unknown;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "session.removed".
+ * via the `definition` "TaskResponse".
*/
-export interface SessionRemoved {
- v: ProtocolVersion;
- session: string;
+export interface TaskResponse {
+ task: TaskWire;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureBatchRequest".
+ * via the `definition` "TasksListResponse".
*/
-export interface CaptureBatchRequest {
- session_key: string;
- agent: string;
- channel?: string | null;
- title?: string | null;
- settings?: {
- [k: string]: unknown;
- } | null;
- task_id?: string | null;
- finalize?: boolean | null;
- created_at?: Millis | null;
- updated_at?: Millis | null;
- messages: CaptureMessage[];
+export interface TasksListResponse {
+ tasks: TaskWire[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureMessage".
+ * via the `definition` "TaskKillResponse".
*/
-export interface CaptureMessage {
- event_id: string;
- role: Role;
- content: string;
- tool_name?: string | null;
- tool_args?: {
- [k: string]: unknown;
- } | null;
- tool_result?: string | null;
- metadata?: {
- [k: string]: unknown;
- } | null;
- created_at?: Millis | null;
+export interface TaskKillResponse {
+ ok: boolean;
+ prior?: TaskStatus | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CaptureResult".
+ * via the `definition` "TaskWaitTimeoutResponse".
*/
-export interface CaptureResult {
- ok: boolean;
- conversation_id: string;
- inserted: number;
- skipped: number;
+export interface TaskWaitTimeoutResponse {
+ error: string;
+ task?: TaskWire | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HookContextBase".
+ * via the `definition` "MemorySearchResult".
*/
-export interface HookContextBase {
- agentId?: string | null;
+export interface MemorySearchResult {
+ chunk?: MemoryChunkMatch | null;
+ id: string;
+ source: MemoryHitSource;
+ content: string;
+ role: Role | null;
+ agent: string | null;
+ relevanceScore: number;
+ createdAt: string;
sessionId?: string | null;
- timestamp: number;
- metadata: {
- [k: string]: unknown;
- };
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HookUsage".
+ * via the `definition` "PluginManifest".
*/
-export interface HookUsage {
- promptTokens: number;
- completionTokens: number;
+export interface PluginManifest {
+ $schema?: string | null;
+ manifest: ProtocolVersion;
+ id: PluginId;
+ name: string;
+ version: string;
+ description: string;
+ icon?: string | null;
+ run: PluginRun;
+ permissions?: Permission[];
+ settings?: ViewField[];
+ tools?: PluginTool[];
+ contributes: PluginContributions;
+ jobs?: PluginJob[];
+ events?: PluginEventKind[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "SessionTokens".
+ * via the `definition` "PluginRun".
*/
-export interface SessionTokens {
- prompt: number;
- completion: number;
+export interface PluginRun {
+ command: string[];
+ env?: {
+ [k: string]: string;
+ };
+ readyTimeoutMs?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TurnComplexity".
+ * via the `definition` "ViewField".
*/
-export interface TurnComplexity {
- toolCallCount: number;
- hadErrorRecovery: boolean;
- hadUserCorrection: boolean;
- uniqueTools: number;
+export interface ViewField {
+ key: string;
+ label: string;
+ input: ViewInput;
+ value?: ViewValue | null;
+ required?: boolean;
+ help?: string | null;
+ placeholder?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "Message".
+ * via the `definition` "ViewOption".
*/
-export interface Message {
- role: Role;
- content: MessageContent;
- reasoning?: string | null;
- toolCalls?: ToolCall[] | null;
- toolCallId?: string | null;
+export interface ViewOption {
+ value: string;
+ label: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ToolCall".
+ * via the `definition` "ViewFile".
*/
-export interface ToolCall {
- id: string;
+export interface ViewFile {
name: string;
- arguments: {
- [k: string]: unknown;
- };
- thoughtSignature?: string | null;
+ mimeType: string;
+ data: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HookPipelineError".
+ * via the `definition` "PluginTool".
*/
-export interface HookPipelineError {
- hookId: string;
- error: string;
+export interface PluginTool {
+ name: ToolName;
+ title?: string | null;
+ description: string;
+ inputSchema: {
+ [k: string]: unknown;
+ };
+ hints?: PluginToolHint[];
+}
+export interface PluginContributions {
+ pages?: PluginPage[];
+ topicCards?: PluginTopicCard[];
+ sessionActions?: PluginSessionAction[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HookPipelineResult".
+ * via the `definition` "PluginPage".
*/
-export interface HookPipelineResult {
- context: HookContext;
- aborted: boolean;
- skipped: boolean;
- errors: HookPipelineError[];
- ran: string[];
+export interface PluginPage {
+ id: RouteName;
+ title: string;
+ icon?: string | null;
+ view: RouteName;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HookConfig".
+ * via the `definition` "PluginTopicCard".
*/
-export interface HookConfig {
- id: string;
- event: HookEventName;
- type: HookConfigKind;
- target: string;
- priority?: number | null;
- onError?: HookErrorMode | null;
- agentFilter?: string[] | null;
- toolFilter?: string[] | null;
- description?: string | null;
- enabled?: boolean | null;
+export interface PluginTopicCard {
+ id: RouteName;
+ title: string;
+ view: RouteName;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ApprovalOption".
+ * via the `definition` "PluginSessionAction".
*/
-export interface ApprovalOption {
- key: string;
- label: string;
+export interface PluginSessionAction {
+ id: RouteName;
+ title: string;
+ icon?: string | null;
+ action: ViewAction;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionSummary".
+ * via the `definition` "PluginJob".
*/
-export interface HarnessSessionSummary {
- sessionId: SessionId;
- harnessId: HarnessId;
- title?: string | null;
- cwd?: string | null;
- createdAt: Millis;
- updatedAt: Millis;
- status: HarnessSessionStatus;
- blocked?: boolean | null;
- supersedes?: SessionId | null;
- model?: string | null;
- parentSessionId?: SessionId | null;
- agentName?: string | null;
- taskId?: string | null;
- effort?: string | null;
- transport?: Transport | null;
- [k: string]: unknown;
+export interface PluginJob {
+ id: RouteName;
+ title: string;
+ schedule?: string | null;
+ timeoutMs?: number | null;
}
-export interface HarnessStatusFrame {
- type: "status";
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginContributions".
+ */
+export interface PluginContributions1 {
+ pages?: PluginPage[];
+ topicCards?: PluginTopicCard[];
+ sessionActions?: PluginSessionAction[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptQuestion".
+ * via the `definition` "View".
*/
-export interface PromptQuestion {
- question?: string | null;
- header?: string | null;
- multiSelect: boolean;
- freeText?: boolean | null;
- options: PromptOption[];
+export interface View {
+ title: string;
+ subtitle?: string | null;
+ toolbar?: ViewButton[];
+ blocks: ViewBlock[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptOption".
+ * via the `definition` "ViewButton".
*/
-export interface PromptOption {
+export interface ViewButton {
label: string;
- description?: string | null;
+ icon?: string | null;
+ style?: ViewButtonStyle | null;
+ action: ViewAction;
+ confirm?: ViewConfirm | null;
+ disabled?: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptResolution".
+ * via the `definition` "ViewConfirm".
*/
-export interface PromptResolution {
- at: number;
- answerText?: string | null;
+export interface ViewConfirm {
+ title: string;
+ text: string;
+ confirmLabel?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "PromptScreen".
+ * via the `definition` "ViewTab".
*/
-export interface PromptScreen {
- current: number;
- total: number;
+export interface ViewTab {
+ id: RouteName;
+ title: string;
+ badge?: string | null;
+ blocks: ViewBlock[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "StatusTool".
+ * via the `definition` "ViewProperty".
*/
-export interface StatusTool {
- name: string;
- toolCallId?: string | null;
+export interface ViewProperty {
+ label: string;
+ value: ViewInline;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessStatusFrame".
+ * via the `definition` "ViewListItem".
*/
-export interface HarnessStatusFrame1 {
- sessionId: SessionId;
- status: HarnessStatus;
- since: number;
- source?: StatusSource | null;
- phase?: StatusPhase | null;
- tool?: StatusTool | null;
- promptId?: string | null;
+export interface ViewListItem {
+ id: string;
+ title: string;
+ subtitle?: string | null;
+ icon?: string | null;
+ trailing?: ViewInline[];
+ action?: ViewAction | null;
+ menu?: ViewButton[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessCapabilities".
+ * via the `definition` "ViewEmpty".
*/
-export interface HarnessCapabilities {
- interrupt: boolean;
- resume: boolean;
- approvals: boolean;
- liveStream: boolean;
- listSessions: boolean;
- drive?: boolean | null;
- turnOptions?: boolean | null;
- launchModel?: boolean | null;
- imageAttachments?: boolean | null;
- models?: HarnessModelOption[] | null;
- modelsSource?: HarnessModelsSource | null;
- efforts?: EffortOption[] | null;
- modelFlag?: string | null;
- effortFlag?: string | null;
+export interface ViewEmpty {
+ title: string;
+ text?: string | null;
+ button?: ViewButton | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessModelOption".
+ * via the `definition` "ViewColumn".
*/
-export interface HarnessModelOption {
- inputModalities?: string[] | null;
+export interface ViewColumn {
+ title: string;
+ align?: ViewAlign | null;
+ sortable?: boolean;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewRow".
+ */
+export interface ViewRow {
id: string;
+ cells: ViewInline[];
+ action?: ViewAction | null;
+ menu?: ViewButton[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "ViewCrumb".
+ */
+export interface ViewCrumb {
label: string;
- isDefault?: boolean | null;
- efforts?: EffortOption[] | null;
+ action?: ViewAction | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "EffortOption".
+ * via the `definition` "CanvasScene".
*/
-export interface EffortOption {
+export interface CanvasScene {
+ items: CanvasItem[];
+ grid?: CanvasGrid | null;
+ viewport?: CanvasViewport | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasAnchor".
+ */
+export interface CanvasAnchor {
id: string;
- label: string;
- isDefault?: boolean | null;
+ x: number;
+ y: number;
+ side: CanvasSide;
+ direction: CanvasDirection;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessControlCapabilities".
+ * via the `definition` "CanvasMenuItem".
*/
-export interface HarnessControlCapabilities {
- interrupt: boolean;
- resume: boolean;
- approvals: boolean;
+export interface CanvasMenuItem {
+ id: string;
+ label: string;
+ icon?: string | null;
+ danger?: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessObservationCapabilities".
+ * via the `definition` "CanvasEnd".
*/
-export interface HarnessObservationCapabilities {
- liveStream: boolean;
- listSessions: boolean;
- drive?: boolean | null;
+export interface CanvasEnd {
+ node: string;
+ anchor?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessSessionList".
+ * via the `definition` "CanvasGrid".
*/
-export interface HarnessSessionList {
- sessions: HarnessSessionSummary[];
+export interface CanvasGrid {
+ size: number;
+ snap?: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessOffering".
+ * via the `definition` "CanvasViewport".
*/
-export interface HarnessOffering {
- harnessId: HarnessId;
- chat: boolean;
- capabilities: HarnessCapabilities;
+export interface CanvasViewport {
+ x: number;
+ y: number;
+ zoom: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessOfferingList".
+ * via the `definition` "ViewRequest".
*/
-export interface HarnessOfferingList {
- harnesses: HarnessOffering[];
+export interface ViewRequest {
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ context: ViewContext;
+}
+export interface ViewContext {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessStoreSession".
+ * via the `definition` "ViewContext".
*/
-export interface HarnessStoreSession {
- id: string;
- command: RosterCommand;
- title: string;
- updatedAt: number;
- parentSessionId?: string | null;
- agentName?: string | null;
- model?: string | null;
- taskId?: string | null;
+export interface ViewContext1 {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "HarnessStoreSessionList".
+ * via the `definition` "ViewActionRequest".
*/
-export interface HarnessStoreSessionList {
- sessions: HarnessStoreSession[];
+export interface ViewActionRequest {
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ values?: {
+ [k: string]: ViewValue;
+ };
+ context: ViewContext2;
+}
+export interface ViewContext2 {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ContextRef".
+ * via the `definition` "ViewActionResult".
*/
-export interface ContextRef {
- kind: ContextRefKind;
- ref: string;
- note?: string | null;
+export interface ViewActionResult {
+ actions: ViewAction[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "AcceptanceCriterion".
+ * via the `definition` "ViewActionRefusal".
*/
-export interface AcceptanceCriterion {
- id: string;
- description: string;
- kind: CriterionKind;
- check?: string | null;
+export interface ViewActionRefusal {
+ message: string;
+ fields?: {
+ [k: string]: string;
+ };
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskBudget".
+ * via the `definition` "CanvasEventRequest".
*/
-export interface TaskBudget {
- maxUsd?: number | null;
- maxTokens?: number | null;
- maxTurns?: number | null;
- maxWallClockMs?: number | null;
+export interface CanvasEventRequest {
+ event: CanvasEvent;
+ params?: {
+ [k: string]: unknown;
+ } | null;
+ context: ViewContext3;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskUsage".
+ * via the `definition` "CanvasPosition".
*/
-export interface TaskUsage {
- inputTokens: number;
- outputTokens: number;
- totalTokens: number;
- costUsd?: number | null;
- turns: number;
- wallClockMs: number;
+export interface CanvasPosition {
+ id: string;
+ x: number;
+ y: number;
+}
+export interface ViewContext3 {
+ topicId?: string | null;
+ sessionId?: SessionId | null;
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "CanvasResponse".
+ */
+export interface CanvasResponse {
+ ops: CanvasOp[];
+ actions: ViewAction[];
+}
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PanelTheme".
+ */
+export interface PanelTheme {
+ scheme: PanelScheme;
+ colors: {
+ category1?: string;
+ category2?: string;
+ category3?: string;
+ category4?: string;
+ category5?: string;
+ category6?: string;
+ danger?: string;
+ info?: string;
+ onPrimary?: string;
+ onPrimaryContainer?: string;
+ onSurface?: string;
+ onSurfaceVariant?: string;
+ outline?: string;
+ outlineVariant?: string;
+ primary?: string;
+ primaryContainer?: string;
+ secondaryContainer?: string;
+ success?: string;
+ surface?: string;
+ surfaceContainer?: string;
+ surfaceContainerHigh?: string;
+ warning?: string;
+ };
+ fontFamily: string;
+ fontMono: string;
+ fontSize: number;
+ radius: number;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskSpec".
+ * via the `definition` "PluginList".
*/
-export interface TaskSpec {
- delegation?: boolean | null;
- meshFrom?: string | null;
- taskId: string;
- agentId: string;
- goal: string;
- resolvedContext: ContextRef[];
- acceptanceCriteria: AcceptanceCriterion[];
- budget: TaskBudget1;
- tools?: string[] | null;
- workingDir?: string | null;
- model?: string | null;
- effort?: Effort | null;
- systemPromptAppend?: string | null;
- isolation?: TaskIsolation | null;
- promptMode?: TaskPromptMode | null;
- excludeTools?: string[] | null;
- resumeMessage?: string | null;
- session: string;
- permissionDecisions?: TaskPermissionDecision[] | null;
- presetId?: string | null;
- presetName?: string | null;
- auditOnly?: boolean | null;
- [k: string]: unknown;
+export interface PluginList {
+ node: string;
+ plugins: PluginRecord[];
}
-export interface TaskBudget1 {
- maxUsd?: number | null;
- maxTokens?: number | null;
- maxTurns?: number | null;
- maxWallClockMs?: number | null;
+/**
+ * This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
+ * via the `definition` "PluginRecord".
+ */
+export interface PluginRecord {
+ id: PluginId;
+ node: string;
+ path: string;
+ manifest: PluginManifest;
+ enabled: boolean;
+ state: PluginState;
+ granted: Permission[];
+ pending: Permission[];
+ error?: string | null;
+ lastExit?: PluginExit | null;
+ restarts: number;
+ startedAt?: number | null;
+ installedAt: number;
+ jobs: PluginJobStatus[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskPermissionDecision".
+ * via the `definition` "PluginExit".
*/
-export interface TaskPermissionDecision {
- requestId: string;
- tool: string;
- decision: TaskPermissionOutcome;
+export interface PluginExit {
at: number;
- message?: string | null;
+ code?: number | null;
+ signal?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskArtifact".
+ * via the `definition` "PluginJobStatus".
*/
-export interface TaskArtifact {
- kind: ArtifactKind;
- ref: string;
- note?: string | null;
+export interface PluginJobStatus {
+ id: RouteName;
+ lastRun?: PluginJobRun | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "CriterionReport".
+ * via the `definition` "PluginJobRun".
*/
-export interface CriterionReport {
- id: string;
- met: boolean;
- evidence: string;
+export interface PluginJobRun {
+ runId: string;
+ trigger: PluginJobTrigger;
+ startedAt: number;
+ finishedAt?: number | null;
+ outcome?: PluginJobOutcome | null;
+ message?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskResult".
+ * via the `definition` "PluginInstallRequest".
*/
-export interface TaskResult {
- verdict: TaskVerdict;
- summary: string;
- output?: string | null;
- artifacts: TaskArtifact[];
- criteriaSelfReport?: CriterionReport[] | null;
- usage: TaskUsage;
- error?: string | null;
+export interface PluginInstallRequest {
+ path: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "EvalOutcome".
+ * via the `definition` "PluginEnableRequest".
*/
-export interface EvalOutcome {
- verdict: EvalVerdict;
- attempts: number;
- verifierTaskIds: string[];
- criteriaReport: CriterionReport[];
- diverged: boolean;
- escalatedAt?: string | null;
+export interface PluginEnableRequest {
+ approve?: Permission[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ExecutorTurnCapabilities".
+ * via the `definition` "PluginLogs".
*/
-export interface ExecutorTurnCapabilities {
- steerable: boolean;
- multiTurn: boolean;
- structuredStream: boolean;
+export interface PluginLogs {
+ lines: PluginLogLine[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ExecutorResultCapabilities".
+ * via the `definition` "PluginLogLine".
*/
-export interface ExecutorResultCapabilities {
- usageInResult: boolean;
- sessionIdCapture: boolean;
+export interface PluginLogLine {
+ at: number;
+ stream: PluginLogStream;
+ text: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "ExecutorInteractionCapabilities".
+ * via the `definition` "PluginSettings".
*/
-export interface ExecutorInteractionCapabilities {
- slashCommands: boolean;
- effortSelection: boolean;
+export interface PluginSettings {
+ values: {
+ [k: string]: ViewValue;
+ };
+ secretsSet?: string[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskApprovalRequest".
+ * via the `definition` "PluginSettingsUpdate".
*/
-export interface TaskApprovalRequest {
- taskId: string;
- requestId: string;
- name: string;
- input: {
- [k: string]: unknown;
+export interface PluginSettingsUpdate {
+ values: {
+ [k: string]: ViewValue | null;
};
- toolCallId?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskWire".
+ * via the `definition` "PluginToolList".
*/
-export interface TaskWire {
- id: string;
- goal: string;
- contextRefs: ContextRef[];
- acceptanceCriteria: AcceptanceCriterion[];
- spec: TaskSpec;
- executor: TaskExecutorKind;
- executorTarget?: string | null;
- agentId: string;
- requestedBy?: string | null;
- origin: string;
- parentTaskId?: string | null;
- chainDepth: number;
- nodeAffinity?: string | null;
- claimedBy?: string | null;
- budget: TaskBudget;
- usage?: TaskUsage | null;
- status: TaskStatus;
- attempt: number;
- maxAttempts: number;
- pendingMessage?: string | null;
- error?: string | null;
- result?: TaskResult | null;
- conversationId?: string | null;
- sessionKey?: string | null;
- harnessSessionIds: string[];
- eval?: EvalOutcome | null;
- evalAttempt: number;
- createdAt: number;
- startedAt?: number | null;
- lastHeartbeatAt?: number | null;
- completedAt?: number | null;
- durationMs?: number | null;
- pendingApprovals?: TaskApprovalRequest[] | null;
+export interface PluginToolList {
+ version: number;
+ tools: PluginToolEntry[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskCreateRequest".
+ * via the `definition` "PluginToolEntry".
*/
-export interface TaskCreateRequest {
- goal: string;
- agentId: string;
- executor?: TaskExecutorKind | null;
- executorTarget?: string | null;
- requestedBy?: string | null;
- parentTaskId?: string | null;
- chainDepth?: number | null;
- nodeAffinity?: string | null;
- spec?: TaskSpec | null;
- budget?: TaskBudget | null;
- contextRefs?: ContextRef[] | null;
- acceptanceCriteria?: AcceptanceCriterion[] | null;
+export interface PluginToolEntry {
+ plugin: PluginId;
+ tool: PluginTool;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskResponse".
+ * via the `definition` "PluginEventDelivery".
*/
-export interface TaskResponse {
- task: TaskWire;
+export interface PluginEventDelivery {
+ seq: number;
+ at: number;
+ missed: number;
+ event: PluginEvent;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TasksListResponse".
+ * via the `definition` "PluginJobRequest".
*/
-export interface TasksListResponse {
- tasks: TaskWire[];
+export interface PluginJobRequest {
+ runId: string;
+ trigger: PluginJobTrigger;
+ scheduledAt?: number | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskSteerAccepted".
+ * via the `definition` "PluginJobResult".
*/
-export interface TaskSteerAccepted {
- ok: boolean;
+export interface PluginJobResult {
+ outcome: PluginJobOutcome;
+ message?: string | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskKillResponse".
+ * via the `definition` "PluginToolCall".
*/
-export interface TaskKillResponse {
- ok: boolean;
- prior?: TaskStatus | null;
+export interface PluginToolCall {
+ arguments: {
+ [k: string]: unknown;
+ };
+ sessionId?: SessionId | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskApprovalAccepted".
+ * via the `definition` "PluginToolResult".
*/
-export interface TaskApprovalAccepted {
- ok: boolean;
+export interface PluginToolResult {
+ text: string;
+ isError?: boolean;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskApprovalWaitResponse".
+ * via the `definition` "PluginSelf".
*/
-export interface TaskApprovalWaitResponse {
- approval: TaskApprovalRequest;
+export interface PluginSelf {
+ id: PluginId;
+ node: string;
+ version: string;
+ permissions: Permission[];
+ settings: {
+ [k: string]: ViewValue;
+ };
+ dataDir: string;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskWaitTimeoutResponse".
+ * via the `definition` "PluginViewsChanged".
*/
-export interface TaskWaitTimeoutResponse {
- error: string;
- task?: TaskWire | null;
+export interface PluginViewsChanged {
+ views: RouteName[];
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "TaskOverrides".
+ * via the `definition` "PluginNotify".
*/
-export interface TaskOverrides {
- delegation?: boolean | null;
- meshFrom?: string | null;
- presetId?: string | null;
- presetName?: string | null;
- permissionDecisions?: TaskPermissionDecision[] | null;
- auditOnly?: boolean | null;
- workingDir?: string | null;
- model?: string | null;
- effort?: Effort | null;
- systemPromptAppend?: string | null;
- isolation?: TaskIsolation | null;
- promptMode?: TaskPromptMode | null;
- excludeTools?: string[] | null;
- resumeMessage?: string | null;
- [k: string]: unknown;
+export interface PluginNotify {
+ title: string;
+ text?: string | null;
+ tone?: ViewTone | null;
+ action?: ViewAction | null;
}
/**
* This interface was referenced by `RivetHubContractSentByTheRuntime`'s JSON-Schema
- * via the `definition` "MemorySearchResult".
+ * via the `definition` "plugin.notification".
*/
-export interface MemorySearchResult {
- chunk?: MemoryChunkMatch | null;
- id: string;
- source: MemoryHitSource;
- content: string;
- role: Role | null;
- agent: string | null;
- relevanceScore: number;
- createdAt: string;
+export interface PluginNotification {
+ plugin: PluginId;
+ node: string;
+ title: string;
+ text?: string | null;
+ tone?: ViewTone | null;
+ action?: ViewAction | null;
+ ts: number;
}
diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json
new file mode 100644
index 0000000..652c154
--- /dev/null
+++ b/packages/plugin-sdk/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "@rivethub/plugin-sdk",
+ "version": "0.7.0",
+ "private": true,
+ "type": "module",
+ "exports": {
+ ".": "./src/index.ts"
+ },
+ "bin": {
+ "rivethub-plugin-dev": "./src/dev.ts"
+ },
+ "dependencies": {
+ "@rivethub/contract": "0.7.0"
+ }
+}
diff --git a/packages/plugin-sdk/src/dev.ts b/packages/plugin-sdk/src/dev.ts
new file mode 100755
index 0000000..20eea8e
--- /dev/null
+++ b/packages/plugin-sdk/src/dev.ts
@@ -0,0 +1,162 @@
+#!/usr/bin/env node
+import { spawn } from 'node:child_process'
+import { randomBytes } from 'node:crypto'
+import { mkdirSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
+import { createServer, request, type ServerResponse } from 'node:http'
+import { tmpdir } from 'node:os'
+import { join, resolve } from 'node:path'
+import { createInterface } from 'node:readline'
+import type { GatewayError, PluginEventDelivery, PluginManifest, PluginSelf } from './types.ts'
+
+const USAGE = `rivethub-plugin-dev [dir]: starts the plug-in in dir like rh does, then reads commands from stdin:
+ view [{"params":{},"context":{}}]
+ action [{"values":{},"params":{}}]
+ canvas