Repository navigation
Commit af1d59b
docs(skills): objectstack-api teaches the /meta/:type list's ?names= filter and its closed query set (#30844)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoNTm3wqJ8tNxUcJRy6fYa9g)_
domain:skills#2 · os-tesla · session_01L9qiby5ktwhsqg839UYDQs
Fixes #30710
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`skills/objectstack-api/SKILL.md` 的 Metadata API 一节补一段:`GET
/api/v1/meta/:type` 列表支持 `?names=a,b,c` 一次按名字读多条(一个逗号分隔值;没有的名字直接缺席;空值返回
400;`package`
列表拒绝该参数),并且列表只认七个查询参数(`package`、`preview`、`object`、`include`、`id`、`names`、`locale`),其它参数一律
400 `VALIDATION_ERROR`,不再静默忽略。评测新增第 7 例(三个对象定义合成一次请求),changeset 一条。
- 为什么改:这是 #29236 裁决 A 的技能文档半边,服务端已在 PR #30709 落地。技能不写,读技能的客户 agent
仍会按名字逐个发请求,拼错的过滤参数也不知道会被拒。
- 风险与回滚:只改技能文本与评测夹具,运行时零改动;行文全部对照 `main` 上的代码与测试写成。回滚即 revert。
- 先看:`skills/objectstack-api/SKILL.md` 的 Metadata API
段(新段落);同文件三处删减(`/data` 前缀句、Datasources 小节折入 Skill Boundaries 表、RBAC
旁注去掉复述的符号);`evals/endpoints-auth-routes.json` 第 7 例。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期
`skills/objectstack-api/SKILL.md is 5141 tokens (ceiling 6314)`,上限行未动;再看
`packages/rest/src/meta-item-read-gate.ts` 的 `META_LIST_QUERY_PARAMS`
七个键与技能段落一致。
- 需要你做的:本 PR 触 `skills/**`(Tier H),需要受管审批人在 GitHub 上 Approve 一次;之后席位落地。
## What changes
`skills/objectstack-api/SKILL.md`, section "Metadata API (`/meta`)": the
two-line "read-side query params are client contracts" paragraph becomes
one paragraph that states what the list door serves on `main` since PR
#30709:
- the closed query set `package`, `preview` (`draft`), `object`,
`include` (`content`), `id`, `names`, `locale` (`META_LIST_QUERY_PARAMS`
in `packages/rest/src/meta-item-read-gate.ts`), any other key refused
`400 VALIDATION_ERROR` instead of ignored;
- `?names=a,b,c`, one comma-separated value, narrowing the list to the
named items the caller may see (chain step 2a runs after the per-caller
gate); an unknown name simply absent; an empty value refused `400`
(`metaListNames`); the `package` list refusing the key
(`NAMES_ON_PACKAGE_LIST_MESSAGE`, its items are keyed by id);
- the closing sentence that these are client contracts, nothing a stack
declares, kept.
Not taught, on purpose: the repeated-key arity refusal, the located
message texts, the `?id=` / `?object=` per-type meaning and the runtime
dispatcher twin. The skill names the keys and the one behaviour an
author or caller must know; the rest is the route's own text.
**Growth paid in the same file, by deletion (no re-wrap):**
| Deleted | Why it was restatement |
|:--|:--|
| "Data CRUD lives under the `/data` prefix." and "aggregation goes
through `POST /api/v1/data/{object}/query` with `groupBy`/`aggregations`
in the body" | The route block right above shows every `/data` path, and
the derived-operations table's `aggregate` row carries the same `query`
+ `groupBy`/`aggregations` spelling. The negative pins (no `/bulk`, no
`GET .../aggregate`) stay. |
| The `## Datasources` section | Pure routing: every pointer in it has
its home in objectstack-data (`rules/datasources.md`) and
objectstack-platform (Driver Selection Guide, which carries the Turso
Cloud/EE caveat). The Skill Boundaries table already routed datasources
there; it now names the rule file and gains a `Pick a driver package`
row, so no pointer is lost. |
| `(`definePermissionSet`)` and ", not this one" in the auth aside | The
Skill Boundaries table routes permissions to objectstack-data; the
symbol is that skill's to teach. |
`skills/objectstack-api/evals/endpoints-auth-routes.json`: case 7,
"three object definitions, one request": expects one `GET
/api/v1/meta/object?names=account,contact,lead`, must contain `?names=`
/ `/api/v1/meta/object` / `VALIDATION_ERROR`, must not contain `?name=`,
`?ids=`, `?filter=`. Added because case 6 already evaluates a
request-shape answer (the import body), so a metadata-read case is
inside the fixture's convention. The seat may drop it if the convention
is read narrower.
`.changeset/30710-meta-list-names-filter.md`: `'@objectstack/skills':
patch`, both declaration lines.
**Readings (os-dev rule for `skills/**`):**
| Reading | Before (`origin/main` `b6182249`) | After (`a2f2be9c`) |
|:--|:--|:--|
| `skills/objectstack-api/SKILL.md` lines | 446 | 441 |
| `skills/objectstack-api/SKILL.md` tokens
(`check-skills-token-ratchet`) | 5144 | 5141 (ceiling 6314, unchanged) |
| Package, all 11 `skills/*/SKILL.md`, lines | 4523 | 4518 |
| Package, all 11 `skills/*/SKILL.md`, tokens (gate formula) | 56716 |
56713 |
No ceiling row moves. The eval fixture is measured, not ratcheted (1234
→ 1484 tokens).
## Why
#30710, a ruling's owed skills follow-up (#29236, ruling 6580261740
letter A): PR #30709 serves `?names=` and closes the list's query set,
and its body declares `Skills-docs: follow-up #30710`. Until the skill
says so, an agent reading it sends one request per name and cannot learn
that a misspelt filter is refused rather than ignored.
## Tests
No runtime code changes. The teaching text was read off `main`'s
`META_LIST_QUERY_PARAMS`, `metaListNames`, `metaListUnknownParamRefusal`
and the pins in `packages/rest/src/meta-query-arity-doors.test.ts` and
`meta-list-names-filter.test.ts` at `c17719dd`; nothing is stated that
those do not pin.
## Acceptance notes
- `skills/objectstack-api/evals/` has no runner script in this repo; the
fixture is measured by `check-skills-token-ratchet` (population 1b) and
parsed as JSON. Case 7 follows the existing shape (`id`, `prompt`,
`expected_output`, `files`, `assertions`).
- Overlap check: open PRs touching `skills/objectstack-api/**` at
dispatch time: none (#30821 and #30764 touch objectstack-platform only;
#30805 declares `skills/**` wide but has no PR yet). `origin/main` was
merged at `b6182249` before the final push; no conflict.
- `OS_SKIP_DTS=1` on a whole-tree build reds
`check:dual-build-cjs-loads` on every package's `types` condition and
the `ui/` packages' `tsc`; the reading below comes from a declarations
build of `./packages/**`.
## Verification
Derived with `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` against the three-file diff. Run twice,
every line with stdin closed, exit codes landed first:
- At `36b5c9e6` (before the `origin/main` merge): 44 derived families,
44 run, 44 exit 0; `--ran` reconciliation: 0 NOT-MEASURED, 0 UNRUN.
- At `a2f2be9c` (the head, after merging `origin/main` `b6182249`): 45
derived families (the merge adds `scripts/ci/snapshot-next.mjs
--self-test`), 45 run, 45 exit 0; `--ran` reconciliation: 0
NOT-MEASURED, 0 UNRUN. Ran lists:
`skills-seat-2/out/30710-gates-ran-{36b5c9e,a2f2be9c}.list` in the
project files.
<details><summary>Gate readings at a2f2be9</summary>
- `check-skills-token-ratchet`: `skills/objectstack-api/SKILL.md is 5141
tokens (ceiling 6314; headroom 1173)`, exit 0.
- `check:skill-identifier-liveness`: `Leg 1: 486 citation(s) over 71
published file(s) … Leg 2: 8 registered exhaustive section(s), 0
ledgered gap(s)`, exit 0.
- `check:dual-build-cjs-loads`: `116 published require entry point(s)
across 71 package(s) load; 2456 emitted CommonJS file(s) parse`, exit 0
(declarations build of `./packages/**`).
- `check:lean-entry-closure`, `pnpm --filter @objectstack/spec run
check:skill-docs`, `check:skill-compatibility`,
`check:skill-frame-sync`, `check:pm-skill-id-lint`,
`check-changeset-no-major --base origin/main`, `check-empty-changeset
--base origin/main`, `check-adr-0087-registration --base origin/main`,
`check:pm-governed-merges`, `check:doc-authoring`, `check:nul-bytes`,
`check:role-word`, the rest: exit 0.
- Tier: `dispatch-gates --tier` on the three paths: `skills/**` clause
①, `claude-fable-5-1` mandated, no one-line exit; this thread runs on
it. `check-governed-merges --test skills/objectstack-api/SKILL.md`: Tier
H.
</details>
CI families (`Lint & Repo Gates`, `Test Core`, the rest) are the PR's
check-runs, not re-run locally.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` is CI's run (no source file in
the diff).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L9qiby5ktwhsqg839UYDQs
---------
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent d0ebb8f commit af1d59b
3 files changed
Lines changed: 33 additions & 20 deletions
File tree
- .changeset
- skills/objectstack-api
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | | - | |
73 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
315 | 319 | | |
316 | 320 | | |
317 | 321 | | |
318 | | - | |
319 | | - | |
| 322 | + | |
| 323 | + | |
320 | 324 | | |
321 | 325 | | |
322 | 326 | | |
| |||
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | 357 | | |
363 | 358 | | |
364 | 359 | | |
| |||
414 | 409 | | |
415 | 410 | | |
416 | 411 | | |
417 | | - | |
418 | | - | |
| 412 | + | |
| 413 | + | |
419 | 414 | | |
420 | 415 | | |
421 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
0 commit comments