From e27d6d3f60a36c811bacd6622bf87bb1d520de48 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 08:29:41 +0000 Subject: [PATCH] docs(spec): cite the /ai/models picker decision as cloud ADR-0028 The JSDoc on AiModelsResponseSchema and its models field, and the matching protocol.test.ts comment, cited a bare ADR-0028. That number resolves to this repository's metadata-naming record; the decision is cloud's (plan-filtered AI model picker). JSDoc and comments only. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz --- .changeset/24486-spec-cloud-adr-0028-citation.md | 10 ++++++++++ packages/spec/src/api/protocol.test.ts | 2 +- packages/spec/src/api/protocol.zod.ts | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .changeset/24486-spec-cloud-adr-0028-citation.md diff --git a/.changeset/24486-spec-cloud-adr-0028-citation.md b/.changeset/24486-spec-cloud-adr-0028-citation.md new file mode 100644 index 0000000000..15a2528cff --- /dev/null +++ b/.changeset/24486-spec-cloud-adr-0028-citation.md @@ -0,0 +1,10 @@ +--- +'@objectstack/spec': patch +--- + +Clause-②: no + +docs(spec): the `GET /api/v1/ai/models` response JSDoc cites `cloud ADR-0028`, not a bare `ADR-0028` + +- **What changed.** The JSDoc on `AiModelsResponseSchema` and on its `models` field now cites `cloud ADR-0028` (the plan-filtered AI model picker decision) where it cited a bare `ADR-0028`. This repository's own ADR-0028 is about metadata naming and namespace isolation; the AI service that serves this list is a cloud package. The client SDK TSDoc and the docs already cite it this way. +- **Unchanged.** Every schema shape, `.describe()` string, generated JSON Schema and behaviour. diff --git a/packages/spec/src/api/protocol.test.ts b/packages/spec/src/api/protocol.test.ts index 2917b335ff..296e226e2a 100644 --- a/packages/spec/src/api/protocol.test.ts +++ b/packages/spec/src/api/protocol.test.ts @@ -372,7 +372,7 @@ describe('ObjectStack Protocol', () => { expect(AiCompleteRequestSchema.safeParse({ prompt: 'Summarise:', options: { maxTokens: 64 } }).success).toBe(true); expect(AiCompleteRequestSchema.safeParse({}).success).toBe(false); - // models — both live shapes: the ADR-0028 allowlist and the bare-id fallback + // models — both live shapes: the cloud ADR-0028 allowlist and the bare-id fallback expect(AiModelsResponseSchema.safeParse({ models: [{ id: 'gpt-4o-mini', label: 'GPT-4o mini', default: true }], defaultModel: 'gpt-4o-mini', }).success).toBe(true); diff --git a/packages/spec/src/api/protocol.zod.ts b/packages/spec/src/api/protocol.zod.ts index c8be94949c..de5dd95f32 100644 --- a/packages/spec/src/api/protocol.zod.ts +++ b/packages/spec/src/api/protocol.zod.ts @@ -3396,10 +3396,10 @@ export const AiCompleteRequestSchema = lazySchema(() => z.object({ options: z.record(z.string(), z.unknown()).optional().describe('Request options (model, temperature, maxTokens, …)'), })); -/** `GET /api/v1/ai/models` — the environment's plan-filtered picker list (ADR-0028). */ +/** `GET /api/v1/ai/models` — the environment's plan-filtered picker list (cloud ADR-0028). */ export const AiModelsResponseSchema = lazySchema(() => z.object({ /** - * Objects when the service exposes the ADR-0028 allowlist; bare ids when it + * Objects when the service exposes the cloud ADR-0028 allowlist; bare ids when it * falls back to the adapter's `listModels()`. Both shapes are live, so both * are declared rather than one being asserted and the other 404-by-parse. */