@smeltjs/core 0.3.0 → 0.5.0

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.
Files changed (146) hide show
  1. package/dist/agents/guide.d.ts +68 -0
  2. package/dist/agents/guide.d.ts.map +1 -0
  3. package/dist/agents/guide.js +72 -0
  4. package/dist/agents/guide.js.map +1 -0
  5. package/dist/agents/instructions.d.ts +133 -0
  6. package/dist/agents/instructions.d.ts.map +1 -0
  7. package/dist/agents/instructions.js +212 -0
  8. package/dist/agents/instructions.js.map +1 -0
  9. package/dist/agents/lint.d.ts +154 -0
  10. package/dist/agents/lint.d.ts.map +1 -0
  11. package/dist/agents/lint.js +761 -0
  12. package/dist/agents/lint.js.map +1 -0
  13. package/dist/agents/split.d.ts +113 -0
  14. package/dist/agents/split.d.ts.map +1 -0
  15. package/dist/agents/split.js +234 -0
  16. package/dist/agents/split.js.map +1 -0
  17. package/dist/cli/agents.d.ts +39 -0
  18. package/dist/cli/agents.d.ts.map +1 -0
  19. package/dist/cli/agents.js +121 -0
  20. package/dist/cli/agents.js.map +1 -0
  21. package/dist/cli/args.d.ts +1 -0
  22. package/dist/cli/args.d.ts.map +1 -1
  23. package/dist/cli/args.js.map +1 -1
  24. package/dist/cli/bin.d.ts.map +1 -1
  25. package/dist/cli/bin.js +9 -4
  26. package/dist/cli/bin.js.map +1 -1
  27. package/dist/cli/config.d.ts +20 -0
  28. package/dist/cli/config.d.ts.map +1 -1
  29. package/dist/cli/config.js +34 -1
  30. package/dist/cli/config.js.map +1 -1
  31. package/dist/cli/doctor.d.ts +66 -0
  32. package/dist/cli/doctor.d.ts.map +1 -0
  33. package/dist/cli/doctor.js +137 -0
  34. package/dist/cli/doctor.js.map +1 -0
  35. package/dist/cli/hooks.d.ts +61 -18
  36. package/dist/cli/hooks.d.ts.map +1 -1
  37. package/dist/cli/hooks.js +178 -241
  38. package/dist/cli/hooks.js.map +1 -1
  39. package/dist/cli/init.d.ts.map +1 -1
  40. package/dist/cli/init.js +8 -14
  41. package/dist/cli/init.js.map +1 -1
  42. package/dist/cli/installed.d.ts +56 -0
  43. package/dist/cli/installed.d.ts.map +1 -0
  44. package/dist/cli/installed.js +105 -0
  45. package/dist/cli/installed.js.map +1 -0
  46. package/dist/cli/lava.d.ts +31 -0
  47. package/dist/cli/lava.d.ts.map +1 -0
  48. package/dist/cli/lava.js +82 -0
  49. package/dist/cli/lava.js.map +1 -0
  50. package/dist/cli/report.d.ts +23 -0
  51. package/dist/cli/report.d.ts.map +1 -1
  52. package/dist/cli/report.js +140 -2
  53. package/dist/cli/report.js.map +1 -1
  54. package/dist/cli/run.d.ts +5 -3
  55. package/dist/cli/run.d.ts.map +1 -1
  56. package/dist/cli/run.js +2 -1
  57. package/dist/cli/run.js.map +1 -1
  58. package/dist/cli/setup.d.ts +87 -0
  59. package/dist/cli/setup.d.ts.map +1 -0
  60. package/dist/cli/setup.js +513 -0
  61. package/dist/cli/setup.js.map +1 -0
  62. package/dist/cli/shell.d.ts +11 -4
  63. package/dist/cli/shell.d.ts.map +1 -1
  64. package/dist/cli/shell.js.map +1 -1
  65. package/dist/cli/subcommands/agents.d.ts +72 -0
  66. package/dist/cli/subcommands/agents.d.ts.map +1 -0
  67. package/dist/cli/subcommands/agents.js +163 -0
  68. package/dist/cli/subcommands/agents.js.map +1 -0
  69. package/dist/cli/subcommands/doctor.d.ts +15 -0
  70. package/dist/cli/subcommands/doctor.d.ts.map +1 -0
  71. package/dist/cli/subcommands/doctor.js +43 -0
  72. package/dist/cli/subcommands/doctor.js.map +1 -0
  73. package/dist/cli/subcommands/flags.d.ts +16 -0
  74. package/dist/cli/subcommands/flags.d.ts.map +1 -1
  75. package/dist/cli/subcommands/flags.js +40 -2
  76. package/dist/cli/subcommands/flags.js.map +1 -1
  77. package/dist/cli/subcommands/hooks.d.ts.map +1 -1
  78. package/dist/cli/subcommands/hooks.js +29 -5
  79. package/dist/cli/subcommands/hooks.js.map +1 -1
  80. package/dist/cli/subcommands/init.d.ts.map +1 -1
  81. package/dist/cli/subcommands/init.js +2 -1
  82. package/dist/cli/subcommands/init.js.map +1 -1
  83. package/dist/cli/subcommands/registry.d.ts +4 -1
  84. package/dist/cli/subcommands/registry.d.ts.map +1 -1
  85. package/dist/cli/subcommands/registry.js +9 -0
  86. package/dist/cli/subcommands/registry.js.map +1 -1
  87. package/dist/cli/subcommands/setup.d.ts +23 -0
  88. package/dist/cli/subcommands/setup.d.ts.map +1 -0
  89. package/dist/cli/subcommands/setup.js +87 -0
  90. package/dist/cli/subcommands/setup.js.map +1 -0
  91. package/dist/cli/subcommands/subcommand.d.ts +1 -1
  92. package/dist/cli/subcommands/subcommand.d.ts.map +1 -1
  93. package/dist/cli/subcommands/subcommand.js.map +1 -1
  94. package/dist/cli/wizard.d.ts +72 -0
  95. package/dist/cli/wizard.d.ts.map +1 -0
  96. package/dist/cli/wizard.js +86 -0
  97. package/dist/cli/wizard.js.map +1 -0
  98. package/dist/harness/claude-code.d.ts.map +1 -1
  99. package/dist/harness/claude-code.js +10 -0
  100. package/dist/harness/claude-code.js.map +1 -1
  101. package/dist/harness/codex.d.ts.map +1 -1
  102. package/dist/harness/codex.js +2 -0
  103. package/dist/harness/codex.js.map +1 -1
  104. package/dist/harness/gemini.d.ts.map +1 -1
  105. package/dist/harness/gemini.js +1 -0
  106. package/dist/harness/gemini.js.map +1 -1
  107. package/dist/harness/grok.d.ts.map +1 -1
  108. package/dist/harness/grok.js +5 -1
  109. package/dist/harness/grok.js.map +1 -1
  110. package/dist/harness/hermes.d.ts.map +1 -1
  111. package/dist/harness/hermes.js +1 -0
  112. package/dist/harness/hermes.js.map +1 -1
  113. package/dist/harness/kilocode.d.ts.map +1 -1
  114. package/dist/harness/kilocode.js +1 -1
  115. package/dist/harness/kilocode.js.map +1 -1
  116. package/dist/harness/opencode.d.ts.map +1 -1
  117. package/dist/harness/opencode.js +10 -0
  118. package/dist/harness/opencode.js.map +1 -1
  119. package/dist/harness/profile.d.ts +49 -3
  120. package/dist/harness/profile.d.ts.map +1 -1
  121. package/dist/harness/profile.js +15 -0
  122. package/dist/harness/profile.js.map +1 -1
  123. package/dist/harness/registry.d.ts +55 -6
  124. package/dist/harness/registry.d.ts.map +1 -1
  125. package/dist/harness/registry.js +63 -6
  126. package/dist/harness/registry.js.map +1 -1
  127. package/dist/harness/snippet.d.ts +14 -1
  128. package/dist/harness/snippet.d.ts.map +1 -1
  129. package/dist/harness/snippet.js +18 -2
  130. package/dist/harness/snippet.js.map +1 -1
  131. package/dist/index.d.ts +22 -0
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +17 -0
  134. package/dist/index.js.map +1 -1
  135. package/dist/setup/recipe.d.ts +73 -0
  136. package/dist/setup/recipe.d.ts.map +1 -0
  137. package/dist/setup/recipe.js +76 -0
  138. package/dist/setup/recipe.js.map +1 -0
  139. package/dist/text/json-edit.d.ts +85 -0
  140. package/dist/text/json-edit.d.ts.map +1 -0
  141. package/dist/text/json-edit.js +290 -0
  142. package/dist/text/json-edit.js.map +1 -0
  143. package/dist/types.d.ts +0 -11
  144. package/dist/types.d.ts.map +1 -1
  145. package/dist/types.js.map +1 -1
  146. package/package.json +1 -1
@@ -8,6 +8,7 @@ import { grok } from './grok.js';
8
8
  import { hermes } from './hermes.js';
9
9
  import { kilocode } from './kilocode.js';
10
10
  import { opencode } from './opencode.js';
11
+ import { harnessLabel, HARNESS_TIERS, TIER_HONESTY } from './profile.js';
11
12
  /**
12
13
  * The registry — every harness smelt knows, one {@link HarnessProfile} each.
13
14
  *
@@ -46,18 +47,74 @@ export const HARNESS_IDS = HARNESSES.map((profile) => profile.id);
46
47
  export function harnessById(id) {
47
48
  return HARNESSES.find((profile) => profile.id === id);
48
49
  }
50
+ /**
51
+ * The tier → harnesses grouping, derived — `HarnessProfile.tier` is data, and this is
52
+ * the one fold over it.
53
+ *
54
+ * It was hand-typed in five places (the `hooks` help body, two wizard sentences, the
55
+ * README's tier table and the site's), so a harness promoted from experimental to
56
+ * verified stayed listed under the old tier in four of them and nothing failed: the
57
+ * only check was that each harness's name appeared *somewhere* in the help. Every
58
+ * rendered grouping now walks this, and `test/guards/harness-registry.test.ts` asserts
59
+ * the rendered ones agree with it — each name under its own tier clause and no other.
60
+ *
61
+ * Tier order is {@link HARNESS_TIERS} (i.e. `TIER_HONESTY`'s key order); a tier no
62
+ * profile claims yields no group, because a rendered "advisory ()" is worse than a
63
+ * tier that has stopped existing.
64
+ */
65
+ export function harnessesByTier() {
66
+ return HARNESS_TIERS.map((tier) => ({
67
+ tier,
68
+ honesty: TIER_HONESTY[tier],
69
+ harnesses: HARNESSES.filter((profile) => profile.tier === tier),
70
+ })).filter((group) => group.harnesses.length > 0);
71
+ }
72
+ /**
73
+ * Whether this harness's native schema carries the session-lifecycle events this preset
74
+ * offers — `smelt stats` on Stop, `smelt map` on SessionStart — i.e. whether it declares
75
+ * a JSON hook step with `lifecycle`.
76
+ *
77
+ * The wizard used to call these "verified-tier harnesses (Claude Code, Codex)", which
78
+ * is a tier standing in for a capability it merely correlates with: the tier is how much
79
+ * smelt is willing to *claim* about a harness, `lifecycle` is whether the harness has
80
+ * the events at all. The two sets coincide today, which is precisely why the sentence
81
+ * read correctly and why nothing could notice it was wrong — so the guard asks this
82
+ * predicate about a profile whose tier and capability *disagree*, and the mutation runner
83
+ * swaps one for the other and watches it go red.
84
+ */
85
+ export function wiresLifecycle(profile) {
86
+ return profile.install.some((step) => step.kind === 'json-hooks' && step.lifecycle);
87
+ }
88
+ /** The harnesses the stats/map toggles actually wire, in registry order. */
89
+ export function lifecycleHarnesses() {
90
+ return HARNESSES.filter(wiresLifecycle);
91
+ }
92
+ /** A list of harnesses as prose spells them — the one join, so the four lists agree. */
93
+ export function harnessNames(profiles) {
94
+ return profiles.map(harnessLabel).join(', ');
95
+ }
49
96
  /** Every JSON hook step any profile declares, in registry order. */
50
97
  function jsonHookSteps() {
51
98
  return HARNESSES.flatMap((profile) => profile.install.filter((step) => step.kind === 'json-hooks'));
52
99
  }
