HirModel's picture
Upload 40 files
25b7932 verified
Raw
History Blame Contribute Delete
5.53 kB
openapi: 3.1.0
info:
title: Substrate Mesh Runtime Connector API
version: 3.3.1
description: >
GPT Action schema for Primordial OS Runtime. Routes bounded mesh commands into
Substrate trace capsules, Primordial Periodic Table references, Primordial Periodic
Alchemical Output, HIR × OAM receipts, lexicon state, workspace-local overlay
proposals, and audit receipts. Canonical sources and the canonical Primordial
Lexicon remain read-only.
servers:
- url: https://YOUR-HF-SPACE.hf.space
description: Replace with deployed Hugging Face Docker Space URL.
paths:
/v1/mesh/health:
get:
operationId: getSubstrateHealth
summary: Check Substrate connector health and boundary posture
responses:
'200':
description: Health and boundary posture
content:
application/json:
schema:
type: object
properties:
status: { type: string }
version: { type: string }
pressure_spine: { type: string }
source_mutation_allowed: { type: boolean }
canonical_source_posture: { type: string }
canonical_lexicon_posture: { type: string }
overlay_scope: { type: string }
human_review_required: { type: boolean }
auth_configured: { type: boolean }
timestamp_utc: { type: string }
/v1/mesh/command:
post:
operationId: submitMeshCommand
summary: Submit a bounded Substrate mesh command capsule
description: >
Converts a user command or threadroom post into a trace capsule, resolves PPT
elements, returns alchemical output, applies HIR × OAM receipt boundaries, and
stores a workspace-local receipt. This endpoint never mutates canonical source
artifacts or the canonical Primordial Lexicon.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MeshCommand'
responses:
'200':
description: Receipt-bound Substrate response
content:
application/json:
schema:
$ref: '#/components/schemas/MeshCommandResponse'
'400': { description: Boundary or validation error }
'401': { description: Missing bearer token }
'403': { description: Invalid bearer token }
/v1/mesh/receipt/{command_id}:
get:
operationId: getMeshReceipt
summary: Fetch a stored mesh command receipt
security:
- BearerAuth: []
parameters:
- name: command_id
in: path
required: true
schema: { type: string }
- name: workspace_id
in: query
required: false
schema:
type: string
default: workspace_local_001
responses:
'200':
description: Stored response/receipt for command_id + workspace_id
content:
application/json:
schema:
$ref: '#/components/schemas/MeshCommandResponse'
'404': { description: Receipt not found }
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
schemas:
MeshCommand:
type: object
required: [raw_user_text]
properties:
command_type:
type: string
enum: [DISCOVER, BRAINSTORM, COMBINE, EXTEND_RESEARCH, OAM_READ, LEXICON_REVIEW, THREADROOM_POST]
default: DISCOVER
raw_user_text:
type: string
description: Natural-language user command or threadroom post.
workspace_id:
type: string
default: workspace_local_001
description: Isolated workspace/session scope for receipts and overlays.
session_id:
type: string
default: session_local
target_nodes:
type: array
items: { type: string }
hashtags:
type: array
items: { type: string }
mention_refs:
type: array
items: { type: string }
minutes_budget:
type: number
default: 5
claim_boundary:
type: string
default: no final validation claims; human review required
privacy_scope:
type: string
enum: [PRIVATE_WORKSPACE, CONTROLLED_LINK, PUBLIC_READ_ONLY, PUBLIC_CONTRIBUTION_QUEUE]
default: PRIVATE_WORKSPACE
source_mutation_allowed:
type: boolean
default: false
description: Must remain false. Canonical source mutation is blocked.
MeshCommandResponse:
type: object
required: [status, command_id, workspace_id, trace_capsule, receipt, human_review_required]
properties:
status: { type: string }
command_id: { type: string }
workspace_id: { type: string }
trace_capsule: { type: object }
matched_ppt_elements:
type: array
items: { type: object }
alchemical_output: { type: object }
lexicon_state: { type: object }
receipt: { type: object }
boundary: { type: object }
audit_pointer: { type: string }
api_receipt_paths: { type: object }
overlay_proposals:
type: array
items: { type: object }
human_review_required: { type: boolean }