1171 lines
29 KiB
YAML
1171 lines
29 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: AIOS Governed Bridge v2 + Online Agent Task Actions
|
|
version: V2R2C1-bridge-v2-agent-task-30ops
|
|
description: Governed Bridge v2, Release governance and Online Agent Task control-plane schema. Legacy write operations
|
|
are intentionally excluded.
|
|
servers:
|
|
- url: https://cnnetmkt.top
|
|
security: []
|
|
components:
|
|
securitySchemes:
|
|
bearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: opaque-token
|
|
schemas:
|
|
PublicationState:
|
|
type: string
|
|
description: Canonical durable publication state. Legacy TAG_CREATED_LOCAL is normalized on read and is never emitted
|
|
by new writes.
|
|
enum:
|
|
- PENDING
|
|
- LOCAL_TAG_CREATED
|
|
- REMOTE_PUSH_PENDING
|
|
- REMOTE_PUSH_CONFIRMED
|
|
- GITEA_API_CONFIRMED
|
|
- BASELINE_UPDATE_PENDING
|
|
- BASELINE_UPDATED
|
|
- PRODUCTION_DEPLOYED
|
|
- RECONCILIATION_REQUIRED
|
|
- MANUAL_OWNER_REVIEW_REQUIRED
|
|
PublicationStatus:
|
|
type: object
|
|
required:
|
|
- version
|
|
- state
|
|
properties:
|
|
version:
|
|
type: string
|
|
state:
|
|
$ref: '#/components/schemas/PublicationState'
|
|
fail_closed:
|
|
type: boolean
|
|
BranchRequest:
|
|
type: object
|
|
required:
|
|
- branch
|
|
properties:
|
|
branch:
|
|
type: string
|
|
example: patch/chatgpt-actions-demo
|
|
base:
|
|
type: string
|
|
default: main
|
|
message:
|
|
type: string
|
|
FileCommitRequest:
|
|
type: object
|
|
required:
|
|
- branch
|
|
- path
|
|
- content
|
|
properties:
|
|
branch:
|
|
type: string
|
|
base:
|
|
type: string
|
|
default: main
|
|
create_branch:
|
|
type: boolean
|
|
default: false
|
|
path:
|
|
type: string
|
|
example: docs/gitops/chatgpt-change.md
|
|
content:
|
|
type: string
|
|
message:
|
|
type: string
|
|
AtomicFileCommitRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- branch
|
|
- path
|
|
- content
|
|
- message
|
|
- expected_head_oid
|
|
- idempotency_key
|
|
properties:
|
|
branch:
|
|
type: string
|
|
pattern: ^patch/[A-Za-z0-9._/-]+$
|
|
path:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 512
|
|
content:
|
|
type: string
|
|
maxLength: 1048576
|
|
message:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 200
|
|
expected_head_oid:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
idempotency_key:
|
|
type: string
|
|
pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$
|
|
CommitRequest:
|
|
type: object
|
|
properties:
|
|
branch:
|
|
type: string
|
|
paths:
|
|
type: array
|
|
items:
|
|
type: string
|
|
message:
|
|
type: string
|
|
PatchRequest:
|
|
type: object
|
|
required:
|
|
- patch_name
|
|
properties:
|
|
patch_name:
|
|
type: string
|
|
branch:
|
|
type: string
|
|
base:
|
|
type: string
|
|
default: main
|
|
risk:
|
|
type: string
|
|
enum:
|
|
- low
|
|
- medium
|
|
- high
|
|
description:
|
|
type: string
|
|
message:
|
|
type: string
|
|
TagRequest:
|
|
type: object
|
|
required: [version, target_oid, evidence_closure_oid, approval_plan_id]
|
|
properties:
|
|
version:
|
|
type: string
|
|
example: V1R1C1
|
|
target_oid:
|
|
type: string
|
|
pattern: ^[0-9a-fA-F]{40}$
|
|
description: Full approved commit OID. The tag is created explicitly at this commit, never implicitly at workspace
|
|
HEAD.
|
|
evidence_closure_oid:
|
|
type: string
|
|
pattern: ^[0-9a-fA-F]{40}$
|
|
description: Required evidence closure commit. target_oid must be its ancestor.
|
|
approval_plan_id:
|
|
type: string
|
|
description: Audited owner-approved release or tag plan identifier.
|
|
message:
|
|
type: string
|
|
execute:
|
|
type: boolean
|
|
description: Owner-approved calls only. Otherwise an approval request commit is created.
|
|
RollbackRequest:
|
|
type: object
|
|
required:
|
|
- target_version
|
|
properties:
|
|
target_version:
|
|
type: string
|
|
reason:
|
|
type: string
|
|
branch:
|
|
type: string
|
|
ModelRequest:
|
|
type: object
|
|
required:
|
|
- provider_name
|
|
- base_url
|
|
- model_name
|
|
properties:
|
|
username:
|
|
type: string
|
|
provider_name:
|
|
type: string
|
|
base_url:
|
|
type: string
|
|
model_name:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
api_key_secret_ref:
|
|
type: string
|
|
description: Preferred. Git stores this secret_ref only.
|
|
api_key:
|
|
type: string
|
|
writeOnly: true
|
|
description: Accepted only for runtime secret storage; never committed to Git or logs.
|
|
branch:
|
|
type: string
|
|
message:
|
|
type: string
|
|
ModelPriorityRequest:
|
|
type: object
|
|
required:
|
|
- items
|
|
properties:
|
|
username:
|
|
type: string
|
|
branch:
|
|
type: string
|
|
items:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
model_id:
|
|
type: string
|
|
priority:
|
|
type: integer
|
|
enabled:
|
|
type: boolean
|
|
fallback_policy:
|
|
type: string
|
|
NLRequest:
|
|
type: object
|
|
required:
|
|
- text
|
|
properties:
|
|
text:
|
|
type: string
|
|
branch:
|
|
type: string
|
|
DeploymentPlan:
|
|
type: object
|
|
required:
|
|
- service
|
|
- release_path
|
|
- release_root
|
|
- cutover_link
|
|
- dropin_path
|
|
- dropin_sha256
|
|
- systemd_unit_sha256
|
|
- rollback_path
|
|
- rollback_sha256
|
|
- source_commit
|
|
- tree_oid
|
|
- artifact_sha256
|
|
- manifest_sha256
|
|
- package_closure_sha256
|
|
- authoritative_git_dir
|
|
- repository_identity
|
|
- writer_expected
|
|
- baseline_before_sha256
|
|
- registry_before_sha256
|
|
- production_tag_refset_before_sha256
|
|
- health_contract_version
|
|
- timeout_policy
|
|
- retry_policy
|
|
- policy_sha256
|
|
- health_contract
|
|
properties:
|
|
service:
|
|
type: string
|
|
release_path:
|
|
type: string
|
|
release_root:
|
|
type: string
|
|
cutover_link:
|
|
type: string
|
|
dropin_path:
|
|
type: string
|
|
dropin_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
systemd_unit_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
rollback_path:
|
|
type: string
|
|
rollback_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
source_commit:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
tree_oid:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
artifact_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
manifest_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
package_closure_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
authoritative_git_dir:
|
|
type: string
|
|
repository_identity:
|
|
type: string
|
|
writer_expected:
|
|
type: boolean
|
|
enum:
|
|
- false
|
|
baseline_before_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
registry_before_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
production_tag_refset_before_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
health_contract_version:
|
|
type: string
|
|
timeout_policy:
|
|
type: object
|
|
retry_policy:
|
|
type: object
|
|
policy_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
health_contract:
|
|
type: object
|
|
additionalProperties: true
|
|
ReleaseCandidateInput:
|
|
type: object
|
|
required:
|
|
- source_commit
|
|
- version
|
|
additionalProperties: false
|
|
properties:
|
|
candidate_id:
|
|
type: string
|
|
pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]{2,127}$
|
|
source_commit:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
version:
|
|
type: string
|
|
pattern: ^V[0-9]+R[0-9]+C[0-9]+(?:[-.][A-Za-z0-9][A-Za-z0-9.-]*)?$
|
|
ReleaseIntentInput:
|
|
type: object
|
|
required:
|
|
- event_id
|
|
- source_commit
|
|
additionalProperties: false
|
|
properties:
|
|
event_id:
|
|
type: string
|
|
pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]{2,255}$
|
|
source_commit:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
SignedReleasePlanApproval:
|
|
type: object
|
|
required:
|
|
- release_plan_id
|
|
- candidate_id
|
|
- source_commit
|
|
- tree_oid
|
|
- artifact_sha256
|
|
- manifest_sha256
|
|
- deployment_plan_sha256
|
|
- release_plan_sha256
|
|
- policy_sha256
|
|
- approval_plan_id
|
|
- evidence_closure_oid
|
|
- owner_approval_record_oid
|
|
- capabilities
|
|
- owner_identity
|
|
- trust_domain
|
|
- issued_at
|
|
- not_before
|
|
- expires_at
|
|
- nonce
|
|
- key_id
|
|
- signature
|
|
properties:
|
|
release_plan_id:
|
|
type: string
|
|
candidate_id:
|
|
type: string
|
|
source_commit:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
tree_oid:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
artifact_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
manifest_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
deployment_plan_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
release_plan_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
policy_sha256:
|
|
type: string
|
|
pattern: ^[0-9a-f]{64}$
|
|
approval_plan_id:
|
|
type: string
|
|
evidence_closure_oid:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
owner_approval_record_oid:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
owner_identity:
|
|
type: string
|
|
trust_domain:
|
|
type: string
|
|
issued_at:
|
|
type: string
|
|
format: date-time
|
|
not_before:
|
|
type: string
|
|
format: date-time
|
|
capabilities:
|
|
type: array
|
|
uniqueItems: true
|
|
items:
|
|
type: string
|
|
enum:
|
|
- runtime_switch
|
|
- tag_publish
|
|
- baseline_registry_finalize
|
|
expires_at:
|
|
type: string
|
|
format: date-time
|
|
nonce:
|
|
type: string
|
|
minLength: 16
|
|
key_id:
|
|
type: string
|
|
signature:
|
|
type: string
|
|
format: byte
|
|
writeOnly: true
|
|
StartDeploymentRequest:
|
|
type: object
|
|
required:
|
|
- candidate_id
|
|
additionalProperties: false
|
|
properties:
|
|
candidate_id:
|
|
type: string
|
|
Oid40:
|
|
type: string
|
|
pattern: ^[0-9a-f]{40}$
|
|
CreateGovernedTaskRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- task_id
|
|
- repository
|
|
- base_oid
|
|
- target_branch
|
|
- risk
|
|
- description
|
|
- idempotency_key
|
|
properties:
|
|
task_id:
|
|
type: string
|
|
repository:
|
|
type: string
|
|
const: aios/aios
|
|
base_oid:
|
|
$ref: '#/components/schemas/Oid40'
|
|
target_branch:
|
|
type: string
|
|
pattern: ^agent/
|
|
risk:
|
|
type: string
|
|
enum:
|
|
- low
|
|
- medium
|
|
- high
|
|
- engineering
|
|
description:
|
|
type: string
|
|
idempotency_key:
|
|
type: string
|
|
expected_branch_oid:
|
|
$ref: '#/components/schemas/Oid40'
|
|
generation:
|
|
type: integer
|
|
minimum: 1
|
|
WriterLeaseRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- schema
|
|
- task_id
|
|
- repository
|
|
- branch_mode
|
|
- base_oid
|
|
- expected_branch_oid
|
|
- target_branch
|
|
- generation
|
|
- lease_seconds
|
|
properties:
|
|
schema:
|
|
type: string
|
|
task_id:
|
|
type: string
|
|
repository:
|
|
type: string
|
|
const: aios/aios
|
|
branch_mode:
|
|
type: string
|
|
enum:
|
|
- CREATE_NEW
|
|
- CONTINUE_EXISTING
|
|
base_oid:
|
|
$ref: '#/components/schemas/Oid40'
|
|
expected_branch_oid:
|
|
$ref: '#/components/schemas/Oid40'
|
|
target_branch:
|
|
type: string
|
|
pattern: ^agent/
|
|
generation:
|
|
type: integer
|
|
minimum: 1
|
|
lease_seconds:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 86400
|
|
CommitFileGovernedRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- task_id
|
|
- repository
|
|
- expected_branch_oid
|
|
- target_branch
|
|
- generation
|
|
- idempotency_key
|
|
- path
|
|
- content_base64
|
|
- message
|
|
properties:
|
|
task_id:
|
|
type: string
|
|
repository:
|
|
type: string
|
|
const: aios/aios
|
|
expected_branch_oid:
|
|
$ref: '#/components/schemas/Oid40'
|
|
target_branch:
|
|
type: string
|
|
pattern: ^agent/
|
|
generation:
|
|
type: integer
|
|
minimum: 1
|
|
idempotency_key:
|
|
type: string
|
|
path:
|
|
type: string
|
|
content_base64:
|
|
type: string
|
|
message:
|
|
type: string
|
|
CommitFilesGovernedRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- task_id
|
|
- repository
|
|
- expected_branch_oid
|
|
- target_branch
|
|
- generation
|
|
- idempotency_key
|
|
- files
|
|
- message
|
|
properties:
|
|
task_id:
|
|
type: string
|
|
repository:
|
|
type: string
|
|
const: aios/aios
|
|
expected_branch_oid:
|
|
$ref: '#/components/schemas/Oid40'
|
|
target_branch:
|
|
type: string
|
|
pattern: ^agent/
|
|
generation:
|
|
type: integer
|
|
minimum: 1
|
|
idempotency_key:
|
|
type: string
|
|
files:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
description: Base64 encoded file bytes
|
|
message:
|
|
type: string
|
|
CreateOnlineAgentTaskRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- goal
|
|
- instructions
|
|
- success_criteria
|
|
- idempotency_key
|
|
properties:
|
|
task_id:
|
|
type: string
|
|
goal:
|
|
type: string
|
|
instructions:
|
|
type: string
|
|
success_criteria:
|
|
type: array
|
|
items: {}
|
|
required_capabilities:
|
|
type: array
|
|
items:
|
|
type: string
|
|
constraints:
|
|
type: object
|
|
additionalProperties: true
|
|
metadata:
|
|
type: object
|
|
additionalProperties: true
|
|
deadline:
|
|
type: string
|
|
format: date-time
|
|
priority:
|
|
type: integer
|
|
minimum: -100
|
|
maximum: 100
|
|
max_attempts:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 20
|
|
idempotency_key:
|
|
type: string
|
|
paths:
|
|
/api/run:
|
|
get:
|
|
operationId: getRuntimeStatus
|
|
summary: Read runtime status
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
/api/base:
|
|
get:
|
|
operationId: getBaseline
|
|
summary: Read current AIOS baseline
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
/api/ver:
|
|
get:
|
|
operationId: listVersions
|
|
summary: List GitOps versions
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
/api/diff:
|
|
get:
|
|
operationId: getDiff
|
|
summary: Read Git diff between refs
|
|
parameters:
|
|
- in: query
|
|
name: from
|
|
schema:
|
|
type: string
|
|
default: HEAD~1
|
|
- in: query
|
|
name: to
|
|
schema:
|
|
type: string
|
|
default: HEAD
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
/api/governed-write-capabilities:
|
|
get:
|
|
operationId: getGovernedWriteCapabilities
|
|
responses:
|
|
'200':
|
|
description: Governed and legacy write capability status
|
|
/api/control-plane-snapshot:
|
|
get:
|
|
operationId: getControlPlaneSnapshot
|
|
responses:
|
|
'200':
|
|
description: Non-sensitive control-plane snapshot
|
|
/createGovernedTask:
|
|
post:
|
|
operationId: createGovernedTask
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CreateGovernedTaskRequest'
|
|
responses:
|
|
'200':
|
|
description: Governed task binding
|
|
/acquireWriterLease:
|
|
post:
|
|
operationId: acquireWriterLease
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/WriterLeaseRequest'
|
|
responses:
|
|
'200':
|
|
description: Writer lease binding
|
|
/commitFileGoverned:
|
|
post:
|
|
operationId: commitFileGoverned
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CommitFileGovernedRequest'
|
|
responses:
|
|
'200':
|
|
description: Durable GitOps job receipt
|
|
/commitFilesGoverned:
|
|
post:
|
|
operationId: commitFilesGoverned
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CommitFilesGovernedRequest'
|
|
responses:
|
|
'200':
|
|
description: Durable GitOps job receipt
|
|
/getGitOpsJob:
|
|
post:
|
|
operationId: getGitOpsJob
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- job_id
|
|
properties:
|
|
job_id:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Job receipt
|
|
/resumeGitOpsJob:
|
|
post:
|
|
operationId: resumeGitOpsJob
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- job_id
|
|
- expected_revision
|
|
properties:
|
|
job_id:
|
|
type: string
|
|
expected_revision:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: Resumed job receipt
|
|
/reconcileGitOpsJob:
|
|
post:
|
|
operationId: reconcileGitOpsJob
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- job_id
|
|
- expected_revision
|
|
properties:
|
|
job_id:
|
|
type: string
|
|
expected_revision:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: Reconciliation receipt
|
|
/createOnlineAgentTask:
|
|
post:
|
|
operationId: createOnlineAgentTask
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CreateOnlineAgentTaskRequest'
|
|
responses:
|
|
'200':
|
|
description: Online task created
|
|
'201':
|
|
description: Online task created
|
|
/registerOnlineAgent:
|
|
post:
|
|
operationId: registerOnlineAgent
|
|
x-openai-isConsequential: true
|
|
description: 'Control operation. The returned agent token is secret material and must be delivered through runtime secret
|
|
storage, never Git.
|
|
|
|
'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- agent_id
|
|
- agent_type
|
|
- agent_version
|
|
- capabilities
|
|
properties:
|
|
agent_id:
|
|
type: string
|
|
agent_type:
|
|
type: string
|
|
agent_version:
|
|
type: string
|
|
capabilities:
|
|
type: array
|
|
items:
|
|
type: string
|
|
metadata:
|
|
type: object
|
|
additionalProperties: true
|
|
responses:
|
|
'201':
|
|
description: Agent registered
|
|
/api/online-agent-task:
|
|
get:
|
|
operationId: getOnlineAgentTask
|
|
parameters:
|
|
- name: task_id
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Task status
|
|
/api/online-agent-task-events:
|
|
get:
|
|
operationId: getOnlineAgentTaskEvents
|
|
parameters:
|
|
- name: task_id
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Task events
|
|
/verifyOnlineAgentTask:
|
|
post:
|
|
operationId: verifyOnlineAgentTask
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- task_id
|
|
- decision
|
|
properties:
|
|
task_id:
|
|
type: string
|
|
decision:
|
|
type: string
|
|
enum:
|
|
- SUCCEEDED
|
|
- NEEDS_REWORK
|
|
- FAILED
|
|
verification:
|
|
type: object
|
|
additionalProperties: true
|
|
responses:
|
|
'200':
|
|
description: Verification applied
|
|
/cancelOnlineAgentTask:
|
|
post:
|
|
operationId: cancelOnlineAgentTask
|
|
x-openai-isConsequential: true
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- task_id
|
|
properties:
|
|
task_id:
|
|
type: string
|
|
reason:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Task cancelled
|
|
/createReleaseCandidate:
|
|
post:
|
|
operationId: createReleaseCandidate
|
|
summary: Submit release intent to the trusted builder; caller evidence is rejected
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ReleaseCandidateInput'
|
|
responses:
|
|
'200':
|
|
description: Candidate created or idempotently returned
|
|
'400':
|
|
description: Invalid or conflicting candidate evidence
|
|
'401':
|
|
description: Unauthorized
|
|
x-openai-isConsequential: true
|
|
/getReleaseCandidate:
|
|
get:
|
|
operationId: getReleaseCandidate
|
|
summary: Read a durable release candidate
|
|
parameters:
|
|
- in: query
|
|
name: candidate_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Candidate
|
|
'404':
|
|
description: Candidate not found
|
|
/getApprovalEnvelope:
|
|
get:
|
|
operationId: getApprovalEnvelope
|
|
summary: Generate the immutable owner-signature payload
|
|
parameters:
|
|
- in: query
|
|
name: candidate_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Approval envelope fingerprint inputs
|
|
'404':
|
|
description: Candidate not found
|
|
/submitOwnerApproval:
|
|
post:
|
|
operationId: submitOwnerApproval
|
|
summary: Verify and durably store a signed owner release plan
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SignedReleasePlanApproval'
|
|
responses:
|
|
'200':
|
|
description: Signature verified and approval stored
|
|
'400':
|
|
description: Invalid approval
|
|
'403':
|
|
description: Signature
|
|
key: null
|
|
expiry: null
|
|
or revocation failure: null
|
|
'409':
|
|
description: Conflicting release plan
|
|
x-openai-isConsequential: true
|
|
/startDeployment:
|
|
post:
|
|
operationId: startDeployment
|
|
summary: Resume the durable approved Saga; caller cannot replace approval
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StartDeploymentRequest'
|
|
responses:
|
|
'200':
|
|
description: Shadow result or deployment Saga result
|
|
'403':
|
|
description: Execution disabled or approval invalid
|
|
'409':
|
|
description: Saga conflict
|
|
x-openai-isConsequential: true
|
|
/getReleaseSaga:
|
|
get:
|
|
operationId: getReleaseSaga
|
|
summary: Read durable Saga state and event journal
|
|
parameters:
|
|
- in: query
|
|
name: candidate_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Saga snapshot
|
|
'404':
|
|
description: Saga not found
|
|
/api/release-consistency:
|
|
get:
|
|
operationId: getReleaseConsistency
|
|
summary: Compare Registry, Baseline, remote tag, Gitea API, listing, repository identity, and expected target
|
|
parameters:
|
|
- in: query
|
|
name: version
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: target_oid
|
|
required: true
|
|
schema:
|
|
type: string
|
|
pattern: ^[0-9a-fA-F]{40}$
|
|
- in: query
|
|
name: evidence_closure_oid
|
|
required: true
|
|
schema:
|
|
type: string
|
|
pattern: ^[0-9a-fA-F]{40}$
|
|
- in: query
|
|
name: approval_plan_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: PASS
|
|
FAIL: null
|
|
or fail-closed UNKNOWN: null
|
|
/api/tag-publication-status:
|
|
get:
|
|
operationId: getTagPublicationStatus
|
|
summary: Read durable publication Saga status without mutation
|
|
parameters:
|
|
- in: query
|
|
name: version
|
|
required: true
|
|
schema:
|
|
type: string
|
|
pattern: ^V\d+R\d+C\d+(?:-[A-Za-z0-9_.-]+)?$
|
|
responses:
|
|
'200':
|
|
description: Canonical publication state or fail-closed UNKNOWN
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PublicationStatus'
|
|
'400':
|
|
description: Version required
|
|
/api/release-acceptance:
|
|
get:
|
|
operationId: runReleaseAcceptance
|
|
summary: Run read-only release acceptance; UNKNOWN is not accepted
|
|
parameters:
|
|
- in: query
|
|
name: version
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: target_oid
|
|
required: true
|
|
schema:
|
|
type: string
|
|
pattern: ^[0-9a-fA-F]{40}$
|
|
- in: query
|
|
name: evidence_closure_oid
|
|
required: true
|
|
schema:
|
|
type: string
|
|
pattern: ^[0-9a-fA-F]{40}$
|
|
- in: query
|
|
name: approval_plan_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Acceptance result with accepted boolean
|
|
/api/tag:
|
|
post:
|
|
operationId: requestOrCreateTag
|
|
summary: Request tag creation; owner execution is required for direct tag
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/TagRequest'
|
|
responses:
|
|
'200':
|
|
description: Gitea-confirmed tag and fail-closed baseline result
|
|
'400':
|
|
description: Missing governance evidence or invalid OID
|
|
'403':
|
|
description: Forbidden
|
|
'409':
|
|
description: Existing tag target conflict or evidence lineage mismatch
|
|
'502':
|
|
description: Gitea reconciliation required
|
|
'503':
|
|
description: Remote push pending
|
|
x-openai-isConsequential: true
|
|
/api/rollback:
|
|
post:
|
|
operationId: requestRollback
|
|
summary: Commit a rollback request requiring owner/admin approval
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RollbackRequest'
|
|
responses:
|
|
'200':
|
|
description: Rollback request committed
|
|
'401':
|
|
description: Unauthorized
|
|
x-openai-isConsequential: true
|