53
100
  /**
54
- * The two session-lifecycle hooks this preset offers, named in each harness's schema:
55
- * `smelt stats` when a turn ends, an opening `smelt map` when a session starts. Only
56
- * the harnesses whose schema carries these events wire them (`step.lifecycle`), and
57
- * `cli/hooks.ts` writes the entries under these exact keys one spelling, so the
58
- * managed-event list below cannot fall behind what the installer writes.
101
+ * The session-lifecycle hooks this preset offers, named in each harness's schema:
102
+ * `smelt stats` when a turn ends, and sharing one `SessionStart` event an opening
103
+ * `smelt map` and a lint of the repository's own instruction files. Only the harnesses
104
+ * whose schema carries these events wire them (`step.lifecycle`), and `cli/hooks.ts`
105
+ * writes the entries under these exact keys — one spelling, so the managed-event list
106
+ * below cannot fall behind what the installer writes.
107
+ *
108
+ * `map` and `lint` deliberately name the **same** event. They are two independent
109
+ * toggles under one key, which is why `cli/hooks.ts` merges their entries into one
110
+ * array rather than spreading two objects (the second would silently replace the
111
+ * first) and why a re-run tells them apart by the command each entry runs.
59
112
  */
60
- export const LIFECYCLE_EVENTS = { stats: 'Stop', map: 'SessionStart' };
113
+ export const LIFECYCLE_EVENTS = {
114
+ stats: 'Stop',
115
+ map: 'SessionStart',
116
+ lint: 'SessionStart',
117
+ };
61
118
  /**
62
119
  * The events this installer manages, across every harness's spelling of them —
63
120
  * foreign entries under them are always preserved, and events nobody claims are never
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/harness/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;A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,EAAE,CAAC;QAChC,IAAI,CAAC,KAAK;QACV,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3D,CAAC,CACH;CACF,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,GAAG,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;CACtD,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,GAAG,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,GAAG,IAAI,GAAG,CACR,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAC5B,OAAO,CAAC,OAAO;SACZ,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC;SAC5D,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5B,CACF;CACF,CAAC","sourcesContent":["import { aider } from './aider.ts';\nimport { claudeCode } from './claude-code.ts';\nimport { cline } from './cline.ts';\nimport { codex } from './codex.ts';\nimport { cursor } from './cursor.ts';\nimport { gemini } from './gemini.ts';\nimport { grok } from './grok.ts';\nimport { hermes } from './hermes.ts';\nimport { kilocode } from './kilocode.ts';\nimport { opencode } from './opencode.ts';\nimport type { HarnessId, HarnessJsonHooks, HarnessProfile } from './profile.ts';\n\n/**\n * The registry — every harness smelt knows, one {@link HarnessProfile} each.\n *\n * `Record<HarnessId, HarnessProfile>` on purpose: adding a `HarnessId` in `profile.ts`\n * without writing its profile is a compile error, so the id list and the facts cannot\n * drift. Every derived view — the `--harness` help list, the wizard's table, the\n * managed event names, the files a re-run reads its toggles back from — is computed\n * from this object, never written twice.\n *\n * This module imports **nothing from `cli/`**. That is the point: the registry used to\n * live in `cli/hooks.ts`, which imports `CLI_NAME` from `cli/args.ts`, so `args.ts`\n * could not import it back and the `--harness` help list was hand-typed five lines\n * below two lists that were correctly derived.\n *\n * Key order is meaningful: it is the order every rendered harness list uses (the help\n * text, the wizard's table, the \"Known: …\" of an unknown-harness error), so keep it\n * stable and append new harnesses at the end.\n */\nexport const HARNESS_PROFILES: Readonly<Record<HarnessId, HarnessProfile>> = {\n 'claude-code': claudeCode,\n codex,\n gemini,\n grok,\n hermes,\n cursor,\n opencode,\n cline,\n kilocode,\n aider,\n};\n\n/** Every profile, in registry order. The list every rendered table walks. */\nexport const HARNESSES: readonly HarnessProfile[] = Object.values(HARNESS_PROFILES);\n\n/** Every harness id, in registry order — the `--harness` help list, derived. */\nexport const HARNESS_IDS: readonly HarnessId[] = HARNESSES.map((profile) => profile.id);\n\n/** The profile for a harness id, or `undefined` for a string the user made up. */\nexport function harnessById(id: string): HarnessProfile | undefined {\n return HARNESSES.find((profile) => profile.id === id);\n}\n\n/** Every JSON hook step any profile declares, in registry order. */\nfunction jsonHookSteps(): readonly HarnessJsonHooks[] {\n return HARNESSES.flatMap((profile) =>\n profile.install.filter((step): step is HarnessJsonHooks => step.kind === 'json-hooks'),\n );\n}\n\n/**\n * The two session-lifecycle hooks this preset offers, named in each harness's schema:\n * `smelt stats` when a turn ends, an opening `smelt map` when a session starts. Only\n * the harnesses whose schema carries these events wire them (`step.lifecycle`), and\n * `cli/hooks.ts` writes the entries under these exact keys — one spelling, so the\n * managed-event list below cannot fall behind what the installer writes.\n */\nexport const LIFECYCLE_EVENTS = { stats: 'Stop', map: 'SessionStart' } as const;\n\n/**\n * The events this installer manages, across every harness's spelling of them —\n * foreign entries under them are always preserved, and events nobody claims are never\n * touched. Derived, so a harness that spells its pre-tool event a new way is managed\n * by existing.\n */\nexport const MANAGED_EVENTS: readonly string[] = [\n ...new Set(\n jsonHookSteps().flatMap((step) => [\n step.event,\n ...(step.lifecycle ? Object.values(LIFECYCLE_EVENTS) : []),\n ]),\n ),\n];\n\n/** The managed events that wire the PreToolUse guard, across harness spellings. */\nexport const GUARD_EVENTS: readonly string[] = [\n ...new Set(jsonHookSteps().map((step) => step.event)),\n];\n\n/** The JSON hook files a re-run reads installed toggles back from, per harness. */\nexport const JSON_HOOK_FILES: readonly string[] = [\n ...new Set(jsonHookSteps().map((step) => step.file)),\n];\n\n/** Guard-only files whose presence means the guard toggle was installed. */\nexport const GUARD_ONLY_FILES: readonly string[] = [\n ...new Set(\n HARNESSES.flatMap((profile) =>\n profile.install\n .filter((step) => step.kind === 'own-file' && step.guardOnly)\n .map((step) => step.file),\n ),\n ),\n];\n"]}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/harness/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;A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,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,GAAG,IAAI,GAAG,CACR,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAC5B,OAAO,CAAC,OAAO;SACZ,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC;SAC5D,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5B,CACF;CACF,CAAC","sourcesContent":["import { aider } from './aider.ts';\nimport { claudeCode } from './claude-code.ts';\nimport { cline } from './cline.ts';\nimport { codex } from './codex.ts';\nimport { cursor } from './cursor.ts';\nimport { gemini } from './gemini.ts';\nimport { grok } from './grok.ts';\nimport { hermes } from './hermes.ts';\nimport { kilocode } from './kilocode.ts';\nimport { opencode } from './opencode.ts';\nimport { harnessLabel, HARNESS_TIERS, TIER_HONESTY } from './profile.ts';\nimport type { HarnessId, HarnessJsonHooks, HarnessProfile, HarnessTier } from './profile.ts';\n\n/**\n * The registry — every harness smelt knows, one {@link HarnessProfile} each.\n *\n * `Record<HarnessId, HarnessProfile>` on purpose: adding a `HarnessId` in `profile.ts`\n * without writing its profile is a compile error, so the id list and the facts cannot\n * drift. Every derived view — the `--harness` help list, the wizard's table, the\n * managed event names, the files a re-run reads its toggles back from — is computed\n * from this object, never written twice.\n *\n * This module imports **nothing from `cli/`**. That is the point: the registry used to\n * live in `cli/hooks.ts`, which imports `CLI_NAME` from `cli/args.ts`, so `args.ts`\n * could not import it back and the `--harness` help list was hand-typed five lines\n * below two lists that were correctly derived.\n *\n * Key order is meaningful: it is the order every rendered harness list uses (the help\n * text, the wizard's table, the \"Known: …\" of an unknown-harness error), so keep it\n * stable and append new harnesses at the end.\n */\nexport const HARNESS_PROFILES: Readonly<Record<HarnessId, HarnessProfile>> = {\n 'claude-code': claudeCode,\n codex,\n gemini,\n grok,\n hermes,\n cursor,\n opencode,\n cline,\n kilocode,\n aider,\n};\n\n/** Every profile, in registry order. The list every rendered table walks. */\nexport const HARNESSES: readonly HarnessProfile[] = Object.values(HARNESS_PROFILES);\n\n/** Every harness id, in registry order — the `--harness` help list, derived. */\nexport const HARNESS_IDS: readonly HarnessId[] = HARNESSES.map((profile) => profile.id);\n\n/** The profile for a harness id, or `undefined` for a string the user made up. */\nexport function harnessById(id: string): HarnessProfile | undefined {\n return HARNESSES.find((profile) => profile.id === id);\n}\n\n/** One tier and the harnesses that ship at it — the row every tier table renders. */\nexport interface HarnessTierGroup {\n readonly tier: HarnessTier;\n /** That tier's one line of honesty ({@link TIER_HONESTY}), carried with the group. */\n readonly honesty: string;\n /** The profiles at this tier, in registry order. */\n readonly harnesses: readonly HarnessProfile[];\n}\n\n/**\n * The tier → harnesses grouping, derived — `HarnessProfile.tier` is data, and this is\n * the one fold over it.\n *\n * It was hand-typed in five places (the `hooks` help body, two wizard sentences, the\n * README's tier table and the site's), so a harness promoted from experimental to\n * verified stayed listed under the old tier in four of them and nothing failed: the\n * only check was that each harness's name appeared *somewhere* in the help. Every\n * rendered grouping now walks this, and `test/guards/harness-registry.test.ts` asserts\n * the rendered ones agree with it — each name under its own tier clause and no other.\n *\n * Tier order is {@link HARNESS_TIERS} (i.e. `TIER_HONESTY`'s key order); a tier no\n * profile claims yields no group, because a rendered \"advisory ()\" is worse than a\n * tier that has stopped existing.\n */\nexport function harnessesByTier(): readonly HarnessTierGroup[] {\n return HARNESS_TIERS.map((tier) => ({\n tier,\n honesty: TIER_HONESTY[tier],\n harnesses: HARNESSES.filter((profile) => profile.tier === tier),\n })).filter((group) => group.harnesses.length > 0);\n}\n\n/**\n * Whether this harness's native schema carries the session-lifecycle events this preset\n * offers — `smelt stats` on Stop, `smelt map` on SessionStart — i.e. whether it declares\n * a JSON hook step with `lifecycle`.\n *\n * The wizard used to call these \"verified-tier harnesses (Claude Code, Codex)\", which\n * is a tier standing in for a capability it merely correlates with: the tier is how much\n * smelt is willing to *claim* about a harness, `lifecycle` is whether the harness has\n * the events at all. The two sets coincide today, which is precisely why the sentence\n * read correctly and why nothing could notice it was wrong — so the guard asks this\n * predicate about a profile whose tier and capability *disagree*, and the mutation runner\n * swaps one for the other and watches it go red.\n */\nexport function wiresLifecycle(profile: HarnessProfile): boolean {\n return profile.install.some((step) => step.kind === 'json-hooks' && step.lifecycle);\n}\n\n/** The harnesses the stats/map toggles actually wire, in registry order. */\nexport function lifecycleHarnesses(): readonly HarnessProfile[] {\n return HARNESSES.filter(wiresLifecycle);\n}\n\n/** A list of harnesses as prose spells them — the one join, so the four lists agree. */\nexport function harnessNames(profiles: readonly HarnessProfile[]): string {\n return profiles.map(harnessLabel).join(', ');\n}\n\n/** Every JSON hook step any profile declares, in registry order. */\nfunction jsonHookSteps(): readonly HarnessJsonHooks[] {\n return HARNESSES.flatMap((profile) =>\n profile.install.filter((step): step is HarnessJsonHooks => step.kind === 'json-hooks'),\n );\n}\n\n/**\n * The session-lifecycle hooks this preset offers, named in each harness's schema:\n * `smelt stats` when a turn ends, and — sharing one `SessionStart` event — an opening\n * `smelt map` and a lint of the repository's own instruction files. Only the harnesses\n * whose schema carries these events wire them (`step.lifecycle`), and `cli/hooks.ts`\n * writes the entries under these exact keys — one spelling, so the managed-event list\n * below cannot fall behind what the installer writes.\n *\n * `map` and `lint` deliberately name the **same** event. They are two independent\n * toggles under one key, which is why `cli/hooks.ts` merges their entries into one\n * array rather than spreading two objects (the second would silently replace the\n * first) and why a re-run tells them apart by the command each entry runs.\n */\nexport const LIFECYCLE_EVENTS = {\n stats: 'Stop',\n map: 'SessionStart',\n lint: 'SessionStart',\n} as const;\n\n/**\n * The events this installer manages, across every harness's spelling of them —\n * foreign entries under them are always preserved, and events nobody claims are never\n * touched. Derived, so a harness that spells its pre-tool event a new way is managed\n * by existing.\n */\nexport const MANAGED_EVENTS: readonly string[] = [\n ...new Set(\n jsonHookSteps().flatMap((step) => [\n step.event,\n ...(step.lifecycle ? Object.values(LIFECYCLE_EVENTS) : []),\n ]),\n ),\n];\n\n/** The managed events that wire the PreToolUse guard, across harness spellings. */\nexport const GUARD_EVENTS: readonly string[] = [\n ...new Set(jsonHookSteps().map((step) => step.event)),\n];\n\n/** The JSON hook files a re-run reads installed toggles back from, per harness. */\nexport const JSON_HOOK_FILES: readonly string[] = [\n ...new Set(jsonHookSteps().map((step) => step.file)),\n];\n\n/** Guard-only files whose presence means the guard toggle was installed. */\nexport const GUARD_ONLY_FILES: readonly string[] = [\n ...new Set(\n HARNESSES.flatMap((profile) =>\n profile.install\n .filter((step) => step.kind === 'own-file' && step.guardOnly)\n .map((step) => step.file),\n ),\n ),\n];\n"]}
@@ -10,10 +10,23 @@ export declare const SNIPPET_START_HASH = "# smelt:hooks v1 start";
10
10
  export declare const SNIPPET_END_HASH = "# smelt:hooks v1 end";
