Skip to content

Commit fbae68b

Browse files
committed
chore(spec): regenerate the artifacts the new build-progress exports move, and declare the changeset
`check:generated` proved exactly five stale: api-surface, export-origins, declaration-map, the rendered reference pages, and the unknown-key strictness ledger. Regenerated only those. api-surface reads 6 added / 0 removed on `./ai` — a purely additive published surface, which is what the `minor` and the `Clause-②: yes (widening)` declaration record. Claude-Session: https://claude.ai/code/session_01KB5PFtxuy1x3dcR5gxudx6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1a02af6 commit fbae68b

11 files changed

Lines changed: 145 additions & 6 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
**Declare the build-progress PHASE vocabulary on `@objectstack/spec/ai`.**
6+
7+
The `data-build-progress` stream frame has shipped as prose only: `AIToolContext.onProgress`
8+
documents the channel and its example carries a `phase`, but nothing ever declared which
9+
phases exist. Consumers filled that gap by guessing, and a guess here is not merely
10+
unlabelled — the objectui chat panel coerces any value it does not recognise to `structure`,
11+
which renders a "still building" spinner, so a build turn that has finished and moved on to
12+
verifying itself keeps claiming to be building.
13+
14+
New exports (additive; nothing removed or renamed):
15+
16+
- `BUILD_PROGRESS_PHASES` / `BuildProgressPhaseSchema` / `BuildProgressPhase` — the CLOSED
17+
phase vocabulary: `structure`, `data`, `verify`, `done`, in lifecycle order. An
18+
out-of-vocabulary value is refused, and the refusal names the accepted set.
19+
- `BuildProgressFrameSchema` / `BuildProgressFrame` — the frame's FLOOR: a required `phase`
20+
plus an optional `hop` (which post-apply verification hop) and `tool` (the tool that hop is
21+
running). Deliberately loose, not strict: the presentation fields the chat panel already
22+
reads ride the same frame and belong to it, so a strict schema here would refuse every
23+
frame shipping today.
24+
- `BUILD_PROGRESS_FRAME_TYPE` — `'data-build-progress'`, the one literal both ends select on.
25+
26+
Producers emit these frames from the agent loop rather than from the applying tool: a tool's
27+
`ctx.onProgress` handle dies when the tool returns, and the verification window opens after
28+
it does. Consumers should compare phases by value and treat every phase as optional — a turn
29+
that seeds no sample data never reports `data`.
30+
31+
Clause-②: yes (widening)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Build Progress
3+
description: Build Progress protocol schemas
4+
---
5+
6+
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
7+
8+
Build-progress PHASE vocabulary for the `data-build-progress` stream frame
9+
(cloud#2172 ruling A).
10+
11+
## Producer
12+
13+
The cloud AI-studio **agent loop** — deliberately not the tool it just ran.
14+
A build turn applies its change through `apply_blueprint` / `apply_edit` and
15+
then keeps working: the loop spends a further POST-APPLY VERIFICATION window
16+
re-reading and re-seeding what it wrote (measured on cloud#1838: 111 seconds
17+
and 9 tool calls *after* `apply_blueprint` returned, one of them the
18+
registered `verify_build` tool — see `PLATFORM_TOOLS_BY_PACKAGE` in
19+
`../system/constants/platform-tool-names`). A tool's own `ctx.onProgress`
20+
handle dies when the tool returns, so a frame emitted in that window can only
21+
come from the loop. WHERE in the loop it is emitted is cloud#2172's decision,
22+
not this module's; what such a frame may SAY is declared here.
23+
24+
## Consumer
25+
26+
The objectui chat panel — `extractBuildProgress` in
27+
`packages/plugin-chatbot/src/mapMessages.ts`, which lifts the reconciled part
28+
onto `ChatBuildProgress` for the build panel in `ChatbotEnhanced.tsx`. That
29+
reader recognises a fixed set and coerces everything else to `'structure'`,
30+
which renders a "still building" spinner. So an UNDECLARED phase is not
31+
merely unlabelled — it reads as the wrong phase, and the user watches a
32+
build that finished two minutes ago still claim to be building
33+
(objectui#7388). The panel's per-phase COPY is objectui's to choose; this
34+
module fixes only the set of values it must be able to tell apart.
35+
36+
## Channel
37+
38+
Unchanged: the `data-`-prefixed custom part described on
39+
`AIToolContext.onProgress` in `../contracts/ai-service`, reconciled in place
40+
under a stable part id. This module adds the vocabulary that prose has always
41+
assumed and never declared; it moves no transport and renames nothing.
42+
43+
<Callout type="info">
44+
**Source:** `packages/spec/src/ai/build-progress.zod.ts`
45+
</Callout>
46+
47+
## TypeScript Usage
48+
49+
```typescript
50+
import { BuildProgressFrameSchema, BuildProgressPhaseSchema } from '@objectstack/spec/ai';
51+
import type { BuildProgressFrame, BuildProgressPhase } from '@objectstack/spec/ai';
52+
53+
// Validate data
54+
const result = BuildProgressFrameSchema.parse(data);
55+
```
56+
57+
---
58+
59+
## BuildProgressFrame
60+
61+
### Properties
62+
63+
| Property | Type | Required | Description |
64+
| :--- | :--- | :--- | :--- |
65+
| **phase** | `Enum<'structure' \| 'data' \| 'verify' \| 'done'>` | ✅ | Build-turn phase this frame reports |
66+
| **hop** | `integer` | optional | Post-apply verification hop this frame reports |
67+
| **tool** | `string` | optional | Name of the tool the current hop is running |
68+
69+
70+
---
71+
72+
## BuildProgressPhase
73+
74+
### Allowed Values
75+
76+
* `structure`
77+
* `data`
78+
* `verify`
79+
* `done`
80+
81+
82+
---
83+

‎content/docs/references/ai/index.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This section contains all protocol schemas for the ai layer of ObjectStack.
99

1010
<Cards>
1111
<Card href="/docs/references/ai/agent" title="Agent" description="Source: packages/spec/src/ai/agent.zod.ts" />
12+
<Card href="/docs/references/ai/build-progress" title="Build Progress" description="Source: packages/spec/src/ai/build-progress.zod.ts" />
1213
<Card href="/docs/references/ai/conversation" title="Conversation" description="Source: packages/spec/src/ai/conversation.zod.ts" />
1314
<Card href="/docs/references/ai/embedding" title="Embedding" description="Source: packages/spec/src/ai/embedding.zod.ts" />
1415
<Card href="/docs/references/ai/knowledge-document" title="Knowledge Document" description="Source: packages/spec/src/ai/knowledge-document.zod.ts" />

‎content/docs/references/ai/meta.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"---Models & Runtime---",
1515
"conversation",
1616
"model-registry",
17-
"usage"
17+
"usage",
18+
"---More---",
19+
"build-progress"
1820
]
1921
}

