autonomy-smoke-tests phase1-p0 PASS evidence_sha256=13aff2dfe664be536470ca26a6ac3f20ba15fdca37cd4f8e799c0c8c36974be9
autonomy-unit-tests phase1-p0 PASS evidence_sha256=118708029df05d861585179a31e4f4eaf0d7953563f5347b76732f2055785ba0
campaign-approval-gate phase1-p0 PASS evidence_sha256=4e39d586b32ad2d17da8fc38f5d359ace8a239af8687b4f894a338fe9f0bf83c
git-diff-check phase1-p0 PASS evidence_sha256=2638b909fa281012b6a43aaf34e1d611b0dba1fc78bf47f54941739973ee6281
py-compile phase1-p0 PASS evidence_sha256=440cf54c4225f809a575eff9b24238acd361497fd18bffbb359087e88310dcd6
reconciliation-contract phase1-p0 PASS evidence_sha256=131fb1042ff1ceb565dbf1ec7aed1cd3879d728f912745c0589a02b96381baaf
release-state-machine phase1-p0 PASS evidence_sha256=a74b5192b248b6e342afeea01c85ecbb8a02d71891bcf334df2e89d96cc1577d
secret-scan phase1-p0 PASS evidence_sha256=d4789e5c45ba681c651c613427d70d911a4cdd70fbead0772c4e1e376bef41cd
signer-validator-contract phase1-p0 PASS evidence_sha256=a29c7664de7aa9e30e966f8c4a14c0eaf8191fbb92ba726a72ba3c7ec2659eec
785 lines
34 KiB
YAML
785 lines
34 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: AIOS GitOps Controlled Access API
|
|
version: V1R1C0-chatgpt-actions
|
|
description: Controlled ChatGPT Actions API for AIOS online GitOps baseline. Read endpoints are public. Write endpoints require Bearer token and create Git commits on non-main branches.
|
|
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}
|
|
RepositoryTreeEntry:
|
|
type: object
|
|
required: [path, type, object_oid]
|
|
properties:
|
|
path: {type: string, minLength: 1, maxLength: 512}
|
|
type: {type: string, enum: [blob, tree, commit]}
|
|
object_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
mode: {type: string}
|
|
RepositoryTreeResponse:
|
|
type: object
|
|
required: [repository, resolved_oid, entries, truncated, next_cursor]
|
|
properties:
|
|
repository: {type: string, const: aios/aios}
|
|
resolved_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
entries: {type: array, items: {$ref: '#/components/schemas/RepositoryTreeEntry'}}
|
|
truncated: {type: boolean}
|
|
next_cursor: {type: string, nullable: true, maxLength: 4096}
|
|
RepositorySearchMatch:
|
|
type: object
|
|
required: [path, line_start, line_end, blob_oid, snippet]
|
|
properties:
|
|
path: {type: string, minLength: 1, maxLength: 512}
|
|
line_start: {type: integer, minimum: 1}
|
|
line_end: {type: integer, minimum: 1}
|
|
blob_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
snippet: {type: string, maxLength: 512}
|
|
RepositorySearchResponse:
|
|
type: object
|
|
required: [repository, resolved_oid, matches, scanned_bytes, max_bytes, truncated, next_cursor]
|
|
properties:
|
|
repository: {type: string, const: aios/aios}
|
|
resolved_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
matches: {type: array, items: {$ref: '#/components/schemas/RepositorySearchMatch'}}
|
|
scanned_bytes: {type: integer, minimum: 0}
|
|
max_bytes: {type: integer, minimum: 1, maximum: 1048576}
|
|
binary_blobs_skipped: {type: integer, minimum: 0}
|
|
truncated: {type: boolean}
|
|
next_cursor: {type: string, nullable: true, maxLength: 4096}
|
|
RepositoryDiffEntry:
|
|
type: object
|
|
required: [path, status, additions, deletions, old_path]
|
|
properties:
|
|
path: {type: string, minLength: 1, maxLength: 512}
|
|
status: {type: string, pattern: '^[ACDMRTUX][0-9]*$'}
|
|
additions: {type: integer, nullable: true, minimum: 0}
|
|
deletions: {type: integer, nullable: true, minimum: 0}
|
|
old_path: {type: string, nullable: true, maxLength: 512}
|
|
RepositoryDiffIndexResponse:
|
|
type: object
|
|
required: [repository, resolved_from_oid, resolved_to_oid, entries, truncated, next_cursor]
|
|
properties:
|
|
repository: {type: string, const: aios/aios}
|
|
resolved_from_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
resolved_to_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
entries: {type: array, items: {$ref: '#/components/schemas/RepositoryDiffEntry'}}
|
|
truncated: {type: boolean}
|
|
next_cursor: {type: string, nullable: true, maxLength: 4096}
|
|
RepositoryFileResponse:
|
|
type: object
|
|
required: [repository, resolved_oid, blob_oid, path, content, content_base64, content_bytes, truncated]
|
|
properties:
|
|
repository: {type: string, const: aios/aios}
|
|
resolved_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
blob_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
path: {type: string, minLength: 1, maxLength: 512}
|
|
content: {type: string}
|
|
content_base64: {type: string, format: byte}
|
|
content_bytes: {type: integer, minimum: 0}
|
|
truncated: {type: boolean}
|
|
paths:
|
|
/v2/repository/tree:
|
|
get:
|
|
operationId: listRepositoryTree
|
|
summary: List one bounded page of an immutable repository tree
|
|
security: []
|
|
x-openai-isConsequential: false
|
|
x-aios-read-only: true
|
|
x-aios-bounded: true
|
|
x-aios-repository-scoped: true
|
|
x-aios-no-shell: true
|
|
x-aios-legacy-path: /api/repository/tree
|
|
parameters:
|
|
- {in: query, name: repository, required: true, schema: {type: string, const: aios/aios}}
|
|
- {in: query, name: ref, required: true, schema: {type: string, minLength: 1, maxLength: 240}}
|
|
- {in: query, name: prefix, schema: {type: string, maxLength: 512}}
|
|
- {in: query, name: depth, schema: {type: integer, minimum: 1, maximum: 32, default: 8}}
|
|
- {in: query, name: limit, required: true, schema: {type: integer, minimum: 1, maximum: 1000}}
|
|
- {in: query, name: cursor, schema: {type: string, maxLength: 4096}}
|
|
responses:
|
|
'200': {description: Immutable tree page, content: {application/json: {schema: {$ref: '#/components/schemas/RepositoryTreeResponse'}}}}
|
|
'400': {description: Invalid repository, ref, path, bounds, or cursor}
|
|
'403': {description: Repository identity is not allowed}
|
|
'404': {description: Repository ref or path not found}
|
|
'503': {description: Authoritative repository or discovery configuration unavailable}
|
|
/v2/repository/search:
|
|
get:
|
|
operationId: searchRepositorySource
|
|
summary: Search bounded source blobs at one immutable repository revision
|
|
security: []
|
|
x-openai-isConsequential: false
|
|
x-aios-read-only: true
|
|
x-aios-bounded: true
|
|
x-aios-repository-scoped: true
|
|
x-aios-no-shell: true
|
|
x-aios-legacy-path: /api/repository/search
|
|
parameters:
|
|
- {in: query, name: repository, required: true, schema: {type: string, const: aios/aios}}
|
|
- {in: query, name: ref, required: true, schema: {type: string, minLength: 1, maxLength: 240}}
|
|
- {in: query, name: query, required: true, schema: {type: string, minLength: 1, maxLength: 512}}
|
|
- {in: query, name: path_globs, style: form, explode: true, schema: {type: array, maxItems: 16, items: {type: string, maxLength: 512}}}
|
|
- {in: query, name: max_matches, required: true, schema: {type: integer, minimum: 1, maximum: 1000}}
|
|
- {in: query, name: max_bytes, required: true, schema: {type: integer, minimum: 1, maximum: 1048576}}
|
|
- {in: query, name: cursor, schema: {type: string, maxLength: 4096}}
|
|
responses:
|
|
'200': {description: Bounded source matches with blob identity, content: {application/json: {schema: {$ref: '#/components/schemas/RepositorySearchResponse'}}}}
|
|
'400': {description: Invalid repository, ref, query, path glob, bounds, or cursor}
|
|
'403': {description: Repository identity is not allowed}
|
|
'404': {description: Repository ref not found}
|
|
'503': {description: Authoritative repository or discovery configuration unavailable}
|
|
/v2/repository/diff-index:
|
|
get:
|
|
operationId: getDiffIndex
|
|
summary: List a bounded immutable diff index without returning a patch
|
|
security: []
|
|
x-openai-isConsequential: false
|
|
x-aios-read-only: true
|
|
x-aios-bounded: true
|
|
x-aios-repository-scoped: true
|
|
x-aios-no-shell: true
|
|
x-aios-legacy-path: /api/repository/diff-index
|
|
parameters:
|
|
- {in: query, name: repository, required: true, schema: {type: string, const: aios/aios}}
|
|
- {in: query, name: from, required: true, schema: {type: string, minLength: 1, maxLength: 240}}
|
|
- {in: query, name: to, required: true, schema: {type: string, minLength: 1, maxLength: 240}}
|
|
- {in: query, name: path_prefix, schema: {type: string, maxLength: 512}}
|
|
- {in: query, name: limit, required: true, schema: {type: integer, minimum: 1, maximum: 1000}}
|
|
- {in: query, name: cursor, schema: {type: string, maxLength: 4096}}
|
|
responses:
|
|
'200': {description: Bounded diff index with immutable endpoints, content: {application/json: {schema: {$ref: '#/components/schemas/RepositoryDiffIndexResponse'}}}}
|
|
'400': {description: Invalid repository, revision, path prefix, bounds, or cursor}
|
|
'403': {description: Repository identity is not allowed}
|
|
'404': {description: Repository revision not found}
|
|
'503': {description: Authoritative repository or discovery configuration unavailable}
|
|
/v2/repository/file:
|
|
get:
|
|
operationId: readRepositoryFile
|
|
summary: Read one bounded file from an immutable repository revision
|
|
security: []
|
|
x-openai-isConsequential: false
|
|
x-aios-read-only: true
|
|
x-aios-bounded: true
|
|
x-aios-repository-scoped: true
|
|
x-aios-no-shell: true
|
|
x-aios-legacy-path: /api/repository/file
|
|
parameters:
|
|
- {in: query, name: repository, required: true, schema: {type: string, const: aios/aios}}
|
|
- {in: query, name: ref, required: true, schema: {type: string, minLength: 1, maxLength: 240}}
|
|
- {in: query, name: path, required: true, schema: {type: string, minLength: 1, maxLength: 512}}
|
|
- {in: query, name: max_bytes, schema: {type: integer, minimum: 1, maximum: 1048576, default: 262144}}
|
|
responses:
|
|
'200': {description: Bounded file content with resolved commit and blob identity, content: {application/json: {schema: {$ref: '#/components/schemas/RepositoryFileResponse'}}}}
|
|
'400': {description: Invalid repository, ref, path, or bounds}
|
|
'403': {description: Repository identity is not allowed}
|
|
'404': {description: Repository ref or file not found}
|
|
'503': {description: Authoritative repository or discovery configuration unavailable}
|
|
/v2/commit-files:
|
|
post:
|
|
operationId: commitFilesGoverned
|
|
summary: Submit one atomic governed commit containing multiple files
|
|
security: [{taskPrincipalAuth: []}]
|
|
x-aios-task-principal: Bridge verifies a fresh aios.task-principal-assertion.v1 and exact task/job/repository/branch/generation/revision/attempt/execution-digest/capability binding; caller JSON cannot provide a principal and missing verification is denied.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- task_id
|
|
- job_id
|
|
- repository
|
|
- expected_branch_oid
|
|
- target_branch
|
|
- generation
|
|
- idempotency_key
|
|
- files
|
|
- message
|
|
properties:
|
|
task_id: {type: string}
|
|
job_id: {type: string, description: External durable Job identity for exact completed-replay reconciliation}
|
|
source_lease_epoch: {type: integer, minimum: 1}
|
|
repository: {type: string, example: aios/aios}
|
|
expected_branch_oid: {type: string, pattern: '^[0-9a-f]{40}$'}
|
|
target_branch: {type: string, pattern: '^agent/[A-Za-z0-9._/-]+$'}
|
|
generation: {type: integer, minimum: 1}
|
|
idempotency_key: {type: string}
|
|
files:
|
|
type: array
|
|
minItems: 1
|
|
items:
|
|
type: object
|
|
additionalProperties: false
|
|
required: [path, content_base64]
|
|
properties:
|
|
path: {type: string, minLength: 1, maxLength: 512}
|
|
content_base64: {type: string}
|
|
message: {type: string, minLength: 1, maxLength: 200}
|
|
responses:
|
|
'200': {description: Governed commit job and verified branch result}
|
|
'202': {description: Existing external Job alias requires authoritative reconciliation; no replacement Job is created}
|
|
'401': {description: No verified Task principal is available}
|
|
'403': {description: Verified Task principal lacks exact task, external Job, or capability scope}
|
|
'400': {description: Contract or policy rejection}
|
|
'409': {description: Branch CAS or idempotency conflict}
|
|
'423': {description: Narrow P0 Task-principal mutation gate is frozen; assertion is not consumed}
|
|
/createReleaseIntent:
|
|
post:
|
|
operationId: createReleaseIntent
|
|
summary: Create an idempotent intent; all build evidence comes from the trusted builder
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/ReleaseIntentInput'}
|
|
responses:
|
|
'200': {description: Intent created or idempotently returned}
|
|
'400': {description: Caller evidence or invalid intent rejected}
|
|
x-openai-isConsequential: true
|
|
/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}
|
|
/getReleasePlan:
|
|
get:
|
|
operationId: getReleasePlan
|
|
parameters:
|
|
- {in: query, name: candidate_id, required: true, schema: {type: string}}
|
|
responses:
|
|
'200': {description: Immutable release plan}
|
|
'404': {description: Candidate not found}
|
|
/getReleaseAcceptance:
|
|
get:
|
|
operationId: getReleaseAcceptance
|
|
parameters:
|
|
- {in: query, name: candidate_id, required: true, schema: {type: string}}
|
|
responses:
|
|
'200': {description: Builder attestation and acceptance checks}
|
|
'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, expiry, or revocation failure}
|
|
'409': {description: Conflicting release plan}
|
|
x-openai-isConsequential: true
|
|
/submitSignedApproval:
|
|
post:
|
|
operationId: submitSignedApproval
|
|
summary: Alias for immutable signed owner approval submission
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/SignedReleasePlanApproval'}
|
|
responses:
|
|
'200': {description: Signature verified and approval stored}
|
|
'403': {description: Production approval backend unavailable or signature invalid}
|
|
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}
|
|
/getCapabilityStatus:
|
|
get:
|
|
operationId: getCapabilityStatus
|
|
parameters:
|
|
- {in: query, name: candidate_id, required: true, schema: {type: string}}
|
|
responses:
|
|
'200': {description: Durable single-use capability records}
|
|
/getRecoveryStatus:
|
|
get:
|
|
operationId: getRecoveryStatus
|
|
responses:
|
|
'200': {description: Fail-closed recovery classification}
|
|
/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/patch:
|
|
get:
|
|
operationId: listPatches
|
|
summary: List patch records
|
|
responses: {'200': {description: OK}}
|
|
post:
|
|
operationId: createPatch
|
|
summary: Create a patch branch and commit metadata
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/PatchRequest'}
|
|
responses: {'200': {description: Patch branch committed}, '401': {description: Unauthorized}, '403': {description: Forbidden}}
|
|
x-openai-isConsequential: true
|
|
/api/model:
|
|
get:
|
|
operationId: readModelRegistry
|
|
summary: Read visible model registry and priority
|
|
responses: {'200': {description: OK}}
|
|
post:
|
|
operationId: registerModel
|
|
summary: Register a custom model; API keys are stored as runtime secrets and Git receives secret_ref only
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/ModelRequest'}
|
|
responses: {'200': {description: Model registered and committed}, '401': {description: Unauthorized}, '403': {description: Forbidden}}
|
|
x-openai-isConsequential: true
|
|
/api/run:
|
|
get:
|
|
operationId: getRuntimeStatus
|
|
summary: Read runtime status
|
|
responses: {'200': {description: OK}}
|
|
/api/branch:
|
|
post:
|
|
operationId: createBranch
|
|
summary: Create a non-main branch and commit branch metadata
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/BranchRequest'}
|
|
responses: {'200': {description: Branch created}, '401': {description: Unauthorized}, '403': {description: Forbidden}}
|
|
x-openai-isConsequential: true
|
|
/api/file:
|
|
post:
|
|
operationId: commitFile
|
|
summary: Write a file and create a Git commit on a non-main branch
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/FileCommitRequest'}
|
|
responses: {'200': {description: File committed}, '400': {description: Secret rejected or invalid path}, '401': {description: Unauthorized}}
|
|
x-openai-isConsequential: true
|
|
/api/commit-file:
|
|
post:
|
|
operationId: commitFileAtomic
|
|
summary: Atomically write one allowlisted file, commit, push, and verify using Token Policy V2
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/AtomicFileCommitRequest'}
|
|
responses:
|
|
'200': {description: Completed or idempotently replayed}
|
|
'400': {description: Invalid canonical request}
|
|
'401': {description: Missing, invalid, expired, or revoked Token Policy V2 grant}
|
|
'403': {description: Audience, source, branch, operation, path, or policy denied}
|
|
'409': {description: Idempotency conflict or manual review required}
|
|
'413': {description: Request too large}
|
|
'503': {description: Push or remote verification unavailable; recoverable}
|
|
x-openai-isConsequential: true
|
|
/api/commit:
|
|
post:
|
|
operationId: commitChanges
|
|
summary: Commit existing workspace changes on a non-main branch
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/CommitRequest'}
|
|
responses: {'200': {description: Commit result}, '401': {description: Unauthorized}}
|
|
x-openai-isConsequential: true
|
|
/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-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, or fail-closed UNKNOWN}}
|
|
/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
|
|
/api/model-priority:
|
|
put:
|
|
operationId: setModelPriority
|
|
summary: Set model priority and commit policy file
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/ModelPriorityRequest'}
|
|
responses: {'200': {description: Priority updated and committed}, '401': {description: Unauthorized}}
|
|
x-openai-isConsequential: true
|
|
/api/nl:
|
|
post:
|
|
operationId: planNaturalLanguageGitOpsAction
|
|
summary: Convert natural language to a safe committed plan without executing V-level changes
|
|
security: [{bearerAuth: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: {$ref: '#/components/schemas/NLRequest'}
|
|
responses:
|
|
'200': {description: Safe GitOps plan}
|
|
'401': {description: Unauthorized}
|
|
x-openai-isConsequential: true
|