refactor(judgement): rename action classes to action types and raises to autonomy proposals

- tables judgement.action_types, action_type_resets, action_type_approvals and autonomy_proposals (migration 00063)
- governance setting propose_autonomy_after, approval request kind autonomy, policy resource kind action_type
- /api/action-types replaces /api/classes; the detail lists autonomy_proposals
- an autonomy proposal stores the identity ID of the account that answered it
This commit is contained in:
sam committed 2026-11-23 23:43:45 +11:00
1 parent 7f5220dea3
commit 0ad4374a2a
33 files changed
+951 -824

No files matched your search

+128 -126
View File
@@ -2437,7 +2437,7 @@ components:
- "null"
frozen:
type: boolean
raise_after:
propose_autonomy_after:
format: int64
type: integer
recurrence_threshold:
@@ -2447,7 +2447,7 @@ components:
$ref: "#/components/schemas/GovernanceTiming"
required:
- approval_deadline
- raise_after
- propose_autonomy_after
- frozen
- recurrence_threshold
- attempts_per_run
@@ -2581,11 +2581,17 @@ components:
- target
- effect
type: object
JudgementClassDetail:
JudgementActionTypeDetail:
additionalProperties: false
properties:
action:
type: string
autonomy_proposals:
items:
$ref: "#/components/schemas/JudgementAutonomyProposalView"
type:
- array
- "null"
connector:
type: string
count:
@@ -2613,12 +2619,6 @@ components:
- "null"
level:
type: string
raises:
items:
$ref: "#/components/schemas/JudgementRaiseView"
type:
- array
- "null"
reset_at:
format: date-time
type:
@@ -2642,7 +2642,7 @@ components:
required:
- history
- resets
- raises
- autonomy_proposals
- id
- connector
- action
@@ -2653,7 +2653,7 @@ components:
- decisions
- count
type: object
JudgementClassView:
JudgementActionTypeView:
additionalProperties: false
properties:
action:
@@ -2704,6 +2704,47 @@ components:
- decisions
- count
type: object
JudgementAutonomyProposalView:
additionalProperties: false
properties:
answered_at:
format: date-time
type:
- string
- "null"
answered_by:
type: string
answered_by_id:
type: string
deadline:
format: date-time
type: string
evidence:
items:
$ref: "#/components/schemas/JudgementProposalEvidence"
type:
- array
- "null"
from:
type: string
id:
type: string
proposed_at:
format: date-time
type: string
state:
type: string
to:
type: string
required:
- id
- from
- to
- state
- deadline
- proposed_at
- evidence
type: object
JudgementDecision:
additionalProperties: false
properties:
@@ -2903,7 +2944,7 @@ components:
- created_at
- versions
type: object
JudgementRaiseEvidence:
JudgementProposalEvidence:
additionalProperties: false
properties:
at:
@@ -2918,45 +2959,6 @@ components:
- by
- at
type: object
JudgementRaiseView:
additionalProperties: false
properties:
answered_at:
format: date-time
type:
- string
- "null"
answered_by:
type: string
deadline:
format: date-time
type: string
evidence:
items:
$ref: "#/components/schemas/JudgementRaiseEvidence"
type:
- array
- "null"
from:
type: string
id:
type: string
proposed_at:
format: date-time
type: string
state:
type: string
to:
type: string
required:
- id
- from
- to
- state
- deadline
- proposed_at
- evidence
type: object
JudgementResetView:
additionalProperties: false
properties:
@@ -4649,6 +4651,81 @@ paths:
summary: Create an account
tags:
- Accounts
/api/action-types:
get:
operationId: list-action-types
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/JudgementActionTypeView"
type:
- array
- "null"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: List action types with their earned levels
tags:
- Controls
/api/action-types/{id}:
get:
operationId: get-action-type
parameters:
- in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JudgementActionTypeDetail"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Get an action type with its history and outcomes
tags:
- Controls
/api/action-types/{id}/reset:
post:
operationId: reset-action-type
parameters:
- in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JudgementActionTypeView"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Reset an action type to its default level
tags:
- Controls
/api/admin/token:
post:
operationId: rotate-admin-token
@@ -5328,81 +5405,6 @@ paths:
summary: Stream what a turn records, from a cursor, until it ends
tags:
- Chat
/api/classes:
get:
operationId: list-classes
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/JudgementClassView"
type:
- array
- "null"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: List action classes with their earned levels
tags:
- Controls
/api/classes/{id}:
get:
operationId: get-class
parameters:
- in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JudgementClassDetail"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Get an action class with its history and outcomes
tags:
- Controls
/api/classes/{id}/reset:
post:
operationId: reset-class
parameters:
- in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JudgementClassView"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Reset an action class to its default level
tags:
- Controls
/api/composer/messages:
get:
operationId: list-composer-messages