Skip to content

Commit 36a9089

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-34662-flow-record-date-text
# Conflicts: # packages/lint/src/validate-expressions.test.ts
2 parents 1ce9b68 + e8a78c4 commit 36a9089

1,966 files changed

Lines changed: 112228 additions & 14034 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/28085-home-boot-reads-once.md‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎.changeset/29314-mobile-app-connect-qr.md‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎.changeset/31908-p4b3-audit-seal-lock.md‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.changeset/32605-bare-save-served-holder.md‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.changeset/32620-non-holder-row-bare-slot-retire.md‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎.changeset/32622-layers-two-holders-candidates.md‎

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): declare the AI answer follow-up routes (saved questions, answer artifact, answer feedback) and carry `turnId` on a conversation's messages
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`@objectstack/spec/api` now declares the request, response and error shapes of the AI answer follow-up routes the cloud AI service serves, so the console and the client SDK can type them instead of guessing:
11+
12+
- **Saved questions.** `GET /api/v1/ai/saved-questions` (`ListAiSavedQuestionsResponseSchema`), `POST /api/v1/ai/saved-questions` (`CreateAiSavedQuestionRequestSchema` / `CreateAiSavedQuestionResponseSchema`: a typed `question`, or `conversationId` with `turnId`), `DELETE /api/v1/ai/saved-questions/:id` (204) and `POST /api/v1/ai/saved-questions/:id/run` (`RunAiSavedQuestionResponseSchema`). One saved question is `AiSavedQuestionSchema`; its `source` is the Ask data tools' `ObjectQuerySourceSchema` block.
13+
- **Answer → artifact.** `POST /api/v1/ai/conversations/:id/turns/:turnId/artifact` (`CreateAiAnswerArtifactRequestSchema` with `kind: 'view' | 'report' | 'widget'`; `CreateAiAnswerArtifactResponseSchema`, discriminated by `kind`: the caller's own list view, or a dataset plus a report or dashboard draft with `published: false`).
14+
- **Answer feedback.** `GET|POST|DELETE /api/v1/ai/conversations/:id/turns/:turnId/feedback` (`GetAiAnswerFeedbackResponseSchema`, `SetAiAnswerFeedbackRequestSchema` with `rating: 'up' | 'down'` and an optional `note`, `SetAiAnswerFeedbackResponseSchema`; DELETE answers 204).
15+
- **Errors.** Each family's `error` is `ApiErrorSchema` with its closed `code` vocabulary (`AiSavedQuestionErrorSchema`, `AiAnswerArtifactErrorSchema`, `AiAnswerFeedbackErrorSchema`) and, where the route names one, the refusal in `details.reason` (`AiSavedQuestionRefusalReasonSchema`, `AiAnswerArtifactRefusalReasonSchema`). Each `code` list holds the route handler's codes and the framework door's, which answers ahead of the handler: `UNAUTHENTICATED` (401, no session), `NOT_IMPLEMENTED` (501, no AI served) and `SERVICE_UNAVAILABLE` (503, AI routes not yet published).
16+
17+
A persisted conversation's messages may now carry the turn they were written under: `AiConversationSchema.messages` is `AiConversationMessageSchema` (`AiMessageSchema` plus a `turnId` that may be absent or null), and the `AIConversation` contract's `messages` are `AIConversationMessage` (`ModelMessage` plus `turnId?: string | null`). A stored conversation whose messages carry no turn, absent or null, still parses, and a service that writes none still satisfies the contract.

0 commit comments

Comments
 (0)