@telora/daemon 0.20.78 → 0.20.95

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 (151) hide show
  1. package/build-info.json +2 -2
  2. package/dist/ai-inspection-context.d.ts.map +1 -1
  3. package/dist/ai-inspection-context.js +4 -2
  4. package/dist/ai-inspection-context.js.map +1 -1
  5. package/dist/audit-prompt.d.ts.map +1 -1
  6. package/dist/audit-prompt.js +9 -5
  7. package/dist/audit-prompt.js.map +1 -1
  8. package/dist/ci-sensor-loop.d.ts +33 -5
  9. package/dist/ci-sensor-loop.d.ts.map +1 -1
  10. package/dist/ci-sensor-loop.js +95 -14
  11. package/dist/ci-sensor-loop.js.map +1 -1
  12. package/dist/ci-status-git.d.ts +7 -5
  13. package/dist/ci-status-git.d.ts.map +1 -1
  14. package/dist/ci-status-git.js +12 -9
  15. package/dist/ci-status-git.js.map +1 -1
  16. package/dist/ci-status.d.ts +21 -6
  17. package/dist/ci-status.d.ts.map +1 -1
  18. package/dist/ci-status.js +90 -15
  19. package/dist/ci-status.js.map +1 -1
  20. package/dist/cli/connect/agents.d.ts +64 -14
  21. package/dist/cli/connect/agents.d.ts.map +1 -1
  22. package/dist/cli/connect/agents.js +102 -19
  23. package/dist/cli/connect/agents.js.map +1 -1
  24. package/dist/cli/connect/claude.d.ts +19 -16
  25. package/dist/cli/connect/claude.d.ts.map +1 -1
  26. package/dist/cli/connect/claude.js +34 -68
  27. package/dist/cli/connect/claude.js.map +1 -1
  28. package/dist/cli/connect/scaffolding.d.ts +3 -2
  29. package/dist/cli/connect/scaffolding.d.ts.map +1 -1
  30. package/dist/cli/connect/scaffolding.js +17 -6
  31. package/dist/cli/connect/scaffolding.js.map +1 -1
  32. package/dist/cli/connect/seed-retirement.d.ts +39 -0
  33. package/dist/cli/connect/seed-retirement.d.ts.map +1 -0
  34. package/dist/cli/connect/seed-retirement.js +95 -0
  35. package/dist/cli/connect/seed-retirement.js.map +1 -0
  36. package/dist/cli/connect.d.ts +2 -2
  37. package/dist/cli/connect.d.ts.map +1 -1
  38. package/dist/cli/connect.js +8 -2
  39. package/dist/cli/connect.js.map +1 -1
  40. package/dist/cli/session-state.d.ts +0 -20
  41. package/dist/cli/session-state.d.ts.map +1 -1
  42. package/dist/cli/session-state.js +20 -49
  43. package/dist/cli/session-state.js.map +1 -1
  44. package/dist/completion/completion-decision.d.ts +3 -29
  45. package/dist/completion/completion-decision.d.ts.map +1 -1
  46. package/dist/completion/completion-decision.js +3 -15
  47. package/dist/completion/completion-decision.js.map +1 -1
  48. package/dist/completion/event-phases.d.ts +0 -8
  49. package/dist/completion/event-phases.d.ts.map +1 -1
  50. package/dist/completion/event-phases.js +4 -52
  51. package/dist/completion/event-phases.js.map +1 -1
  52. package/dist/completion/event.d.ts +1 -11
  53. package/dist/completion/event.d.ts.map +1 -1
  54. package/dist/completion/event.js +1 -3
  55. package/dist/completion/event.js.map +1 -1
  56. package/dist/completion/merge-phase.d.ts +1 -1
  57. package/dist/completion/merge-phase.d.ts.map +1 -1
  58. package/dist/completion/merge-phase.js +14 -34
  59. package/dist/completion/merge-phase.js.map +1 -1
  60. package/dist/completion/team-lifecycle.d.ts.map +1 -1
  61. package/dist/completion/team-lifecycle.js +13 -1
  62. package/dist/completion/team-lifecycle.js.map +1 -1
  63. package/dist/delivery-artifacts.d.ts.map +1 -1
  64. package/dist/delivery-artifacts.js +9 -8
  65. package/dist/delivery-artifacts.js.map +1 -1
  66. package/dist/git/merge.d.ts +16 -0
  67. package/dist/git/merge.d.ts.map +1 -1
  68. package/dist/git/merge.js +39 -1
  69. package/dist/git/merge.js.map +1 -1
  70. package/dist/product-scaffold.d.ts +8 -6
  71. package/dist/product-scaffold.d.ts.map +1 -1
  72. package/dist/product-scaffold.js +14 -10
  73. package/dist/product-scaffold.js.map +1 -1
  74. package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
  75. package/dist/prompt-sections/execution-sections.js +44 -3
  76. package/dist/prompt-sections/execution-sections.js.map +1 -1
  77. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
  78. package/dist/prompt-sections/scoping-sections.js +8 -0
  79. package/dist/prompt-sections/scoping-sections.js.map +1 -1
  80. package/dist/queries/cause-key.d.ts +13 -3
  81. package/dist/queries/cause-key.d.ts.map +1 -1
  82. package/dist/queries/cause-key.js +14 -4
  83. package/dist/queries/cause-key.js.map +1 -1
  84. package/dist/queries/deliveries.d.ts +20 -153
  85. package/dist/queries/deliveries.d.ts.map +1 -1
  86. package/dist/queries/deliveries.js +26 -0
  87. package/dist/queries/deliveries.js.map +1 -1
  88. package/dist/queries/delivery-gate-state.d.ts +192 -0
  89. package/dist/queries/delivery-gate-state.d.ts.map +1 -0
  90. package/dist/queries/delivery-gate-state.js +23 -0
  91. package/dist/queries/delivery-gate-state.js.map +1 -0
  92. package/dist/queries/holds.d.ts +62 -60
  93. package/dist/queries/holds.d.ts.map +1 -1
  94. package/dist/queries/holds.js +70 -69
  95. package/dist/queries/holds.js.map +1 -1
  96. package/dist/queries/issues.d.ts +2 -2
  97. package/dist/queries/issues.d.ts.map +1 -1
  98. package/dist/queries/issues.js +2 -2
  99. package/dist/queries/issues.js.map +1 -1
  100. package/dist/reality-pole.d.ts +5 -3
  101. package/dist/reality-pole.d.ts.map +1 -1
  102. package/dist/reality-pole.js +13 -4
  103. package/dist/reality-pole.js.map +1 -1
  104. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  105. package/dist/resolvers/git-diff-against-base.js +12 -5
  106. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  107. package/dist/resolvers/index.d.ts +1 -1
  108. package/dist/resolvers/index.d.ts.map +1 -1
  109. package/dist/resolvers/index.js +1 -1
  110. package/dist/resolvers/index.js.map +1 -1
  111. package/dist/resolvers/shared/git-diff.d.ts +147 -26
  112. package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
  113. package/dist/resolvers/shared/git-diff.js +275 -35
  114. package/dist/resolvers/shared/git-diff.js.map +1 -1
  115. package/dist/templates/agents-md.d.ts +16 -0
  116. package/dist/templates/agents-md.d.ts.map +1 -1
  117. package/dist/templates/agents-md.js +26 -0
  118. package/dist/templates/agents-md.js.map +1 -1
  119. package/dist/templates/claude-settings.d.ts +44 -1
  120. package/dist/templates/claude-settings.d.ts.map +1 -1
  121. package/dist/templates/claude-settings.js +73 -1
  122. package/dist/templates/claude-settings.js.map +1 -1
  123. package/dist/unified-shell-provisioning.d.ts +99 -0
  124. package/dist/unified-shell-provisioning.d.ts.map +1 -0
  125. package/dist/unified-shell-provisioning.js +222 -0
  126. package/dist/unified-shell-provisioning.js.map +1 -0
  127. package/dist/unified-shell.d.ts +0 -41
  128. package/dist/unified-shell.d.ts.map +1 -1
  129. package/dist/unified-shell.js +19 -135
  130. package/dist/unified-shell.js.map +1 -1
  131. package/dist/verification-deps.d.ts +151 -0
  132. package/dist/verification-deps.d.ts.map +1 -0
  133. package/dist/verification-deps.js +19 -0
  134. package/dist/verification-deps.js.map +1 -0
  135. package/dist/verification-engine.d.ts +10 -112
  136. package/dist/verification-engine.d.ts.map +1 -1
  137. package/dist/verification-engine.js +84 -30
  138. package/dist/verification-engine.js.map +1 -1
  139. package/dist/verification-evidence.d.ts +33 -1
  140. package/dist/verification-evidence.d.ts.map +1 -1
  141. package/dist/verification-evidence.js +55 -13
  142. package/dist/verification-evidence.js.map +1 -1
  143. package/dist/verification-feedback.d.ts +31 -27
  144. package/dist/verification-feedback.d.ts.map +1 -1
  145. package/dist/verification-feedback.js +76 -85
  146. package/dist/verification-feedback.js.map +1 -1
  147. package/dist/verify-restatement.d.ts +12 -9
  148. package/dist/verify-restatement.d.ts.map +1 -1
  149. package/dist/verify-restatement.js +11 -9
  150. package/dist/verify-restatement.js.map +1 -1
  151. package/package.json +1 -1
