martha schema prints the declaration's schema (#317 L1) #318

Manually merged
terra merged 2 commits from pluto/317-schema into main 2026-11-30 18:57:03 +00:00
Member

martha schema prints the declaration's JSON Schema (2020-12, x-martha-schema: 1), built from the constants the reader already uses, with the eight editor tabs in x-martha-tabs. The output is committed at schema/martha.schema.json, and an ordinary test inside npm test asserts the committed file is exactly what the command prints.

  • src/declare_crew/the_declarations_schema.ts: the tabs, fields, hints, defaults and enums (HOSTS_IT_KNOWS, TERMINALS, the hosts' model names), every word imported from the reader's own constant.
  • src/run_the_martha_command/the_schema_the_command_prints.ts: the command's text, one call shared by the command and the test.
  • run_the_martha_command.ts: schema as an act of its own, in USAGE and HELP, printed line by line so shownSafely escapes nothing inside it.
  • src/run_the_martha_command/the_schema_is_the_one_committed.node-test.ts: the equality, the dialect and major, the tabs and fields, every house rule/act/mesh value, and the enums read back from their constants.

Refs #317

`martha schema` prints the declaration's JSON Schema (2020-12, `x-martha-schema: 1`), built from the constants the reader already uses, with the eight editor tabs in `x-martha-tabs`. The output is committed at `schema/martha.schema.json`, and an ordinary test inside `npm test` asserts the committed file is exactly what the command prints. - `src/declare_crew/the_declarations_schema.ts`: the tabs, fields, hints, defaults and enums (`HOSTS_IT_KNOWS`, `TERMINALS`, the hosts' model names), every word imported from the reader's own constant. - `src/run_the_martha_command/the_schema_the_command_prints.ts`: the command's text, one call shared by the command and the test. - `run_the_martha_command.ts`: `schema` as an act of its own, in USAGE and HELP, printed line by line so `shownSafely` escapes nothing inside it. - `src/run_the_martha_command/the_schema_is_the_one_committed.node-test.ts`: the equality, the dialect and major, the tabs and fields, every house rule/act/mesh value, and the enums read back from their constants. Refs #317
The eight tabs an editor walks come from the reader's own constants, so
lazymartha hard-codes no field and no default. The committed file equals
what the command prints, checked by an ordinary test inside npm test.

Refs martha-ai/martha#317
PARKED, EVERY_MEMBER, MESH_KEYS and MESH_SERVICE_KEYS are imported rather
than restated; the mesh block and each service refuse a key the reader
refuses; a switch is off unless the declaration names it.

Refs martha-ai/martha#317
terra manually merged commit 238e3af12c into main 2026-11-30 18:57:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha!318
No description provided.