Feat v0.3.5 settings audit, ICD, clone + v0.3.6 roadmap
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 20s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-go-pg (pull_request) Failing after 2m42s
CI/CD / test-sqlite (pull_request) Successful in 3m0s
CI/CD / build-and-deploy (pull_request) Has been skipped

v0.3.5 deliverables:
- Clone endpoint (POST /workflows/:id/clone) with deep stage copy
- 7 engine integration tests (28 total): lifecycle, branch routing,
  public entry, signoff gate, rejection, cancel, error cases
- Settings audit: staleness_timeout_hours + branch_rules UI in
  team-admin workflow editor
- ICD: fixed stale schemas, added ~20 new endpoint paths for
  instances, assignments, signoffs, public entry, clone, team roles

Roadmap additions (v0.3.6–v0.3.8):
- v0.3.6: 4 example workflow packages + demo surface proving
  public entry, branch rules, Starlark automation, signoff gates,
  HTTP webhooks end-to-end
- v0.3.7: package audit for non-chat packages
- v0.3.8: builder image + bundled packages for zero-config first run

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 12:44:37 +00:00
parent 0773c86c27
commit 752d0697e9
10 changed files with 1643 additions and 21 deletions

View File

@@ -44,6 +44,10 @@ tags:
- name: Presence
- name: Notifications
- name: Workflows
- name: Workflow Instances
- name: Workflow Assignments
- name: Workflow Signoffs
- name: Public Workflows
- name: Packages
- name: Connections
- name: Teams
@@ -378,20 +382,35 @@ components:
type: string
slug:
type: string
description:
type: string
entry_mode:
type: string
enum: [public_link, team_only]
scope:
type: string
team_id:
type: string
format: uuid
nullable: true
is_active:
type: boolean
version:
type: integer
branding:
type: object
on_complete:
type: object
retention:
type: object
webhook_url:
type: string
webhook_secret:
type: string
staleness_timeout_hours:
type: integer
nullable: true
created_by:
type: string
format: uuid
version:
type: integer
stages:
type: array
items:
@@ -414,22 +433,42 @@ components:
format: uuid
name:
type: string
history_mode:
type: string
enum: [full, summary, fresh]
stage_mode:
type: string
enum: [custom, form_only, form_chat, review]
ordinal:
type: integer
stage_mode:
type: string
enum: [form, review, delegated, automated]
audience:
type: string
enum: [team, public, system]
stage_type:
type: string
enum: [simple, dynamic, automated]
form_template:
type: object
transition_rules:
stage_config:
type: object
created_at:
branch_rules:
type: array
items:
type: object
starlark_hook:
type: string
format: date-time
updated_at:
nullable: true
assignment_team_id:
type: string
format: uuid
nullable: true
surface_pkg_id:
type: string
format: uuid
nullable: true
auto_transition:
type: boolean
sla_seconds:
type: integer
nullable: true
created_at:
type: string
format: date-time
@@ -450,6 +489,100 @@ components:
type: string
format: date-time
WorkflowInstance:
type: object
properties:
id:
type: string
format: uuid
workflow_id:
type: string
format: uuid
workflow_version:
type: integer
current_stage:
type: string
stage_data:
type: object
status:
type: string
enum: [active, completed, cancelled, stale, error]
started_by:
type: string
entry_token:
type: string
nullable: true
metadata:
type: object
stage_entered_at:
type: string
format: date-time
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
WorkflowAssignment:
type: object
properties:
id:
type: string
format: uuid
instance_id:
type: string
format: uuid
stage:
type: string
team_id:
type: string
format: uuid
assigned_to:
type: string
format: uuid
nullable: true
status:
type: string
enum: [unassigned, claimed, completed, cancelled]
review_data:
type: object
nullable: true
claimed_at:
type: string
format: date-time
nullable: true
completed_at:
type: string
format: date-time
nullable: true
created_at:
type: string
format: date-time
WorkflowSignoff:
type: object
properties:
id:
type: string
format: uuid
instance_id:
type: string
format: uuid
stage:
type: string
user_id:
type: string
format: uuid
decision:
type: string
enum: [approve, reject]
comment:
type: string
created_at:
type: string
format: date-time
Package:
type: object
properties:
@@ -1742,6 +1875,414 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'
# ──────────────────────────────────────────────
# Workflow Clone (v0.3.5)
# ──────────────────────────────────────────────
/api/v1/workflows/{id}/clone:
post:
summary: Deep-copy a workflow and its stages
operationId: cloneWorkflow
tags: [Workflows]
parameters:
- $ref: '#/components/parameters/idPath'
responses:
'201':
description: Cloned workflow
content:
application/json:
schema:
$ref: '#/components/schemas/Workflow'
# ──────────────────────────────────────────────
# Workflow Instances (v0.3.2)
# ──────────────────────────────────────────────
/api/v1/workflows/{id}/instances:
post:
summary: Start a new workflow instance
operationId: startInstance
tags: [Workflow Instances]
parameters:
- $ref: '#/components/parameters/idPath'
requestBody:
content:
application/json:
schema:
type: object
properties:
stage_data:
type: object
responses:
'201':
description: Instance created
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
get:
summary: List instances for a workflow
operationId: listInstances
tags: [Workflow Instances]
parameters:
- $ref: '#/components/parameters/idPath'
- name: status
in: query
schema:
type: string
enum: [active, completed, cancelled, stale]
- $ref: '#/components/parameters/limitQuery'
- $ref: '#/components/parameters/offsetQuery'
responses:
'200':
description: Instance list
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkflowInstance'
/api/v1/workflows/{id}/instances/{iid}:
get:
summary: Get a workflow instance
operationId: getInstance
tags: [Workflow Instances]
parameters:
- $ref: '#/components/parameters/idPath'
- name: iid
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Instance details
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
/api/v1/workflows/{id}/instances/{iid}/advance:
post:
summary: Advance an instance to the next stage
operationId: advanceInstance
tags: [Workflow Instances]
parameters:
- $ref: '#/components/parameters/idPath'
- name: iid
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
type: object
properties:
stage_data:
type: object
responses:
'200':
description: Advanced instance
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
/api/v1/workflows/{id}/instances/{iid}/cancel:
post:
summary: Cancel an active instance
operationId: cancelInstance
tags: [Workflow Instances]
parameters:
- $ref: '#/components/parameters/idPath'
- name: iid
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Instance cancelled
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
# ──────────────────────────────────────────────
# Workflow Assignments (v0.3.2)
# ──────────────────────────────────────────────
/api/v1/assignments/{id}/claim:
post:
summary: Claim an assignment
operationId: claimAssignment
tags: [Workflow Assignments]
parameters:
- $ref: '#/components/parameters/idPath'
responses:
'200':
description: Assignment claimed
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowAssignment'
/api/v1/assignments/{id}/unclaim:
post:
summary: Release a claimed assignment
operationId: unclaimAssignment
tags: [Workflow Assignments]
parameters:
- $ref: '#/components/parameters/idPath'
responses:
'200':
description: Assignment released
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowAssignment'
/api/v1/assignments/{id}/complete:
post:
summary: Complete an assignment
operationId: completeAssignment
tags: [Workflow Assignments]
parameters:
- $ref: '#/components/parameters/idPath'
requestBody:
content:
application/json:
schema:
type: object
properties:
review_data:
type: object
responses:
'200':
description: Assignment completed
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowAssignment'
/api/v1/assignments/{id}/cancel:
post:
summary: Cancel an assignment
operationId: cancelAssignment
tags: [Workflow Assignments]
parameters:
- $ref: '#/components/parameters/idPath'
responses:
'200':
description: Assignment cancelled
/api/v1/assignments/mine:
get:
summary: List my assignments
operationId: listMyAssignments
tags: [Workflow Assignments]
parameters:
- name: status
in: query
schema:
type: string
enum: [unassigned, claimed, completed, cancelled]
responses:
'200':
description: Assignment list
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkflowAssignment'
# ──────────────────────────────────────────────
# Workflow Signoffs (v0.3.4)
# ──────────────────────────────────────────────
/api/v1/instances/{iid}/signoffs:
post:
summary: Submit a signoff (approve or reject)
operationId: submitSignoff
tags: [Workflow Signoffs]
parameters:
- name: iid
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [decision]
properties:
decision:
type: string
enum: [approve, reject]
comment:
type: string
responses:
'201':
description: Signoff recorded
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowSignoff'
get:
summary: List signoffs for an instance
operationId: listSignoffs
tags: [Workflow Signoffs]
parameters:
- name: iid
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Signoff list
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkflowSignoff'
# ──────────────────────────────────────────────
# Public Workflows (v0.3.3)
# ──────────────────────────────────────────────
/api/v1/public/workflows/{id}/start:
post:
summary: Start a public workflow instance (no auth required)
operationId: startPublicInstance
tags: [Public Workflows]
security: []
parameters:
- $ref: '#/components/parameters/idPath'
requestBody:
content:
application/json:
schema:
type: object
properties:
stage_data:
type: object
responses:
'201':
description: Public instance created (includes entry_token)
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
/api/v1/public/workflows/resume/{token}:
get:
summary: Resume a public instance by entry token
operationId: resumePublicInstance
tags: [Public Workflows]
security: []
parameters:
- name: token
in: path
required: true
schema:
type: string
responses:
'200':
description: Instance details
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
/api/v1/public/workflows/advance/{token}:
post:
summary: Advance a public instance (public-audience stages only)
operationId: advancePublicInstance
tags: [Public Workflows]
security: []
parameters:
- name: token
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
stage_data:
type: object
responses:
'200':
description: Advanced instance
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstance'
# ──────────────────────────────────────────────
# Team Roles (v0.3.4)
# ──────────────────────────────────────────────
/api/v1/teams/{teamId}/roles:
get:
summary: List custom roles for a team
operationId: listTeamRoles
tags: [Teams]
parameters:
- $ref: '#/components/parameters/teamIdPath'
responses:
'200':
description: Role list
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: string
put:
summary: Set custom roles for a team
operationId: setTeamRoles
tags: [Teams]
parameters:
- $ref: '#/components/parameters/teamIdPath'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
roles:
type: array
items:
type: string
responses:
'200':
description: Roles updated
# ──────────────────────────────────────────────
# Packages (user-scoped)
# ──────────────────────────────────────────────