package/dist/ci-status.js CHANGED
@@ -54,29 +54,104 @@ export function resolveCiMergeGate(status) {
54
54
  return { proceed: false, status: 'unknown', reason: 'CI status unavailable for the merged SHA -- holding (fail-closed: unknown != green)' };
55
55
  }
56
56
  }
57
+ /** The recognized state a ci-status ref suffix encodes, or null if unrecognized. */
58
+ function ciStateFromRefSuffix(ref) {
59
+ if (ref.endsWith('/failure') || ref.endsWith('/error') || ref.endsWith('/red'))
60
+ return 'red';
61
+ if (ref.endsWith('/success') || ref.endsWith('/green') || ref.endsWith('/passed'))
62
+ return 'green';
63
+ if (ref.endsWith('/pending') || ref.endsWith('/running') || ref.endsWith('/queued'))
64
+ return 'pending';
65
+ return null;
66
+ }
67
+ /**
68
+ * The run-ordering token a NEW ref carries, or null for a legacy ref.
69
+ *
70
+ * New scheme: `refs/ci-status/<sha>/<runNumber>/<state>` (5 slash-parts) -- the
71
+ * run number is parts[3]. Legacy scheme: `refs/ci-status/<sha>/<state>` (4
72
+ * parts) carries no order. Disambiguated by SEGMENT COUNT, not by numeric-ness,
73
+ * so an all-digit sha in a legacy ref is never mistaken for a run number.
74
+ */
75
+ function ciRunOrderFromRef(ref) {
76
+ const parts = ref.split('/');
77
+ if (parts.length === 5 && parts[1] === 'ci-status') {
78
+ const token = parts[3];
79
+ if (token !== undefined && /^[0-9]+$/.test(token)) {
80
+ const n = Number(token);
81
+ return Number.isSafeInteger(n) ? n : null;
82
+ }
83
+ }
84
+ return null;
85
+ }
57
86
  /**
58
- * Classify a git-native CI status from the set of `refs/ci-status/<sha>/<state>`
59
- * ref names published for a SHA. The STATE is encoded in the ref NAME (immutable
60
- * per-SHA), so no object content read is needed. FAIL-CLOSED: an empty set or an
61
- * unrecognized suffix is 'unknown' (holds). A failure ref outranks a success ref
62
- * (a red run must win if both somehow exist). Pure -- the caller supplies the
63
- * ref names from a scoped `git ls-remote` / fetch.
87
+ * Classify a git-native CI status from the set of ci-status ref names published
88
+ * for a SHA. The STATE is encoded in the ref NAME (immutable per-SHA), so no
89
+ * object content read is needed. Pure -- the caller supplies the ref names from a
90
+ * scoped `git ls-remote` / fetch.
91
+ *
92
+ * MOST-RECENT-RUN-WINS. The publisher encodes run order in the ref PATH
93
+ * (`refs/ci-status/<sha>/<runNumber>/<state>`), so a later GREEN run's ref
94
+ * outranks an earlier FAILURE ref for the same sha. This fixes the "a failure
95
+ * ref outranks a success ref, forever" trap: ref names carried no order, so a
96
+ * sha that once published a failure (an infra blip, or an evicted run) stayed
97
+ * red permanently even after a real green run of the same sha. The order comes
98
+ * from the workflow, never inferred by this reader.
99
+ *
100
+ * FAIL-CLOSED throughout: an empty set / unrecognized suffix -> 'unknown'
101
+ * (holds); among the highest run number, RED wins on a tie (the rare same-run
102
+ * re-run that published both states resolves to red, never a false green).
103
+ *
104
+ * LEGACY refs (`refs/ci-status/<sha>/<state>`, no run number) carry no order; if
105
+ * ONLY legacy refs exist we fall back to the original fail-closed precedence
106
+ * (failure outranks success outranks pending), preserving prior behavior for
107
+ * shas published before the run-ordered scheme deployed.
64
108
  */
