@aaac/runtime 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1549,6 +1549,7 @@ declare const ClaudeConfigSchema: z.ZodObject<{
1549
1549
  template?: string | undefined;
1550
1550
  } | undefined>>;
1551
1551
  agents: z.ZodDefault<z.ZodBoolean>;
1552
+ harness: z.ZodDefault<z.ZodBoolean>;
1552
1553
  }, z.core.$strip>>;
1553
1554
  guard_command: z.ZodOptional<z.ZodString>;
1554
1555
  component_id: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -18,6 +18,11 @@ import {
18
18
  import {
19
19
  jsonSchemaToZod
20
20
  } from "./chunk-ET6TGQRT.js";
21
+ import {
22
+ PROJECT_CONFIG_FILENAME,
23
+ loadProjectConfig,
24
+ loadWorkspaceMembers
25
+ } from "./chunk-F5R46S7I.js";
21
26
  import {
22
27
  toolGrantForAgent
23
28
  } from "./chunk-VJXGCWSZ.js";
@@ -44,11 +49,6 @@ import {
44
49
  renderContextPackPrompt,
45
50
  serializeObserverEmit
46
51
  } from "./chunk-KTVMMG33.js";
47
- import {
48
- PROJECT_CONFIG_FILENAME,
49
- loadProjectConfig,
50
- loadWorkspaceMembers
51
- } from "./chunk-F5R46S7I.js";
52
52
  import {
53
53
  isNavigationIndex,
54
54
  renderNavigationIndexPrompt
@@ -9294,7 +9294,22 @@ var ClaudeEmitSchema = z3.object({
9294
9294
  * DSL-declared agents are real Claude Code subagents (#272). In a workspace
9295
9295
  * every member's agents are merged into the single root directory.
9296
9296
  */
9297
- agents: z3.boolean().default(false)
9297
+ agents: z3.boolean().default(false),
9298
+ /**
9299
+ * The navigation-index harness itself: `<output_dir>/settings.json`,
9300
+ * `hooks/`, `bin/`, `cache/` and the CLAUDE.md block. Default `true` — every
9301
+ * caller before this field existed got it unconditionally.
9302
+ *
9303
+ * Set `false` when the project OWNS those files by hand and only wants the
9304
+ * DSL-derived artifacts (`agents`, `workflows`, `commands`). A documentation
9305
+ * repository whose `settings.json` carries a hand-written egress guard is the
9306
+ * case this exists for: rendering the harness over it silently replaces the
9307
+ * only guard a standalone clone has.
9308
+ *
9309
+ * Turning it off does not orphan what it would have written — the files are
9310
+ * the project's, so they are neither rendered nor removed.
9311
+ */
9312
+ harness: z3.boolean().default(true)
9298
9313
  }).strip();
9299
9314
  var ClaudeConfigSchema = z3.object({
9300
9315
  /** Root directory for Claude artifacts (relative to the project root). */
@@ -9311,7 +9326,12 @@ var ClaudeConfigSchema = z3.object({
9311
9326
  * Additive-artifact emission toggles. Defaults keep the historical
9312
9327
  * behavior (no workflow scripts) so existing output is byte-preserved.
9313
9328
  */
9314
- emit: ClaudeEmitSchema.default({ workflows: false, commands: void 0, agents: false }),
9329
+ emit: ClaudeEmitSchema.default({
9330
+ workflows: false,
9331
+ commands: void 0,
9332
+ agents: false,
9333
+ harness: true
9334
+ }),
9315
9335
  /**
9316
9336
  * Command wired into guardrail hooks (e.g. "dev-team guard evaluate").
9317
9337
  * Reserved for future hook integration; validated for config parity.
@@ -10374,6 +10394,7 @@ async function readIfExists(path) {
10374
10394
  return readFile5(path, "utf8");
10375
10395
  }
10376
10396
  async function renderFiles(root, dsl, config, entryAgentPrompt) {
10397
+ if (!config.emit.harness) return [];
10377
10398
  const ir = buildComponentIR(dsl, config);
10378
10399
  const members = await workspaceMembersForProject(root);
10379
10400
  const workspaceOptions = members.length > 0 ? { members } : void 0;
@@ -10507,12 +10528,12 @@ function templateExt(outputTemplate) {
10507
10528
  return dot <= 0 ? "" : base.slice(dot);
10508
10529
  }
10509
10530
  async function orphanFiles(root, config, rendered, workflows, commands, agents) {
10510
- const orphans = await orphanGeneratedFiles(
10531
+ const orphans = config.emit.harness ? await orphanGeneratedFiles(
10511
10532
  root,
10512
10533
  HOOK_BIN_DIR,
10513
10534
  rendered.filter((f) => isHookBin(f.targetDir, f.path)).map(generatedFileRelPath),
10514
10535
  isOwnedHookBinFile
10515
- );
10536
+ ) : [];
10516
10537
  if (config.emit.workflows) {
10517
10538
  orphans.push(
10518
10539
  ...await orphanGeneratedFiles(