You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): declare the 18 spec-owned action keys ActionDef absorbed silently
`ActionDef` ends with `[key: string]: any`, so it accepted any key of any
type — a typo (`targt`) and a retired spec key (`execute`) both type-checked,
then the runner silently bound no handler (the #2169 shape). Step 1 made that
audible with a dev-mode warning; this is step 2, promoting the keys that
warning identified as legitimate into real fields.
- Promote 18 spec-owned keys to explicit optional fields, every type DERIVED
from `@objectstack/spec`'s `ActionInput` rather than hand-copied. A
hand-written duplicate of a spec shape is a second contract that drifts,
which is the failure this issue is about.
- Derive from `z.input`, not `z.infer`: `ActionSchema` is a `ZodPipe` whose
transform narrows `visible` to the `{ dialect, source }` envelope alone.
This runner reads authored rows unparsed, so it sees the input shape;
`Action` would have rejected the raw-string predicate ActionEngine supports.
- Delete three `as any` casts in `ActionEngine` (`visible`,
`requiredPermissions`, `locations`) that existed only because the fields
were undeclared. Package `as any` count drops 9 -> 3.
- Mark `@deprecated` only the four dialect keys the runner itself proves are
aliases: `actionType` -> `type`, `api`/`endpoint` -> `target`, `navigate` ->
flat `target`/`openIn`. The rest are runner mechanics with no spec spelling.
`shortcut` and `bulkEnabled` derive to `undefined` because spec 17 retired
both as `retiredKey()` tombstones — so authoring either, already a hard parse
rejection, is now a compile error too. Hand-copying would have quietly
re-legitimized two dead keys.
The index signature stays; removing it is step 3, and the inverted pin
asserting it is still present remains the issue's completion check.
Refs objectstack-ai/objectstack#4075
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
0 commit comments