@dtmd/temper 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -12
- package/dist/src/assembly.d.ts +45 -11
- package/dist/src/assembly.js +115 -7
- package/dist/src/builtins.d.ts +433 -103
- package/dist/src/builtins.js +771 -167
- package/dist/src/claude-code.d.ts +6 -3
- package/dist/src/claude-code.js +2 -2
- package/dist/src/contract.d.ts +153 -44
- package/dist/src/contract.js +123 -34
- package/dist/src/counsel.d.ts +11 -0
- package/dist/src/counsel.js +68 -0
- package/dist/src/declarations.d.ts +108 -2
- package/dist/src/declarations.js +606 -100
- package/dist/src/dial.d.ts +3 -3
- package/dist/src/dial.js +21 -5
- package/dist/src/emit.d.ts +12 -14
- package/dist/src/emit.js +123 -47
- package/dist/src/generated/AbsenceGateRow.d.ts +16 -0
- package/dist/src/generated/AbsenceGateRow.js +2 -0
- package/dist/src/generated/AreaMode.d.ts +5 -0
- package/dist/src/generated/AreaMode.js +2 -0
- package/dist/src/generated/AreaRow.d.ts +20 -0
- package/dist/src/generated/AreaRow.js +1 -0
- package/dist/src/generated/AssemblyFactRow.d.ts +17 -4
- package/dist/src/generated/BoundRow.d.ts +9 -4
- package/dist/src/generated/CedeRow.d.ts +14 -0
- package/dist/src/generated/CedeRow.js +2 -0
- package/dist/src/generated/CharsetRow.d.ts +14 -3
- package/dist/src/generated/ClauseRow.d.ts +23 -21
- package/dist/src/generated/CollectionAddressRow.d.ts +1 -1
- package/dist/src/generated/Declarations.d.ts +24 -9
- package/dist/src/generated/FeatureValue.d.ts +3 -3
- package/dist/src/generated/Features.d.ts +3 -3
- package/dist/src/generated/KindFactRow.d.ts +41 -8
- package/dist/src/generated/Payload.d.ts +3 -5
- package/dist/src/generated/PayloadMember.d.ts +7 -0
- package/dist/src/generated/RunsRow.d.ts +17 -0
- package/dist/src/generated/RunsRow.js +2 -0
- package/dist/src/generated/Section.d.ts +2 -2
- package/dist/src/generated/SectionContainsRow.d.ts +1 -1
- package/dist/src/generated/TypecheckRow.d.ts +20 -0
- package/dist/src/generated/TypecheckRow.js +2 -0
- package/dist/src/generated/Verifier.d.ts +8 -2
- package/dist/src/generated/index.d.ts +6 -0
- package/dist/src/index.d.ts +20 -15
- package/dist/src/index.js +10 -9
- package/dist/src/kind.d.ts +382 -52
- package/dist/src/kind.js +461 -49
- package/dist/src/lockfile.d.ts +39 -0
- package/dist/src/lockfile.js +265 -0
- package/dist/src/member-address.d.ts +15 -3
- package/dist/src/member-address.js +23 -6
- package/dist/src/needs.d.ts +25 -15
- package/dist/src/needs.js +10 -11
- package/dist/src/patterns.d.ts +112 -0
- package/dist/src/patterns.js +90 -0
- package/dist/src/pipe.d.ts +16 -0
- package/dist/src/pipe.js +39 -0
- package/dist/src/playbook.d.ts +203 -0
- package/dist/src/playbook.js +239 -0
- package/dist/src/prose.d.ts +69 -12
- package/dist/src/prose.js +125 -13
- package/dist/src/reference.d.ts +70 -0
- package/dist/src/reference.js +368 -0
- package/package.json +13 -4
- package/schemas/agent.json +23 -0
- package/schemas/command.json +5 -0
- package/schemas/output-style.json +4 -0
- package/schemas/rule.json +33 -0
- package/schemas/skill.json +63 -0
package/dist/src/builtins.d.ts
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
* `@dtmd/temper/claude-code` subpath
|
|
10
10
|
* — never from the root.
|
|
11
11
|
*/
|
|
12
|
-
import type { KindDefinition, Member, Residue } from "./kind.js";
|
|
12
|
+
import type { KindDefinition, Member, MemberInit, Remedy, Residue } from "./kind.js";
|
|
13
|
+
import { ROOT_HOSTED_KINDS } from "./member-address.js";
|
|
13
14
|
import type { Prose } from "./prose.js";
|
|
14
|
-
import type { Clause } from "./contract.js";
|
|
15
|
+
import type { Clause, Requirement, RequirementValue, Verifier } from "./contract.js";
|
|
15
16
|
/** A Claude Code skill — a directory whose entry file is `SKILL.md` with YAML frontmatter. */
|
|
16
17
|
export interface Skill {
|
|
17
18
|
/**
|
|
@@ -100,19 +101,19 @@ export interface Skill {
|
|
|
100
101
|
*/
|
|
101
102
|
readonly "user-invocable"?: boolean;
|
|
102
103
|
/**
|
|
103
|
-
* The optional path scope —
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* tool's, opens no path gate, so a session that works
|
|
109
|
-
* through the shell alone never loads the skill. Distinct
|
|
110
|
-
* `paths`, which registers
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* 2.1.
|
|
104
|
+
* The optional path scope — the skill's `paths-listing` channel. A present
|
|
105
|
+
* list removes the skill from *every* invocation channel — the `/` listing,
|
|
106
|
+
* model invocation, and description-trigger invocation — until a file tool
|
|
107
|
+
* (read, edit, write) touches a matching path, and the read joins it to the
|
|
108
|
+
* listing; an absent one lists it from session start. A shell read of the
|
|
109
|
+
* same path, or a search tool's, opens no path gate, so a session that works
|
|
110
|
+
* inside the gate through the shell alone never loads the skill. Distinct
|
|
111
|
+
* from a rule's `paths`, which registers `paths-match` — the rule's body
|
|
112
|
+
* loads on the read; here the read registers the listing, and the body still
|
|
113
|
+
* loads only on invocation (code.claude.com/docs/en/skills, retrieved
|
|
114
|
+
* 2026-07-15; verified against 2.1.210; shell and search reads open no path
|
|
115
|
+
* gate, probed on Claude Code 2.1.281, 2026-09-24; the listing, not the
|
|
116
|
+
* body, is what the gate holds, probed on Claude Code 2.1.332, 2026-11-26).
|
|
116
117
|
*/
|
|
117
118
|
readonly paths?: readonly string[];
|
|
118
119
|
readonly prose?: Prose;
|
|
@@ -131,19 +132,22 @@ export interface SupportingDoc {
|
|
|
131
132
|
* `supporting-doc` — a skill's bundled reference document, at the nested-file locus:
|
|
132
133
|
* its path composes from its host skill's unit and the host's template pattern, so it
|
|
133
134
|
* governs no glob of its own. Fields-free and frontmatterless (no `format` — the whole
|
|
134
|
-
* file is body), identity from the filename
|
|
135
|
-
*
|
|
136
|
-
*
|
|
135
|
+
* file is body), identity from the filename. It declares no registration — the
|
|
136
|
+
* nested-file locus derives it — and the engine derives the one documented channel,
|
|
137
|
+
* `on-read`: a supporting file loads on demand when it is read, as the skill body that
|
|
138
|
+
* references it directs (code.claude.com/docs/en/skills, "Add supporting files",
|
|
139
|
+
* retrieved 2026-11-26).
|
|
137
140
|
* The locus is the host's: "Skills can include multiple files in their directory", the
|
|
138
141
|
* documented layout placing `reference.md` and `examples.md` beside `SKILL.md`
|
|
139
142
|
* (code.claude.com/docs/en/skills, "Add supporting files", retrieved 2026-11-24).
|
|
140
143
|
*/
|
|
141
144
|
export declare const supportingDoc: KindDefinition<SupportingDoc>;
|
|
142
145
|
/**
|
|
143
|
-
* `skill` —
|
|
146
|
+
* `skill` — `**\/.claude/skills/<name>/SKILL.md`, a directory unit, YAML frontmatter
|
|
144
147
|
* carrying `name` then `description`; registers on both documented invocation
|
|
145
148
|
* channels — user-invoked (`/name`) and description-trigger — modulated per
|
|
146
|
-
* member by the `disable-model-invocation`/`user-invocable` fields
|
|
149
|
+
* member by the `disable-model-invocation`/`user-invocable` fields, and on
|
|
150
|
+
* `paths-listing(paths)`, the read of a match that joins a scoped skill to the listing
|
|
147
151
|
* (code.claude.com/docs/en/skills, agentskills.io/specification, retrieved
|
|
148
152
|
* 2026-07-15).
|
|
149
153
|
*
|
|
@@ -156,19 +160,32 @@ export declare const supportingDoc: KindDefinition<SupportingDoc>;
|
|
|
156
160
|
*
|
|
157
161
|
* The locus is the project row of the documented load table,
|
|
158
162
|
* `.claude/skills/<skill-name>/SKILL.md` (code.claude.com/docs/en/skills, "Choose where
|
|
159
|
-
* skills load", retrieved 2026-11-24)
|
|
163
|
+
* skills load", retrieved 2026-11-24), at any depth: a subdirectory's own
|
|
164
|
+
* `.claude/skills/` loads once Claude works there, its skill named by the subdirectory's
|
|
165
|
+
* segments joined with `:` (`apps/web/.claude/skills/deploy` is `apps:web:deploy`;
|
|
166
|
+
* same source, "Load skills in monorepos and subdirectories", retrieved 2026-11-25).
|
|
167
|
+
*
|
|
168
|
+
* A skill whose frontmatter YAML does not parse still loads, with no fields set (same
|
|
169
|
+
* source, retrieved 2026-11-25), so the kind forgives `malformed-yaml`.
|
|
160
170
|
*/
|
|
161
171
|
export declare const skill: KindDefinition<Skill>;
|
|
162
172
|
/**
|
|
163
|
-
* `command` — `.claude/commands
|
|
173
|
+
* `command` — `.claude/commands/**\/*.md`, the skill surface's legacy file placement
|
|
164
174
|
* (Claude Code merged commands into skills; code.claude.com/docs/en/skills,
|
|
165
|
-
* retrieved 2026-07-15): a lone file
|
|
166
|
-
* `identityField` — like `rule`), the skill's field
|
|
167
|
-
* on the same two documented invocation channels as
|
|
175
|
+
* retrieved 2026-07-15): a lone file named by its path under `commands/`, each `/` a
|
|
176
|
+
* `:` (`unitShape: "path"`, so no `identityField` — like `rule`), the skill's field
|
|
177
|
+
* schema by import, registering on the same two documented invocation channels as
|
|
178
|
+
* `skill`.
|
|
168
179
|
*
|
|
169
180
|
* The locus is the documented placement: "a Markdown file in `.claude/commands/` is the
|
|
170
181
|
* older format and still works" (code.claude.com/docs/en/skills, "Choose where skills
|
|
171
|
-
* load", retrieved 2026-11-24)
|
|
182
|
+
* load", retrieved 2026-11-24), and a subdirectory names the command —
|
|
183
|
+
* `.claude/commands/frontend/component.md` is `/frontend:component`
|
|
184
|
+
* (code.claude.com/docs/en/skills, retrieved 2026-11-25).
|
|
185
|
+
*
|
|
186
|
+
* It loads as a skill does, so it forgives `malformed-yaml` as `skill` does. `agent`
|
|
187
|
+
* forgives nothing: a subagent whose YAML does not parse is skipped
|
|
188
|
+
* (code.claude.com/docs/en/sub-agents, retrieved 2026-11-25).
|
|
172
189
|
*/
|
|
173
190
|
export declare const command: KindDefinition<Skill>;
|
|
174
191
|
/** A Claude Code subagent definition. */
|
|
@@ -271,6 +288,49 @@ export interface Agent {
|
|
|
271
288
|
* scope", retrieved 2026-11-24).
|
|
272
289
|
*/
|
|
273
290
|
export declare const agent: KindDefinition<Agent>;
|
|
291
|
+
/**
|
|
292
|
+
* A Claude Code output style — a markdown file whose body replaces the system prompt's
|
|
293
|
+
* default style instructions. Every frontmatter field is optional, and a misspelled field
|
|
294
|
+
* is ignored without an error (code.claude.com/docs/en/output-styles, retrieved
|
|
295
|
+
* 2026-11-25).
|
|
296
|
+
*/
|
|
297
|
+
export interface OutputStyle {
|
|
298
|
+
/**
|
|
299
|
+
* The style's description, shown in the `/config` picker (same source).
|
|
300
|
+
*/
|
|
301
|
+
readonly description?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Set `true` to keep Claude Code's built-in software-engineering instructions alongside
|
|
304
|
+
* the style; defaults to `false` (same source).
|
|
305
|
+
*/
|
|
306
|
+
readonly "keep-coding-instructions"?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Plugin output styles only: set `true` to apply the style whenever the plugin is
|
|
309
|
+
* enabled, overriding the user's `outputStyle` setting; defaults to `false` (same
|
|
310
|
+
* source).
|
|
311
|
+
*/
|
|
312
|
+
readonly "force-for-plugin"?: boolean;
|
|
313
|
+
readonly prose?: Prose;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* `outputStyle` — a markdown file under `.claude/output-styles/`, optional YAML frontmatter
|
|
317
|
+
* over a body that is the style's instructions. "The file name becomes the style name
|
|
318
|
+
* unless you set `name` in the frontmatter", so identity is the `name` field, else the
|
|
319
|
+
* file stem (`unitShape: "named-field-or-file"`); settings select the style by that exact
|
|
320
|
+
* name (code.claude.com/docs/en/output-styles, retrieved 2026-11-25). "If the YAML doesn't
|
|
321
|
+
* parse, the style still loads under its file name with no fields set" (same source), so
|
|
322
|
+
* the kind forgives `malformed-yaml`. Styles load from every `.claude/output-styles/`
|
|
323
|
+
* folder, a nested one once Claude works there (same source), so the locus reaches every
|
|
324
|
+
* depth; a nested style's identity is its subdirectory's segments then its name, each
|
|
325
|
+
* joined with `:` (`apps:web:terse`), and its frontmatter `name` stays the leaf. The docs
|
|
326
|
+
* say nothing on subdirectories inside `output-styles/`, so each folder's direct `*.md`
|
|
327
|
+
* files are claimed and no deeper. A style is selected by a setting rather than invoked
|
|
328
|
+
* or triggered, so it registers the `selected` channel over the `outputStyle` edge
|
|
329
|
+
* field: the active style's instructions ride every request from launch, where a settings
|
|
330
|
+
* file selects it (code.claude.com/docs/en/output-styles, "How output styles work",
|
|
331
|
+
* retrieved 2026-11-27).
|
|
332
|
+
*/
|
|
333
|
+
export declare const outputStyle: KindDefinition<OutputStyle>;
|
|
274
334
|
/** A Claude Code rule — a flat markdown file with an optional `paths` scope. */
|
|
275
335
|
export interface Rule {
|
|
276
336
|
/**
|
|
@@ -286,30 +346,75 @@ export interface Rule {
|
|
|
286
346
|
* (code.claude.com/docs/en/memory, retrieved 2026-07-15). The locus recurses: "All `.md` files are discovered recursively, so
|
|
287
347
|
* you can organize rules into subdirectories like `frontend/` or `backend/`"
|
|
288
348
|
* (code.claude.com/docs/en/memory, "Organize rules with `.claude/rules/`", retrieved 2026-11-24).
|
|
349
|
+
* It claims a subdirectory's own `.claude/rules/` too, whose rules load on demand once
|
|
350
|
+
* Claude works there (code.claude.com/docs/en/memory, "Claude ignores the end of my
|
|
351
|
+
* subdirectory CLAUDE.md", retrieved 2026-11-26). Identity joins the spans the two `**`
|
|
352
|
+
* cover, never the literal `.claude/rules` folders: `apps/web/.claude/rules/frontend/x.md`
|
|
353
|
+
* is `apps:web:frontend:x`, and a root rule keeps `frontend:x`.
|
|
354
|
+
*
|
|
355
|
+
* It registers `on-read-beneath` beside `paths-match`: a subdirectory's own rules load
|
|
356
|
+
* once Claude reads a file beneath that subdirectory, as its `CLAUDE.md` does
|
|
357
|
+
* (decision 0120), so a nested rule without `paths` loads on demand, and its `paths` is
|
|
358
|
+
* the other on-demand cause.
|
|
289
359
|
*/
|
|
290
360
|
export declare const rule: KindDefinition<Rule>;
|
|
291
|
-
/** A Claude Code memory file — `CLAUDE.md`, loaded
|
|
361
|
+
/** A Claude Code memory file — `CLAUDE.md` or `AGENTS.md`, loaded whole, no frontmatter. */
|
|
292
362
|
export interface Memory {
|
|
293
363
|
readonly prose?: Prose;
|
|
294
364
|
}
|
|
295
365
|
/**
|
|
296
|
-
* `memory` — a
|
|
297
|
-
*
|
|
366
|
+
* `memory` — a `CLAUDE.md` or `AGENTS.md`, a lone file loaded whole, with **no
|
|
367
|
+
* frontmatter** (code.claude.com/docs/en/memory,
|
|
298
368
|
* retrieved 2026-07-15): the whole file is the body, so the kind declares no
|
|
299
369
|
* `format`. A project `CLAUDE.md` may sit at either `./CLAUDE.md` or
|
|
300
370
|
* `./.claude/CLAUDE.md` — equal documented locations (same source) — and the
|
|
301
|
-
* any-depth locus (a `CLAUDE.md` at any directory) covers both
|
|
302
|
-
*
|
|
371
|
+
* any-depth locus (a `CLAUDE.md` at any directory) covers both. A nested memory is
|
|
372
|
+
* named by its placement, `:`-joined (`apps:web:CLAUDE`), so it projects back where it
|
|
373
|
+
* was found. The locus is the project row,
|
|
303
374
|
* "`./CLAUDE.md` or `./.claude/CLAUDE.md`", at any depth because "Claude also discovers
|
|
304
375
|
* `CLAUDE.md` and `CLAUDE.local.md` files in subdirectories under your current working
|
|
305
376
|
* directory" (code.claude.com/docs/en/memory, "Choose where to put CLAUDE.md files" and
|
|
306
|
-
* "How CLAUDE.md files load", retrieved 2026-11-24). The locus excludes the `.claude/`
|
|
307
|
-
* folders another built-in loader owns — `agents`, `commands`, `
|
|
308
|
-
* memory docs describe no `CLAUDE.md` inside them loading as memory
|
|
309
|
-
*
|
|
310
|
-
*
|
|
377
|
+
* "How CLAUDE.md files load", retrieved 2026-11-24). The locus excludes the root `.claude/`
|
|
378
|
+
* folders another built-in loader owns — `agents`, `commands`, `output-styles`, `skills`:
|
|
379
|
+
* the memory docs describe no `CLAUDE.md` inside them loading as memory
|
|
380
|
+
* (code.claude.com/docs/en/memory, retrieved 2026-11-24; decision 0084). A `.claude/rules/`
|
|
381
|
+
* at any depth needs no exclusion: the rules loader discovers every `.md` under it
|
|
382
|
+
* recursively, and memory cedes that folder claim to `rule`.
|
|
383
|
+
*
|
|
384
|
+
* The second template claims `AGENTS.md` at any depth — `.claude/AGENTS.md` among them,
|
|
385
|
+
* which loads at launch beside `AGENTS.md` — behind two absence gates
|
|
386
|
+
* (code.claude.com/docs/en/memory, "AGENTS.md", retrieved 2026-11-26). At launch one
|
|
387
|
+
* loads only where there is no "`CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` in
|
|
388
|
+
* your working directory or any directory above it"; a subdirectory's loads when Claude
|
|
389
|
+
* reads a file there only where "that subdirectory has none of the three `CLAUDE.md`
|
|
390
|
+
* files of its own", so a `CLAUDE.md` above it never shuts it. Reading it directly
|
|
391
|
+
* "requires Claude Code v2.1.277 or later" (same source). An `AGENTS.md` a `CLAUDE.md`
|
|
392
|
+
* shadows is still a member, and an `@AGENTS.md` import still loads it.
|
|
393
|
+
*
|
|
394
|
+
* It registers `on-read-beneath`: the root's memory loads at launch, and a
|
|
395
|
+
* subdirectory's loads "only when Claude reads a file there" (same source, "How
|
|
396
|
+
* CLAUDE.md files load", retrieved 2026-11-24), so the load moment is read off the
|
|
397
|
+
* member's placement — one fact `explain` and the advisories share (decision 0115).
|
|
311
398
|
*/
|
|
312
399
|
export declare const memory: KindDefinition<Memory>;
|
|
400
|
+
/** A Claude Code local memory file — `CLAUDE.local.md`, personal and uncommitted, loaded whole, no frontmatter. */
|
|
401
|
+
export interface MemoryLocal {
|
|
402
|
+
readonly prose?: Prose;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* `memory-local` — a `CLAUDE.local.md` at any depth, a lone file loaded whole with no
|
|
406
|
+
* frontmatter, "loaded alongside" the `CLAUDE.md` of its directory and "treated the same
|
|
407
|
+
* way" (code.claude.com/docs/en/memory, "Choose where to put CLAUDE.md files", retrieved
|
|
408
|
+
* 2026-11-27). It is personal and gitignored (same source), so it sits at the **local**
|
|
409
|
+
* commitment class as {@link settingsLocal} does beside {@link settings}: read in place at
|
|
410
|
+
* check and gated, never an `emit` input or target, no row of its members ever landing in
|
|
411
|
+
* the lock. Claude also discovers "`CLAUDE.md` and `CLAUDE.local.md` files in
|
|
412
|
+
* subdirectories" (same source, "How CLAUDE.md files load"), so the locus reaches any
|
|
413
|
+
* depth and the kind registers `on-read-beneath` exactly as {@link memory} does: the root's
|
|
414
|
+
* at launch, a subdirectory's when Claude reads a file there. It leaves the root `.claude/`
|
|
415
|
+
* loader folders memory leaves.
|
|
416
|
+
*/
|
|
417
|
+
export declare const memoryLocal: KindDefinition<MemoryLocal>;
|
|
313
418
|
/**
|
|
314
419
|
* One entry in a hook's `hooks` array — the handler that actually fires when the group's
|
|
315
420
|
* event and matcher admit it. Its fields are the documented handler table's own: the
|
|
@@ -366,7 +471,42 @@ export interface Handler {
|
|
|
366
471
|
readonly prompt?: string;
|
|
367
472
|
/** The model a `prompt` or `agent` handler evaluates under; absent means a fast default (same source). */
|
|
368
473
|
readonly model?: string;
|
|
474
|
+
/**
|
|
475
|
+
* The {@link tool} a `command` handler runs — a `{ file }` tool for a committed script.
|
|
476
|
+
* temper's own edge, never projected: the handler entry in `settings.json` keeps the
|
|
477
|
+
* documented fields alone, and the edge rides the lock to the tool, whose file is a
|
|
478
|
+
* declared input. Declared rather than read off `command`, because parsing a command
|
|
479
|
+
* string for the path it runs is mining (intent invariant 1); the script's path is
|
|
480
|
+
* stated once, on the tool.
|
|
481
|
+
*/
|
|
482
|
+
readonly runs?: Member;
|
|
369
483
|
}
|
|
484
|
+
/** The edge field a runner names the {@link tool} it runs under — temper's own, never a
|
|
485
|
+
* projected key. The engine's `RUNS_FIELD` (`src/drift.rs`). */
|
|
486
|
+
export declare const RUNS_FIELD = "runs";
|
|
487
|
+
/**
|
|
488
|
+
* A tool — the one home of a command the harness runs: a package's bin, a committed file,
|
|
489
|
+
* or a system tool. Exactly one variant; its runners point at the member by edge.
|
|
490
|
+
*/
|
|
491
|
+
export type Tool = {
|
|
492
|
+
readonly package: string;
|
|
493
|
+
readonly bin: string;
|
|
494
|
+
} | {
|
|
495
|
+
readonly file: string;
|
|
496
|
+
} | {
|
|
497
|
+
readonly system: string;
|
|
498
|
+
};
|
|
499
|
+
/** Every leaf a tool member may carry — the union of {@link Tool}'s variants, flat. */
|
|
500
|
+
export interface ToolFields {
|
|
501
|
+
readonly package?: string;
|
|
502
|
+
readonly bin?: string;
|
|
503
|
+
readonly file?: string;
|
|
504
|
+
readonly system?: string;
|
|
505
|
+
}
|
|
506
|
+
/** What `tool(...)` takes: one {@link Tool} variant, plus an optional member `name`. */
|
|
507
|
+
export type ToolInit = Tool & {
|
|
508
|
+
readonly name?: string;
|
|
509
|
+
};
|
|
370
510
|
/**
|
|
371
511
|
* `handler` — one entry in a hook's `hooks` array, at the **embedded** locus: it owns no
|
|
372
512
|
* file and no glob, living inside its host matcher group and keyed by its position there
|
|
@@ -378,6 +518,59 @@ export interface Handler {
|
|
|
378
518
|
* array, keyed by position — is cited here, the point of claim.
|
|
379
519
|
*/
|
|
380
520
|
export declare const handler: KindDefinition<Handler>;
|
|
521
|
+
/**
|
|
522
|
+
* A requirement's template beyond its identity and its prose — the slots every member of
|
|
523
|
+
* the `requirement` kind, and of each subkind of it, carries as fields
|
|
524
|
+
* (specs/model/contract.md, "requirement — a shipped kind, not a primitive"). The
|
|
525
|
+
* identity is the member's `name`, the one satisfies edges target; the prose is the
|
|
526
|
+
* member's own `prose`, a `text` span carried verbatim and never interpreted.
|
|
527
|
+
*/
|
|
528
|
+
export interface RequirementFields {
|
|
529
|
+
/** What may fill it — the kind's value; absent, any kind's member may. */
|
|
530
|
+
readonly kind?: KindDefinition<any>;
|
|
531
|
+
/** Whether it must be filled; absent inherits the shipped fill default (at least one satisfier, at error). */
|
|
532
|
+
readonly required?: boolean;
|
|
533
|
+
/** Clauses over its opt-in selection — the members whose `satisfies` names it. */
|
|
534
|
+
readonly clauses?: readonly Clause[];
|
|
535
|
+
/** The typed delegate judging its behavioral remainder; absent, it is unheld. */
|
|
536
|
+
readonly verifier?: Verifier;
|
|
537
|
+
}
|
|
538
|
+
/** What `requirement(…)` takes: a {@link Requirement} literal, plus the member's `name` where no map key supplies it. */
|
|
539
|
+
export type RequirementInit = Requirement & {
|
|
540
|
+
readonly name?: string;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* The authored `requirement` constructor — {@link requirementKind}'s facts over
|
|
544
|
+
* {@link requirementMember}. As a kind value it is what `extend(requirement, { name, … })`
|
|
545
|
+
* takes, minting a subkind whose members are requirements too.
|
|
546
|
+
*/
|
|
547
|
+
export declare const requirement: KindDefinition<RequirementFields, RequirementInit> & ((init: RequirementInit) => Member);
|
|
548
|
+
/**
|
|
549
|
+
* The default contract for `requirement` — two clauses, each judged over every declared
|
|
550
|
+
* requirement's own opt-in selection rather than over the kind's population. `count` is
|
|
551
|
+
* the fill default, at least one satisfier; a requirement declared `required: false`
|
|
552
|
+
* reads it at advisory rather than not at all. `resolves` holds every `satisfies` link to a
|
|
553
|
+
* declared requirement.
|
|
554
|
+
*/
|
|
555
|
+
export declare const requirementDefaultContract: readonly Clause[];
|
|
556
|
+
/** Whether a member is a requirement: of the `requirement` kind, or a subkind anywhere down its chain. */
|
|
557
|
+
export declare function isRequirement(member: Member): boolean;
|
|
558
|
+
/**
|
|
559
|
+
* The requirement a map entry declares under `name`, as the declaration rows read it. A
|
|
560
|
+
* literal is itself; a requirement member yields its template, its prose rendered from
|
|
561
|
+
* its `text` span.
|
|
562
|
+
*
|
|
563
|
+
* # Throws
|
|
564
|
+
* If the value is a member of no requirement kind, a member named other than `name`, or a
|
|
565
|
+
* member whose prose is absent or not a `text` span.
|
|
566
|
+
*/
|
|
567
|
+
export declare function requirementOf(name: string, value: RequirementValue): Requirement;
|
|
568
|
+
/** The member a requirement was read off ({@link requirementOf}), or `undefined` for a literal. */
|
|
569
|
+
export declare function requirementSource(requirement: Requirement): Member | undefined;
|
|
570
|
+
/** The embedded kinds the root member hosts — the grammar's set, re-exported beside the kinds. */
|
|
571
|
+
export { ROOT_HOSTED_KINDS };
|
|
572
|
+
/** The authored `tool` constructor — {@link toolKind}'s facts over {@link toolMember}. */
|
|
573
|
+
export declare const tool: KindDefinition<ToolFields, ToolInit> & ((init?: ToolInit) => Member);
|
|
381
574
|
/**
|
|
382
575
|
* A Claude Code hook — a fields-only registration member surfacing inside
|
|
383
576
|
* `settings.json`, keyed under its lifecycle event. It owns no artifact of its own: one
|
|
@@ -439,9 +632,29 @@ export declare const HOOK_MATCHER_KEY = "matcher";
|
|
|
439
632
|
* a colon, so the first one is the join's.
|
|
440
633
|
*/
|
|
441
634
|
export declare function hookCollectionKey(name: string): string;
|
|
635
|
+
/** The words `hook({ name })` fails with — at `tsc` through {@link HookInit}'s
|
|
636
|
+
* {@link Remedy} slot, and at runtime through {@link refuseAuthoredName}: one spelling. */
|
|
637
|
+
declare const HOOK_NAME_REMEDY = "a hook's lifecycle event is its `event`: write `hook({ event, matcher, hooks })`";
|
|
638
|
+
/** The words `gateHook({ name })` fails with, as {@link HOOK_NAME_REMEDY} is `hook`'s. */
|
|
639
|
+
declare const GATE_HOOK_NAME_REMEDY = "a gate hook's lifecycle event is its `event`: write `gateHook({ event, matcher })`";
|
|
640
|
+
/**
|
|
641
|
+
* What `hook(...)` takes: a matcher group's init keyed by its lifecycle `event` in place
|
|
642
|
+
* of a `name` — the member's name is composed from the event and matcher, never authored
|
|
643
|
+
* — plus a {@link Remedy} slot for each field that moved, so the old spelling fails `tsc`
|
|
644
|
+
* naming where the field went.
|
|
645
|
+
*/
|
|
646
|
+
export type HookInit = Omit<MemberInit<Hook>, "name"> & {
|
|
647
|
+
/** The lifecycle event the group registers under — the `hooks.<Event>` key
|
|
648
|
+
* (code.claude.com/docs/en/hooks, retrieved 2026-09-25). */
|
|
649
|
+
readonly event: string;
|
|
650
|
+
readonly name?: Remedy<typeof HOOK_NAME_REMEDY>;
|
|
651
|
+
readonly type?: Remedy<"`type` moved to a handler: write `hooks: [{ type, command }]`">;
|
|
652
|
+
readonly command?: Remedy<"`command` moved to a handler: write `hooks: [{ type, command }]`, or use `gateHook()` for a temper gate">;
|
|
653
|
+
readonly timeout?: Remedy<"`timeout` moved to a handler: write `hooks: [{ type, command, timeout }]`">;
|
|
654
|
+
};
|
|
442
655
|
/** The authored `hook` constructor — {@link hookGroup}'s facts over {@link hookMember}'s
|
|
443
656
|
* name composition. */
|
|
444
|
-
export declare const hook: KindDefinition<Hook>;
|
|
657
|
+
export declare const hook: KindDefinition<Hook, HookInit>;
|
|
445
658
|
/**
|
|
446
659
|
* The lifecycle events temper's own gate rides — the session-start report and the guard's
|
|
447
660
|
* two edges. A gate hook on any other event fires no temper verb, so the type refuses it.
|
|
@@ -449,57 +662,87 @@ export declare const hook: KindDefinition<Hook>;
|
|
|
449
662
|
export type GateHookEvent = "SessionStart" | "PreToolUse" | "PostToolUse";
|
|
450
663
|
/**
|
|
451
664
|
* A gate hook's authored surface: the event and matcher that place its matcher group, and
|
|
452
|
-
* the one fact the member states — the
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
* (specs/model/adoption.md, "Install"; decision 0082).
|
|
665
|
+
* the one fact the member states — the {@link tool} it runs. Absent, the tool is the temper
|
|
666
|
+
* package's bin, run from the program's `node_modules/.bin`. The command is never
|
|
667
|
+
* authored: the engine renders it from the tool at emit, so the bytes a gate hook runs
|
|
668
|
+
* have one home.
|
|
457
669
|
*/
|
|
458
670
|
export interface GateHookInit {
|
|
459
|
-
/** The lifecycle event
|
|
460
|
-
readonly
|
|
671
|
+
/** The lifecycle event the group registers under, as on {@link hook}. */
|
|
672
|
+
readonly event: GateHookEvent;
|
|
673
|
+
readonly name?: Remedy<typeof GATE_HOOK_NAME_REMEDY>;
|
|
461
674
|
/** The tool-name filter the group binds, as on {@link Hook}; absent on `SessionStart`. */
|
|
462
675
|
readonly matcher?: string;
|
|
463
|
-
/** The
|
|
464
|
-
readonly
|
|
676
|
+
/** The {@link tool} the hook runs as temper — a composed `tool(...)` member. */
|
|
677
|
+
readonly tool?: Member;
|
|
678
|
+
readonly binary?: Remedy<"`binary` gave way to `tool`: write `gateHook({ event, tool: tool({ package, bin }) })`, or omit it for the temper package's bin">;
|
|
465
679
|
/** The requirements this member fills — every member's `satisfies` edge, as on
|
|
466
680
|
* {@link hook} (specs/model/contract.md, "edge"). */
|
|
467
681
|
readonly satisfies?: readonly string[];
|
|
468
682
|
}
|
|
469
683
|
/**
|
|
470
|
-
* The
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
|
|
474
|
-
|
|
684
|
+
* The tool-name matcher the guard's `PreToolUse` edge binds — Claude Code's own
|
|
685
|
+
* file-writing tools (`code.claude.com/docs/en/hooks`, retrieved 2026-07-24), the matcher
|
|
686
|
+
* `temper install` places (`src/install.rs`'s `GUARD_MATCHER`).
|
|
687
|
+
*/
|
|
688
|
+
export declare const GUARD_MATCHER = "Write|Edit|MultiEdit";
|
|
689
|
+
/**
|
|
690
|
+
* The key a gate hook's registration row carries the address of the tool it runs under —
|
|
691
|
+
* the engine's `GATE_TOOL_KEY` (`src/drift.rs`), which consumes it at emit and renders the
|
|
692
|
+
* handler's command in its place. Colon-qualified so no typed {@link Hook} field can spell
|
|
693
|
+
* it. `null` is a gate hook declaring no tool, so the default has one spelling, the
|
|
694
|
+
* engine's.
|
|
475
695
|
*/
|
|
476
|
-
export declare const
|
|
696
|
+
export declare const GATE_TOOL_KEY = "temper:gate-tool";
|
|
477
697
|
/**
|
|
478
698
|
* A temper gate hook — a {@link hook} member whose single `command` handler runs the
|
|
479
|
-
* temper verb its event fires, with the
|
|
699
|
+
* temper verb its event fires, with the tool it reaches. The handler carries the tool as
|
|
700
|
+
* its `runs` edge, so the lock records which tool the gate runs. The member is an ordinary
|
|
480
701
|
* matcher group in every other respect: its name joins its matcher as any hook's does,
|
|
481
702
|
* and a tap hook at the same event and matcher joins it as a further handler.
|
|
482
703
|
*
|
|
483
704
|
* # Throws
|
|
484
|
-
* If `
|
|
485
|
-
* `/` ({@link hook}).
|
|
705
|
+
* If `name` is handed without `event` ({@link GATE_HOOK_NAME_REMEDY}), `tool` is not a
|
|
706
|
+
* `tool(...)` member, or the matcher carries a `/` ({@link hook}).
|
|
486
707
|
*/
|
|
487
708
|
export declare function gateHook(init: GateHookInit): Member;
|
|
488
709
|
/**
|
|
489
|
-
* The
|
|
490
|
-
*
|
|
491
|
-
* registration erasure (`declarations.ts`), which carries
|
|
710
|
+
* The tool a gate hook member reaches — `null` where it declares none (the temper
|
|
711
|
+
* package's bin) — or `undefined` where `member` is not a gate hook at all. The one reader
|
|
712
|
+
* is the registration erasure (`declarations.ts`), which carries its address under
|
|
713
|
+
* {@link GATE_TOOL_KEY}.
|
|
492
714
|
*/
|
|
493
|
-
export declare function
|
|
715
|
+
export declare function gateHookTool(member: Member): Member | null | undefined;
|
|
716
|
+
/**
|
|
717
|
+
* The key a tap handler carries its declaration's tool address under — the engine's
|
|
718
|
+
* `TAP_TOOL_KEY` (`src/drift.rs`), which consumes it at emit and renders the handler's
|
|
719
|
+
* command in its place, anchored at the project. Carried on the **handler**, not the row,
|
|
720
|
+
* because a tap joins an authored group at the same (event, matcher) as a further handler
|
|
721
|
+
* (`declarations.ts`). Colon-qualified so no typed {@link Handler} field can spell it;
|
|
722
|
+
* `null` is a declaration naming no tool, so the default has one spelling, the engine's.
|
|
723
|
+
*/
|
|
724
|
+
export declare const TAP_TOOL_KEY = "temper:tap-tool";
|
|
725
|
+
/**
|
|
726
|
+
* The key a tap handler carries the name of the telemetry declaration it speaks for — the
|
|
727
|
+
* engine's `TAP_DECLARATION_KEY` (`src/drift.rs`), which names it when two declarations
|
|
728
|
+
* sharing a tap resolve to different commands, then drops it before a byte is projected.
|
|
729
|
+
*/
|
|
730
|
+
export declare const TAP_DECLARATION_KEY = "temper:tap-declaration";
|
|
494
731
|
/**
|
|
495
732
|
* The tap hook registration's `hooks.<Event>` key-path and {@link Hook} fields — the
|
|
496
733
|
* provider fact {@link tapHookRows} (`declarations.ts`) fills rather than authors inline.
|
|
497
734
|
* One matcher group like any authored one: the per-event `matcher`
|
|
498
|
-
* {@link TELEMETRY_EVENT_HOOKS} names lifted beside
|
|
499
|
-
*
|
|
500
|
-
* the
|
|
735
|
+
* {@link TELEMETRY_EVENT_HOOKS} names lifted beside one `command` handler per distinct
|
|
736
|
+
* declared tool, each carrying that tool's address ({@link TAP_TOOL_KEY}; `null` naming
|
|
737
|
+
* none) and the declaration naming it ({@link TAP_DECLARATION_KEY}) — the engine renders
|
|
738
|
+
* each tool's command, merges the handlers that agree into one tap, and refuses the rest —
|
|
739
|
+
* so a synthesized row and an authored one are the same shape and the join in
|
|
740
|
+
* `declarations.ts` can merge one into the other.
|
|
501
741
|
*/
|
|
502
|
-
export declare function tapHookRegistration(
|
|
742
|
+
export declare function tapHookRegistration(declarations: readonly {
|
|
743
|
+
readonly tool: string | null;
|
|
744
|
+
readonly named: string;
|
|
745
|
+
}[], matcher: string): {
|
|
503
746
|
readonly keyPath: string;
|
|
504
747
|
readonly fields: Array<[string, unknown]>;
|
|
505
748
|
};
|
|
@@ -563,35 +806,6 @@ export interface InstalledPlugin {
|
|
|
563
806
|
*/
|
|
564
807
|
readonly enabled: boolean;
|
|
565
808
|
}
|
|
566
|
-
/**
|
|
567
|
-
* `installedPlugin` — a `settings.json` `enabledPlugins` registration member: a
|
|
568
|
-
* fields-only kind (no body slot), its members discovered off the `.claude/settings.json`
|
|
569
|
-
* manifest at the `enabledPlugins.*` collection address, keyed by plugin identity;
|
|
570
|
-
* registers on the `enablement` channel — the entry's own presence is the registration
|
|
571
|
-
* (code.claude.com/docs/en/plugins-reference, retrieved 2026-07-16). The third manifest
|
|
572
|
-
* kind temper ships, and the first whose entries are scalars.
|
|
573
|
-
*/
|
|
574
|
-
export declare const installedPlugin: KindDefinition<InstalledPlugin>;
|
|
575
|
-
/**
|
|
576
|
-
* The default contract for `installed-plugin` — **deliberately empty**. The format
|
|
577
|
-
* documents almost no contract, so it earns an almost-empty default: the honest encoding,
|
|
578
|
-
* not a gap.
|
|
579
|
-
*
|
|
580
|
-
* A charset clause on the `<plugin>@<marketplace>` key has nothing decidable to range
|
|
581
|
-
* over: the key is the member's identity, and the two sources that describe it do not
|
|
582
|
-
* settle a charset — the plugins-reference documents the identity as
|
|
583
|
-
* `formatter@my-marketplace` and schemastore's `claude-code-settings.json` constrains its
|
|
584
|
-
* `enabledPlugins` keys with no `propertyNames` pattern at all (both retrieved
|
|
585
|
-
* 2026-07-16), so a clause against either spelling would forge findings on valid harnesses.
|
|
586
|
-
* The marketplace half of the key is not un-typed, though: it is a declared edge to the
|
|
587
|
-
* `known-marketplace` member it names, resolved on the reference graph rather than by a
|
|
588
|
-
* contract clause — an enablement naming a marketplace no registration declares is a
|
|
589
|
-
* dangling-edge finding, never a convention (decision 0039).
|
|
590
|
-
*
|
|
591
|
-
* `enabled` needs no `required` clause: the type already holds it, and a member that
|
|
592
|
-
* omits it projects the `true` Claude Code itself writes.
|
|
593
|
-
*/
|
|
594
|
-
export declare const installedPluginDefaultContract: readonly Clause[];
|
|
595
809
|
/**
|
|
596
810
|
* A Claude Code known marketplace — the consumer half of the plugin-distribution graph, a
|
|
597
811
|
* fields-only registration member surfacing inside `.claude/settings.json` under
|
|
@@ -641,6 +855,35 @@ export declare const knownMarketplace: KindDefinition<KnownMarketplace>;
|
|
|
641
855
|
* contract, not a forged clause — the `installedPluginDefaultContract` precedent.
|
|
642
856
|
*/
|
|
643
857
|
export declare const knownMarketplaceDefaultContract: readonly Clause[];
|
|
858
|
+
/**
|
|
859
|
+
* `installedPlugin` — a `settings.json` `enabledPlugins` registration member: a
|
|
860
|
+
* fields-only kind (no body slot), its members discovered off the `.claude/settings.json`
|
|
861
|
+
* manifest at the `enabledPlugins.*` collection address, keyed by plugin identity;
|
|
862
|
+
* registers on the `enablement` channel — the entry's own presence is the registration
|
|
863
|
+
* (code.claude.com/docs/en/plugins-reference, retrieved 2026-07-16). The third manifest
|
|
864
|
+
* kind temper ships, and the first whose entries are scalars.
|
|
865
|
+
*/
|
|
866
|
+
export declare const installedPlugin: KindDefinition<InstalledPlugin>;
|
|
867
|
+
/**
|
|
868
|
+
* The default contract for `installed-plugin` — **deliberately empty**. The format
|
|
869
|
+
* documents almost no contract, so it earns an almost-empty default: the honest encoding,
|
|
870
|
+
* not a gap.
|
|
871
|
+
*
|
|
872
|
+
* A charset clause on the `<plugin>@<marketplace>` key has nothing decidable to range
|
|
873
|
+
* over: the key is the member's identity, and the two sources that describe it do not
|
|
874
|
+
* settle a charset — the plugins-reference documents the identity as
|
|
875
|
+
* `formatter@my-marketplace` and schemastore's `claude-code-settings.json` constrains its
|
|
876
|
+
* `enabledPlugins` keys with no `propertyNames` pattern at all (both retrieved
|
|
877
|
+
* 2026-07-16), so a clause against either spelling would forge findings on valid harnesses.
|
|
878
|
+
* The marketplace half of the key is not un-typed, though: it is a declared edge to the
|
|
879
|
+
* `known-marketplace` member it names, resolved on the reference graph rather than by a
|
|
880
|
+
* contract clause — an enablement naming a marketplace no registration declares is a
|
|
881
|
+
* dangling-edge finding, never a convention (decision 0039).
|
|
882
|
+
*
|
|
883
|
+
* `enabled` needs no `required` clause: the type already holds it, and a member that
|
|
884
|
+
* omits it projects the `true` Claude Code itself writes.
|
|
885
|
+
*/
|
|
886
|
+
export declare const installedPluginDefaultContract: readonly Clause[];
|
|
644
887
|
/**
|
|
645
888
|
* A Claude Code plugin manifest — `.claude-plugin/plugin.json`, the pack's identity and
|
|
646
889
|
* the metadata a marketplace lists it by. The manifest itself is optional (Claude Code
|
|
@@ -688,6 +931,27 @@ export interface PluginManifest {
|
|
|
688
931
|
readonly license?: string;
|
|
689
932
|
/** Discovery tags. */
|
|
690
933
|
readonly keywords?: readonly string[];
|
|
934
|
+
/** Free-form data of your own; Claude Code does not read it. */
|
|
935
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
936
|
+
/** Anthropic directory listing fields; Claude Code does not read them. */
|
|
937
|
+
readonly icon?: string;
|
|
938
|
+
readonly documentationUrl?: string;
|
|
939
|
+
readonly supportUrl?: string;
|
|
940
|
+
readonly privacyPolicyUrl?: string;
|
|
941
|
+
readonly termsOfServiceUrl?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Supported Claude Code versions, a semver range under `claude-code`. Requires v2.1.323+;
|
|
944
|
+
* v2.0.15 through v2.1.75 reject a manifest carrying it.
|
|
945
|
+
*/
|
|
946
|
+
readonly engines?: Readonly<{
|
|
947
|
+
"claude-code"?: string;
|
|
948
|
+
}>;
|
|
949
|
+
/** Hosts the plugin reaches, reported by `claude plugin validate`; allows and blocks nothing. */
|
|
950
|
+
readonly network?: Readonly<{
|
|
951
|
+
hosts?: readonly string[];
|
|
952
|
+
}>;
|
|
953
|
+
/** A `.d.ts` file declaring a mod's `$.state` values and `$` nouns. */
|
|
954
|
+
readonly types?: string;
|
|
691
955
|
/**
|
|
692
956
|
* Whether the plugin starts enabled when the user has not set a state; defaults to
|
|
693
957
|
* `true`. A `enabledPlugins` entry at any settings scope and a dependency requirement
|
|
@@ -709,6 +973,8 @@ export interface PluginManifest {
|
|
|
709
973
|
readonly outputStyles?: readonly string[] | string;
|
|
710
974
|
/** Language Server Protocol configs powering code intelligence. */
|
|
711
975
|
readonly lspServers?: readonly string[] | string | Readonly<Record<string, unknown>>;
|
|
976
|
+
/** Workflow `.js` files or directories; replaces the default `workflows/` scan. */
|
|
977
|
+
readonly workflows?: readonly string[] | string;
|
|
712
978
|
/**
|
|
713
979
|
* The components whose manifest schema may still change between releases. Declaring
|
|
714
980
|
* `themes`/`monitors` at the top level instead still works today, but `claude plugin
|
|
@@ -717,6 +983,8 @@ export interface PluginManifest {
|
|
|
717
983
|
readonly experimental?: Readonly<{
|
|
718
984
|
themes?: readonly string[] | string;
|
|
719
985
|
monitors?: readonly string[] | string;
|
|
986
|
+
/** The eval-case directory when it is not the default `evals/`. */
|
|
987
|
+
evals?: readonly string[] | string;
|
|
720
988
|
}>;
|
|
721
989
|
/** User-configurable values Claude Code prompts for when the plugin is enabled. */
|
|
722
990
|
readonly userConfig?: Readonly<Record<string, unknown>>;
|
|
@@ -941,7 +1209,7 @@ export interface SettingsLocal {
|
|
|
941
1209
|
readonly disabledMcpjsonServers?: readonly string[];
|
|
942
1210
|
/** Whether to add a Claude co-author trailer to git commits. */
|
|
943
1211
|
readonly includeCoAuthoredBy?: boolean;
|
|
944
|
-
/** The
|
|
1212
|
+
/** The {@link outputStyle} member, or built-in style, this file selects — by its exact, case-sensitive name; an edge ({@link BUILTIN_OUTPUT_STYLES}). */
|
|
945
1213
|
readonly outputStyle?: string;
|
|
946
1214
|
/** Whether to enable auto-memory for this project (code.claude.com/docs/en/memory, retrieved 2026-07-26). */
|
|
947
1215
|
readonly autoMemoryEnabled?: boolean;
|
|
@@ -1001,6 +1269,32 @@ export declare const settingsLocalDefaultContract: readonly Clause[];
|
|
|
1001
1269
|
* registers there and this container never types the key. Declaring one here would author
|
|
1002
1270
|
* the same segment twice.
|
|
1003
1271
|
*/
|
|
1272
|
+
/**
|
|
1273
|
+
* The `statusLine` settings key — the command Claude Code runs to render the status line.
|
|
1274
|
+
* Its documented fields, each quoted from the docs' "Manually configure a status line"
|
|
1275
|
+
* (code.claude.com/docs/en/statusline, retrieved 2026-11-25), plus temper's own
|
|
1276
|
+
* {@link RUNS_FIELD} edge.
|
|
1277
|
+
*/
|
|
1278
|
+
export interface StatusLine {
|
|
1279
|
+
/** Set to `"command"` — "run this shell command". */
|
|
1280
|
+
readonly type: "command";
|
|
1281
|
+
/** "a script path or an inline shell command"; it "runs in a shell". */
|
|
1282
|
+
readonly command: string;
|
|
1283
|
+
/** Extra horizontal spacing, in characters, beside the built-in spacing; defaults to `0`. */
|
|
1284
|
+
readonly padding?: number;
|
|
1285
|
+
/** Re-runs the command every N seconds beside the event-driven updates; the minimum is `1`. */
|
|
1286
|
+
readonly refreshInterval?: number;
|
|
1287
|
+
/** Suppresses the built-in `-- INSERT --` text, for a script that renders `vim.mode` itself. */
|
|
1288
|
+
readonly hideVimModeIndicator?: boolean;
|
|
1289
|
+
/**
|
|
1290
|
+
* The {@link tool} the command runs — a `{ file }` tool for a committed script.
|
|
1291
|
+
* temper's own edge, never projected: `settings.json` keeps the documented fields alone,
|
|
1292
|
+
* and the edge rides the lock from the settings member to the tool. Declared rather than
|
|
1293
|
+
* read off `command`, because parsing a command string for its path is mining (intent
|
|
1294
|
+
* invariant 1).
|
|
1295
|
+
*/
|
|
1296
|
+
readonly runs?: Member;
|
|
1297
|
+
}
|
|
1004
1298
|
export interface Settings {
|
|
1005
1299
|
/** JSON Schema URL for editor autocomplete; Claude Code ignores it at load time. */
|
|
1006
1300
|
readonly $schema?: string;
|
|
@@ -1025,12 +1319,14 @@ export interface Settings {
|
|
|
1025
1319
|
readonly enabledMcpjsonServers?: readonly string[];
|
|
1026
1320
|
/** MCP servers from `.mcp.json` to reject. */
|
|
1027
1321
|
readonly disabledMcpjsonServers?: readonly string[];
|
|
1028
|
-
/** The
|
|
1322
|
+
/** The {@link outputStyle} member, or built-in style, this file selects — by its exact, case-sensitive name; an edge ({@link BUILTIN_OUTPUT_STYLES}). */
|
|
1029
1323
|
readonly outputStyle?: string;
|
|
1030
1324
|
/** Whether to enable auto-memory for this project. */
|
|
1031
1325
|
readonly autoMemoryEnabled?: boolean;
|
|
1032
1326
|
/** Absolute or `~/`-prefixed path for auto-memory storage, honored at any settings scope. */
|
|
1033
1327
|
readonly autoMemoryDirectory?: string;
|
|
1328
|
+
/** The status line command, and the {@link tool} it runs (code.claude.com/docs/en/statusline, retrieved 2026-11-25). */
|
|
1329
|
+
readonly statusLine?: StatusLine;
|
|
1034
1330
|
/**
|
|
1035
1331
|
* The opaque residue — every documented-but-untyped top-level key the committed file
|
|
1036
1332
|
* carries, projected flat and key-sorted after the typed fields above. The settings
|
|
@@ -1190,12 +1486,28 @@ export declare const supportingDocDefaultContract: readonly Clause[];
|
|
|
1190
1486
|
* the portable profile for skill directories.
|
|
1191
1487
|
*/
|
|
1192
1488
|
export declare const commandDefaultContract: readonly Clause[];
|
|
1489
|
+
/**
|
|
1490
|
+
* The default contract for `output-style` — one advisory `unshadowed` clause. Every
|
|
1491
|
+
* output-style field is optional, a misspelled one is ignored without an error, and a style
|
|
1492
|
+
* whose YAML does not parse still loads under its file name, so the format documents no
|
|
1493
|
+
* field requirement to gate. Styles load from every `.claude/output-styles/` folder and the
|
|
1494
|
+
* one nearest the working directory wins a shared name (code.claude.com/docs/en/output-styles,
|
|
1495
|
+
* retrieved 2026-11-25), so a nested style named like a shallower one is legal and loads —
|
|
1496
|
+
* the clause says which sessions it takes over, never refuses it.
|
|
1497
|
+
*/
|
|
1498
|
+
export declare const outputStyleDefaultContract: readonly Clause[];
|
|
1499
|
+
/**
|
|
1500
|
+
* The default contract for `tool` — one advisory `degree` clause, incoming at least one: a
|
|
1501
|
+
* tool no runner reaches is a command nothing runs.
|
|
1502
|
+
*/
|
|
1503
|
+
export declare const toolDefaultContract: readonly Clause[];
|
|
1193
1504
|
/**
|
|
1194
1505
|
* The default contract for `agent` — Anthropic's documented subagent contract
|
|
1195
|
-
* (code.claude.com/docs/en/sub-agents, retrieved 2026-
|
|
1196
|
-
* `description` are the only required fields
|
|
1197
|
-
*
|
|
1198
|
-
*
|
|
1506
|
+
* (code.claude.com/docs/en/sub-agents, retrieved 2026-11-25): `name` and
|
|
1507
|
+
* `description` are the only required fields; `name` is a "unique identifier of
|
|
1508
|
+
* at most 256 characters" with no documented charset (`reviewer-v2` is the docs'
|
|
1509
|
+
* own example, and a project agent named `Explore` overrides the built-in); and
|
|
1510
|
+
* "keep `name` values unique across subfolders" — a same-directory collision
|
|
1199
1511
|
* loads only one definition.
|
|
1200
1512
|
*
|
|
1201
1513
|
* Deliberately narrow, like `ruleDefaultContract`: undecidable properties (whether the
|
|
@@ -1229,10 +1541,25 @@ export declare const ruleDefaultContract: readonly Clause[];
|
|
|
1229
1541
|
* markdown with no documented frontmatter and no required fields
|
|
1230
1542
|
* (code.claude.com/docs/en/memory, retrieved 2026-07-15), so there is no
|
|
1231
1543
|
* schema to gate — manufacturing a required field or a forbidden-key list
|
|
1232
|
-
* would fake a check the format does not carry. The
|
|
1233
|
-
*
|
|
1544
|
+
* would fake a check the format does not carry. The clauses are context-cost budgets —
|
|
1545
|
+
* the size target, and the per-file limit a subdirectory's `CLAUDE.md`, loaded on demand,
|
|
1546
|
+
* is truncated past; everything else the contract could say is guidance.
|
|
1547
|
+
*/
|
|
1548
|
+
export declare const memoryDefaultContract: readonly Clause[];
|
|
1549
|
+
/**
|
|
1550
|
+
* The default contract for `memory-local` — the memory size target, which the docs state
|
|
1551
|
+
* per memory file, and a `CLAUDE.local.md` is loaded the same way a `CLAUDE.md` is; and
|
|
1552
|
+
* the per-file limit a subdirectory's `CLAUDE.local.md`, loaded on demand beside its
|
|
1553
|
+
* `CLAUDE.md`, is truncated past.
|
|
1554
|
+
*/
|
|
1555
|
+
export declare const memoryLocalDefaultContract: readonly Clause[];
|
|
1556
|
+
/**
|
|
1557
|
+
* The root's size clause over every import target no kind claims: such a file has no
|
|
1558
|
+
* kind contract to size it, so it is judged at the root, through the reference graph,
|
|
1559
|
+
* against the per-file limit when the memory that imports it loads on demand. A file a
|
|
1560
|
+
* launch-loaded member reaches arrives whole and is not judged.
|
|
1234
1561
|
*/
|
|
1235
|
-
export declare const
|
|
1562
|
+
export declare const unclaimedImportSizeClause: Clause;
|
|
1236
1563
|
/**
|
|
1237
1564
|
* The default contract for `handler` — the handler-level half of Anthropic's documented
|
|
1238
1565
|
* hooks contract (code.claude.com/docs/en/hooks, retrieved 2026-09-25), and the only home
|
|
@@ -1302,10 +1629,13 @@ export declare const TELEMETRY_EVENT_HOOKS: Readonly<Record<string, {
|
|
|
1302
1629
|
* cited property that holds across every transport is `type`: a value outside the
|
|
1303
1630
|
* documented set is a transport Claude Code cannot honor, so the strictest documented
|
|
1304
1631
|
* profile is that a present `type` names one temper's cited docs carry. An absent `type`
|
|
1305
|
-
* passes
|
|
1632
|
+
* passes that clause.
|
|
1306
1633
|
*
|
|
1307
1634
|
* The per-transport requirements gate as `when` clauses: a `stdio` server needs a
|
|
1308
1635
|
* `command`, and a remote server (`http`, `streamable-http`, `sse`, or `ws`) needs a
|
|
1309
|
-
* `url`.
|
|
1636
|
+
* `url`. The guards read `type` as Claude Code does — absent is `stdio`, the documented
|
|
1637
|
+
* default {@link McpServer.type} cites, a built-in fact of the `mcp-server` kind's format
|
|
1638
|
+
* (`src/builtin_kind.rs`) — so an entry with no `type` is judged a stdio server, and one
|
|
1639
|
+
* carrying only a `url` draws the stdio `command` finding rather than passing as remote.
|
|
1310
1640
|
*/
|
|
1311
1641
|
export declare const mcpServerDefaultContract: readonly Clause[];
|