diff --git a/.github/scripts/backend-runtime.test.mjs b/.github/scripts/backend-runtime.test.mjs index 47b62632a..a4abbdc4e 100644 --- a/.github/scripts/backend-runtime.test.mjs +++ b/.github/scripts/backend-runtime.test.mjs @@ -10,6 +10,7 @@ import { test } from 'node:test' import { backendConfig, callApi, connection, prepareBackend, readJson, root } from '../../scripts/backend-lib.mjs' import { mockModel } from '../../dev/demo/mock.mjs' import { agentReply } from '../../dev/demo/agents.mjs' +import { readSpec, validateExchange, validate } from '../../scripts/api-contract-validation.mjs' const pause = ms => new Promise(resolve => setTimeout(resolve, ms)) async function freePort() { const server = createServer(); server.listen(0, '127.0.0.1'); await once(server, 'listening'); const port = server.address().port; await new Promise(resolve => server.close(resolve)); return port } @@ -57,12 +58,42 @@ test('production backend retains canonical Tasks/auth across restart, keeps cons const login = await run(['login', '--home', home], env) assert.match(login, /Authenticated/); assert.doesNotMatch(login + host.output(), /\?token=|sessionToken|isolated-test-provider/) const token = readJson(join(home, 'private/backend-session.json')).sessionToken - const transport = await connection(home), api = (endpoint, body = {}, who = token) => callApi(transport, endpoint, body, who) + const transport = await connection(home), spec = readSpec() + const api = async (endpoint, body = {}, who = token) => { + const value = await callApi(transport, endpoint, body, who) + validateExchange(spec, endpoint, body, { ok: true, value }) + return value + } const dev = (kind, name, projectId, payload = {}, requestId) => api('project-development', { version: 'project-development/v1', kind, name, projectId, payload, ...(requestId ? { requestId } : {}) }) const { project } = await api('project-create', { name: 'Persistent service' }) + await api('auth-mode') + await api('auth-whoami') + assert.equal(await api('auth-whoami', {}, ''), null) + assert.equal(await api('auth-whoami', {}, 'invalid-example-token'), null) + await api('workbench-state') + await api('project-read', { id: project.id }) + await api('project-detail', { id: project.id, view: 'summary' }) + await api('project-members', { id: project.id }) + await api('project-repositories', { projectId: project.id }) + await api('personal-space', { operation: 'list' }) + for (const name of ['roles', 'role.proposals', 'project.snapshot', 'events', 'chief.state', 'pools', 'effects', 'compatibility']) await dev('query', name, project.id) + const room = await api('project-room-create', { projectId: project.id, name: 'Contract room', roles: ['chief'], memberIds: [] }) + await api('project-room-read', { projectId: project.id, roomId: room.id }) + await api('project-rooms', { projectId: project.id }) + await api('project-agents', { projectId: project.id, view: 'summary' }) + await api('project-knowledge-write', { projectId: project.id, text: 'Contract fixture fact' }) + await api('project-role-memory-write', { projectId: project.id, role: 'developer', text: 'Bounded role fact', source: { kind: 'human', reference: 'isolated-contract-test' } }) + await api('project-agent-memory-write', { projectId: project.id, text: 'Private fixture note' }) + await api('project-agent-history', { projectId: project.id, visibility: 'private' }) + await api('project-resources', { projectId: project.id, view: 'summary' }) const proposed = await dev('command', 'task.propose', project.id, { title: 'Project change', criteria: 'Result checked', impact: 'Keep project history' }, 'one-original-intent') const taskId = proposed.result.id assert.ok(taskId) + await dev('query', 'task.detail', project.id, { taskId }) + await dev('query', 'handoff.list', project.id, { taskId }) + await dev('query', 'task.history', project.id, { taskId, section: 'requirements' }) + await dev('query', 'command.receipt', project.id, { commandRequestId: 'one-original-intent' }) + await dev('query', 'command.result', project.id, { commandRequestId: 'one-original-intent', limit: 100 }) assert.equal((await dev('query', 'task', project.id, { taskId })).result.task.phase, 'awaiting-chief') const inquiry = await dev('command', 'consultation.ask', project.id, { text: 'Explain the Project status without creating work' }, 'ordinary-question') assert.equal(inquiry.result.consultation.initiativeTransferred, false) @@ -78,6 +109,17 @@ test('production backend retains canonical Tasks/auth across restart, keeps cons const external = await api('personal-agent-create', { name: 'External protocol caller', kind: 'external', provider: 'http-contract', endpoint: 'https://agent.example.invalid/callback' }) await api('personal-agent-join', { agentId: external.agent.id, projectId: project.id }) const credential = await api('personal-agent-token-create', { agentId: external.agent.id, projectIds: [project.id] }) + await api('personal-agent-token-list', { agentId: external.agent.id }) + await api('personal-agent-read', { agentId: external.agent.id }) + await api('personal-agent-list') + await api('personal-agent-participations') + await api('auth-whoami', {}, credential.token) + await api('project-development', { version: 'project-development/v1', kind: 'query', name: 'roles', projectId: project.id, payload: {} }, credential.token) + const refused = await fetch(`${transport.baseUrl}/api/bot`, { method: 'POST', headers: { 'content-type': 'application/json', 'x-flybot-member-session': credential.token }, body: JSON.stringify({ endpoint: 'project-development', payload: { version: 'project-development/v1', kind: 'command', name: 'task.propose', projectId: project.id, requestId: 'safe-must-not-publish', payload: { title: 'Refused shared publication' } } }) }) + assert.equal(refused.status, 200) + const denial = await refused.json() + validate(spec.components.schemas.DomainError, denial, spec) + assert.equal(denial.ok, false) const privateProposal = await api('personal-agent-propose-task', { projectId: project.id, title: 'Proposed by the independent agent', criteria: 'Owner reviews the proposal', impact: 'Retain explicit Project impact', scope: 'Transport mapping only', projectTaskKind: 'code', requestId: 'external-safe-proposal' }, credential.token) assert.equal(privateProposal.proposal.fields.impact, 'Retain explicit Project impact') assert.equal(privateProposal.proposal.fields.scope, 'Transport mapping only') @@ -88,6 +130,7 @@ test('production backend retains canonical Tasks/auth across restart, keeps cons const watched = await api('project-development', { version: 'project-development/v1', kind: 'command', name: 'task.propose', projectId: project.id, requestId: 'external-watch-intent', payload: { title: 'Delegated Project work', criteria: 'Current authority checked', impact: 'Exercise the delegated publish boundary' } }, credential.token) assert.ok(watched.result.id) await api('personal-agent-token-revoke', { credentialId: credential.credential.id }) + assert.equal(await api('auth-whoami', {}, credential.token), null) await assert.rejects(api('project-read', { id: project.id }, credential.token), /unauthorized|forbidden/) const invitation = await api('auth-invite'), bob = await api('auth-redeem', { token: invitation.token, displayName: 'Bob' }) await assert.rejects(api('project-read', { id: project.id }, bob.sessionToken), /forbidden/) @@ -97,7 +140,9 @@ test('production backend retains canonical Tasks/auth across restart, keeps cons const stream = await fetch(`${transport.baseUrl}/api/project-events?projectId=${project.id}`, { headers: { 'x-flybot-member-session': bob.sessionToken }, signal: AbortSignal.timeout(10000) }) assert.equal(stream.status, 200) const reader = stream.body.getReader() - assert.match(new TextDecoder().decode((await reader.read()).value), /event: snapshot/) + const firstFrame = new TextDecoder().decode((await reader.read()).value) + assert.match(firstFrame, /event: snapshot/) + validate(spec.components.schemas.Snapshot, JSON.parse(/^data: (.*)$/m.exec(firstFrame)[1]), spec) await api('project-member-remove', { id: project.id, memberId: bob.memberId }) let revoked = '' while (!revoked.includes('access-revoked')) { const next = await reader.read(); if (next.done) break; revoked += new TextDecoder().decode(next.value) } diff --git a/.github/scripts/openapi.test.mjs b/.github/scripts/openapi.test.mjs new file mode 100644 index 000000000..19a16dc58 --- /dev/null +++ b/.github/scripts/openapi.test.mjs @@ -0,0 +1,86 @@ +import assert from 'node:assert/strict' +import { readFileSync, existsSync } from 'node:fs' +import { dirname, resolve } from 'node:path' +import { execFileSync } from 'node:child_process' +import { test } from 'node:test' +import { buildSpec, renderSpec, artifactPath, inventory } from '../../scripts/openapi.mjs' +import { readSpec, validate, operationFor } from '../../scripts/api-contract-validation.mjs' + +test('published OpenAPI artifact matches all allowlisted endpoints and v1 operations', () => { + assert.equal(readFileSync(artifactPath, 'utf8'), renderSpec()) + const spec = readSpec(), inv = inventory(), ops = spec['x-flybot-operations'] + assert.equal(spec.openapi, '3.1.0') + assert.deepEqual(Object.keys(spec.paths).sort(), ['/api/bot', '/api/project-events', '/health']) + assert.deepEqual([...new Set(ops.map(row => row.transport.endpoint))].sort(), inv.endpoints.sort()) + assert.deepEqual(ops.filter(row => row.transport.kind === 'query').map(row => row.transport.name).sort(), inv.queries.sort()) + assert.deepEqual(ops.filter(row => row.transport.kind === 'command').map(row => row.transport.name).sort(), inv.commands.sort()) + assert.equal(new Set(ops.map(row => row.operationId)).size, ops.length) + const walk = value => { + if (!value || typeof value !== 'object') return + if (value.$ref) assert.ok(spec.components.schemas[value.$ref.split('/').at(-1)], value.$ref) + Object.values(value).forEach(walk) + } + walk(spec) + for (const row of ops) { + assert.ok(row.requestSchema.$ref && row.resultSchema.$ref && row.successSchema.$ref) + assert.ok(row.security.length && row.permission && row.implementation.sha256.length === 64) + assert.ok(Array.isArray(row.preconditions) && Array.isArray(row.stateChanges.effects)) + assert.ok(row.idempotency.mechanism) + assert.equal(row.stateChanges.acknowledgementIsCompletion, false) + } +}) + +test('FBA safe/watch contracts preserve native asymmetries and human/host-only boundaries', () => { + const spec = buildSpec(), op = (endpoint, kind, name) => operationFor(spec, endpoint, { kind, name }) + assert.equal(op('project-roles').personalAgent.safe, false) + assert.equal(op('project-roles').personalAgent.watch, true) + assert.equal(op('project-development', 'query', 'roles').personalAgent.safe, true) + assert.equal(op('project-development', 'query', 'attempt.integration-state').personalAgent.safe, false) + assert.equal(op('project-development', 'command', 'consultation.ask').personalAgent.safe, true) + assert.equal(op('project-development', 'command', 'task.propose').personalAgent.safe, false) + assert.deepEqual(op('project-role').humanRoles, ['owner']) + for (const endpoint of ['personal-agent-token-create', 'personal-agent-delegation-set', 'project-close-prepare', 'project-close-confirm', 'project-terminal-open', 'project-agent-history']) assert.equal(op(endpoint).personalAgent.watch, false, endpoint) + assert.deepEqual(op('personal-agent-propose-task').security, [{ personalAgentToken: [] }]) + for (const name of ['claim', 'handoff.offer', 'handoff.accept', 'complete', 'arbitrate', 'split']) assert.throws(() => op('project-development', 'command', name), /Unspecified/) + assert.equal(spec.components.schemas.PersonalAgentTokenCreateResult.properties.token.readOnly, true) + assert.equal(spec.components.schemas.PersonalAgentTokenCreateResult.properties.token.writeOnly, undefined) +}) + +test('canonical requests catch wrong kind, unknown/mis-scoped fields and missing command identity', () => { + const spec = readSpec(), request = { endpoint: 'project-development', payload: { version: 'project-development/v1', projectId: 'example-project', kind: 'command', name: 'task.propose', requestId: 'example-intent', payload: { title: 'Change project', criteria: 'Checked', impact: 'Improve project' } } } + validate(spec.components.schemas.BotRequest, request, spec) + for (const mutate of [row => { delete row.payload.requestId }, row => { row.payload.kind = 'query' }, row => { row.payload.payload.projectId = 'other-project' }, row => { row.payload.payload.claim = { role: 'chief' } }]) { + const row = structuredClone(request); mutate(row) + assert.throws(() => validate(spec.components.schemas.BotRequest, row, spec)) + } + validate(spec.components.schemas.BotResponse, { ok: false, error: { code: 'bot/forbidden', message: 'Refused' } }, spec) + assert.throws(() => validate(spec.components.schemas.DomainError, { ok: true, error: { code: 'bot/forbidden', message: 'Refused' } }, spec)) + assert.throws(() => validate(spec.components.schemas.AuthRevokeSuccess, { ok: true, value: { revoked: true } }, spec)) + validate(spec.components.schemas.AuthRevokeSuccess, { ok: true, value: true }, spec) + validate(spec.components.schemas.AuthWhoamiSuccess, { ok: true, value: null }, spec) +}) + +test('every onboarding example validates against exactly one actual request branch', () => { + const spec = readSpec() + for (const example of spec['x-flybot-examples']) { + const { endpoint, payload } = example.request + const operation = operationFor(spec, endpoint, payload) + validate(operation.requestSchema, example.request, spec, example.id) + validate(spec.components.schemas.BotRequest, example.request, spec, example.id) + } +}) + +test('third-party guide links and examples remain usable and its inventory is current', () => { + const file = resolve(import.meta.dirname, '../../docs/third-party-bot-integration.md'), text = readFileSync(file, 'utf8'), spec = readSpec(), inv = spec['x-flybot-inventory'] + assert.ok(text.includes(`${inv.nativeEndpointCount}个`)) + assert.ok(text.includes(`${inv.versionedQueryCount}个 v1 查询`)) + assert.ok(text.includes(`${inv.versionedCommandCount}个 v1 命令`)) + assert.ok(text.includes(`${inv.dispatchVariantCount}种请求分支`)) + assert.ok(text.includes(`${spec['x-flybot-examples'].length}个经过 Schema`)) + for (const match of text.matchAll(/\]\(([^)]+)\)/g)) { + const target = match[1].split('#')[0] + if (target && !/^[a-z]+:/i.test(target)) assert.ok(existsSync(resolve(dirname(file), target)), target) + } + for (const match of text.matchAll(/```json\n([\s\S]*?)\n```/g)) JSON.parse(match[1]) + for (const match of text.matchAll(/```bash\n([\s\S]*?)\n```/g)) execFileSync('bash', ['-n'], { input: match[1] }) +}) diff --git a/PROJECT.md b/PROJECT.md index 607f1c4b1..7ffb188cd 100644 --- a/PROJECT.md +++ b/PROJECT.md @@ -10,6 +10,12 @@ Current stage and priorities: [ROADMAP.md](ROADMAP.md). How decisions are made: ## Agent connection authorization — 2026-11-03 +#2300 publishes the source-matched public [OpenAPI contract](docs/openapi/flybot.openapi.json) +and [third-party Bot guide](docs/third-party-bot-integration.md). Human-issued FBA scope, +safe/watch rights, same-principal receipts and host-only role execution remain distinct. +This adds contract/docs and isolated HTTP conformance checks, not runtime authority, +vendor callback adapters, service deployment or the deferred cross-repository loop. + #2183 adds scoped agent credentials over the existing member-session HTTP channel, reuses per-participation safe/watch grants, and persists Task-origin provenance. Owner's closure confirmation remains personal; native/external personal agents may diff --git a/README.md b/README.md index bb47daf44..27aadfef9 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,16 @@ Project 管理项目、成员、角色与仓库;Chief 常驻协调,Dev/Revie 本交付分支包含后端收敛工作,尚未合入主仓 main 或部署到现有实例。 它复用 FlyBot/DSH、原账号服务、任务池和执行器;没有另建一套调度系统。 +第三方 Bot 接入:[OpenAPI 3.1 JSON](docs/openapi/flybot.openapi.json) · +[登录、授权与自主协作指南](docs/third-party-bot-integration.md)。规范按实际公开入口描述请求/响应、 +权限、前置条件、状态变化和重试规则;外部代理使用人类签发的项目范围 Token。 + ## 启动持久服务 需要 **Node.js22.22+、npm、Git**,首次安装需要访问 npm。Linux 是当前验证环境。 ```bash -git clone --branch feat/2189-backend-quickstart https://github.com/ThinkFlowLab/FlyBot.git +git clone --branch delivery/ai-centric-development-service https://github.com/ThinkFlowLab/FlyBot.git cd FlyBot node scripts/backend.mjs init node scripts/backend.mjs start diff --git a/README.zh.md b/README.zh.md index bb47daf44..9ac63d3b0 100644 --- a/README.zh.md +++ b/README.zh.md @@ -1,5 +1,9 @@ # FlyBot:AI 协作开发后端 +第三方 Bot 接入:[OpenAPI 3.1 JSON](docs/openapi/flybot.openapi.json) · +[登录、授权与自主协作指南](docs/third-party-bot-integration.md)。规范覆盖公开网关的请求/响应、 +权限、前置条件、状态变化和恢复语义;外部代理使用人类签发的项目范围 Token。 + Project 管理项目、成员、角色与仓库;Chief 常驻协调,Dev/Reviewer/Tester 按 Task 使用独立角色 Session,通过持久化 Handoff 自主接手、打回和转交。 普通提问直接咨询 Chief,不创建 Task。个人 Chief、个人 Bot、群聊与私有记忆继续保留。 @@ -12,7 +16,7 @@ Project 管理项目、成员、角色与仓库;Chief 常驻协调,Dev/Revie 需要 **Node.js22.22+、npm、Git**,首次安装需要访问 npm。Linux 是当前验证环境。 ```bash -git clone --branch feat/2189-backend-quickstart https://github.com/ThinkFlowLab/FlyBot.git +git clone --branch delivery/ai-centric-development-service https://github.com/ThinkFlowLab/FlyBot.git cd FlyBot node scripts/backend.mjs init node scripts/backend.mjs start diff --git a/ROADMAP.md b/ROADMAP.md index 9e552a986..6bee04f8c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -29,8 +29,11 @@ execution ancestor through collaboration/context/Task/state/API branches. ## Active fork roadmap — 2026-10-31 The earlier delivery snapshot at1811e3b8f consolidated S1–S6. Current persistent -source deployment and API use follow the root README and #2189; OpenAPI remains -unprovided. Backend delivery does not complete original frontend #41 acceptance +source deployment and API use follow the root README and #2189. #2300 adds the +machine-readable public OpenAPI contract and third-party onboarding guide, guarded +by source inventory/schema and representative isolated HTTP conformance tests. +Vendor-specific adapters and live external-provider acceptance remain separate. +Backend delivery does not complete original frontend #41 acceptance or merge staged PRs. S6/#55 integrates current service stages with original native frontend work and diff --git a/changelog.d/2300.added.md b/changelog.d/2300.added.md new file mode 100644 index 000000000..606b30774 --- /dev/null +++ b/changelog.d/2300.added.md @@ -0,0 +1 @@ +Publish a source-matched OpenAPI 3.1 contract and third-party Bot onboarding guide for the public backend gateway, including independent agent credentials, per-operation rights, prerequisites, state effects and recovery. Validate the contract against representative isolated HTTP exchanges. diff --git a/docs/development-service-api.md b/docs/development-service-api.md index 87fb355d1..1e01eea4e 100644 --- a/docs/development-service-api.md +++ b/docs/development-service-api.md @@ -2,6 +2,9 @@ [快速开始](../README.md) · [协作语义](development-service-guide.md) · [部署](backend-operations.md) +[OpenAPI 3.1 JSON](openapi/flybot.openapi.json) 给出全部公开分派请求/响应 Schema、逐操作权限、 +状态影响和前置条件;第三方个人代理的凭据签发、登录和自主协作见[接入指南](third-party-bot-integration.md)。 + 本页对应当前分支实际路由:**25个v1查询、28个v1命令**,以及对象管理使用的原生接口。 咨询和Task主动权交接是两种契约;角色执行回调不是公开HTTP命令。没有Swagger页面;以下请求均可由CLI或HTTP调用。 diff --git a/docs/openapi/flybot.openapi.json b/docs/openapi/flybot.openapi.json new file mode 100644 index 000000000..c4aaaeecb --- /dev/null +++ b/docs/openapi/flybot.openapi.json @@ -0,0 +1,41276 @@ +{ + "openapi": "3.1.0", + "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema", + "info": { + "title": "FlyBot public Bot integration API", + "version": "project-development/v1+native", + "description": "Source-matched restricted backend gateway. Native endpoint dispatch and versioned application commands share POST /api/bot. Inspect x-flybot-operations for correlated response, current rights, prerequisites, state effects and recovery. This artifact documents existing behavior; it does not deploy a service or grant access." + }, + "servers": [ + { + "url": "{origin}", + "variables": { + "origin": { + "default": "http://127.0.0.1:3080", + "description": "Actual operator-provided backend origin; prefer HTTPS for remote use. No URL token." + } + } + } + ], + "paths": { + "/health": { + "get": { + "operationId": "health", + "summary": "Gateway process liveness", + "security": [], + "responses": { + "200": { + "description": "Liveness only; not proof of provider readiness.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "const": "ok", + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "status" + ] + } + } + } + }, + "403": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + } + } + }, + "/api/bot": { + "post": { + "operationId": "dispatchBotOperation", + "summary": "Dispatch a native endpoint or a project-development/v1 query/command", + "description": "Select a request branch by endpoint and, for v1, kind/name. x-flybot-operations correlates that request with its exact success/result schema. HTTP 200 includes domain failures; inspect ok before value. Security differs by dispatch; anonymous access is only for explicit discovery/login/redeem.", + "security": [ + {}, + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BotRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Domain result envelope. ok=false is failure even with HTTP 200.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BotResponse" + } + } + } + }, + "400": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "404": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "413": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "415": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "502": { + "description": "Gateway transport rejection; no domain command success is implied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + } + }, + "x-maxRequestBytes": 1048576, + "x-maxUpstreamResponseCodeUnits": 8388608, + "x-upstreamTimeoutMs": 180000 + } + }, + "/api/project-events": { + "get": { + "operationId": "streamProjectEvents", + "summary": "Read committed Project facts as SSE; never acquire Task initiative", + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + { + "in": "query", + "name": "after", + "schema": { + "type": "string", + "maxLength": 600, + "pattern": "^[A-Za-z0-9_-]+$" + } + }, + { + "in": "header", + "name": "Last-Event-ID", + "schema": { + "type": "string", + "maxLength": 600 + }, + "description": "Same opaque cursor as after. If both are present they must match. Duplicate/unknown query keys are refused." + } + ], + "responses": { + "200": { + "description": "UTF-8 SSE. snapshot when no cursor, fact for committed events; comment keep-alive; reset-required/access-revoked then close. Reauthenticate and take a fresh snapshot as instructed, never replay commands.", + "content": { + "text/event-stream": { + "schema": { + "type": "string" + } + } + }, + "x-sse-events": { + "snapshot": { + "$ref": "#/components/schemas/Snapshot" + }, + "fact": { + "$ref": "#/components/schemas/Event" + }, + "reset-required": { + "$ref": "#/components/schemas/SseControl" + }, + "access-revoked": { + "$ref": "#/components/schemas/SseControl" + } + } + }, + "400": { + "description": "SSE admission refusal before headers; origin/host checks may use a gateway error.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SseError" + }, + { + "$ref": "#/components/schemas/GatewayError" + } + ] + } + } + } + }, + "401": { + "description": "SSE admission refusal before headers; origin/host checks may use a gateway error.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SseError" + }, + { + "$ref": "#/components/schemas/GatewayError" + } + ] + } + } + } + }, + "403": { + "description": "SSE admission refusal before headers; origin/host checks may use a gateway error.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SseError" + }, + { + "$ref": "#/components/schemas/GatewayError" + } + ] + } + } + } + }, + "409": { + "description": "SSE admission refusal before headers; origin/host checks may use a gateway error.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SseError" + }, + { + "$ref": "#/components/schemas/GatewayError" + } + ] + } + } + } + }, + "429": { + "description": "SSE admission refusal before headers; origin/host checks may use a gateway error.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SseError" + }, + { + "$ref": "#/components/schemas/GatewayError" + } + ] + } + } + } + }, + "503": { + "description": "SSE admission refusal before headers; origin/host checks may use a gateway error.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SseError" + }, + { + "$ref": "#/components/schemas/GatewayError" + } + ] + } + } + } + } + }, + "x-preconditions": [ + "valid-current-principal", + "current-project-membership", + "active-agent-participation-and-token-scope-for-FBA", + "valid-same-project-cursor", + "available-stream-capacity" + ], + "x-stateChanges": [], + "x-authorizationRechecked": "every-poll; revocation-closes-stream" + } + } + }, + "components": { + "securitySchemes": { + "memberSession": { + "type": "apiKey", + "in": "header", + "name": "X-Flybot-Member-Session", + "description": "Secret human session returned by platform-login/auth-redeem or private local bootstrap. No public self-signup or refresh endpoint." + }, + "personalAgentToken": { + "type": "apiKey", + "in": "header", + "name": "X-Flybot-Member-Session", + "description": "Independent fba_ token, issued once by the human for explicit Project scopes. The same header as memberSession; do not send both. Safe by default. Watch can only be granted/revoked by its human." + } + }, + "schemas": { + "JsonValue": { + "description": "Opaque JSON source/provider data, not executable authority. Exact bytes use hash-bound source pages.", + "anyOf": [ + { + "type": [ + "string", + "number", + "boolean", + "null" + ] + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + } + } + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "code", + "message" + ] + }, + "DomainError": { + "type": "object", + "properties": { + "ok": { + "const": false, + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/Error" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "error" + ] + }, + "GatewayError": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "error" + ] + }, + "Session": { + "type": "object", + "properties": { + "sessionToken": { + "type": "string", + "maxLength": 8192, + "readOnly": true, + "x-sensitive": true, + "description": "Secret returned once; use X-Flybot-Member-Session, never query strings." + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "sessionToken" + ] + }, + "AuthIdentity": { + "type": "object", + "properties": { + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "displayName": { + "type": "string" + }, + "sessionId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "personalAgentCredentialId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string" + }, + "owner": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "AgentCredential": { + "type": "object", + "properties": { + "version": { + "const": "personal-agent-credential/v1", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "revoked" + ] + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "expiresAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "agentId", + "projectIds", + "status", + "createdAt", + "expiresAt" + ] + }, + "PersonalAgent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "ownerId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string", + "maxLength": 120 + }, + "kind": { + "type": "string", + "enum": [ + "internal", + "external" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "retired" + ] + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "retiredAt": { + "type": "integer", + "minimum": 0 + }, + "memoryScopeId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "connection": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "maxLength": 120 + }, + "endpoint": { + "type": "string", + "format": "uri" + }, + "protocol": { + "const": "flybot-agent/v1", + "type": "string" + }, + "status": { + "const": "unverified", + "type": "string" + } + }, + "additionalProperties": true + } + }, + "additionalProperties": true, + "required": [ + "id", + "ownerId", + "name", + "kind", + "status" + ] + }, + "Participation": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "ownerId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string", + "enum": [ + "active", + "left", + "retired" + ] + }, + "carrierId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "contextScopeId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "agentId", + "projectId", + "status" + ] + }, + "RepositoryAssociation": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "defaultBranch": { + "type": "string", + "maxLength": 120 + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "repository", + "defaultBranch" + ] + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string", + "maxLength": 120 + }, + "goal": { + "type": "string", + "maxLength": 4000 + }, + "scope": { + "type": "string", + "maxLength": 4000 + }, + "description": { + "type": "string", + "maxLength": 2000 + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + }, + "repositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryAssociation" + } + }, + "defaultBranch": { + "type": "string", + "maxLength": 120 + }, + "workDir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived", + "closed", + "deleted" + ] + }, + "ownerUserId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "ownerUserIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "role": { + "anyOf": [ + { + "type": "string", + "enum": [ + "owner", + "maintainer", + "member" + ] + }, + { + "type": "null" + } + ] + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "roles": { + "type": "object", + "properties": { + "maintainers": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "members": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + } + }, + "additionalProperties": true + }, + "chief": { + "$ref": "#/components/schemas/JsonValue" + }, + "closure": { + "$ref": "#/components/schemas/JsonValue" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "updatedAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "name", + "status" + ] + }, + "Requirements": { + "type": "object", + "properties": { + "revision": { + "type": "integer", + "minimum": 1 + }, + "title": { + "type": "string", + "maxLength": 2000 + }, + "criteria": { + "type": "string", + "maxLength": 2000 + }, + "impact": { + "type": "string", + "maxLength": 2000 + }, + "scope": { + "type": "string", + "maxLength": 2000 + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "revision", + "title", + "criteria", + "impact" + ] + }, + "TaskRecord": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "title": { + "type": "string" + }, + "criteria": { + "type": "string" + }, + "requesterId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "projectTaskKind": { + "type": "string", + "enum": [ + "code", + "decision", + "release" + ] + }, + "status": { + "type": "string" + }, + "priority": { + "type": "string" + }, + "progress": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "note": { + "type": "string" + }, + "deliveryAttemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectTask": { + "$ref": "#/components/schemas/JsonValue" + }, + "collaboration": { + "$ref": "#/components/schemas/JsonValue" + }, + "result": { + "$ref": "#/components/schemas/JsonValue" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "updatedAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "title", + "status" + ] + }, + "TaskView": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "title": { + "type": "string", + "maxLength": 1000 + }, + "publication": { + "const": "published", + "type": "string" + }, + "phase": { + "type": "string", + "enum": [ + "published", + "accepted", + "cancelled", + "stopping", + "blocked", + "awaiting-owner", + "awaiting-chief", + "queued", + "starting", + "running", + "awaiting-input", + "awaiting-acceptance", + "failed", + "paused", + "publishing" + ] + }, + "waitingFor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "botId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "currentRole": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + { + "type": "null" + } + ] + }, + "generation": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "attemptId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "queueId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "workerId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "candidateSha": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } + }, + "evidence": { + "$ref": "#/components/schemas/JsonValue" + }, + "contract": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "effects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Effect" + } + }, + "execution": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "outcome": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "projectId", + "taskId", + "phase", + "nextActions" + ] + }, + "Attempt": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string", + "enum": [ + "preparing", + "running", + "waiting-acceptance", + "accepted", + "failed", + "interrupted", + "returned", + "cancelled" + ] + }, + "protocol": { + "type": "string" + }, + "workflowVersion": { + "type": "string" + }, + "baseSha": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + "candidateSha": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + "requirement": { + "$ref": "#/components/schemas/JsonValue" + }, + "workspaces": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "evidence": { + "$ref": "#/components/schemas/JsonValue" + }, + "pr": { + "$ref": "#/components/schemas/JsonValue" + }, + "release": { + "$ref": "#/components/schemas/JsonValue" + }, + "roleSessions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "updatedAt": { + "type": "integer", + "minimum": 0 + }, + "failure": { + "$ref": "#/components/schemas/JsonValue" + }, + "sourceRefs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "preview": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId", + "status" + ] + }, + "QueueEntry": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "status": { + "type": "string", + "enum": [ + "waiting", + "starting", + "started", + "blocked", + "failed", + "cancelled" + ] + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "reason": { + "type": "string" + }, + "initialTarget": { + "$ref": "#/components/schemas/JsonValue" + }, + "repositoryBinding": { + "$ref": "#/components/schemas/JsonValue" + }, + "attemptId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId", + "status" + ] + }, + "Effect": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "done", + "failed", + "cancelled" + ] + }, + "failures": { + "type": "integer", + "minimum": 0 + }, + "dueAt": { + "type": "integer", + "minimum": 0 + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "waitingFor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "receipt": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "kind", + "status" + ] + }, + "CommandReceipt": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "prepared", + "running", + "unknown", + "rejected", + "completed", + "completion-pending-commit" + ] + }, + "committed": { + "type": "boolean" + }, + "origin": { + "$ref": "#/components/schemas/JsonValue" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "updatedAt": { + "type": "integer", + "minimum": 0 + }, + "failure": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "resultRef": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "resultSha256": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + { + "type": "null" + } + ] + }, + "resultBytes": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "outcome": { + "type": "string" + }, + "nextAction": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "version", + "id", + "projectId", + "requestId", + "name", + "status", + "committed", + "origin", + "createdAt", + "updatedAt" + ] + }, + "Proposal": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "fields": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "criteria": { + "type": "string" + }, + "impact": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "projectTaskKind": { + "type": "string", + "enum": [ + "code", + "decision", + "release" + ] + } + }, + "additionalProperties": true + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "publishedTaskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "personalAgentSource": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId" + ] + }, + "RoleExecution": { + "type": "object", + "properties": { + "harness": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + }, + "model": { + "type": "string", + "maxLength": 120 + }, + "resourceIds": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "maxItems": 20 + }, + "maxConcurrent": { + "type": "integer", + "minimum": 1, + "maximum": 64 + } + }, + "additionalProperties": false, + "required": [ + "harness", + "resourceIds" + ] + }, + "RoleDefinition": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "name": { + "type": "string" + }, + "policyRole": { + "type": "string", + "enum": [ + "chief", + "developer", + "tester", + "reviewer" + ] + }, + "model": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "skills": { + "type": "array", + "items": { + "type": "string" + } + }, + "memoryRefs": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "execution": { + "$ref": "#/components/schemas/RoleExecution" + }, + "tools": { + "$ref": "#/components/schemas/JsonValue" + }, + "definitionRevision": { + "type": "integer", + "minimum": 1 + }, + "sourceRef": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "role" + ] + }, + "RoleProposal": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-role-proposal/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "action": { + "type": "string", + "enum": [ + "add", + "update", + "remove" + ] + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "baseRevision": { + "type": "integer", + "minimum": 0 + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "committed": { + "type": "boolean" + }, + "decision": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "sourceRef": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "role", + "sha256", + "status" + ] + }, + "AgentCarrier": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "memberId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "sessionId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "personalAgentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "participationId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string" + }, + "definitionVersion": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "visibility" + ] + }, + "Message": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "type": "string" + }, + "text": { + "type": "string" + }, + "speaker": { + "type": "string" + }, + "botId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "seq": { + "type": "integer", + "minimum": 0 + }, + "at": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + }, + "sourceRef": { + "$ref": "#/components/schemas/JsonValue" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true + }, + "Consultation": { + "type": "object", + "properties": { + "version": { + "const": "project-consultation/v1", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "initiatedBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "returnTo": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "target": { + "type": "object", + "properties": { + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string" + } + }, + "additionalProperties": true + }, + "direction": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + }, + "linkedTaskId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "requiresHuman": { + "type": "boolean" + }, + "question": { + "type": "string" + }, + "state": { + "type": "string" + }, + "initiativeTransferred": { + "const": false, + "type": "boolean" + }, + "replies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "replyCount": { + "type": "integer", + "minimum": 0 + }, + "nextReplyOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "finishedAt": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "state", + "initiativeTransferred" + ] + }, + "Handoff": { + "type": "object", + "properties": { + "version": { + "const": "project-handoff-contract/v1", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "state": { + "type": "string", + "enum": [ + "pending", + "accepted", + "processed", + "revoked", + "invalidated", + "interrupted" + ] + }, + "purpose": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + }, + "target": { + "$ref": "#/components/schemas/JsonValue" + }, + "initiative": { + "$ref": "#/components/schemas/JsonValue" + }, + "acceptance": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "requirements": { + "$ref": "#/components/schemas/JsonValue" + }, + "predecessorId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "successorId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "evidence": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "failure": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId", + "state" + ] + }, + "SourcePage": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "totalChars": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "text", + "sha256", + "offset", + "nextOffset" + ] + }, + "LogPage": { + "type": "object", + "properties": { + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sha": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "totalBytes": { + "type": "integer", + "minimum": 0 + }, + "bounded": { + "type": "boolean" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "text" + ] + }, + "ReleaseProof": { + "type": "object", + "properties": { + "provider": { + "const": "github", + "type": "string" + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "tag": { + "type": "string" + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + "releaseId": { + "type": "integer", + "minimum": 1 + }, + "publishedAt": { + "type": "string" + }, + "url": { + "type": "string" + }, + "executorLogin": { + "type": "string" + }, + "marker": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "provider", + "repository", + "tag", + "sha", + "releaseId", + "publishedAt" + ] + }, + "Release": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string", + "enum": [ + "authorized", + "submitting", + "observed", + "awaiting-artifact", + "unknown", + "failed", + "revoked" + ] + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "tag": { + "type": "string" + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + "mode": { + "type": "string", + "enum": [ + "observe", + "publish" + ] + }, + "authorizedBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "observedAt": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "proof": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReleaseProof" + }, + { + "type": "null" + } + ] + }, + "effect": { + "$ref": "#/components/schemas/JsonValue" + }, + "result": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "id", + "status", + "repository", + "tag", + "sha", + "mode" + ] + }, + "ScheduleWhen": { + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "const": "every", + "type": "string" + }, + "seconds": { + "type": "integer", + "minimum": 60, + "maximum": 604800 + }, + "minutes": { + "type": "integer", + "minimum": 1, + "maximum": 10080 + } + }, + "additionalProperties": false, + "required": [ + "kind" + ], + "oneOf": [ + { + "required": [ + "seconds" + ] + }, + { + "required": [ + "minutes" + ] + } + ] + }, + { + "type": "object", + "properties": { + "kind": { + "const": "daily", + "type": "string" + }, + "time": { + "type": "string", + "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$" + }, + "timeZone": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "kind", + "time" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "const": "weekly", + "type": "string" + }, + "time": { + "type": "string", + "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$" + }, + "timeZone": { + "type": "string" + }, + "weekdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1, + "maximum": 7 + }, + "maxItems": 7, + "minItems": 1, + "uniqueItems": true + } + }, + "additionalProperties": false, + "required": [ + "kind", + "time", + "weekdays" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "const": "at", + "type": "string" + }, + "at": { + "type": "string", + "format": "date-time", + "description": "Must be strictly in the future; offset is explicit." + } + }, + "additionalProperties": false, + "required": [ + "kind", + "at" + ] + } + ] + }, + "Schedule": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "target": { + "$ref": "#/components/schemas/JsonValue" + }, + "enabled": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/JsonValue" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "scheduleId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId" + ] + }, + "Event": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "cursor": { + "type": "string", + "maxLength": 600 + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "entityType": { + "type": "string" + }, + "entityId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "type": { + "type": "string" + }, + "at": { + "type": "integer", + "minimum": 0 + }, + "data": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "projectId", + "cursor" + ] + }, + "Snapshot": { + "type": "object", + "properties": { + "version": { + "const": "project-event/v1", + "type": "string" + }, + "project": { + "anyOf": [ + { + "$ref": "#/components/schemas/Project" + }, + { + "type": "null" + } + ] + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "cursor": { + "type": "string", + "maxLength": 600 + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "entityType": { + "type": "string" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "version", + "project", + "revision", + "cursor", + "next" + ] + }, + "EventPage": { + "type": "object", + "properties": { + "version": { + "const": "project-event/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Event" + } + }, + "next": { + "type": "string", + "maxLength": 600 + }, + "head": { + "type": "string", + "maxLength": 600 + }, + "oldest": { + "type": "string", + "maxLength": 600 + } + }, + "additionalProperties": true, + "required": [ + "version", + "projectId", + "revision", + "events", + "next", + "head", + "oldest" + ] + }, + "Resource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "type": { + "type": "string", + "enum": [ + "local", + "docker" + ] + }, + "harnesses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + } + }, + "status": { + "type": "string" + }, + "capacity": { + "type": "object", + "properties": { + "configured": { + "type": "integer", + "minimum": 1 + }, + "occupied": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "configured", + "occupied" + ] + }, + "occupied": { + "type": "integer", + "minimum": 0 + }, + "health": { + "$ref": "#/components/schemas/JsonValue" + }, + "canManage": { + "type": "boolean" + }, + "harnessStatus": { + "type": "array", + "items": { + "type": "object", + "properties": { + "harness": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + }, + "status": { + "type": "string" + }, + "at": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "harness", + "status" + ] + } + } + }, + "additionalProperties": true + }, + "HealthCheck": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "checking", + "ready", + "unreachable", + "unconfigured", + "authRequired", + "environmentError" + ] + }, + "reason": { + "type": "string" + }, + "at": { + "type": "integer", + "minimum": 0 + }, + "harness": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "sdkVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "expectedSdkVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "status" + ] + }, + "Terminal": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "terminalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "expiresAt": { + "type": "integer", + "minimum": 0 + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "harness": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + }, + "seq": { + "type": "integer", + "minimum": 0 + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "closed": { + "type": "boolean" + }, + "released": { + "type": "boolean" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": true + }, + "Room": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + } + }, + "status": { + "type": "string" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "activity": { + "$ref": "#/components/schemas/JsonValue" + }, + "memberIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId" + ] + }, + "Input": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-task-input/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string" + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "kind": { + "type": "string" + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId" + ] + }, + "Delegation": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "safe", + "watch" + ] + }, + "grant": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "generation": { + "type": "integer", + "minimum": 0 + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id" + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "mode", + "grant" + ] + }, + "DevelopmentQueryTasksPayload": { + "type": "object", + "properties": { + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 200 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryTasksRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "tasks", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryTasksPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryTasksResult": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskView" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "tasks", + "next" + ] + }, + "DevelopmentQueryTasksSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryTasksResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryTaskPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "taskId" + ] + }, + "DevelopmentQueryTaskRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "task", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryTaskPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryTaskResult": { + "type": "object", + "properties": { + "task": { + "$ref": "#/components/schemas/TaskView" + } + }, + "additionalProperties": true, + "required": [ + "task" + ] + }, + "DevelopmentQueryTaskSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryTaskResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryTaskDetailPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptLimit": { + "type": "integer", + "minimum": 1, + "maximum": 50 + }, + "beforeAttemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "taskId" + ] + }, + "DevelopmentQueryTaskDetailRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "task.detail", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryTaskDetailPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryTaskDetailResult": { + "type": "object", + "properties": { + "task": { + "$ref": "#/components/schemas/TaskRecord" + }, + "view": { + "$ref": "#/components/schemas/TaskView" + }, + "attempts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attempt" + } + }, + "attemptsPage": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 50 + }, + "before": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "total", + "limit", + "before" + ] + } + }, + "additionalProperties": true, + "required": [ + "task", + "view", + "attempts", + "attemptsPage" + ] + }, + "DevelopmentQueryTaskDetailSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryTaskDetailResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryTaskHistoryPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "section": { + "type": "string", + "enum": [ + "requirements", + "requirementsHistory", + "waitHistory", + "results", + "dependencies", + "admissionDecisions", + "note", + "result", + "actors", + "handoffs" + ] + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 16000 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "taskId", + "section" + ] + }, + "DevelopmentQueryTaskHistoryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "task.history", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryTaskHistoryPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryTaskHistoryResult": { + "$ref": "#/components/schemas/SourcePage" + }, + "DevelopmentQueryTaskHistorySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryTaskHistoryResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryRolesPayload": { + "type": "object", + "properties": { + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 16000 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false + }, + "DevelopmentQueryRolesRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "roles", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryRolesPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryRolesResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleDefinition" + } + } + }, + "additionalProperties": true, + "required": [ + "projectId", + "revision", + "roles" + ] + }, + { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "text": { + "type": "string" + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "text", + "sha256" + ] + } + ] + }, + "DevelopmentQueryRolesSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryRolesResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryRoleProposalsPayload": { + "type": "object", + "properties": { + "proposalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryRoleProposalsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "role.proposals", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryRoleProposalsPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryRoleProposalsResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "proposals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleProposal" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "proposals", + "next" + ] + }, + { + "type": "object", + "properties": { + "proposal": { + "$ref": "#/components/schemas/RoleProposal" + }, + "definition": { + "anyOf": [ + { + "$ref": "#/components/schemas/RoleDefinition" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "proposal", + "definition" + ] + } + ] + }, + "DevelopmentQueryRoleProposalsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryRoleProposalsResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryConsultationListPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryConsultationListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "consultation.list", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationListPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryConsultationListResult": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Consultation" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "items", + "next" + ] + }, + "DevelopmentQueryConsultationListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationListResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryConsultationGetPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "consultationId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "consultationId" + ] + }, + "DevelopmentQueryConsultationGetRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "consultation.get", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationGetPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryConsultationGetResult": { + "type": "object", + "properties": { + "consultation": { + "$ref": "#/components/schemas/Consultation" + } + }, + "additionalProperties": true, + "required": [ + "consultation" + ] + }, + "DevelopmentQueryConsultationGetSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationGetResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryHandoffListPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "taskId" + ] + }, + "DevelopmentQueryHandoffListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "handoff.list", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffListPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryHandoffListResult": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Handoff" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "items", + "next" + ] + }, + "DevelopmentQueryHandoffListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffListResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryHandoffGetPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "handoffId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "taskId", + "handoffId" + ] + }, + "DevelopmentQueryHandoffGetRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "handoff.get", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffGetPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryHandoffGetResult": { + "type": "object", + "properties": { + "handoff": { + "$ref": "#/components/schemas/Handoff" + } + }, + "additionalProperties": true, + "required": [ + "handoff" + ] + }, + "DevelopmentQueryHandoffGetSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffGetResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryPoolsPayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "DevelopmentQueryPoolsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "pools", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryPoolsPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryPoolsResult": { + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "botId", + "role", + "tasks" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "pools" + ] + }, + "DevelopmentQueryPoolsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryPoolsResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryInputsPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 200 + } + }, + "additionalProperties": false, + "required": [ + "taskId" + ] + }, + "DevelopmentQueryInputsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "inputs", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryInputsPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryInputsResult": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Input" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true + }, + "DevelopmentQueryInputsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryInputsResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQuerySourcesPayload": { + "type": "object", + "properties": { + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "eventId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false + }, + "DevelopmentQuerySourcesRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "sources", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQuerySourcesPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQuerySourcesResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-source/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "kind": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId" + ] + } + }, + "threads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-source/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "kind": { + "type": "string" + }, + "sourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "number": { + "type": "integer", + "minimum": 1 + }, + "cursor": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "sourceId", + "number" + ] + } + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-source/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "sourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "createdBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "type": "string", + "enum": [ + "active", + "context" + ] + }, + "includeHistory": { + "type": "boolean" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId", + "threadId", + "enabled" + ] + } + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "observedAt": { + "type": "integer", + "minimum": 0 + }, + "type": { + "type": "string" + }, + "sha": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + "effect": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId" + ] + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "sources", + "threads", + "subscriptions", + "events", + "next" + ] + }, + { + "type": "object", + "properties": { + "event": { + "$ref": "#/components/schemas/JsonValue" + }, + "text": { + "type": "string", + "maxLength": 16000 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": true, + "required": [ + "event", + "text", + "offset", + "nextOffset", + "sha256" + ] + } + ] + }, + "DevelopmentQuerySourcesSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQuerySourcesResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryExecutionBoundaryPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false + }, + "DevelopmentQueryExecutionBoundaryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "execution.boundary", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryExecutionBoundaryPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryExecutionBoundaryResult": { + "type": "object", + "properties": { + "version": { + "const": "project-execution-boundary/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "profile": { + "$ref": "#/components/schemas/JsonValue" + }, + "host": { + "type": "object", + "properties": { + "uid": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "identityScope": { + "type": "string" + }, + "dedicatedAccount": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "uid", + "identityScope", + "dedicatedAccount" + ] + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "taskScope": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "delegation": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "safe", + "watch" + ] + }, + "grant": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "effective": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "mode", + "grant", + "effective" + ] + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Resource" + } + }, + "credentials": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/JsonValue" + }, + "personal": { + "$ref": "#/components/schemas/JsonValue" + }, + "fallback": { + "const": "none", + "type": "string" + }, + "harnessPrincipalId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "project", + "personal", + "fallback", + "harnessPrincipalId" + ] + }, + "preflight": { + "$ref": "#/components/schemas/JsonValue" + }, + "memory": { + "type": "object", + "properties": { + "public": { + "type": "string" + }, + "private": { + "type": "string" + }, + "contentsRead": { + "const": false, + "type": "boolean" + }, + "inheritedIntoPublicContext": { + "const": false, + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "public", + "private", + "contentsRead", + "inheritedIntoPublicContext" + ] + }, + "invariants": { + "type": "array", + "items": { + "type": "string" + } + }, + "evidence": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "version", + "projectId", + "memberId", + "profile", + "host", + "permissions", + "taskScope", + "delegation", + "resources", + "credentials", + "preflight", + "memory", + "invariants", + "evidence" + ] + }, + "DevelopmentQueryExecutionBoundarySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryExecutionBoundaryResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryAttemptContextPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "section": { + "type": "string", + "enum": [ + "roleSessions", + "roleSessionHistory", + "rolePolicies", + "evidence", + "feedback", + "requirement", + "failure", + "agentDefinitions", + "integrationAdmissions" + ] + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 16000 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "attemptId", + "section" + ] + }, + "DevelopmentQueryAttemptContextRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "attempt.context", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptContextPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryAttemptContextResult": { + "$ref": "#/components/schemas/SourcePage" + }, + "DevelopmentQueryAttemptContextSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptContextResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryAttemptIntegrationStatePayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentQueryAttemptIntegrationStateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "attempt.integration-state", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptIntegrationStatePayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryAttemptIntegrationStateResult": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "generation": { + "type": "integer", + "minimum": 0 + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "snapshot": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "attemptId", + "generation", + "inputs", + "snapshot" + ] + }, + "DevelopmentQueryAttemptIntegrationStateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptIntegrationStateResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryAttemptLogPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 4, + "maximum": 8192 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentQueryAttemptLogRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "attempt.log", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptLogPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryAttemptLogResult": { + "$ref": "#/components/schemas/LogPage" + }, + "DevelopmentQueryAttemptLogSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptLogResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryReleaseStatusPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentQueryReleaseStatusRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "release.status", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryReleaseStatusPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryReleaseStatusResult": { + "type": "object", + "properties": { + "release": { + "anyOf": [ + { + "$ref": "#/components/schemas/Release" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "release" + ] + }, + "DevelopmentQueryReleaseStatusSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryReleaseStatusResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryChiefStatePayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "DevelopmentQueryChiefStateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "chief.state", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryChiefStatePayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryChiefStateResult": { + "type": "object", + "properties": { + "policy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "authorityMemberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "scheduleId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "enabled" + ] + }, + "template": { + "$ref": "#/components/schemas/JsonValue" + }, + "schedule": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/JsonValue" + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "enabled", + "status", + "config", + "deliveries" + ] + }, + { + "type": "null" + } + ] + }, + "runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "status" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "policy", + "template", + "schedule", + "runs" + ] + }, + "DevelopmentQueryChiefStateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryChiefStateResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryEffectsPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 200 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryEffectsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "effects", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryEffectsPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryEffectsResult": { + "type": "object", + "properties": { + "effects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Effect" + } + } + }, + "additionalProperties": true, + "required": [ + "effects" + ] + }, + "DevelopmentQueryEffectsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryEffectsResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryCommandReceiptPayload": { + "type": "object", + "properties": { + "commandRequestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "commandName": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "commandRequestId" + ] + }, + "DevelopmentQueryCommandReceiptRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "command.receipt", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryCommandReceiptPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryCommandReceiptResult": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "DevelopmentQueryCommandReceiptSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryCommandReceiptResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryCommandResultPayload": { + "type": "object", + "properties": { + "commandRequestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "commandName": { + "type": "string" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 16000 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "commandRequestId" + ] + }, + "DevelopmentQueryCommandResultRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "command.result", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryCommandResultPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryCommandResultResult": { + "$ref": "#/components/schemas/SourcePage" + }, + "DevelopmentQueryCommandResultSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryCommandResultResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryProjectSnapshotPayload": { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "task", + "attempt", + "execution", + "resource", + "input", + "role-proposal" + ] + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "expectedRevision": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryProjectSnapshotRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "project.snapshot", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryProjectSnapshotPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryProjectSnapshotResult": { + "$ref": "#/components/schemas/Snapshot" + }, + "DevelopmentQueryProjectSnapshotSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryProjectSnapshotResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryEventsPayload": { + "type": "object", + "properties": { + "after": { + "type": "string", + "maxLength": 600 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryEventsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "events", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryEventsPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryEventsResult": { + "$ref": "#/components/schemas/EventPage" + }, + "DevelopmentQueryEventsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryEventsResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentQueryCompatibilityPayload": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false + }, + "DevelopmentQueryCompatibilityRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "query", + "type": "string" + }, + "name": { + "const": "compatibility", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentQueryCompatibilityPayload" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentQueryCompatibilityResult": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "cutoverId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "committed": { + "type": "boolean" + }, + "baseline": { + "anyOf": [ + { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": true, + "required": [ + "count", + "sha256" + ] + }, + { + "type": "null" + } + ] + }, + "totals": { + "type": "object", + "properties": { + "contract": { + "type": "integer", + "minimum": 0 + }, + "legacy": { + "type": "integer", + "minimum": 0 + }, + "held": { + "type": "integer", + "minimum": 0 + }, + "active": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "contract", + "legacy", + "held", + "active" + ] + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "parentId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": [ + "contract", + "legacy", + "held" + ] + }, + "attemptId": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + }, + "parentPresent": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "status", + "mode" + ] + } + }, + "page": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "total": { + "type": "integer", + "minimum": 0 + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "offset", + "limit", + "total", + "nextOffset" + ] + } + }, + "additionalProperties": true, + "required": [ + "version", + "cutoverId", + "committed", + "baseline", + "totals", + "tasks", + "page" + ] + }, + "DevelopmentQueryCompatibilitySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentQueryCompatibilityResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandConsultationAskPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 8000 + } + }, + "additionalProperties": false, + "required": [ + "text" + ] + }, + "DevelopmentCommandConsultationAskRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "consultation.ask", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationAskPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandConsultationAskResult": { + "type": "object", + "properties": { + "handoff": { + "$ref": "#/components/schemas/JsonValue" + }, + "consultation": { + "$ref": "#/components/schemas/Consultation" + }, + "queued": { + "type": "boolean" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "DevelopmentCommandConsultationAskSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationAskResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandConsultationReplyPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "consultationId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 4000 + }, + "publish": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "consultationId", + "text" + ] + }, + "DevelopmentCommandConsultationReplyRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "consultation.reply", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationReplyPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandConsultationReplyResult": { + "type": "object", + "properties": { + "consultation": { + "$ref": "#/components/schemas/Consultation" + }, + "replyId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "published": { + "type": "boolean" + }, + "requiresUserApproval": { + "type": "boolean" + }, + "input": { + "$ref": "#/components/schemas/Input" + } + }, + "additionalProperties": true, + "required": [ + "consultation" + ] + }, + "DevelopmentCommandConsultationReplySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationReplyResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandRoleDecidePayload": { + "type": "object", + "properties": { + "proposalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "decision": { + "type": "string", + "enum": [ + "approve", + "reject" + ] + } + }, + "additionalProperties": false, + "required": [ + "proposalId", + "expectedSha256", + "decision" + ] + }, + "DevelopmentCommandRoleDecideRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "role.decide", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandRoleDecidePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandRoleDecideResult": { + "type": "object", + "properties": { + "proposal": { + "$ref": "#/components/schemas/RoleProposal" + }, + "definitions": { + "$ref": "#/components/schemas/JsonValue" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "proposal", + "definitions", + "already" + ] + }, + "DevelopmentCommandRoleDecideSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandRoleDecideResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandTaskProposePayload": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 300 + }, + "criteria": { + "type": "string", + "maxLength": 2000 + }, + "impact": { + "type": "string", + "maxLength": 2000 + }, + "scope": { + "type": "string", + "maxLength": 2000 + }, + "projectTaskKind": { + "type": "string", + "enum": [ + "code", + "decision", + "release" + ] + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "priority": { + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + }, + "note": { + "type": "string" + }, + "target": { + "type": "object", + "properties": { + "owner": { + "type": "string" + }, + "repo": { + "type": "string" + }, + "number": { + "type": "integer", + "minimum": 1 + }, + "href": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "title" + ] + }, + "DevelopmentCommandTaskProposeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "task.propose", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandTaskProposePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandTaskProposeResult": { + "$ref": "#/components/schemas/TaskRecord" + }, + "DevelopmentCommandTaskProposeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandTaskProposeResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandTaskChangeRequestPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "action": { + "type": "string", + "enum": [ + "revise", + "cancel", + "reopen" + ] + }, + "reason": { + "type": "string", + "maxLength": 4000 + }, + "requirements": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 2000 + }, + "criteria": { + "type": "string", + "maxLength": 2000 + }, + "impact": { + "type": "string", + "maxLength": 2000 + }, + "scope": { + "type": "string", + "maxLength": 2000 + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "taskId", + "action", + "reason" + ] + }, + "DevelopmentCommandTaskChangeRequestRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "task.change.request", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandTaskChangeRequestPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandTaskChangeRequestResult": { + "type": "object", + "properties": { + "run": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "id" + ] + }, + "applied": { + "const": false, + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "run", + "applied" + ] + }, + "DevelopmentCommandTaskChangeRequestSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandTaskChangeRequestResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandTaskRunPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "targetRole": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "taskId" + ] + }, + "DevelopmentCommandTaskRunRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "task.run", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRunPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandTaskRunResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueEntry" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "queue" + ] + }, + { + "type": "object", + "properties": { + "admission": { + "$ref": "#/components/schemas/JsonValue" + }, + "waitingFor": { + "const": "chief", + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "admission", + "waitingFor" + ] + } + ] + }, + "DevelopmentCommandTaskRunSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRunResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandTaskAcceptPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentCommandTaskAcceptRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "task.accept", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandTaskAcceptPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandTaskAcceptResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "DevelopmentCommandTaskAcceptSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandTaskAcceptResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandTaskRejectPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "reason": { + "type": "string", + "maxLength": 4000 + } + }, + "additionalProperties": false, + "required": [ + "attemptId", + "reason" + ] + }, + "DevelopmentCommandTaskRejectRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "task.reject", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRejectPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandTaskRejectResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "DevelopmentCommandTaskRejectSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRejectResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandAttemptStopPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentCommandAttemptStopRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "attempt.stop", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptStopPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandAttemptStopResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "stopping": { + "type": "boolean" + }, + "remainingWorkers": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "DevelopmentCommandAttemptStopSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptStopResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandAttemptCleanupPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentCommandAttemptCleanupRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "attempt.cleanup", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptCleanupPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandAttemptCleanupResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "stopping": { + "type": "boolean" + }, + "remainingWorkers": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "DevelopmentCommandAttemptCleanupSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptCleanupResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandAttemptPublicationRetryPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentCommandAttemptPublicationRetryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "attempt.publication-retry", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptPublicationRetryPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandAttemptPublicationRetryResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "stopping": { + "type": "boolean" + }, + "remainingWorkers": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "DevelopmentCommandAttemptPublicationRetrySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptPublicationRetryResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandAttemptIntegrationBindPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "generation": { + "type": "integer", + "minimum": 0 + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + } + }, + "additionalProperties": false, + "required": [ + "ref", + "sha" + ] + }, + "maxItems": 20 + }, + "expectedWorkspace": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": false, + "required": [ + "attemptId", + "generation", + "inputs", + "expectedWorkspace" + ] + }, + "DevelopmentCommandAttemptIntegrationBindRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "attempt.integration-bind", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptIntegrationBindPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandAttemptIntegrationBindResult": { + "type": "object", + "properties": { + "admission": { + "$ref": "#/components/schemas/JsonValue" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "admission", + "already" + ] + }, + "DevelopmentCommandAttemptIntegrationBindSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptIntegrationBindResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandReleaseRequestPayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "tag": { + "type": "string", + "maxLength": 101 + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + "mode": { + "type": "string", + "enum": [ + "observe", + "publish" + ] + }, + "name": { + "type": "string", + "maxLength": 120 + }, + "notes": { + "type": "string", + "maxLength": 4000 + } + }, + "additionalProperties": false, + "required": [ + "attemptId", + "tag", + "sha" + ] + }, + "DevelopmentCommandReleaseRequestRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "release.request", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseRequestPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandReleaseRequestResult": { + "type": "object", + "properties": { + "release": { + "$ref": "#/components/schemas/Release" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "release" + ] + }, + "DevelopmentCommandReleaseRequestSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseRequestResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandReleaseReconcilePayload": { + "type": "object", + "properties": { + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "attemptId" + ] + }, + "DevelopmentCommandReleaseReconcileRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "release.reconcile", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseReconcilePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandReleaseReconcileResult": { + "type": "object", + "properties": { + "release": { + "$ref": "#/components/schemas/Release" + }, + "reconciliation": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "release", + "reconciliation" + ] + }, + "DevelopmentCommandReleaseReconcileSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseReconcileResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandQueueCancelPayload": { + "type": "object", + "properties": { + "queueId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "queueId" + ] + }, + "DevelopmentCommandQueueCancelRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "queue.cancel", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandQueueCancelPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandQueueCancelResult": { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueEntry" + } + }, + "additionalProperties": true, + "required": [ + "queue" + ] + }, + "DevelopmentCommandQueueCancelSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandQueueCancelResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandQueueRetryPayload": { + "type": "object", + "properties": { + "queueId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "targetRole": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + } + }, + "additionalProperties": false, + "required": [ + "queueId" + ] + }, + "DevelopmentCommandQueueRetryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "queue.retry", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandQueueRetryPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandQueueRetryResult": { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueEntry" + } + }, + "additionalProperties": true, + "required": [ + "queue" + ] + }, + "DevelopmentCommandQueueRetrySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandQueueRetryResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandChiefInspectPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false + }, + "DevelopmentCommandChiefInspectRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "chief.inspect", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandChiefInspectPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandChiefInspectResult": { + "type": "object", + "properties": { + "run": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id" + ] + } + }, + "additionalProperties": true, + "required": [ + "run" + ] + }, + "DevelopmentCommandChiefInspectSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandChiefInspectResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandChiefConfigurePayload": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "inspection": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "when": { + "$ref": "#/components/schemas/ScheduleWhen" + }, + "thresholds": { + "type": "object", + "properties": { + "maxHandoffsWithoutProgress": { + "type": "integer", + "minimum": 1 + }, + "longExecutionMs": { + "type": "integer", + "minimum": 1 + }, + "longWaitMs": { + "type": "integer", + "minimum": 1 + }, + "missingHeartbeatMs": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "DevelopmentCommandChiefConfigureRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "chief.configure", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandChiefConfigurePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandChiefConfigureResult": { + "type": "object", + "properties": { + "policy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "authorityMemberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "scheduleId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "enabled" + ] + }, + "template": { + "$ref": "#/components/schemas/JsonValue" + }, + "schedule": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/JsonValue" + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "enabled", + "status", + "config", + "deliveries" + ] + }, + { + "type": "null" + } + ] + }, + "runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "status" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "policy", + "template", + "schedule", + "runs" + ] + }, + "DevelopmentCommandChiefConfigureSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandChiefConfigureResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandScheduleConfigurePayload": { + "type": "object", + "properties": { + "operation": { + "type": "string", + "enum": [ + "save", + "delete", + "list" + ] + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "target": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "project-chief", + "project-source" + ] + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "kind", + "projectId" + ] + }, + "title": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "when": { + "$ref": "#/components/schemas/ScheduleWhen" + }, + "enabled": { + "type": "boolean" + }, + "rebindAuthority": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DevelopmentCommandScheduleConfigureRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "schedule.configure", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandScheduleConfigurePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandScheduleConfigureResult": { + "anyOf": [ + { + "$ref": "#/components/schemas/Schedule" + }, + { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schedule" + } + } + }, + "additionalProperties": true, + "required": [ + "tasks" + ] + } + ] + }, + "DevelopmentCommandScheduleConfigureSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandScheduleConfigureResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandAgentModePayload": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "safe", + "watch" + ] + }, + "personalAgentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "mode" + ] + }, + "DevelopmentCommandAgentModeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "agent.mode", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandAgentModePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandAgentModeResult": { + "$ref": "#/components/schemas/Delegation" + }, + "DevelopmentCommandAgentModeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandAgentModeResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandProposalPublishPayload": { + "type": "object", + "properties": { + "proposalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "proposalId" + ] + }, + "DevelopmentCommandProposalPublishRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "proposal.publish", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandProposalPublishPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandProposalPublishResult": { + "type": "object", + "properties": { + "task": { + "$ref": "#/components/schemas/TaskRecord" + }, + "proposal": { + "$ref": "#/components/schemas/Proposal" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "DevelopmentCommandProposalPublishSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandProposalPublishResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandExecutionInputPayload": { + "type": "object", + "properties": { + "workerId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "text": { + "type": "string", + "maxLength": 16000 + }, + "requestId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "allow": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "workerId", + "generation" + ], + "anyOf": [ + { + "required": [ + "text" + ] + }, + { + "required": [ + "requestId", + "allow" + ] + } + ] + }, + "DevelopmentCommandExecutionInputRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "execution.input", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandExecutionInputPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandExecutionInputResult": { + "type": "object", + "properties": { + "sent": { + "type": "boolean" + }, + "ok": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "DevelopmentCommandExecutionInputSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandExecutionInputResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandInputPublishPayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 4000 + } + }, + "additionalProperties": false, + "required": [ + "taskId", + "text" + ] + }, + "DevelopmentCommandInputPublishRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "input.publish", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandInputPublishPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandInputPublishResult": { + "type": "object", + "properties": { + "input": { + "$ref": "#/components/schemas/Input" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "input" + ] + }, + "DevelopmentCommandInputPublishSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandInputPublishResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandSourceSubscribePayload": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadKind": { + "type": "string", + "enum": [ + "issue", + "pull" + ] + }, + "number": { + "type": "integer", + "minimum": 1 + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "mode": { + "type": "string", + "enum": [ + "active", + "context" + ] + }, + "includeHistory": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "taskId", + "threadKind", + "number" + ] + }, + "DevelopmentCommandSourceSubscribeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "source.subscribe", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandSourceSubscribePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandSourceSubscribeResult": { + "type": "object", + "properties": { + "subscription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-source/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "sourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "createdBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "type": "string", + "enum": [ + "active", + "context" + ] + }, + "includeHistory": { + "type": "boolean" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId", + "threadId", + "enabled" + ] + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "subscription", + "already" + ] + }, + "DevelopmentCommandSourceSubscribeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandSourceSubscribeResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandSourceDisablePayload": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "subscriptionId" + ] + }, + "DevelopmentCommandSourceDisableRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "source.disable", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandSourceDisablePayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandSourceDisableResult": { + "type": "object", + "properties": { + "subscription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "version": { + "const": "project-source/v1", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "sourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "createdBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "mode": { + "type": "string", + "enum": [ + "active", + "context" + ] + }, + "includeHistory": { + "type": "boolean" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "taskId", + "threadId", + "enabled" + ] + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "subscription", + "already" + ] + }, + "DevelopmentCommandSourceDisableSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandSourceDisableResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandSourcePollPayload": { + "type": "object", + "properties": { + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "threadId" + ] + }, + "DevelopmentCommandSourcePollRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "source.poll", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandSourcePollPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandSourcePollResult": { + "type": "object", + "properties": { + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "acceptedEvents": { + "type": "integer", + "minimum": 0 + }, + "inputs": { + "type": "integer", + "minimum": 0 + }, + "cursor": { + "$ref": "#/components/schemas/JsonValue" + }, + "skipped": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "DevelopmentCommandSourcePollSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandSourcePollResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandEffectRetryPayload": { + "type": "object", + "properties": { + "effectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "effectId" + ] + }, + "DevelopmentCommandEffectRetryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "effect.retry", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandEffectRetryPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandEffectRetryResult": { + "type": "object", + "properties": { + "effectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "effectId", + "status" + ] + }, + "DevelopmentCommandEffectRetrySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandEffectRetryResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "DevelopmentCommandCommentPublishPayload": { + "type": "object", + "properties": { + "issueNumber": { + "type": "integer", + "minimum": 1 + }, + "text": { + "type": "string", + "maxLength": 10000 + }, + "scope": { + "const": "personal", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "issueNumber", + "text" + ] + }, + "DevelopmentCommandCommentPublishRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-development", + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "kind": { + "const": "command", + "type": "string" + }, + "name": { + "const": "comment.publish", + "type": "string" + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "payload": { + "$ref": "#/components/schemas/DevelopmentCommandCommentPublishPayload" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "expectedGeneration": { + "type": "integer", + "minimum": 0 + }, + "expectedCandidateSha": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "kind", + "name", + "projectId", + "payload", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "DevelopmentCommandCommentPublishResult": { + "type": "object", + "properties": { + "audit": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "audit" + ] + }, + "DevelopmentCommandCommentPublishSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "type": "object", + "properties": { + "version": { + "const": "project-development/v1", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "result": { + "$ref": "#/components/schemas/DevelopmentCommandCommentPublishResult" + }, + "receipt": { + "$ref": "#/components/schemas/CommandReceipt" + }, + "replayed": { + "type": "boolean" + }, + "reconstructed": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "version", + "result", + "requestId" + ] + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "AuthModePayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "AuthModeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "auth-mode", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/AuthModePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "AuthModeResult": { + "type": "object", + "properties": { + "workbench": { + "type": "boolean" + }, + "mode": { + "type": "string", + "enum": [ + "local", + "platform" + ] + }, + "panelUrl": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "writable": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "workbench", + "mode", + "panelUrl", + "writable" + ] + }, + "AuthModeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/AuthModeResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PlatformLoginPayload": { + "type": "object", + "properties": { + "email": { + "type": "string", + "maxLength": 320 + }, + "password": { + "type": "string", + "maxLength": 10000, + "writeOnly": true + } + }, + "additionalProperties": false, + "required": [ + "email", + "password" + ] + }, + "PlatformLoginRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "platform-login", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PlatformLoginPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PlatformLoginResult": { + "$ref": "#/components/schemas/Session" + }, + "PlatformLoginSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PlatformLoginResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "AuthWhoamiPayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "AuthWhoamiRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "auth-whoami", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/AuthWhoamiPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "AuthWhoamiResult": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuthIdentity" + }, + { + "type": "null" + } + ] + }, + "AuthWhoamiSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/AuthWhoamiResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "AuthRevokePayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "AuthRevokeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "auth-revoke", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/AuthRevokePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "AuthRevokeResult": { + "type": "boolean" + }, + "AuthRevokeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/AuthRevokeResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "AuthInvitePayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "AuthInviteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "auth-invite", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/AuthInvitePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "AuthInviteResult": { + "type": "object", + "properties": { + "token": { + "type": "string", + "readOnly": true, + "x-sensitive": true + }, + "expiresAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "token" + ] + }, + "AuthInviteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/AuthInviteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "AuthRedeemPayload": { + "type": "object", + "properties": { + "token": { + "type": "string", + "writeOnly": true + }, + "displayName": { + "type": "string", + "maxLength": 120 + } + }, + "additionalProperties": false, + "required": [ + "token" + ] + }, + "AuthRedeemRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "auth-redeem", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/AuthRedeemPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "AuthRedeemResult": { + "$ref": "#/components/schemas/Session" + }, + "AuthRedeemSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/AuthRedeemResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentCreatePayload": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 120 + }, + "kind": { + "type": "string", + "enum": [ + "internal", + "external" + ] + }, + "provider": { + "type": "string", + "maxLength": 120 + }, + "endpoint": { + "type": "string", + "format": "uri", + "pattern": "^https://" + } + }, + "additionalProperties": false, + "required": [ + "name" + ], + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "external", + "type": "string" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "provider", + "endpoint" + ] + } + } + ] + }, + "PersonalAgentCreateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-create", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentCreatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentCreateResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/PersonalAgent" + } + }, + "additionalProperties": true, + "required": [ + "agent" + ] + }, + "PersonalAgentCreateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentCreateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentListPayload": { + "type": "object", + "properties": { + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 200 + } + }, + "additionalProperties": false + }, + "PersonalAgentListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-list", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentListPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentListResult": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonalAgent" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "agents", + "next" + ] + }, + "PersonalAgentListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentListResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentParticipationsPayload": { + "type": "object", + "properties": { + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 200 + } + }, + "additionalProperties": false + }, + "PersonalAgentParticipationsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-participations", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentParticipationsPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentParticipationsResult": { + "type": "object", + "properties": { + "participations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Participation" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "participations", + "next" + ] + }, + "PersonalAgentParticipationsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentParticipationsResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentReadPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "agentId" + ] + }, + "PersonalAgentReadRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-read", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentReadPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentReadResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/PersonalAgent" + } + }, + "additionalProperties": true, + "required": [ + "agent" + ] + }, + "PersonalAgentReadSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentReadResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentJoinPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "agentId", + "projectId" + ] + }, + "PersonalAgentJoinRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-join", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentJoinPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentJoinResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/PersonalAgent" + }, + "participation": { + "$ref": "#/components/schemas/Participation" + } + }, + "additionalProperties": true, + "required": [ + "agent", + "participation" + ] + }, + "PersonalAgentJoinSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentJoinResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentDefaultPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "agentId", + "projectId" + ] + }, + "PersonalAgentDefaultRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-default", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentDefaultPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentDefaultResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/PersonalAgent" + }, + "participation": { + "$ref": "#/components/schemas/Participation" + } + }, + "additionalProperties": true, + "required": [ + "agent", + "participation" + ] + }, + "PersonalAgentDefaultSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentDefaultResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentLeavePayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "agentId", + "projectId" + ] + }, + "PersonalAgentLeaveRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-leave", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentLeavePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentLeaveResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/PersonalAgent" + }, + "participation": { + "$ref": "#/components/schemas/Participation" + } + }, + "additionalProperties": true, + "required": [ + "agent", + "participation" + ] + }, + "PersonalAgentLeaveSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentLeaveResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentRetirePayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "agentId" + ] + }, + "PersonalAgentRetireRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-retire", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentRetirePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentRetireResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/PersonalAgent" + } + }, + "additionalProperties": true, + "required": [ + "agent" + ] + }, + "PersonalAgentRetireSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentRetireResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentHistoryPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "agentId", + "projectId" + ] + }, + "PersonalAgentHistoryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-history", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentHistoryPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentHistoryResult": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "participationId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "agentId", + "participationId", + "items", + "nextOffset" + ] + }, + "PersonalAgentHistorySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentHistoryResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentTokenCreatePayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "minItems": 1 + }, + "ttlSeconds": { + "type": "integer", + "minimum": 60, + "maximum": 2592000 + } + }, + "additionalProperties": false, + "required": [ + "agentId", + "projectIds" + ] + }, + "PersonalAgentTokenCreateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-token-create", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentTokenCreatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentTokenCreateResult": { + "type": "object", + "properties": { + "token": { + "type": "string", + "pattern": "^fba_[a-f0-9-]{36}\\.[A-Za-z0-9_-]{43}$", + "readOnly": true, + "x-sensitive": true + }, + "credential": { + "$ref": "#/components/schemas/AgentCredential" + } + }, + "additionalProperties": true, + "required": [ + "token", + "credential" + ] + }, + "PersonalAgentTokenCreateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentTokenCreateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentTokenListPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 200 + } + }, + "additionalProperties": false, + "required": [ + "agentId" + ] + }, + "PersonalAgentTokenListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-token-list", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentTokenListPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentTokenListResult": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentCredential" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "credentials", + "next" + ] + }, + "PersonalAgentTokenListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentTokenListResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentTokenRevokePayload": { + "type": "object", + "properties": { + "credentialId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "credentialId" + ] + }, + "PersonalAgentTokenRevokeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-token-revoke", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentTokenRevokePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentTokenRevokeResult": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/components/schemas/AgentCredential" + } + }, + "additionalProperties": true, + "required": [ + "credential" + ] + }, + "PersonalAgentTokenRevokeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentTokenRevokeResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentDelegationSetPayload": { + "type": "object", + "properties": { + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "mode": { + "type": "string", + "enum": [ + "safe", + "watch" + ] + } + }, + "additionalProperties": false, + "required": [ + "agentId", + "projectId", + "mode" + ] + }, + "PersonalAgentDelegationSetRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-delegation-set", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentDelegationSetPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentDelegationSetResult": { + "$ref": "#/components/schemas/Delegation" + }, + "PersonalAgentDelegationSetSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentDelegationSetResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalAgentProposeTaskPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + }, + "title": { + "type": "string", + "maxLength": 300 + }, + "criteria": { + "type": "string", + "maxLength": 2000 + }, + "impact": { + "type": "string", + "maxLength": 2000 + }, + "scope": { + "type": "string", + "maxLength": 2000 + }, + "projectTaskKind": { + "type": "string", + "enum": [ + "code", + "decision", + "release" + ] + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "requestId", + "title", + "criteria", + "projectTaskKind" + ] + }, + "PersonalAgentProposeTaskRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-agent-propose-task", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalAgentProposeTaskPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalAgentProposeTaskResult": { + "type": "object", + "properties": { + "proposal": { + "$ref": "#/components/schemas/Proposal" + }, + "publishRequired": { + "type": "boolean" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "proposal" + ] + }, + "PersonalAgentProposeTaskSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalAgentProposeTaskResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectsPayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "ProjectsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "projects", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectsPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectsResult": { + "type": "object", + "properties": { + "projects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + } + } + }, + "additionalProperties": true, + "required": [ + "projects" + ] + }, + "ProjectsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectsResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectCreatePayload": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 120 + }, + "description": { + "type": "string", + "maxLength": 2000 + }, + "goal": { + "type": "string", + "maxLength": 4000 + }, + "scope": { + "type": "string", + "maxLength": 4000 + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "repositories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "defaultBranch": { + "type": "string", + "maxLength": 120 + } + }, + "additionalProperties": false, + "required": [ + "repository" + ] + } + }, + "defaultBranch": { + "type": "string", + "maxLength": 120 + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ProjectCreateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-create", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectCreatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectCreateResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + } + }, + "additionalProperties": true, + "required": [ + "project" + ] + }, + "ProjectCreateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectCreateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectReadPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectReadRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-read", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectReadPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectReadResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + }, + "canManage": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "project", + "canManage" + ] + }, + "ProjectReadSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectReadResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectDetailPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "view": { + "type": "string", + "enum": [ + "summary" + ] + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectDetailRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-detail", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectDetailPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectDetailResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskRecord" + } + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "runs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "unresolved": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "project", + "tasks" + ] + }, + "ProjectDetailSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectDetailResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectBoardPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "timeZone": { + "type": "string", + "maxLength": 64 + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectBoardRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-board", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectBoardPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectBoardResult": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "done": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "decisions": { + "type": "object", + "properties": { + "dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "files" + ] + }, + "meetings": { + "type": "object", + "properties": { + "decided": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "decided", + "pending" + ] + }, + "waiting": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "inflight": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "blocked": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "counts": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "tasks", + "done", + "decisions", + "meetings", + "waiting", + "inflight", + "blocked", + "counts", + "metrics" + ] + }, + "ProjectBoardSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectBoardResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRepositoriesPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectRepositoriesRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-repositories", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRepositoriesPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRepositoriesResult": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryAssociation" + } + } + }, + "additionalProperties": true, + "required": [ + "repositories" + ] + }, + "ProjectRepositoriesSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRepositoriesResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRepositoryLinkPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "defaultBranch": { + "type": "string", + "maxLength": 120 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "repository" + ] + }, + "ProjectRepositoryLinkRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-repository-link", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRepositoryLinkPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRepositoryLinkResult": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryAssociation" + } + } + }, + "additionalProperties": true, + "required": [ + "repositories" + ] + }, + "ProjectRepositoryLinkSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRepositoryLinkResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRepositoryUnlinkPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "defaultBranch": { + "type": "string", + "maxLength": 120 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "repository" + ] + }, + "ProjectRepositoryUnlinkRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-repository-unlink", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRepositoryUnlinkPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRepositoryUnlinkResult": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryAssociation" + } + } + }, + "additionalProperties": true, + "required": [ + "repositories" + ] + }, + "ProjectRepositoryUnlinkSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRepositoryUnlinkResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectMembersPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectMembersRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-members", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectMembersPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectMembersResult": { + "type": "object", + "properties": { + "members": { + "type": "array", + "items": { + "type": "object", + "properties": { + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "displayName": { + "type": "string" + }, + "role": { + "type": "string", + "enum": [ + "owner", + "maintainer", + "member" + ] + } + }, + "additionalProperties": true, + "required": [ + "memberId", + "role" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "members" + ] + }, + "ProjectMembersSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectMembersResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectInvitePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectInviteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-invite", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectInvitePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectInviteResult": { + "type": "object", + "properties": { + "token": { + "type": "string", + "readOnly": true, + "x-sensitive": true + }, + "expiresAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "token", + "expiresAt" + ] + }, + "ProjectInviteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectInviteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectJoinPayload": { + "type": "object", + "properties": { + "token": { + "type": "string", + "writeOnly": true + } + }, + "additionalProperties": false, + "required": [ + "token" + ] + }, + "ProjectJoinRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-join", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectJoinPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectJoinResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + } + }, + "additionalProperties": true, + "required": [ + "project" + ] + }, + "ProjectJoinSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectJoinResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRolePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "enum": [ + "maintainer", + "member" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "memberId", + "role" + ] + }, + "ProjectRoleRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-role", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRolePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoleResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + }, + "changed": { + "type": "boolean" + }, + "roles": { + "$ref": "#/components/schemas/JsonValue" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "project", + "changed" + ] + }, + "ProjectRoleSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoleResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectMemberRemovePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id", + "memberId" + ] + }, + "ProjectMemberRemoveRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-member-remove", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectMemberRemovePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectMemberRemoveResult": { + "type": "object", + "properties": { + "removed": { + "type": "boolean" + }, + "activeRuns": { + "type": "integer", + "minimum": 0 + }, + "unfinishedTasks": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "removed", + "activeRuns", + "unfinishedTasks" + ] + }, + "ProjectMemberRemoveSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectMemberRemoveResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectLeavePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectLeaveRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-leave", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectLeavePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectLeaveResult": { + "type": "object", + "properties": { + "removed": { + "type": "boolean" + }, + "activeRuns": { + "type": "integer", + "minimum": 0 + }, + "unfinishedTasks": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "removed", + "activeRuns", + "unfinishedTasks" + ] + }, + "ProjectLeaveSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectLeaveResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectQuotaPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "maxConcurrent": { + "type": "integer", + "minimum": 1, + "maximum": 32 + } + }, + "additionalProperties": false, + "required": [ + "id", + "maxConcurrent" + ] + }, + "ProjectQuotaRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-quota", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectQuotaPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectQuotaResult": { + "type": "object", + "properties": { + "quota": { + "type": "object", + "properties": { + "maxConcurrent": { + "type": "integer", + "minimum": 1, + "maximum": 32 + } + }, + "additionalProperties": false, + "required": [ + "maxConcurrent" + ] + } + }, + "additionalProperties": true, + "required": [ + "quota" + ] + }, + "ProjectQuotaSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectQuotaResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectArchivePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectArchiveRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-archive", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectArchivePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectArchiveResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + } + }, + "additionalProperties": true, + "required": [ + "project" + ] + }, + "ProjectArchiveSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectArchiveResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectDeletePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ProjectDeleteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-delete", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectDeletePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectDeleteResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + } + }, + "additionalProperties": true, + "required": [ + "project" + ] + }, + "ProjectDeleteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectDeleteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectCloseRequestPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "reason": { + "type": "string", + "maxLength": 4000 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "reason" + ] + }, + "ProjectCloseRequestRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-close-request", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectCloseRequestPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectCloseRequestResult": { + "type": "object", + "properties": { + "request": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestedBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "personalAgentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "reason": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "reason" + ] + } + }, + "additionalProperties": true, + "required": [ + "request" + ] + }, + "ProjectCloseRequestSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectCloseRequestResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectClosePreparePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "finalRecord": { + "type": "string", + "maxLength": 12000 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "finalRecord" + ] + }, + "ProjectClosePrepareRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-close-prepare", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectClosePreparePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectClosePrepareResult": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "confirmationToken": { + "type": "string", + "readOnly": true, + "x-sensitive": true + }, + "expiresAt": { + "type": "integer", + "minimum": 0 + }, + "finalRecord": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "projectId", + "confirmationToken", + "expiresAt", + "finalRecord" + ] + }, + "ProjectClosePrepareSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectClosePrepareResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectCloseConfirmPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "confirmationToken": { + "type": "string", + "writeOnly": true + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "confirmationToken" + ] + }, + "ProjectCloseConfirmRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-close-confirm", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectCloseConfirmPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectCloseConfirmResult": { + "type": "object", + "properties": { + "project": { + "$ref": "#/components/schemas/Project" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "project" + ] + }, + "ProjectCloseConfirmSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectCloseConfirmResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "WorkbenchStatePayload": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "WorkbenchStateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "workbench-state", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/WorkbenchStatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "WorkbenchStateResult": { + "type": "object", + "properties": { + "demoMode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "self": { + "type": "object", + "properties": { + "memberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "displayName": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "memberId", + "displayName" + ] + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + } + }, + "models": { + "$ref": "#/components/schemas/JsonValue" + }, + "repositories": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + } + } + }, + "additionalProperties": true, + "required": [ + "demoMode", + "self", + "projects", + "models", + "repositories" + ] + }, + "WorkbenchStateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/WorkbenchStateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectResourcesPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "view": { + "type": "string", + "enum": [ + "summary" + ] + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectResourcesRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-resources", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectResourcesPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectResourcesResult": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "quota": { + "type": "object", + "properties": { + "maxConcurrent": { + "type": "integer", + "minimum": 1, + "maximum": 32 + } + }, + "additionalProperties": true, + "required": [ + "maxConcurrent" + ] + }, + "activeSlots": { + "type": "integer", + "minimum": 0 + }, + "repository": { + "$ref": "#/components/schemas/JsonValue" + }, + "queue": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "status": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "id", + "taskId", + "status" + ] + } + }, + "taskExecution": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "metrics": { + "$ref": "#/components/schemas/JsonValue" + }, + "workers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "harnessWorkers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "executionResources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Resource" + } + }, + "resourceLeases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "chief": { + "type": "object", + "properties": { + "policy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "authorityMemberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "scheduleId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "enabled" + ] + }, + "template": { + "$ref": "#/components/schemas/JsonValue" + }, + "schedule": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/JsonValue" + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "enabled", + "status", + "config", + "deliveries" + ] + }, + { + "type": "null" + } + ] + }, + "runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "status" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "policy", + "template", + "schedule", + "runs" + ] + }, + "taskViews": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskView" + } + }, + "host": { + "$ref": "#/components/schemas/JsonValue" + }, + "platformInstance": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "projectId", + "quota", + "activeSlots", + "repository", + "queue", + "taskExecution", + "metrics" + ] + }, + "ProjectResourcesSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectResourcesResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentsPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "view": { + "type": "string", + "enum": [ + "summary" + ] + }, + "memoryTopic": { + "type": "string" + }, + "roleMemoryId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "roleMemoryOffset": { + "type": "integer", + "minimum": 0 + }, + "roleMemoryLimit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "versionOffset": { + "type": "integer", + "minimum": 0 + }, + "versionLimit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "privateMemoryOffset": { + "type": "integer", + "minimum": 0 + }, + "privateMemoryLimit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "memoryOffset": { + "type": "integer", + "minimum": 0 + }, + "memoryLimit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectAgentsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agents", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentsPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentsResult": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "public": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "visibility": { + "const": "public", + "type": "string" + } + }, + "additionalProperties": true + }, + "mine": { + "$ref": "#/components/schemas/AgentCarrier" + }, + "definitions": { + "$ref": "#/components/schemas/JsonValue" + }, + "roleMemory": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "privateMemory": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "knowledge": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "proposals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Proposal" + } + }, + "delegation": { + "$ref": "#/components/schemas/JsonValue" + }, + "chiefMemory": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true + }, + "ProjectAgentsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentsResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentMessagePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "text": { + "type": "string", + "maxLength": 8000 + }, + "publicationApproved": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "text" + ] + }, + "ProjectAgentMessageRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-message", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentMessagePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentMessageResult": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/AgentCarrier" + }, + "queued": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "agent", + "queued" + ] + }, + "ProjectAgentMessageSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentMessageResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentHistoryPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "cursor": { + "type": "string", + "maxLength": 2048 + }, + "messageIndex": { + "type": "integer", + "minimum": 0 + }, + "textOffset": { + "type": "integer", + "minimum": 0 + }, + "textLimit": { + "type": "integer", + "minimum": 1, + "maximum": 4000 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectAgentHistoryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-history", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentHistoryPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentHistoryResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "agent": { + "$ref": "#/components/schemas/AgentCarrier" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "busy": { + "type": "boolean" + }, + "live": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "total": { + "type": "integer", + "minimum": 0 + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "nextCursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "previousCursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "bounded": { + "type": "boolean" + }, + "retained": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "agent", + "messages", + "busy" + ] + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "totalChars": { + "type": "integer", + "minimum": 0 + }, + "messageIndex": { + "type": "integer", + "minimum": 0 + }, + "cursor": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "text", + "sha256" + ] + } + ] + }, + "ProjectAgentHistorySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentHistoryResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentMemoryWritePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 4000 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "text" + ] + }, + "ProjectAgentMemoryWriteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-memory-write", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentMemoryWritePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentMemoryWriteResult": { + "type": "object", + "properties": { + "saved": { + "type": "boolean" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "saved", + "id" + ] + }, + "ProjectAgentMemoryWriteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentMemoryWriteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoleMemoryWritePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "memoryId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "factKey": { + "type": "string", + "pattern": "^[A-Za-z0-9_./:-]{1,100}$" + }, + "text": { + "type": "string", + "maxLength": 4000 + }, + "source": { + "type": "object", + "properties": { + "kind": { + "const": "human", + "type": "string" + }, + "reference": { + "type": "string", + "maxLength": 300 + } + }, + "additionalProperties": false, + "required": [ + "kind", + "reference" + ] + }, + "classification": { + "type": "string", + "enum": [ + "unclassified", + "fact", + "inference", + "unresolved", + "conflict" + ] + }, + "expectedRevision": { + "type": "integer", + "minimum": 0 + }, + "status": { + "type": "string", + "enum": [ + "active", + "archived" + ] + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "role", + "source" + ] + }, + "ProjectRoleMemoryWriteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-role-memory-write", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoleMemoryWritePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoleMemoryWriteResult": { + "type": "object", + "properties": { + "memory": { + "$ref": "#/components/schemas/JsonValue" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "memory", + "already" + ] + }, + "ProjectRoleMemoryWriteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoleMemoryWriteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentDefinitionPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "name": { + "type": "string", + "maxLength": 120 + }, + "instructions": { + "type": "string", + "maxLength": 12000 + }, + "model": { + "type": "string", + "maxLength": 120 + }, + "skills": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 20 + }, + "memoryRefs": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "maxItems": 20 + }, + "execution": { + "$ref": "#/components/schemas/RoleExecution" + }, + "policyRole": { + "type": "string", + "enum": [ + "chief", + "developer", + "tester", + "reviewer" + ] + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 0 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "role" + ] + }, + "ProjectAgentDefinitionRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-definition", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentDefinitionPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentDefinitionResult": { + "type": "object", + "properties": { + "definitions": { + "type": "object", + "properties": { + "revision": { + "type": "integer", + "minimum": 0 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleDefinition" + } + } + }, + "additionalProperties": true, + "required": [ + "roles" + ] + } + }, + "additionalProperties": true, + "required": [ + "definitions" + ] + }, + "ProjectAgentDefinitionSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentDefinitionResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectKnowledgeWritePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 4000 + }, + "kind": { + "type": "string", + "enum": [ + "fact", + "decision" + ] + }, + "supersedes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "id", + "sha256" + ] + }, + "maxItems": 512 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "text" + ] + }, + "ProjectKnowledgeWriteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-knowledge-write", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectKnowledgeWritePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectKnowledgeWriteResult": { + "type": "object", + "properties": { + "saved": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "saved" + ] + }, + "ProjectKnowledgeWriteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectKnowledgeWriteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectChiefQuestionPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 8000 + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "text", + "requestId" + ] + }, + "ProjectChiefQuestionRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-chief-question", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectChiefQuestionPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectChiefQuestionResult": { + "type": "object", + "properties": { + "handoff": { + "$ref": "#/components/schemas/JsonValue" + }, + "consultation": { + "$ref": "#/components/schemas/Consultation" + }, + "queued": { + "type": "boolean" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "ProjectChiefQuestionSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectChiefQuestionResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentStopPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "roomId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectAgentStopRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-stop", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentStopPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentStopResult": { + "type": "object", + "properties": { + "stopped": { + "type": "boolean" + }, + "stopping": { + "type": "boolean" + }, + "released": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "ProjectAgentStopSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentStopResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoomsPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectRoomsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-rooms", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoomsPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoomsResult": { + "type": "object", + "properties": { + "rooms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + }, + "additionalProperties": true, + "required": [ + "rooms" + ] + }, + "ProjectRoomsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoomsResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoomReadPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "roomId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "roomId" + ] + }, + "ProjectRoomReadRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-room-read", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoomReadPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoomReadResult": { + "$ref": "#/components/schemas/Room" + }, + "ProjectRoomReadSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoomReadResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoomCreatePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "minItems": 1 + }, + "memberIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "name", + "roles", + "memberIds" + ] + }, + "ProjectRoomCreateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-room-create", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoomCreatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoomCreateResult": { + "$ref": "#/components/schemas/Room" + }, + "ProjectRoomCreateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoomCreateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoomMessagePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "roomId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 8000 + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "attachmentIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "maxItems": 10 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "roomId", + "text" + ] + }, + "ProjectRoomMessageRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-room-message", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoomMessagePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoomMessageResult": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "messageId", + "deliveries" + ] + }, + "ProjectRoomMessageSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoomMessageResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoomAttachmentPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "roomId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attachmentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string", + "maxLength": 100 + }, + "text": { + "type": "string", + "maxLength": 32000 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "roomId" + ], + "anyOf": [ + { + "required": [ + "attachmentId" + ] + }, + { + "required": [ + "name", + "text" + ] + } + ] + }, + "ProjectRoomAttachmentRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-room-attachment", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoomAttachmentPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoomAttachmentResult": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string" + }, + "text": { + "type": "string" + }, + "mediaType": { + "type": "string" + }, + "createdBy": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "at": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id", + "name" + ] + }, + "ProjectRoomAttachmentSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoomAttachmentResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoomStopPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "roomId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "roomId" + ] + }, + "ProjectRoomStopRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-room-stop", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoomStopPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoomStopResult": { + "type": "object", + "properties": { + "stopped": { + "type": "boolean" + }, + "stopping": { + "type": "boolean" + }, + "released": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "ProjectRoomStopSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoomStopResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectResourceEnvironmentCheckPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "resourceId" + ] + }, + "ProjectResourceEnvironmentCheckRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-resource-environment-check", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectResourceEnvironmentCheckPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectResourceEnvironmentCheckResult": { + "$ref": "#/components/schemas/HealthCheck" + }, + "ProjectResourceEnvironmentCheckSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectResourceEnvironmentCheckResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRuntimeCheckPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "harness": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "resourceId", + "harness" + ] + }, + "ProjectRuntimeCheckRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-runtime-check", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRuntimeCheckPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRuntimeCheckResult": { + "$ref": "#/components/schemas/HealthCheck" + }, + "ProjectRuntimeCheckSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRuntimeCheckResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTerminalOpenPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "resourceId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "harness": { + "type": "string", + "enum": [ + "flybot", + "codex", + "claude-agent" + ] + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "resourceId", + "harness" + ] + }, + "ProjectTerminalOpenRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-terminal-open", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTerminalOpenPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTerminalOpenResult": { + "$ref": "#/components/schemas/Terminal" + }, + "ProjectTerminalOpenSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTerminalOpenResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTerminalPollPayload": { + "type": "object", + "properties": { + "terminalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "since": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": false, + "required": [ + "terminalId" + ] + }, + "ProjectTerminalPollRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-terminal-poll", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTerminalPollPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTerminalPollResult": { + "$ref": "#/components/schemas/Terminal" + }, + "ProjectTerminalPollSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTerminalPollResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTerminalInputPayload": { + "type": "object", + "properties": { + "terminalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 8192 + } + }, + "additionalProperties": false, + "required": [ + "terminalId", + "text" + ] + }, + "ProjectTerminalInputRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-terminal-input", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTerminalInputPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTerminalInputResult": { + "type": "object", + "properties": { + "sent": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "sent" + ] + }, + "ProjectTerminalInputSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTerminalInputResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTerminalResizePayload": { + "type": "object", + "properties": { + "terminalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "rows": { + "type": "integer", + "minimum": 8, + "maximum": 100 + }, + "cols": { + "type": "integer", + "minimum": 20, + "maximum": 240 + } + }, + "additionalProperties": false, + "required": [ + "terminalId" + ] + }, + "ProjectTerminalResizeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-terminal-resize", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTerminalResizePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTerminalResizeResult": { + "type": "object", + "properties": { + "resized": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "resized" + ] + }, + "ProjectTerminalResizeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTerminalResizeResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTerminalClosePayload": { + "type": "object", + "properties": { + "terminalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "terminalId" + ] + }, + "ProjectTerminalCloseRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-terminal-close", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTerminalClosePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTerminalCloseResult": { + "$ref": "#/components/schemas/Terminal" + }, + "ProjectTerminalCloseSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTerminalCloseResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "TaskUpdatePayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "title": { + "type": "string", + "maxLength": 300 + }, + "criteria": { + "type": "string", + "maxLength": 2000 + }, + "impact": { + "type": "string", + "maxLength": 2000 + }, + "scope": { + "type": "string", + "maxLength": 2000 + }, + "priority": { + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + }, + "progress": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "note": { + "type": "string" + }, + "column": { + "type": "string", + "enum": [ + "not-started", + "in-progress", + "done" + ] + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "TaskUpdateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "task-update", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/TaskUpdatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "TaskUpdateResult": { + "$ref": "#/components/schemas/TaskRecord" + }, + "TaskUpdateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/TaskUpdateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "TaskCancelPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "TaskCancelRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "task-cancel", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/TaskCancelPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "TaskCancelResult": { + "$ref": "#/components/schemas/TaskRecord" + }, + "TaskCancelSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/TaskCancelResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "TaskAnswerInputPayload": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "questionId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "answer": { + "type": "string", + "maxLength": 2000 + } + }, + "additionalProperties": false, + "required": [ + "id", + "questionId", + "answer" + ] + }, + "TaskAnswerInputRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "task-answer-input", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/TaskAnswerInputPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "TaskAnswerInputResult": { + "$ref": "#/components/schemas/TaskRecord" + }, + "TaskAnswerInputSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/TaskAnswerInputResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectCredentialStatusPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectCredentialStatusRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-credential-status", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectCredentialStatusPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectCredentialStatusResult": { + "type": "object", + "properties": { + "personal": { + "type": "object", + "properties": { + "configured": { + "type": "boolean" + }, + "login": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "configured", + "login" + ] + }, + "automation": { + "type": "object", + "properties": { + "configured": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "configured" + ] + } + }, + "additionalProperties": true, + "required": [ + "personal", + "automation" + ] + }, + "ProjectCredentialStatusSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectCredentialStatusResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectGithubReadPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "type": "string", + "enum": [ + "issues", + "pulls", + "pull", + "reviews", + "checks", + "thread-events" + ] + }, + "number": { + "type": "integer", + "minimum": 1 + }, + "scope": { + "type": "string", + "enum": [ + "personal", + "project" + ] + }, + "threadKind": { + "type": "string", + "enum": [ + "issue", + "pull" + ] + }, + "headSha": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + "pages": { + "type": "object", + "properties": { + "comments": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + }, + "reviews": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + }, + "inline": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + }, + "checks": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ], + "allOf": [ + { + "if": { + "properties": { + "operation": { + "type": "string", + "enum": [ + "pull", + "reviews", + "checks", + "thread-events" + ] + } + }, + "required": [ + "operation" + ] + }, + "then": { + "required": [ + "number" + ] + } + }, + { + "if": { + "properties": { + "operation": { + "const": "thread-events", + "type": "string" + } + }, + "required": [ + "operation" + ] + }, + "then": { + "required": [ + "threadKind" + ] + } + } + ] + }, + "ProjectGithubReadRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-github-read", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectGithubReadPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectGithubReadResult": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + "operation": { + "type": "string" + }, + "scope": { + "type": "string", + "enum": [ + "personal", + "project" + ] + }, + "executorLogin": { + "type": "string" + }, + "at": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "const": 20, + "type": "number" + }, + "pagination": { + "const": "bounded-first-page", + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "repository", + "operation", + "scope", + "executorLogin", + "at", + "limit", + "pagination", + "data" + ] + }, + "ProjectGithubReadSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectGithubReadResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceListPayload": { + "type": "object", + "properties": { + "operation": { + "const": "list", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "operation" + ] + }, + "PersonalSpaceListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceListPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceListResult": { + "type": "object", + "properties": { + "bots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "rooms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "mainBotIds": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + } + }, + "additionalProperties": true, + "required": [ + "bots", + "rooms", + "mainBotIds" + ] + }, + "PersonalSpaceListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceListResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceReadPayload": { + "type": "object", + "properties": { + "operation": { + "const": "read", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "partId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "beforeSeq": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id" + ] + }, + "PersonalSpaceReadRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceReadPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceReadResult": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "hasMore": { + "type": "boolean" + }, + "beforeSeq": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "busy": { + "type": "boolean" + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "live": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "question": { + "anyOf": [ + { + "$ref": "#/components/schemas/JsonValue" + }, + { + "type": "null" + } + ] + }, + "approvals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "groupWork": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "messages", + "hasMore" + ] + }, + "PersonalSpaceReadSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceReadResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceSendPayload": { + "type": "object", + "properties": { + "operation": { + "const": "send", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 120 + }, + "mediaType": { + "type": "string", + "enum": [ + "image/png", + "image/jpeg", + "image/webp", + "image/gif" + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64", + "maxLength": 349528, + "x-maxDecodedBytes": 262144 + } + }, + "additionalProperties": false, + "required": [ + "mediaType", + "data" + ] + }, + "maxItems": 4 + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 120 + }, + "mediaType": { + "type": "string", + "maxLength": 120 + }, + "data": { + "type": "string", + "contentEncoding": "base64", + "maxLength": 349528, + "x-maxDecodedBytes": 262144 + } + }, + "additionalProperties": false, + "required": [ + "name", + "mediaType", + "data" + ] + }, + "maxItems": 4 + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id", + "text" + ] + }, + "PersonalSpaceSendRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceSendPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceSendResult": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "accepted": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "accepted" + ] + } + ] + }, + "PersonalSpaceSendSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceSendResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceStopPayload": { + "type": "object", + "properties": { + "operation": { + "const": "stop", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id" + ] + }, + "PersonalSpaceStopRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceStopPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceStopResult": { + "type": "object", + "properties": { + "stopRequested": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "stopRequested" + ] + }, + "PersonalSpaceStopSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceStopResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceMemberStopPayload": { + "type": "object", + "properties": { + "operation": { + "const": "member-stop", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id", + "botId" + ] + }, + "PersonalSpaceMemberStopRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceMemberStopPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceMemberStopResult": { + "type": "boolean" + }, + "PersonalSpaceMemberStopSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceMemberStopResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceAnswerPayload": { + "type": "object", + "properties": { + "operation": { + "const": "answer", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "questionId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "answer": { + "type": "object", + "properties": { + "selected": { + "type": "array", + "items": { + "type": "string" + } + }, + "custom": { + "type": "string" + } + }, + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "selected" + ] + }, + { + "required": [ + "custom" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id", + "questionId", + "answer" + ] + }, + "PersonalSpaceAnswerRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceAnswerPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceAnswerResult": { + "type": "boolean" + }, + "PersonalSpaceAnswerSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceAnswerResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceDismissPayload": { + "type": "object", + "properties": { + "operation": { + "const": "dismiss", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "questionId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id", + "questionId" + ] + }, + "PersonalSpaceDismissRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceDismissPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceDismissResult": { + "type": "boolean" + }, + "PersonalSpaceDismissSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceDismissResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceApprovalPayload": { + "type": "object", + "properties": { + "operation": { + "const": "approval", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "approvalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "choice": { + "type": "string", + "enum": [ + "allow", + "reject" + ] + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id", + "approvalId", + "choice" + ] + }, + "PersonalSpaceApprovalRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceApprovalPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceApprovalResult": { + "type": "boolean" + }, + "PersonalSpaceApprovalSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceApprovalResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceMemoryPayload": { + "type": "object", + "properties": { + "operation": { + "const": "memory", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id" + ] + }, + "PersonalSpaceMemoryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceMemoryPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceMemoryResult": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "entries" + ] + }, + "PersonalSpaceMemorySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceMemoryResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "PersonalSpaceAttachmentReadPayload": { + "type": "object", + "properties": { + "operation": { + "const": "attachment-read", + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "partId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "seq": { + "type": "integer", + "minimum": 0 + }, + "attachmentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "operation", + "id", + "seq", + "attachmentId" + ] + }, + "PersonalSpaceAttachmentReadRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "personal-space", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/PersonalSpaceAttachmentReadPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "PersonalSpaceAttachmentReadResult": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string" + }, + "mediaType": { + "type": "string" + }, + "bytes": { + "type": "integer", + "minimum": 0, + "maximum": 524288 + }, + "kind": { + "type": "string", + "enum": [ + "image", + "file" + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64" + } + }, + "additionalProperties": true, + "required": [ + "id", + "data" + ] + }, + "PersonalSpaceAttachmentReadSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/PersonalSpaceAttachmentReadResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowStatePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "state", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation" + ] + }, + "ProjectWorkflowStateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowStatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowStateResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowStateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowStateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowTemplatesPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "templates", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation" + ] + }, + "ProjectWorkflowTemplatesRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowTemplatesPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowTemplatesResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowTemplatesSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowTemplatesResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowCreatePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "create", + "type": "string" + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "description": { + "type": "string", + "maxLength": 400 + }, + "template": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "trigger": { + "type": "string", + "enum": [ + "manual", + "schedule" + ] + }, + "scheduleLabel": { + "type": "string", + "maxLength": 40 + }, + "triggers": { + "type": "array", + "items": { + "type": "string", + "maxLength": 40 + }, + "maxItems": 8 + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "prompt": { + "type": "string", + "maxLength": 4000 + }, + "role": { + "type": "string" + }, + "model": { + "type": "string", + "maxLength": 80 + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 0 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "inputs": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "maxLength": 40 + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 40 + }, + "type": { + "type": "string", + "maxLength": 40 + }, + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + } + ] + }, + "maxItems": 8 + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "maxLength": 40 + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 40 + }, + "type": { + "type": "string", + "maxLength": 40 + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + } + ] + }, + "maxItems": 8 + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "prompt" + ] + } + }, + "edges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "to": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "when": { + "type": "object", + "properties": { + "output": { + "type": "string", + "maxLength": 40 + }, + "eq": { + "type": "string", + "maxLength": 200 + }, + "else": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "loop": { + "type": "boolean" + }, + "max": { + "type": "integer", + "minimum": 1, + "maximum": 8 + }, + "until": { + "type": "object", + "properties": { + "output": { + "type": "string", + "maxLength": 40 + }, + "eq": { + "type": "string", + "maxLength": 200 + }, + "else": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "onFail": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "from", + "to" + ] + } + }, + "layers": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + } + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation" + ] + }, + "ProjectWorkflowCreateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowCreatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowCreateResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowCreateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowCreateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowGraphPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "graph", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "prompt": { + "type": "string", + "maxLength": 4000 + }, + "role": { + "type": "string" + }, + "model": { + "type": "string", + "maxLength": 80 + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 0 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "inputs": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "maxLength": 40 + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 40 + }, + "type": { + "type": "string", + "maxLength": 40 + }, + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + } + ] + }, + "maxItems": 8 + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "maxLength": 40 + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 40 + }, + "type": { + "type": "string", + "maxLength": 40 + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + } + ] + }, + "maxItems": 8 + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "prompt" + ] + } + }, + "edges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "to": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "when": { + "type": "object", + "properties": { + "output": { + "type": "string", + "maxLength": 40 + }, + "eq": { + "type": "string", + "maxLength": 200 + }, + "else": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "loop": { + "type": "boolean" + }, + "max": { + "type": "integer", + "minimum": 1, + "maximum": 8 + }, + "until": { + "type": "object", + "properties": { + "output": { + "type": "string", + "maxLength": 40 + }, + "eq": { + "type": "string", + "maxLength": 200 + }, + "else": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "onFail": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "from", + "to" + ] + } + }, + "layers": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + } + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId", + "nodes" + ] + }, + "ProjectWorkflowGraphRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowGraphPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowGraphResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowGraphSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowGraphResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowConcurrencyPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "concurrency", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "maxConcurrent": { + "type": "integer", + "minimum": 1, + "maximum": 8 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId", + "maxConcurrent" + ] + }, + "ProjectWorkflowConcurrencyRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowConcurrencyPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowConcurrencyResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowConcurrencySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowConcurrencyResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowSetModelPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "set-model", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "model": { + "anyOf": [ + { + "type": "string", + "maxLength": 80 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId", + "model" + ] + }, + "ProjectWorkflowSetModelRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowSetModelPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowSetModelResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowSetModelSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowSetModelResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowStepTimeoutPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "step-timeout", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "stepTimeoutMinutes": { + "anyOf": [ + { + "type": "integer", + "minimum": 1, + "maximum": 120 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId", + "stepTimeoutMinutes" + ] + }, + "ProjectWorkflowStepTimeoutRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowStepTimeoutPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowStepTimeoutResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowStepTimeoutSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowStepTimeoutResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowAssignPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "assign", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId", + "taskId" + ] + }, + "ProjectWorkflowAssignRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowAssignPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowAssignResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowAssignSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowAssignResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowPausePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "pause", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "runId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId" + ] + }, + "ProjectWorkflowPauseRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowPausePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowPauseResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowPauseSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowPauseResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowResumePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "resume", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "runId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId" + ] + }, + "ProjectWorkflowResumeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowResumePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowResumeResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowResumeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowResumeResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowResetPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "reset", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "runId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId" + ] + }, + "ProjectWorkflowResetRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowResetPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowResetResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowResetSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowResetResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectWorkflowDeletePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "const": "delete", + "type": "string" + }, + "workflowId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "runId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "operation", + "workflowId" + ] + }, + "ProjectWorkflowDeleteRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-workflow", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectWorkflowDeletePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectWorkflowDeleteResult": { + "type": "object", + "properties": { + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "ok": { + "type": "boolean" + }, + "code": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "workflows" + ] + }, + "ProjectWorkflowDeleteSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectWorkflowDeleteResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectConsultationReplyPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "consultationId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 4000 + }, + "publish": { + "type": "boolean" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "consultationId", + "text", + "requestId" + ] + }, + "ProjectConsultationReplyRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-consultation-reply", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectConsultationReplyPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectConsultationReplyResult": { + "type": "object", + "properties": { + "consultation": { + "$ref": "#/components/schemas/Consultation" + }, + "replyId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "published": { + "type": "boolean" + }, + "requiresUserApproval": { + "type": "boolean" + }, + "input": { + "$ref": "#/components/schemas/Input" + } + }, + "additionalProperties": true, + "required": [ + "consultation" + ] + }, + "ProjectConsultationReplySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectConsultationReplyResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectConsultationAskPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "text": { + "type": "string", + "maxLength": 8000 + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "text", + "requestId" + ] + }, + "ProjectConsultationAskRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-consultation-ask", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectConsultationAskPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectConsultationAskResult": { + "type": "object", + "properties": { + "handoff": { + "$ref": "#/components/schemas/JsonValue" + }, + "consultation": { + "$ref": "#/components/schemas/Consultation" + }, + "queued": { + "type": "boolean" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "ProjectConsultationAskSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectConsultationAskResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectConsultationGetPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "consultationId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "consultationId" + ] + }, + "ProjectConsultationGetRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-consultation-get", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectConsultationGetPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectConsultationGetResult": { + "type": "object", + "properties": { + "consultation": { + "$ref": "#/components/schemas/Consultation" + } + }, + "additionalProperties": true, + "required": [ + "consultation" + ] + }, + "ProjectConsultationGetSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectConsultationGetResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectConsultationListPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "agentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectConsultationListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-consultation-list", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectConsultationListPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectConsultationListResult": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Consultation" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "items", + "next" + ] + }, + "ProjectConsultationListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectConsultationListResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRolesPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 16000 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectRolesRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-roles", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRolesPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRolesResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleDefinition" + } + } + }, + "additionalProperties": true, + "required": [ + "projectId", + "revision", + "roles" + ] + }, + { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "text": { + "type": "string" + }, + "sha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "nextOffset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "text", + "sha256" + ] + } + ] + }, + "ProjectRolesSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRolesResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoleProposalsPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "proposalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectRoleProposalsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-role-proposals", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoleProposalsPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoleProposalsResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "proposals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleProposal" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "proposals", + "next" + ] + }, + { + "type": "object", + "properties": { + "proposal": { + "$ref": "#/components/schemas/RoleProposal" + }, + "definition": { + "anyOf": [ + { + "$ref": "#/components/schemas/RoleDefinition" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "proposal", + "definition" + ] + } + ] + }, + "ProjectRoleProposalsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoleProposalsResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectRoleDecisionPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "proposalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + }, + "decision": { + "type": "string", + "enum": [ + "approve", + "reject" + ] + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "proposalId", + "expectedSha256", + "decision", + "requestId" + ] + }, + "ProjectRoleDecisionRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-role-decision", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectRoleDecisionPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectRoleDecisionResult": { + "type": "object", + "properties": { + "proposal": { + "$ref": "#/components/schemas/RoleProposal" + }, + "definitions": { + "$ref": "#/components/schemas/JsonValue" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "proposal", + "definitions", + "already" + ] + }, + "ProjectRoleDecisionSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectRoleDecisionResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectHandoffGetPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "handoffId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "taskId", + "handoffId" + ] + }, + "ProjectHandoffGetRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-handoff-get", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectHandoffGetPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectHandoffGetResult": { + "type": "object", + "properties": { + "handoff": { + "$ref": "#/components/schemas/Handoff" + } + }, + "additionalProperties": true, + "required": [ + "handoff" + ] + }, + "ProjectHandoffGetSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectHandoffGetResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectHandoffListPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "after": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "taskId" + ] + }, + "ProjectHandoffListRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-handoff-list", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectHandoffListPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectHandoffListResult": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Handoff" + } + }, + "next": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "items", + "next" + ] + }, + "ProjectHandoffListSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectHandoffListResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "TaskCreatePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "title": { + "type": "string", + "maxLength": 300 + }, + "criteria": { + "type": "string", + "maxLength": 2000 + }, + "impact": { + "type": "string", + "maxLength": 2000 + }, + "scope": { + "type": "string", + "maxLength": 2000 + }, + "projectTaskKind": { + "type": "string", + "enum": [ + "code", + "decision", + "release" + ] + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + }, + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "priority": { + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + }, + "note": { + "type": "string" + }, + "target": { + "type": "object", + "properties": { + "owner": { + "type": "string" + }, + "repo": { + "type": "string" + }, + "number": { + "type": "integer", + "minimum": 1 + }, + "href": { + "type": "string" + } + }, + "additionalProperties": false + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "title", + "requestId" + ] + }, + "TaskCreateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "task-create", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/TaskCreatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "TaskCreateResult": { + "$ref": "#/components/schemas/TaskRecord" + }, + "TaskCreateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/TaskCreateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTaskRunPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "targetRole": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "repository": { + "anyOf": [ + { + "type": "string", + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", + "maxLength": 200 + }, + { + "type": "null" + } + ] + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "taskId", + "requestId" + ] + }, + "ProjectTaskRunRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-task-run", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTaskRunPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTaskRunResult": { + "anyOf": [ + { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueEntry" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "queue" + ] + }, + { + "type": "object", + "properties": { + "admission": { + "$ref": "#/components/schemas/JsonValue" + }, + "waitingFor": { + "const": "chief", + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "admission", + "waitingFor" + ] + } + ] + }, + "ProjectTaskRunSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTaskRunResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTaskDetailPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptLimit": { + "type": "integer", + "minimum": 1, + "maximum": 50 + }, + "beforeAttemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "taskId" + ] + }, + "ProjectTaskDetailRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-task-detail", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTaskDetailPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTaskDetailResult": { + "type": "object", + "properties": { + "task": { + "$ref": "#/components/schemas/TaskRecord" + }, + "view": { + "$ref": "#/components/schemas/TaskView" + }, + "attempts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attempt" + } + }, + "attemptsPage": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 50 + }, + "before": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "total", + "limit", + "before" + ] + } + }, + "additionalProperties": true, + "required": [ + "task", + "view", + "attempts", + "attemptsPage" + ] + }, + "ProjectTaskDetailSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTaskDetailResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTaskAcceptPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "requestId" + ] + }, + "ProjectTaskAcceptRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-task-accept", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTaskAcceptPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTaskAcceptResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "ProjectTaskAcceptSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTaskAcceptResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTaskRejectPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "reason": { + "type": "string", + "maxLength": 4000 + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "reason", + "requestId" + ] + }, + "ProjectTaskRejectRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-task-reject", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTaskRejectPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTaskRejectResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "ProjectTaskRejectSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTaskRejectResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAttemptStopPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "requestId" + ] + }, + "ProjectAttemptStopRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-attempt-stop", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAttemptStopPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAttemptStopResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "stopping": { + "type": "boolean" + }, + "remainingWorkers": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "ProjectAttemptStopSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAttemptStopResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAttemptCleanupPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "requestId" + ] + }, + "ProjectAttemptCleanupRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-attempt-cleanup", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAttemptCleanupPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAttemptCleanupResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "stopping": { + "type": "boolean" + }, + "remainingWorkers": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "ProjectAttemptCleanupSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAttemptCleanupResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectReleaseRequestPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "tag": { + "type": "string", + "maxLength": 101 + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + "mode": { + "type": "string", + "enum": [ + "observe", + "publish" + ] + }, + "name": { + "type": "string", + "maxLength": 120 + }, + "notes": { + "type": "string", + "maxLength": 4000 + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "tag", + "sha", + "requestId" + ] + }, + "ProjectReleaseRequestRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-release-request", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectReleaseRequestPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectReleaseRequestResult": { + "type": "object", + "properties": { + "release": { + "$ref": "#/components/schemas/Release" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true, + "required": [ + "release" + ] + }, + "ProjectReleaseRequestSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectReleaseRequestResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectReleaseReconcilePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "requestId" + ] + }, + "ProjectReleaseReconcileRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-release-reconcile", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectReleaseReconcilePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectReleaseReconcileResult": { + "type": "object", + "properties": { + "release": { + "$ref": "#/components/schemas/Release" + }, + "reconciliation": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "release", + "reconciliation" + ] + }, + "ProjectReleaseReconcileSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectReleaseReconcileResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectReleaseStatusPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId" + ] + }, + "ProjectReleaseStatusRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-release-status", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectReleaseStatusPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectReleaseStatusResult": { + "type": "object", + "properties": { + "release": { + "anyOf": [ + { + "$ref": "#/components/schemas/Release" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "release" + ] + }, + "ProjectReleaseStatusSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectReleaseStatusResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAttemptPublicationRetryPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId", + "requestId" + ] + }, + "ProjectAttemptPublicationRetryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-attempt-publication-retry", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAttemptPublicationRetryPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAttemptPublicationRetryResult": { + "type": "object", + "properties": { + "attempt": { + "$ref": "#/components/schemas/Attempt" + }, + "stopping": { + "type": "boolean" + }, + "remainingWorkers": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "attempt" + ] + }, + "ProjectAttemptPublicationRetrySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAttemptPublicationRetryResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAttemptLogPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "attemptId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "offset": { + "type": "integer", + "minimum": 0 + }, + "limit": { + "type": "integer", + "minimum": 4, + "maximum": 8192 + }, + "expectedSha256": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "attemptId" + ] + }, + "ProjectAttemptLogRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-attempt-log", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAttemptLogPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAttemptLogResult": { + "$ref": "#/components/schemas/LogPage" + }, + "ProjectAttemptLogSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAttemptLogResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectQueueCancelPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "queueId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "queueId", + "requestId" + ] + }, + "ProjectQueueCancelRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-queue-cancel", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectQueueCancelPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectQueueCancelResult": { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueEntry" + } + }, + "additionalProperties": true, + "required": [ + "queue" + ] + }, + "ProjectQueueCancelSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectQueueCancelResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectQueueRetryPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "queueId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "targetRole": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "queueId", + "requestId" + ] + }, + "ProjectQueueRetryRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-queue-retry", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectQueueRetryPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectQueueRetryResult": { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueEntry" + } + }, + "additionalProperties": true, + "required": [ + "queue" + ] + }, + "ProjectQueueRetrySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectQueueRetryResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectChiefInspectPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "taskId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "requestId" + ] + }, + "ProjectChiefInspectRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-chief-inspect", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectChiefInspectPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectChiefInspectResult": { + "type": "object", + "properties": { + "run": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": true, + "required": [ + "id" + ] + } + }, + "additionalProperties": true, + "required": [ + "run" + ] + }, + "ProjectChiefInspectSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectChiefInspectResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectChiefConfigurePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "inspection": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "when": { + "$ref": "#/components/schemas/ScheduleWhen" + }, + "thresholds": { + "type": "object", + "properties": { + "maxHandoffsWithoutProgress": { + "type": "integer", + "minimum": 1 + }, + "longExecutionMs": { + "type": "integer", + "minimum": 1 + }, + "longWaitMs": { + "type": "integer", + "minimum": 1 + }, + "missingHeartbeatMs": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "requestId" + ] + }, + "ProjectChiefConfigureRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-chief-configure", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectChiefConfigurePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectChiefConfigureResult": { + "type": "object", + "properties": { + "policy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "authorityMemberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "scheduleId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "enabled" + ] + }, + "template": { + "$ref": "#/components/schemas/JsonValue" + }, + "schedule": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/JsonValue" + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "enabled", + "status", + "config", + "deliveries" + ] + }, + { + "type": "null" + } + ] + }, + "runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "status" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "policy", + "template", + "schedule", + "runs" + ] + }, + "ProjectChiefConfigureSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectChiefConfigureResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectChiefStatePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectChiefStateRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-chief-state", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectChiefStatePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectChiefStateResult": { + "type": "object", + "properties": { + "policy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "authorityMemberId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "scheduleId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": true, + "required": [ + "enabled" + ] + }, + "template": { + "$ref": "#/components/schemas/JsonValue" + }, + "schedule": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "enabled": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/JsonValue" + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "id", + "enabled", + "status", + "config", + "deliveries" + ] + }, + { + "type": "null" + } + ] + }, + "runs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "kind": { + "const": "chief-control", + "type": "string" + }, + "status": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "createdAt": { + "type": "integer", + "minimum": 0 + }, + "source": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "id", + "projectId", + "status" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "policy", + "template", + "schedule", + "runs" + ] + }, + "ProjectChiefStateSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectChiefStateResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectScheduledTaskPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "operation": { + "type": "string", + "enum": [ + "save", + "delete", + "list" + ] + }, + "id": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "target": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "project-chief", + "project-source" + ] + }, + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "threadId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "kind", + "projectId" + ] + }, + "title": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "when": { + "$ref": "#/components/schemas/ScheduleWhen" + }, + "enabled": { + "type": "boolean" + }, + "rebindAuthority": { + "type": "boolean" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "requestId" + ] + }, + "ProjectScheduledTaskRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-scheduled-task", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectScheduledTaskPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectScheduledTaskResult": { + "anyOf": [ + { + "$ref": "#/components/schemas/Schedule" + }, + { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schedule" + } + } + }, + "additionalProperties": true, + "required": [ + "tasks" + ] + } + ] + }, + "ProjectScheduledTaskSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectScheduledTaskResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentModePayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "mode": { + "type": "string", + "enum": [ + "safe", + "watch" + ] + }, + "personalAgentId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "mode", + "requestId" + ] + }, + "ProjectAgentModeRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-mode", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentModePayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentModeResult": { + "$ref": "#/components/schemas/Delegation" + }, + "ProjectAgentModeSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentModeResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectAgentProposalApplyPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "proposalId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "proposalId", + "requestId" + ] + }, + "ProjectAgentProposalApplyRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-agent-proposal-apply", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectAgentProposalApplyPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectAgentProposalApplyResult": { + "type": "object", + "properties": { + "task": { + "$ref": "#/components/schemas/TaskRecord" + }, + "proposal": { + "$ref": "#/components/schemas/Proposal" + }, + "already": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "ProjectAgentProposalApplySuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectAgentProposalApplyResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectExecutionInputPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "workerId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "text": { + "type": "string", + "maxLength": 16000 + }, + "requestId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "allow": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "workerId", + "generation" + ], + "anyOf": [ + { + "required": [ + "text" + ] + }, + { + "required": [ + "requestId", + "allow" + ] + } + ] + }, + "ProjectExecutionInputRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-execution-input", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectExecutionInputPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectExecutionInputResult": { + "type": "object", + "properties": { + "sent": { + "type": "boolean" + }, + "ok": { + "type": "boolean" + } + }, + "additionalProperties": true + }, + "ProjectExecutionInputSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectExecutionInputResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectTaskPoolsPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + } + }, + "additionalProperties": false, + "required": [ + "projectId" + ] + }, + "ProjectTaskPoolsRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-task-pools", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectTaskPoolsPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectTaskPoolsResult": { + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "botId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "role": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,31}$" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "additionalProperties": true, + "required": [ + "botId", + "role", + "tasks" + ] + } + } + }, + "additionalProperties": true, + "required": [ + "pools" + ] + }, + "ProjectTaskPoolsSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectTaskPoolsResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "ProjectGithubCommentPayload": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "minLength": 1, + "maxLength": 200, + "description": "Opaque server-issued ID; never infer authority from it." + }, + "issueNumber": { + "type": "integer", + "minimum": 1 + }, + "text": { + "type": "string", + "maxLength": 10000 + }, + "scope": { + "const": "personal", + "type": "string" + }, + "requestId": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,100}$" + } + }, + "additionalProperties": false, + "required": [ + "projectId", + "issueNumber", + "text", + "requestId" + ] + }, + "ProjectGithubCommentRequest": { + "type": "object", + "properties": { + "endpoint": { + "const": "project-github-comment", + "type": "string" + }, + "payload": { + "$ref": "#/components/schemas/ProjectGithubCommentPayload" + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "payload" + ] + }, + "ProjectGithubCommentResult": { + "type": "object", + "properties": { + "audit": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": true, + "required": [ + "audit" + ] + }, + "ProjectGithubCommentSuccess": { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ProjectGithubCommentResult" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + "BotRequest": { + "oneOf": [ + { + "$ref": "#/components/schemas/AuthModeRequest" + }, + { + "$ref": "#/components/schemas/PlatformLoginRequest" + }, + { + "$ref": "#/components/schemas/AuthWhoamiRequest" + }, + { + "$ref": "#/components/schemas/AuthRevokeRequest" + }, + { + "$ref": "#/components/schemas/AuthInviteRequest" + }, + { + "$ref": "#/components/schemas/AuthRedeemRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentCreateRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentListRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentParticipationsRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentReadRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentJoinRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentDefaultRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentLeaveRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentRetireRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentHistoryRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentTokenCreateRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentTokenListRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentTokenRevokeRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentDelegationSetRequest" + }, + { + "$ref": "#/components/schemas/PersonalAgentProposeTaskRequest" + }, + { + "$ref": "#/components/schemas/ProjectsRequest" + }, + { + "$ref": "#/components/schemas/ProjectCreateRequest" + }, + { + "$ref": "#/components/schemas/ProjectReadRequest" + }, + { + "$ref": "#/components/schemas/ProjectDetailRequest" + }, + { + "$ref": "#/components/schemas/ProjectBoardRequest" + }, + { + "$ref": "#/components/schemas/ProjectRepositoriesRequest" + }, + { + "$ref": "#/components/schemas/ProjectRepositoryLinkRequest" + }, + { + "$ref": "#/components/schemas/ProjectRepositoryUnlinkRequest" + }, + { + "$ref": "#/components/schemas/ProjectMembersRequest" + }, + { + "$ref": "#/components/schemas/ProjectInviteRequest" + }, + { + "$ref": "#/components/schemas/ProjectJoinRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoleRequest" + }, + { + "$ref": "#/components/schemas/ProjectMemberRemoveRequest" + }, + { + "$ref": "#/components/schemas/ProjectLeaveRequest" + }, + { + "$ref": "#/components/schemas/ProjectQuotaRequest" + }, + { + "$ref": "#/components/schemas/ProjectArchiveRequest" + }, + { + "$ref": "#/components/schemas/ProjectDeleteRequest" + }, + { + "$ref": "#/components/schemas/ProjectCloseRequestRequest" + }, + { + "$ref": "#/components/schemas/ProjectClosePrepareRequest" + }, + { + "$ref": "#/components/schemas/ProjectCloseConfirmRequest" + }, + { + "$ref": "#/components/schemas/WorkbenchStateRequest" + }, + { + "$ref": "#/components/schemas/ProjectResourcesRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentsRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentMessageRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentHistoryRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentMemoryWriteRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoleMemoryWriteRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentDefinitionRequest" + }, + { + "$ref": "#/components/schemas/ProjectKnowledgeWriteRequest" + }, + { + "$ref": "#/components/schemas/ProjectChiefQuestionRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentStopRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoomsRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoomReadRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoomCreateRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoomMessageRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoomAttachmentRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoomStopRequest" + }, + { + "$ref": "#/components/schemas/ProjectResourceEnvironmentCheckRequest" + }, + { + "$ref": "#/components/schemas/ProjectRuntimeCheckRequest" + }, + { + "$ref": "#/components/schemas/ProjectTerminalOpenRequest" + }, + { + "$ref": "#/components/schemas/ProjectTerminalPollRequest" + }, + { + "$ref": "#/components/schemas/ProjectTerminalInputRequest" + }, + { + "$ref": "#/components/schemas/ProjectTerminalResizeRequest" + }, + { + "$ref": "#/components/schemas/ProjectTerminalCloseRequest" + }, + { + "$ref": "#/components/schemas/TaskUpdateRequest" + }, + { + "$ref": "#/components/schemas/TaskCancelRequest" + }, + { + "$ref": "#/components/schemas/TaskAnswerInputRequest" + }, + { + "$ref": "#/components/schemas/ProjectCredentialStatusRequest" + }, + { + "$ref": "#/components/schemas/ProjectGithubReadRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceListRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceReadRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceSendRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceStopRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceMemberStopRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceAnswerRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceDismissRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceApprovalRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceMemoryRequest" + }, + { + "$ref": "#/components/schemas/PersonalSpaceAttachmentReadRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowStateRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowTemplatesRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowCreateRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowGraphRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowConcurrencyRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowSetModelRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowStepTimeoutRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowAssignRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowPauseRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowResumeRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowResetRequest" + }, + { + "$ref": "#/components/schemas/ProjectWorkflowDeleteRequest" + }, + { + "$ref": "#/components/schemas/ProjectConsultationReplyRequest" + }, + { + "$ref": "#/components/schemas/ProjectConsultationAskRequest" + }, + { + "$ref": "#/components/schemas/ProjectConsultationGetRequest" + }, + { + "$ref": "#/components/schemas/ProjectConsultationListRequest" + }, + { + "$ref": "#/components/schemas/ProjectRolesRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoleProposalsRequest" + }, + { + "$ref": "#/components/schemas/ProjectRoleDecisionRequest" + }, + { + "$ref": "#/components/schemas/ProjectHandoffGetRequest" + }, + { + "$ref": "#/components/schemas/ProjectHandoffListRequest" + }, + { + "$ref": "#/components/schemas/TaskCreateRequest" + }, + { + "$ref": "#/components/schemas/ProjectTaskRunRequest" + }, + { + "$ref": "#/components/schemas/ProjectTaskDetailRequest" + }, + { + "$ref": "#/components/schemas/ProjectTaskAcceptRequest" + }, + { + "$ref": "#/components/schemas/ProjectTaskRejectRequest" + }, + { + "$ref": "#/components/schemas/ProjectAttemptStopRequest" + }, + { + "$ref": "#/components/schemas/ProjectAttemptCleanupRequest" + }, + { + "$ref": "#/components/schemas/ProjectReleaseRequestRequest" + }, + { + "$ref": "#/components/schemas/ProjectReleaseReconcileRequest" + }, + { + "$ref": "#/components/schemas/ProjectReleaseStatusRequest" + }, + { + "$ref": "#/components/schemas/ProjectAttemptPublicationRetryRequest" + }, + { + "$ref": "#/components/schemas/ProjectAttemptLogRequest" + }, + { + "$ref": "#/components/schemas/ProjectQueueCancelRequest" + }, + { + "$ref": "#/components/schemas/ProjectQueueRetryRequest" + }, + { + "$ref": "#/components/schemas/ProjectChiefInspectRequest" + }, + { + "$ref": "#/components/schemas/ProjectChiefConfigureRequest" + }, + { + "$ref": "#/components/schemas/ProjectChiefStateRequest" + }, + { + "$ref": "#/components/schemas/ProjectScheduledTaskRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentModeRequest" + }, + { + "$ref": "#/components/schemas/ProjectAgentProposalApplyRequest" + }, + { + "$ref": "#/components/schemas/ProjectExecutionInputRequest" + }, + { + "$ref": "#/components/schemas/ProjectTaskPoolsRequest" + }, + { + "$ref": "#/components/schemas/ProjectGithubCommentRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryTasksRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryTaskRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryTaskDetailRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryTaskHistoryRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryRolesRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryRoleProposalsRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryConsultationListRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryConsultationGetRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryHandoffListRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryHandoffGetRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryPoolsRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryInputsRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQuerySourcesRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryExecutionBoundaryRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryAttemptContextRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryAttemptIntegrationStateRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryAttemptLogRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryReleaseStatusRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryChiefStateRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryEffectsRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryCommandReceiptRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryCommandResultRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryProjectSnapshotRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryEventsRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentQueryCompatibilityRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandConsultationAskRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandConsultationReplyRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandRoleDecideRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandTaskProposeRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandTaskChangeRequestRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandTaskRunRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandTaskAcceptRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandTaskRejectRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandAttemptStopRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandAttemptCleanupRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandAttemptPublicationRetryRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandAttemptIntegrationBindRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandReleaseRequestRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandReleaseReconcileRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandQueueCancelRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandQueueRetryRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandChiefInspectRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandChiefConfigureRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandScheduleConfigureRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandAgentModeRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandProposalPublishRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandExecutionInputRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandInputPublishRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandSourceSubscribeRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandSourceDisableRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandSourcePollRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandEffectRetryRequest" + }, + { + "$ref": "#/components/schemas/DevelopmentCommandCommentPublishRequest" + } + ] + }, + "BotResponse": { + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "const": true, + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "additionalProperties": false, + "required": [ + "ok", + "value" + ] + }, + { + "$ref": "#/components/schemas/DomainError" + } + ] + }, + "SseControl": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "details": { + "type": "object", + "properties": { + "nextAction": { + "type": "string" + } + }, + "additionalProperties": true, + "required": [ + "nextAction" + ] + } + }, + "additionalProperties": true, + "required": [ + "code", + "details" + ] + }, + "SseError": { + "type": "object", + "properties": { + "ok": { + "const": false, + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/Error" + } + }, + "additionalProperties": true, + "required": [ + "ok", + "error" + ] + } + } + }, + "x-flybot-operations": [ + { + "operationId": "development.query.tasks", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "tasks", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTasksRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTasksResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTasksSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + } + }, + { + "operationId": "development.query.task", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "task", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + } + }, + { + "operationId": "development.query.task.detail", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "task.detail", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskDetailRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskDetailResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskDetailSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + } + }, + { + "operationId": "development.query.task.history", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "task.history", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskHistoryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskHistoryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryTaskHistorySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + } + }, + { + "operationId": "development.query.roles", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "roles", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryRolesRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryRolesResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryRolesSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + } + }, + { + "operationId": "development.query.role.proposals", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "role.proposals", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryRoleProposalsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryRoleProposalsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryRoleProposalsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + } + }, + { + "operationId": "development.query.consultation.list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "consultation.list", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-private-participation-or-fba-own-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": true, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + } + }, + { + "operationId": "development.query.consultation.get", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "consultation.get", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationGetRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationGetResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryConsultationGetSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-private-participation-or-fba-own-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": true, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + } + }, + { + "operationId": "development.query.handoff.list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "handoff.list", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Read-only transport/initiative history; it is not role claim acceptance.", + "implementation": { + "path": "core/src/host/project-pools.js", + "sha256": "afab16b3df4d18a5bfab69c975e8d61346a7838438a634668f2b06425545f237" + } + }, + { + "operationId": "development.query.handoff.get", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "handoff.get", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffGetRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffGetResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryHandoffGetSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-pools.js", + "sha256": "afab16b3df4d18a5bfab69c975e8d61346a7838438a634668f2b06425545f237" + } + }, + { + "operationId": "development.query.pools", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "pools", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryPoolsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryPoolsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryPoolsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + } + }, + { + "operationId": "development.query.inputs", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "inputs", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryInputsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryInputsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryInputsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Receipt states distinguish persisted, delivered, model-declared-read and handled; none imply Task completion.", + "implementation": { + "path": "core/src/host/project-inputs.js", + "sha256": "d6286e982ccccafe22db409e41a449f215363cd48672ff7b441930cdd6246e02" + } + }, + { + "operationId": "development.query.sources", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "sources", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQuerySourcesRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQuerySourcesResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQuerySourcesSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-default-repository-configured", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "event-or-thread-belongs-to-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-sources.js", + "sha256": "cf4c11c8e853f3091c4d159b850d06fe7e8bf291fdc616d251eb23d071d63403" + } + }, + { + "operationId": "development.query.execution.boundary", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "execution.boundary", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryExecutionBoundaryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryExecutionBoundaryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryExecutionBoundarySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Reports effective current boundaries; it neither runs tests nor grants tools/credentials.", + "implementation": { + "path": "core/src/host/project-execution-boundary.js", + "sha256": "20fd2d7398c0e95f983da8b54635366864f233bf738add89122d7246473b3a65" + } + }, + { + "operationId": "development.query.attempt.context", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "attempt.context", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptContextRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptContextResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptContextSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + } + }, + { + "operationId": "development.query.attempt.integration-state", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "attempt.integration-state", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptIntegrationStateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptIntegrationStateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptIntegrationStateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-released-integration-checkpoint", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Although a query, the downstream integration checkpoint gate requires manager authority and confirmed release.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.query.attempt.log", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "attempt.log", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptLogRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptLogResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryAttemptLogSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "UTF-8 byte offsets, not character offsets; nextOffset preserves character boundaries. Rechecks rights after source I/O. No caller path.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.query.release.status", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "release.status", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryReleaseStatusRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryReleaseStatusResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryReleaseStatusSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-release-task-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-releases.js", + "sha256": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4" + } + }, + { + "operationId": "development.query.chief.state", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "chief.state", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryChiefStateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryChiefStateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryChiefStateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-chief-control.js", + "sha256": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758" + } + }, + { + "operationId": "development.query.effects", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "effects", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryEffectsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryEffectsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryEffectsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Private command effects/results remain visible only to the matching independent principal.", + "implementation": { + "path": "core/src/host/project-effects.js", + "sha256": "aa4b8f653a2dc72d5d80752857c49993d69295003ec132ccbae2ab2d1b0b42b1" + } + }, + { + "operationId": "development.query.command.receipt", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "command.receipt", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCommandReceiptRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCommandReceiptResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCommandReceiptSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "same-command-principal", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "exact-original-command-principal; human-and-each-personal-agent-are-distinct", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-original-human-or-personal-agent-command-principal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-command-receipts.js", + "sha256": "e434e109dfb867cb3dd131f7ccfe045b5ce3a462ea1fdd68d431617c47fd63e2" + } + }, + { + "operationId": "development.query.command.result", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "command.result", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCommandResultRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCommandResultResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCommandResultSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "same-command-principal", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "exact-original-command-principal; human-and-each-personal-agent-are-distinct", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-original-command-principal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "committed-completed-command-result", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-command-receipts.js", + "sha256": "e434e109dfb867cb3dd131f7ccfe045b5ce3a462ea1fdd68d431617c47fd63e2" + } + }, + { + "operationId": "development.query.project.snapshot", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "project.snapshot", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryProjectSnapshotRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryProjectSnapshotResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryProjectSnapshotSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-service-events.js", + "sha256": "71917d1ab367a9db8bef8c1d1003228255a57528e84a57e76de3a39d08ac28ec" + } + }, + { + "operationId": "development.query.events", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "events", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryEventsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryEventsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryEventsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Committed facts only; expired cursor requires a fresh snapshot, not blind replay of commands.", + "implementation": { + "path": "core/src/host/project-service-events.js", + "sha256": "71917d1ab367a9db8bef8c1d1003228255a57528e84a57e76de3a39d08ac28ec" + } + }, + { + "operationId": "development.query.compatibility", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "query", + "name": "compatibility", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCompatibilityRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCompatibilityResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentQueryCompatibilitySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-compatibility.js", + "sha256": "4ab65df4a237fb55ea2c68396bd180bb0a9ed4c42dc63444ce4ef0869c8988bc" + } + }, + { + "operationId": "development.command.consultation.ask", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "consultation.ask", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationAskRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationAskResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationAskSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-active-private-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-consultation-created-no-task-initiative-change" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Consultation", + "from": [ + "absent" + ], + "to": [ + "pending" + ], + "conditional": true + } + ], + "noTaskCreated": true, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": true, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + } + }, + { + "operationId": "development.command.consultation.reply", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "consultation.reply", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationReplyRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationReplyResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandConsultationReplySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-current-incoming-chief-question", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "publish-requires-human-or-valid-watch-and-task-write", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-reply-recorded", + "only-explicit-authorized-publication-adds-original-task-input" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "ConsultationReply", + "from": [ + "absent" + ], + "to": [ + "private", + "published" + ], + "conditional": true + } + ], + "noTaskCreated": true, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + } + }, + { + "operationId": "development.command.role.decide", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "role.decide", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandRoleDecideRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandRoleDecideResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandRoleDecideSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "committed-chief-role-proposal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-current-proposal-hash-and-catalog-revision", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "approver-not-chief-executor", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "role-proposal-approved-or-rejected", + "approved-catalog-version-may-change" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "RoleProposal", + "from": [ + "pending" + ], + "to": [ + "approved", + "rejected" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + } + }, + { + "operationId": "development.command.task.propose", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "task.propose", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskProposeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskProposeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskProposeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "task-proposed-with-stable-project-identity", + "durable-chief-intake-staged" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Task", + "from": [ + "absent" + ], + "to": [ + "awaiting-chief" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "criteria and impact must be nonempty before Chief admission. Ordinary inquiries use consultation.ask; shared publication by safe FBA is refused.", + "implementation": { + "path": "core/src/host/tasks.js", + "sha256": "c4d1e376b3de2c023d2c3debaa328d56cd2f245fcd2bcb5695f73360b608f130" + } + }, + { + "operationId": "development.command.task.change.request", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "task.change.request", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskChangeRequestRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskChangeRequestResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskChangeRequestSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "requirements-only-for-revise", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "chief-change-request-input-added-no-immediate-lifecycle-change" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "TaskChangeRequest", + "from": [ + "absent" + ], + "to": [ + "pending-chief" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-task-lifecycle.js", + "sha256": "d5d93bf7b841dd1685b3889dca11c8303071764f856d0e10e82dd96adafd5f57" + } + }, + { + "operationId": "development.command.task.run", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "task.run", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRunRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRunResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRunSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "stable-requestId", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "no-conflicting-live-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "approved-initial-role", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "repository-and-resource-provisioned-or-local-repository-free-decision", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "unadmitted-task-submitted-to-chief-or-approved-task-queued", + "initial-role-and-repository-version-bound", + "attempt-may-start-asynchronously" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Task", + "from": [ + "awaiting-chief" + ], + "to": [ + "awaiting-chief" + ], + "conditional": true + }, + { + "entity": "QueueEntry", + "from": [ + "absent" + ], + "to": [ + "waiting", + "blocked", + "started" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": true, + "notes": "Never bypasses Chief. Capacity busy means queue, not permission to create another Task. Cross-repository auto-split remains deferred.", + "implementation": { + "path": "core/src/host/project-scheduler.js", + "sha256": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee" + } + }, + { + "operationId": "development.command.task.accept", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "task.accept", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskAcceptRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskAcceptResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskAcceptSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "accept", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "legacy-only; new Task completion requires host-authenticated Chief", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "legacy-task-human-acceptance-only", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-verified-current-candidate-tests-review-and-pr", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-attempt-and-task-accepted" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "LegacyTask", + "from": [ + "awaiting-acceptance" + ], + "to": [ + "accepted" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "New Project Task contracts require actual Chief adjudication; third-party clients cannot forge Chief credentials.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.command.task.reject", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "task.reject", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRejectRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRejectResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandTaskRejectSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "accept", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "legacy-only; new Task completion requires host-authenticated Chief", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-attempt-and-confirmed-exit", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "attempt-returned-evidence-preserved", + "rework-follows-current-task-contract" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Attempt", + "from": [ + "waiting-acceptance", + "running" + ], + "to": [ + "failed", + "returned" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.command.attempt.stop", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "attempt.stop", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptStopRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptStopResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptStopSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-run-control-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "stop-requested-unknown-exit-retains-capacity" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Execution", + "from": [ + "active" + ], + "to": [ + "stopping", + "stop-unconfirmed", + "exited" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.command.attempt.cleanup", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "attempt.cleanup", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptCleanupRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptCleanupResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptCleanupSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "terminal-attempt-and-confirmed-worker-release", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "only-owned-released-workspaces-cleaned-history-retained" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.command.attempt.publication-retry", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "attempt.publication-retry", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptPublicationRetryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptPublicationRetryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptPublicationRetrySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "same-current-candidate-and-original-pr-binding", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "existing-publication-reconciled-no-second-pr" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.command.attempt.integration-bind", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "attempt.integration-bind", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptIntegrationBindRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptIntegrationBindResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAttemptIntegrationBindSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "matching-current-generation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "released-integration-checkpoint", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-workspace-snapshot-from-attempt.integration-state", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "verified-operator-source-refs", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "immutable-trusted-integration-inputs-bound-no-fake-test-or-merge-evidence" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + } + }, + { + "operationId": "development.command.release.request", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "release.request", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseRequestRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseRequestResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseRequestSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "chief-admitted-current-running-release-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "sha-equals-pinned-attempt-base", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-github-release-provider-and-private-credential-configured", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-human-or-full-watch-manager-authority-not-chief", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "durable-release-authorization-recorded", + "observe-default-never-publishes", + "explicit-publish-may-create-real-external-release" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Release", + "from": [ + "absent" + ], + "to": [ + "authorized" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "Can perform irreversible external publication only when mode=publish is explicitly sent. Does not merge, upload assets or deploy. Unknown results must reconcile.", + "implementation": { + "path": "core/src/host/project-releases.js", + "sha256": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4" + } + }, + { + "operationId": "development.command.release.reconcile", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "release.reconcile", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseReconcileRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseReconcileResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandReleaseReconcileSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "existing-current-release-request", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "original-authority-and-binding-still-valid", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "existing-external-result-observed-never-repeat-post" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Release", + "from": [ + "authorized", + "unknown", + "awaiting-artifact", + "failed" + ], + "to": [ + "observed", + "unknown", + "awaiting-artifact", + "failed" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-releases.js", + "sha256": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4" + } + }, + { + "operationId": "development.command.queue.cancel", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "queue.cancel", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandQueueCancelRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandQueueCancelResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandQueueCancelSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "waiting-or-blocked-queue-entry", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "queue-entry-cancelled-no-worker-exit-claim" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "QueueEntry", + "from": [ + "waiting", + "blocked" + ], + "to": [ + "cancelled" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-scheduler.js", + "sha256": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee" + } + }, + { + "operationId": "development.command.queue.retry", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "queue.retry", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandQueueRetryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandQueueRetryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandQueueRetrySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "blocked-queue-entry", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "original-requester-still-authorized", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "no-active-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "repository-preflight", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-target-role", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "blocked-to-waiting-original-requester-retained", + "role-and-requirement-binding-explicitly-refreshed" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "QueueEntry", + "from": [ + "blocked" + ], + "to": [ + "waiting" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-scheduler.js", + "sha256": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee" + } + }, + { + "operationId": "development.command.chief.inspect", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "chief.inspect", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandChiefInspectRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandChiefInspectResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandChiefInspectSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "chief-policy-enabled", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "optional-task-belongs-to-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "one-scoped-chief-control-job-enqueued" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": true, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-chief-control.js", + "sha256": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758" + } + }, + { + "operationId": "development.command.chief.configure", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "chief.configure", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandChiefConfigureRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandChiefConfigureResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandChiefConfigureSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "configurer-is-not-chief-executor", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-background-principal-check", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "chief-authority-policy-revision-updated", + "original-logical-schedule-configured" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "30-minute inspection is a configurable schedule default, not a framework deadline.", + "implementation": { + "path": "core/src/host/project-chief-control.js", + "sha256": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758" + } + }, + { + "operationId": "development.command.schedule.configure", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "schedule.configure", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandScheduleConfigureRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandScheduleConfigureResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandScheduleConfigureSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "registered-logical-target", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "original-dsh-schedule-service-available", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "original-scheduled-task-created-updated-paused-or-deleted-no-second-timer-engine" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-scheduled-tasks.js", + "sha256": "f99a7e28a95c4525672c88059878ede4b88c45b5b668dfc25f3a1dd519bab3c0" + } + }, + { + "operationId": "development.command.agent.mode", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "agent.mode", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAgentModeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAgentModeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandAgentModeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "own-delegation-granted-or-revoked" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "Only the signed-in human may change delegation mode; even full watch agents cannot self-escalate or extend their own grant.", + "implementation": { + "path": "core/src/host/project-delegations.js", + "sha256": "d4d86192551994a3419e0d2ca0f64bc4d50a75960970d2b79ed9f97b82940903" + } + }, + { + "operationId": "development.command.proposal.publish", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "proposal.publish", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandProposalPublishRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandProposalPublishResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandProposalPublishSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-private-proposal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "human-explicit-publication-approval", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-proposal-published-to-one-shared-task", + "private-conversation-not-copied" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "development.command.execution.input", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "execution.input", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandExecutionInputRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandExecutionInputResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandExecutionInputSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-task-write-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-worker-and-generation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "permission-replies-also-require-configure", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "pending-executor-input-or-permission-resolved" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "payload.requestId identifies the original SDK permission question; outer requestId is the independent command receipt ID. A role string never grants execution identity.", + "implementation": { + "path": "core/src/host/project-harness.js", + "sha256": "8ee1d4040cff7ede7b4c540bb0b020061406bea718d649a7a7b1792c63cc1553" + } + }, + { + "operationId": "development.command.input.publish", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "input.publish", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandInputPublishRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandInputPublishResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandInputPublishSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "durable-input-bound-to-current-task-role-generation" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "Host derives source, recipient and claim. Persisted/delivered does not mean read or handled.", + "implementation": { + "path": "core/src/host/project-inputs.js", + "sha256": "d6286e982ccccafe22db409e41a449f215363cd48672ff7b441930cdd6246e02" + } + }, + { + "operationId": "development.command.source.subscribe", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "source.subscribe", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourceSubscribeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourceSubscribeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourceSubscribeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "task-in-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "repository-equals-project-source-repository", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "one-active-actionable-task-per-thread", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "scoped-github-subscription-created", + "configured-source-events-can-feed-original-task" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-sources.js", + "sha256": "cf4c11c8e853f3091c4d159b850d06fe7e8bf291fdc616d251eb23d071d63403" + } + }, + { + "operationId": "development.command.source.disable", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "source.disable", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourceDisableRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourceDisableResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourceDisableSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "existing-project-subscription", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "source-subscription-disabled-history-retained" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-sources.js", + "sha256": "cf4c11c8e853f3091c4d159b850d06fe7e8bf291fdc616d251eb23d071d63403" + } + }, + { + "operationId": "development.command.source.poll", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "source.poll", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourcePollRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourcePollResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandSourcePollSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "existing-enabled-project-source", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-current-github-credential", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "bounded-external-source-read", + "new-durable-source-events-and-task-inputs-may-be-committed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-sources.js", + "sha256": "cf4c11c8e853f3091c4d159b850d06fe7e8bf291fdc616d251eb23d071d63403" + } + }, + { + "operationId": "development.command.effect.retry", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "effect.retry", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandEffectRetryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandEffectRetryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandEffectRetrySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exhausted-failed-effect", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "effect-visible-to-current-independent-principal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "failed-effect-requeued-original-identity-retained" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "Does not authorize blind replay of an unknown release/PR outcome. Use its domain reconciliation first.", + "implementation": { + "path": "core/src/host/project-effects.js", + "sha256": "aa4b8f653a2dc72d5d80752857c49993d69295003ec132ccbae2ab2d1b0b42b1" + } + }, + { + "operationId": "development.command.comment.publish", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-development", + "kind": "command", + "name": "comment.publish", + "version": "project-development/v1" + }, + "requestSchema": { + "$ref": "#/components/schemas/DevelopmentCommandCommentPublishRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/DevelopmentCommandCommentPublishResult" + }, + "successSchema": { + "$ref": "#/components/schemas/DevelopmentCommandCommentPublishSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-current-human-personal-github-credential", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "verified-selected-github-login", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "same-scoped-project-repository", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "durable-personal-github-comment-publication" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "command-receipt", + "retry": "same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome", + "unifiedCommandReceipt": true + }, + "invokesModel": false, + "notes": "No ambient/project-owner credential fallback. External write; use the same requestId when a response is lost.", + "implementation": { + "path": "core/src/host/project-credentials.js", + "sha256": "17ba1d326787c47d8669d0d3ef269e50a97a67eb8413183ff940a3993daab5ff" + } + }, + { + "operationId": "auth-mode", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "auth-mode" + }, + "requestSchema": { + "$ref": "#/components/schemas/AuthModeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/AuthModeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/AuthModeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + {} + ], + "permission": "anonymous", + "humanRoles": [], + "condition": "anonymous-discovery-or-valid-login-material", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/workbench-state.js", + "sha256": "be02e9b796f315d529e09b3c53a1804a7a5d92c389a34c8f1017fcc03b114d0b" + } + }, + { + "operationId": "platform-login", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "platform-login" + }, + "requestSchema": { + "$ref": "#/components/schemas/PlatformLoginRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PlatformLoginResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PlatformLoginSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + {} + ], + "permission": "anonymous", + "humanRoles": [], + "condition": "anonymous-discovery-or-valid-login-material", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "platform-identity-configured", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "valid-platform-account", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "member-session-created" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-session-per-login", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/platform-identity.js", + "sha256": "551795f4251cc705582560274eccf68a8955a26f51c807a74b8948261508a29e" + } + }, + { + "operationId": "auth-whoami", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "auth-whoami" + }, + "requestSchema": { + "$ref": "#/components/schemas/AuthWhoamiRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/AuthWhoamiResult" + }, + "successSchema": { + "$ref": "#/components/schemas/AuthWhoamiSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + {}, + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "identity-discovery", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "optional-identity; missing-or-invalid-credential-returns-null-not-authentication-success", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Anonymous, invalid or revoked credentials return ok=true,value=null. A Bot must verify non-null agentId and personalAgentCredentialId; HTTP200/ok alone is not successful login.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "auth-revoke", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "auth-revoke" + }, + "requestSchema": { + "$ref": "#/components/schemas/AuthRevokeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/AuthRevokeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/AuthRevokeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "session", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "authenticated-active-principal; Project-scoped reads still filter membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "valid-session-or-fba-token", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "current-session-or-fba-token-revoked" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "revocation", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "auth-invite", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "auth-invite" + }, + "requestSchema": { + "$ref": "#/components/schemas/AuthInviteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/AuthInviteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/AuthInviteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "native-member-invitation-created" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-invitation", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Anonymous bootstrap is blocked by the public gateway; use the private operator CLI. Platform identity deployments may disable native invitation.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "auth-redeem", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "auth-redeem" + }, + "requestSchema": { + "$ref": "#/components/schemas/AuthRedeemRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/AuthRedeemResult" + }, + "successSchema": { + "$ref": "#/components/schemas/AuthRedeemSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + {} + ], + "permission": "anonymous", + "humanRoles": [], + "condition": "anonymous-discovery-or-valid-login-material", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "valid-unused-native-member-invitation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "native-member-auth-enabled", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "member-created", + "invitation-consumed", + "member-session-created" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "single-use-invitation", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-agent-create", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-create" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentCreateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentCreateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentCreateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "personal-agent-created" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "PersonalAgent", + "from": [ + "absent" + ], + "to": [ + "active" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-identity", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "External descriptors remain unverified; no remote login, webhook or vendor-specific adapter is implied.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-list" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-participations", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-participations" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentParticipationsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentParticipationsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentParticipationsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-read", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-read" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentReadRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentReadResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentReadSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-join", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-join" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentJoinRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentJoinResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentJoinSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "participation-active" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Participation", + "from": [ + "absent", + "left" + ], + "to": [ + "active" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stable-agent-project-identity", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-default", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-default" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentDefaultRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentDefaultResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentDefaultSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "default-participation-selected" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stable-agent-project-identity", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-leave", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-leave" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentLeaveRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentLeaveResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentLeaveSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "participation-left-and-matching-grants-revoked" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Participation", + "from": [ + "active" + ], + "to": [ + "left" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stable-agent-project-identity", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-retire", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-retire" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentRetireRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentRetireResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentRetireSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "agent-and-participations-retired", + "matching-grants-revoked" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "PersonalAgent", + "from": [ + "active" + ], + "to": [ + "retired" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "retirement", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-history", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-history" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentHistoryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentHistoryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentHistorySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "existing-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Legacy item-count paging; individual stored messages may be large. This is not the byte-budgeted project-agent-history API. No FBA access.", + "implementation": { + "path": "core/src/host/personal-agents.js", + "sha256": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651" + } + }, + { + "operationId": "personal-agent-token-create", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-token-create" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenCreateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenCreateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenCreateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-active-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-participation-in-every-explicit-project-scope", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "hashed-expiring-fba-credential-created" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "AgentCredential", + "from": [ + "absent" + ], + "to": [ + "active" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-token-returned-once", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agent-auth.js", + "sha256": "49de30b43c412e82fec792d75e98cad09d1c301bb1b78add34bfd68c10e6054e" + } + }, + { + "operationId": "personal-agent-token-list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-token-list" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agent-auth.js", + "sha256": "49de30b43c412e82fec792d75e98cad09d1c301bb1b78add34bfd68c10e6054e" + } + }, + { + "operationId": "personal-agent-token-revoke", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-token-revoke" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenRevokeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenRevokeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentTokenRevokeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "own-fba-credential-revoked-and-generation-incremented" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "AgentCredential", + "from": [ + "active" + ], + "to": [ + "revoked" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "revocation", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agent-auth.js", + "sha256": "49de30b43c412e82fec792d75e98cad09d1c301bb1b78add34bfd68c10e6054e" + } + }, + { + "operationId": "personal-agent-delegation-set", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-delegation-set" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentDelegationSetRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentDelegationSetResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentDelegationSetSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-active-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "watch-requires-current-create-permission", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "watch-grant-active-or-revoked" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "same-mode-replay", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/personal-agent-auth.js", + "sha256": "49de30b43c412e82fec792d75e98cad09d1c301bb1b78add34bfd68c10e6054e" + } + }, + { + "operationId": "personal-agent-propose-task", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-agent-propose-task" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalAgentProposeTaskRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalAgentProposeTaskResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalAgentProposeTaskSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "personalAgentToken": [] + } + ], + "permission": "fba-proposal", + "humanRoles": [], + "condition": "FBA-only; current-token-scope-and-participation", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "valid-fba-token", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-scoped-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-proposal-created-no-shared-task" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "agent-project-requestId-exact-fields", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Safe and watch modes may propose. A human approves with project-agent-proposal-apply; the Bot cannot approve its own proposal.", + "implementation": { + "path": "core/src/host/personal-agent-auth.js", + "sha256": "49de30b43c412e82fec792d75e98cad09d1c301bb1b78add34bfd68c10e6054e" + } + }, + { + "operationId": "projects", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "projects" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "session", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "authenticated-active-principal; Project-scoped reads still filter membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "valid-session-or-fba-token", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-create", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-create" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectCreateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectCreateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectCreateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "project-created-with-caller-as-owner", + "scoped-public-and-private-agent-carriers-may-be-created" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Project", + "from": [ + "absent" + ], + "to": [ + "active", + "archived" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-project", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "No repository paths, alternate owner IDs or credentials may be supplied. Repository associations do not provision execution capability.", + "implementation": { + "path": "core/src/host/project-service.js", + "sha256": "8ba30c1d7c066867eae06a6612d5bbba3bc2278f34fcf7f1c2242876565dba8f" + } + }, + { + "operationId": "project-read", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-read" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectReadRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectReadResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectReadSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-detail", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-detail" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectDetailRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectDetailResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectDetailSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Prefer v1 tasks/task.detail and summary views for bounded reads.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-board", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-board" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectBoardRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectBoardResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectBoardSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-service.js", + "sha256": "8ba30c1d7c066867eae06a6612d5bbba3bc2278f34fcf7f1c2242876565dba8f" + } + }, + { + "operationId": "project-repositories", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-repositories" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRepositoriesRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRepositoriesResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRepositoriesSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-lifecycle.js", + "sha256": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936" + } + }, + { + "operationId": "project-repository-link", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-repository-link" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRepositoryLinkRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRepositoryLinkResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRepositoryLinkSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "repository-association-added-or-removed", + "existing-task-bindings-never-silently-reassigned" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "association-identity", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Unfinished legacy work may prevent unlinking the default. Cross-repository automatic split/parent integration remains deferred (#2292).", + "implementation": { + "path": "core/src/host/project-lifecycle.js", + "sha256": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936" + } + }, + { + "operationId": "project-repository-unlink", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-repository-unlink" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRepositoryUnlinkRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRepositoryUnlinkResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRepositoryUnlinkSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "repository-association-added-or-removed", + "existing-task-bindings-never-silently-reassigned" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "association-identity", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Unfinished legacy work may prevent unlinking the default. Cross-repository automatic split/parent integration remains deferred (#2292).", + "implementation": { + "path": "core/src/host/project-lifecycle.js", + "sha256": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936" + } + }, + { + "operationId": "project-members", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-members" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectMembersRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectMembersResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectMembersSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-invite", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-invite" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectInviteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectInviteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectInviteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "invite", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "single-use-project-invitation-created" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-invitation", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Expires after 24h; project-join must be called by the actual invited human.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-join", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-join" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectJoinRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectJoinResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectJoinSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "valid-unused-project-invitation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "inviter-still-authorized", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "human-project-membership-created", + "invitation-consumed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "single-use-invitation", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-role", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-role" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoleRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoleResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoleSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "manage", + "humanRoles": [ + "owner" + ], + "condition": "current-Project-Owner-and-active-project; valid-Owner-watch-delegation-permitted-except-personal-confirmation-operations", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "human-membership-rank-may-change", + "queued-authority-revalidated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "same-rank", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "The shared Project access layer requires Owner manage permission. The underlying legacy role policy also supports self-demotion, but that does not bypass this public shared gateway gate. Owner cannot be assigned, removed or demoted.", + "implementation": { + "path": "core/src/host/project-service.js", + "sha256": "8ba30c1d7c066867eae06a6612d5bbba3bc2278f34fcf7f1c2242876565dba8f" + } + }, + { + "operationId": "project-member-remove", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-member-remove" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectMemberRemoveRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectMemberRemoveResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectMemberRemoveSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "remove-member-policy", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "self-nonowner-or-Owner-removes-Maintainer-or-manager-removes-Member", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "membership-and-scoped-grants-revoked", + "queue-and-private-execution-authority-revalidated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "membership-removal", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Owner cannot leave/be removed; removing Maintainer requires Owner, removing Member requires invite authority. Existing unknown worker exit is not fabricated.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-leave", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-leave" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectLeaveRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectLeaveResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectLeaveSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "membership-and-scoped-grants-revoked", + "queue-and-private-execution-authority-revalidated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "membership-removal", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Owner cannot leave/be removed; removing Maintainer requires Owner, removing Member requires invite authority. Existing unknown worker exit is not fabricated.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-quota", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-quota" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectQuotaRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectQuotaResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectQuotaSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "project-concurrency-updated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "same-setting", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-archive", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-archive" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectArchiveRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectArchiveResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectArchiveSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-owner", + "humanRoles": [ + "owner" + ], + "condition": "Owner-personally; primary-owner-required-by-legacy-lifecycle", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-owner", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "project-active-to-archived" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Project", + "from": [ + "active" + ], + "to": [ + "archived" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-lifecycle", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Legacy Owner-only lifecycle; this is not Owner double-confirmed project closure. Closed Projects retain their lifecycle/history and refuse these operations.", + "implementation": { + "path": "core/src/host/project-service.js", + "sha256": "8ba30c1d7c066867eae06a6612d5bbba3bc2278f34fcf7f1c2242876565dba8f" + } + }, + { + "operationId": "project-delete", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-delete" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectDeleteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectDeleteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectDeleteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-owner", + "humanRoles": [ + "owner" + ], + "condition": "Owner-personally; primary-owner-required-by-legacy-lifecycle", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-owner", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "project-tombstoned-with-history-retained" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Project", + "from": [ + "active", + "archived" + ], + "to": [ + "deleted" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-lifecycle", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Legacy Owner-only lifecycle; this is not Owner double-confirmed project closure. Closed Projects retain their lifecycle/history and refuse these operations.", + "implementation": { + "path": "core/src/host/project-service.js", + "sha256": "8ba30c1d7c066867eae06a6612d5bbba3bc2278f34fcf7f1c2242876565dba8f" + } + }, + { + "operationId": "project-close-request", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-close-request" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectCloseRequestRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectCloseRequestResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectCloseRequestSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "closure-suggestion", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "manager-or-authorized-active-personal-agent; suggestion-only", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "maintainer-or-owner-or-scoped-personal-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "closure-suggestion-recorded-no-closure" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-suggestion", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-lifecycle.js", + "sha256": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936" + } + }, + { + "operationId": "project-close-prepare", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-close-prepare" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectClosePrepareRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectClosePrepareResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectClosePrepareSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-owner", + "humanRoles": [ + "owner" + ], + "condition": "Owner-personally; primary-owner-required-by-legacy-lifecycle", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-owner", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "owner-bound-15-minute-state-bound-confirmation-created" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-challenge-invalidates-previous", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-lifecycle.js", + "sha256": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936" + } + }, + { + "operationId": "project-close-confirm", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-close-confirm" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectCloseConfirmRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectCloseConfirmResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectCloseConfirmSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-owner", + "humanRoles": [ + "owner" + ], + "condition": "Owner-personally; primary-owner-required-by-legacy-lifecycle", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-project-owner", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "unexpired-current-owner-confirmation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "unchanged-project-basis", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "project-active-to-closed", + "final-record-and-unfinished-tasks-retained", + "new-work-refused-no-worker-exit-claim" + ], + "effectsAreConditional": true, + "transitions": [ + { + "entity": "Project", + "from": [ + "active" + ], + "to": [ + "closed" + ], + "conditional": true + } + ], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "same-owner-confirmation-replay", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-lifecycle.js", + "sha256": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936" + } + }, + { + "operationId": "workbench-state", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "workbench-state" + }, + "requestSchema": { + "$ref": "#/components/schemas/WorkbenchStateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/WorkbenchStateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/WorkbenchStateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "session", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "authenticated-active-principal; Project-scoped reads still filter membership", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/workbench-state.js", + "sha256": "be02e9b796f315d529e09b3c53a1804a7a5d92c389a34c8f1017fcc03b114d0b" + } + }, + { + "operationId": "project-resources", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-resources" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectResourcesRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectResourcesResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectResourcesSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/workbench-state.js", + "sha256": "be02e9b796f315d529e09b3c53a1804a7a5d92c389a34c8f1017fcc03b114d0b" + } + }, + { + "operationId": "project-agents", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agents" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "view-must-be-summary", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "human-full-view-may-materialize-own-carriers" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "FBA may only use view=summary, which never borrows native private history. Use v1 roles and consultations for external agents.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-agent-message", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-message" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentMessageRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentMessageResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentMessageSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-conversation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only; own-private-or-explicitly-approved-public-conversation", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "public-message-explicit-publication-approved", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "conversation-message-queued" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-message", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-agent-history", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-history" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentHistoryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentHistoryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentHistorySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Default latest50; byte-budgeted messages, oversized records use messageIndex source pages. Snapshot prefix survives append, edits invalidate cursor. Private defaults to the current human.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-agent-memory-write", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-memory-write" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentMemoryWriteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentMemoryWriteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentMemoryWriteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "own-private-project-memory-version-added" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "append-memory", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-role-memory-write", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-role-memory-write" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoleMemoryWriteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoleMemoryWriteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoleMemoryWriteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "public-role-memory-version-added" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "memory-content-deduplication", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Human facts and role-authored inference have distinct authority. Updates retain history; memory is not permission.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-agent-definition", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-definition" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentDefinitionRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentDefinitionResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentDefinitionSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "approved-role-definition-revision-updated", + "existing-active-sessions-remain-frozen" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "versioned-definition-update", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Edit an existing role under current governance. Addition/removal requires Chief proposal and separate approval; never remove the resident Chief.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + } + }, + { + "operationId": "project-knowledge-write", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-knowledge-write" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectKnowledgeWriteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectKnowledgeWriteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectKnowledgeWriteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "checkpoint-supersedes-requires-configure-and-exact-source-hashes", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "shared-knowledge-or-exact-source-checkpoint-added" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "append-record", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-chief-question", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-chief-question" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectChiefQuestionRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectChiefQuestionResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectChiefQuestionSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "private-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-active-private-personal-agent-participation", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-active-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-consultation-enqueued-no-task-or-task-initiative-change" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": true, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "exact-conversation-requestId", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "External agents should prefer v1 consultation.ask. A consultation is not a Task handoff.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-agent-stop", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-stop" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentStopRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentStopResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentStopSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "conversation-initiator-or-manager", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "matching-conversation-initiator-or-current-manager; native-stop-private-owner-checks", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "conversation-stop-requested-exit-still-must-be-confirmed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stop-request", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-rooms", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-rooms" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoomsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoomsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoomsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-rooms.js", + "sha256": "148ba6f39086dc74e0c9c92ab368361b256b5185490d7983e957dd28890cfbe9" + } + }, + { + "operationId": "project-room-read", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-room-read" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoomReadRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoomReadResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoomReadSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "room-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-rooms.js", + "sha256": "148ba6f39086dc74e0c9c92ab368361b256b5185490d7983e957dd28890cfbe9" + } + }, + { + "operationId": "project-room-create", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-room-create" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoomCreateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoomCreateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoomCreateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "approved-active-roles", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "all-room-humans-current-project-members", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "creator-in-nonempty-member-list", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "project-room-created" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-room", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-rooms.js", + "sha256": "148ba6f39086dc74e0c9c92ab368361b256b5185490d7983e957dd28890cfbe9" + } + }, + { + "operationId": "project-room-message", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-room-message" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoomMessageRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoomMessageResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoomMessageSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "room-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "documents-in-same-room", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "text-plus-document-budget-at-most-8000", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "room-message-appended", + "selected-room-roles-may-respond" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-message", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-rooms.js", + "sha256": "148ba6f39086dc74e0c9c92ab368361b256b5185490d7983e957dd28890cfbe9" + } + }, + { + "operationId": "project-room-attachment", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-room-attachment" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoomAttachmentRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoomAttachmentResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoomAttachmentSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "room-read-or-create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-room-participant; creation-also-needs-active-project-create", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "room-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "read-existing-id-or-create-with-current-create-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "create-branch-adds-text-document" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-or-new-document", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-rooms.js", + "sha256": "148ba6f39086dc74e0c9c92ab368361b256b5185490d7983e957dd28890cfbe9" + } + }, + { + "operationId": "project-room-stop", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-room-stop" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoomStopRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoomStopResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoomStopSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "conversation-initiator-or-manager", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "matching-conversation-initiator-or-current-manager; native-stop-private-owner-checks", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "room-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-execution-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "room-role-stop-requested" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stop-request", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + } + }, + { + "operationId": "project-resource-environment-check", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-resource-environment-check" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectResourceEnvironmentCheckRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectResourceEnvironmentCheckResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectResourceEnvironmentCheckSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "operator-provisioned-resource", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "resource-environment-health-refreshed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "bounded-probe", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-resources.js", + "sha256": "64b2abadc7900ca005b1b90217e8f512e867932c92e4033904417878fa3112ce" + } + }, + { + "operationId": "project-runtime-check", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-runtime-check" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRuntimeCheckRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRuntimeCheckResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRuntimeCheckSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "authorized-resource-harness", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-owner-profile-and-model", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "connection-health-refreshed", + "temporary-probe-lease-acquired-and-confirmed-released" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "coalesced-short-lived-probe", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "Can invoke paid minimal inference. ready means connectivity only, not task execution.", + "implementation": { + "path": "core/src/host/project-runtime-setup.js", + "sha256": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0" + } + }, + { + "operationId": "project-terminal-open", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-terminal-open" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTerminalOpenRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTerminalOpenResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTerminalOpenSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-resource-admin", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "live-human-session-and-explicit-resource-adminMemberIds", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "live-human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-resource-admin-grant", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "authorized-resource-harness", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "at-most-two-own-open-terminals", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-configuration-pty-opened" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-terminal", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "FBA tokens have no live human Session and cannot use this endpoint, including watch mode.", + "implementation": { + "path": "core/src/host/project-runtime-setup.js", + "sha256": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0" + } + }, + { + "operationId": "project-terminal-poll", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-terminal-poll" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTerminalPollRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTerminalPollResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTerminalPollSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-resource-admin", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "live-human-session-and-explicit-resource-adminMemberIds", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "same-live-human-session-that-opened-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "unexpired-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-explicit-resource-admin-grant", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "terminal-heartbeat-refreshed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "terminal-control", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-runtime-setup.js", + "sha256": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0" + } + }, + { + "operationId": "project-terminal-input", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-terminal-input" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTerminalInputRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTerminalInputResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTerminalInputSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-resource-admin", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "live-human-session-and-explicit-resource-adminMemberIds", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "same-live-human-session-that-opened-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "unexpired-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-explicit-resource-admin-grant", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "terminal-input-or-size-updated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "non-idempotent-input-never-blindly-retry", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-runtime-setup.js", + "sha256": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0" + } + }, + { + "operationId": "project-terminal-resize", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-terminal-resize" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTerminalResizeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTerminalResizeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTerminalResizeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-resource-admin", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "live-human-session-and-explicit-resource-adminMemberIds", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "same-live-human-session-that-opened-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "unexpired-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-explicit-resource-admin-grant", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "terminal-input-or-size-updated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "terminal-control", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-runtime-setup.js", + "sha256": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0" + } + }, + { + "operationId": "project-terminal-close", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-terminal-close" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTerminalCloseRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTerminalCloseResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTerminalCloseSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-resource-admin", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "live-human-session-and-explicit-resource-adminMemberIds", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "same-live-human-session-that-opened-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "unexpired-terminal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-explicit-resource-admin-grant", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "terminal-stop-and-release-requested" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "terminal-control", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-runtime-setup.js", + "sha256": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0" + } + }, + { + "operationId": "task-update", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "task-update" + }, + "requestSchema": { + "$ref": "#/components/schemas/TaskUpdateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/TaskUpdateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/TaskUpdateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "project-requirements-unchanged-without-chief", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "column-transition-valid-for-task-contract", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "task-editable-metadata-updated" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-update-no-unified-command-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "New Task requirements changes use v1 task.change.request. This native interface cannot impersonate Chief or close new Tasks.", + "implementation": { + "path": "core/src/host/tasks.js", + "sha256": "c4d1e376b3de2c023d2c3debaa328d56cd2f245fcd2bcb5695f73360b608f130" + } + }, + { + "operationId": "task-cancel", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "task-cancel" + }, + "requestSchema": { + "$ref": "#/components/schemas/TaskCancelRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/TaskCancelResult" + }, + "successSchema": { + "$ref": "#/components/schemas/TaskCancelSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "task-requester", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "legacy-task-or-chief-approved-lifecycle", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-task-cancelled-if-transition-allowed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-transition", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Use v1 task.change.request action=cancel for new Chief-governed Tasks.", + "implementation": { + "path": "core/src/host/tasks.js", + "sha256": "c4d1e376b3de2c023d2c3debaa328d56cd2f245fcd2bcb5695f73360b608f130" + } + }, + { + "operationId": "task-answer-input", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "task-answer-input" + }, + "requestSchema": { + "$ref": "#/components/schemas/TaskAnswerInputRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/TaskAnswerInputResult" + }, + "successSchema": { + "$ref": "#/components/schemas/TaskAnswerInputSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "task-requester", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-current-task-input-question", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "no-pending-approval", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "task-input-answer-recorded-and-working-resumed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "exact-pending-question-once", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/tasks.js", + "sha256": "c4d1e376b3de2c023d2c3debaa328d56cd2f245fcd2bcb5695f73360b608f130" + } + }, + { + "operationId": "project-credential-status", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-credential-status" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectCredentialStatusRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectCredentialStatusResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectCredentialStatusSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "No token/password/config path is returned. Native FBA gate requires watch even though domain action is read.", + "implementation": { + "path": "core/src/host/project-credentials.js", + "sha256": "17ba1d326787c47d8669d0d3ef269e50a97a67eb8413183ff940a3993daab5ff" + } + }, + { + "operationId": "project-github-read", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-github-read" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectGithubReadRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectGithubReadResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectGithubReadSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "configured-explicit-scoped-github-credential", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "verified-selected-github-login", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Only current default repository; bounded upstream GitHub projection. data varies by operation and is external untrusted JSON. Native FBA gate currently requires watch.", + "implementation": { + "path": "core/src/host/project-github-read.js", + "sha256": "9baf5fb71e80a55a9297592ba24327af7b48b373eddb7ee24a74b55075b66146" + } + }, + { + "operationId": "personal-space.list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "list" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.read", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "read" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceReadRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceReadResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceReadSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "owned-personal-bot-or-visible-original-group", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.send", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "send" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceSendRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceSendResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceSendSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "owned-personal-bot-or-visible-original-group", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "at-most-four-total-attachments-and-512KiB-total-decoded", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "no-unshareable-session-reference", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "original-personal-message-or-group-turn-enqueued" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "new-message-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "Read native history to observe the response; send acknowledgement is not completion.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.stop", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "stop" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceStopRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceStopResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceStopSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "owned-personal-bot-or-visible-original-group", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "owned-native-conversation-cancel-requested" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stop-request", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.member-stop", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "member-stop" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceMemberStopRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceMemberStopResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceMemberStopSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "owned-personal-bot-or-visible-original-group", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "own-original-group-worker-stop-requested" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "stop-request", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.answer", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "answer" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceAnswerRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceAnswerResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceAnswerSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-current-native-question", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "original-question-resolved" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "pending-question-once", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.dismiss", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "dismiss" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceDismissRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceDismissResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceDismissSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-current-native-question", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "original-question-resolved" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "pending-question-once", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.approval", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "approval" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceApprovalRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceApprovalResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceApprovalSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-current-native-approval", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "original-tool-approval-resolved" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "pending-approval-once", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.memory", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "memory" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceMemoryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceMemoryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceMemorySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "owned-personal-bot-or-visible-original-group", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Own personal Bot memory only; never exposes another Bot/team private memory.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "personal-space.attachment-read", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "personal-space", + "operation": "attachment-read" + }, + "requestSchema": { + "$ref": "#/components/schemas/PersonalSpaceAttachmentReadRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/PersonalSpaceAttachmentReadResult" + }, + "successSchema": { + "$ref": "#/components/schemas/PersonalSpaceAttachmentReadSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "visible-exact-original-message-attachment", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "registered-attachment-at-most-512KiB", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "No host path, arbitrary URL or arbitrary attachment ID.", + "implementation": { + "path": "core/src/host/channel.js", + "sha256": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d" + } + }, + { + "operationId": "project-workflow.state", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "state" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowStateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowStateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowStateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.templates", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "templates" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowTemplatesRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowTemplatesResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowTemplatesSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.create", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "create" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowCreateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowCreateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowCreateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-create" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.graph", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "graph" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowGraphRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowGraphResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowGraphSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "not-an-immutable-delivery-workflow", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-graph" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.concurrency", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "concurrency" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowConcurrencyRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowConcurrencyResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowConcurrencySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "not-an-immutable-delivery-workflow", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-concurrency" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.set-model", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "set-model" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowSetModelRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowSetModelResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowSetModelSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "not-an-immutable-delivery-workflow", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-set-model" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.step-timeout", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "step-timeout" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowStepTimeoutRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowStepTimeoutResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowStepTimeoutSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "not-an-immutable-delivery-workflow", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-step-timeout" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.assign", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "assign" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowAssignRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowAssignResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowAssignSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "legacy-task-only-public-assignment", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "task-write-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "project-capacity-available", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-assign" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.pause", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "pause" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowPauseRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowPauseResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowPauseSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "run-control", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-pause" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.resume", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "resume" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowResumeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowResumeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowResumeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "run-control", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-resume" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.reset", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "reset" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowResetRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowResetResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowResetSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "run-control", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "not-an-immutable-delivery-workflow", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-reset" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-workflow.delete", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-workflow", + "operation": "delete" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectWorkflowDeleteRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectWorkflowDeleteResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectWorkflowDeleteSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "workflow-and-run-in-same-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "not-an-immutable-delivery-workflow", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-workflow-delete" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "legacy-workflow-no-unified-receipt", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.", + "implementation": { + "path": "core/src/host/project-access.js", + "sha256": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9" + } + }, + { + "operationId": "project-consultation-reply", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-consultation-reply" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectConsultationReplyRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectConsultationReplyResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectConsultationReplySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-current-incoming-chief-question", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "publish-requires-human-or-valid-watch-and-task-write", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-reply-recorded", + "only-explicit-authorized-publication-adds-original-task-input" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + }, + "aliasOf": "development.command.consultation.reply" + }, + { + "operationId": "project-consultation-ask", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-consultation-ask" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectConsultationAskRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectConsultationAskResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectConsultationAskSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-active-private-participation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-consultation-created-no-task-initiative-change" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + }, + "aliasOf": "development.command.consultation.ask" + }, + { + "operationId": "project-consultation-get", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-consultation-get" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectConsultationGetRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectConsultationGetResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectConsultationGetSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-private-participation-or-fba-own-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + }, + "aliasOf": "development.query.consultation.get" + }, + { + "operationId": "project-consultation-list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-consultation-list" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectConsultationListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectConsultationListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectConsultationListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "own-consultation", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "own-agent-mailbox; never-other-agent-even-same-human", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-private-participation-or-fba-own-agent", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-consultations.js", + "sha256": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade" + }, + "aliasOf": "development.query.consultation.list" + }, + { + "operationId": "project-roles", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-roles" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRolesRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRolesResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRolesSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + }, + "aliasOf": "development.query.roles" + }, + { + "operationId": "project-role-proposals", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-role-proposals" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoleProposalsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoleProposalsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoleProposalsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + }, + "aliasOf": "development.query.role.proposals" + }, + { + "operationId": "project-role-decision", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-role-decision" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectRoleDecisionRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectRoleDecisionResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectRoleDecisionSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "committed-chief-role-proposal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-current-proposal-hash-and-catalog-revision", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "approver-not-chief-executor", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "role-proposal-approved-or-rejected", + "approved-catalog-version-may-change" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-role-governance.js", + "sha256": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005" + }, + "aliasOf": "development.command.role.decide" + }, + { + "operationId": "project-handoff-get", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-handoff-get" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectHandoffGetRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectHandoffGetResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectHandoffGetSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-pools.js", + "sha256": "afab16b3df4d18a5bfab69c975e8d61346a7838438a634668f2b06425545f237" + }, + "aliasOf": "development.query.handoff.get" + }, + { + "operationId": "project-handoff-list", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-handoff-list" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectHandoffListRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectHandoffListResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectHandoffListSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Read-only transport/initiative history; it is not role claim acceptance.", + "implementation": { + "path": "core/src/host/project-pools.js", + "sha256": "afab16b3df4d18a5bfab69c975e8d61346a7838438a634668f2b06425545f237" + }, + "aliasOf": "development.query.handoff.list" + }, + { + "operationId": "task-create", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "task-create" + }, + "requestSchema": { + "$ref": "#/components/schemas/TaskCreateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/TaskCreateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/TaskCreateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "task-proposed-with-stable-project-identity", + "durable-chief-intake-staged" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "criteria and impact must be nonempty before Chief admission. Ordinary inquiries use consultation.ask; shared publication by safe FBA is refused.", + "implementation": { + "path": "core/src/host/tasks.js", + "sha256": "c4d1e376b3de2c023d2c3debaa328d56cd2f245fcd2bcb5695f73360b608f130" + }, + "aliasOf": "development.command.task.propose" + }, + { + "operationId": "project-task-run", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-task-run" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTaskRunRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTaskRunResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTaskRunSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "stable-requestId", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "no-conflicting-live-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "approved-initial-role", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "repository-and-resource-provisioned-or-local-repository-free-decision", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "unadmitted-task-submitted-to-chief-or-approved-task-queued", + "initial-role-and-repository-version-bound", + "attempt-may-start-asynchronously" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "Never bypasses Chief. Capacity busy means queue, not permission to create another Task. Cross-repository auto-split remains deferred.", + "implementation": { + "path": "core/src/host/project-scheduler.js", + "sha256": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee" + }, + "aliasOf": "development.command.task.run" + }, + { + "operationId": "project-task-detail", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-task-detail" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTaskDetailRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTaskDetailResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTaskDetailSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + }, + "aliasOf": "development.query.task.detail" + }, + { + "operationId": "project-task-accept", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-task-accept" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTaskAcceptRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTaskAcceptResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTaskAcceptSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "accept", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "legacy-only; new Task completion requires host-authenticated Chief", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "legacy-task-human-acceptance-only", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-verified-current-candidate-tests-review-and-pr", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "legacy-attempt-and-task-accepted" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "New Project Task contracts require actual Chief adjudication; third-party clients cannot forge Chief credentials.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + }, + "aliasOf": "development.command.task.accept" + }, + { + "operationId": "project-task-reject", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-task-reject" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTaskRejectRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTaskRejectResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTaskRejectSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "accept", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "legacy-only; new Task completion requires host-authenticated Chief", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-attempt-and-confirmed-exit", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "attempt-returned-evidence-preserved", + "rework-follows-current-task-contract" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + }, + "aliasOf": "development.command.task.reject" + }, + { + "operationId": "project-attempt-stop", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-attempt-stop" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAttemptStopRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAttemptStopResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAttemptStopSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-run-control-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "stop-requested-unknown-exit-retains-capacity" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + }, + "aliasOf": "development.command.attempt.stop" + }, + { + "operationId": "project-attempt-cleanup", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-attempt-cleanup" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAttemptCleanupRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAttemptCleanupResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAttemptCleanupSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "terminal-attempt-and-confirmed-worker-release", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "only-owned-released-workspaces-cleaned-history-retained" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + }, + "aliasOf": "development.command.attempt.cleanup" + }, + { + "operationId": "project-release-request", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-release-request" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectReleaseRequestRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectReleaseRequestResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectReleaseRequestSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "chief-admitted-current-running-release-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "sha-equals-pinned-attempt-base", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-github-release-provider-and-private-credential-configured", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-human-or-full-watch-manager-authority-not-chief", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "durable-release-authorization-recorded", + "observe-default-never-publishes", + "explicit-publish-may-create-real-external-release" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Can perform irreversible external publication only when mode=publish is explicitly sent. Does not merge, upload assets or deploy. Unknown results must reconcile.", + "implementation": { + "path": "core/src/host/project-releases.js", + "sha256": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4" + }, + "aliasOf": "development.command.release.request" + }, + { + "operationId": "project-release-reconcile", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-release-reconcile" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectReleaseReconcileRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectReleaseReconcileResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectReleaseReconcileSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "existing-current-release-request", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "original-authority-and-binding-still-valid", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "existing-external-result-observed-never-repeat-post" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-releases.js", + "sha256": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4" + }, + "aliasOf": "development.command.release.reconcile" + }, + { + "operationId": "project-release-status", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-release-status" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectReleaseStatusRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectReleaseStatusResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectReleaseStatusSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-release-task-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-releases.js", + "sha256": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4" + }, + "aliasOf": "development.query.release.status" + }, + { + "operationId": "project-attempt-publication-retry", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-attempt-publication-retry" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAttemptPublicationRetryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAttemptPublicationRetryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAttemptPublicationRetrySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "same-current-candidate-and-original-pr-binding", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "existing-publication-reconciled-no-second-pr" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + }, + "aliasOf": "development.command.attempt.publication-retry" + }, + { + "operationId": "project-attempt-log", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-attempt-log" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAttemptLogRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAttemptLogResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAttemptLogSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "UTF-8 byte offsets, not character offsets; nextOffset preserves character boundaries. Rechecks rights after source I/O. No caller path.", + "implementation": { + "path": "core/src/host/project-delivery.js", + "sha256": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565" + }, + "aliasOf": "development.query.attempt.log" + }, + { + "operationId": "project-queue-cancel", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-queue-cancel" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectQueueCancelRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectQueueCancelResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectQueueCancelSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-task-or-project-manager", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "waiting-or-blocked-queue-entry", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "queue-entry-cancelled-no-worker-exit-claim" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-scheduler.js", + "sha256": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee" + }, + "aliasOf": "development.command.queue.cancel" + }, + { + "operationId": "project-queue-retry", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-queue-retry" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectQueueRetryRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectQueueRetryResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectQueueRetrySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "blocked-queue-entry", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "original-requester-still-authorized", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "no-active-attempt", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "repository-preflight", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-target-role", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "blocked-to-waiting-original-requester-retained", + "role-and-requirement-binding-explicitly-refreshed" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-scheduler.js", + "sha256": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee" + }, + "aliasOf": "development.command.queue.retry" + }, + { + "operationId": "project-chief-inspect", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-chief-inspect" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectChiefInspectRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectChiefInspectResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectChiefInspectSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "chief-policy-enabled", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "optional-task-belongs-to-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "one-scoped-chief-control-job-enqueued" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": true, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-chief-control.js", + "sha256": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758" + }, + "aliasOf": "development.command.chief.inspect" + }, + { + "operationId": "project-chief-configure", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-chief-configure" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectChiefConfigureRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectChiefConfigureResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectChiefConfigureSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "configurer-is-not-chief-executor", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-background-principal-check", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "chief-authority-policy-revision-updated", + "original-logical-schedule-configured" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "30-minute inspection is a configurable schedule default, not a framework deadline.", + "implementation": { + "path": "core/src/host/project-chief-control.js", + "sha256": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758" + }, + "aliasOf": "development.command.chief.configure" + }, + { + "operationId": "project-chief-state", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-chief-state" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectChiefStateRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectChiefStateResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectChiefStateSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-chief-control.js", + "sha256": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758" + }, + "aliasOf": "development.query.chief.state" + }, + { + "operationId": "project-scheduled-task", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-scheduled-task" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectScheduledTaskRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectScheduledTaskResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectScheduledTaskSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "configure", + "humanRoles": [ + "owner", + "maintainer" + ], + "condition": "current-manager-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "registered-logical-target", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "original-dsh-schedule-service-available", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "original-scheduled-task-created-updated-paused-or-deleted-no-second-timer-engine" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-scheduled-tasks.js", + "sha256": "f99a7e28a95c4525672c88059878ede4b88c45b5b668dfc25f3a1dd519bab3c0" + }, + "aliasOf": "development.command.schedule.configure" + }, + { + "operationId": "project-agent-mode", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-mode" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentModeRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentModeResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentModeSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "human-session", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "own-delegation-granted-or-revoked" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "Only the signed-in human may change delegation mode; even full watch agents cannot self-escalate or extend their own grant.", + "implementation": { + "path": "core/src/host/project-delegations.js", + "sha256": "d4d86192551994a3419e0d2ca0f64bc4d50a75960970d2b79ed9f97b82940903" + }, + "aliasOf": "development.command.agent.mode" + }, + { + "operationId": "project-agent-proposal-apply", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-agent-proposal-apply" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectAgentProposalApplyRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectAgentProposalApplyResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectAgentProposalApplySuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + } + ], + "permission": "human-self", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "human-only-and-own-personal-agent-or-session", + "personalAgent": { + "safe": false, + "watch": false, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "own-private-proposal", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "human-explicit-publication-approval", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "private-proposal-published-to-one-shared-task", + "private-conversation-not-copied" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-agents.js", + "sha256": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936" + }, + "aliasOf": "development.command.proposal.publish" + }, + { + "operationId": "project-execution-input", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-execution-input" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectExecutionInputRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectExecutionInputResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectExecutionInputSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "task-write", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-manager-or-task-requester; current-Task-contract-still-applies", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "current-task-write-authority", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "exact-worker-and-generation", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "permission-replies-also-require-configure", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "pending-executor-input-or-permission-resolved" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "payload.requestId identifies the original SDK permission question; outer requestId is the independent command receipt ID. A role string never grants execution identity.", + "implementation": { + "path": "core/src/host/project-harness.js", + "sha256": "8ee1d4040cff7ede7b4c540bb0b020061406bea718d649a7a7b1792c63cc1553" + }, + "aliasOf": "development.command.execution.input" + }, + { + "operationId": "project-task-pools", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-task-pools" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectTaskPoolsRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectTaskPoolsResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectTaskPoolsSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "read", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership", + "personalAgent": { + "safe": true, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "read-only", + "retry": "read-again-with-current-authorization-and-cursor", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "All current authorization, Project/Task bindings and domain fences are rechecked server-side.", + "implementation": { + "path": "core/src/host/project-development-service.js", + "sha256": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934" + }, + "aliasOf": "development.query.pools" + }, + { + "operationId": "project-github-comment", + "transport": { + "method": "POST", + "path": "/api/bot", + "endpoint": "project-github-comment" + }, + "requestSchema": { + "$ref": "#/components/schemas/ProjectGithubCommentRequest" + }, + "resultSchema": { + "$ref": "#/components/schemas/ProjectGithubCommentResult" + }, + "successSchema": { + "$ref": "#/components/schemas/ProjectGithubCommentSuccess" + }, + "errorSchema": { + "$ref": "#/components/schemas/DomainError" + }, + "security": [ + { + "memberSession": [] + }, + { + "personalAgentToken": [] + } + ], + "permission": "create", + "humanRoles": [ + "owner", + "maintainer", + "member" + ], + "condition": "current-project-membership-and-active-project", + "personalAgent": { + "safe": false, + "watch": true, + "checks": [ + "unexpired-unrevoked-token", + "enabled-current-owner-principal", + "active-agent", + "explicit-token-project-scope", + "active-agent-project-participation", + "current-owner-project-rights", + "writes-require-current-watch-grant-and-generation", + "all-operation-specific-domain-preconditions" + ] + }, + "effective": "intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name", + "preconditions": [ + { + "code": "current-project-membership", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "active-project", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "writable-store", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "explicit-current-human-personal-github-credential", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "verified-selected-github-login", + "enforcedBy": "server", + "clientCheckIsAuthority": false + }, + { + "code": "same-scoped-project-repository", + "enforcedBy": "server", + "clientCheckIsAuthority": false + } + ], + "stateChanges": { + "effects": [ + "durable-personal-github-comment-publication" + ], + "effectsAreConditional": true, + "transitions": [], + "noTaskCreated": false, + "acknowledgementIsCompletion": false + }, + "idempotency": { + "mechanism": "domain-specific-only-no-unified-command-receipt-use-v1", + "retry": "only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt", + "unifiedCommandReceipt": false + }, + "invokesModel": false, + "notes": "No ambient/project-owner credential fallback. External write; use the same requestId when a response is lost.", + "implementation": { + "path": "core/src/host/project-credentials.js", + "sha256": "17ba1d326787c47d8669d0d3ef269e50a97a67eb8413183ff940a3993daab5ff" + }, + "aliasOf": "development.command.comment.publish" + } + ], + "x-flybot-inventory": { + "endpoints": [ + "personal-agent-token-create", + "personal-agent-token-list", + "personal-agent-token-revoke", + "personal-agent-delegation-set", + "personal-agent-propose-task", + "personal-agent-history", + "personal-agent-create", + "personal-agent-read", + "personal-agent-list", + "personal-agent-join", + "personal-agent-default", + "personal-agent-participations", + "personal-agent-leave", + "personal-agent-retire", + "personal-space", + "auth-mode", + "platform-login", + "auth-whoami", + "auth-revoke", + "auth-invite", + "auth-redeem", + "workbench-state", + "project-repositories", + "project-repository-link", + "project-repository-unlink", + "project-close-request", + "project-close-prepare", + "project-close-confirm", + "projects", + "project-create", + "project-read", + "project-detail", + "project-board", + "project-members", + "project-role", + "project-invite", + "project-join", + "project-leave", + "project-member-remove", + "project-archive", + "project-delete", + "project-quota", + "project-resources", + "project-resource-environment-check", + "project-execution-input", + "project-runtime-check", + "project-terminal-open", + "project-terminal-poll", + "project-terminal-input", + "project-terminal-resize", + "project-terminal-close", + "project-queue-cancel", + "project-queue-retry", + "project-workflow", + "task-create", + "task-update", + "task-cancel", + "task-answer-input", + "project-task-run", + "project-task-detail", + "project-task-accept", + "project-task-reject", + "project-attempt-stop", + "project-release-request", + "project-release-reconcile", + "project-release-status", + "project-attempt-log", + "project-attempt-cleanup", + "project-attempt-publication-retry", + "project-rooms", + "project-room-create", + "project-room-read", + "project-room-message", + "project-room-attachment", + "project-room-stop", + "project-agent-stop", + "project-agents", + "project-agent-message", + "project-agent-history", + "project-agent-memory-write", + "project-role-memory-write", + "project-agent-definition", + "project-roles", + "project-role-proposals", + "project-role-decision", + "project-development", + "project-task-pools", + "project-consultation-reply", + "project-consultation-ask", + "project-consultation-get", + "project-consultation-list", + "project-handoff-get", + "project-handoff-list", + "project-chief-question", + "project-github-read", + "project-agent-mode", + "project-chief-state", + "project-chief-configure", + "project-chief-inspect", + "project-scheduled-task", + "project-agent-proposal-apply", + "project-knowledge-write", + "project-credential-status", + "project-github-comment" + ], + "queries": [ + "release.status", + "compatibility", + "roles", + "role.proposals", + "consultation.get", + "consultation.list", + "handoff.get", + "handoff.list", + "task.history", + "project.snapshot", + "events", + "command.receipt", + "command.result", + "tasks", + "task", + "task.detail", + "inputs", + "sources", + "execution.boundary", + "effects", + "attempt.context", + "attempt.integration-state", + "attempt.log", + "chief.state", + "pools" + ], + "commands": [ + "consultation.reply", + "consultation.ask", + "role.decide", + "task.propose", + "task.change.request", + "task.run", + "task.accept", + "task.reject", + "attempt.stop", + "attempt.cleanup", + "attempt.integration-bind", + "release.request", + "release.reconcile", + "attempt.publication-retry", + "queue.cancel", + "queue.retry", + "chief.inspect", + "chief.configure", + "schedule.configure", + "agent.mode", + "proposal.publish", + "execution.input", + "input.publish", + "source.subscribe", + "source.disable", + "source.poll", + "effect.retry", + "comment.publish" + ], + "aliases": { + "consultation.reply": "project-consultation-reply", + "consultation.ask": "project-consultation-ask", + "consultation.get": "project-consultation-get", + "consultation.list": "project-consultation-list", + "roles": "project-roles", + "role.proposals": "project-role-proposals", + "role.decide": "project-role-decision", + "handoff.get": "project-handoff-get", + "handoff.list": "project-handoff-list", + "task.propose": "task-create", + "task.change.request": "project-task-change-request", + "task.run": "project-task-run", + "task.detail": "project-task-detail", + "task.accept": "project-task-accept", + "task.reject": "project-task-reject", + "attempt.stop": "project-attempt-stop", + "attempt.cleanup": "project-attempt-cleanup", + "attempt.integration-state": "project-attempt-integration-state", + "attempt.integration-bind": "project-attempt-integration-bind", + "release.request": "project-release-request", + "release.reconcile": "project-release-reconcile", + "release.status": "project-release-status", + "attempt.publication-retry": "project-attempt-publication-retry", + "attempt.log": "project-attempt-log", + "queue.cancel": "project-queue-cancel", + "queue.retry": "project-queue-retry", + "chief.inspect": "project-chief-inspect", + "chief.configure": "project-chief-configure", + "chief.state": "project-chief-state", + "schedule.configure": "project-scheduled-task", + "agent.mode": "project-agent-mode", + "proposal.publish": "project-agent-proposal-apply", + "execution.input": "project-execution-input", + "inputs": "project-task-inputs", + "input.publish": "project-task-input", + "sources": "project-sources", + "source.subscribe": "project-source-subscribe", + "source.disable": "project-source-disable", + "source.poll": "project-source-poll", + "execution.boundary": "project-execution-boundary", + "pools": "project-task-pools", + "effect.retry": "project-effect-retry", + "comment.publish": "project-github-comment" + }, + "fbaReads": [ + "project-handoff-get", + "project-handoff-list", + "project-consultation-get", + "project-consultation-list", + "projects", + "project-read", + "project-detail", + "project-board", + "project-members", + "project-repositories", + "project-task-detail", + "project-attempt-log", + "project-task-pools", + "project-chief-state" + ], + "fbaReserved": [ + "project-agent-mode", + "project-agent-proposal-apply", + "project-agent-message", + "project-agent-history", + "project-agent-memory-write", + "project-agent-stop", + "project-delete", + "project-archive", + "project-close-prepare", + "project-close-confirm" + ], + "nativeEndpointCount": 104, + "versionedQueryCount": 25, + "versionedCommandCount": 28, + "dispatchVariantCount": 176, + "sources": { + "core/src/host/agents.js": "79908a1904312d18b8ddac4bde534210eb1bc5f8e92136bbf35a3591042e9692", + "core/src/host/approvals.js": "0892ca1bad7c996854d91f56c57068e407b508ba8d42c34868a4eae221e30e2a", + "core/src/host/authz.js": "72e2313920028e7621de80201779c69d6406ab4e31e8a8ea73d2c81e4f67f86b", + "core/src/host/automation-default.js": "10eb9aa220983ad9f561f04d5bd88b5316f8d2a336ede511312445a0460e610b", + "core/src/host/browser.js": "5aaccf09cd9b1e65432c7d75fa0ee3cbf823b2b765ebf32f11f1df6c073d2d78", + "core/src/host/busy-ack.js": "19c5fd411e4a7b0b41e696cc8b602e9da27be6d70668ca9824861d16db3c2d27", + "core/src/host/capabilities.js": "c1a0a3746573fba088163f668eb6c09c76856f0ee33d1554c916dc47d0b9d90d", + "core/src/host/channel.js": "eb978b56b0fa016bc46c0dd16db76f76d43e33d58c12c2bb6ab727279f960c0d", + "core/src/host/chat-index.js": "cda0d84b97dd53132bcc74c5ba9d849a52c8a14bfecbce599dd0788a8306a1fb", + "core/src/host/connector-access.js": "43962b756d9e632ccd76c80a4557d232943b774585ccc05c8ac9c005fa0d284c", + "core/src/host/connectors.js": "2f05ffdfeac09227dff31e874de296899e2d8f0878865651fddc8bed90d65dbd", + "core/src/host/constants.js": "fdbedc1ca50f67f1b44ab5e553d8d25759e96c059202e32153372ebbf20893d3", + "core/src/host/decisions.js": "f1a6a3c2c52ebb71caae466765770e4077a3f38b43dde6aab112ce41a60ed359", + "core/src/host/delivery.js": "219d3715466350402991bf608f30c112790f19716d39a922d3ac44bf28ec8b20", + "core/src/host/diagnostics.js": "c1f20736776929b3ec1756ef83e11621a42da624993b4557cc8b24610af47aa0", + "core/src/host/dsh-update.js": "e04b66ad04feee3dea3e609e8128ae0aea751cdfc2d064155205259090fc16f7", + "core/src/host/experience.js": "a92fe9dfb32ab47b61e9854f9b59cfa1c43d66464debdb3e019884b5c2c26745", + "core/src/host/face-lead.js": "4f31d13ce86b76ca3d69471c937a6eea6c62054e0eb9f4f86dce0c6f18c46495", + "core/src/host/face-mentions.js": "3e1441c1909910b10c3752a664733454fdaf8c1a0ac00ce11424ce139a66228e", + "core/src/host/feishu-inbound.js": "fae668fdffd65351f40556b3046293fdf4455a0c4c8c2021be1ddc3175527ef5", + "core/src/host/feishu-sdk.js": "9864e69cae2a6b3b3bd59ef3fea8c992175c4433bd61f1df918b58af30fbfea8", + "core/src/host/flybot-feed.js": "42ea1503cb28e376a4de91bd634af29826588c42b8fb61dfb6b04c1b2e41b6ba", + "core/src/host/folders.js": "ec80523d0baf133658069ec1a9f45d3af3d0c7082a5c906308b3854093e103e3", + "core/src/host/groups.js": "d7f0175c8ad67522aca392d7e47f9d2773c02f525bd6f33d564cbec784217bbf", + "core/src/host/harness.js": "49e4b3ad56827d47cf8c5af99600026437c37a5e3b7e01bad2000983f6541af3", + "core/src/host/home-lock.js": "c4ad69a0a3a2726888b69ffc46a624644379960834f385d83b93f88b2f05fa04", + "core/src/host/hooks.js": "f5416b0a1006c919b99eeea2636c4bd22e63c937ff64e0fb26ac9cfbcb134170", + "core/src/host/images.js": "18579c262f130ffba10b51cf8f9562730f1ebfa3eff6321f698d72b537fae9d4", + "core/src/host/journal.js": "5050048eba15af5520664b7f40dbca1aa457f08c3bbf5ed2798fc99ee9d64906", + "core/src/host/meetings.js": "eb68d1cc18ed4370dc8271bd9620966aabb9d8c01001e19fbfc16124852bc063", + "core/src/host/member-auth.js": "01b2706be18c94cc7fa37a26381e788c07ff1013e0bed473f8c5ec340f27b485", + "core/src/host/memory-search.js": "a56a8290cbc2371f6e7e80fb218fad75e08ca8e10070262aadcf2f1306735664", + "core/src/host/memory.js": "bd0bb5c4066fec61a8480a4858914e701c4732f17f2a49a79d37c4eabf51f66f", + "core/src/host/models.js": "be25dbad08ac3d07fc4c0da5cb98646ff5eb19911858ea4a4caf76c2e93c202a", + "core/src/host/notify.js": "38d5a7d56fdc4f4d777211dda8bbd08685b8e97cfb210c77544a8d1c8e0903d9", + "core/src/host/parts.js": "5966cf7601c75a13ec25a83f093eabb82734208fce13e778b7182635fc5b650a", + "core/src/host/permissions.js": "829f2d2d639ec8652759824cf7a05f70ed62453009a86be9f31ecd1075f0ce8e", + "core/src/host/personal-agent-auth.js": "49de30b43c412e82fec792d75e98cad09d1c301bb1b78add34bfd68c10e6054e", + "core/src/host/personal-agents.js": "065e9a8bb9b686db1908c8ada67cd899709b28e574fdc74b5a361cad44c69651", + "core/src/host/platform-identity.js": "551795f4251cc705582560274eccf68a8955a26f51c807a74b8948261508a29e", + "core/src/host/plugin-model.js": "64477d6900bb6abea40c7ffe0e55d51e61e54bcfbe03e5d5a5e9647b40b69fc8", + "core/src/host/project-access.js": "24c368013b718205b75aaa62ba2eb8b315aad4d539d533e829b02a6ee53e5fa9", + "core/src/host/project-agent-context.js": "fea96ce858086e24bf9974099780c1494606289fbca9dab5becde302b86b0b0b", + "core/src/host/project-agent-skills.js": "6545f39aec7bbb8bd812558d37422fae1fa0e4fc7ab2fa02f1c50501d29c8445", + "core/src/host/project-agents.js": "3dd4b6bdda93a8077aac62fcf414aa35c126c751c4ed73178ab44135343e9936", + "core/src/host/project-assistant.js": "4fa4309d4aa7abf78b6ba4e55ba754f320384f931e0e4a5c6620c859e1b50676", + "core/src/host/project-board.js": "dfb0b4bc05ae42335632e3edbba883a03c5da2fb17899b23e8226320ea08aec4", + "core/src/host/project-chief-control.js": "548f4c906763f261bcaec96098e54bd5ea0d3945f315cdf461f90aa4da3aa758", + "core/src/host/project-chief.js": "a3f01a053177fd8f10d4b778d79ac98c25aee70aa3c4d967dc7e1da2aea2cf6e", + "core/src/host/project-child-inputs.js": "db1f534c4222dba1b500d308b1cd07f0df50a02eb228f520b150a3b79d6f126d", + "core/src/host/project-command-receipts.js": "e434e109dfb867cb3dd131f7ccfe045b5ce3a462ea1fdd68d431617c47fd63e2", + "core/src/host/project-compatibility.js": "4ab65df4a237fb55ea2c68396bd180bb0a9ed4c42dc63444ce4ef0869c8988bc", + "core/src/host/project-consultations.js": "3d4e42ecd18916054dafbc8741d1e14e9e8adee346ed90c1194d714b7bbb2ade", + "core/src/host/project-context-budget.js": "58f990182ec5efb2701603f024eec38749cbbfabd050e478e6def58312f460e1", + "core/src/host/project-context-memory.js": "933893b3d6b7b2c7a79365991c1303fb03a665d9529f16ccf57429a753ad4cd0", + "core/src/host/project-credentials.js": "17ba1d326787c47d8669d0d3ef269e50a97a67eb8413183ff940a3993daab5ff", + "core/src/host/project-delegations.js": "d4d86192551994a3419e0d2ca0f64bc4d50a75960970d2b79ed9f97b82940903", + "core/src/host/project-delivery-template.js": "daa5cc8185abc1ec84421ae3fcd5574a50573cfd1a7c4cb10941158e29c79a13", + "core/src/host/project-delivery.js": "088f77fb00768eeaa7adc4c629f6c850a2b24e0669eed46fd6fb32ed5682b565", + "core/src/host/project-development-service.js": "47a401da9df1cc1388f3e34b228305e9ea22e7f998df6f88bbbc5dab40aa0934", + "core/src/host/project-domain.js": "6d6a20727905005f7a8de0247a429a10ffbd1436773ee96a5d7615b2fb763e82", + "core/src/host/project-effects.js": "aa4b8f653a2dc72d5d80752857c49993d69295003ec132ccbae2ab2d1b0b42b1", + "core/src/host/project-execution-authority.js": "9c5ffb4bc9153d8f9d9e7901f7aef2aee90cacc19f19d8a0726ac0adb93e3e36", + "core/src/host/project-execution-boundary.js": "20fd2d7398c0e95f983da8b54635366864f233bf738add89122d7246473b3a65", + "core/src/host/project-execution-exit.js": "50f94881a40c2d0c6288fd081c885c7cabb71f8abec3a8c918e1c0bc852a04f7", + "core/src/host/project-execution-profile.js": "7106593979d6e21b9e1dab567c8628a7d0252976ed47d42dace337944725da59", + "core/src/host/project-git-sandbox.js": "b579b01dcce0708275e9f735d08932481369803382b8f7d24af69639608d724f", + "core/src/host/project-github-read.js": "9baf5fb71e80a55a9297592ba24327af7b48b373eddb7ee24a74b55075b66146", + "core/src/host/project-github.js": "35edca6a669d9004f920de30625a731964b62bb3f92c0399fa988158ece0c010", + "core/src/host/project-harness-turn.js": "a8ab111b8d5473a27413968e4ea5c2631ea472c992414e9387da245463f7b21a", + "core/src/host/project-harness.js": "8ee1d4040cff7ede7b4c540bb0b020061406bea718d649a7a7b1792c63cc1553", + "core/src/host/project-history-pages.js": "38958623f0aa98099e570559c55a207285fd0349689ffdcec47b965c40f4e1bc", + "core/src/host/project-inputs.js": "d6286e982ccccafe22db409e41a449f215363cd48672ff7b441930cdd6246e02", + "core/src/host/project-lifecycle.js": "055784e0a1cbf2a9e465e990c60fbd6df4b8844052db43bbcb7cae5de9282936", + "core/src/host/project-merge-heads.js": "9e5e39b8aaa191c2175feaafcf6524b8a16dbafdfa573f94222b9f71d8482074", + "core/src/host/project-metrics.js": "80f209d76955e5a3058fa66757543059fded1030625e5e155be5254494ce5264", + "core/src/host/project-native-sessions.js": "d8b796fce7a03252f7e6f10c2725ff97501ab4ba81492d8bdb8da1807a2db581", + "core/src/host/project-pools.js": "afab16b3df4d18a5bfab69c975e8d61346a7838438a634668f2b06425545f237", + "core/src/host/project-process-proof.js": "85f4ed03f5191b842ca899b712c99177c059658d43a66e8ddeedc1c06eafcdea", + "core/src/host/project-release-github.js": "05c4d93482d0600178951300b8e568a34687b552362d3278f57453c4d30a9ce3", + "core/src/host/project-releases.js": "e16a79b23aeded23023762bcca1aba4595dd02da86475c545d270e340cc1d4d4", + "core/src/host/project-repository-policy.js": "6ccc5d682016335c4e780a420a48e3ecee02c17315a76f89bacc72d49dfc5040", + "core/src/host/project-resource-workspaces.js": "4e505ca393f0741cdf781c63f14f0b064cef196553de3aa6caa07c1cba43ea5f", + "core/src/host/project-resources.js": "64b2abadc7900ca005b1b90217e8f512e867932c92e4033904417878fa3112ce", + "core/src/host/project-role-admission.js": "ccd5f3ac4a5d1f0010a3e533e6809b20a4f88551fc55e6c775d8289d8f9e100f", + "core/src/host/project-role-context.js": "e032b6c4e8b7a902c1dedc114782025d73c630d2419f912e10cbd103c8d7f69c", + "core/src/host/project-role-governance.js": "fe9ca70113666b0223f55b9225890609c5a1e7ddcb9b6105a3dc0edc3b2ef005", + "core/src/host/project-role-policy.js": "19f4b5275bf62d1f39c153e542ffd3eff0231168f5fc7da7e9c831789e41287e", + "core/src/host/project-rooms.js": "148ba6f39086dc74e0c9c92ab368361b256b5185490d7983e957dd28890cfbe9", + "core/src/host/project-runtime-setup.js": "7d4ff3f84c0b08540145b40c150262e8d85be957def7f14a06496064f20d51e0", + "core/src/host/project-scheduled-tasks.js": "f99a7e28a95c4525672c88059878ede4b88c45b5b668dfc25f3a1dd519bab3c0", + "core/src/host/project-scheduler.js": "40ca98a131d8aad4e2b354c8a0608a07e42cc24b2755ca13159be491d021f9ee", + "core/src/host/project-service-events.js": "71917d1ab367a9db8bef8c1d1003228255a57528e84a57e76de3a39d08ac28ec", + "core/src/host/project-service-sse.js": "df97d6b11156da885a6a47d50a4a77c8c99b6af5eb0066de14312cc512762297", + "core/src/host/project-service-views.js": "14aeffdf1aaa82c5402479ca4e6cd12359296cea6d442fa2305d41b79fb3fdb1", + "core/src/host/project-service.js": "8ba30c1d7c066867eae06a6612d5bbba3bc2278f34fcf7f1c2242876565dba8f", + "core/src/host/project-sources.js": "cf4c11c8e853f3091c4d159b850d06fe7e8bf291fdc616d251eb23d071d63403", + "core/src/host/project-state-format.js": "4838b344439e585287fdc25ef15cea44d7aff4199c7a380ebbfa8cfcdf24f678", + "core/src/host/project-state-migration.js": "128ab1a332ea809c961e20a449bd41d58e6556e37d0f36191be31b0a284d5872", + "core/src/host/project-state-sqlite.js": "64320c122c28577c03ce13962be629ede9dd938d4805f5f0b6f352806d559c91", + "core/src/host/project-state-storage.js": "94a9932c22f3f8e18f6952acb97b4323612294c6a10b493e1007de7f1b30b53d", + "core/src/host/project-state.js": "5d6736eeedcfc09a3949a33457a4d4daf3b3745bebe2823d7852fd5c48f1b825", + "core/src/host/project-task-lifecycle.js": "d5d93bf7b841dd1685b3889dca11c8303071764f856d0e10e82dd96adafd5f57", + "core/src/host/project-task-repository.js": "6dcba5646b406acae23d269276d58bc7b2591ca7d5589ed88ad556a0d5b65980", + "core/src/host/project-task-sessions.js": "fa33428ce5d4446d230e28569b8a8b0484810e0ddc0129cbb17c7de20e0b43bf", + "core/src/host/project-team.js": "72c3975a4fed654f3750e82a9388320934be7cf322b05cd59bbac26d6e4ede77", + "core/src/host/project-test-diagnostics.js": "fed63d4c8631ba8d5dcf39764829bb4c0fe9fb28d7e95b61ed232a21d48c4957", + "core/src/host/prompt.js": "919e8c5b28c27af6b9570a7be22609230ea4395d3fd4b7215083f9bc25978d72", + "core/src/host/reach.js": "0b8f2868b36d99ccf896605685a82bcb20f670e092feec24560ff19a2a20824e", + "core/src/host/remote-chat.js": "7b83196031e922af5b44419dde60a66e414a8326bbeb641c69593667442fa81d", + "core/src/host/resume.js": "edd0c1d797b6cb22116e7aa29af0aa22c84b08e2b74b6308131ab8582db36631", + "core/src/host/room-context.js": "6f63aa06ce07f352b43a6f5552a7aff35531484a52acf3f5c35344a08f546be1", + "core/src/host/room-membership.js": "5600c76d407543496bc070d41d268524ad0f5579299aa53cb671238b9f29f357", + "core/src/host/room-participant-external.js": "7524106b32f8fa59922b62798f37a1b2807643e3b52c2d75dd5f4b0b00e23b9c", + "core/src/host/room-participant.js": "38aaf8a02d1c0faf861aef10d3658e73589b4d2a93024e3bf07ef2a10c459622", + "core/src/host/roster.js": "9b4bf26bf6de08d0d8483d1ed3f387f6e2bdac0365d3ce015d5a46725fa6cbab", + "core/src/host/schedules.js": "dec7085301cf6f8bd23c53eb52cdc6e6c643850d2ac66688ea88457d0a37c9ae", + "core/src/host/secrets.js": "4cfa86b96a720395680680b3cce2aa63c6c6133ae2faffddc65cc56041f0371d", + "core/src/host/steering-interrupt.js": "f9bcf7df56303c217abedc96f98a98d4e2e668bb17d9510ada7debd3a8ed207d", + "core/src/host/steward.js": "9a49eb851bf12df9f35fbf4870ca8d2355dbd5338c7e40d8b57bb9bd44d58e88", + "core/src/host/store.js": "c37d7e93ad182d32f1d316efdf4ad9e8097c23c43e83a56184ce2e44a4e726e4", + "core/src/host/task-drive.js": "c6e31e5c6277e7088e7ffabf6c0b8accefddf87ae4580e3550b5845efcc97aa3", + "core/src/host/tasks.js": "c4d1e376b3de2c023d2c3debaa328d56cd2f245fcd2bcb5695f73360b608f130", + "core/src/host/text.js": "709b3882356fc10d367533634e021b979a18db0e8127ac6cac59efe8e7e06c18", + "core/src/host/time-context.js": "b77c7b4d5d3ea5f11600f7658fb269ad573b5735cfc919587d2e1b1b15f12a93", + "core/src/host/tool-schema.js": "8cd805a047016116a64b9dec481347e0aa63f4826f4e5e005a58ce9f94506f11", + "core/src/host/tools.js": "432a23262f9b702acf0d5628c0e7287f58d3eb7f04287d0b11df6695101640e5", + "core/src/host/turn-origin.js": "6a4e852efc1a0774ac6b8848385c9bcd30b8cc4ed78f936b19b4632cf9c4894c", + "core/src/host/turns.js": "726d2ccf6d38ae409560742608d2aea55d4bb1ea0bef74f073396a74da687d18", + "core/src/host/update.js": "8b049ec4e2d5d07d747312e3ff8c1560d7e3681e5b41dd867cd0961c5675a2be", + "core/src/host/usage.js": "fff9a097cc3ac4b2fe4fd2cebdd1a3b24fbf82b63535d8cf274b0025e0d2b0f3", + "core/src/host/work-dispatch.js": "bef48285a381a6bbc7e1c162656316c4769cca76fd44da0e4fcfed54fe38d641", + "core/src/host/workbench-gateway.js": "6c2beeec490557816d5a82c8992048e43b1ec39e3d40d85bcfc027684f8a65b4", + "core/src/host/workbench-personal.js": "4282e3983f8f5cba0e61f288bddcba7f8e44eab92fbffbc604acac55defdc301", + "core/src/host/workbench-state.js": "be02e9b796f315d529e09b3c53a1804a7a5d92c389a34c8f1017fcc03b114d0b", + "core/src/host/workflow-facts.js": "f2ff8392df1d0f927dd3bc2fb6ed1fde0bb31b5a8d590725963134b73f09fe76", + "core/src/host/workflow-store.js": "917662ab929311d4fbe7937aec42589478a03f4baed3cb010255d8a05ecb1261", + "core/src/shared/project-policy.js": "7c9e69378c7f8a52b1a2cb538858d670411930d7439ca4d0589f9ce41d6146ed", + "plugins/workflow/src/service.js": "5395b4f99e937b98cfa5fde0cb559be095e8fb0194a22cd00738d58808ee38c3" + } + }, + "x-flybot-client-profile": { + "requestUnknownFields": "refused-by-this-canonical-client-schema; legacy-server-may-ignore-or-coerce-fields", + "responseUnknownFields": "preserved-and-ignored-unless-understood", + "schemaIsAuthorization": false, + "time": "epoch-milliseconds-unless-described-as-ISO8601", + "textOffsets": "UTF-16-code-units-for-SourcePage; UTF-8-bytes-for-attempt.log", + "confidentiality": "never-share-private-history-sessions-raw-credentials-or-owner-cookie", + "errors": { + "domain": "HTTP200 ok=false error.code/message; details may be present", + "gateway": "non-2xx {error:string}", + "sse": "before-stream domain error envelope; after-stream terminal SSE control event" + } + }, + "x-flybot-workflows": [ + { + "id": "human-provisions-independent-agent", + "actor": "human", + "steps": [ + "auth-mode", + "platform-login OR auth-redeem OR private-local-operator-bootstrap", + "project-join OR project-create OR existing-project-membership", + "personal-agent-create", + "personal-agent-join", + "personal-agent-token-create", + "optional:personal-agent-delegation-set(mode=watch)" + ], + "tokenDelivery": "private-out-of-band; raw token returned once; no secrets in URL/logs" + }, + { + "id": "safe-bot-consults-and-proposes", + "actor": "personal-agent-safe", + "steps": [ + "auth-whoami", + "projects", + "development.query.roles", + "development.command.consultation.ask", + "development.query.consultation.get", + "personal-agent-propose-task" + ], + "approvalBoundary": "human publishes proposal via development.command.proposal.publish; ordinary consultation never creates a Task" + }, + { + "id": "watch-bot-publishes-project-work", + "actor": "personal-agent-watch", + "steps": [ + "auth-whoami", + "development.command.task.propose", + "development.query.command.receipt", + "development.query.task", + "development.command.task.run", + "development.query.events OR streamProjectEvents", + "development.query.task.detail" + ], + "completion": "observe actual Chief adjudication and current evidence; enqueue/receipt/SDK completion never equals Task closure" + }, + { + "id": "recover-lost-command-response", + "actor": "original-command-principal", + "steps": [ + "development.query.command.receipt", + "development.query.command.result", + "retry-original-command-with-identical-requestId-and-payload-only-if-contract-permits" + ], + "forbidden": [ + "new-requestId-for-same-unknown-external-write", + "replace-role-claim-from-event-notification" + ] + } + ], + "x-flybot-examples": [ + { + "id": "discover-login-mode", + "actor": "anonymous", + "request": { + "endpoint": "auth-mode", + "payload": {} + } + }, + { + "id": "existing-platform-login", + "actor": "human", + "request": { + "endpoint": "platform-login", + "payload": { + "email": "user@example.invalid", + "password": "REPLACE_PRIVATELY" + } + }, + "secretHandling": "Never commit or log the substituted password or response.sessionToken." + }, + { + "id": "redeem-native-human-invitation", + "actor": "anonymous", + "request": { + "endpoint": "auth-redeem", + "payload": { + "token": "PRIVATE_OPERATOR_INVITATION", + "displayName": "Example member" + } + } + }, + { + "id": "create-external-agent", + "actor": "human", + "request": { + "endpoint": "personal-agent-create", + "payload": { + "name": "My grok-bot", + "kind": "external", + "provider": "grok-bot", + "endpoint": "https://bot.example.invalid/callback" + } + }, + "note": "Descriptor only; callback is not called or verified by FlyBot." + }, + { + "id": "join-agent-to-project", + "actor": "human", + "request": { + "endpoint": "personal-agent-join", + "payload": { + "agentId": "AGENT_ID", + "projectId": "PROJECT_ID" + } + } + }, + { + "id": "issue-scoped-token", + "actor": "human", + "request": { + "endpoint": "personal-agent-token-create", + "payload": { + "agentId": "AGENT_ID", + "projectIds": [ + "PROJECT_ID" + ], + "ttlSeconds": 604800 + } + }, + "secretHandling": "Privately provision returned value.token to the bot, then use X-Flybot-Member-Session." + }, + { + "id": "identify-agent", + "actor": "personal-agent-safe", + "request": { + "endpoint": "auth-whoami", + "payload": {} + } + }, + { + "id": "consult-chief-without-task", + "actor": "personal-agent-safe", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "command", + "name": "consultation.ask", + "projectId": "PROJECT_ID", + "payload": { + "text": "Explain current Project status without publishing work." + }, + "requestId": "ask-001" + } + } + }, + { + "id": "read-private-consultation", + "actor": "personal-agent-safe", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "query", + "name": "consultation.get", + "projectId": "PROJECT_ID", + "payload": { + "consultationId": "CONSULTATION_ID", + "offset": 0, + "limit": 20 + } + } + } + }, + { + "id": "propose-private-change-in-safe-mode", + "actor": "personal-agent-safe", + "request": { + "endpoint": "personal-agent-propose-task", + "payload": { + "projectId": "PROJECT_ID", + "requestId": "proposal-001", + "title": "Fix calculation", + "criteria": "Regression reproduces and passes after fix.", + "impact": "Restore calculation correctness.", + "projectTaskKind": "code" + } + } + }, + { + "id": "human-approves-publication", + "actor": "human", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "command", + "name": "proposal.publish", + "projectId": "PROJECT_ID", + "payload": { + "proposalId": "PROPOSAL_ID" + }, + "requestId": "publish-001" + } + } + }, + { + "id": "human-grants-watch", + "actor": "human", + "request": { + "endpoint": "personal-agent-delegation-set", + "payload": { + "agentId": "AGENT_ID", + "projectId": "PROJECT_ID", + "mode": "watch" + } + } + }, + { + "id": "watch-agent-publishes-task", + "actor": "personal-agent-watch", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "command", + "name": "task.propose", + "projectId": "PROJECT_ID", + "payload": { + "title": "Fix calculation", + "criteria": "Regression reproduces and passes after fix.", + "impact": "Restore calculation correctness.", + "projectTaskKind": "code" + }, + "requestId": "change-001" + } + } + }, + { + "id": "start-original-task", + "actor": "personal-agent-watch", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "command", + "name": "task.run", + "projectId": "PROJECT_ID", + "payload": { + "taskId": "TASK_ID", + "targetRole": "developer" + }, + "requestId": "run-001" + } + } + }, + { + "id": "recover-original-receipt", + "actor": "original-command-principal", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "query", + "name": "command.receipt", + "projectId": "PROJECT_ID", + "payload": { + "commandRequestId": "run-001", + "commandName": "task.run" + } + } + } + }, + { + "id": "read-task-progress", + "actor": "personal-agent-safe", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "query", + "name": "task", + "projectId": "PROJECT_ID", + "payload": { + "taskId": "TASK_ID" + } + } + } + }, + { + "id": "read-role-memory-and-persona-source", + "actor": "personal-agent-safe", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "query", + "name": "roles", + "projectId": "PROJECT_ID", + "payload": { + "role": "developer", + "offset": 0, + "limit": 4000 + } + } + } + }, + { + "id": "read-durable-handoff", + "actor": "personal-agent-safe", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "query", + "name": "handoff.get", + "projectId": "PROJECT_ID", + "payload": { + "taskId": "TASK_ID", + "handoffId": "HANDOFF_ID" + } + } + } + }, + { + "id": "fresh-snapshot", + "actor": "personal-agent-safe", + "request": { + "endpoint": "project-development", + "payload": { + "version": "project-development/v1", + "kind": "query", + "name": "project.snapshot", + "projectId": "PROJECT_ID", + "payload": { + "limit": 50 + } + } + } + }, + { + "id": "revoke-agent-token", + "actor": "human", + "request": { + "endpoint": "personal-agent-token-revoke", + "payload": { + "credentialId": "CREDENTIAL_ID" + } + } + } + ], + "x-flybot-error-policy": { + "bot/unauthorized": { + "retryAutomatically": false, + "nextAction": "reauthenticate-with-human-issued-credential" + }, + "bot/forbidden": { + "retryAutomatically": false, + "nextAction": "check-current-membership-scope-participation-and-human-delegation" + }, + "bot/conflict": { + "retryAutomatically": false, + "nextAction": "read-current-entity-and-source-versions; do-not-discard-fences" + }, + "bot/cursor-expired": { + "retryAutomatically": false, + "nextAction": "project.snapshot" + }, + "bot/outcome-unknown": { + "retryAutomatically": false, + "nextAction": "command.receipt-and-domain-reconciliation-or-Chief" + }, + "bot/read-only": { + "retryAutomatically": false, + "nextAction": "operator-reconciles-store-format-or-write-failure" + }, + "bot/quota": { + "retryAutomatically": false, + "nextAction": "observe-existing-queue-and-capacity; do-not-create-duplicate-work" + }, + "bot/busy": { + "retryAutomatically": false, + "nextAction": "bounded-read-retry-after-capacity-or-current-turn-finishes" + }, + "default": { + "retryAutomatically": false, + "nextAction": "inspect-domain-message-and-current-state; unknown-errors-never-authorize-replay" + } + }, + "x-excluded-surfaces": [ + { + "surface": "DSH owner API, raw /api/bot endpoints absent from the gateway allowlist, platform administration", + "reason": "private operator surface; no public registration/role escalation/credential upload/process control" + }, + { + "surface": "roleCommand/roleResult: claim, handoff.offer, handoff.accept, return, transfer, complete, arbitrate, split, role.memory.record", + "reason": "trusted host executor ports bound to a real current claim/session; a personal-agent token is not an executor role credential" + }, + { + "surface": "/, /workbench.js, /workbench.css, /workbench-native.js, /workbench-native.css, /workbench-fonts/*, /favicon.ico", + "reason": "original UI/static assets, not Bot business APIs" + }, + { + "surface": "automatic cross-repository child repository selection and parent integration", + "reason": "explicitly deferred; repository association API is implemented independently" + }, + { + "surface": "vendor-specific grok-bot/dots callback, OAuth/refresh and public user signup", + "reason": "not implemented; external descriptor is unverified metadata, not an outbound adapter" + } + ] +} diff --git a/docs/subsystems/backend-service.md b/docs/subsystems/backend-service.md index 2c6c2709e..916fe8a5b 100644 --- a/docs/subsystems/backend-service.md +++ b/docs/subsystems/backend-service.md @@ -4,12 +4,19 @@ owned_paths: - scripts/backend.mjs - scripts/backend-lib.mjs - scripts/backend-resolve.mjs + - scripts/openapi.mjs + - scripts/api-contracts.mjs + - scripts/api-contract-validation.mjs + - scripts/api-examples.mjs + - .github/scripts/openapi.test.mjs - .github/scripts/backend.test.mjs - .github/scripts/backend-docs.test.mjs - .github/scripts/backend-runtime.test.mjs - docs/backend-operations.md - docs/development-service-api.md - docs/development-service-guide.md + - docs/third-party-bot-integration.md + - docs/openapi/flybot.openapi.json - README.md - README.zh.md - README.native.md @@ -69,3 +76,29 @@ init/install/start/restart acceptance. Neither is a real-provider developer loop production rollout, remote HTTPS deployment or browser/desktop acceptance. #2292 adds typed Release operations to the existing service; the complete documented contract and source-matched guard now enumerate25 queries/28 commands. Source deployment and command-line entry stay unchanged. + +## Public machine contract (#2300) + +The OpenAPI3.1 JSON describes the actual health, multiplexed POST and scoped SSE +paths, not invented REST resources. Its discriminated request schemas cover all104 +gateway endpoints, all25queries/28commands and native personal/workflow variants +(176dispatches). x-flybot-operations correlates each request with exact result and +success schemas, human/FBA safe/watch predicates, server prerequisites, conditional +state effects and domain/receipt recovery. Legacy server coercions are separate +from the strict canonical client format; responses allow forward-compatible fields. +Opaque upstream/source JSON is explicitly data, never authority. + +The catalog is reviewed against existing implementations. Generation refuses +missing/extra public operations and records implementation hashes; --check detects +artifact/source drift. It does not infer semantic correctness from names or hashes. +Independent OpenAPI3.1/JSONSchema2020-12 validation supplements dependency-free +vocabulary/negative-schema tests. The production-entry test now validates actual +representative success/denial JSON and SSE snapshot frames against the contract. +Deterministic inference remains labelled; this is not vendor adapter certification +or coverage of every provider/resource/PTY/external-write branch. + +Human bootstrap/account management, FBA provisioning, watch authority, native +personal/group privacy and trusted role execution remain separate. No new public +credential endpoint, role-result ingress, runtime middleware, timer or deployment +is introduced. An external descriptor remains unverified metadata, not a callback +transport. Source API changes require deliberate catalog and guide review. diff --git a/docs/third-party-bot-integration.md b/docs/third-party-bot-integration.md new file mode 100644 index 000000000..6cbe41429 --- /dev/null +++ b/docs/third-party-bot-integration.md @@ -0,0 +1,163 @@ +# 第三方 Bot 接入契约 + +[机器可读规范](openapi/flybot.openapi.json) · [API 参考](development-service-api.md) · [启动与登录](../README.md) · [运维](backend-operations.md) + +本规范描述当前交付分支的**实际公开网关**,供 grok-bot、dots 等个人代理的客户端实现使用。 +OpenAPI 3.1 JSON 可直接下载解析;不需要启动 Swagger,也没有新增 `/openapi.json` HTTP 路由。 +它覆盖104个原生分派入口(其中包含 `project-development`)、25个 v1 查询、28个 v1 命令, +并展开个人会话和旧工作流的子操作,共176种请求分支。入口数量和操作名称由源码校验。 +这份规范不等于部署证明,也不表示已实现特定厂商的回调或登录适配器。 + +## 怎样让 Bot 读取规范 + +标准 OpenAPI 部分保留真实的三个 HTTP 操作: + +| 方法与路径 | 用途 | 结果 | +| --- | --- | --- | +| `GET /health` | 网关存活检查 | `{"status":"ok"}`;不能证明模型可执行 | +| `POST /api/bot` | 原生接口和 v1 查询/命令共用传输 | JSON 业务信封 | +| `GET /api/project-events` | 项目已提交事实的 SSE 流 | snapshot / fact / 终止控制事件 | + +POST 请求在 `components.schemas.BotRequest.oneOf` 中按 `endpoint`, +再按 v1 的 `kind/name` 或原生子操作的 `operation` 区分。 +同一路径不能重复声明多个 OpenAPI `post`,因此每种分派的完整契约放在 +`x-flybot-operations[]`;普通代码生成器只会生成一个 POST 方法,Bot 工具生成器应读取此扩展。 + +| 扩展字段 | 客户端用途 | +| --- | --- | +| `operationId`、`transport` | 稳定操作名、真实路径及请求体选择器 | +| `requestSchema` | 完整 HTTP JSON 请求的 `$ref`,含 required、枚举、长度、范围和分页条件 | +| `resultSchema` | 业务结果结构;原生对应 `value`,v1 对应 `value.result` | +| `successSchema`、`errorSchema` | 与该请求相关联的完整成功/失败 JSON 信封 | +| `security`、`permission`、`humanRoles` | 登录方式、项目内角色和条件权限 | +| `personalAgent.safe/watch`、`checks` | 独立代理可否调用及其动态权限交集 | +| `preconditions[]` | 服务器检查的条件代码;客户端检查不能授予权限 | +| `stateChanges` | 状态影响及条件转换;异步确认不是完成证明 | +| `idempotency` | 原请求身份、重试规则、是否有统一命令收据 | +| `invokesModel`、`notes` | 模型调用、兼容接口和分支限制 | +| `implementation` | 对应实现文件与源码 hash,供版本核对 | + +`x-flybot-workflows` 给出接入/协作/恢复步骤;`x-flybot-examples` 给出20个经过 Schema 校验的占位请求。 +示例 ID、域名和密码均不能直接用于真实调用。`x-excluded-surfaces` 列出未公开或未实现的能力。 + +请求 Schema 是明确的**规范客户端格式**,拒绝未声明字段;旧服务端的部分接口仍会忽略多余字段、 +转换类型或截断文本,不应依赖这些行为。响应允许新增字段,客户端应兼容它们。 +可变的外部 GitHub 数据、原始上下文内容等用有说明的 `JsonValue` 表达;它们是数据,不是权限或可信执行证据。 +更新接口代码后必须审阅相应契约,再重新生成规范;源码 hash 能提示变化,不能自动证明语义正确。 + +## 第一次接入与登录 + +人类用户先完成以下操作;外部 Bot 不应收取人类密码或借用后端 Owner Cookie: + +1. 调用 `auth-mode`。平台模式使用已有账号调用 `platform-login(email,password)`; + 原生模式使用私有操作员签发的邀请调用 `auth-redeem(token,displayName)`。 + 本机初始 Owner 使用 README 的 `node scripts/backend.mjs login`。 + 没有公开的自助注册、找回密码、OAuth 或刷新 Token 接口;平台账号管理仍由原账号平台负责。 +2. 人类已是项目成员,或由有权限的成员发出 `project-invite`,再用人类会话 `project-join`。 +3. 人类调用 `personal-agent-create` 创建独立身份,再 `personal-agent-join(agentId,projectId)` 建立参与关系。 + `kind=external` 需要 `provider` 与 HTTPS `endpoint`;这只是标记为 unverified 的连接描述,FlyBot 不会因此主动调用它。 +4. 人类调用 `personal-agent-token-create(agentId,projectIds,ttlSeconds)`。 + 每个项目范围都必须已有有效参与关系;有效期60秒至30天,默认7天。 + 返回的 `value.token` 只交付一次,服务只持久化 hash;私下配置给目标 Bot。 +5. Bot 通过 `X-Flybot-Member-Session: ` 连接并调用 `auth-whoami` 检查自己的身份。 + FBA Token 自身即连接凭据,不需要再提交邮箱密码、换取人类 Session 或设置 Cookie。 + **必须检查非空的 `value.agentId` 和 `value.personalAgentCredentialId` 与预期身份一致**: + 无凭据、错误或已撤销凭据调用 whoami 也可能返回 HTTP200、`ok=true,value=null`,不能只看 HTTP 状态判断登录成功。 + +所有业务调用使用**同一个后端 origin**,例如操作员提供的 HTTPS 地址;远程地址配置见运维文档。 +Host/Origin 必须符合网关的固定来源约束,不能随意改 Host 或跨站调用。 +不要把 Token 放进 URL、日志、项目消息或共享记忆;人类会话与 FBA Token 使用同一个 Header,不能同时发送。 + +每次调用都会检查 Token 有效期/撤销代次、用户状态、代理状态、显式项目范围、参与关系、 +人类当前项目权限与代理授权。离开项目、退休代理、撤销 Token 或变更权限都可能使已有调用失效。 +过期后由人类重新签发凭据;没有 Bot 自行续期或给自己扩权的接口。 + +## 安全模式和替用户值守 + +安全模式是初始状态。Bot 可读获准项目内容、私下咨询 Chief、提出私人任务建议。 +普通提问使用 `consultation.ask`,不会因为是一次 Bot 调用就创建 Task。 +安全模式下的 `personal-agent-propose-task` 只生成私人提案;人类必须明确调用 `proposal.publish` 才形成共享 Task。 + +人类用 `personal-agent-delegation-set(mode=watch)` 允许该参与身份替自己值守, +同一 Token 随后在当前人类权限内执行获准操作。`mode=safe` 撤销该授权。 +watch 权限仍受具体项目角色、任务归属、资源、当前代次及操作前置条件约束, +不包含 Owner 亲自 double-check 关闭项目、代理给自己授权/发 Token、读取原生私人会话或打开人类配置终端。 + +有意保留当前代码的差异:例如 v1 `roles` 可供安全代理查询,而原生 `project-roles` 的 FBA 外层门禁需要 watch; +`attempt.integration-state` 虽然是 query,下游仍要求项目管理权限及释放的集成检查点。 +应读取每种操作的 `personalAgent` 与 `preconditions`,不能用“所有 query 都允许”“watch 等于 Owner”推断。 + +## 一次自主协作及结果恢复 + +以下是 watch 代理发布项目变更的请求示意;Header 中填自己的 FBA Token: + +```json +{"endpoint":"project-development","payload":{"version":"project-development/v1","kind":"command","name":"task.propose","projectId":"PROJECT_ID","requestId":"change-001","payload":{"title":"修复计算错误","criteria":"复现用例与回归通过","impact":"恢复项目计算功能","projectTaskKind":"code"}}} +``` + +成功时 HTTP 200 返回: + +```json +{"ok":true,"value":{"version":"project-development/v1","requestId":"change-001","result":{"id":"TASK_ID","title":"修复计算错误","status":"open"},"receipt":{"id":"RECEIPT_ID"},"replayed":false}} +``` + +上面响应仅展示字段位置,完整必需字段以该操作的 `successSchema` 为准。 +`task.propose` 生成原 Task 并提交 Chief 准入;用返回的 Task ID 调用 `task.run`, +保持独立的稳定 `requestId`,可传已批准的 `targetRole`。未准入会等待 Chief,资源忙会排队。 +之后查询 `task` / `task.detail`、`command.receipt`、`events` 或订阅 SSE。 +角色间通过持久化 Handoff 交接主动权;第三方个人代理可读取交接契约,不能伪造 claim、Dev 测试证据或 Chief 完成裁定。 + +每次 v1 command 都要持久保存 `(独立调用身份, projectId, name, requestId, payload)`。 +相同意图重试必须保留同一 requestId 和内容;丢失响应先查 `command.receipt`, +完整结果通过 `command.result` 的 hash 绑定分页读取。 +私人收据属于原独立身份,同一个人名下的另一个代理也不能读取。 +`running`、`unknown`、`completion-pending-commit` 等状态不能当作“没执行”,更不能换 requestId 再发一次外部写入。 +例如 Release 的未知结果应使用 `release.reconcile`,不得盲目重复 publish。 +原生别名没有统一命令收据保证,新接入优先使用 v1 协作接口。 + +失败有两个层次: + +```json +{"ok":false,"error":{"code":"bot/forbidden","message":"Project access denied"}} +``` + +这是业务拒绝,可能仍是 HTTP 200。网关错误则使用非2xx与 `{"error":"..."}`,例如不支持的接口403、 +JSON错误400、请求过大413、类型错误415、上游不可用502。权限失败需恢复授权,冲突需重读当前状态, +不能靠改角色字符串或循环提交绕过。 + +## 事件、分页与上下文预算 + +SSE 请求是 `GET /api/project-events?projectId=PROJECT_ID`,身份仍在 Header。 +无游标先发 `snapshot`;有游标使用 `after` 或 `Last-Event-ID`,同时提供时必须相同。 +`fact` 表示已提交事实,`id` 是不透明的同项目游标;它不授予执行主动权。 +`access-revoked` / `reset-required` 包含 `details.nextAction` 后关闭,按指示重新登录、取快照或重试读取。 +过期游标必须重新 snapshot。事件有保留期限,不能用 SSE 取代持久化任务/命令收据。 + +列表优先使用 v1 的元数据和游标分页。`SourcePage` 的 offset/limit 是 UTF-16 码元; +`attempt.log` 是 UTF-8 字节分页,使用返回的 nextOffset,不自行加字符长度。 +`expectedSha256`、`expectedRevision`、`expectedGeneration`、`expectedCandidateSha` 分别防止读取或执行绑定变化, +失配后重读,不删除前置条件硬重试。 +`personal-agent-history` 是旧的按条数分页,单条仍可能很大; +`project-agent-history` 提供字节预算和长消息分页,但当前仅向人类会话开放。 +不要把整个规范、历史或记忆每轮都塞进模型上下文;先按当前身份筛选 operationId,再取相应 Schema 和分页。 + +## 现有边界与维护验证 + +外部 Bot 现在以**个人项目代理**接入。要把第三方实现直接注册为 Dev/Tester/Reviewer 执行器, +还需要可信 Harness/执行身份适配;公开 API 不提供内部 `roleCommand/roleResult` 端口。 +项目仓库关联已实现;跨仓自动拆分和父任务集成仍是明确延期项。 +原个人 Chief、原生 Bot、群聊通过 `personal-space` 兼容接口保留,但不把人类原生私人会话开放给 FBA。 + +维护命令: + +```bash +node scripts/openapi.mjs +node scripts/openapi.mjs --check +node --test .github/scripts/openapi.test.mjs .github/scripts/backend-runtime.test.mjs +``` + +测试校验公开路由/v1目录、Schema引用、权限边界、占位请求及隔离真实 HTTP 后端的代表性返回, +包含代理签发、安全/值守模式、收据、SSE撤权和重启。模型响应使用明确的确定性测试服务; +不是 grok-bot 厂商适配认证,不证明真实收费模型/真实 GitHub发布/所有接口分支均做过端到端执行。 + +Written-by: Codex diff --git a/scripts/api-contract-validation.mjs b/scripts/api-contract-validation.mjs new file mode 100644 index 000000000..d036db7fa --- /dev/null +++ b/scripts/api-contract-validation.mjs @@ -0,0 +1,65 @@ +// Dependency-free test validator for the intentionally limited JSON Schema vocabulary +// emitted here. Independent full OpenAPI/2020-12 validation is also documented. +// This helper is not a runtime authorization/input-validation middleware. +import { readFileSync } from 'node:fs' +import { artifactPath } from './openapi.mjs' +export const readSpec = () => JSON.parse(readFileSync(artifactPath, 'utf8')) +const equal = (a, b) => JSON.stringify(a) === JSON.stringify(b) +export function validate(schema, value, spec, path = '$') { + const fail = message => { throw new Error(`${path}: ${message}`) } + if (schema === true) return + if (schema === false) return fail('forbidden schema') + if (schema.$ref) { + if (!schema.$ref.startsWith('#/components/schemas/')) return fail('unsupported reference') + const target = spec.components.schemas[schema.$ref.split('/').at(-1)] + if (!target) return fail('unresolved schema') + return validate(target, value, spec, path) + } + const matches = row => { try { validate(row, value, spec, path); return true } catch { return false } } + if (schema.anyOf && !schema.anyOf.some(matches)) { + const reasons = schema.anyOf.map(row => { try { validate(row, value, spec, path); return 'matched' } catch (error) { return error.message } }) + return fail(`no anyOf branch matched (${reasons.join('; ')})`) + } + if (schema.oneOf && schema.oneOf.filter(matches).length !== 1) return fail('expected exactly one oneOf branch') + for (const row of schema.allOf ?? []) validate(row, value, spec, path) + if (schema.if) validate(matches(schema.if) ? schema.then ?? true : schema.else ?? true, value, spec, path) + if (schema.not && matches(schema.not)) return fail('matched excluded schema') + if (Object.hasOwn(schema, 'const') && !equal(value, schema.const)) return fail('const differs') + if (schema.enum && !schema.enum.some(item => equal(value, item))) return fail('enum differs') + const type = value === null ? 'null' : Array.isArray(value) ? 'array' : typeof value + if (schema.type && ![schema.type].flat().some(t => t === type || t === 'integer' && Number.isSafeInteger(value))) return fail(`expected ${schema.type}, received ${type}`) + if (typeof value === 'string') { + if (schema.minLength !== undefined && [...value].length < schema.minLength || schema.maxLength !== undefined && [...value].length > schema.maxLength) return fail('string length out of bounds') + if (schema.pattern && !new RegExp(schema.pattern).test(value)) return fail('pattern differs') + } + if (typeof value === 'number') { + if (schema.minimum !== undefined && value < schema.minimum || schema.maximum !== undefined && value > schema.maximum || schema.exclusiveMinimum !== undefined && value <= schema.exclusiveMinimum) return fail('number out of bounds') + } + if (Array.isArray(value)) { + if (schema.minItems !== undefined && value.length < schema.minItems || schema.maxItems !== undefined && value.length > schema.maxItems) return fail('array length out of bounds') + if (schema.uniqueItems && new Set(value.map(item => JSON.stringify(item))).size !== value.length) return fail('duplicate items') + value.forEach((item, index) => schema.items && validate(schema.items, item, spec, `${path}[${index}]`)) + } + if (type === 'object') { + for (const name of schema.required ?? []) if (!Object.hasOwn(value, name)) return fail(`missing required ${name}`) + for (const [name, item] of Object.entries(value)) { + const declared = schema.properties?.[name] + if (declared) validate(declared, item, spec, `${path}.${name}`) + else if (schema.additionalProperties === false) return fail(`unknown property ${name}`) + else if (typeof schema.additionalProperties === 'object') validate(schema.additionalProperties, item, spec, `${path}.${name}`) + } + } +} +export function operationFor(spec, endpoint, payload = {}) { + const id = endpoint === 'project-development' ? `development.${payload.kind}.${payload.name}` : ['personal-space', 'project-workflow'].includes(endpoint) ? `${endpoint}.${payload.operation ?? (endpoint === 'personal-space' ? 'list' : 'state')}` : endpoint + const operation = spec['x-flybot-operations'].find(row => row.operationId === id) + if (!operation) throw new Error(`Unspecified public operation ${id}`) + return operation +} +export function validateExchange(spec, endpoint, payload, envelope) { + const operation = operationFor(spec, endpoint, payload) + // Canonical clients spell out the two native default operation selectors. + const canonical = ['personal-space', 'project-workflow'].includes(endpoint) && payload.operation === undefined ? { ...payload, operation: endpoint === 'personal-space' ? 'list' : 'state' } : payload + validate(operation.requestSchema, { endpoint, payload: canonical }, spec, `${operation.operationId}.request`) + validate(envelope.ok ? operation.successSchema : operation.errorSchema, envelope, spec, `${operation.operationId}.response`) +} diff --git a/scripts/api-contracts.mjs b/scripts/api-contracts.mjs new file mode 100644 index 000000000..089a22c88 --- /dev/null +++ b/scripts/api-contracts.mjs @@ -0,0 +1,313 @@ +// Reviewed wire contracts. Runtime implementations remain authoritative. +export const ref = name => ({ $ref: `#/components/schemas/${name}` }) +export const str = (maxLength, description) => ({ type: 'string', ...(maxLength ? { maxLength } : {}), ...(description ? { description } : {}) }) +export const int = (minimum = 0, maximum) => ({ type: 'integer', minimum, ...(maximum === undefined ? {} : { maximum }) }) +export const bool = { type: 'boolean' } +export const lit = value => ({ const: value, type: typeof value }) +export const choice = (...values) => ({ type: 'string', enum: values }) +export const array = (items, maxItems) => ({ type: 'array', items, ...(maxItems ? { maxItems } : {}) }) +export const nullable = schema => ({ anyOf: [schema, { type: 'null' }] }) +export const obj = (properties = {}, required = [], extra = {}) => ({ type: 'object', properties, additionalProperties: false, ...(required.length ? { required } : {}), ...extra }) +export const result = (properties, required = Object.keys(properties)) => obj(properties, required, { additionalProperties: true }) +export const id = { type: 'string', minLength: 1, maxLength: 200, description: 'Opaque server-issued ID; never infer authority from it.' } +export const requestId = { type: 'string', pattern: '^[A-Za-z0-9_-]{1,100}$' } +export const sha = { type: 'string', pattern: '^[a-f0-9]{40}$' } +export const hash = { type: 'string', pattern: '^[a-f0-9]{64}$' } +export const repository = { type: 'string', pattern: '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$', maxLength: 200 } +export const role = { type: 'string', pattern: '^[a-z][a-z0-9-]{0,31}$' } +export const visibility = choice('public', 'private') +export const harness = choice('flybot', 'codex', 'claude-agent') +export const page = { after: id, limit: int(1, 100) } +export const sourcePage = { offset: int(), limit: int(1, 16000), expectedSha256: hash } +const json = ref('JsonValue') +const map = schema => ({ type: 'object', additionalProperties: schema }) +const record = (properties, required = []) => obj(properties, required, { additionalProperties: true }) +export const schemas = { + JsonValue: { description: 'Opaque JSON source/provider data, not executable authority. Exact bytes use hash-bound source pages.', anyOf: [{ type: ['string', 'number', 'boolean', 'null'] }, array(ref('JsonValue')), map(ref('JsonValue'))] }, + Error: record({ code: str(), message: str(), details: json }, ['code', 'message']), + DomainError: obj({ ok: lit(false), error: ref('Error') }, ['ok', 'error']), + GatewayError: obj({ error: str() }, ['error']), + Session: result({ sessionToken: { ...str(8192), readOnly: true, 'x-sensitive': true, description: 'Secret returned once; use X-Flybot-Member-Session, never query strings.' }, memberId: id }, ['sessionToken']), + AuthIdentity: record({ memberId: id, displayName: str(), sessionId: id, agentId: id, personalAgentCredentialId: id, role: str(), owner: bool }), + AgentCredential: record({ version: lit('personal-agent-credential/v1'), id, agentId: id, projectIds: array(id), status: choice('active', 'revoked'), createdAt: int(), expiresAt: int() }, ['id', 'agentId', 'projectIds', 'status', 'createdAt', 'expiresAt']), + PersonalAgent: record({ id, ownerId: id, name: str(120), kind: choice('internal', 'external'), status: choice('active', 'retired'), createdAt: int(), retiredAt: int(), memoryScopeId: id, connection: record({ provider: str(120), endpoint: { type: 'string', format: 'uri' }, protocol: lit('flybot-agent/v1'), status: lit('unverified') }) }, ['id', 'ownerId', 'name', 'kind', 'status']), + Participation: record({ id, agentId: id, ownerId: id, projectId: id, status: choice('active', 'left', 'retired'), carrierId: id, contextScopeId: id, createdAt: int() }, ['id', 'agentId', 'projectId', 'status']), + RepositoryAssociation: record({ id, projectId: id, repository, defaultBranch: str(120), createdAt: int() }, ['repository', 'defaultBranch']), + Project: record({ id, name: str(120), goal: str(4000), scope: str(4000), description: str(2000), repository: nullable(repository), repositories: array(ref('RepositoryAssociation')), defaultBranch: str(120), workDir: nullable(str()), status: choice('active', 'archived', 'closed', 'deleted'), ownerUserId: nullable(id), ownerUserIds: array(id), role: nullable(choice('owner', 'maintainer', 'member')), permissions: map(bool), roles: record({ maintainers: array(id), members: array(id) }), chief: json, closure: json, createdAt: int(), updatedAt: int() }, ['id', 'name', 'status']), + Requirements: record({ revision: int(1), title: str(2000), criteria: str(2000), impact: str(2000), scope: str(2000), repository: nullable(repository) }, ['revision', 'title', 'criteria', 'impact']), + TaskRecord: record({ id, projectId: nullable(id), title: str(), criteria: str(), requesterId: nullable(id), projectTaskKind: choice('code', 'decision', 'release'), status: str(), priority: str(), progress: int(0, 100), note: str(), deliveryAttemptId: id, projectTask: json, collaboration: json, result: json, createdAt: int(), updatedAt: int() }, ['id', 'title', 'status']), + TaskView: record({ version: lit('project-development/v1'), projectId: id, taskId: id, title: str(1000), publication: lit('published'), phase: choice('published', 'accepted', 'cancelled', 'stopping', 'blocked', 'awaiting-owner', 'awaiting-chief', 'queued', 'starting', 'running', 'awaiting-input', 'awaiting-acceptance', 'failed', 'paused', 'publishing'), waitingFor: nullable(str()), reason: nullable(str()), botId: nullable(id), currentRole: nullable(role), generation: nullable(int()), attemptId: nullable(id), queueId: nullable(id), workerId: nullable(id), candidateSha: nullable(sha), nextActions: array(str()), evidence: json, contract: nullable(json), source: json, inputs: array(json), effects: array(ref('Effect')), execution: nullable(json), outcome: nullable(json) }, ['projectId', 'taskId', 'phase', 'nextActions']), + Attempt: record({ id, projectId: id, taskId: id, status: choice('preparing', 'running', 'waiting-acceptance', 'accepted', 'failed', 'interrupted', 'returned', 'cancelled'), protocol: str(), workflowVersion: str(), baseSha: sha, candidateSha: sha, requirement: json, workspaces: map(json), evidence: json, pr: json, release: json, roleSessions: map(json), createdAt: int(), updatedAt: int(), failure: json, sourceRefs: map(json), preview: bool }, ['id', 'projectId', 'taskId', 'status']), + QueueEntry: record({ id, projectId: id, taskId: id, requestId, status: choice('waiting', 'starting', 'started', 'blocked', 'failed', 'cancelled'), memberId: id, reason: str(), initialTarget: json, repositoryBinding: json, attemptId: nullable(id) }, ['id', 'projectId', 'taskId', 'status']), + Effect: record({ id, kind: str(), projectId: id, taskId: nullable(id), status: choice('pending', 'running', 'done', 'failed', 'cancelled'), failures: int(), dueAt: int(), error: nullable(str()), waitingFor: nullable(str()), receipt: json }, ['id', 'kind', 'status']), + CommandReceipt: record({ id, name: str(), requestId, status: str(), result: json, resultRef: json, committed: bool, replayed: bool, error: json }, [],), + Proposal: record({ id, projectId: id, memberId: id, fields: record({ title: str(), criteria: str(), impact: str(), scope: str(), projectTaskKind: choice('code', 'decision', 'release') }), createdAt: int(), publishedTaskId: id, personalAgentSource: json }, ['id', 'projectId']), + RoleExecution: obj({ harness, model: str(200), resourceIds: array(id, 20), maxConcurrent: int(1, 32), maxBudgetUsd: { type: 'number', exclusiveMinimum: 0 } }), + RoleDefinition: record({ id, role, name: str(), policyRole: choice('chief', 'developer', 'tester', 'reviewer'), model: str(), instructions: str(), skills: array(str()), memoryRefs: array(id), execution: ref('RoleExecution'), tools: json, definitionRevision: int(1), sourceRef: json }, ['id', 'role']), + RoleProposal: record({ id, version: lit('project-role-proposal/v1'), projectId: id, requestId, action: choice('add', 'update', 'remove'), role, reason: str(), status: str(), baseRevision: int(), sha256: hash, committed: bool, decision: nullable(json), sourceRef: json }, ['id', 'projectId', 'role', 'sha256', 'status']), + AgentCarrier: record({ id, projectId: id, visibility, memberId: nullable(id), botId: id, sessionId: id, personalAgentId: id, participationId: id, status: str(), definitionVersion: int() }, ['id', 'projectId', 'visibility']), + Message: record({ id, kind: str(), text: str(), speaker: str(), botId: nullable(id), seq: int(), at: int(), truncated: bool, sourceRef: json, attachments: array(json) }), + Consultation: record({ version: lit('project-consultation/v1'), id, projectId: id, agentId: nullable(id), requestId, initiatedBy: id, returnTo: id, target: record({ botId: id, role: str() }), direction: choice('incoming', 'outgoing'), linkedTaskId: nullable(id), requiresHuman: bool, question: str(), state: str(), initiativeTransferred: lit(false), replies: array(json), replyCount: int(), nextReplyOffset: nullable(int()), createdAt: int(), finishedAt: nullable(int()) }, ['id', 'projectId', 'state', 'initiativeTransferred']), + Handoff: record({ version: lit('project-handoff-contract/v1'), id, projectId: id, taskId: id, state: choice('pending', 'accepted', 'processed', 'revoked', 'invalidated', 'interrupted'), purpose: str(), source: json, target: json, initiative: json, acceptance: nullable(json), requirements: json, predecessorId: nullable(id), successorId: nullable(id), evidence: array(json), failure: nullable(json), events: array(json) }, ['id', 'projectId', 'taskId', 'state']), + SourcePage: result({ text: str(), sha256: hash, offset: int(), nextOffset: nullable(int()), totalChars: int() }, ['text', 'sha256', 'offset', 'nextOffset']), + LogPage: result({ text: nullable(str()), sha: nullable(sha), sha256: hash, offset: int(), nextOffset: nullable(int()), totalBytes: int(), bounded: bool, reason: str() }, ['text']), + ReleaseProof: record({ provider: lit('github'), repository, tag: str(), sha, releaseId: int(1), publishedAt: str(), url: str(), executorLogin: str(), marker: bool }, ['provider', 'repository', 'tag', 'sha', 'releaseId', 'publishedAt']), + Release: record({ id, status: choice('authorized', 'submitting', 'observed', 'awaiting-artifact', 'unknown', 'failed', 'revoked'), repository, tag: str(), sha, mode: choice('observe', 'publish'), authorizedBy: id, createdAt: int(), observedAt: nullable(int()), proof: nullable(ref('ReleaseProof')), effect: json, result: nullable(str()) }, ['id', 'status', 'repository', 'tag', 'sha', 'mode']), + ScheduleWhen: { oneOf: [obj({ kind: lit('every'), seconds: int(1) }, ['kind', 'seconds']), obj({ kind: lit('daily'), time: str(), timeZone: str() }, ['kind', 'time', 'timeZone']), obj({ kind: lit('weekly'), time: str(), timeZone: str(), weekdays: array(int(0, 6), 7) }, ['kind', 'time', 'timeZone', 'weekdays']), obj({ kind: lit('at'), at: str() }, ['kind', 'at']), obj({ kind: lit('after'), seconds: int(1) }, ['kind', 'seconds'])] }, + Schedule: record({ id, projectId: id, target: json, enabled: bool, status: str(), config: json, revision: int(), scheduleId: id, error: str() }, ['id', 'projectId']), + Event: record({ projectId: id, cursor: str(600), revision: int(), entityType: str(), entityId: id, type: str(), at: int(), data: json }, ['projectId', 'cursor']), + Snapshot: result({ project: ref('Project'), revision: int(), cursor: str(600), entities: array(json), next: nullable(id) }, ['project', 'cursor']), + EventPage: result({ events: array(ref('Event')), next: nullable(str()), cursor: str(), hasMore: bool }, ['events']), + Resource: record({ id, type: choice('local', 'docker'), harnesses: array(harness), status: str(), capacity: int(), occupied: int(), health: json }), + HealthCheck: record({ status: choice('checking', 'ready', 'unreachable', 'unconfigured', 'authRequired', 'environmentError'), reason: str(), at: int(), harness, resourceId: id, sdkVersion: nullable(str()), expectedSdkVersion: nullable(str()) }, ['status']), + Terminal: record({ id, terminalId: id, expiresAt: int(), resourceId: id, harness, seq: int(), output: array(json), closed: bool, released: bool, reason: str() }), + Room: record({ id, projectId: id, name: str(), roles: array(role), status: str(), members: array(id), messages: array(ref('Message')), createdAt: int(), activity: json }, ['id', 'projectId']), + Input: record({ id, version: lit('project-task-input/v1'), projectId: id, taskId: id, text: str(), sha256: hash, kind: str(), status: str(), createdAt: int(), deliveries: array(json), source: json }, ['id', 'projectId', 'taskId']), +} + +export const native = new Map(), queries = new Map(), commands = new Map() +const defaults = { permission: 'read', source: 'core/src/host/project-development-service.js', preconditions: ['current-project-membership'], effects: [], idempotency: 'read-only', invokesModel: false } +export function add(table, name, request, response, options = {}) { table.set(name, { name, request, response, ...defaults, ...options }) } +const n = (name, request, response, options) => add(native, name, request, response, options) +const q = (name, request, response, options) => add(queries, name, request, response, options) +const c = (name, request, response, options = {}) => add(commands, name, request, response, { permission: 'task-write', effects: ['domain-mutation'], idempotency: 'command-receipt', ...options }) +const empty = obj(), projectId = { projectId: id }, taskId = { taskId: id }, attemptId = { attemptId: id } +const owner = { permission: 'human-owner', preconditions: ['human-session', 'current-project-owner'] } +const human = { permission: 'human-self', preconditions: ['human-session'] } +const projectActive = ['current-project-membership', 'active-project', 'writable-store'] +const personalSource = 'core/src/host/personal-agents.js', authSource = 'core/src/host/personal-agent-auth.js' + +// Anonymous discovery/login and explicit human-controlled connection provisioning. +n('auth-mode', empty, result({ workbench: bool, mode: choice('local', 'platform'), panelUrl: nullable(str()), writable: bool }), { permission: 'anonymous', preconditions: [], source: 'core/src/host/workbench-state.js' }) +n('platform-login', obj({ email: str(320), password: { ...str(10000), writeOnly: true } }, ['email', 'password']), ref('Session'), { permission: 'anonymous', source: 'core/src/host/platform-identity.js', preconditions: ['platform-identity-configured', 'valid-platform-account'], effects: ['member-session-created'], idempotency: 'new-session-per-login' }) +n('auth-whoami', empty, ref('AuthIdentity'), { permission: 'session', preconditions: ['valid-session-or-fba-token'], source: 'core/src/host/channel.js' }) +n('auth-revoke', empty, bool, { permission: 'session', source: 'core/src/host/channel.js', preconditions: ['valid-session-or-fba-token'], effects: ['current-session-or-fba-token-revoked'], idempotency: 'revocation' }) +n('auth-invite', empty, result({ token: { ...str(), readOnly: true, 'x-sensitive': true }, expiresAt: int() }, ['token']), { ...human, source: 'core/src/host/channel.js', effects: ['native-member-invitation-created'], idempotency: 'new-invitation', notes: 'Anonymous bootstrap is blocked by the public gateway; use the private operator CLI. Platform identity deployments may disable native invitation.' }) +n('auth-redeem', obj({ token: { ...str(), writeOnly: true }, displayName: str(120) }, ['token']), ref('Session'), { permission: 'anonymous', preconditions: ['valid-unused-native-member-invitation', 'native-member-auth-enabled'], source: 'core/src/host/channel.js', effects: ['member-created', 'invitation-consumed', 'member-session-created'], idempotency: 'single-use-invitation' }) +n('personal-agent-create', obj({ name: str(120), kind: choice('internal', 'external'), provider: str(120), endpoint: { type: 'string', format: 'uri', pattern: '^https://' } }, ['name'], { allOf: [{ if: { properties: { kind: lit('external') }, required: ['kind'] }, then: { required: ['provider', 'endpoint'] } }] }), result({ agent: ref('PersonalAgent') }), { ...human, source: personalSource, effects: ['personal-agent-created'], idempotency: 'new-identity', notes: 'External descriptors remain unverified; no remote login, webhook or vendor-specific adapter is implied.' }) +for (const [name, key, schema] of [['personal-agent-list', 'agents', 'PersonalAgent'], ['personal-agent-participations', 'participations', 'Participation']]) n(name, obj({ ...page, limit: int(1, 200) }), result({ [key]: array(ref(schema)), next: nullable(id) }), { ...human, source: personalSource }) +n('personal-agent-read', obj({ agentId: id }, ['agentId']), result({ agent: ref('PersonalAgent') }), { ...human, source: personalSource }) +for (const name of ['personal-agent-join', 'personal-agent-default', 'personal-agent-leave']) n(name, obj({ agentId: id, ...projectId }, ['agentId', 'projectId']), result({ agent: ref('PersonalAgent'), participation: ref('Participation') }), { ...human, source: personalSource, preconditions: ['human-session', 'own-personal-agent', 'current-project-membership', ...(name === 'personal-agent-leave' ? [] : ['active-project', 'active-personal-agent'])], effects: [name === 'personal-agent-leave' ? 'participation-left-and-matching-grants-revoked' : name === 'personal-agent-default' ? 'default-participation-selected' : 'participation-active'], idempotency: 'stable-agent-project-identity' }) +n('personal-agent-retire', obj({ agentId: id }, ['agentId']), result({ agent: ref('PersonalAgent') }), { ...human, source: personalSource, effects: ['agent-and-participations-retired', 'matching-grants-revoked'], idempotency: 'retirement' }) +n('personal-agent-history', obj({ agentId: id, ...projectId, offset: int(), limit: int(1, 100) }, ['agentId', 'projectId']), result({ agentId: id, participationId: id, items: array(ref('Message')), nextOffset: nullable(int()) }), { ...human, source: personalSource, preconditions: ['human-session', 'own-personal-agent', 'existing-participation'], notes: 'Legacy item-count paging; individual stored messages may be large. This is not the byte-budgeted project-agent-history API. No FBA access.' }) +n('personal-agent-token-create', obj({ agentId: id, projectIds: { ...array(id), minItems: 1 }, ttlSeconds: int(60, 2592000) }, ['agentId', 'projectIds']), result({ token: { type: 'string', pattern: '^fba_[a-f0-9-]{36}\\.[A-Za-z0-9_-]{43}$', readOnly: true, 'x-sensitive': true }, credential: ref('AgentCredential') }), { ...human, source: authSource, preconditions: ['human-session', 'own-active-personal-agent', 'active-participation-in-every-explicit-project-scope'], effects: ['hashed-expiring-fba-credential-created'], idempotency: 'new-token-returned-once' }) +n('personal-agent-token-list', obj({ agentId: id, ...page, limit: int(1, 200) }, ['agentId']), result({ credentials: array(ref('AgentCredential')), next: nullable(id) }), { ...human, source: authSource }) +n('personal-agent-token-revoke', obj({ credentialId: id }, ['credentialId']), result({ credential: ref('AgentCredential') }), { ...human, source: authSource, effects: ['own-fba-credential-revoked-and-generation-incremented'], idempotency: 'revocation' }) +n('personal-agent-delegation-set', obj({ agentId: id, ...projectId, mode: choice('safe', 'watch') }, ['agentId', 'projectId', 'mode']), result({ mode: choice('safe', 'watch'), grant: nullable(json) }), { ...human, source: authSource, preconditions: ['human-session', 'own-active-personal-agent', 'active-participation', 'watch-requires-current-create-permission'], effects: ['watch-grant-active-or-revoked'], idempotency: 'same-mode-replay' }) +n('personal-agent-propose-task', obj({ ...projectId, requestId, title: str(300), criteria: str(2000), impact: str(2000), scope: str(2000), projectTaskKind: choice('code', 'decision', 'release') }, ['projectId', 'requestId', 'title', 'criteria', 'projectTaskKind']), result({ proposal: ref('Proposal'), publishRequired: bool, already: bool }, ['proposal']), { permission: 'fba-proposal', source: authSource, preconditions: ['valid-fba-token', 'active-scoped-participation', 'active-project'], effects: ['private-proposal-created-no-shared-task'], idempotency: 'agent-project-requestId-exact-fields', notes: 'Safe and watch modes may propose. A human approves with project-agent-proposal-apply; the Bot cannot approve its own proposal.' }) + +// Project management and human membership, not logical worker roles. +n('projects', empty, result({ projects: array(ref('Project')) }), { permission: 'session', preconditions: ['valid-session-or-fba-token'], source: 'core/src/host/project-access.js' }) +n('project-create', obj({ name: str(120), description: str(2000), goal: str(4000), scope: str(4000), repository, repositories: array(obj({ repository, defaultBranch: str(120) }, ['repository'])), defaultBranch: str(120), status: choice('active', 'archived') }, ['name']), result({ project: ref('Project') }), { ...human, source: 'core/src/host/project-service.js', effects: ['project-created-with-caller-as-owner', 'scoped-public-and-private-agent-carriers-may-be-created'], idempotency: 'new-project', notes: 'No repository paths, alternate owner IDs or credentials may be supplied. Repository associations do not provision execution capability.' }) +n('project-read', obj({ id }, ['id']), result({ project: ref('Project'), canManage: bool }), { source: 'core/src/host/project-access.js' }) +n('project-detail', obj({ id, view: choice('summary') }, ['id']), result({ project: ref('Project'), tasks: array(ref('TaskRecord')), permissions: map(bool), runs: array(json), workspaces: array(json), unresolved: array(json) }, ['project', 'tasks']), { source: 'core/src/host/project-access.js', notes: 'Prefer v1 tasks/task.detail and summary views for bounded reads.' }) +n('project-board', obj({ id }, ['id']), record({ project: ref('Project'), tasks: array(ref('TaskRecord')), columns: array(json), summary: json }), { source: 'core/src/host/project-service.js' }) +n('project-repositories', obj(projectId, ['projectId']), result({ repositories: array(ref('RepositoryAssociation')) }), { source: 'core/src/host/project-lifecycle.js' }) +for (const name of ['project-repository-link', 'project-repository-unlink']) n(name, obj({ ...projectId, repository, defaultBranch: str(120) }, ['projectId', 'repository']), result({ repositories: array(ref('RepositoryAssociation')) }), { permission: 'configure', source: 'core/src/host/project-lifecycle.js', preconditions: projectActive, effects: ['repository-association-added-or-removed', 'existing-task-bindings-never-silently-reassigned'], idempotency: 'association-identity', notes: 'Unfinished legacy work may prevent unlinking the default. Cross-repository automatic split/parent integration remains deferred (#2292).' }) +n('project-members', obj({ id }, ['id']), result({ members: array(obj({ memberId: id, displayName: str(), role: choice('owner', 'maintainer', 'member') }, ['memberId', 'role'], { additionalProperties: true })) }), { source: 'core/src/host/project-access.js' }) +n('project-invite', obj({ id }, ['id']), result({ token: { ...str(), readOnly: true, 'x-sensitive': true }, expiresAt: int() }), { permission: 'invite', source: 'core/src/host/project-access.js', preconditions: projectActive, effects: ['single-use-project-invitation-created'], idempotency: 'new-invitation', notes: 'Expires after 24h; project-join must be called by the actual invited human.' }) +n('project-join', obj({ token: { ...str(), writeOnly: true } }, ['token']), result({ project: ref('Project') }), { ...human, source: 'core/src/host/project-access.js', preconditions: ['human-session', 'valid-unused-project-invitation', 'active-project', 'inviter-still-authorized'], effects: ['human-project-membership-created', 'invitation-consumed'], idempotency: 'single-use-invitation' }) +n('project-role', obj({ id, memberId: id, role: choice('maintainer', 'member') }, ['id', 'memberId', 'role']), result({ project: ref('Project'), changed: bool, roles: json, reason: str() }, ['project', 'changed']), { permission: 'role-policy', source: 'core/src/host/project-service.js', effects: ['human-membership-rank-may-change', 'queued-authority-revalidated'], idempotency: 'same-rank', notes: 'Only Owner re-roles another person. Maintainer/Member may only demote themselves. Owner is not assignable and cannot be removed.' }) +for (const name of ['project-member-remove', 'project-leave']) n(name, obj({ id, ...(name === 'project-member-remove' ? { memberId: id } : {}) }, name === 'project-member-remove' ? ['id', 'memberId'] : ['id']), result({ removed: bool, activeRuns: int(), unfinishedTasks: int() }), { permission: name === 'project-leave' ? 'read' : 'remove-member-policy', source: 'core/src/host/project-access.js', effects: ['membership-and-scoped-grants-revoked', 'queue-and-private-execution-authority-revalidated'], idempotency: 'membership-removal', notes: 'Owner cannot leave/be removed; removing Maintainer requires Owner, removing Member requires invite authority. Existing unknown worker exit is not fabricated.' }) +n('project-quota', obj({ id, maxConcurrent: int(1, 32) }, ['id', 'maxConcurrent']), result({ quota: obj({ maxConcurrent: int(1, 32) }, ['maxConcurrent']) }), { permission: 'configure', source: 'core/src/host/project-access.js', effects: ['project-concurrency-updated'], idempotency: 'same-setting' }) +for (const name of ['project-archive', 'project-delete']) n(name, obj({ id }, ['id']), result({ project: ref('Project') }), { ...owner, source: 'core/src/host/project-service.js', effects: [name === 'project-archive' ? 'project-active-to-archived' : 'project-tombstoned-with-history-retained'], idempotency: 'legacy-lifecycle', notes: 'Legacy Owner-only lifecycle; this is not Owner double-confirmed project closure. Closed Projects retain their lifecycle/history and refuse these operations.' }) +n('project-close-request', obj({ ...projectId, reason: str(4000) }, ['projectId', 'reason']), result({ request: record({ id, projectId: id, requestedBy: id, personalAgentId: id, reason: str(), createdAt: int() }, ['id', 'projectId', 'reason']) }), { permission: 'closure-suggestion', source: 'core/src/host/project-lifecycle.js', preconditions: ['active-project', 'maintainer-or-owner-or-scoped-personal-agent'], effects: ['closure-suggestion-recorded-no-closure'], idempotency: 'new-suggestion' }) +n('project-close-prepare', obj({ ...projectId, finalRecord: str(12000) }, ['projectId', 'finalRecord']), result({ projectId: id, confirmationToken: { ...str(), readOnly: true, 'x-sensitive': true }, expiresAt: int(), finalRecord: str() }), { ...owner, source: 'core/src/host/project-lifecycle.js', preconditions: [...owner.preconditions, 'active-project'], effects: ['owner-bound-15-minute-state-bound-confirmation-created'], idempotency: 'new-challenge-invalidates-previous' }) +n('project-close-confirm', obj({ ...projectId, confirmationToken: { ...str(), writeOnly: true } }, ['projectId', 'confirmationToken']), result({ project: ref('Project'), already: bool }, ['project']), { ...owner, source: 'core/src/host/project-lifecycle.js', preconditions: [...owner.preconditions, 'unexpired-current-owner-confirmation', 'unchanged-project-basis'], effects: ['project-active-to-closed', 'final-record-and-unfinished-tasks-retained', 'new-work-refused-no-worker-exit-claim'], idempotency: 'same-owner-confirmation-replay' }) +n('workbench-state', empty, record({ self: ref('AuthIdentity'), projects: array(ref('Project')), metrics: json, demoMode: nullable(str()) }), { permission: 'session', source: 'core/src/host/workbench-state.js', preconditions: ['human-session'] }) +n('project-resources', obj({ projectId: id, view: choice('summary') }, ['projectId']), record({ projectId: id, quota: json, activeSlots: int(), resources: array(ref('Resource')), queue: array(ref('QueueEntry')), health: json }), { source: 'core/src/host/workbench-state.js' }) + +// Resident Chief, private project carriers and public role governance. +n('project-agents', obj({ ...projectId, view: choice('summary'), memoryTopic: str(), roleMemoryId: id, roleMemoryOffset: int(), roleMemoryLimit: int(1, 100), versionOffset: int(), versionLimit: int(1, 100), privateMemoryOffset: int(), privateMemoryLimit: int(1, 100) }, ['projectId']), record({ projectId: id, public: record({ id, botId: id, visibility: lit('public') }), mine: ref('AgentCarrier'), definitions: json, roleMemory: array(json), privateMemory: array(json), knowledge: array(json), proposals: array(ref('Proposal')), delegation: json, chiefMemory: json }), { source: 'core/src/host/project-agents.js', effects: ['human-full-view-may-materialize-own-carriers'], notes: 'FBA may only use view=summary, which never borrows native private history. Use v1 roles and consultations for external agents.' }) +n('project-agent-message', obj({ ...projectId, visibility, text: str(8000), publicationApproved: bool }, ['projectId', 'text']), result({ agent: ref('AgentCarrier'), queued: bool }), { permission: 'human-conversation', source: 'core/src/host/project-agents.js', preconditions: [...projectActive, 'human-session', 'public-message-explicit-publication-approved'], effects: ['conversation-message-queued'], idempotency: 'new-message', invokesModel: true }) +n('project-agent-history', obj({ ...projectId, visibility, offset: int(), limit: int(1, 100), cursor: str(2048), messageIndex: int(), textOffset: int(), textLimit: int(1, 4000), expectedSha256: hash }, ['projectId']), { anyOf: [record({ agent: ref('AgentCarrier'), messages: array(ref('Message')), busy: bool, live: nullable(json), total: int(), offset: int(), sha256: hash, nextOffset: nullable(int()), nextCursor: nullable(str()), previousCursor: nullable(str()), bounded: bool, retained: bool }, ['agent', 'messages', 'busy']), record({ text: str(), sha256: hash, offset: int(), nextOffset: nullable(int()), totalChars: int(), messageIndex: int(), cursor: str() }, ['text', 'sha256'])] }, { ...human, source: 'core/src/host/project-agents.js', notes: 'Default latest50; byte-budgeted messages, oversized records use messageIndex source pages. Snapshot prefix survives append, edits invalidate cursor. Private defaults to the current human.' }) +n('project-agent-memory-write', obj({ ...projectId, text: str(4000) }, ['projectId', 'text']), record({ saved: bool, memory: json }), { ...human, source: 'core/src/host/project-agents.js', effects: ['own-private-project-memory-version-added'], idempotency: 'append-memory' }) +n('project-role-memory-write', obj({ ...projectId, role, text: str(8000), source: json, classification: choice('fact', 'inference', 'unresolved', 'conflict'), expectedRevision: int(), archive: bool }, ['projectId', 'role', 'text']), record({ memory: json, saved: bool }), { permission: 'configure', source: 'core/src/host/project-agents.js', effects: ['public-role-memory-version-added'], idempotency: 'memory-content-deduplication', notes: 'Human facts and role-authored inference have distinct authority. Updates retain history; memory is not permission.' }) +n('project-agent-definition', obj({ ...projectId, role, name: str(120), instructions: str(16000), model: str(200), skills: array(str()), memoryRefs: array(id), execution: ref('RoleExecution'), policyRole: choice('chief', 'developer', 'tester', 'reviewer'), tools: json }, ['projectId', 'role']), record({ definitions: json, definition: ref('RoleDefinition'), saved: bool }), { permission: 'configure', source: 'core/src/host/project-role-governance.js', effects: ['approved-role-definition-revision-updated', 'existing-active-sessions-remain-frozen'], idempotency: 'versioned-definition-update', notes: 'Edit an existing role under current governance. Addition/removal requires Chief proposal and separate approval; never remove the resident Chief.' }) +n('project-knowledge-write', obj({ ...projectId, text: str(4000), kind: choice('fact', 'decision'), supersedes: array(obj({ id, sha256: hash }, ['id', 'sha256']), 512) }, ['projectId', 'text']), result({ saved: bool }), { permission: 'configure', source: 'core/src/host/project-agents.js', effects: ['shared-knowledge-or-exact-source-checkpoint-added'], idempotency: 'append-record' }) +n('project-chief-question', obj({ ...projectId, agentId: id, text: str(8000), requestId }, ['projectId', 'text', 'requestId']), record({ handoff: json, consultation: ref('Consultation'), queued: bool, already: bool }), { permission: 'private-consultation', source: 'core/src/host/project-agents.js', preconditions: [...projectActive, 'own-active-participation'], effects: ['private-consultation-enqueued-no-task-or-task-initiative-change'], idempotency: 'exact-conversation-requestId', invokesModel: true, notes: 'External agents should prefer v1 consultation.ask. A consultation is not a Task handoff.' }) +n('project-agent-stop', obj({ ...projectId, visibility, roomId: id, role }, ['projectId']), record({ stopped: bool, stopping: bool, released: bool }), { permission: 'conversation-initiator-or-manager', source: 'core/src/host/project-agents.js', effects: ['conversation-stop-requested-exit-still-must-be-confirmed'], idempotency: 'stop-request' }) +for (const [name, key] of [['project-rooms', null], ['project-room-read', 'roomId']]) n(name, obj({ ...projectId, ...(key ? { [key]: id } : {}) }, key ? ['projectId', key] : ['projectId']), key ? ref('Room') : result({ rooms: array(ref('Room')) }), { source: 'core/src/host/project-rooms.js', preconditions: ['current-project-membership', ...(key ? ['room-participation'] : [])] }) +n('project-room-create', obj({ ...projectId, name: str(80), roles: { ...array(role), minItems: 1 }, memberIds: array(id) }, ['projectId', 'name', 'roles', 'memberIds']), ref('Room'), { permission: 'create', source: 'core/src/host/project-rooms.js', preconditions: [...projectActive, 'approved-active-roles', 'all-room-humans-current-project-members', 'creator-in-nonempty-member-list'], effects: ['project-room-created'], idempotency: 'new-room' }) +n('project-room-message', obj({ ...projectId, roomId: id, text: str(8000), role, attachmentIds: array(id, 10) }, ['projectId', 'roomId', 'text']), result({ messageId: id, deliveries: array(json) }), { permission: 'create', source: 'core/src/host/project-rooms.js', preconditions: [...projectActive, 'room-participation', 'documents-in-same-room', 'text-plus-document-budget-at-most-8000'], effects: ['room-message-appended', 'selected-room-roles-may-respond'], idempotency: 'new-message', invokesModel: true }) +n('project-room-attachment', obj({ ...projectId, roomId: id, attachmentId: id, name: str(100), text: str(32000) }, ['projectId', 'roomId'], { anyOf: [{ required: ['attachmentId'] }, { required: ['name', 'text'] }] }), record({ id, name: str(), text: str(), mediaType: str(), createdBy: id, at: int() }, ['id', 'name']), { permission: 'room-read-or-create', source: 'core/src/host/project-rooms.js', preconditions: ['current-project-membership', 'room-participation', 'read-existing-id-or-create-with-current-create-authority'], effects: ['create-branch-adds-text-document'], idempotency: 'read-or-new-document' }) +n('project-room-stop', obj({ ...projectId, roomId: id, role }, ['projectId', 'roomId']), record({ stopped: bool, stopping: bool, released: bool }), { permission: 'conversation-initiator-or-manager', source: 'core/src/host/project-agents.js', preconditions: ['current-project-membership', 'room-participation', 'current-execution-authority'], effects: ['room-role-stop-requested'], idempotency: 'stop-request' }) + +// Operator-provisioned resource setup; no arbitrary command or credential endpoint. +n('project-resource-environment-check', obj({ ...projectId, resourceId: id }, ['projectId', 'resourceId']), ref('HealthCheck'), { permission: 'configure', source: 'core/src/host/project-resources.js', preconditions: [...projectActive, 'operator-provisioned-resource'], effects: ['resource-environment-health-refreshed'], idempotency: 'bounded-probe' }) +n('project-runtime-check', obj({ ...projectId, resourceId: id, harness, role }, ['projectId', 'resourceId', 'harness']), ref('HealthCheck'), { permission: 'configure', source: 'core/src/host/project-runtime-setup.js', preconditions: [...projectActive, 'authorized-resource-harness', 'explicit-owner-profile-and-model'], effects: ['connection-health-refreshed', 'temporary-probe-lease-acquired-and-confirmed-released'], idempotency: 'coalesced-short-lived-probe', invokesModel: true, notes: 'Can invoke paid minimal inference. ready means connectivity only, not task execution.' }) +n('project-terminal-open', obj({ ...projectId, resourceId: id, harness, role }, ['projectId', 'resourceId', 'harness']), ref('Terminal'), { permission: 'human-resource-admin', source: 'core/src/host/project-runtime-setup.js', preconditions: [...projectActive, 'live-human-session', 'explicit-resource-admin-grant', 'authorized-resource-harness', 'at-most-two-own-open-terminals'], effects: ['private-configuration-pty-opened'], idempotency: 'new-terminal', notes: 'FBA tokens have no live human Session and cannot use this endpoint, including watch mode.' }) +for (const name of ['project-terminal-poll', 'project-terminal-input', 'project-terminal-resize', 'project-terminal-close']) n(name, obj({ terminalId: id, ...(name === 'project-terminal-poll' ? { since: int() } : name === 'project-terminal-input' ? { text: str(8192) } : name === 'project-terminal-resize' ? { rows: int(8, 100), cols: int(20, 240) } : {}) }, name === 'project-terminal-input' ? ['terminalId', 'text'] : ['terminalId']), name === 'project-terminal-input' ? result({ sent: bool }) : name === 'project-terminal-resize' ? result({ resized: bool }) : ref('Terminal'), { permission: 'human-resource-admin', source: 'core/src/host/project-runtime-setup.js', preconditions: ['same-live-human-session-that-opened-terminal', 'unexpired-terminal', 'current-explicit-resource-admin-grant'], effects: name === 'project-terminal-poll' ? ['terminal-heartbeat-refreshed'] : [name === 'project-terminal-close' ? 'terminal-stop-and-release-requested' : 'terminal-input-or-size-updated'], idempotency: name === 'project-terminal-input' ? 'non-idempotent-input-never-blindly-retry' : 'terminal-control' }) + +// Complete versioned read surface. Project scope lives in the outer envelope. +q('tasks', obj({ ...page, limit: int(1, 200) }), result({ tasks: array(ref('TaskView')), next: nullable(id) })) +q('task', obj(taskId, ['taskId']), result({ task: ref('TaskView') })) +q('task.detail', obj({ ...taskId, attemptLimit: int(1, 50), beforeAttemptId: id }, ['taskId']), result({ task: ref('TaskRecord'), view: ref('TaskView'), attempts: array(ref('Attempt')), attemptsPage: obj({ total: int(), limit: int(1, 50), before: nullable(id) }, ['total', 'limit', 'before']) })) +q('task.history', obj({ ...taskId, section: choice('requirements', 'requirementsHistory', 'waitHistory', 'results', 'dependencies', 'admissionDecisions', 'note', 'result', 'actors', 'handoffs'), ...sourcePage }, ['taskId', 'section']), ref('SourcePage')) +q('roles', obj({ role, ...sourcePage }), { anyOf: [result({ projectId: id, revision: int(), roles: array(ref('RoleDefinition')) }), record({ projectId: id, revision: int(), text: str(), sha256: hash, nextOffset: nullable(int()) }, ['text', 'sha256'])] }, { source: 'core/src/host/project-role-governance.js' }) +q('role.proposals', obj({ proposalId: id, ...page, limit: int(1, 50), ...sourcePage }), record({ proposals: array(ref('RoleProposal')), proposal: ref('RoleProposal'), next: nullable(id), text: str(), sha256: hash, nextOffset: nullable(int()) }), { source: 'core/src/host/project-role-governance.js' }) +q('consultation.list', obj({ agentId: id, ...page }), result({ items: array(ref('Consultation')), next: nullable(id) }), { permission: 'own-consultation', source: 'core/src/host/project-consultations.js', preconditions: ['current-project-membership', 'own-private-participation-or-fba-own-agent'] }) +q('consultation.get', obj({ agentId: id, consultationId: id, offset: int(), limit: int(1, 100) }, ['consultationId']), result({ consultation: ref('Consultation') }), { permission: 'own-consultation', source: 'core/src/host/project-consultations.js', preconditions: ['current-project-membership', 'own-private-participation-or-fba-own-agent'] }) +q('handoff.list', obj({ ...taskId, ...page }, ['taskId']), result({ handoffs: array(ref('Handoff')), next: nullable(id) }), { source: 'core/src/host/project-pools.js', notes: 'Read-only transport/initiative history; it is not role claim acceptance.' }) +q('handoff.get', obj({ ...taskId, handoffId: id }, ['taskId', 'handoffId']), result({ handoff: ref('Handoff') }), { source: 'core/src/host/project-pools.js' }) +q('pools', empty, result({ pools: array(record({ botId: id, role, tasks: array(json) }, ['botId', 'role', 'tasks'])) })) +q('inputs', obj({ ...taskId, ...page, limit: int(1, 200) }, ['taskId']), record({ inputs: array(ref('Input')), next: nullable(id) }), { source: 'core/src/host/project-inputs.js', notes: 'Receipt states distinguish persisted, delivered, model-declared-read and handled; none imply Task completion.' }) +q('sources', obj({ threadId: id, eventId: id, offset: int(), ...page }), record({ sources: array(json), threads: array(json), subscriptions: array(json), events: array(json), next: nullable(id), event: json, text: str(), offset: int(), nextOffset: nullable(int()), sha256: hash }), { source: 'core/src/host/project-sources.js' }) +q('execution.boundary', obj(taskId), record({ projectId: id, profile: json, authority: json, task: nullable(json), repository: json, resources: array(json), harnesses: json, limits: json }), { source: 'core/src/host/project-execution-boundary.js', notes: 'Reports effective current boundaries; it neither runs tests nor grants tools/credentials.' }) +q('attempt.context', obj({ ...attemptId, section: choice('roleSessions', 'roleSessionHistory', 'rolePolicies', 'evidence', 'feedback', 'requirement', 'failure', 'agentDefinitions', 'integrationAdmissions'), ...sourcePage }, ['attemptId', 'section']), ref('SourcePage')) +q('attempt.integration-state', obj(attemptId, ['attemptId']), result({ attemptId: id, generation: int(), inputs: array(json), snapshot: json }), { permission: 'configure', source: 'core/src/host/project-delivery.js', preconditions: ['current-project-manager', 'current-released-integration-checkpoint'], notes: 'Although a query, the downstream integration checkpoint gate requires manager authority and confirmed release.' }) +q('attempt.log', obj({ ...attemptId, role, offset: int(), limit: int(4, 8192), expectedSha256: hash }, ['attemptId']), ref('LogPage'), { source: 'core/src/host/project-delivery.js', notes: 'UTF-8 byte offsets, not character offsets; nextOffset preserves character boundaries. Rechecks rights after source I/O. No caller path.' }) +q('release.status', obj(attemptId, ['attemptId']), result({ release: nullable(ref('Release')) }), { source: 'core/src/host/project-releases.js', preconditions: ['current-project-membership', 'current-release-task-attempt'] }) +q('chief.state', empty, record({ projectId: id, policy: nullable(json), scheduledTask: nullable(json), queued: array(json), active: array(json), runs: array(json), proposals: array(json) }), { source: 'core/src/host/project-chief-control.js' }) +q('effects', obj({ ...taskId, limit: int(1, 200) }), result({ effects: array(ref('Effect')) }), { source: 'core/src/host/project-effects.js', notes: 'Private command effects/results remain visible only to the matching independent principal.' }) +q('command.receipt', obj({ commandRequestId: requestId, commandName: str() }, ['commandRequestId']), ref('CommandReceipt'), { permission: 'same-command-principal', source: 'core/src/host/project-command-receipts.js', preconditions: ['current-project-membership', 'exact-original-human-or-personal-agent-command-principal'] }) +q('command.result', obj({ commandRequestId: requestId, commandName: str(), ...sourcePage }, ['commandRequestId']), ref('SourcePage'), { permission: 'same-command-principal', source: 'core/src/host/project-command-receipts.js', preconditions: ['current-project-membership', 'exact-original-command-principal', 'committed-completed-command-result'] }) +q('project.snapshot', obj({ entityType: choice('task', 'attempt', 'execution', 'resource', 'input', 'role-proposal'), ...page, expectedRevision: int() }), ref('Snapshot'), { source: 'core/src/host/project-service-events.js' }) +q('events', obj({ after: str(600), limit: int(1, 100) }), ref('EventPage'), { source: 'core/src/host/project-service-events.js', notes: 'Committed facts only; expired cursor requires a fresh snapshot, not blind replay of commands.' }) +q('compatibility', obj({ offset: int(), limit: int(1, 100) }), record({ projectId: id, baseline: nullable(json), contract: json, counts: json, references: array(json), nextOffset: nullable(int()) }), { source: 'core/src/host/project-compatibility.js' }) + +// Commands return result + a durable outer command receipt, not completed work. +c('consultation.ask', obj({ agentId: id, text: str(4000) }, ['text']), record({ handoff: json, consultation: ref('Consultation'), queued: bool, already: bool }), { permission: 'own-consultation', source: 'core/src/host/project-consultations.js', preconditions: [...projectActive, 'own-active-private-participation'], effects: ['private-consultation-created-no-task-initiative-change'], invokesModel: true }) +c('consultation.reply', obj({ agentId: id, consultationId: id, text: str(4000), publish: bool }, ['consultationId', 'text']), record({ consultation: ref('Consultation'), replyId: id, published: bool, requiresUserApproval: bool, input: ref('Input') }, ['consultation']), { permission: 'own-consultation', source: 'core/src/host/project-consultations.js', preconditions: [...projectActive, 'own-current-incoming-chief-question', 'publish-requires-human-or-valid-watch-and-task-write'], effects: ['private-reply-recorded', 'only-explicit-authorized-publication-adds-original-task-input'] }) +c('role.decide', obj({ proposalId: id, expectedSha256: hash, decision: choice('approve', 'reject') }, ['proposalId', 'expectedSha256', 'decision']), result({ proposal: ref('RoleProposal'), definitions: json, already: bool }), { permission: 'configure', source: 'core/src/host/project-role-governance.js', preconditions: [...projectActive, 'committed-chief-role-proposal', 'exact-current-proposal-hash-and-catalog-revision', 'approver-not-chief-executor'], effects: ['role-proposal-approved-or-rejected', 'approved-catalog-version-may-change'] }) +const taskFields = { title: str(300), criteria: str(2000), impact: str(2000), scope: str(2000), projectTaskKind: choice('code', 'decision', 'release'), repository: nullable(repository), botId: id, priority: choice('low', 'normal', 'high', 'urgent'), note: str(), target: obj({ owner: str(), repo: str(), number: int(1), href: str() }) } +c('task.propose', obj(taskFields, ['title']), ref('TaskRecord'), { permission: 'create', source: 'core/src/host/tasks.js', preconditions: projectActive, effects: ['task-proposed-with-stable-project-identity', 'durable-chief-intake-staged'], notes: 'criteria and impact must be nonempty before Chief admission. Ordinary inquiries use consultation.ask; shared publication by safe FBA is refused.' }) +c('task.change.request', obj({ ...taskId, action: choice('revise', 'cancel', 'reopen'), reason: str(4000), requirements: obj({ title: str(2000), criteria: str(2000), impact: str(2000), scope: str(2000), repository: nullable(repository) }) }, ['taskId', 'action', 'reason']), record({ request: json, requested: bool, applied: bool, taskId: id }), { source: 'core/src/host/project-task-lifecycle.js', preconditions: [...projectActive, 'own-task-or-project-manager', 'requirements-only-for-revise'], effects: ['chief-change-request-input-added-no-immediate-lifecycle-change'] }) +c('task.run', obj({ ...taskId, targetRole: role, repository: nullable(repository) }, ['taskId']), { anyOf: [result({ attempt: ref('Attempt'), already: bool }, ['attempt']), result({ queue: ref('QueueEntry'), already: bool }, ['queue']), result({ admission: json, waitingFor: lit('chief') })] }, { source: 'core/src/host/project-scheduler.js', preconditions: [...projectActive, 'own-task-or-project-manager', 'stable-requestId', 'no-conflicting-live-attempt', 'approved-initial-role', 'repository-and-resource-provisioned-or-local-repository-free-decision'], effects: ['unadmitted-task-submitted-to-chief-or-approved-task-queued', 'initial-role-and-repository-version-bound', 'attempt-may-start-asynchronously'], notes: 'Never bypasses Chief. Capacity busy means queue, not permission to create another Task. Cross-repository auto-split remains deferred.' }) +c('task.accept', obj(attemptId, ['attemptId']), result({ attempt: ref('Attempt') }), { permission: 'accept', source: 'core/src/host/project-delivery.js', preconditions: [...projectActive, 'legacy-task-human-acceptance-only', 'exact-verified-current-candidate-tests-review-and-pr'], effects: ['legacy-attempt-and-task-accepted'], notes: 'New Project Task contracts require actual Chief adjudication; third-party clients cannot forge Chief credentials.' }) +c('task.reject', obj({ ...attemptId, reason: str(4000) }, ['attemptId', 'reason']), result({ attempt: ref('Attempt') }), { permission: 'accept', source: 'core/src/host/project-delivery.js', preconditions: [...projectActive, 'current-attempt-and-confirmed-exit'], effects: ['attempt-returned-evidence-preserved', 'rework-follows-current-task-contract'] }) +for (const name of ['attempt.stop', 'attempt.cleanup', 'attempt.publication-retry']) c(name, obj(attemptId, ['attemptId']), record({ attempt: ref('Attempt'), stopping: bool, remainingWorkers: int() }, ['attempt']), { permission: 'configure', source: 'core/src/host/project-delivery.js', preconditions: [...projectActive, name === 'attempt.cleanup' ? 'terminal-attempt-and-confirmed-worker-release' : name === 'attempt.publication-retry' ? 'same-current-candidate-and-original-pr-binding' : 'current-run-control-authority'], effects: [name === 'attempt.stop' ? 'stop-requested-unknown-exit-retains-capacity' : name === 'attempt.cleanup' ? 'only-owned-released-workspaces-cleaned-history-retained' : 'existing-publication-reconciled-no-second-pr'] }) +c('attempt.integration-bind', obj({ ...attemptId, generation: int(), inputs: array(obj({ ref: str(), sha }, ['ref', 'sha']), 20), expectedWorkspace: json }, ['attemptId', 'generation', 'inputs', 'expectedWorkspace']), record({ attempt: ref('Attempt'), inputs: array(json), admission: json }), { permission: 'configure', source: 'core/src/host/project-delivery.js', preconditions: [...projectActive, 'matching-current-generation', 'released-integration-checkpoint', 'exact-workspace-snapshot-from-attempt.integration-state', 'verified-operator-source-refs'], effects: ['immutable-trusted-integration-inputs-bound-no-fake-test-or-merge-evidence'] }) +c('release.request', obj({ ...attemptId, tag: str(101), sha, mode: choice('observe', 'publish'), name: str(120), notes: str(4000) }, ['attemptId', 'tag', 'sha']), result({ release: ref('Release'), already: bool }, ['release']), { permission: 'configure', source: 'core/src/host/project-releases.js', preconditions: [...projectActive, 'chief-admitted-current-running-release-attempt', 'sha-equals-pinned-attempt-base', 'explicit-github-release-provider-and-private-credential-configured', 'current-human-or-full-watch-manager-authority-not-chief'], effects: ['durable-release-authorization-recorded', 'observe-default-never-publishes', 'explicit-publish-may-create-real-external-release'], notes: 'Can perform irreversible external publication only when mode=publish is explicitly sent. Does not merge, upload assets or deploy. Unknown results must reconcile.' }) +c('release.reconcile', obj(attemptId, ['attemptId']), result({ release: ref('Release'), reconciliation: json }), { permission: 'configure', source: 'core/src/host/project-releases.js', preconditions: [...projectActive, 'existing-current-release-request', 'original-authority-and-binding-still-valid'], effects: ['existing-external-result-observed-never-repeat-post'] }) +c('queue.cancel', obj({ queueId: id }, ['queueId']), result({ queue: ref('QueueEntry') }), { source: 'core/src/host/project-scheduler.js', preconditions: [...projectActive, 'own-task-or-project-manager', 'waiting-or-blocked-queue-entry'], effects: ['queue-entry-cancelled-no-worker-exit-claim'] }) +c('queue.retry', obj({ queueId: id, targetRole: role }, ['queueId']), result({ queue: ref('QueueEntry') }), { permission: 'configure', source: 'core/src/host/project-scheduler.js', preconditions: [...projectActive, 'blocked-queue-entry', 'original-requester-still-authorized', 'no-active-attempt', 'repository-preflight', 'active-target-role'], effects: ['blocked-to-waiting-original-requester-retained', 'role-and-requirement-binding-explicitly-refreshed'] }) +c('chief.inspect', obj(taskId), result({ run: record({ id, projectId: id, kind: lit('chief-control'), status: str(), createdAt: int() }, ['id']) }), { permission: 'configure', source: 'core/src/host/project-chief-control.js', preconditions: [...projectActive, 'chief-policy-enabled', 'optional-task-belongs-to-project'], effects: ['one-scoped-chief-control-job-enqueued'], invokesModel: true }) +c('chief.configure', obj({ enabled: bool, inspection: obj({ enabled: bool, title: str(), prompt: str(), when: ref('ScheduleWhen'), thresholds: obj({ maxHandoffsWithoutProgress: int(1), longExecutionMs: int(1), longWaitMs: int(1), missingHeartbeatMs: int(1) }) }) }), queries.get('chief.state').response, { permission: 'configure', source: 'core/src/host/project-chief-control.js', preconditions: [...projectActive, 'configurer-is-not-chief-executor', 'current-background-principal-check'], effects: ['chief-authority-policy-revision-updated', 'original-logical-schedule-configured'], notes: '30-minute inspection is a configurable schedule default, not a framework deadline.' }) +c('schedule.configure', obj({ operation: choice('save', 'delete', 'list'), id, target: obj({ kind: choice('project-chief', 'project-source'), projectId: id, threadId: id }, ['kind', 'projectId']), title: str(), prompt: str(), when: ref('ScheduleWhen'), enabled: bool, rebindAuthority: bool }), { anyOf: [ref('Schedule'), result({ tasks: array(ref('Schedule')) })] }, { permission: 'configure', source: 'core/src/host/project-scheduled-tasks.js', preconditions: [...projectActive, 'registered-logical-target', 'original-dsh-schedule-service-available'], effects: ['original-scheduled-task-created-updated-paused-or-deleted-no-second-timer-engine'] }) +c('agent.mode', obj({ mode: choice('safe', 'watch'), personalAgentId: id }, ['mode']), result({ mode: choice('safe', 'watch'), grant: nullable(json), already: bool }, ['mode', 'grant']), { ...human, source: 'core/src/host/project-delegations.js', effects: ['own-delegation-granted-or-revoked'], notes: 'Only the signed-in human may change delegation mode; even full watch agents cannot self-escalate or extend their own grant.' }) +c('proposal.publish', obj({ proposalId: id }, ['proposalId']), record({ task: ref('TaskRecord'), proposal: ref('Proposal'), already: bool }), { ...human, source: 'core/src/host/project-agents.js', preconditions: [...projectActive, 'own-private-proposal', 'human-explicit-publication-approval'], effects: ['private-proposal-published-to-one-shared-task', 'private-conversation-not-copied'] }) +c('execution.input', obj({ workerId: id, generation: int(1), text: str(16000), requestId: id, allow: bool }, ['workerId', 'generation'], { anyOf: [{ required: ['text'] }, { required: ['requestId', 'allow'] }] }), record({ sent: bool, ok: bool }), { source: 'core/src/host/project-harness.js', preconditions: [...projectActive, 'current-task-write-authority', 'exact-worker-and-generation', 'permission-replies-also-require-configure'], effects: ['pending-executor-input-or-permission-resolved'], notes: 'payload.requestId identifies the original SDK permission question; outer requestId is the independent command receipt ID. A role string never grants execution identity.' }) +c('input.publish', obj({ ...taskId, text: str(4000) }, ['taskId', 'text']), result({ input: ref('Input'), already: bool }, ['input']), { source: 'core/src/host/project-inputs.js', preconditions: [...projectActive, 'own-task-or-project-manager'], effects: ['durable-input-bound-to-current-task-role-generation'], notes: 'Host derives source, recipient and claim. Persisted/delivered does not mean read or handled.' }) +c('source.subscribe', obj({ ...taskId, threadKind: choice('issue', 'pull'), number: int(1), repository, mode: choice('active', 'context'), includeHistory: bool }, ['taskId', 'threadKind', 'number']), result({ subscription: json, already: bool }), { permission: 'configure', source: 'core/src/host/project-sources.js', preconditions: [...projectActive, 'task-in-project', 'repository-equals-project-source-repository', 'one-active-actionable-task-per-thread'], effects: ['scoped-github-subscription-created', 'configured-source-events-can-feed-original-task'] }) +c('source.disable', obj({ subscriptionId: id }, ['subscriptionId']), result({ subscription: json, already: bool }), { permission: 'configure', source: 'core/src/host/project-sources.js', preconditions: [...projectActive, 'existing-project-subscription'], effects: ['source-subscription-disabled-history-retained'] }) +c('source.poll', obj({ threadId: id, taskId: id }, ['threadId']), record({ threadId: id, acceptedEvents: int(), inputs: int(), cursor: json, skipped: bool }), { permission: 'configure', source: 'core/src/host/project-sources.js', preconditions: [...projectActive, 'existing-enabled-project-source', 'explicit-current-github-credential'], effects: ['bounded-external-source-read', 'new-durable-source-events-and-task-inputs-may-be-committed'] }) +c('effect.retry', obj({ effectId: id }, ['effectId']), result({ effectId: id, status: str(), already: bool }, ['effectId', 'status']), { permission: 'configure', source: 'core/src/host/project-effects.js', preconditions: [...projectActive, 'exhausted-failed-effect', 'effect-visible-to-current-independent-principal'], effects: ['failed-effect-requeued-original-identity-retained'], notes: 'Does not authorize blind replay of an unknown release/PR outcome. Use its domain reconciliation first.' }) +c('comment.publish', obj({ issueNumber: int(1), text: str(10000), scope: lit('personal') }, ['issueNumber', 'text']), record({ comment: json, url: str(), id: int(), repository, executorLogin: str() }), { permission: 'create', source: 'core/src/host/project-credentials.js', preconditions: [...projectActive, 'explicit-current-human-personal-github-credential', 'verified-selected-github-login', 'same-scoped-project-repository'], effects: ['durable-personal-github-comment-publication'], notes: 'No ambient/project-owner credential fallback. External write; use the same requestId when a response is lost.' }) + +// Native-only compatibility operations. Role-result/claim tools are deliberately absent. +n('task-update', obj({ id, title: str(300), criteria: str(2000), impact: str(2000), scope: str(2000), priority: taskFields.priority, progress: int(0, 100), note: str(), column: choice('not-started', 'in-progress', 'done') }, ['id']), ref('TaskRecord'), { permission: 'task-write', source: 'core/src/host/tasks.js', preconditions: [...projectActive, 'own-task-or-project-manager', 'project-requirements-unchanged-without-chief', 'column-transition-valid-for-task-contract'], effects: ['task-editable-metadata-updated'], idempotency: 'legacy-update-no-unified-command-receipt', notes: 'New Task requirements changes use v1 task.change.request. This native interface cannot impersonate Chief or close new Tasks.' }) +n('task-cancel', obj({ id }, ['id']), ref('TaskRecord'), { permission: 'task-write', source: 'core/src/host/tasks.js', preconditions: [...projectActive, 'task-requester', 'legacy-task-or-chief-approved-lifecycle'], effects: ['legacy-task-cancelled-if-transition-allowed'], idempotency: 'legacy-transition', notes: 'Use v1 task.change.request action=cancel for new Chief-governed Tasks.' }) +n('task-answer-input', obj({ id, questionId: id, answer: str(2000) }, ['id', 'questionId', 'answer']), ref('TaskRecord'), { permission: 'task-write', source: 'core/src/host/tasks.js', preconditions: [...projectActive, 'task-requester', 'exact-current-task-input-question', 'no-pending-approval'], effects: ['task-input-answer-recorded-and-working-resumed'], idempotency: 'exact-pending-question-once' }) +n('project-credential-status', obj(projectId, ['projectId']), result({ personal: result({ configured: bool, login: nullable(str()) }), automation: result({ configured: bool }) }), { source: 'core/src/host/project-credentials.js', notes: 'No token/password/config path is returned. Native FBA gate requires watch even though domain action is read.' }) +n('project-github-read', obj({ ...projectId, operation: choice('issues', 'pulls', 'pull', 'reviews', 'checks', 'thread-events'), number: int(1), scope: choice('personal', 'project'), threadKind: choice('issue', 'pull'), headSha: sha, pages: obj({ comments: int(1, 1000000), reviews: int(1, 1000000), inline: int(1, 1000000), checks: int(1, 1000000) }) }, ['projectId'], { allOf: [{ if: { properties: { operation: choice('pull', 'reviews', 'checks', 'thread-events') }, required: ['operation'] }, then: { required: ['number'] } }, { if: { properties: { operation: lit('thread-events') }, required: ['operation'] }, then: { required: ['threadKind'] } }] }), result({ repository, operation: str(), scope: choice('personal', 'project'), executorLogin: str(), at: int(), limit: lit(20), pagination: lit('bounded-first-page'), data: json }), { source: 'core/src/host/project-github-read.js', preconditions: ['current-project-membership', 'configured-explicit-scoped-github-credential', 'verified-selected-github-login'], notes: 'Only current default repository; bounded upstream GitHub projection. data varies by operation and is external untrusted JSON. Native FBA gate currently requires watch.' }) + +export const personal = new Map(), workflows = new Map() +const personalOp = (name, request, response, options = {}) => add(personal, name, obj({ operation: lit(name), ...request.properties }, ['operation', ...(request.required ?? [])], { ...request, properties: { operation: lit(name), ...request.properties }, required: ['operation', ...(request.required ?? [])] }), response, { ...human, source: 'core/src/host/channel.js', preconditions: ['human-session', 'owned-personal-bot-or-visible-original-group'], ...options }) +personalOp('list', empty, result({ bots: array(json), rooms: array(json), mainBotIds: array(id) }), { preconditions: ['human-session'] }) +personalOp('read', obj({ id, partId: id, beforeSeq: int() }, ['id']), result({ messages: array(ref('Message')), hasMore: bool, beforeSeq: nullable(int()), busy: bool, tools: array(json), live: nullable(json), question: nullable(json), approvals: array(json), groupWork: array(json) }, ['messages', 'hasMore'])) +const upload = obj({ name: str(120), mediaType: str(120), data: { type: 'string', contentEncoding: 'base64', maxLength: 349528, 'x-maxDecodedBytes': 262144 } }, ['mediaType', 'data']) +personalOp('send', obj({ id, text: str(), images: array({ ...upload, properties: { ...upload.properties, mediaType: choice('image/png', 'image/jpeg', 'image/webp', 'image/gif') } }, 4), files: array({ ...upload, required: ['name', 'mediaType', 'data'] }, 4) }, ['id', 'text']), record({ accepted: bool, steered: bool }), { effects: ['original-personal-message-or-group-turn-enqueued'], invokesModel: true, idempotency: 'new-message-no-unified-receipt', preconditions: ['human-session', 'owned-personal-bot-or-visible-original-group', 'at-most-four-total-attachments-and-512KiB-total-decoded', 'no-unshareable-session-reference'], notes: 'Read native history to observe the response; send acknowledgement is not completion.' }) +personalOp('stop', obj({ id }, ['id']), result({ stopRequested: bool }), { effects: ['owned-native-conversation-cancel-requested'], idempotency: 'stop-request' }) +personalOp('member-stop', obj({ id, botId: id }, ['id', 'botId']), record({ stopped: bool, stopRequested: bool }), { effects: ['own-original-group-worker-stop-requested'], idempotency: 'stop-request' }) +for (const name of ['answer', 'dismiss']) personalOp(name, obj({ id, questionId: id, ...(name === 'answer' ? { answer: str() } : {}) }, name === 'answer' ? ['id', 'questionId', 'answer'] : ['id', 'questionId']), bool, { preconditions: ['human-session', 'own-current-native-question'], effects: ['original-question-resolved'], idempotency: 'pending-question-once' }) +personalOp('approval', obj({ id, approvalId: id, choice: choice('allow', 'reject') }, ['id', 'approvalId', 'choice']), bool, { preconditions: ['human-session', 'own-current-native-approval'], effects: ['original-tool-approval-resolved'], idempotency: 'pending-approval-once' }) +personalOp('memory', obj({ id }, ['id']), result({ entries: array(json) }), { notes: 'Own personal Bot memory only; never exposes another Bot/team private memory.' }) +personalOp('attachment-read', obj({ id, partId: id, seq: int(), attachmentId: id }, ['id', 'seq', 'attachmentId']), record({ id, name: str(), mediaType: str(), bytes: int(0, 524288), kind: choice('image', 'file'), data: { type: 'string', contentEncoding: 'base64' } }, ['id', 'data']), { preconditions: ['human-session', 'visible-exact-original-message-attachment', 'registered-attachment-at-most-512KiB'], notes: 'No host path, arbitrary URL or arbitrary attachment ID.' }) +n('personal-space', { oneOf: [...personal.values()].map(row => row.request) }, json, { ...human, source: 'core/src/host/channel.js', notes: 'Use x-flybot-operations personal-space.* entries for exact suboperation result/auth/effects. operation defaults to list on the server; canonical clients send it explicitly.' }) + +const wfResult = record({ workflows: array(json), templates: array(json), ok: bool, code: str(), error: str() }, ['workflows']) +const node = obj({ id, name: str(80), prompt: str(), role: str(), model: str(80), botId: id, tools: { ...array(str()), maxItems: 0 }, x: { type: 'number' }, y: { type: 'number' } }, ['id', 'name', 'prompt']) +const graph = { nodes: array(node), edges: array(obj({ from: id, to: id }, ['from', 'to'])), layers: array(array(id)) } +for (const [name, permission, fields, required] of [ + ['state', 'read', {}, []], ['templates', 'read', {}, []], + ['create', 'configure', { name: str(80), description: str(400), template: id, trigger: choice('manual', 'schedule'), scheduleLabel: str(40), triggers: array(str(40), 8), ...graph }, []], + ['graph', 'configure', { workflowId: id, ...graph }, ['workflowId', 'nodes']], + ['concurrency', 'configure', { workflowId: id, maxConcurrent: int(1, 8) }, ['workflowId', 'maxConcurrent']], + ['set-model', 'configure', { workflowId: id, model: nullable(str(80)) }, ['workflowId', 'model']], + ['step-timeout', 'configure', { workflowId: id, stepTimeoutMinutes: nullable({ type: 'number', exclusiveMinimum: 0 }) }, ['workflowId', 'stepTimeoutMinutes']], + ['assign', 'create', { workflowId: id, taskId: id }, ['workflowId', 'taskId']], + ...['pause', 'resume', 'reset', 'delete'].map(name => [name, name === 'delete' ? 'configure' : 'run-control', { workflowId: id, runId: id }, ['workflowId']]), +]) add(workflows, name, obj({ ...projectId, operation: lit(name), ...fields }, ['projectId', 'operation', ...required]), wfResult, { permission, source: 'core/src/host/project-access.js', preconditions: ['current-project-membership', ...(permission === 'read' ? [] : ['active-project', 'writable-store']), 'workflow-and-run-in-same-project', ...(['graph', 'concurrency', 'set-model', 'step-timeout', 'delete', 'reset'].includes(name) ? ['not-an-immutable-delivery-workflow'] : []), ...(name === 'assign' ? ['legacy-task-only-public-assignment', 'task-write-authority', 'project-capacity-available'] : [])], effects: permission === 'read' ? [] : [`legacy-workflow-${name}`], idempotency: permission === 'read' ? 'read-only' : 'legacy-workflow-no-unified-receipt', notes: 'Compatibility surface. New Project Tasks use task.run + durable role Handoff, not an externally authored fixed DAG.' }) +n('project-workflow', { oneOf: [...workflows.values()].map(row => row.request) }, wfResult, { source: 'core/src/host/project-access.js', notes: 'See x-flybot-operations project-workflow.*. Canonical clients explicitly send operation; server defaults to state.' }) + +// Source-checked refinements of shared DTOs and compatibility branches. +schemas.Snapshot = result({ version: lit('project-event/v1'), project: nullable(ref('Project')), revision: int(), cursor: str(600), tasks: array(json), entityType: str(), entities: array(json), next: nullable(id) }, ['version', 'project', 'revision', 'cursor', 'next']) +schemas.EventPage = result({ version: lit('project-event/v1'), projectId: id, revision: int(), events: array(ref('Event')), next: str(600), head: str(600), oldest: str(600) }) +native.get('project-role-memory-write').request = obj({ ...projectId, role, memoryId: id, factKey: { type: 'string', pattern: '^[A-Za-z0-9_./:-]{1,100}$' }, text: str(4000), source: obj({ kind: lit('human'), reference: str(300) }, ['kind', 'reference']), classification: choice('unclassified', 'fact', 'inference', 'unresolved', 'conflict'), expectedRevision: int(), status: choice('active', 'archived') }, ['projectId', 'role', 'source']) +native.get('project-role-memory-write').response = result({ memory: json, already: bool }) +native.get('project-agent-memory-write').response = result({ saved: bool, id }) +native.get('project-agent-definition').response = result({ definitions: result({ revision: int(), roles: array(ref('RoleDefinition')) }, ['roles']) }) +native.get('project-knowledge-write').permission = 'create' +native.get('project-knowledge-write').preconditions = [...projectActive, 'checkpoint-supersedes-requires-configure-and-exact-source-hashes'] +commands.get('attempt.integration-bind').response = result({ admission: json, already: bool }) +commands.get('comment.publish').response = result({ audit: json }) +commands.get('consultation.ask').request.properties.text.maxLength = 8000 +commands.get('task.run').invokesModel = true +native.get('project-agents').request.properties.memoryOffset = int() +native.get('project-agents').request.properties.memoryLimit = int(1, 100) +schemas.AgentCarrier.properties.definitionVersion = str() +personal.get('send').response = { anyOf: [bool, result({ accepted: bool })] } +personal.get('member-stop').response = bool +personal.get('answer').request.properties.answer = obj({ selected: array(str()), custom: str() }, [], { anyOf: [{ required: ['selected'] }, { required: ['custom'] }] }) +commands.get('task.change.request').response = result({ run: record({ id, status: str() }, ['id']), applied: lit(false) }) +schemas.Attempt.properties.baseSha = nullable(sha) +schemas.Attempt.properties.candidateSha = nullable(sha) +schemas.Room.properties.memberIds = array(id) +delete schemas.Room.properties.members +schemas.Resource.properties.capacity = result({ configured: int(1), occupied: int() }) +schemas.Resource.properties.canManage = bool +schemas.Resource.properties.harnessStatus = array(record({ harness, status: str(), at: nullable(int()) }, ['harness', 'status'])) +schemas.CommandReceipt = result({ version: str(), id, projectId: id, requestId, name: str(), status: choice('prepared', 'running', 'unknown', 'rejected', 'completed', 'completion-pending-commit'), committed: bool, origin: json, createdAt: int(), updatedAt: int(), failure: nullable(json), resultRef: nullable(json) }, ['version', 'id', 'projectId', 'requestId', 'name', 'status', 'committed', 'origin', 'createdAt', 'updatedAt']) +queries.get('chief.state').response = result({ policy: result({ enabled: bool, revision: int(), authorityMemberId: id, scheduleId: id }, ['enabled']), template: json, schedule: nullable(record({ id, enabled: bool, status: str(), config: json, deliveries: array(json) }, ['id', 'enabled', 'status', 'config', 'deliveries'])), runs: array(record({ id, projectId: id, kind: lit('chief-control'), status: str(), purpose: str(), createdAt: int(), source: json }, ['id', 'projectId', 'status'])) }) +commands.get('chief.configure').response = queries.get('chief.state').response +schemas.Delegation = result({ mode: choice('safe', 'watch'), grant: nullable(record({ id, agentId: id, projectId: id, memberId: id, generation: int(), status: str(), createdAt: int() }, ['id'])) }) +commands.get('agent.mode').response = ref('Delegation') +native.get('personal-agent-delegation-set').response = ref('Delegation') +queries.get('execution.boundary').response = result({ version: lit('project-execution-boundary/v1'), projectId: id, memberId: id, profile: json, host: result({ uid: nullable(int()), identityScope: str(), dedicatedAccount: str() }), permissions: map(bool), taskScope: nullable(id), delegation: record({ mode: choice('safe', 'watch'), grant: nullable(json), effective: bool }, ['mode', 'grant', 'effective']), resources: array(ref('Resource')), credentials: result({ project: json, personal: json, fallback: lit('none'), harnessPrincipalId: nullable(id) }), preflight: json, memory: result({ public: str(), private: str(), contentsRead: lit(false), inheritedIntoPublicContext: lit(false) }), invariants: array(str()), evidence: str() }) +native.get('project-agent-definition').request.properties.instructions.maxLength = 12000 +native.get('project-agent-definition').request.properties.model.maxLength = 120 +native.get('project-agent-definition').request.properties.skills.maxItems = 20 +native.get('project-agent-definition').request.properties.memoryRefs.maxItems = 20 +native.get('project-agent-definition').request.properties.tools = { ...array(str()), maxItems: 0 } +queries.get('sources').preconditions = ['current-project-membership', 'current-project-default-repository-configured', 'event-or-thread-belongs-to-project'] +queries.get('handoff.list').response = result({ items: array(ref('Handoff')), next: nullable(id) }) +queries.get('role.proposals').request = obj({ proposalId: id, ...page, limit: int(1, 50) }) +queries.get('role.proposals').response = { anyOf: [result({ proposals: array(ref('RoleProposal')), next: nullable(id) }), result({ proposal: ref('RoleProposal'), definition: nullable(ref('RoleDefinition')) })] } +native.get('auth-whoami').response = nullable(ref('AuthIdentity')) +native.get('auth-whoami').permission = 'identity-discovery' +native.get('auth-whoami').preconditions = [] +native.get('auth-whoami').notes = 'Anonymous, invalid or revoked credentials return ok=true,value=null. A Bot must verify non-null agentId and personalAgentCredentialId; HTTP200/ok alone is not successful login.' +schemas.ScheduleWhen = { oneOf: [ + obj({ kind: lit('every'), seconds: int(60, 604800), minutes: int(1, 10080) }, ['kind'], { oneOf: [{ required: ['seconds'] }, { required: ['minutes'] }] }), + obj({ kind: lit('daily'), time: { type: 'string', pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$' }, timeZone: str() }, ['kind', 'time']), + obj({ kind: lit('weekly'), time: { type: 'string', pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$' }, timeZone: str(), weekdays: { ...array(int(1, 7), 7), minItems: 1, uniqueItems: true } }, ['kind', 'time', 'weekdays']), + obj({ kind: lit('at'), at: { type: 'string', format: 'date-time', description: 'Must be strictly in the future; offset is explicit.' } }, ['kind', 'at']), +] } +schemas.RoleExecution = obj({ harness, model: str(120), resourceIds: array(requestId, 20), maxConcurrent: int(1, 64) }, ['harness', 'resourceIds']) +schemas.CommandReceipt.properties.resultSha256 = nullable(hash) +schemas.CommandReceipt.properties.resultBytes = nullable(int()) +schemas.CommandReceipt.properties.outcome = str() +schemas.CommandReceipt.properties.nextAction = nullable(str()) +native.get('project-board').request.properties.timeZone = str(64) +native.get('project-role').permission = 'manage' +native.get('project-role').notes = 'The shared Project access layer requires Owner manage permission. The underlying legacy role policy also supports self-demotion, but that does not bypass this public shared gateway gate. Owner cannot be assigned, removed or demoted.' +native.get('project-board').response = result({ tasks: array(json), done: array(json), decisions: result({ dir: nullable(str()), files: array(json), reason: str() }, ['files']), meetings: result({ decided: array(json), pending: array(json), reason: str() }, ['decided', 'pending']), waiting: array(json), inflight: array(json), blocked: array(json), counts: map(nullable(int())), metrics: nullable(json) }) +native.get('workbench-state').response = result({ demoMode: nullable(str()), self: result({ memberId: id, displayName: str() }), projects: array(ref('Project')), models: json, repositories: array(repository) }) +native.get('project-resources').response = result({ projectId: id, quota: result({ maxConcurrent: int(1, 32) }), activeSlots: int(), repository: json, queue: array(record({ id, taskId: id, status: str(), reason: str() }, ['id', 'taskId', 'status'])), taskExecution: array(json), metrics: json, workers: array(json), workspaces: array(json), harnessWorkers: array(json), executionResources: array(ref('Resource')), resourceLeases: array(json), chief: queries.get('chief.state').response, taskViews: array(ref('TaskView')), host: json, platformInstance: nullable(json) }, ['projectId', 'quota', 'activeSlots', 'repository', 'queue', 'taskExecution', 'metrics']) +queries.get('compatibility').response = result({ version: str(), cutoverId: nullable(id), committed: bool, baseline: nullable(result({ count: int(), sha256: hash })), totals: result({ contract: int(), legacy: int(), held: int(), active: int() }), tasks: array(record({ id, projectId: id, parentId: nullable(id), status: str(), mode: choice('contract', 'legacy', 'held'), attemptId: nullable(id), parentPresent: bool }, ['id', 'projectId', 'status', 'mode'])), page: result({ offset: int(), limit: int(1, 100), total: int(), nextOffset: nullable(int()) }) }) +const sourceRecord = record({ id, version: lit('project-source/v1'), projectId: id, repository, kind: str() }, ['id', 'projectId']) +const subscription = record({ id, version: lit('project-source/v1'), projectId: id, taskId: id, sourceId: id, threadId: id, createdBy: id, enabled: bool, mode: choice('active', 'context'), includeHistory: bool, createdAt: int() }, ['id', 'projectId', 'taskId', 'threadId', 'enabled']) +queries.get('sources').response = { anyOf: [result({ sources: array(sourceRecord), threads: array(record({ ...sourceRecord.properties, sourceId: id, number: int(1), cursor: json }, ['id', 'projectId', 'sourceId', 'number'])), subscriptions: array(subscription), events: array(record({ id, projectId: id, threadId: id, observedAt: int(), type: str(), sha: nullable(sha), effect: json }, ['id', 'projectId'])), next: nullable(id) }), result({ event: json, text: str(16000), offset: int(), nextOffset: nullable(int()), sha256: hash })] } +commands.get('source.subscribe').response = result({ subscription, already: bool }) +commands.get('source.disable').response = result({ subscription, already: bool }) +workflows.get('step-timeout').request.properties.stepTimeoutMinutes = nullable(int(1, 120)) +const edgeCondition = obj({ output: str(40), eq: str(200), else: bool }) +for (const operation of ['create', 'graph']) { + const graph = workflows.get(operation).request.properties + graph.edges.items.properties = { from: id, to: id, when: edgeCondition, loop: bool, max: int(1, 8), until: edgeCondition, onFail: bool } + const node = graph.nodes.items.properties + node.inputs = array({ anyOf: [str(40), obj({ name: str(40), type: str(40), required: bool }, ['name'])] }, 8) + node.outputs = array({ anyOf: [str(40), obj({ name: str(40), type: str(40) }, ['name'])] }, 8) + node.prompt.maxLength = 4000 +} diff --git a/scripts/api-examples.mjs b/scripts/api-examples.mjs new file mode 100644 index 000000000..4a0a97c42 --- /dev/null +++ b/scripts/api-examples.mjs @@ -0,0 +1,25 @@ +// Placeholder requests, validated against their exact dispatch schemas by CI. +const native = (endpoint, payload) => ({ endpoint, payload }) +const development = (kind, name, payload, requestId) => native('project-development', { version: 'project-development/v1', kind, name, projectId: 'PROJECT_ID', payload, ...(requestId ? { requestId } : {}) }) +export const integrationExamples = [ + { id: 'discover-login-mode', actor: 'anonymous', request: native('auth-mode', {}) }, + { id: 'existing-platform-login', actor: 'human', request: native('platform-login', { email: 'user@example.invalid', password: 'REPLACE_PRIVATELY' }), secretHandling: 'Never commit or log the substituted password or response.sessionToken.' }, + { id: 'redeem-native-human-invitation', actor: 'anonymous', request: native('auth-redeem', { token: 'PRIVATE_OPERATOR_INVITATION', displayName: 'Example member' }) }, + { id: 'create-external-agent', actor: 'human', request: native('personal-agent-create', { name: 'My grok-bot', kind: 'external', provider: 'grok-bot', endpoint: 'https://bot.example.invalid/callback' }), note: 'Descriptor only; callback is not called or verified by FlyBot.' }, + { id: 'join-agent-to-project', actor: 'human', request: native('personal-agent-join', { agentId: 'AGENT_ID', projectId: 'PROJECT_ID' }) }, + { id: 'issue-scoped-token', actor: 'human', request: native('personal-agent-token-create', { agentId: 'AGENT_ID', projectIds: ['PROJECT_ID'], ttlSeconds: 604800 }), secretHandling: 'Privately provision returned value.token to the bot, then use X-Flybot-Member-Session.' }, + { id: 'identify-agent', actor: 'personal-agent-safe', request: native('auth-whoami', {}) }, + { id: 'consult-chief-without-task', actor: 'personal-agent-safe', request: development('command', 'consultation.ask', { text: 'Explain current Project status without publishing work.' }, 'ask-001') }, + { id: 'read-private-consultation', actor: 'personal-agent-safe', request: development('query', 'consultation.get', { consultationId: 'CONSULTATION_ID', offset: 0, limit: 20 }) }, + { id: 'propose-private-change-in-safe-mode', actor: 'personal-agent-safe', request: native('personal-agent-propose-task', { projectId: 'PROJECT_ID', requestId: 'proposal-001', title: 'Fix calculation', criteria: 'Regression reproduces and passes after fix.', impact: 'Restore calculation correctness.', projectTaskKind: 'code' }) }, + { id: 'human-approves-publication', actor: 'human', request: development('command', 'proposal.publish', { proposalId: 'PROPOSAL_ID' }, 'publish-001') }, + { id: 'human-grants-watch', actor: 'human', request: native('personal-agent-delegation-set', { agentId: 'AGENT_ID', projectId: 'PROJECT_ID', mode: 'watch' }) }, + { id: 'watch-agent-publishes-task', actor: 'personal-agent-watch', request: development('command', 'task.propose', { title: 'Fix calculation', criteria: 'Regression reproduces and passes after fix.', impact: 'Restore calculation correctness.', projectTaskKind: 'code' }, 'change-001') }, + { id: 'start-original-task', actor: 'personal-agent-watch', request: development('command', 'task.run', { taskId: 'TASK_ID', targetRole: 'developer' }, 'run-001') }, + { id: 'recover-original-receipt', actor: 'original-command-principal', request: development('query', 'command.receipt', { commandRequestId: 'run-001', commandName: 'task.run' }) }, + { id: 'read-task-progress', actor: 'personal-agent-safe', request: development('query', 'task', { taskId: 'TASK_ID' }) }, + { id: 'read-role-memory-and-persona-source', actor: 'personal-agent-safe', request: development('query', 'roles', { role: 'developer', offset: 0, limit: 4000 }) }, + { id: 'read-durable-handoff', actor: 'personal-agent-safe', request: development('query', 'handoff.get', { taskId: 'TASK_ID', handoffId: 'HANDOFF_ID' }) }, + { id: 'fresh-snapshot', actor: 'personal-agent-safe', request: development('query', 'project.snapshot', { limit: 50 }) }, + { id: 'revoke-agent-token', actor: 'human', request: native('personal-agent-token-revoke', { credentialId: 'CREDENTIAL_ID' }) }, +] diff --git a/scripts/openapi.mjs b/scripts/openapi.mjs new file mode 100644 index 000000000..c27efc9d0 --- /dev/null +++ b/scripts/openapi.mjs @@ -0,0 +1,210 @@ +// Generate the public wire specification; never register a second runtime API. +import { readFileSync, readdirSync, writeFileSync, mkdirSync } from 'node:fs' +import { resolve, dirname, relative } from 'node:path' +import { fileURLToPath } from 'node:url' +import { createHash } from 'node:crypto' +import { schemas, native, queries, commands, personal, workflows, obj, result, ref, lit, id, requestId, int, str, nullable } from './api-contracts.mjs' +import { integrationExamples } from './api-examples.mjs' + +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..') +const read = path => readFileSync(resolve(root, path), 'utf8') +const hash = text => createHash('sha256').update(text).digest('hex') +const strings = text => [...text.matchAll(/'([^']+)'/g)].map(match => match[1]) +const source = 'core/src/host/project-development-service.js' +export function inventory() { + const service = read(source), gateway = read('core/src/host/workbench-gateway.js'), auth = read('core/src/host/personal-agent-auth.js') + const set = (text, name) => strings(new RegExp(`(?:const|export const) ${name} = new Set\\(\\[([\\s\\S]*?)\\]\\)`).exec(text)?.[1] ?? '') + const operations = Object.fromEntries([...service.match(/const operations = Object.freeze\(\{([\s\S]*?)\}\)/)[1].matchAll(/'([^']+)': '([^']+)'/g)].map(match => [match[1], match[2]])) + const queryNames = set(service, 'queries') + return { endpoints: set(gateway, 'WORKBENCH_ENDPOINTS'), queries: queryNames, commands: Object.keys(operations).filter(name => !queryNames.includes(name)), aliases: operations, fbaReads: set(auth, 'reads'), fbaReserved: set(auth, 'reserved') } +} +const inv = inventory() +const clone = value => structuredClone(value) +const key = value => value.split(/[^A-Za-z0-9]+/).map(word => word[0].toUpperCase() + word.slice(1)).join('') +const equalNames = (actual, expected, label) => { if (JSON.stringify([...actual].sort()) !== JSON.stringify([...expected].sort())) throw new Error(`${label} catalog differs from runtime: missing=${expected.filter(name => !actual.includes(name))}; extra=${actual.filter(name => !expected.includes(name))}`) } + +function nativeCatalog() { + const rows = new Map(native) + for (const [name, endpoint] of Object.entries(inv.aliases)) { + if (!inv.endpoints.includes(endpoint) || rows.has(endpoint)) continue + const entry = queries.get(name) ?? commands.get(name) + if (!entry) throw new Error(`No wire contract for ${name}`) + const request = clone(entry.request) + request.properties = { projectId: id, ...request.properties } + request.required = [...new Set(['projectId', ...(request.required ?? [])])] + if (commands.has(name) && name !== 'execution.input') { + request.properties.requestId = requestId + // Canonical clients carry a stable identity even where a legacy alias ignores it. + request.required.push('requestId') + } + rows.set(endpoint, { ...entry, name: endpoint, request, aliasOf: `${queries.has(name) ? 'query' : 'command'}.${name}`, idempotency: commands.has(name) ? 'domain-specific-only-no-unified-command-receipt-use-v1' : entry.idempotency }) + } + return rows +} + +const permissionRules = { + anonymous: { humanRoles: [], condition: 'anonymous-discovery-or-valid-login-material' }, + session: { humanRoles: ['owner', 'maintainer', 'member'], condition: 'authenticated-active-principal; Project-scoped reads still filter membership' }, + 'identity-discovery': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'optional-identity; missing-or-invalid-credential-returns-null-not-authentication-success' }, + read: { humanRoles: ['owner', 'maintainer', 'member'], condition: 'current-project-membership' }, + create: { humanRoles: ['owner', 'maintainer', 'member'], condition: 'current-project-membership-and-active-project' }, + configure: { humanRoles: ['owner', 'maintainer'], condition: 'current-manager-and-active-project' }, + manage: { humanRoles: ['owner'], condition: 'current-Project-Owner-and-active-project; valid-Owner-watch-delegation-permitted-except-personal-confirmation-operations' }, + invite: { humanRoles: ['owner', 'maintainer'], condition: 'current-manager-and-active-project' }, + accept: { humanRoles: ['owner', 'maintainer'], condition: 'legacy-only; new Task completion requires host-authenticated Chief' }, + 'run-control': { humanRoles: ['owner', 'maintainer'], condition: 'current-manager-and-active-project' }, + 'task-write': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'current-manager-or-task-requester; current-Task-contract-still-applies' }, + 'human-self': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'human-only-and-own-personal-agent-or-session' }, + 'human-owner': { humanRoles: ['owner'], condition: 'Owner-personally; primary-owner-required-by-legacy-lifecycle' }, + 'human-conversation': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'human-only; own-private-or-explicitly-approved-public-conversation' }, + 'human-resource-admin': { humanRoles: ['owner', 'maintainer'], condition: 'live-human-session-and-explicit-resource-adminMemberIds' }, + 'closure-suggestion': { humanRoles: ['owner', 'maintainer'], condition: 'manager-or-authorized-active-personal-agent; suggestion-only' }, + 'private-consultation': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'own-active-private-personal-agent-participation' }, + 'own-consultation': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'own-agent-mailbox; never-other-agent-even-same-human' }, + 'same-command-principal': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'exact-original-command-principal; human-and-each-personal-agent-are-distinct' }, + 'role-policy': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'Owner-for-other-person; otherwise-self-demotion-only; Owner-never-assignable' }, + 'remove-member-policy': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'self-nonowner-or-Owner-removes-Maintainer-or-manager-removes-Member' }, + 'room-read-or-create': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'current-room-participant; creation-also-needs-active-project-create' }, + 'conversation-initiator-or-manager': { humanRoles: ['owner', 'maintainer', 'member'], condition: 'matching-conversation-initiator-or-current-manager; native-stop-private-owner-checks' }, + 'fba-proposal': { humanRoles: [], condition: 'FBA-only; current-token-scope-and-participation' }, +} + +function access(entry, endpoint, kind, name) { + const rule = permissionRules[entry.permission] + if (!rule) throw new Error(`Unknown permission ${entry.permission} on ${name}`) + let safe = false, watch = false + if (endpoint === 'project-development') { + safe = kind === 'query' || ['consultation.ask', 'consultation.reply'].includes(name) + watch = kind === 'query' || !['agent.mode', 'proposal.publish'].includes(name) + if (entry.permission === 'configure') safe = false // downstream gate, even for a query + } else { + safe = inv.fbaReads.includes(endpoint) || ['auth-whoami', 'auth-revoke', 'personal-agent-propose-task', 'project-close-request', 'project-consultation-ask', 'project-consultation-reply', 'project-chief-question', 'project-agents'].includes(endpoint) + watch = safe || endpoint.startsWith('project-') && !inv.fbaReserved.includes(endpoint) && endpoint !== 'project-agents' || ['task-create', 'task-update', 'task-cancel', 'task-answer-input'].includes(endpoint) + } + if (entry.permission.startsWith('human-') || ['project-create', 'project-join', 'personal-space'].includes(endpoint)) safe = watch = false + const schemes = [] + if (entry.permission === 'identity-discovery') schemes.push({}) + if (entry.permission === 'anonymous') schemes.push({}) + else if (entry.permission !== 'fba-proposal') schemes.push({ memberSession: [] }) + if (safe || watch) schemes.push({ personalAgentToken: [] }) + return { security: schemes, permission: entry.permission, ...rule, personalAgent: { safe, watch, checks: ['unexpired-unrevoked-token', 'enabled-current-owner-principal', 'active-agent', 'explicit-token-project-scope', 'active-agent-project-participation', 'current-owner-project-rights', ...(watch ? ['writes-require-current-watch-grant-and-generation'] : []), ...(endpoint === 'project-agents' ? ['view-must-be-summary'] : []), 'all-operation-specific-domain-preconditions'] }, effective: 'intersection-of-current-human-rights-token-scope-participation-delegation-and-domain-fences; never-role-name' } +} + +const transitions = { + 'task.propose': [['Task', 'absent', 'awaiting-chief']], + 'task.change.request': [['TaskChangeRequest', 'absent', 'pending-chief']], + 'task.run': [['Task', 'awaiting-chief', 'awaiting-chief'], ['QueueEntry', 'absent', 'waiting|blocked|started']], + 'task.accept': [['LegacyTask', 'awaiting-acceptance', 'accepted']], + 'task.reject': [['Attempt', 'waiting-acceptance|running', 'failed|returned']], + 'attempt.stop': [['Execution', 'active', 'stopping|stop-unconfirmed|exited']], + 'queue.cancel': [['QueueEntry', 'waiting|blocked', 'cancelled']], + 'queue.retry': [['QueueEntry', 'blocked', 'waiting']], + 'consultation.ask': [['Consultation', 'absent', 'pending']], + 'consultation.reply': [['ConsultationReply', 'absent', 'private|published']], + 'role.decide': [['RoleProposal', 'pending', 'approved|rejected']], + 'release.request': [['Release', 'absent', 'authorized']], + 'release.reconcile': [['Release', 'authorized|unknown|awaiting-artifact|failed', 'observed|unknown|awaiting-artifact|failed']], + 'project-create': [['Project', 'absent', 'active|archived']], + 'project-archive': [['Project', 'active', 'archived']], + 'project-delete': [['Project', 'active|archived', 'deleted']], + 'project-close-confirm': [['Project', 'active', 'closed']], + 'personal-agent-create': [['PersonalAgent', 'absent', 'active']], + 'personal-agent-join': [['Participation', 'absent|left', 'active']], + 'personal-agent-leave': [['Participation', 'active', 'left']], + 'personal-agent-retire': [['PersonalAgent', 'active', 'retired']], + 'personal-agent-token-create': [['AgentCredential', 'absent', 'active']], + 'personal-agent-token-revoke': [['AgentCredential', 'active', 'revoked']], +} + +export function buildSpec() { + equalNames([...queries.keys()], inv.queries, 'query') + equalNames([...commands.keys()], inv.commands, 'command') + const catalog = nativeCatalog() + equalNames([...catalog.keys(), 'project-development'], inv.endpoints, 'gateway') + const components = clone(schemas), operations = [], nativeBranches = [], v1Branches = [] + const register = (entry, endpoint, kind, name, suboperation) => { + const operationId = kind ? `development.${kind}.${name}` : suboperation ? `${endpoint}.${suboperation}` : endpoint + const prefix = key(operationId), payloadKey = `${prefix}Payload`, requestKey = `${prefix}Request`, resultKey = `${prefix}Result`, successKey = `${prefix}Success` + components[payloadKey] = clone(entry.request) + const v1 = obj({ version: lit('project-development/v1'), kind: lit(kind), name: lit(name), projectId: id, payload: ref(payloadKey), ...(kind === 'command' ? { requestId } : {}), expectedGeneration: int(), expectedCandidateSha: nullable(schemas.Attempt.properties.candidateSha) }, ['version', 'kind', 'name', 'projectId', 'payload', ...(kind === 'command' ? ['requestId'] : [])]) + components[requestKey] = obj({ endpoint: lit(endpoint), payload: kind ? v1 : ref(payloadKey) }, ['endpoint', 'payload']) + components[resultKey] = clone(entry.response) + const value = kind ? result({ version: lit('project-development/v1'), requestId, result: ref(resultKey), receipt: ref('CommandReceipt'), replayed: { type: 'boolean' }, reconstructed: { type: 'boolean' } }, ['version', 'result', ...(kind === 'command' ? ['requestId'] : [])]) : ref(resultKey) + components[successKey] = obj({ ok: lit(true), value }, ['ok', 'value']) + const auth = access(entry, endpoint, kind, name) + const mutation = entry.effects.length > 0 + operations.push({ operationId, transport: { method: 'POST', path: '/api/bot', endpoint, ...(kind ? { kind, name, version: 'project-development/v1' } : {}), ...(suboperation ? { operation: suboperation } : {}) }, requestSchema: ref(requestKey), resultSchema: ref(resultKey), successSchema: ref(successKey), errorSchema: ref('DomainError'), ...auth, + preconditions: entry.preconditions.map(code => ({ code, enforcedBy: 'server', clientCheckIsAuthority: false })), + stateChanges: { effects: entry.effects, effectsAreConditional: true, transitions: (transitions[name] ?? transitions[endpoint] ?? []).map(([entity, from, to]) => ({ entity, from: from.split('|'), to: to.split('|'), conditional: true })), noTaskCreated: name?.startsWith('consultation.') || endpoint === 'project-chief-question', acknowledgementIsCompletion: false }, + idempotency: { mechanism: entry.idempotency, retry: kind === 'command' ? 'same-principal-project-name-requestId-and-identical-payload; read-command.receipt-on-uncertain-outcome' : mutation ? 'only-if-domain-contract-explicitly-permits; native-alias-has-no-unified-receipt' : 'read-again-with-current-authorization-and-cursor', unifiedCommandReceipt: kind === 'command' }, + invokesModel: entry.invokesModel, notes: entry.notes ?? 'All current authorization, Project/Task bindings and domain fences are rechecked server-side.', implementation: { path: entry.source, sha256: hash(read(entry.source)) }, ...(entry.aliasOf ? { aliasOf: `development.${entry.aliasOf}` } : {}) }) + return ref(requestKey) + } + for (const [name, entry] of queries) v1Branches.push(register(entry, 'project-development', 'query', name)) + for (const [name, entry] of commands) v1Branches.push(register(entry, 'project-development', 'command', name)) + for (const [endpoint, entry] of catalog) { + if (endpoint === 'personal-space' || endpoint === 'project-workflow') { + const branches = [] + for (const [name, subentry] of endpoint === 'personal-space' ? personal : workflows) branches.push(register(subentry, endpoint, undefined, undefined, name)) + nativeBranches.push(...branches) + } else nativeBranches.push(register(entry, endpoint)) + } + components.BotRequest = { oneOf: [...nativeBranches, ...v1Branches] } + components.BotResponse = { oneOf: [obj({ ok: lit(true), value: ref('JsonValue') }, ['ok', 'value']), ref('DomainError')] } + const response = (description, schema) => ({ description, content: { 'application/json': { schema } } }) + const gatewayError = response('Gateway transport rejection; no domain command success is implied.', ref('GatewayError')) + const files = ['core/src/shared/project-policy.js', 'plugins/workflow/src/service.js', ...readdirSync(resolve(root, 'core/src/host')).filter(name => name.endsWith('.js')).map(name => `core/src/host/${name}`)] + return { + openapi: '3.1.0', jsonSchemaDialect: 'https://json-schema.org/draft/2020-12/schema', + info: { title: 'FlyBot public Bot integration API', version: 'project-development/v1+native', description: 'Source-matched restricted backend gateway. Native endpoint dispatch and versioned application commands share POST /api/bot. Inspect x-flybot-operations for correlated response, current rights, prerequisites, state effects and recovery. This artifact documents existing behavior; it does not deploy a service or grant access.' }, + servers: [{ url: '{origin}', variables: { origin: { default: 'http://127.0.0.1:3080', description: 'Actual operator-provided backend origin; prefer HTTPS for remote use. No URL token.' } } }], + paths: { + '/health': { get: { operationId: 'health', summary: 'Gateway process liveness', security: [], responses: { 200: response('Liveness only; not proof of provider readiness.', result({ status: lit('ok') })), 403: gatewayError } } }, + '/api/bot': { post: { operationId: 'dispatchBotOperation', summary: 'Dispatch a native endpoint or a project-development/v1 query/command', description: 'Select a request branch by endpoint and, for v1, kind/name. x-flybot-operations correlates that request with its exact success/result schema. HTTP 200 includes domain failures; inspect ok before value. Security differs by dispatch; anonymous access is only for explicit discovery/login/redeem.', security: [{}, { memberSession: [] }, { personalAgentToken: [] }], requestBody: { required: true, content: { 'application/json': { schema: ref('BotRequest') } } }, responses: { 200: response('Domain result envelope. ok=false is failure even with HTTP 200.', ref('BotResponse')), ...Object.fromEntries([400, 403, 404, 413, 415, 502].map(status => [status, gatewayError])) }, 'x-maxRequestBytes': 1048576, 'x-maxUpstreamResponseCodeUnits': 8388608, 'x-upstreamTimeoutMs': 180000 } }, + '/api/project-events': { get: { operationId: 'streamProjectEvents', summary: 'Read committed Project facts as SSE; never acquire Task initiative', security: [{ memberSession: [] }, { personalAgentToken: [] }], parameters: [{ in: 'query', name: 'projectId', required: true, schema: requestId }, { in: 'query', name: 'after', schema: { type: 'string', maxLength: 600, pattern: '^[A-Za-z0-9_-]+$' } }, { in: 'header', name: 'Last-Event-ID', schema: str(600), description: 'Same opaque cursor as after. If both are present they must match. Duplicate/unknown query keys are refused.' }], responses: { 200: { description: 'UTF-8 SSE. snapshot when no cursor, fact for committed events; comment keep-alive; reset-required/access-revoked then close. Reauthenticate and take a fresh snapshot as instructed, never replay commands.', content: { 'text/event-stream': { schema: str() } }, 'x-sse-events': { snapshot: ref('Snapshot'), fact: ref('Event'), 'reset-required': ref('SseControl'), 'access-revoked': ref('SseControl') } }, ...Object.fromEntries([400, 401, 403, 409, 429, 503].map(status => [status, response('SSE admission refusal before headers; origin/host checks may use a gateway error.', { oneOf: [ref('SseError'), ref('GatewayError')] })])) }, 'x-preconditions': ['valid-current-principal', 'current-project-membership', 'active-agent-participation-and-token-scope-for-FBA', 'valid-same-project-cursor', 'available-stream-capacity'], 'x-stateChanges': [], 'x-authorizationRechecked': 'every-poll; revocation-closes-stream' } }, + }, + components: { securitySchemes: { memberSession: { type: 'apiKey', in: 'header', name: 'X-Flybot-Member-Session', description: 'Secret human session returned by platform-login/auth-redeem or private local bootstrap. No public self-signup or refresh endpoint.' }, personalAgentToken: { type: 'apiKey', in: 'header', name: 'X-Flybot-Member-Session', description: 'Independent fba_ token, issued once by the human for explicit Project scopes. The same header as memberSession; do not send both. Safe by default. Watch can only be granted/revoked by its human.' } }, schemas: { ...components, SseControl: result({ code: str(), details: result({ nextAction: str() }) }), SseError: result({ ok: lit(false), error: ref('Error') }) } }, + 'x-flybot-operations': operations, + 'x-flybot-inventory': { ...inv, nativeEndpointCount: inv.endpoints.length, versionedQueryCount: queries.size, versionedCommandCount: commands.size, dispatchVariantCount: operations.length, sources: Object.fromEntries(files.sort().map(path => [path, hash(read(path))])) }, + 'x-flybot-client-profile': { requestUnknownFields: 'refused-by-this-canonical-client-schema; legacy-server-may-ignore-or-coerce-fields', responseUnknownFields: 'preserved-and-ignored-unless-understood', schemaIsAuthorization: false, time: 'epoch-milliseconds-unless-described-as-ISO8601', textOffsets: 'UTF-16-code-units-for-SourcePage; UTF-8-bytes-for-attempt.log', confidentiality: 'never-share-private-history-sessions-raw-credentials-or-owner-cookie', errors: { domain: 'HTTP200 ok=false error.code/message; details may be present', gateway: 'non-2xx {error:string}', sse: 'before-stream domain error envelope; after-stream terminal SSE control event' } }, + 'x-flybot-workflows': workflowsForBots(), + 'x-flybot-examples': integrationExamples, + 'x-flybot-error-policy': { + 'bot/unauthorized': { retryAutomatically: false, nextAction: 'reauthenticate-with-human-issued-credential' }, + 'bot/forbidden': { retryAutomatically: false, nextAction: 'check-current-membership-scope-participation-and-human-delegation' }, + 'bot/conflict': { retryAutomatically: false, nextAction: 'read-current-entity-and-source-versions; do-not-discard-fences' }, + 'bot/cursor-expired': { retryAutomatically: false, nextAction: 'project.snapshot' }, + 'bot/outcome-unknown': { retryAutomatically: false, nextAction: 'command.receipt-and-domain-reconciliation-or-Chief' }, + 'bot/read-only': { retryAutomatically: false, nextAction: 'operator-reconciles-store-format-or-write-failure' }, + 'bot/quota': { retryAutomatically: false, nextAction: 'observe-existing-queue-and-capacity; do-not-create-duplicate-work' }, + 'bot/busy': { retryAutomatically: false, nextAction: 'bounded-read-retry-after-capacity-or-current-turn-finishes' }, + default: { retryAutomatically: false, nextAction: 'inspect-domain-message-and-current-state; unknown-errors-never-authorize-replay' }, + }, + 'x-excluded-surfaces': [ + { surface: 'DSH owner API, raw /api/bot endpoints absent from the gateway allowlist, platform administration', reason: 'private operator surface; no public registration/role escalation/credential upload/process control' }, + { surface: 'roleCommand/roleResult: claim, handoff.offer, handoff.accept, return, transfer, complete, arbitrate, split, role.memory.record', reason: 'trusted host executor ports bound to a real current claim/session; a personal-agent token is not an executor role credential' }, + { surface: '/, /workbench.js, /workbench.css, /workbench-native.js, /workbench-native.css, /workbench-fonts/*, /favicon.ico', reason: 'original UI/static assets, not Bot business APIs' }, + { surface: 'automatic cross-repository child repository selection and parent integration', reason: 'explicitly deferred; repository association API is implemented independently' }, + { surface: 'vendor-specific grok-bot/dots callback, OAuth/refresh and public user signup', reason: 'not implemented; external descriptor is unverified metadata, not an outbound adapter' }, + ], + } +} + +function workflowsForBots() { + return [ + { id: 'human-provisions-independent-agent', actor: 'human', steps: ['auth-mode', 'platform-login OR auth-redeem OR private-local-operator-bootstrap', 'project-join OR project-create OR existing-project-membership', 'personal-agent-create', 'personal-agent-join', 'personal-agent-token-create', 'optional:personal-agent-delegation-set(mode=watch)'], tokenDelivery: 'private-out-of-band; raw token returned once; no secrets in URL/logs' }, + { id: 'safe-bot-consults-and-proposes', actor: 'personal-agent-safe', steps: ['auth-whoami', 'projects', 'development.query.roles', 'development.command.consultation.ask', 'development.query.consultation.get', 'personal-agent-propose-task'], approvalBoundary: 'human publishes proposal via development.command.proposal.publish; ordinary consultation never creates a Task' }, + { id: 'watch-bot-publishes-project-work', actor: 'personal-agent-watch', steps: ['auth-whoami', 'development.command.task.propose', 'development.query.command.receipt', 'development.query.task', 'development.command.task.run', 'development.query.events OR streamProjectEvents', 'development.query.task.detail'], completion: 'observe actual Chief adjudication and current evidence; enqueue/receipt/SDK completion never equals Task closure' }, + { id: 'recover-lost-command-response', actor: 'original-command-principal', steps: ['development.query.command.receipt', 'development.query.command.result', 'retry-original-command-with-identical-requestId-and-payload-only-if-contract-permits'], forbidden: ['new-requestId-for-same-unknown-external-write', 'replace-role-claim-from-event-notification'] }, + ] +} + +export const artifactPath = resolve(root, 'docs/openapi/flybot.openapi.json') +export function renderSpec() { return JSON.stringify(buildSpec(), null, 2) + '\n' } +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + const rendered = renderSpec() + if (process.argv.includes('--check')) { + if (readFileSync(artifactPath, 'utf8') !== rendered) throw new Error('OpenAPI artifact is stale; run node scripts/openapi.mjs') + console.log('OpenAPI source inventory and generated artifact match') + } else { mkdirSync(dirname(artifactPath), { recursive: true }); writeFileSync(artifactPath, rendered); console.log(`Generated ${relative(root, artifactPath)}`) } +}