‎content/docs/references/index.mdx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Protocol Reference
3-
description: Every schema published by @objectstack/spec — 1525 schemas across 14 protocol modules
3+
description: Every schema published by @objectstack/spec — 1527 schemas across 14 protocol modules
44
---
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
@@ -19,7 +19,7 @@ counts are sums of the rows they head. Regenerate with
1919

2020
| Module | Pages | Schemas | Description |
2121
| :--- | ---: | ---: | :--- |
22-
| [AI Protocol](/docs/references/ai) | 11 | 66 | Agents, tools, skills, RAG and knowledge sources, model registry, conversations. |
22+
| [AI Protocol](/docs/references/ai) | 12 | 68 | Agents, tools, skills, RAG and knowledge sources, model registry, conversations. |
2323
| [API Protocol](/docs/references/api) | 31 | 440 | REST contracts, endpoints, routing, realtime, batch, discovery. |
2424
| [Automation Protocol](/docs/references/automation) | 14 | 74 | Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records. |
2525
| [Data Protocol](/docs/references/data) | 29 | 173 | Objects, fields, queries, filters, datasources and drivers — the ObjectQL layer. |
@@ -33,19 +33,20 @@ counts are sums of the rows they head. Regenerate with
3333
| [Studio Protocol](/docs/references/studio) | 3 | 35 | Studio designer metadata — the authoring surfaces for the protocols above. |
3434
| [System Protocol](/docs/references/system) | 33 | 272 | The runtime environment — logging, jobs, cache, metrics, notifications, i18n and compliance. |
3535
| [UI Protocol](/docs/references/ui) | 16 | 156 | Apps, pages, views, dashboards, reports, actions and themes — the ObjectUI layer. |
36-
| **Total** | **193** | **1525** | 14 protocol modules |
36+
| **Total** | **194** | **1527** | 14 protocol modules |
3737

3838
---
3939

4040
## AI Protocol
4141

42-
**Source:** `packages/spec/src/ai/` · **Import:** `@objectstack/spec/ai` · **11 pages, 66 schemas**
42+
**Source:** `packages/spec/src/ai/` · **Import:** `@objectstack/spec/ai` · **12 pages, 68 schemas**
4343

4444
Agents, tools, skills, RAG and knowledge sources, model registry, conversations.
4545

4646
| File | Schemas |
4747
| :--- | :--- |
4848
| [`agent.zod.ts`](/docs/references/ai/agent) | `AIModelConfig`, `Agent`, `StructuredOutputConfig`, `StructuredOutputFormat`, `TransformPipelineStep` |
49+
| [`build-progress.zod.ts`](/docs/references/ai/build-progress) | `BuildProgressFrame`, `BuildProgressPhase` |
4950
| [`conversation.zod.ts`](/docs/references/ai/conversation) | `CodeContent`, `ConversationAnalytics`, `ConversationContext`, `ConversationMessage`, `ConversationSession`, `ConversationSummary`, `FileContent`, `FunctionCall`, `ImageContent`, `MessageContent`, `MessageContentType`, `MessagePruningEvent`, `MessageRole`, `TextContent`, `TokenBudgetConfig`, `TokenBudgetStrategy`, `TokenUsageStats`, `ToolCall` |
5051
| [`embedding.zod.ts`](/docs/references/ai/embedding) | `EmbeddingModel`, `VectorStore`, `VectorStoreProvider` |
5152
| [`knowledge-document.zod.ts`](/docs/references/ai/knowledge-document) | `KnowledgeChunk`, `KnowledgeDocument`, `KnowledgeHit` |