11
11
  /** Substring that identifies a file (or JSON hook entry) as written by this installer. */
12
12
  export declare const OURS_TOKEN = "smelt:hooks";
13
+ /**
14
+ * The version stamp, as the block's second line: which release wrote these bytes.
15
+ * The markers above stay byte-stable across releases — an upgrade must find the old
16
+ * block to replace it — so the version travels *inside* the block, where replacing
17
+ * the block replaces it. `smelt doctor` reads it back with {@link snippetStampVersion};
18
+ * a block without the line was written before stamping existed, and doctor says so
19
+ * instead of guessing a version nobody recorded.
20
+ */
21
+ export declare const SNIPPET_STAMP_LINE: (version: string) => string;
22
+ /** The version a block was written by, or `undefined` when it predates stamping. */
23
+ export declare function snippetStampVersion(text: string): string | undefined;
13
24
  /**
14
25
  * The instruction snippet — belt and braces under every shim, and the *only* layer
15
26
  * for advisory harnesses. It teaches the three commands, and in particular what to do
16
27
  * after a guard deny: run the named replacement, then `smelt retrieve` per marker.
28
+ * `writtenBy` stamps the block for `smelt doctor`; omitted (legacy callers) the block
29
+ * simply carries no version line.
17
30
  */
18
- export declare function instructionSnippet(thresholdBytes: number, budgetBytes: number): string;
31
+ export declare function instructionSnippet(thresholdBytes: number, budgetBytes: number, writtenBy?: string): string;
19
32
  //# sourceMappingURL=snippet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/harness/snippet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,kCAAkC,CAAC;AAChE,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAC5D,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AAEvD,0FAA0F;AAC1F,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAsBtF","sourcesContent":["/**\n * The text every harness shares: the marker lines that bracket a block this installer\n * owns inside somebody else's file, the token that identifies a hook entry as ours,\n * and the instruction snippet itself.\n */\n\n/** Marker lines bracketing every block this installer owns inside a shared file. */\nexport const SNIPPET_START_MD = '<!-- smelt:hooks v1 start -->';\nexport const SNIPPET_END_MD = '<!-- smelt:hooks v1 end -->';\nexport const SNIPPET_START_HASH = '# smelt:hooks v1 start';\nexport const SNIPPET_END_HASH = '# smelt:hooks v1 end';\n\n/** Substring that identifies a file (or JSON hook entry) as written by this installer. */\nexport const OURS_TOKEN = 'smelt:hooks';\n\n/**\n * The instruction snippet — belt and braces under every shim, and the *only* layer\n * for advisory harnesses. It teaches the three commands, and in particular what to do\n * after a guard deny: run the named replacement, then `smelt retrieve` per marker.\n */\nexport function instructionSnippet(thresholdBytes: number, budgetBytes: number): string {\n return `${SNIPPET_START_MD}\n\n## smelt — context discipline\n\nThis project uses [smelt](https://github.com/smeltjs/smelt) to keep large tool output\nout of the context window, reversibly.\n\n- Do not read files over ${String(thresholdBytes)} bytes raw. Run\n \\`smelt <file> --budget ${String(budgetBytes)} --focus <what you are looking for>\\`\n instead (repeat \\`--focus\\` per term). Focused regions survive verbatim; everything\n else collapses into a one-line marker stating what was removed.\n- Every marker ends in \\`retrieve(\"hash\")\\`. \\`smelt retrieve <hash>\\` prints the\n exact original bytes back. Retrieve what you actually need — retrievals are counted,\n and \\`smelt stats\\` reports the honest expansion rate.\n- For orientation, \\`smelt map . --budget ${String(budgetBytes)}\\` prints a ranked\n symbol map of the repository.\n- If a smelt guard hook denies a raw read, run the exact replacement command named in\n the denial, then \\`smelt retrieve\\` any marker you need expanded.\n\n${SNIPPET_END_MD}\n`;\n}\n"]}
1
+ {"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/harness/snippet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,kCAAkC,CAAC;AAChE,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAC5D,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AAEvD,0FAA0F;AAC1F,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,MACO,CAAC;AAE7D,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAuBR","sourcesContent":["/**\n * The text every harness shares: the marker lines that bracket a block this installer\n * owns inside somebody else's file, the token that identifies a hook entry as ours,\n * and the instruction snippet itself.\n */\n\n/** Marker lines bracketing every block this installer owns inside a shared file. */\nexport const SNIPPET_START_MD = '<!-- smelt:hooks v1 start -->';\nexport const SNIPPET_END_MD = '<!-- smelt:hooks v1 end -->';\nexport const SNIPPET_START_HASH = '# smelt:hooks v1 start';\nexport const SNIPPET_END_HASH = '# smelt:hooks v1 end';\n\n/** Substring that identifies a file (or JSON hook entry) as written by this installer. */\nexport const OURS_TOKEN = 'smelt:hooks';\n\n/**\n * The version stamp, as the block's second line: which release wrote these bytes.\n * The markers above stay byte-stable across releases — an upgrade must find the old\n * block to replace it — so the version travels *inside* the block, where replacing\n * the block replaces it. `smelt doctor` reads it back with {@link snippetStampVersion};\n * a block without the line was written before stamping existed, and doctor says so\n * instead of guessing a version nobody recorded.\n */\nexport const SNIPPET_STAMP_LINE = (version: string): string =>\n `<!-- smelt:hooks written-by @smeltjs/core ${version} -->`;\n\n/** The version a block was written by, or `undefined` when it predates stamping. */\nexport function snippetStampVersion(text: string): string | undefined {\n return /<!-- smelt:hooks written-by @smeltjs\\/core (\\d+\\.\\d+\\.\\d+)(?:[-+][^>]*)? -->/u.exec(\n text,\n )?.[1];\n}\n\n/**\n * The instruction snippet — belt and braces under every shim, and the *only* layer\n * for advisory harnesses. It teaches the three commands, and in particular what to do\n * after a guard deny: run the named replacement, then `smelt retrieve` per marker.\n * `writtenBy` stamps the block for `smelt doctor`; omitted (legacy callers) the block\n * simply carries no version line.\n */\nexport function instructionSnippet(\n thresholdBytes: number,\n budgetBytes: number,\n writtenBy?: string,\n): string {\n const stamp = writtenBy === undefined ? '' : `${SNIPPET_STAMP_LINE(writtenBy)}\\n`;\n return `${SNIPPET_START_MD}\n${stamp}\n## smelt — context discipline\n\nThis project uses [smelt](https://github.com/smeltjs/smelt) to keep large tool output\nout of the context window, reversibly.\n\n- Do not read files over ${String(thresholdBytes)} bytes raw. Run\n \\`smelt <file> --budget ${String(budgetBytes)} --focus <what you are looking for>\\`\n instead (repeat \\`--focus\\` per term). Focused regions survive verbatim; everything\n else collapses into a one-line marker stating what was removed.\n- Every marker ends in \\`retrieve(\"hash\")\\`. \\`smelt retrieve <hash>\\` prints the\n exact original bytes back. Retrieve what you actually need — retrievals are counted,\n and \\`smelt stats\\` reports the honest expansion rate.\n- For orientation, \\`smelt map . --budget ${String(budgetBytes)}\\` prints a ranked\n symbol map of the repository.\n- If a smelt guard hook denies a raw read, run the exact replacement command named in\n the denial, then \\`smelt retrieve\\` any marker you need expanded.\n\n${SNIPPET_END_MD}\n`;\n}\n"]}
@@ -10,14 +10,30 @@ export const SNIPPET_START_HASH = '# smelt:hooks v1 start';
10
10
  export const SNIPPET_END_HASH = '# smelt:hooks v1 end';
11
11
  /** Substring that identifies a file (or JSON hook entry) as written by this installer. */
12
12
  export const OURS_TOKEN = 'smelt:hooks';
13
+ /**
14
+ * The version stamp, as the block's second line: which release wrote these bytes.
15
+ * The markers above stay byte-stable across releases — an upgrade must find the old
16
+ * block to replace it — so the version travels *inside* the block, where replacing
17
+ * the block replaces it. `smelt doctor` reads it back with {@link snippetStampVersion};
18
+ * a block without the line was written before stamping existed, and doctor says so
19
+ * instead of guessing a version nobody recorded.
20
+ */
21
+ export const SNIPPET_STAMP_LINE = (version) => `<!-- smelt:hooks written-by @smeltjs/core ${version} -->`;
22
+ /** The version a block was written by, or `undefined` when it predates stamping. */
23
+ export function snippetStampVersion(text) {
24
+ return /<!-- smelt:hooks written-by @smeltjs\/core (\d+\.\d+\.\d+)(?:[-+][^>]*)? -->/u.exec(text)?.[1];
25
+ }
13
26
  /**
14
27
  * The instruction snippet — belt and braces under every shim, and the *only* layer
15
28
  * for advisory harnesses. It teaches the three commands, and in particular what to do
16
29
  * after a guard deny: run the named replacement, then `smelt retrieve` per marker.
30
+ * `writtenBy` stamps the block for `smelt doctor`; omitted (legacy callers) the block
31
+ * simply carries no version line.
17
32
  */