65
109
  export function classifyGitNativeCiStatus(refNames) {
66
- let sawGreen = false;
67
- let sawPending = false;
110
+ let bestOrder = -1;
111
+ const statesAtBest = new Set();
112
+ let sawLegacyRed = false;
113
+ let sawLegacyGreen = false;
114
+ let sawLegacyPending = false;
68
115
  for (const raw of refNames) {
69
116
  const ref = raw.trim();
70
- if (ref.endsWith('/failure') || ref.endsWith('/error') || ref.endsWith('/red'))
117
+ const state = ciStateFromRefSuffix(ref);
118
+ if (!state)
119
+ continue;
120
+ const order = ciRunOrderFromRef(ref);
121
+ if (order === null) {
122
+ if (state === 'red')
123
+ sawLegacyRed = true;
124
+ else if (state === 'green')
125
+ sawLegacyGreen = true;
126
+ else
127
+ sawLegacyPending = true;
128
+ continue;
129
+ }
130
+ if (order > bestOrder) {
131
+ bestOrder = order;
132
+ statesAtBest.clear();
133
+ statesAtBest.add(state);
134
+ }
135
+ else if (order === bestOrder) {
136
+ statesAtBest.add(state);
137
+ }
138
+ }
139
+ // Most-recent ordered run decides (red wins a same-run tie, fail-closed).
140
+ if (bestOrder >= 0) {
141
+ if (statesAtBest.has('red'))
71
142
  return 'red';
72
- if (ref.endsWith('/success') || ref.endsWith('/green') || ref.endsWith('/passed'))
73
- sawGreen = true;
74
- else if (ref.endsWith('/pending') || ref.endsWith('/running') || ref.endsWith('/queued'))
75
- sawPending = true;
143
+ if (statesAtBest.has('green'))
144
+ return 'green';
145
+ if (statesAtBest.has('pending'))
146
+ return 'pending';
147
+ return 'unknown';
76
148
  }
77
- if (sawGreen)
149
+ // Legacy-only fallback: original fail-closed precedence.
150
+ if (sawLegacyRed)
151
+ return 'red';
152
+ if (sawLegacyGreen)
78
153
  return 'green';
79
- if (sawPending)
154
+ if (sawLegacyPending)
80
155
  return 'pending';
81
156
  return 'unknown';
82
157
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ci-status.js","sourceRoot":"","sources":["../src/ci-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAyBH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAmB;IACpD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;QAC1E,KAAK,SAAS;YACZ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,4EAA4E,EAAE,CAAC;QAC1H,KAAK,KAAK;YACR,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,wFAAwF,EAAE,CAAC;QACtI,KAAK,SAAS,CAAC;QACf;YACE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,qFAAqF,EAAE,CAAC;IAChJ,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAA2B;IACnE,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,QAAQ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AAChB,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAAyB;IACrE,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;QAC/B,IAAI,IAAI,GAAa,EAAE,CAAC;QACxB,IAAI,CAAC;YACH,IAAI,GAAG,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,qEAAqE;YACrE,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC"}
@@ -1,24 +1,74 @@
1
1
  /**
2
- * Codex/IDE harness config writer: the seeded `AGENTS.md` block. Extracted
3
- * verbatim from `../connect.ts` and re-exported from there for import
4
- * stability.
2
+ * Codex/IDE harness config writer: the seeded `AGENTS.md` block.
3
+ *
4
+ * Codex has no SessionStart hook, so its seed cannot ride the harness the way
5
+ * the Claude seed does -- it needs a FILE carrier, and that file must live off
6
+ * the repo root so the connector never fights the repo for `<repo>/AGENTS.md`.
7
+ * There are three carriers, one per consumer:
8
+ *
9
+ * - `writeProductCodexAgentsMd` -> the daemon's ISOLATED PER-PRODUCT CODEX_HOME
10
+ * (`~/.telora/codex/<productId>/AGENTS.md`, resolveProductCodexHome). Read by
11
+ * daemon-spawned LOCAL-MODEL Codex agents (whose CODEX_HOME is redirected
12
+ * there at spawn). Being per-product, it carries the baked per-product
13
+ * connection-invariant header correctly.
14
+ * - `writeOrMergeGlobalAgentsMd` -> the operator's own `~/.codex/AGENTS.md`
15
+ * (globalAgentsMdPath). Read by an INTERACTIVE operator running Codex AND by
16
+ * daemon-spawned HOSTED Codex agents (whose ChatGPT-account auth lives in
17
+ * `~/.codex/auth.json`, so their CODEX_HOME cannot be redirected without
18
+ * breaking auth). Workstation-shared across products, so it carries the
19
+ * HEADER-LESS seed (identity resolved on demand via `telora-daemon status`).
20
+ * - `writeOrMergeAgentsMd` -> a REPO-ROOT `<repo>/AGENTS.md` for the IDE
21
+ * harnesses (Cursor / VS Code) that read it natively and have no off-repo
22
+ * carrier. Made SAFE: it never creates or appends where the repo TRACKS
23
+ * AGENTS.md -- it reports that state instead, so it cannot dirty tracked
24
+ * content and reproduce this focus's original bug.
25
+ *
26
+ * `retireAgentsMdSeed` removes a connector-written repo-root AGENTS.md block the
27
+ * Codex file-writer era left behind.
5
28
  */
6
29
  import { type AgentsMdConnectionInvariant } from '../../templates/agents-md.js';
7
30
  import type { ConnectIO } from './shared.js';
8
31
  /**
9
- * Write or merge a seeded `AGENTS.md` at the repo root (Codex harness).
32
+ * The workstation-shared operator Codex AGENTS.md path: `$CODEX_HOME/AGENTS.md`,
33
+ * with CODEX_HOME defaulting to `~/.codex`. This is the location an interactive
34
+ * Codex session (and a hosted daemon spawn) reads global instructions from.
35
+ */
36
+ export declare function globalAgentsMdPath(): string;
37
+ /**
38
+ * Write or merge the PER-PRODUCT Codex seed into the isolated CODEX_HOME
39
+ * (`~/.telora/codex/<productId>/AGENTS.md`). This is the carrier a daemon-spawned
40
+ * LOCAL-MODEL Codex agent reads (its CODEX_HOME is redirected there at spawn).
41
+ * The destination is genuinely per-product, so the baked connection-invariant
42
+ * header stays correct -- `renderAgentsMd(inv)` is reused unchanged.
43
+ */
44
+ export declare function writeProductCodexAgentsMd(inv: AgentsMdConnectionInvariant, io: ConnectIO): void;
45
+ /**
46
+ * Write or merge the workstation-shared operator Codex seed at
47
+ * `$CODEX_HOME/AGENTS.md` (default `~/.codex/AGENTS.md`).
10
48
  *
11
- * The exact analog of `writeOrMergeClaudeMd` for the Codex operator surface:
12
- * AGENTS.md is Codex's CLAUDE.md-equivalent. Same merge semantics --
13
- * - Fresh repo: writes the seeded block straight in.
14
- * - Existing AGENTS.md without the Telora delimiters: appends a delimited
15
- * block at the end; user content untouched.
16
- * - Existing AGENTS.md WITH the delimiters: replaces only the delimited block.
49
+ * Read by an interactive operator running Codex AND by daemon-spawned HOSTED
50
+ * Codex agents (whose auth lives in `~/.codex` and whose CODEX_HOME therefore
51
+ * cannot be redirected). Header-LESS: one workstation hosts many products, so
52
+ * this shared file cannot bake a correct per-product header -- the identity is
53
+ * resolved on demand via `telora-daemon status`.
54
+ */
55
+ export declare function writeOrMergeGlobalAgentsMd(io: ConnectIO): void;
56
+ /**
57
+ * Write or merge a seeded `AGENTS.md` at the repo root, SAFELY (IDE harnesses).
17
58
  *
18
- * Idempotent at the filesystem level: when the computed content equals what is
19
- * already on disk, NO write occurs (no spurious mtime bump, no git churn). The
20
- * daemon re-invokes this on boot to self-heal the seed block, so the
21
- * unchanged-common-case must not touch the file.
59
+ * Cursor / VS Code read a repo-root AGENTS.md natively and have no off-repo
60
+ * carrier, so those harnesses still seed one -- but never at the cost of dirtying
61
+ * tracked content. If the repo TRACKS AGENTS.md, this REPORTS that state and
62
+ * writes nothing (the repo owns its tracked file). Only an absent or untracked
63
+ * AGENTS.md is created / merged. The Codex harness NO LONGER writes here.
22
64
  */
23
65
  export declare function writeOrMergeAgentsMd(repoPath: string, inv: AgentsMdConnectionInvariant, io: ConnectIO): void;
66
+ /**
67
+ * Retire a connector-written repo-root `AGENTS.md` seed block. The Codex path
68
+ * used to write one; the connector no longer owns `<repo>/AGENTS.md`, so this
69
+ * removes the block it left behind -- honoring the ownership asymmetry
70
+ * (connector-created file removed; repo-tracked file reported, never rewritten).
71
+ * See `retireSeedFile` for the three on-disk states handled.
72
+ */
73
+ export declare function retireAgentsMdSeed(repoPath: string, io: ConnectIO): void;
24
74
  //# sourceMappingURL=agents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/cli/connect/agents.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAIL,KAAK,2BAA2B,EACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,2BAA2B,EAChC,EAAE,EAAE,SAAS,GACZ,IAAI,CA0CN"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/cli/connect/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,OAAO,EAKL,KAAK,2BAA2B,EACjC,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAwDD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,2BAA2B,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAG/F;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAE9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,2BAA2B,EAChC,EAAE,EAAE,SAAS,GACZ,IAAI,CAUN;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAExE"}
@@ -1,30 +1,61 @@
1
1
  /**
2
- * Codex/IDE harness config writer: the seeded `AGENTS.md` block. Extracted
3
- * verbatim from `../connect.ts` and re-exported from there for import
4
- * stability.
2
+ * Codex/IDE harness config writer: the seeded `AGENTS.md` block.
3
+ *
4
+ * Codex has no SessionStart hook, so its seed cannot ride the harness the way
5
+ * the Claude seed does -- it needs a FILE carrier, and that file must live off
6
+ * the repo root so the connector never fights the repo for `<repo>/AGENTS.md`.
7
+ * There are three carriers, one per consumer:
8
+ *
9
+ * - `writeProductCodexAgentsMd` -> the daemon's ISOLATED PER-PRODUCT CODEX_HOME
10
+ * (`~/.telora/codex/<productId>/AGENTS.md`, resolveProductCodexHome). Read by
11
+ * daemon-spawned LOCAL-MODEL Codex agents (whose CODEX_HOME is redirected
12
+ * there at spawn). Being per-product, it carries the baked per-product
13
+ * connection-invariant header correctly.
14
+ * - `writeOrMergeGlobalAgentsMd` -> the operator's own `~/.codex/AGENTS.md`
15
+ * (globalAgentsMdPath). Read by an INTERACTIVE operator running Codex AND by
16
+ * daemon-spawned HOSTED Codex agents (whose ChatGPT-account auth lives in
17
+ * `~/.codex/auth.json`, so their CODEX_HOME cannot be redirected without
18
+ * breaking auth). Workstation-shared across products, so it carries the
19
+ * HEADER-LESS seed (identity resolved on demand via `telora-daemon status`).
20
+ * - `writeOrMergeAgentsMd` -> a REPO-ROOT `<repo>/AGENTS.md` for the IDE
21
+ * harnesses (Cursor / VS Code) that read it natively and have no off-repo
22
+ * carrier. Made SAFE: it never creates or appends where the repo TRACKS
23
+ * AGENTS.md -- it reports that state instead, so it cannot dirty tracked
24
+ * content and reproduce this focus's original bug.
25
+ *
26
+ * `retireAgentsMdSeed` removes a connector-written repo-root AGENTS.md block the
27
+ * Codex file-writer era left behind.
5
28
  */
6
- import { existsSync, readFileSync, writeFileSync } from 'node:fs';
7
- import { resolve } from 'node:path';
8
- import { TELORA_AGENTS_MD_BEGIN, TELORA_AGENTS_MD_END, renderAgentsMd, } from '../../templates/agents-md.js';
29
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
30
+ import { homedir } from 'node:os';
31
+ import { dirname, join, resolve } from 'node:path';
32
+ import { TELORA_AGENTS_MD_BEGIN, TELORA_AGENTS_MD_END, renderAgentsMd, renderCodexOperatorSeed, } from '../../templates/agents-md.js';
33
+ import { resolveProductCodexHome } from '../codex-provision.js';
34
+ import { isPathTracked, retireSeedFile } from './seed-retirement.js';
9
35
  /**
10
- * Write or merge a seeded `AGENTS.md` at the repo root (Codex harness).
36
+ * The workstation-shared operator Codex AGENTS.md path: `$CODEX_HOME/AGENTS.md`,
37
+ * with CODEX_HOME defaulting to `~/.codex`. This is the location an interactive
38
+ * Codex session (and a hosted daemon spawn) reads global instructions from.
39
+ */
40
+ export function globalAgentsMdPath() {
41
+ const codexHome = process.env.CODEX_HOME || join(homedir(), '.codex');
42
+ return join(codexHome, 'AGENTS.md');
43
+ }
44
+ /**
45
+ * Core delimited-block merge for an AGENTS.md at an absolute path, given a
46
+ * pre-rendered seed block.
11
47
  *
12
- * The exact analog of `writeOrMergeClaudeMd` for the Codex operator surface:
13
- * AGENTS.md is Codex's CLAUDE.md-equivalent. Same merge semantics --
14
- * - Fresh repo: writes the seeded block straight in.
15
- * - Existing AGENTS.md without the Telora delimiters: appends a delimited
16
- * block at the end; user content untouched.
17
- * - Existing AGENTS.md WITH the delimiters: replaces only the delimited block.
48
+ * - No file: writes the seeded block straight in (creating the parent dir).
49
+ * - File without the Telora delimiters: appends a delimited block; user
50
+ * content untouched.
51
+ * - File WITH the delimiters: replaces only the delimited block.
18
52
  *
19
53
  * Idempotent at the filesystem level: when the computed content equals what is
20
- * already on disk, NO write occurs (no spurious mtime bump, no git churn). The
21
- * daemon re-invokes this on boot to self-heal the seed block, so the
22
- * unchanged-common-case must not touch the file.
54
+ * already on disk, NO write occurs (no spurious mtime bump, no git churn).
23
55
  */
24
- export function writeOrMergeAgentsMd(repoPath, inv, io) {
25
- const path = resolve(repoPath, 'AGENTS.md');
26
- const seedBlock = renderAgentsMd(inv);
56
+ function writeOrMergeAgentsBlockAt(path, seedBlock, io) {
27
57
  if (!existsSync(path)) {
58
+ mkdirSync(dirname(path), { recursive: true });
28
59
  writeFileSync(path, seedBlock);
29
60
  io.out(`Wrote ${path}.\n`);
30
61
  return;
@@ -62,4 +93,56 @@ export function writeOrMergeAgentsMd(repoPath, inv, io) {
62
93
  writeFileSync(path, newContent);
63
94
  io.out(message);
64
95
  }
96
+ /**
97
+ * Write or merge the PER-PRODUCT Codex seed into the isolated CODEX_HOME
98
+ * (`~/.telora/codex/<productId>/AGENTS.md`). This is the carrier a daemon-spawned
99
+ * LOCAL-MODEL Codex agent reads (its CODEX_HOME is redirected there at spawn).
100
+ * The destination is genuinely per-product, so the baked connection-invariant
101
+ * header stays correct -- `renderAgentsMd(inv)` is reused unchanged.
102
+ */
103
+ export function writeProductCodexAgentsMd(inv, io) {
104
+ const path = resolve(resolveProductCodexHome(inv.productId), 'AGENTS.md');
105
+ writeOrMergeAgentsBlockAt(path, renderAgentsMd(inv), io);
106
+ }
107
+ /**
108
+ * Write or merge the workstation-shared operator Codex seed at
109
+ * `$CODEX_HOME/AGENTS.md` (default `~/.codex/AGENTS.md`).
110
+ *
111
+ * Read by an interactive operator running Codex AND by daemon-spawned HOSTED
112
+ * Codex agents (whose auth lives in `~/.codex` and whose CODEX_HOME therefore
113
+ * cannot be redirected). Header-LESS: one workstation hosts many products, so
114
+ * this shared file cannot bake a correct per-product header -- the identity is
115
+ * resolved on demand via `telora-daemon status`.
116
+ */
117
+ export function writeOrMergeGlobalAgentsMd(io) {
118
+ writeOrMergeAgentsBlockAt(globalAgentsMdPath(), renderCodexOperatorSeed(), io);
119
+ }
120
+ /**
121
+ * Write or merge a seeded `AGENTS.md` at the repo root, SAFELY (IDE harnesses).
122
+ *
123
+ * Cursor / VS Code read a repo-root AGENTS.md natively and have no off-repo
124
+ * carrier, so those harnesses still seed one -- but never at the cost of dirtying
125
+ * tracked content. If the repo TRACKS AGENTS.md, this REPORTS that state and
126
+ * writes nothing (the repo owns its tracked file). Only an absent or untracked
127
+ * AGENTS.md is created / merged. The Codex harness NO LONGER writes here.
128
+ */
129
+ export function writeOrMergeAgentsMd(repoPath, inv, io) {
130
+ const path = resolve(repoPath, 'AGENTS.md');
131
+ if (existsSync(path) && isPathTracked(repoPath, 'AGENTS.md')) {
132
+ io.out(`AGENTS.md at ${path} is repo-tracked; leaving it to the repo (the ` +
133
+ `connector will not modify tracked content).\n`);
134
+ return;
135
+ }
136
+ writeOrMergeAgentsBlockAt(path, renderAgentsMd(inv), io);
137
+ }
138
+ /**
139
+ * Retire a connector-written repo-root `AGENTS.md` seed block. The Codex path
140
+ * used to write one; the connector no longer owns `<repo>/AGENTS.md`, so this
141
+ * removes the block it left behind -- honoring the ownership asymmetry
142
+ * (connector-created file removed; repo-tracked file reported, never rewritten).
143
+ * See `retireSeedFile` for the three on-disk states handled.
144
+ */
145
+ export function retireAgentsMdSeed(repoPath, io) {
146
+ retireSeedFile(repoPath, 'AGENTS.md', TELORA_AGENTS_MD_BEGIN, TELORA_AGENTS_MD_END, io);
147
+ }
65
148
  //# sourceMappingURL=agents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/cli/connect/agents.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,GAEf,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,GAAgC,EAChC,EAAa;IAEb,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC/B,EAAE,CAAC,GAAG,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE1D,IAAI,UAAkB,CAAC;IACvB,IAAI,OAAe,CAAC;IACp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ire the connector-written `CLAUDE.md` seed block at the repo root.
9
9
  *
10
- * - Fresh repo: writes the seeded block straight in.
11
- * - Existing CLAUDE.md without the Telora delimiters: appends a delimited
12
- * Telora block at the end. The user's content is untouched.
13
- * - Existing CLAUDE.md WITH the delimiters: replaces only the delimited
14
- * block. Re-runs are byte-identical (no churn, no duplication).
15
- *
16
- * Idempotent at the filesystem level: when the computed content equals what
17
- * is already on disk, NO write occurs (no spurious mtime bump, no git churn).
18
- * The daemon re-invokes this on every boot to self-heal the seed block, so
19
- * the unchanged-common-case must not touch the file.
10
+ * The Claude workstation seed is now workstation-scoped context delivered by the
11
+ * SessionStart hook (`telora-daemon session-state`), not a file the connector
12
+ * writes to the repo root -- so the connector stops owning `<repo>/CLAUDE.md`.
13
+ * This pass removes the delimited block it once wrote, honoring the ownership
14
+ * asymmetry (connector-created file -> removed; repo-tracked file -> reported,
15
+ * never rewritten). See `retireSeedFile` for the three on-disk states handled.
20
16
  */
21
- export declare function writeOrMergeClaudeMd(repoPath: string, productName: string | null, io: ConnectIO): void;
17
+ export declare function retireClaudeMdSeed(repoPath: string, io: ConnectIO): void;
22
18
  /**
23
19
  * Write or deep-merge `<repo>/.claude/settings.json`.
24
20
  *
25
- * Fresh: writes the template directly.
26
- * Existing: deep-merges our `permissions.allow` entries into the user's
27
- * settings, deduplicating. All other top-level keys are untouched.
28
- * Re-runs produce no diff.
21
+ * Fresh: writes the template directly (creating `.claude/`).
22
+ * Existing: deep-merges our `permissions.allow` + the SessionStart seed hook
23
+ * into the user's settings, deduplicating. All other top-level keys are
24
+ * untouched. Re-runs produce no diff.
25
+ *
26
+ * Idempotent at the filesystem level: when the merged content equals what is
27
+ * already on disk, NO write occurs (no spurious mtime bump, no git churn). This
28
+ * matters because the daemon now re-invokes this on every boot
29
+ * (`refreshClaudeSettingsForProducts`) to migrate the SessionStart seed hook
30
+ * into already-connected repos -- the unchanged-common-case must not touch the
31
+ * file.
29
32
  */
30
33
  export declare function writeOrMergeClaudeSettings(repoPath: string, io: ConnectIO): void;
31
34
  //# sourceMappingURL=claude.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/cli/connect/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,EAAE,EAAE,SAAS,GACZ,IAAI,CAiDN;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CA0BhF"}
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/cli/connect/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAExE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAiChF"}
@@ -5,88 +5,47 @@
5
5
  */
6
6
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
7
7
  import { resolve } from 'node:path';
8
- import { TELORA_CLAUDE_MD_BEGIN, TELORA_CLAUDE_MD_END, renderClaudeMd, } from '../../templates/claude-md.js';
8
+ import { TELORA_CLAUDE_MD_BEGIN, TELORA_CLAUDE_MD_END, } from '../../templates/claude-md.js';
9
9
  import { buildClaudeSettings, mergeClaudeSettings, } from '../../templates/claude-settings.js';
10
+ import { retireSeedFile } from './seed-retirement.js';
10
11
  /**
11
- * Write or merge a seeded `CLAUDE.md` at the repo root.
12
+ * Retire the connector-written `CLAUDE.md` seed block at the repo root.
12
13
  *
13
- * - Fresh repo: writes the seeded block straight in.
14
- * - Existing CLAUDE.md without the Telora delimiters: appends a delimited
15
- * Telora block at the end. The user's content is untouched.
16
- * - Existing CLAUDE.md WITH the delimiters: replaces only the delimited
17
- * block. Re-runs are byte-identical (no churn, no duplication).
18
- *
19
- * Idempotent at the filesystem level: when the computed content equals what
20
- * is already on disk, NO write occurs (no spurious mtime bump, no git churn).
21
- * The daemon re-invokes this on every boot to self-heal the seed block, so
22
- * the unchanged-common-case must not touch the file.
14
+ * The Claude workstation seed is now workstation-scoped context delivered by the
15
+ * SessionStart hook (`telora-daemon session-state`), not a file the connector
16
+ * writes to the repo root -- so the connector stops owning `<repo>/CLAUDE.md`.
17
+ * This pass removes the delimited block it once wrote, honoring the ownership
18
+ * asymmetry (connector-created file -> removed; repo-tracked file -> reported,
19
+ * never rewritten). See `retireSeedFile` for the three on-disk states handled.
23
20
  */
24
- export function writeOrMergeClaudeMd(repoPath, productName, io) {
25
- const path = resolve(repoPath, 'CLAUDE.md');
26
- const seedBlock = renderClaudeMd(productName);
27
- if (!existsSync(path)) {
28
- writeFileSync(path, seedBlock);
29
- io.out(`Wrote ${path}.\n`);
30
- return;
31
- }
32
- const existing = readFileSync(path, 'utf-8');
33
- const beginIdx = existing.indexOf(TELORA_CLAUDE_MD_BEGIN);
34
- let newContent;
35
- let message;
36
- if (beginIdx === -1) {
37
- // No prior Telora block -- append, preserving user content.
38
- const sep = existing.endsWith('\n') ? '\n' : '\n\n';
39
- newContent = existing + sep + seedBlock;
40
- message = `Appended Telora seed block to ${path}.\n`;
41
- }
42
- else {
43
- const endIdx = existing.indexOf(TELORA_CLAUDE_MD_END, beginIdx);
44
- if (endIdx === -1) {
45
- // Begin marker without end -- treat as malformed. Append a fresh block
46
- // rather than risk corrupting whatever's there.
47
- const sep = existing.endsWith('\n') ? '\n' : '\n\n';
48
- newContent = existing + sep + seedBlock;
49
- message = `Appended Telora seed block to ${path} (prior block was malformed).\n`;
50
- }
51
- else {
52
- // Replace the existing Telora block in place.
53
- const after = endIdx + TELORA_CLAUDE_MD_END.length;
54
- // Trim a trailing newline after the end marker so we don't accumulate
55
- // blank lines on each re-run.
56
- const trailingNewline = existing[after] === '\n' ? 1 : 0;
57
- newContent =
58
- existing.slice(0, beginIdx) +
59
- seedBlock.trimEnd() +
60
- '\n' +
61
- existing.slice(after + trailingNewline);
62
- message = `Refreshed Telora seed block in ${path}.\n`;
63
- }
64
- }
65
- // Idempotency guard: skip the write entirely when nothing would change.
66
- // This keeps the boot-time self-heal a no-op for already-current repos.
67
- if (newContent === existing)
68
- return;
69
- writeFileSync(path, newContent);
70
- io.out(message);
21
+ export function retireClaudeMdSeed(repoPath, io) {
22
+ retireSeedFile(repoPath, 'CLAUDE.md', TELORA_CLAUDE_MD_BEGIN, TELORA_CLAUDE_MD_END, io);
71
23
  }
72
24
  /**
73
25
  * Write or deep-merge `<repo>/.claude/settings.json`.
74
26
  *
75
- * Fresh: writes the template directly.
76
- * Existing: deep-merges our `permissions.allow` entries into the user's
77
- * settings, deduplicating. All other top-level keys are untouched.
78
- * Re-runs produce no diff.
27
+ * Fresh: writes the template directly (creating `.claude/`).
28
+ * Existing: deep-merges our `permissions.allow` + the SessionStart seed hook
29
+ * into the user's settings, deduplicating. All other top-level keys are
30
+ * untouched. Re-runs produce no diff.
31
+ *
32
+ * Idempotent at the filesystem level: when the merged content equals what is
33
+ * already on disk, NO write occurs (no spurious mtime bump, no git churn). This
34
+ * matters because the daemon now re-invokes this on every boot
35
+ * (`refreshClaudeSettingsForProducts`) to migrate the SessionStart seed hook
36
+ * into already-connected repos -- the unchanged-common-case must not touch the
37
+ * file.
79
38
  */
80
39
  export function writeOrMergeClaudeSettings(repoPath, io) {
81
40
  const dir = resolve(repoPath, '.claude');
82
41
  const path = resolve(dir, 'settings.json');
83
42
  const seed = buildClaudeSettings();
84
- if (!existsSync(dir))
85
- mkdirSync(dir, { recursive: true });
86
43
  let existing = null;
44
+ let existingRaw = null;
87
45
  if (existsSync(path)) {
88
46
  try {
89
- const parsed = JSON.parse(readFileSync(path, 'utf-8'));
47
+ existingRaw = readFileSync(path, 'utf-8');
48
+ const parsed = JSON.parse(existingRaw);
90
49
  if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
91
50
  existing = parsed;
92
51
  }
@@ -98,7 +57,14 @@ export function writeOrMergeClaudeSettings(repoPath, io) {
98
57
  }
99
58
  }
100
59
  const merged = mergeClaudeSettings(existing, seed);
101
- writeFileSync(path, JSON.stringify(merged, null, 2) + '\n');
102
- io.out(existing ? `Merged Telora entries into ${path}.\n` : `Wrote ${path}.\n`);
60
+ const nextRaw = JSON.stringify(merged, null, 2) + '\n';
61
+ // Idempotency guard: skip the write (and the dir mkdir) entirely when nothing
62
+ // would change, so the boot-cadence refresh is a pure no-op for current repos.
63
+ if (existingRaw !== null && nextRaw === existingRaw)
64
+ return;
65
+ if (!existsSync(dir))
66
+ mkdirSync(dir, { recursive: true });
67
+ writeFileSync(path, nextRaw);
68
+ io.out(existingRaw !== null ? `Merged Telora entries into ${path}.\n` : `Wrote ${path}.\n`);
103
69
  }
104
70
  //# sourceMappingURL=claude.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/cli/connect/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAG5C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,WAA0B,EAC1B,EAAa;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AW;QAAE,OAAO;IAE5D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1D,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7B,EAAE,CAAC,GAAG,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,8BAA8B,IAAI,KAAK,CAAC,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC;AAC9F,CAAC"}
@@ -18,8 +18,9 @@ export declare function harnessGitignoreEntries(harness: OperatorHarness): strin
18
18
  * `connect --harness <h>` and the token-free `harness add <h>` verb produce
19
19
  * byte-identical output for a given identity.
20
20
  *
21
- * - claude: CLAUDE.md + .claude/settings.json
22
- * - codex: AGENTS.md + Telora MCP in ~/.codex/config.toml
21
+ * - claude: .claude/settings.json (SessionStart seed hook) + retire any repo CLAUDE.md
22
+ * - codex: global $CODEX_HOME/AGENTS.md + Telora MCP in ~/.codex/config.toml
23
+ * (repo-root AGENTS.md seed retired)
23
24
  * - cline: .cline/rules/telora.md + Telora MCP in ~/.cline settings
24
25
  * - cursor: AGENTS.md + .cursor/mcp.json (preload env)
25
26
  * - vscode: AGENTS.md + .vscode/mcp.json (preload env)
@@ -1 +1 @@
1
- {"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../../src/cli/connect/scaffolding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAO9D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,EAAE,CAE1E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,2BAA2B,EAChC,EAAE,EAAE,SAAS,GACZ,IAAI,CAaN"}
1
+ {"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../../src/cli/connect/scaffolding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAU9D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,EAAE,CAE1E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,2BAA2B,EAChC,EAAE,EAAE,SAAS,GACZ,IAAI,CAuBN"}