‎docs/audits/2026-07-unknown-key-strictness-ledger.counts.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ directory rather than per file.
256256

257257
| Dir | Sites |
258258
|---|---|
259-
| `ai/` | 77 |
259+
| `ai/` | 78 |
260260
| `api/` | 451 |
261261
| `identity/` | 32 |
262262
| `integration/` | 8 |

‎packages/spec/api-surface/ai.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"Agent (type)",
99
"AgentParsed (type)",
1010
"AgentSchema (const)",
11+
"BUILD_PROGRESS_FRAME_TYPE (const)",
12+
"BUILD_PROGRESS_PHASES (const)",
1113
"BlueprintApp (type)",
1214
"BlueprintAppParsed (type)",
1315
"BlueprintAppSchema (const)",
@@ -31,6 +33,10 @@
3133
"BlueprintViewSchema (const)",
3234
"BlueprintWidgetCondition (type)",
3335
"BlueprintWidgetConditionSchema (const)",
36+
"BuildProgressFrame (type)",
37+
"BuildProgressFrameSchema (const)",
38+
"BuildProgressPhase (type)",
39+
"BuildProgressPhaseSchema (const)",
3440
"CodeContentSchema (const)",
3541
"ConversationAnalytics (type)",
3642
"ConversationAnalyticsParsed (type)",

‎packages/spec/authorable-surface/ai.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
"ai/BlueprintWidgetCondition:field",
8585
"ai/BlueprintWidgetCondition:op",
8686
"ai/BlueprintWidgetCondition:value",
87+
"ai/BuildProgressFrame:hop",
88+
"ai/BuildProgressFrame:phase",
89+
"ai/BuildProgressFrame:tool",
8790
"ai/CodeContent:language",
8891
"ai/CodeContent:metadata",
8992
"ai/CodeContent:text",

‎packages/spec/declaration-map/ai.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"BlueprintViewSchema": "ai/BlueprintView",
2828
"BlueprintWidgetCondition": "ai/BlueprintWidgetCondition",
2929
"BlueprintWidgetConditionSchema": "ai/BlueprintWidgetCondition",
30+
"BuildProgressFrame": "ai/BuildProgressFrame",
31+
"BuildProgressFrameSchema": "ai/BuildProgressFrame",
32+
"BuildProgressPhase": "ai/BuildProgressPhase",
33+
"BuildProgressPhaseSchema": "ai/BuildProgressPhase",
3034
"CodeContentSchema": "ai/CodeContent",
3135
"ConversationAnalytics": "ai/ConversationAnalytics",
3236
"ConversationAnalyticsSchema": "ai/ConversationAnalytics",

‎packages/spec/export-origins/ai.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"Agent": "src/ai/agent.zod.ts#Agent (type)",
99
"AgentParsed": "src/ai/agent.zod.ts#AgentParsed (type)",
1010
"AgentSchema": "src/ai/agent.zod.ts#AgentSchema (const)",
11+
"BUILD_PROGRESS_FRAME_TYPE": "src/ai/build-progress.zod.ts#BUILD_PROGRESS_FRAME_TYPE (const)",
12+
"BUILD_PROGRESS_PHASES": "src/ai/build-progress.zod.ts#BUILD_PROGRESS_PHASES (const)",
1113
"BlueprintApp": "src/ai/solution-blueprint.zod.ts#BlueprintApp (type)",
1214
"BlueprintAppParsed": "src/ai/solution-blueprint.zod.ts#BlueprintAppParsed (type)",
1315
"BlueprintAppSchema": "src/ai/solution-blueprint.zod.ts#BlueprintAppSchema (const)",
@@ -31,6 +33,10 @@
3133
"BlueprintViewSchema": "src/ai/solution-blueprint.zod.ts#BlueprintViewSchema (const)",
3234
"BlueprintWidgetCondition": "src/ai/solution-blueprint.zod.ts#BlueprintWidgetCondition (type)",
3335
"BlueprintWidgetConditionSchema": "src/ai/solution-blueprint.zod.ts#BlueprintWidgetConditionSchema (const)",
36+
"BuildProgressFrame": "src/ai/build-progress.zod.ts#BuildProgressFrame (type)",
37+
"BuildProgressFrameSchema": "src/ai/build-progress.zod.ts#BuildProgressFrameSchema (const)",
38+
"BuildProgressPhase": "src/ai/build-progress.zod.ts#BuildProgressPhase (type)",
39+
"BuildProgressPhaseSchema": "src/ai/build-progress.zod.ts#BuildProgressPhaseSchema (const)",
3440
"CodeContentSchema": "src/ai/conversation.zod.ts#CodeContentSchema (const)",
3541
"ConversationAnalytics": "src/ai/conversation.zod.ts#ConversationAnalytics (type)",
3642
"ConversationAnalyticsParsed": "src/ai/conversation.zod.ts#ConversationAnalyticsParsed (type)",

0 commit comments

Comments
 (0)