18
- export function instructionSnippet(thresholdBytes, budgetBytes) {
33
+ export function instructionSnippet(thresholdBytes, budgetBytes, writtenBy) {
34
+ const stamp = writtenBy === undefined ? '' : `${SNIPPET_STAMP_LINE(writtenBy)}\n`;
19
35
  return `${SNIPPET_START_MD}
20
-
36
+ ${stamp}
21
37
  ## smelt — context discipline
22
38
 
23
39
  This project uses [smelt](https://github.com/smeltjs/smelt) to keep large tool output
@@ -1 +1 @@
1
- {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/harness/snippet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAC3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEvD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,cAAsB,EAAE,WAAmB;IAC5E,OAAO,GAAG,gBAAgB;;;;;;;2BAOD,MAAM,CAAC,cAAc,CAAC;4BACrB,MAAM,CAAC,WAAW,CAAC;;;;;;4CAMH,MAAM,CAAC,WAAW,CAAC;;;;;EAK7D,cAAc;CACf,CAAC;AACF,CAAC","sourcesContent":["/**\n * The text every harness shares: the marker lines that bracket a block this installer\n * owns inside somebody else's file, the token that identifies a hook entry as ours,\n * and the instruction snippet itself.\n */\n\n/** Marker lines bracketing every block this installer owns inside a shared file. */\nexport const SNIPPET_START_MD = '<!-- smelt:hooks v1 start -->';\nexport const SNIPPET_END_MD = '<!-- smelt:hooks v1 end -->';\nexport const SNIPPET_START_HASH = '# smelt:hooks v1 start';\nexport const SNIPPET_END_HASH = '# smelt:hooks v1 end';\n\n/** Substring that identifies a file (or JSON hook entry) as written by this installer. */\nexport const OURS_TOKEN = 'smelt:hooks';\n\n/**\n * The instruction snippet — belt and braces under every shim, and the *only* layer\n * for advisory harnesses. It teaches the three commands, and in particular what to do\n * after a guard deny: run the named replacement, then `smelt retrieve` per marker.\n */\nexport function instructionSnippet(thresholdBytes: number, budgetBytes: number): string {\n return `${SNIPPET_START_MD}\n\n## smelt — context discipline\n\nThis project uses [smelt](https://github.com/smeltjs/smelt) to keep large tool output\nout of the context window, reversibly.\n\n- Do not read files over ${String(thresholdBytes)} bytes raw. Run\n \\`smelt <file> --budget ${String(budgetBytes)} --focus <what you are looking for>\\`\n instead (repeat \\`--focus\\` per term). Focused regions survive verbatim; everything\n else collapses into a one-line marker stating what was removed.\n- Every marker ends in \\`retrieve(\"hash\")\\`. \\`smelt retrieve <hash>\\` prints the\n exact original bytes back. Retrieve what you actually need — retrievals are counted,\n and \\`smelt stats\\` reports the honest expansion rate.\n- For orientation, \\`smelt map . --budget ${String(budgetBytes)}\\` prints a ranked\n symbol map of the repository.\n- If a smelt guard hook denies a raw read, run the exact replacement command named in\n the denial, then \\`smelt retrieve\\` any marker you need expanded.\n\n${SNIPPET_END_MD}\n`;\n}\n"]}
1
+ {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/harness/snippet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAC3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEvD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAU,EAAE,CAC5D,6CAA6C,OAAO,MAAM,CAAC;AAE7D,oFAAoF;AACpF,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,+EAA+E,CAAC,IAAI,CACzF,IAAI,CACL,EAAE,CAAC,CAAC,CAAC,CAAC;AACT,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,cAAsB,EACtB,WAAmB,EACnB,SAAkB;IAElB,MAAM,KAAK,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC;IAClF,OAAO,GAAG,gBAAgB;EAC1B,KAAK;;;;;;2BAMoB,MAAM,CAAC,cAAc,CAAC;4BACrB,MAAM,CAAC,WAAW,CAAC;;;;;;4CAMH,MAAM,CAAC,WAAW,CAAC;;;;;EAK7D,cAAc;CACf,CAAC;AACF,CAAC","sourcesContent":["/**\n * The text every harness shares: the marker lines that bracket a block this installer\n * owns inside somebody else's file, the token that identifies a hook entry as ours,\n * and the instruction snippet itself.\n */\n\n/** Marker lines bracketing every block this installer owns inside a shared file. */\nexport const SNIPPET_START_MD = '<!-- smelt:hooks v1 start -->';\nexport const SNIPPET_END_MD = '<!-- smelt:hooks v1 end -->';\nexport const SNIPPET_START_HASH = '# smelt:hooks v1 start';\nexport const SNIPPET_END_HASH = '# smelt:hooks v1 end';\n\n/** Substring that identifies a file (or JSON hook entry) as written by this installer. */\nexport const OURS_TOKEN = 'smelt:hooks';\n\n/**\n * The version stamp, as the block's second line: which release wrote these bytes.\n * The markers above stay byte-stable across releases — an upgrade must find the old\n * block to replace it — so the version travels *inside* the block, where replacing\n * the block replaces it. `smelt doctor` reads it back with {@link snippetStampVersion};\n * a block without the line was written before stamping existed, and doctor says so\n * instead of guessing a version nobody recorded.\n */\nexport const SNIPPET_STAMP_LINE = (version: string): string =>\n `<!-- smelt:hooks written-by @smeltjs/core ${version} -->`;\n\n/** The version a block was written by, or `undefined` when it predates stamping. */\nexport function snippetStampVersion(text: string): string | undefined {\n return /<!-- smelt:hooks written-by @smeltjs\\/core (\\d+\\.\\d+\\.\\d+)(?:[-+][^>]*)? -->/u.exec(\n text,\n )?.[1];\n}\n\n/**\n * The instruction snippet — belt and braces under every shim, and the *only* layer\n * for advisory harnesses. It teaches the three commands, and in particular what to do\n * after a guard deny: run the named replacement, then `smelt retrieve` per marker.\n * `writtenBy` stamps the block for `smelt doctor`; omitted (legacy callers) the block\n * simply carries no version line.\n */\nexport function instructionSnippet(\n thresholdBytes: number,\n budgetBytes: number,\n writtenBy?: string,\n): string {\n const stamp = writtenBy === undefined ? '' : `${SNIPPET_STAMP_LINE(writtenBy)}\\n`;\n return `${SNIPPET_START_MD}\n${stamp}\n## smelt — context discipline\n\nThis project uses [smelt](https://github.com/smeltjs/smelt) to keep large tool output\nout of the context window, reversibly.\n\n- Do not read files over ${String(thresholdBytes)} bytes raw. Run\n \\`smelt <file> --budget ${String(budgetBytes)} --focus <what you are looking for>\\`\n instead (repeat \\`--focus\\` per term). Focused regions survive verbatim; everything\n else collapses into a one-line marker stating what was removed.\n- Every marker ends in \\`retrieve(\"hash\")\\`. \\`smelt retrieve <hash>\\` prints the\n exact original bytes back. Retrieve what you actually need — retrievals are counted,\n and \\`smelt stats\\` reports the honest expansion rate.\n- For orientation, \\`smelt map . --budget ${String(budgetBytes)}\\` prints a ranked\n symbol map of the repository.\n- If a smelt guard hook denies a raw read, run the exact replacement command named in\n the denial, then \\`smelt retrieve\\` any marker you need expanded.\n\n${SNIPPET_END_MD}\n`;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -48,10 +48,32 @@ export { CONFIG_FILE_NAME, CONFIG_VERSION, configuredStore, findConfigFile, load
48
48
  export type { ConfiguredStore, LoadedConfig, SmeltConfig, SmeltConfigStore } from './cli/config.ts';
49
49
  export { MEASURE_STUB_FILE, measureStubSource, RERANK_STUB_FILE, rerankStubSource, runInit, } from './cli/init.ts';
50
50
  export type { InitIo } from './cli/init.ts';
51
+ export { runSetup } from './cli/setup.ts';
52
+ export type { SetupCheck, SetupFileAction, SetupIo, SetupOptions, SetupReceipt, } from './cli/setup.ts';
53
+ export { runDoctor } from './cli/doctor.ts';
54
+ export type { DoctorBlock, DoctorConfig, DoctorIo, DoctorMcp, DoctorOptions, DoctorReceipt, } from './cli/doctor.ts';
51
55
  export { retrieveStats } from './stats.ts';
52
56
  export type { RawRetrieveCounters } from './stats.ts';
57
+ /**
58
+ * The SetupRecipe: the one true way to put smelt on a machine, as data. Public for the
59
+ * same reason the harness views are — something outside this package renders it (the
60
+ * site's fact generator), and the docs and skill are pinned to it rather than retyping
61
+ * it. See `src/setup/recipe.ts`.
62
+ */
63
+ export { SETUP_RECIPE, SETUP_STEPS } from './setup/recipe.ts';
64
+ export type { SetupRecipe, SetupStep } from './setup/recipe.ts';
53
65
  export { LANGUAGE_PROFILES, profileFor, profileForPath, structuralLanguages, } from './lang/registry.ts';
54
66
  export type { LanguageProfile, LanguageStructure, RepoMapFacts } from './lang/profile.ts';
67
+ /**
68
+ * The harness registry's rendered views. Public for the same reason the ops seam is:
69
+ * something outside this package renders them — the site's `facts.json` generator —
70
+ * and the alternative is a second copy of the tier table typed into a React component,
71
+ * which is exactly the drift `harnessesByTier()` exists to end.
72
+ */
73
+ export { harnessesByTier, harnessNames, HARNESSES, HARNESS_IDS } from './harness/registry.ts';
74
+ export type { HarnessTierGroup } from './harness/registry.ts';
75
+ export { harnessLabel, HARNESS_TIERS, TIER_HONESTY } from './harness/profile.ts';
76
+ export type { HarnessId, HarnessTier } from './harness/profile.ts';
55
77
  export { resolveRun } from './cli/subcommands/smelt.ts';
56
78
  export type { ResolvedRun } from './cli/subcommands/smelt.ts';
57
79
  export { REPO_MAP_FOCUS_RULE } from './repomap/map.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;;;;GAQG;AAEH,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AACxD,OAAO,EACL,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,c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,EACf,aAAa,EACb,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import type { ApplyOptions, MarkerBuilder, MarkerInfo } from './apply.ts';\n\n/**\n * The public surface: a barrel over the modules that hold the reasoning.\n *\n * `createSmelter()` itself lives in `./smelter.ts` so that nothing inside `src/` has\n * to import this file to build a smelter — the CLI's default verb does exactly that,\n * and a barrel that imports the CLI which imports the barrel is a cycle whose only\n * symptom is a registry evaluating to `undefined` in whichever module the loader\n * entered first. Every name is re-exported here, so consumers see no difference.\n */\n\nexport type { ApplyOptions, MarkerBuilder, MarkerInfo };\nexport {\n applyPlan,\n defaultMarker,\n MARKER_FORMAT_VERSION,\n markerPricing,\n reconstruct,\n} from './apply.ts';\nexport { detectLanguage, SUPPORTED_LANGUAGES } from './detect.ts';\nexport * from './errors.ts';\nexport { contentHash, HASH_LENGTH } from './hash.ts';\nexport {\n ALLOWED_NODE_BUILTINS,\n ALLOWED_PACKAGES,\n ALLOWED_URL_SCHEMES,\n assertLocalResource,\n FORBIDDEN_GLOBALS,\n FORBIDDEN_NODE_MODULES,\n FORBIDDEN_PACKAGES,\n} from './net/policy.ts';\nexport type { LocalResource } from './net/policy.ts';\nexport { clearGrammarCache, grammarPath, loadGrammar, WASM_BY_LANGUAGE } from './plan/grammar.ts';\nexport { AUTO_PLANNER_ID, AutoPlanner, planAuto } from './plan/auto.ts';\nexport type { AutoPlannerOptions } from './plan/auto.ts';\nexport { LEXICAL_PLANNER_ID, LexicalPlanner, planLexical } from './plan/lexical.ts';\nexport type { LexicalPlannerOptions } from './plan/lexical.ts';\nexport { DEFAULT_STRATEGY, isStrategy, PLANNERS, STRATEGIES } from './plan/planners.ts';\nexport type { PlannerFactoryOptions } from './plan/planners.ts';\nexport {\n isStructuralLanguage,\n planStructural,\n STRUCTURAL_LANGUAGES,\n STRUCTURAL_PLANNER_ID,\n StructuralPlanner,\n} from './plan/structural.ts';\nexport type { StructuralLanguage, StructuralPlannerOptions } from './plan/structural.ts';\nexport { createRetrieveTool, RETRIEVE_TOOL_NAME } from './retrieve.ts';\nexport { unconfiguredDistillStage, unconfiguredRerankStage } from './stages.ts';\nexport { MemoryElisionStore } from './store.ts';\nexport {\n DIRECTORY_STORE_FORMAT,\n DIRECTORY_STORE_VERSION,\n DirectoryElisionStore,\n} from './store-dir.ts';\nexport type { DirectoryElisionStoreOptions } from './store-dir.ts';\nexport * from './types.ts';\nexport {\n CLI_JSON_FORMAT,\n CLI_NAME,\n cliUsage,\n EXIT,\n formatReport,\n parseSmeltArgs,\n runCli,\n} from './cli/run.ts';\nexport type { AnswerStream, CliIo, CliJsonEnvelope, SmeltInvocation } from './cli/run.ts';\nexport {\n ANTHROPIC_PROMPT_CACHE_FACTS,\n CACHE_BREAKER_RULES,\n detectCacheBreakers,\n findPrefixDivergence,\n} from './cache/prefix.ts';\nexport type {\n CacheWarning,\n PrefixDivergence,\n PromptStructure,\n PromptTool,\n} from './cache/prefix.ts';\nexport { MARKER_LINE_COMMENT_LEADERS, markerForLanguage } from './apply.ts';\nexport {\n buildRepoMap,\n DEFAULT_REPO_IGNORE,\n REPO_MAP_CACHE_CORRUPT_RULE,\n REPO_MAP_ID,\n REPO_MAP_PATH_ONLY_RULE,\n REPO_MAP_RANKED_RULE,\n REPO_MAP_UNREFERENCED_RULE,\n} from './repomap/map.ts';\nexport type {\n RepoMap,\n RepoMapCacheCounts,\n RepoMapEntry,\n RepoMapOptions,\n RepoMapPathEntry,\n RepoMapReason,\n RepoMapWarning,\n} from './repomap/map.ts';\nexport { PAGERANK_DAMPING, PAGERANK_ITERATIONS, rankDefinitions } from './repomap/rank.ts';\nexport type { FileTagsEntry, RankedDefinition } from './repomap/rank.ts';\nexport { extractTags } from './repomap/tags.ts';\nexport type { DefinitionTag, FileTags, ReferenceTag } from './repomap/tags.ts';\nexport { TAGS_CACHE_FORMAT, TAGS_CACHE_VERSION, tagsCacheKey } from './repomap/cache.ts';\nexport { nodeFsReader } from './repomap/reader.ts';\nexport type { DirEntry, FileStat, RepoReader } from './repomap/reader.ts';\nexport {\n CONFIG_FILE_NAME,\n CONFIG_VERSION,\n configuredStore,\n findConfigFile,\n loadNearestConfig,\n parseConfig,\n renderConfig,\n resolveStorePath,\n} from './cli/config.ts';\nexport type { ConfiguredStore, LoadedConfig, SmeltConfig, SmeltConfigStore } from './cli/config.ts';\nexport {\n MEASURE_STUB_FILE,\n measureStubSource,\n RERANK_STUB_FILE,\n rerankStubSource,\n runInit,\n} from './cli/init.ts';\nexport type { InitIo } from './cli/init.ts';\nexport { retrieveStats } from './stats.ts';\nexport type { RawRetrieveCounters } from './stats.ts';\nexport {\n LANGUAGE_PROFILES,\n profileFor,\n profileForPath,\n structuralLanguages,\n} from './lang/registry.ts';\nexport type { LanguageProfile, LanguageStructure, RepoMapFacts } from './lang/profile.ts';\nexport { resolveRun } from './cli/subcommands/smelt.ts';\nexport type { ResolvedRun } from './cli/subcommands/smelt.ts';\nexport { REPO_MAP_FOCUS_RULE } from './repomap/map.ts';\nexport { CLI_MAP_JSON_FORMAT, formatMapReport, resolveMapRun } from './cli/run.ts';\nexport type { CliInvocation, CliMapJsonEnvelope, MapInvocation } from './cli/run.ts';\nexport type { MapReportInput } from './cli/report.ts';\nexport type { ResolvedMapRun } from './cli/subcommands/map.ts';\n\n/**\n * The operations seam — the four verbs and the laws their inputs must satisfy, below\n * every front door. `@smeltjs/mcp` consumes these as an ordinary dependency, so the\n * `smelt` CLI and the MCP tools run the same middle instead of two copies of it. See\n * `src/ops/index.ts` for what belongs here and what stays in an adapter.\n */\nexport {\n budgetFault,\n budgetMalformed,\n budgetRequired,\n mapTree,\n openStore,\n readBlob,\n readCounters,\n readTree,\n resolveStrategy,\n retrieveBytes,\n smeltBlob,\n} from './ops/index.ts';\nexport type {\n BudgetFault,\n BudgetNaming,\n MapTreeOp,\n ReadCountersOp,\n ResolvedStrategy,\n RetrieveBytesOp,\n Ruling,\n SmeltBlobOp,\n SmeltBlobOutcome,\n StrategySource,\n TreeNaming,\n} from './ops/index.ts';\n\n/**\n * Which planner a smelter uses, named by string. The names, their factories, and this\n * type all come from the one {@link PLANNERS} registry in `src/plan/planners.ts`, so\n * the CLI's validation and help text cannot drift from what `createSmelter` builds.\n */\nexport type { Strategy } from './plan/planners.ts';\n\nexport { createSmelter } from './smelter.ts';\nexport type { Smelter, SmelterConfig, SmeltCallOptions } from './smelter.ts';\n"]}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;;;;GAQG;AAEH,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AACxD,OAAO,EACL,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClE,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,MAAM,iBA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AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACnF,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;;GAKG;AACH,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,OAAO,EACP,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,aAAa,EACb,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import type { ApplyOptions, MarkerBuilder, MarkerInfo } from './apply.ts';\n\n/**\n * The public surface: a barrel over the modules that hold the reasoning.\n *\n * `createSmelter()` itself lives in `./smelter.ts` so that nothing inside `src/` has\n * to import this file to build a smelter — the CLI's default verb does exactly that,\n * and a barrel that imports the CLI which imports the barrel is a cycle whose only\n * symptom is a registry evaluating to `undefined` in whichever module the loader\n * entered first. Every name is re-exported here, so consumers see no difference.\n */\n\nexport type { ApplyOptions, MarkerBuilder, MarkerInfo };\nexport {\n applyPlan,\n defaultMarker,\n MARKER_FORMAT_VERSION,\n markerPricing,\n reconstruct,\n} from './apply.ts';\nexport { detectLanguage, SUPPORTED_LANGUAGES } from './detect.ts';\nexport * from './errors.ts';\nexport { contentHash, HASH_LENGTH } from './hash.ts';\nexport {\n ALLOWED_NODE_BUILTINS,\n ALLOWED_PACKAGES,\n ALLOWED_URL_SCHEMES,\n assertLocalResource,\n FORBIDDEN_GLOBALS,\n FORBIDDEN_NODE_MODULES,\n FORBIDDEN_PACKAGES,\n} from './net/policy.ts';\nexport type { LocalResource } from './net/policy.ts';\nexport { clearGrammarCache, grammarPath, loadGrammar, WASM_BY_LANGUAGE } from './plan/grammar.ts';\nexport { AUTO_PLANNER_ID, AutoPlanner, planAuto } from './plan/auto.ts';\nexport type { AutoPlannerOptions } from './plan/auto.ts';\nexport { LEXICAL_PLANNER_ID, LexicalPlanner, planLexical } from './plan/lexical.ts';\nexport type { LexicalPlannerOptions } from './plan/lexical.ts';\nexport { DEFAULT_STRATEGY, isStrategy, PLANNERS, STRATEGIES } from './plan/planners.ts';\nexport type { PlannerFactoryOptions } from './plan/planners.ts';\nexport {\n isStructuralLanguage,\n planStructural,\n STRUCTURAL_LANGUAGES,\n STRUCTURAL_PLANNER_ID,\n StructuralPlanner,\n} from './plan/structural.ts';\nexport type { StructuralLanguage, StructuralPlannerOptions } from './plan/structural.ts';\nexport { createRetrieveTool, RETRIEVE_TOOL_NAME } from './retrieve.ts';\nexport { unconfiguredDistillStage, unconfiguredRerankStage } from './stages.ts';\nexport { MemoryElisionStore } from './store.ts';\nexport {\n DIRECTORY_STORE_FORMAT,\n DIRECTORY_STORE_VERSION,\n DirectoryElisionStore,\n} from './store-dir.ts';\nexport type { DirectoryElisionStoreOptions } from './store-dir.ts';\nexport * from './types.ts';\nexport {\n CLI_JSON_FORMAT,\n CLI_NAME,\n cliUsage,\n EXIT,\n formatReport,\n parseSmeltArgs,\n runCli,\n} from './cli/run.ts';\nexport type { AnswerStream, CliIo, CliJsonEnvelope, SmeltInvocation } from './cli/run.ts';\nexport {\n ANTHROPIC_PROMPT_CACHE_FACTS,\n CACHE_BREAKER_RULES,\n detectCacheBreakers,\n findPrefixDivergence,\n} from './cache/prefix.ts';\nexport type {\n CacheWarning,\n PrefixDivergence,\n PromptStructure,\n PromptTool,\n} from './cache/prefix.ts';\nexport { MARKER_LINE_COMMENT_LEADERS, markerForLanguage } from './apply.ts';\nexport {\n buildRepoMap,\n DEFAULT_REPO_IGNORE,\n REPO_MAP_CACHE_CORRUPT_RULE,\n REPO_MAP_ID,\n REPO_MAP_PATH_ONLY_RULE,\n REPO_MAP_RANKED_RULE,\n REPO_MAP_UNREFERENCED_RULE,\n} from './repomap/map.ts';\nexport type {\n RepoMap,\n RepoMapCacheCounts,\n RepoMapEntry,\n RepoMapOptions,\n RepoMapPathEntry,\n RepoMapReason,\n RepoMapWarning,\n} from './repomap/map.ts';\nexport { PAGERANK_DAMPING, PAGERANK_ITERATIONS, rankDefinitions } from './repomap/rank.ts';\nexport type { FileTagsEntry, RankedDefinition } from './repomap/rank.ts';\nexport { extractTags } from './repomap/tags.ts';\nexport type { DefinitionTag, FileTags, ReferenceTag } from './repomap/tags.ts';\nexport { TAGS_CACHE_FORMAT, TAGS_CACHE_VERSION, tagsCacheKey } from './repomap/cache.ts';\nexport { nodeFsReader } from './repomap/reader.ts';\nexport type { DirEntry, FileStat, RepoReader } from './repomap/reader.ts';\nexport {\n CONFIG_FILE_NAME,\n CONFIG_VERSION,\n configuredStore,\n findConfigFile,\n loadNearestConfig,\n parseConfig,\n renderConfig,\n resolveStorePath,\n} from './cli/config.ts';\nexport type { ConfiguredStore, LoadedConfig, SmeltConfig, SmeltConfigStore } from './cli/config.ts';\nexport {\n MEASURE_STUB_FILE,\n measureStubSource,\n RERANK_STUB_FILE,\n rerankStubSource,\n runInit,\n} from './cli/init.ts';\nexport type { InitIo } from './cli/init.ts';\nexport { runSetup } from './cli/setup.ts';\nexport type {\n SetupCheck,\n SetupFileAction,\n SetupIo,\n SetupOptions,\n SetupReceipt,\n} from './cli/setup.ts';\nexport { runDoctor } from './cli/doctor.ts';\nexport type {\n DoctorBlock,\n DoctorConfig,\n DoctorIo,\n DoctorMcp,\n DoctorOptions,\n DoctorReceipt,\n} from './cli/doctor.ts';\nexport { retrieveStats } from './stats.ts';\nexport type { RawRetrieveCounters } from './stats.ts';\n\n/**\n * The SetupRecipe: the one true way to put smelt on a machine, as data. Public for the\n * same reason the harness views are — something outside this package renders it (the\n * site's fact generator), and the docs and skill are pinned to it rather than retyping\n * it. See `src/setup/recipe.ts`.\n */\nexport { SETUP_RECIPE, SETUP_STEPS } from './setup/recipe.ts';\nexport type { SetupRecipe, SetupStep } from './setup/recipe.ts';\nexport {\n LANGUAGE_PROFILES,\n profileFor,\n profileForPath,\n structuralLanguages,\n} from './lang/registry.ts';\nexport type { LanguageProfile, LanguageStructure, RepoMapFacts } from './lang/profile.ts';\n/**\n * The harness registry's rendered views. Public for the same reason the ops seam is:\n * something outside this package renders them — the site's `facts.json` generator —\n * and the alternative is a second copy of the tier table typed into a React component,\n * which is exactly the drift `harnessesByTier()` exists to end.\n */\nexport { harnessesByTier, harnessNames, HARNESSES, HARNESS_IDS } from './harness/registry.ts';\nexport type { HarnessTierGroup } from './harness/registry.ts';\nexport { harnessLabel, HARNESS_TIERS, TIER_HONESTY } from './harness/profile.ts';\nexport type { HarnessId, HarnessTier } from './harness/profile.ts';\nexport { resolveRun } from './cli/subcommands/smelt.ts';\nexport type { ResolvedRun } from './cli/subcommands/smelt.ts';\nexport { REPO_MAP_FOCUS_RULE } from './repomap/map.ts';\nexport { CLI_MAP_JSON_FORMAT, formatMapReport, resolveMapRun } from './cli/run.ts';\nexport type { CliInvocation, CliMapJsonEnvelope, MapInvocation } from './cli/run.ts';\nexport type { MapReportInput } from './cli/report.ts';\nexport type { ResolvedMapRun } from './cli/subcommands/map.ts';\n\n/**\n * The operations seam — the four verbs and the laws their inputs must satisfy, below\n * every front door. `@smeltjs/mcp` consumes these as an ordinary dependency, so the\n * `smelt` CLI and the MCP tools run the same middle instead of two copies of it. See\n * `src/ops/index.ts` for what belongs here and what stays in an adapter.\n */\nexport {\n budgetFault,\n budgetMalformed,\n budgetRequired,\n mapTree,\n openStore,\n readBlob,\n readCounters,\n readTree,\n resolveStrategy,\n retrieveBytes,\n smeltBlob,\n} from './ops/index.ts';\nexport type {\n BudgetFault,\n BudgetNaming,\n MapTreeOp,\n ReadCountersOp,\n ResolvedStrategy,\n RetrieveBytesOp,\n Ruling,\n SmeltBlobOp,\n SmeltBlobOutcome,\n StrategySource,\n TreeNaming,\n} from './ops/index.ts';\n\n/**\n * Which planner a smelter uses, named by string. The names, their factories, and this\n * type all come from the one {@link PLANNERS} registry in `src/plan/planners.ts`, so\n * the CLI's validation and help text cannot drift from what `createSmelter` builds.\n */\nexport type { Strategy } from './plan/planners.ts';\n\nexport { createSmelter } from './smelter.ts';\nexport type { Smelter, SmelterConfig, SmeltCallOptions } from './smelter.ts';\n"]}
package/dist/index.js CHANGED
@@ -23,8 +23,25 @@ export { TAGS_CACHE_FORMAT, TAGS_CACHE_VERSION, tagsCacheKey } from './repomap/c
23
23
  export { nodeFsReader } from './repomap/reader.js';
24
24
  export { CONFIG_FILE_NAME, CONFIG_VERSION, configuredStore, findConfigFile, loadNearestConfig, parseConfig, renderConfig, resolveStorePath, } from './cli/config.js';
25
25
  export { MEASURE_STUB_FILE, measureStubSource, RERANK_STUB_FILE, rerankStubSource, runInit, } from './cli/init.js';
26
+ export { runSetup } from './cli/setup.js';
27
+ export { runDoctor } from './cli/doctor.js';
26
28
  export { retrieveStats } from './stats.js';
29
+ /**
30
+ * The SetupRecipe: the one true way to put smelt on a machine, as data. Public for the
31
+ * same reason the harness views are — something outside this package renders it (the
32
+ * site's fact generator), and the docs and skill are pinned to it rather than retyping
33
+ * it. See `src/setup/recipe.ts`.
34
+ */
35
+ export { SETUP_RECIPE, SETUP_STEPS } from './setup/recipe.js';
27
36
  export { LANGUAGE_PROFILES, profileFor, profileForPath, structuralLanguages, } from './lang/registry.js';
37
+ /**
38
+ * The harness registry's rendered views. Public for the same reason the ops seam is:
39
+ * something outside this package renders them — the site's `facts.json` generator —
40
+ * and the alternative is a second copy of the tier table typed into a React component,
41
+ * which is exactly the drift `harnessesByTier()` exists to end.
42
+ */
43
+ export { harnessesByTier, harnessNames, HARNESSES, HARNESS_IDS } from './harness/registry.js';
44
+ export { harnessLabel, HARNESS_TIERS, TIER_HONESTY } from './harness/profile.js';
28
45
  export { resolveRun } from './cli/subcommands/smelt.js';
29
46
  export { REPO_MAP_FOCUS_RULE } from './repomap/map.js';
30
47
  export { CLI_MAP_JSON_FORMAT, formatMapReport, resolveMapRun } from './cli/run.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClE,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,oB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B,EAChB,OAAO,GACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKnF;;;;;GAKG;AACH,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,OAAO,EACP,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,aAAa,EACb,SAAS,GACV,MAAM,gBAAgB,CAAC;AAsBxB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import type { ApplyOptions, MarkerBuilder, MarkerInfo } from './apply.ts';\n\n/**\n * The public surface: a barrel over the modules that hold the reasoning.\n *\n * `createSmelter()` itself lives in `./smelter.ts` so that nothing inside `src/` has\n * to import this file to build a smelter — the CLI's default verb does exactly that,\n * and a barrel that imports the CLI which imports the barrel is a cycle whose only\n * symptom is a registry evaluating to `undefined` in whichever module the loader\n * entered first. Every name is re-exported here, so consumers see no difference.\n */\n\nexport type { ApplyOptions, MarkerBuilder, MarkerInfo };\nexport {\n applyPlan,\n defaultMarker,\n MARKER_FORMAT_VERSION,\n markerPricing,\n reconstruct,\n} from './apply.ts';\nexport { detectLanguage, SUPPORTED_LANGUAGES } from './detect.ts';\nexport * from './errors.ts';\nexport { contentHash, HASH_LENGTH } from './hash.ts';\nexport {\n ALLOWED_NODE_BUILTINS,\n ALLOWED_PACKAGES,\n ALLOWED_URL_SCHEMES,\n assertLocalResource,\n FORBIDDEN_GLOBALS,\n FORBIDDEN_NODE_MODULES,\n FORBIDDEN_PACKAGES,\n} from './net/policy.ts';\nexport type { LocalResource } from './net/policy.ts';\nexport { clearGrammarCache, grammarPath, loadGrammar, WASM_BY_LANGUAGE } from './plan/grammar.ts';\nexport { AUTO_PLANNER_ID, AutoPlanner, planAuto } from './plan/auto.ts';\nexport type { AutoPlannerOptions } from './plan/auto.ts';\nexport { LEXICAL_PLANNER_ID, LexicalPlanner, planLexical } from './plan/lexical.ts';\nexport type { LexicalPlannerOptions } from './plan/lexical.ts';\nexport { DEFAULT_STRATEGY, isStrategy, PLANNERS, STRATEGIES } from './plan/planners.ts';\nexport type { PlannerFactoryOptions } from './plan/planners.ts';\nexport {\n isStructuralLanguage,\n planStructural,\n STRUCTURAL_LANGUAGES,\n STRUCTURAL_PLANNER_ID,\n StructuralPlanner,\n} from './plan/structural.ts';\nexport type { StructuralLanguage, StructuralPlannerOptions } from './plan/structural.ts';\nexport { createRetrieveTool, RETRIEVE_TOOL_NAME } from './retrieve.ts';\nexport { unconfiguredDistillStage, unconfiguredRerankStage } from './stages.ts';\nexport { MemoryElisionStore } from './store.ts';\nexport {\n DIRECTORY_STORE_FORMAT,\n DIRECTORY_STORE_VERSION,\n DirectoryElisionStore,\n} from './store-dir.ts';\nexport type { DirectoryElisionStoreOptions } from './store-dir.ts';\nexport * from './types.ts';\nexport {\n CLI_JSON_FORMAT,\n CLI_NAME,\n cliUsage,\n EXIT,\n formatReport,\n parseSmeltArgs,\n runCli,\n} from './cli/run.ts';\nexport type { AnswerStream, CliIo, CliJsonEnvelope, SmeltInvocation } from './cli/run.ts';\nexport {\n ANTHROPIC_PROMPT_CACHE_FACTS,\n CACHE_BREAKER_RULES,\n detectCacheBreakers,\n findPrefixDivergence,\n} from './cache/prefix.ts';\nexport type {\n CacheWarning,\n PrefixDivergence,\n PromptStructure,\n PromptTool,\n} from './cache/prefix.ts';\nexport { MARKER_LINE_COMMENT_LEADERS, markerForLanguage } from './apply.ts';\nexport {\n buildRepoMap,\n DEFAULT_REPO_IGNORE,\n REPO_MAP_CACHE_CORRUPT_RULE,\n REPO_MAP_ID,\n REPO_MAP_PATH_ONLY_RULE,\n REPO_MAP_RANKED_RULE,\n REPO_MAP_UNREFERENCED_RULE,\n} from './repomap/map.ts';\nexport type {\n RepoMap,\n RepoMapCacheCounts,\n RepoMapEntry,\n RepoMapOptions,\n RepoMapPathEntry,\n RepoMapReason,\n RepoMapWarning,\n} from './repomap/map.ts';\nexport { PAGERANK_DAMPING, PAGERANK_ITERATIONS, rankDefinitions } from './repomap/rank.ts';\nexport type { FileTagsEntry, RankedDefinition } from './repomap/rank.ts';\nexport { extractTags } from './repomap/tags.ts';\nexport type { DefinitionTag, FileTags, ReferenceTag } from './repomap/tags.ts';\nexport { TAGS_CACHE_FORMAT, TAGS_CACHE_VERSION, tagsCacheKey } from './repomap/cache.ts';\nexport { nodeFsReader } from './repomap/reader.ts';\nexport type { DirEntry, FileStat, RepoReader } from './repomap/reader.ts';\nexport {\n CONFIG_FILE_NAME,\n CONFIG_VERSION,\n configuredStore,\n findConfigFile,\n loadNearestConfig,\n parseConfig,\n renderConfig,\n resolveStorePath,\n} from './cli/config.ts';\nexport type { ConfiguredStore, LoadedConfig, SmeltConfig, SmeltConfigStore } from './cli/config.ts';\nexport {\n MEASURE_STUB_FILE,\n measureStubSource,\n RERANK_STUB_FILE,\n rerankStubSource,\n runInit,\n} from './cli/init.ts';\nexport type { InitIo } from './cli/init.ts';\nexport { retrieveStats } from './stats.ts';\nexport type { RawRetrieveCounters } from './stats.ts';\nexport {\n LANGUAGE_PROFILES,\n profileFor,\n profileForPath,\n structuralLanguages,\n} from './lang/registry.ts';\nexport type { LanguageProfile, LanguageStructure, RepoMapFacts } from './lang/profile.ts';\nexport { resolveRun } from './cli/subcommands/smelt.ts';\nexport type { ResolvedRun } from './cli/subcommands/smelt.ts';\nexport { REPO_MAP_FOCUS_RULE } from './repomap/map.ts';\nexport { CLI_MAP_JSON_FORMAT, formatMapReport, resolveMapRun } from './cli/run.ts';\nexport type { CliInvocation, CliMapJsonEnvelope, MapInvocation } from './cli/run.ts';\nexport type { MapReportInput } from './cli/report.ts';\nexport type { ResolvedMapRun } from './cli/subcommands/map.ts';\n\n/**\n * The operations seam — the four verbs and the laws their inputs must satisfy, below\n * every front door. `@smeltjs/mcp` consumes these as an ordinary dependency, so the\n * `smelt` CLI and the MCP tools run the same middle instead of two copies of it. See\n * `src/ops/index.ts` for what belongs here and what stays in an adapter.\n */\nexport {\n budgetFault,\n budgetMalformed,\n budgetRequired,\n mapTree,\n openStore,\n readBlob,\n readCounters,\n readTree,\n resolveStrategy,\n retrieveBytes,\n smeltBlob,\n} from './ops/index.ts';\nexport type {\n BudgetFault,\n BudgetNaming,\n MapTreeOp,\n ReadCountersOp,\n ResolvedStrategy,\n RetrieveBytesOp,\n Ruling,\n SmeltBlobOp,\n SmeltBlobOutcome,\n StrategySource,\n TreeNaming,\n} from './ops/index.ts';\n\n/**\n * Which planner a smelter uses, named by string. The names, their factories, and this\n * type all come from the one {@link PLANNERS} registry in `src/plan/planners.ts`, so\n * the CLI's validation and help text cannot drift from what `createSmelter` builds.\n */\nexport type { Strategy } from './plan/planners.ts';\n\nexport { createSmelter } from './smelter.ts';\nexport type { Smelter, SmelterConfig, SmeltCallOptions } from './smelter.ts';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClE,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,iBAAi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MAAM,gBAAgB,CAAC;AAsBxB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import type { ApplyOptions, MarkerBuilder, MarkerInfo } from './apply.ts';\n\n/**\n * The public surface: a barrel over the modules that hold the reasoning.\n *\n * `createSmelter()` itself lives in `./smelter.ts` so that nothing inside `src/` has\n * to import this file to build a smelter — the CLI's default verb does exactly that,\n * and a barrel that imports the CLI which imports the barrel is a cycle whose only\n * symptom is a registry evaluating to `undefined` in whichever module the loader\n * entered first. Every name is re-exported here, so consumers see no difference.\n */\n\nexport type { ApplyOptions, MarkerBuilder, MarkerInfo };\nexport {\n applyPlan,\n defaultMarker,\n MARKER_FORMAT_VERSION,\n markerPricing,\n reconstruct,\n} from './apply.ts';\nexport { detectLanguage, SUPPORTED_LANGUAGES } from './detect.ts';\nexport * from './errors.ts';\nexport { contentHash, HASH_LENGTH } from './hash.ts';\nexport {\n ALLOWED_NODE_BUILTINS,\n ALLOWED_PACKAGES,\n ALLOWED_URL_SCHEMES,\n assertLocalResource,\n FORBIDDEN_GLOBALS,\n FORBIDDEN_NODE_MODULES,\n FORBIDDEN_PACKAGES,\n} from './net/policy.ts';\nexport type { LocalResource } from './net/policy.ts';\nexport { clearGrammarCache, grammarPath, loadGrammar, WASM_BY_LANGUAGE } from './plan/grammar.ts';\nexport { AUTO_PLANNER_ID, AutoPlanner, planAuto } from './plan/auto.ts';\nexport type { AutoPlannerOptions } from './plan/auto.ts';\nexport { LEXICAL_PLANNER_ID, LexicalPlanner, planLexical } from './plan/lexical.ts';\nexport type { LexicalPlannerOptions } from './plan/lexical.ts';\nexport { DEFAULT_STRATEGY, isStrategy, PLANNERS, STRATEGIES } from './plan/planners.ts';\nexport type { PlannerFactoryOptions } from './plan/planners.ts';\nexport {\n isStructuralLanguage,\n planStructural,\n STRUCTURAL_LANGUAGES,\n STRUCTURAL_PLANNER_ID,\n StructuralPlanner,\n} from './plan/structural.ts';\nexport type { StructuralLanguage, StructuralPlannerOptions } from './plan/structural.ts';\nexport { createRetrieveTool, RETRIEVE_TOOL_NAME } from './retrieve.ts';\nexport { unconfiguredDistillStage, unconfiguredRerankStage } from './stages.ts';\nexport { MemoryElisionStore } from './store.ts';\nexport {\n DIRECTORY_STORE_FORMAT,\n DIRECTORY_STORE_VERSION,\n DirectoryElisionStore,\n} from './store-dir.ts';\nexport type { DirectoryElisionStoreOptions } from './store-dir.ts';\nexport * from './types.ts';\nexport {\n CLI_JSON_FORMAT,\n CLI_NAME,\n cliUsage,\n EXIT,\n formatReport,\n parseSmeltArgs,\n runCli,\n} from './cli/run.ts';\nexport type { AnswerStream, CliIo, CliJsonEnvelope, SmeltInvocation } from './cli/run.ts';\nexport {\n ANTHROPIC_PROMPT_CACHE_FACTS,\n CACHE_BREAKER_RULES,\n detectCacheBreakers,\n findPrefixDivergence,\n} from './cache/prefix.ts';\nexport type {\n CacheWarning,\n PrefixDivergence,\n PromptStructure,\n PromptTool,\n} from './cache/prefix.ts';\nexport { MARKER_LINE_COMMENT_LEADERS, markerForLanguage } from './apply.ts';\nexport {\n buildRepoMap,\n DEFAULT_REPO_IGNORE,\n REPO_MAP_CACHE_CORRUPT_RULE,\n REPO_MAP_ID,\n REPO_MAP_PATH_ONLY_RULE,\n REPO_MAP_RANKED_RULE,\n REPO_MAP_UNREFERENCED_RULE,\n} from './repomap/map.ts';\nexport type {\n RepoMap,\n RepoMapCacheCounts,\n RepoMapEntry,\n RepoMapOptions,\n RepoMapPathEntry,\n RepoMapReason,\n RepoMapWarning,\n} from './repomap/map.ts';\nexport { PAGERANK_DAMPING, PAGERANK_ITERATIONS, rankDefinitions } from './repomap/rank.ts';\nexport type { FileTagsEntry, RankedDefinition } from './repomap/rank.ts';\nexport { extractTags } from './repomap/tags.ts';\nexport type { DefinitionTag, FileTags, ReferenceTag } from './repomap/tags.ts';\nexport { TAGS_CACHE_FORMAT, TAGS_CACHE_VERSION, tagsCacheKey } from './repomap/cache.ts';\nexport { nodeFsReader } from './repomap/reader.ts';\nexport type { DirEntry, FileStat, RepoReader } from './repomap/reader.ts';\nexport {\n CONFIG_FILE_NAME,\n CONFIG_VERSION,\n configuredStore,\n findConfigFile,\n loadNearestConfig,\n parseConfig,\n renderConfig,\n resolveStorePath,\n} from './cli/config.ts';\nexport type { ConfiguredStore, LoadedConfig, SmeltConfig, SmeltConfigStore } from './cli/config.ts';\nexport {\n MEASURE_STUB_FILE,\n measureStubSource,\n RERANK_STUB_FILE,\n rerankStubSource,\n runInit,\n} from './cli/init.ts';\nexport type { InitIo } from './cli/init.ts';\nexport { runSetup } from './cli/setup.ts';\nexport type {\n SetupCheck,\n SetupFileAction,\n SetupIo,\n SetupOptions,\n SetupReceipt,\n} from './cli/setup.ts';\nexport { runDoctor } from './cli/doctor.ts';\nexport type {\n DoctorBlock,\n DoctorConfig,\n DoctorIo,\n DoctorMcp,\n DoctorOptions,\n DoctorReceipt,\n} from './cli/doctor.ts';\nexport { retrieveStats } from './stats.ts';\nexport type { RawRetrieveCounters } from './stats.ts';\n\n/**\n * The SetupRecipe: the one true way to put smelt on a machine, as data. Public for the\n * same reason the harness views are — something outside this package renders it (the\n * site's fact generator), and the docs and skill are pinned to it rather than retyping\n * it. See `src/setup/recipe.ts`.\n */\nexport { SETUP_RECIPE, SETUP_STEPS } from './setup/recipe.ts';\nexport type { SetupRecipe, SetupStep } from './setup/recipe.ts';\nexport {\n LANGUAGE_PROFILES,\n profileFor,\n profileForPath,\n structuralLanguages,\n} from './lang/registry.ts';\nexport type { LanguageProfile, LanguageStructure, RepoMapFacts } from './lang/profile.ts';\n/**\n * The harness registry's rendered views. Public for the same reason the ops seam is:\n * something outside this package renders them — the site's `facts.json` generator —\n * and the alternative is a second copy of the tier table typed into a React component,\n * which is exactly the drift `harnessesByTier()` exists to end.\n */\nexport { harnessesByTier, harnessNames, HARNESSES, HARNESS_IDS } from './harness/registry.ts';\nexport type { HarnessTierGroup } from './harness/registry.ts';\nexport { harnessLabel, HARNESS_TIERS, TIER_HONESTY } from './harness/profile.ts';\nexport type { HarnessId, HarnessTier } from './harness/profile.ts';\nexport { resolveRun } from './cli/subcommands/smelt.ts';\nexport type { ResolvedRun } from './cli/subcommands/smelt.ts';\nexport { REPO_MAP_FOCUS_RULE } from './repomap/map.ts';\nexport { CLI_MAP_JSON_FORMAT, formatMapReport, resolveMapRun } from './cli/run.ts';\nexport type { CliInvocation, CliMapJsonEnvelope, MapInvocation } from './cli/run.ts';\nexport type { MapReportInput } from './cli/report.ts';\nexport type { ResolvedMapRun } from './cli/subcommands/map.ts';\n\n/**\n * The operations seam — the four verbs and the laws their inputs must satisfy, below\n * every front door. `@smeltjs/mcp` consumes these as an ordinary dependency, so the\n * `smelt` CLI and the MCP tools run the same middle instead of two copies of it. See\n * `src/ops/index.ts` for what belongs here and what stays in an adapter.\n */\nexport {\n budgetFault,\n budgetMalformed,\n budgetRequired,\n mapTree,\n openStore,\n readBlob,\n readCounters,\n readTree,\n resolveStrategy,\n retrieveBytes,\n smeltBlob,\n} from './ops/index.ts';\nexport type {\n BudgetFault,\n BudgetNaming,\n MapTreeOp,\n ReadCountersOp,\n ResolvedStrategy,\n RetrieveBytesOp,\n Ruling,\n SmeltBlobOp,\n SmeltBlobOutcome,\n StrategySource,\n TreeNaming,\n} from './ops/index.ts';\n\n/**\n * Which planner a smelter uses, named by string. The names, their factories, and this\n * type all come from the one {@link PLANNERS} registry in `src/plan/planners.ts`, so\n * the CLI's validation and help text cannot drift from what `createSmelter` builds.\n */\nexport type { Strategy } from './plan/planners.ts';\n\nexport { createSmelter } from './smelter.ts';\nexport type { Smelter, SmelterConfig, SmeltCallOptions } from './smelter.ts';\n"]}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The SetupRecipe (CONTEXT.md): the one true way to put smelt on a machine — the
3
+ * install commands, the init defaults, the store default, the hooks step, the MCP
4
+ * registration — held as data, because prose is never the source. Every rendering
5
+ * derives from this module or is pinned to it by a guard
6
+ * (`test/guards/setup-recipe.test.ts`); the same facts used to be retyped until the
7
+ * store default existed under three doc spellings, one of them wrong, and the MCP
8
+ * registration command lived in four places at once.
9
+ *
10
+ * This module imports nothing and does nothing: it is the fact layer every setup
11
+ * surface reads, and the seam the `setup` verb, the skill pack, and the site's fact
12
+ * generator hang off.
13
+ */
14
+ export declare const SETUP_RECIPE: {
15
+ readonly install: {
16
+ /** The library, into a project — npm's spelling, and its siblings beside it. */
17
+ readonly library: 'npm install @smeltjs/core';
18
+ readonly libraryPnpm: 'pnpm add @smeltjs/core';
19
+ readonly libraryBun: 'bun add @smeltjs/core';
20
+ /** The CLI, onto the machine. (Not named `global`: that word is Law 1's.) */
21
+ readonly globalInstall: 'npm install -g @smeltjs/core';
22
+ /** The CLI, without installing it. */
23
+ readonly oneShot: 'npx @smeltjs/core';
24
+ /** The CLI over Homebrew, from smelt's own tap (KOT-248 seeds it). */
25
+ readonly brewInstall: 'brew install smeltjs/tap/smelt';
26
+ /** The Homebrew upgrade — the first half of the update loop doctor completes. */
27
+ readonly brewUpgrade: 'brew upgrade smelt';
28
+ /** The SkillPack, installed by an agent's owner (ADR-0002). */
29
+ readonly skillInstall: 'npx skills add smeltjs/smelt';
30
+ };
31
+ /**
32
+ * The budget the setup path writes when its caller names none — the number every
33
+ * example already uses. Written loudly and recorded with its provenance; the
34
+ * `smelt` verb's own budget-required refusal is untouched by it.
35
+ */
36
+ readonly recommendedBudgetBytes: 4000;
37
+ readonly store: {
38
+ /** Where the persistent store lives, relative to smelt.config.json. */
39
+ readonly defaultDir: '.smelt/store';
40
+ };
41
+ readonly mcp: {
42
+ /** The MCP server, run from the project directory. */
43
+ readonly run: 'npx @smeltjs/mcp';
44
+ /**
45
+ * Registration as Claude Code's CLI spells it — the canonical string while the
46
+ * harness profiles cannot yet carry per-harness registration; the
47
+ * mcp-registration step kind generalizes this per harness.
48
+ */
49
+ readonly register: 'claude mcp add smelt -- npx @smeltjs/mcp';
50
+ };
51
+ };
52
+ export type SetupRecipe = typeof SETUP_RECIPE;
53
+ /**
54
+ * The recipe's run command as a spawn array — derived once, beside the fact it comes
55
+ * from, because two harness profiles need the array and a second `.split(' ')` would
56
+ * be the second spelling this module exists to end.
57
+ */
58
+ export declare const MCP_RUN_ARGS: readonly string[];
59
+ /** One step of the recipe, in the order a new machine walks it. */
60
+ export interface SetupStep {
61
+ readonly id: 'install' | 'init' | 'hooks' | 'mcp' | 'verify';
62
+ readonly title: string;
63
+ readonly command: string;
64
+ }
65
+ /**
66
+ * The recipe's steps, in order, ending in the verification that makes "set up" a
67
+ * claim with evidence. The install and MCP commands are named facts above; the init,
68
+ * hooks and verify steps name the verbs and the canonical invocation — the wizard
69
+ * each is, not a fact the recipe owns, except the budget the verify step carries,
70
+ * which is the recipe's.
71
+ */
72
+ export declare const SETUP_STEPS: readonly SetupStep[];
73
+ //# sourceMappingURL=recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/setup/recipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;aACvB,OAAO;QACL,gFAAgF;iBAChF,OAAO,EAAE,2BAA2B;iBACpC,WAAW,EAAE,wBAAwB;iBACrC,UAAU,EAAE,uBAAuB;QACnC,6EAA6E;iBAC7E,aAAa,EAAE,8BAA8B;QAC7C,sCAAsC;iBACtC,OAAO,EAAE,mBAAmB;QAC5B,sEAAsE;iBACtE,WAAW,EAAE,gCAAgC;QAC7C,iFAAiF;iBACjF,WAAW,EAAE,oBAAoB;QACjC,+DAA+D;iBAC/D,YAAY,EAAE,8BAA8B;;IAE9C;;;;OAIG;aACH,sBAAsB,EAAE,IAAI;aAC5B,KAAK;QACH,uEAAuE;iBACvE,UAAU,EAAE,cAAc;;aAE5B,GAAG;QACD,sDAAsD;iBACtD,GAAG,EAAE,kBAAkB;QACvB;;;;WAIG;iBACH,QAAQ,EAAE,0CAA0C;;CAE9C,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAoC,CAAC;AAE/E,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAU3C,CAAC","sourcesContent":["/**\n * The SetupRecipe (CONTEXT.md): the one true way to put smelt on a machine — the\n * install commands, the init defaults, the store default, the hooks step, the MCP\n * registration — held as data, because prose is never the source. Every rendering\n * derives from this module or is pinned to it by a guard\n * (`test/guards/setup-recipe.test.ts`); the same facts used to be retyped until the\n * store default existed under three doc spellings, one of them wrong, and the MCP\n * registration command lived in four places at once.\n *\n * This module imports nothing and does nothing: it is the fact layer every setup\n * surface reads, and the seam the `setup` verb, the skill pack, and the site's fact\n * generator hang off.\n */\nexport const SETUP_RECIPE = {\n install: {\n /** The library, into a project — npm's spelling, and its siblings beside it. */\n library: 'npm install @smeltjs/core',\n libraryPnpm: 'pnpm add @smeltjs/core',\n libraryBun: 'bun add @smeltjs/core',\n /** The CLI, onto the machine. (Not named `global`: that word is Law 1's.) */\n globalInstall: 'npm install -g @smeltjs/core',\n /** The CLI, without installing it. */\n oneShot: 'npx @smeltjs/core',\n /** The CLI over Homebrew, from smelt's own tap (KOT-248 seeds it). */\n brewInstall: 'brew install smeltjs/tap/smelt',\n /** The Homebrew upgrade — the first half of the update loop doctor completes. */\n brewUpgrade: 'brew upgrade smelt',\n /** The SkillPack, installed by an agent's owner (ADR-0002). */\n skillInstall: 'npx skills add smeltjs/smelt',\n },\n /**\n * The budget the setup path writes when its caller names none — the number every\n * example already uses. Written loudly and recorded with its provenance; the\n * `smelt` verb's own budget-required refusal is untouched by it.\n */\n recommendedBudgetBytes: 4000,\n store: {\n /** Where the persistent store lives, relative to smelt.config.json. */\n defaultDir: '.smelt/store',\n },\n mcp: {\n /** The MCP server, run from the project directory. */\n run: 'npx @smeltjs/mcp',\n /**\n * Registration as Claude Code's CLI spells it — the canonical string while the\n * harness profiles cannot yet carry per-harness registration; the\n * mcp-registration step kind generalizes this per harness.\n */\n register: 'claude mcp add smelt -- npx @smeltjs/mcp',\n },\n} as const;\n\nexport type SetupRecipe = typeof SETUP_RECIPE;\n\n/**\n * The recipe's run command as a spawn array — derived once, beside the fact it comes\n * from, because two harness profiles need the array and a second `.split(' ')` would\n * be the second spelling this module exists to end.\n */\nexport const MCP_RUN_ARGS: readonly string[] = SETUP_RECIPE.mcp.run.split(' ');\n\n/** One step of the recipe, in the order a new machine walks it. */\nexport interface SetupStep {\n readonly id: 'install' | 'init' | 'hooks' | 'mcp' | 'verify';\n readonly title: string;\n readonly command: string;\n}\n\n/**\n * The recipe's steps, in order, ending in the verification that makes \"set up\" a\n * claim with evidence. The install and MCP commands are named facts above; the init,\n * hooks and verify steps name the verbs and the canonical invocation — the wizard\n * each is, not a fact the recipe owns, except the budget the verify step carries,\n * which is the recipe's.\n */\nexport const SETUP_STEPS: readonly SetupStep[] = [\n { id: 'install', title: 'install the CLI', command: SETUP_RECIPE.install.globalInstall },\n { id: 'init', title: 'write smelt.config.json', command: 'smelt init' },\n { id: 'hooks', title: 'wire the hooks preset', command: 'smelt hooks install' },\n { id: 'mcp', title: 'register the MCP server', command: SETUP_RECIPE.mcp.register },\n {\n id: 'verify',\n title: 'prove the round trip on a real file',\n command: `smelt <file> --budget ${SETUP_RECIPE.recommendedBudgetBytes} --focus <focus>`,\n },\n];\n"]}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The SetupRecipe (CONTEXT.md): the one true way to put smelt on a machine — the
3
+ * install commands, the init defaults, the store default, the hooks step, the MCP
4
+ * registration — held as data, because prose is never the source. Every rendering
5
+ * derives from this module or is pinned to it by a guard
6
+ * (`test/guards/setup-recipe.test.ts`); the same facts used to be retyped until the
7
+ * store default existed under three doc spellings, one of them wrong, and the MCP
8
+ * registration command lived in four places at once.
9
+ *
10
+ * This module imports nothing and does nothing: it is the fact layer every setup
11
+ * surface reads, and the seam the `setup` verb, the skill pack, and the site's fact
12
+ * generator hang off.
13
+ */
14
+ export const SETUP_RECIPE = {
15
+ install: {
16
+ /** The library, into a project — npm's spelling, and its siblings beside it. */
17
+ library: 'npm install @smeltjs/core',
18
+ libraryPnpm: 'pnpm add @smeltjs/core',
19
+ libraryBun: 'bun add @smeltjs/core',
20
+ /** The CLI, onto the machine. (Not named `global`: that word is Law 1's.) */
21
+ globalInstall: 'npm install -g @smeltjs/core',
22
+ /** The CLI, without installing it. */
23
+ oneShot: 'npx @smeltjs/core',
24
+ /** The CLI over Homebrew, from smelt's own tap (KOT-248 seeds it). */
25
+ brewInstall: 'brew install smeltjs/tap/smelt',
26
+ /** The Homebrew upgrade — the first half of the update loop doctor completes. */
27
+ brewUpgrade: 'brew upgrade smelt',
28
+ /** The SkillPack, installed by an agent's owner (ADR-0002). */
29
+ skillInstall: 'npx skills add smeltjs/smelt',
30
+ },
31
+ /**
32
+ * The budget the setup path writes when its caller names none — the number every
33
+ * example already uses. Written loudly and recorded with its provenance; the
34
+ * `smelt` verb's own budget-required refusal is untouched by it.
35
+ */
36
+ recommendedBudgetBytes: 4000,
37
+ store: {
38
+ /** Where the persistent store lives, relative to smelt.config.json. */
39
+ defaultDir: '.smelt/store',
40
+ },
41
+ mcp: {
42
+ /** The MCP server, run from the project directory. */
43
+ run: 'npx @smeltjs/mcp',
44
+ /**
45
+ * Registration as Claude Code's CLI spells it — the canonical string while the
46
+ * harness profiles cannot yet carry per-harness registration; the
47
+ * mcp-registration step kind generalizes this per harness.
48
+ */
49
+ register: 'claude mcp add smelt -- npx @smeltjs/mcp',
50
+ },
51
+ };
52
+ /**
53
+ * The recipe's run command as a spawn array — derived once, beside the fact it comes
54
+ * from, because two harness profiles need the array and a second `.split(' ')` would
55
+ * be the second spelling this module exists to end.
56
+ */
57
+ export const MCP_RUN_ARGS = SETUP_RECIPE.mcp.run.split(' ');
58
+ /**
59
+ * The recipe's steps, in order, ending in the verification that makes "set up" a
60
+ * claim with evidence. The install and MCP commands are named facts above; the init,
61
+ * hooks and verify steps name the verbs and the canonical invocation — the wizard
62
+ * each is, not a fact the recipe owns, except the budget the verify step carries,
63
+ * which is the recipe's.
64
+ */
65
+ export const SETUP_STEPS = [
66
+ { id: 'install', title: 'install the CLI', command: SETUP_RECIPE.install.globalInstall },
67
+ { id: 'init', title: 'write smelt.config.json', command: 'smelt init' },
68
+ { id: 'hooks', title: 'wire the hooks preset', command: 'smelt hooks install' },
69
+ { id: 'mcp', title: 'register the MCP server', command: SETUP_RECIPE.mcp.register },
70
+ {
71
+ id: 'verify',
72
+ title: 'prove the round trip on a real file',
73
+ command: `smelt <file> --budget ${SETUP_RECIPE.recommendedBudgetBytes} --focus <focus>`,
74
+ },
75
+ ];
76
+ //# sourceMappingURL=recipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../src/setup/recipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE;QACP,gFAAgF;QAChF,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,wBAAwB;QACrC,UAAU,EAAE,uBAAuB;QACnC,6EAA6E;QAC7E,aAAa,EAAE,8BAA8B;QAC7C,sCAAsC;QACtC,OAAO,EAAE,mBAAmB;QAC5B,sEAAsE;QACtE,WAAW,EAAE,gCAAgC;QAC7C,iFAAiF;QACjF,WAAW,EAAE,oBAAoB;QACjC,+DAA+D;QAC/D,YAAY,EAAE,8BAA8B;KAC7C;IACD;;;;OAIG;IACH,sBAAsB,EAAE,IAAI;IAC5B,KAAK,EAAE;QACL,uEAAuE;QACvE,UAAU,EAAE,cAAc;KAC3B;IACD,GAAG,EAAE;QACH,sDAAsD;QACtD,GAAG,EAAE,kBAAkB;QACvB;;;;WAIG;QACH,QAAQ,EAAE,0CAA0C;KACrD;CACO,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAS/E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAyB;IAC/C,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,aAAa,EAAE;IACxF,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,EAAE,OAAO,EAAE,YAAY,EAAE;IACvE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,OAAO,EAAE,qBAAqB,EAAE;IAC/E,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,EAAE,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE;IACnF;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,qCAAqC;QAC5C,OAAO,EAAE,yBAAyB,YAAY,CAAC,sBAAsB,kBAAkB;KACxF;CACF,CAAC","sourcesContent":["/**\n * The SetupRecipe (CONTEXT.md): the one true way to put smelt on a machine — the\n * install commands, the init defaults, the store default, the hooks step, the MCP\n * registration — held as data, because prose is never the source. Every rendering\n * derives from this module or is pinned to it by a guard\n * (`test/guards/setup-recipe.test.ts`); the same facts used to be retyped until the\n * store default existed under three doc spellings, one of them wrong, and the MCP\n * registration command lived in four places at once.\n *\n * This module imports nothing and does nothing: it is the fact layer every setup\n * surface reads, and the seam the `setup` verb, the skill pack, and the site's fact\n * generator hang off.\n */\nexport const SETUP_RECIPE = {\n install: {\n /** The library, into a project — npm's spelling, and its siblings beside it. */\n library: 'npm install @smeltjs/core',\n libraryPnpm: 'pnpm add @smeltjs/core',\n libraryBun: 'bun add @smeltjs/core',\n /** The CLI, onto the machine. (Not named `global`: that word is Law 1's.) */\n globalInstall: 'npm install -g @smeltjs/core',\n /** The CLI, without installing it. */\n oneShot: 'npx @smeltjs/core',\n /** The CLI over Homebrew, from smelt's own tap (KOT-248 seeds it). */\n brewInstall: 'brew install smeltjs/tap/smelt',\n /** The Homebrew upgrade — the first half of the update loop doctor completes. */\n brewUpgrade: 'brew upgrade smelt',\n /** The SkillPack, installed by an agent's owner (ADR-0002). */\n skillInstall: 'npx skills add smeltjs/smelt',\n },\n /**\n * The budget the setup path writes when its caller names none — the number every\n * example already uses. Written loudly and recorded with its provenance; the\n * `smelt` verb's own budget-required refusal is untouched by it.\n */\n recommendedBudgetBytes: 4000,\n store: {\n /** Where the persistent store lives, relative to smelt.config.json. */\n defaultDir: '.smelt/store',\n },\n mcp: {\n /** The MCP server, run from the project directory. */\n run: 'npx @smeltjs/mcp',\n /**\n * Registration as Claude Code's CLI spells it — the canonical string while the\n * harness profiles cannot yet carry per-harness registration; the\n * mcp-registration step kind generalizes this per harness.\n */\n register: 'claude mcp add smelt -- npx @smeltjs/mcp',\n },\n} as const;\n\nexport type SetupRecipe = typeof SETUP_RECIPE;\n\n/**\n * The recipe's run command as a spawn array — derived once, beside the fact it comes\n * from, because two harness profiles need the array and a second `.split(' ')` would\n * be the second spelling this module exists to end.\n */\nexport const MCP_RUN_ARGS: readonly string[] = SETUP_RECIPE.mcp.run.split(' ');\n\n/** One step of the recipe, in the order a new machine walks it. */\nexport interface SetupStep {\n readonly id: 'install' | 'init' | 'hooks' | 'mcp' | 'verify';\n readonly title: string;\n readonly command: string;\n}\n\n/**\n * The recipe's steps, in order, ending in the verification that makes \"set up\" a\n * claim with evidence. The install and MCP commands are named facts above; the init,\n * hooks and verify steps name the verbs and the canonical invocation — the wizard\n * each is, not a fact the recipe owns, except the budget the verify step carries,\n * which is the recipe's.\n */\nexport const SETUP_STEPS: readonly SetupStep[] = [\n { id: 'install', title: 'install the CLI', command: SETUP_RECIPE.install.globalInstall },\n { id: 'init', title: 'write smelt.config.json', command: 'smelt init' },\n { id: 'hooks', title: 'wire the hooks preset', command: 'smelt hooks install' },\n { id: 'mcp', title: 'register the MCP server', command: SETUP_RECIPE.mcp.register },\n {\n id: 'verify',\n title: 'prove the round trip on a real file',\n command: `smelt <file> --budget ${SETUP_RECIPE.recommendedBudgetBytes} --focus <focus>`,\n },\n];\n"]}