agentera 3.0.0-dev.5 → 3.0.0-dev.6

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 (247) hide show
  1. package/README.md +4 -3
  2. package/bundle/references/adapters/opencode.md +1 -1
  3. package/bundle/references/adapters/package-registry.yaml +0 -1
  4. package/bundle/references/adapters/package-surface-characterization.md +1 -2
  5. package/bundle/references/analysis/startup-measurement-contract.yaml +11 -11
  6. package/bundle/references/cli/audience-namespace-cli-migration.yaml +40 -26
  7. package/bundle/references/cli/bundle-skill-vocabulary.yaml +1 -29
  8. package/bundle/references/cli/coexistence-probe.yaml +9 -0
  9. package/bundle/references/cli/single-name-protocol.yaml +42 -0
  10. package/bundle/references/cli/update-channels.yaml +1 -0
  11. package/bundle/references/cli/upgrade-repair-wording.md +31 -0
  12. package/bundle/references/cli/v3-handoff-manifest.schema.yaml +98 -0
  13. package/bundle/references/cli/vocabulary.md +12 -10
  14. package/bundle/references/meta/documentation-inventory.md +9 -3
  15. package/bundle/skills/agentera/SKILL.md +14 -14
  16. package/dist/analytics/extractCorpus/cli.js +101 -0
  17. package/dist/analytics/extractCorpus/cli.js.map +1 -0
  18. package/dist/analytics/extractCorpus/copilotSessions.js +231 -0
  19. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -0
  20. package/dist/analytics/extractCorpus/core.js +357 -0
  21. package/dist/analytics/extractCorpus/core.js.map +1 -0
  22. package/dist/analytics/extractCorpus/corpus.js +132 -0
  23. package/dist/analytics/extractCorpus/corpus.js.map +1 -0
  24. package/dist/analytics/extractCorpus/cursorSessions.js +420 -0
  25. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -0
  26. package/dist/analytics/extractCorpus/filesystemSources.js +122 -0
  27. package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -0
  28. package/dist/analytics/extractCorpus/index.js +9 -0
  29. package/dist/analytics/extractCorpus/index.js.map +1 -0
  30. package/dist/analytics/extractCorpus/jsonlSessions.js +185 -0
  31. package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -0
  32. package/dist/analytics/extractCorpus/sqliteSessions.js +275 -0
  33. package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -0
  34. package/dist/analytics/extractCorpus.js +2 -1790
  35. package/dist/analytics/extractCorpus.js.map +1 -1
  36. package/dist/analytics/usageStats.js +1 -1
  37. package/dist/analytics/usageStats.js.map +1 -1
  38. package/dist/cli/capabilityContext/benchmark.js +557 -0
  39. package/dist/cli/capabilityContext/benchmark.js.map +1 -0
  40. package/dist/cli/capabilityContext/bespoke.js +25 -0
  41. package/dist/cli/capabilityContext/bespoke.js.map +1 -0
  42. package/dist/cli/capabilityContext/closeout.js +230 -0
  43. package/dist/cli/capabilityContext/closeout.js.map +1 -0
  44. package/dist/cli/capabilityContext/contract.js +186 -0
  45. package/dist/cli/capabilityContext/contract.js.map +1 -0
  46. package/dist/cli/capabilityContext/evidence.js +446 -0
  47. package/dist/cli/capabilityContext/evidence.js.map +1 -0
  48. package/dist/cli/capabilityContext/index.js +4 -0
  49. package/dist/cli/capabilityContext/index.js.map +1 -0
  50. package/dist/cli/capabilityContext/orchestration.js +107 -0
  51. package/dist/cli/capabilityContext/orchestration.js.map +1 -0
  52. package/dist/cli/capabilityContext/planState.js +271 -0
  53. package/dist/cli/capabilityContext/planState.js.map +1 -0
  54. package/dist/cli/capabilityContext/progress.js +96 -0
  55. package/dist/cli/capabilityContext/progress.js.map +1 -0
  56. package/dist/cli/capabilityContext/realisera.js +174 -0
  57. package/dist/cli/capabilityContext/realisera.js.map +1 -0
  58. package/dist/cli/capabilityContext/shared.js +94 -0
  59. package/dist/cli/capabilityContext/shared.js.map +1 -0
  60. package/dist/cli/capabilityContext/slim.js +106 -0
  61. package/dist/cli/capabilityContext/slim.js.map +1 -0
  62. package/dist/cli/capabilityContext/startup.js +208 -0
  63. package/dist/cli/capabilityContext/startup.js.map +1 -0
  64. package/dist/cli/capabilityContext/types.js +43 -0
  65. package/dist/cli/capabilityContext/types.js.map +1 -0
  66. package/dist/cli/capabilityContext.js +1 -2486
  67. package/dist/cli/capabilityContext.js.map +1 -1
  68. package/dist/cli/commands/backfill.js +84 -0
  69. package/dist/cli/commands/backfill.js.map +1 -0
  70. package/dist/cli/commands/compact.js +1 -1
  71. package/dist/cli/commands/compact.js.map +1 -1
  72. package/dist/cli/commands/doctor.js +24 -7
  73. package/dist/cli/commands/doctor.js.map +1 -1
  74. package/dist/cli/commands/lint.js +4 -36
  75. package/dist/cli/commands/lint.js.map +1 -1
  76. package/dist/cli/commands/query.js +1 -1
  77. package/dist/cli/commands/query.js.map +1 -1
  78. package/dist/cli/commands/report.js +11 -2
  79. package/dist/cli/commands/report.js.map +1 -1
  80. package/dist/cli/commands/schema.js +1 -2
  81. package/dist/cli/commands/schema.js.map +1 -1
  82. package/dist/cli/commands/state/decisions.js +397 -0
  83. package/dist/cli/commands/state/decisions.js.map +1 -0
  84. package/dist/cli/commands/state/docs.js +93 -0
  85. package/dist/cli/commands/state/docs.js.map +1 -0
  86. package/dist/cli/commands/state/experiments.js +67 -0
  87. package/dist/cli/commands/state/experiments.js.map +1 -0
  88. package/dist/cli/commands/state/health.js +114 -0
  89. package/dist/cli/commands/state/health.js.map +1 -0
  90. package/dist/cli/commands/state/index.js +51 -0
  91. package/dist/cli/commands/state/index.js.map +1 -0
  92. package/dist/cli/commands/state/objective.js +68 -0
  93. package/dist/cli/commands/state/objective.js.map +1 -0
  94. package/dist/cli/commands/state/plan.js +172 -0
  95. package/dist/cli/commands/state/plan.js.map +1 -0
  96. package/dist/cli/commands/state/progress.js +47 -0
  97. package/dist/cli/commands/state/progress.js.map +1 -0
  98. package/dist/cli/commands/state/shared.js +15 -0
  99. package/dist/cli/commands/state/shared.js.map +1 -0
  100. package/dist/cli/commands/state/todo.js +121 -0
  101. package/dist/cli/commands/state/todo.js.map +1 -0
  102. package/dist/cli/commands/state.js +7 -7
  103. package/dist/cli/commands/state.js.map +1 -1
  104. package/dist/cli/commands/validate.js +32 -18
  105. package/dist/cli/commands/validate.js.map +1 -1
  106. package/dist/cli/dispatch/check.js +328 -0
  107. package/dist/cli/dispatch/check.js.map +1 -0
  108. package/dist/cli/dispatch/index.js +177 -0
  109. package/dist/cli/dispatch/index.js.map +1 -0
  110. package/dist/cli/dispatch/lifecycle.js +492 -0
  111. package/dist/cli/dispatch/lifecycle.js.map +1 -0
  112. package/dist/cli/dispatch/prime.js +100 -0
  113. package/dist/cli/dispatch/prime.js.map +1 -0
  114. package/dist/cli/dispatch/shared.js +64 -0
  115. package/dist/cli/dispatch/shared.js.map +1 -0
  116. package/dist/cli/dispatch/state.js +149 -0
  117. package/dist/cli/dispatch/state.js.map +1 -0
  118. package/dist/cli/dispatch.js +1 -1293
  119. package/dist/cli/dispatch.js.map +1 -1
  120. package/dist/cli/help.js +0 -2
  121. package/dist/cli/help.js.map +1 -1
  122. package/dist/cli/orientation.js +1 -1
  123. package/dist/cli/orientation.js.map +1 -1
  124. package/dist/core/git.js +43 -0
  125. package/dist/core/git.js.map +1 -0
  126. package/dist/hooks/common.js +8 -23
  127. package/dist/hooks/common.js.map +1 -1
  128. package/dist/hooks/compaction/apply.js +244 -0
  129. package/dist/hooks/compaction/apply.js.map +1 -0
  130. package/dist/hooks/compaction/dryRun.js +181 -0
  131. package/dist/hooks/compaction/dryRun.js.map +1 -0
  132. package/dist/hooks/compaction/index.js +23 -0
  133. package/dist/hooks/compaction/index.js.map +1 -0
  134. package/dist/hooks/compaction/parse.js +129 -0
  135. package/dist/hooks/compaction/parse.js.map +1 -0
  136. package/dist/hooks/compaction/retention.js +197 -0
  137. package/dist/hooks/compaction/retention.js.map +1 -0
  138. package/dist/hooks/compaction/status.js +243 -0
  139. package/dist/hooks/compaction/status.js.map +1 -0
  140. package/dist/hooks/compaction/types.js +6 -0
  141. package/dist/hooks/compaction/types.js.map +1 -0
  142. package/dist/hooks/compaction.js +20 -20
  143. package/dist/hooks/compaction.js.map +1 -1
  144. package/dist/hooks/cursorPreToolUse.js +1 -1
  145. package/dist/hooks/cursorPreToolUse.js.map +1 -1
  146. package/dist/hooks/sessionStart.js +4 -4
  147. package/dist/hooks/sessionStart.js.map +1 -1
  148. package/dist/hooks/sessionStop.js +3 -12
  149. package/dist/hooks/sessionStop.js.map +1 -1
  150. package/dist/hooks/validateArtifact/agentFacing.js +10 -0
  151. package/dist/hooks/validateArtifact/agentFacing.js.map +1 -0
  152. package/dist/hooks/validateArtifact/index.js +149 -0
  153. package/dist/hooks/validateArtifact/index.js.map +1 -0
  154. package/dist/hooks/validateArtifact/markdown.js +95 -0
  155. package/dist/hooks/validateArtifact/markdown.js.map +1 -0
  156. package/dist/hooks/validateArtifact/runtime.js +83 -0
  157. package/dist/hooks/validateArtifact/runtime.js.map +1 -0
  158. package/dist/hooks/validateArtifact/schema.js +455 -0
  159. package/dist/hooks/validateArtifact/schema.js.map +1 -0
  160. package/dist/hooks/validateArtifact/traversal.js +105 -0
  161. package/dist/hooks/validateArtifact/traversal.js.map +1 -0
  162. package/dist/hooks/validateArtifact/violations.js +105 -0
  163. package/dist/hooks/validateArtifact/violations.js.map +1 -0
  164. package/dist/hooks/validateArtifact.js +29 -40
  165. package/dist/hooks/validateArtifact.js.map +1 -1
  166. package/dist/migrate/v2HandoffManifest.js +333 -0
  167. package/dist/migrate/v2HandoffManifest.js.map +1 -0
  168. package/dist/registries/artifactProtocolIds.js +77 -0
  169. package/dist/registries/artifactProtocolIds.js.map +1 -0
  170. package/dist/release/releaseMetadata.js +235 -0
  171. package/dist/release/releaseMetadata.js.map +1 -0
  172. package/dist/setup/codex/agents.js +96 -0
  173. package/dist/setup/codex/agents.js.map +1 -0
  174. package/dist/setup/codex/cli.js +161 -0
  175. package/dist/setup/codex/cli.js.map +1 -0
  176. package/dist/setup/codex/configToml.js +644 -0
  177. package/dist/setup/codex/configToml.js.map +1 -0
  178. package/dist/setup/codex/constants.js +29 -0
  179. package/dist/setup/codex/constants.js.map +1 -0
  180. package/dist/setup/codex/installRoot.js +64 -0
  181. package/dist/setup/codex/installRoot.js.map +1 -0
  182. package/dist/setup/codex/state.js +270 -0
  183. package/dist/setup/codex/state.js.map +1 -0
  184. package/dist/setup/codex.js +11 -1196
  185. package/dist/setup/codex.js.map +1 -1
  186. package/dist/setup/doctor/core.js +300 -0
  187. package/dist/setup/doctor/core.js.map +1 -0
  188. package/dist/setup/doctor/diagnostics.js +247 -0
  189. package/dist/setup/doctor/diagnostics.js.map +1 -0
  190. package/dist/setup/doctor/opencode.js +281 -0
  191. package/dist/setup/doctor/opencode.js.map +1 -0
  192. package/dist/setup/doctor/report.js +474 -0
  193. package/dist/setup/doctor/report.js.map +1 -0
  194. package/dist/setup/doctor.js +9 -1296
  195. package/dist/setup/doctor.js.map +1 -1
  196. package/dist/setup/opencode.js +13 -0
  197. package/dist/setup/opencode.js.map +1 -0
  198. package/dist/setup/smokeChecks.js +1 -1
  199. package/dist/setup/smokeChecks.js.map +1 -1
  200. package/dist/state/progressCommit.js +289 -0
  201. package/dist/state/progressCommit.js.map +1 -0
  202. package/dist/state/startupAnalysis/benchmark.js +367 -0
  203. package/dist/state/startupAnalysis/benchmark.js.map +1 -0
  204. package/dist/state/startupAnalysis/contract.js +122 -0
  205. package/dist/state/startupAnalysis/contract.js.map +1 -0
  206. package/dist/state/startupAnalysis/helpers.js +332 -0
  207. package/dist/state/startupAnalysis/helpers.js.map +1 -0
  208. package/dist/state/startupAnalysis/index.js +7 -0
  209. package/dist/state/startupAnalysis/index.js.map +1 -0
  210. package/dist/state/startupAnalysis/metrics.js +334 -0
  211. package/dist/state/startupAnalysis/metrics.js.map +1 -0
  212. package/dist/state/startupAnalysis/records.js +195 -0
  213. package/dist/state/startupAnalysis/records.js.map +1 -0
  214. package/dist/state/startupAnalysis/report.js +123 -0
  215. package/dist/state/startupAnalysis/report.js.map +1 -0
  216. package/dist/state/startupAnalysis/threshold.js +500 -0
  217. package/dist/state/startupAnalysis/threshold.js.map +1 -0
  218. package/dist/state/startupAnalysis.js +2 -1952
  219. package/dist/state/startupAnalysis.js.map +1 -1
  220. package/dist/upgrade/coexistenceProbe.js +83 -0
  221. package/dist/upgrade/coexistenceProbe.js.map +1 -0
  222. package/dist/upgrade/doctor.js +41 -2
  223. package/dist/upgrade/doctor.js.map +1 -1
  224. package/dist/upgrade/migrateArtifactsV2ToV3.js +5 -83
  225. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  226. package/dist/upgrade/nextMajorDoctor.js +16 -1
  227. package/dist/upgrade/nextMajorDoctor.js.map +1 -1
  228. package/dist/upgrade/projectIntegration.js +3 -1
  229. package/dist/upgrade/projectIntegration.js.map +1 -1
  230. package/dist/upgrade/runtimeMigration.js +13 -2
  231. package/dist/upgrade/runtimeMigration.js.map +1 -1
  232. package/dist/upgrade/v3CapabilitySurface.js +15 -0
  233. package/dist/upgrade/v3CapabilitySurface.js.map +1 -0
  234. package/dist/upgrade/versionResolution.js +8 -0
  235. package/dist/upgrade/versionResolution.js.map +1 -1
  236. package/dist/validate/appHomeContract.js +3 -3
  237. package/dist/validate/appHomeContract.js.map +1 -1
  238. package/dist/validate/selfAudit.js +62 -20
  239. package/dist/validate/selfAudit.js.map +1 -1
  240. package/dist/validate/vocabularyAuthority.js +298 -0
  241. package/dist/validate/vocabularyAuthority.js.map +1 -0
  242. package/package.json +3 -3
  243. package/bundle/references/v1-section-mapping.md +0 -47
  244. package/bundle/skills/hej/.claude-plugin/plugin.json +0 -6
  245. package/bundle/skills/hej/SKILL.md +0 -69
  246. package/bundle/skills/hej/agents/hej.toml +0 -11
  247. package/bundle/skills/hej/agents/openai.yaml +0 -8
@@ -0,0 +1,644 @@
1
+ import crypto from "node:crypto";
2
+ import fs from "node:fs";
3
+ import os from "node:os";
4
+ import path from "node:path";
5
+ import { isFile, pathExists, resolvePath } from "../../core/paths.js";
6
+ import { parseToml } from "../../core/toml.js";
7
+ import { CODEX_HOOK_COMMAND, CODEX_HOOK_MATCHER, CODEX_HOOK_STATUS_MESSAGE, CODEX_HOOK_TIMEOUT, CODEX_PLUGIN_HOOK_COMMAND, CODEX_PLUGIN_HOOK_SOURCE, CODEX_PLUGIN_ID, DEFAULT_AGENT_LIMITS, MANAGED_KEY, SECTION_NAME, SET_SUBTABLE_NAME, } from "./constants.js";
8
+ /** Python repr() for a scalar, used to display non-string sibling set values. */
9
+ function pyRepr(value) {
10
+ if (value === null || value === undefined)
11
+ return "None";
12
+ if (value === true)
13
+ return "True";
14
+ if (value === false)
15
+ return "False";
16
+ if (typeof value === "string") {
17
+ return value.includes("'") && !value.includes('"') ? `"${value}"` : `'${value}'`;
18
+ }
19
+ return String(value);
20
+ }
21
+ export function classifyToml(text) {
22
+ if (!text.trim()) {
23
+ return { sectionPresent: false, setPresent: false, setTable: {}, sectionLevelHome: null };
24
+ }
25
+ const parsed = parseToml(text);
26
+ const section = parsed[SECTION_NAME];
27
+ if (!section || typeof section !== "object" || Array.isArray(section)) {
28
+ return { sectionPresent: false, setPresent: false, setTable: {}, sectionLevelHome: null };
29
+ }
30
+ const sectionDict = section;
31
+ const sectionHome = sectionDict[MANAGED_KEY];
32
+ const sectionLevelHome = typeof sectionHome === "string" && sectionHome ? sectionHome : null;
33
+ const setValue = sectionDict.set;
34
+ if (!setValue || typeof setValue !== "object" || Array.isArray(setValue)) {
35
+ return { sectionPresent: true, setPresent: false, setTable: {}, sectionLevelHome };
36
+ }
37
+ const coerced = {};
38
+ for (const [key, value] of Object.entries(setValue)) {
39
+ coerced[String(key)] = typeof value === "string" ? value : pyRepr(value);
40
+ }
41
+ return { sectionPresent: true, setPresent: true, setTable: coerced, sectionLevelHome };
42
+ }
43
+ export function hasInlineSetLine(text) {
44
+ const plainLines = splitKeepEnds(text).map(rstripEol);
45
+ const sectionIdx = findSectionHeaderIndex(plainLines);
46
+ if (sectionIdx === null)
47
+ return false;
48
+ return findSetLineIndex(plainLines, sectionIdx) !== null;
49
+ }
50
+ export function hasSetSubtableHeader(text) {
51
+ const plainLines = splitKeepEnds(text).map(rstripEol);
52
+ return findTableHeaderIndex(plainLines, SET_SUBTABLE_NAME) !== null;
53
+ }
54
+ export function managedHomeInSet(section) {
55
+ const setValue = section.set;
56
+ if (!setValue || typeof setValue !== "object" || Array.isArray(setValue))
57
+ return null;
58
+ const value = setValue[MANAGED_KEY];
59
+ return typeof value === "string" && value ? value : null;
60
+ }
61
+ export function codexManagedHomeConfigured(text) {
62
+ if (!text || !text.trim())
63
+ return false;
64
+ const parsed = parseToml(text);
65
+ const section = parsed[SECTION_NAME];
66
+ if (!section || typeof section !== "object" || Array.isArray(section))
67
+ return false;
68
+ return managedHomeInSet(section) !== null;
69
+ }
70
+ export function needsShellEnvNormalize(state, text) {
71
+ if (state.sectionLevelHome !== null)
72
+ return true;
73
+ if (state.setPresent && !hasInlineSetLine(text))
74
+ return true;
75
+ if (hasSetSubtableHeader(text))
76
+ return true;
77
+ return false;
78
+ }
79
+ export function mergeSetPairs(section, installRoot) {
80
+ const pairs = {};
81
+ const setValue = section.set;
82
+ if (setValue && typeof setValue === "object" && !Array.isArray(setValue)) {
83
+ for (const [key, value] of Object.entries(setValue)) {
84
+ if (key === MANAGED_KEY)
85
+ continue;
86
+ pairs[String(key)] = typeof value === "string" ? value : pyRepr(value);
87
+ }
88
+ }
89
+ pairs[MANAGED_KEY] = installRoot;
90
+ return pairs;
91
+ }
92
+ function shellPolicySectionEnd(plainLines, sectionIdx) {
93
+ let idx = sectionIdx + 1;
94
+ while (idx < plainLines.length) {
95
+ const line = plainLines[idx];
96
+ if (SECTION_HEADER_RE.test(line))
97
+ return idx;
98
+ if (tableHeaderRe(SET_SUBTABLE_NAME).test(line)) {
99
+ idx += 1;
100
+ while (idx < plainLines.length && !/^\s*\[/.test(plainLines[idx]))
101
+ idx += 1;
102
+ continue;
103
+ }
104
+ if (/^\s*\[/.test(line))
105
+ return idx;
106
+ idx += 1;
107
+ }
108
+ return plainLines.length;
109
+ }
110
+ export function normalizeShellEnvironmentPolicy(text, installRoot) {
111
+ const parsed = parseToml(text);
112
+ const section = parsed[SECTION_NAME];
113
+ if (!section || typeof section !== "object" || Array.isArray(section)) {
114
+ throw new Error(`normalize_shell_environment_policy: [${SECTION_NAME}] missing`);
115
+ }
116
+ const pairs = mergeSetPairs(section, installRoot);
117
+ const linesWithEnds = splitKeepEnds(text);
118
+ const plainLines = linesWithEnds.map(rstripEol);
119
+ const sectionIdx = findSectionHeaderIndex(plainLines);
120
+ if (sectionIdx === null) {
121
+ throw new Error(`normalize_shell_environment_policy: [${SECTION_NAME}] header not found`);
122
+ }
123
+ const endIdx = shellPolicySectionEnd(plainLines, sectionIdx);
124
+ const terminator = lineTerminator(linesWithEnds[sectionIdx]);
125
+ const setLine = `set = ${emitSetInlineTable(pairs)}${terminator}`;
126
+ return [...linesWithEnds.slice(0, sectionIdx + 1), setLine, ...linesWithEnds.slice(endIdx)].join("");
127
+ }
128
+ // ── TOML emission ──────────────────────────────────────────────────
129
+ const BASIC_STRING_ESCAPE = {
130
+ "\\": "\\\\",
131
+ '"': '\\"',
132
+ "\b": "\\b",
133
+ "\f": "\\f",
134
+ "\n": "\\n",
135
+ "\r": "\\r",
136
+ "\t": "\\t",
137
+ };
138
+ export function tomlBasicString(value) {
139
+ const escapedChars = [];
140
+ for (const char of value) {
141
+ if (char in BASIC_STRING_ESCAPE) {
142
+ escapedChars.push(BASIC_STRING_ESCAPE[char]);
143
+ }
144
+ else if (char.charCodeAt(0) < 0x20) {
145
+ escapedChars.push("\\u" + char.charCodeAt(0).toString(16).toUpperCase().padStart(4, "0"));
146
+ }
147
+ else {
148
+ escapedChars.push(char);
149
+ }
150
+ }
151
+ return '"' + escapedChars.join("") + '"';
152
+ }
153
+ export function emitSetInlineTable(pairs) {
154
+ const entries = Object.entries(pairs);
155
+ const rendered = entries.map(([key, value]) => `${key} = ${tomlBasicString(value)}`).join(", ");
156
+ return entries.length > 0 ? `{ ${rendered} }` : "{ }";
157
+ }
158
+ export function renderAgentsConfigSection() {
159
+ return "[agents]\n" + Object.entries(DEFAULT_AGENT_LIMITS).map(([k, v]) => `${k} = ${v}`).join("\n") + "\n";
160
+ }
161
+ export function renderFreshConfig(installRoot) {
162
+ const setValue = emitSetInlineTable({ [MANAGED_KEY]: installRoot });
163
+ return (`[${SECTION_NAME}]\nset = ${setValue}\n\n` +
164
+ `${renderAgentsConfigSection()}\n` +
165
+ `[features.multi_agent_v2]\n` +
166
+ `max_concurrent_threads_per_session = 6\n`);
167
+ }
168
+ // ── Codex hook trust hashing ───────────────────────────────────────
169
+ /** Compact canonical JSON: sort_keys=True, separators=(",",":"), ensure_ascii. */
170
+ function canonicalJson(value) {
171
+ if (value === null || value === undefined)
172
+ return "null";
173
+ if (value === true)
174
+ return "true";
175
+ if (value === false)
176
+ return "false";
177
+ if (typeof value === "number")
178
+ return String(value);
179
+ if (typeof value === "string")
180
+ return jsonStringAscii(value);
181
+ if (Array.isArray(value))
182
+ return "[" + value.map((v) => canonicalJson(v)).join(",") + "]";
183
+ if (typeof value === "object") {
184
+ const keys = Object.keys(value).sort();
185
+ return "{" + keys.map((k) => `${jsonStringAscii(k)}:${canonicalJson(value[k])}`).join(",") + "}";
186
+ }
187
+ return "null";
188
+ }
189
+ function jsonStringAscii(str) {
190
+ let out = '"';
191
+ for (const ch of str) {
192
+ const cp = ch.codePointAt(0);
193
+ if (ch === '"')
194
+ out += '\\"';
195
+ else if (ch === "\\")
196
+ out += "\\\\";
197
+ else if (cp === 0x08)
198
+ out += "\\b";
199
+ else if (cp === 0x09)
200
+ out += "\\t";
201
+ else if (cp === 0x0a)
202
+ out += "\\n";
203
+ else if (cp === 0x0c)
204
+ out += "\\f";
205
+ else if (cp === 0x0d)
206
+ out += "\\r";
207
+ else if (cp < 0x20)
208
+ out += "\\u" + cp.toString(16).padStart(4, "0");
209
+ else if (cp < 0x80)
210
+ out += ch;
211
+ else if (cp > 0xffff) {
212
+ const v = cp - 0x10000;
213
+ out += "\\u" + (0xd800 + (v >> 10)).toString(16).padStart(4, "0");
214
+ out += "\\u" + (0xdc00 + (v & 0x3ff)).toString(16).padStart(4, "0");
215
+ }
216
+ else {
217
+ out += "\\u" + cp.toString(16).padStart(4, "0");
218
+ }
219
+ }
220
+ return out + '"';
221
+ }
222
+ export function codexHookTrustedHash(eventLabel, matcher, command = CODEX_HOOK_COMMAND, timeout = CODEX_HOOK_TIMEOUT, statusMessage = CODEX_HOOK_STATUS_MESSAGE) {
223
+ const handler = { type: "command", command, timeout, async: false };
224
+ if (statusMessage !== null)
225
+ handler.statusMessage = statusMessage;
226
+ const identity = { event_name: eventLabel, hooks: [handler] };
227
+ if (matcher !== null)
228
+ identity.matcher = matcher;
229
+ const payload = canonicalJson(identity);
230
+ return "sha256:" + crypto.createHash("sha256").update(payload, "utf8").digest("hex");
231
+ }
232
+ export function codexValidatorCommand(installRoot) {
233
+ const candidates = [
234
+ path.join(installRoot, "app", "hooks", "validate_artifact.py"),
235
+ path.join(installRoot, "hooks", "validate_artifact.py"),
236
+ ];
237
+ const validator = candidates.find((c) => isFile(c)) ?? candidates[0];
238
+ return `uv run "${validator}"`;
239
+ }
240
+ export function renderCodexHooksConfig(command) {
241
+ const hooks = {};
242
+ for (const event of ["PreToolUse", "PostToolUse"]) {
243
+ hooks[event] = [
244
+ {
245
+ matcher: CODEX_HOOK_MATCHER,
246
+ hooks: [
247
+ { type: "command", command, timeout: CODEX_HOOK_TIMEOUT, statusMessage: CODEX_HOOK_STATUS_MESSAGE },
248
+ ],
249
+ },
250
+ ];
251
+ }
252
+ const payload = {
253
+ description: "agentera v2 Codex hooks: schema-backed apply_patch artifact validation",
254
+ hooks,
255
+ };
256
+ return JSON.stringify(payload, null, 2) + "\n";
257
+ }
258
+ export function codexHookStateEntries(hooksPath, command = CODEX_HOOK_COMMAND) {
259
+ const resolved = resolvePath(hooksPath);
260
+ return {
261
+ [`${resolved}:pre_tool_use:0:0`]: codexHookTrustedHash("pre_tool_use", CODEX_HOOK_MATCHER, command),
262
+ [`${resolved}:post_tool_use:0:0`]: codexHookTrustedHash("post_tool_use", CODEX_HOOK_MATCHER, command),
263
+ };
264
+ }
265
+ export function codexPluginHookStateEntries(command = CODEX_PLUGIN_HOOK_COMMAND) {
266
+ return {
267
+ [`${CODEX_PLUGIN_HOOK_SOURCE}:pre_tool_use:0:0`]: codexHookTrustedHash("pre_tool_use", CODEX_HOOK_MATCHER, command),
268
+ [`${CODEX_PLUGIN_HOOK_SOURCE}:post_tool_use:0:0`]: codexHookTrustedHash("post_tool_use", CODEX_HOOK_MATCHER, command),
269
+ };
270
+ }
271
+ export function codexPluginHooksEnabled(text) {
272
+ if (!text || !text.trim())
273
+ return false;
274
+ const parsed = parseToml(text);
275
+ const plugins = parsed.plugins;
276
+ if (!plugins || typeof plugins !== "object" || Array.isArray(plugins))
277
+ return false;
278
+ const agentera = plugins[CODEX_PLUGIN_ID];
279
+ return Boolean(agentera && typeof agentera === "object" && agentera.enabled === true);
280
+ }
281
+ // ===========================================================================
282
+ // Slice 2: line-based TOML mutation engine
283
+ // ===========================================================================
284
+ function splitKeepEnds(text) {
285
+ return text.match(/[^\n]*\n|[^\n]+/g) ?? [];
286
+ }
287
+ function rstripEol(line) {
288
+ return line.replace(/[\r\n]+$/, "");
289
+ }
290
+ function lineTerminator(lineWithEnd) {
291
+ if (lineWithEnd.endsWith("\r\n"))
292
+ return "\r\n";
293
+ if (lineWithEnd.endsWith("\n"))
294
+ return "\n";
295
+ return "\n";
296
+ }
297
+ const SECTION_HEADER_RE = new RegExp(`^\\s*\\[\\s*${SECTION_NAME.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*\\]\\s*$`);
298
+ const SET_LINE_RE = /^\s*set\s*=\s*/;
299
+ export function findSectionHeaderIndex(lines) {
300
+ for (let idx = 0; idx < lines.length; idx++) {
301
+ if (SECTION_HEADER_RE.test(lines[idx]))
302
+ return idx;
303
+ }
304
+ return null;
305
+ }
306
+ export function findSetLineIndex(lines, sectionIdx) {
307
+ for (let idx = sectionIdx + 1; idx < lines.length; idx++) {
308
+ const line = lines[idx];
309
+ if (SECTION_HEADER_RE.test(line))
310
+ return null;
311
+ if (/^\s*\[/.test(line))
312
+ return null;
313
+ if (SET_LINE_RE.test(line))
314
+ return idx;
315
+ }
316
+ return null;
317
+ }
318
+ export function insertSetLine(text, installRoot) {
319
+ const linesWithEnds = splitKeepEnds(text);
320
+ const plainLines = linesWithEnds.map(rstripEol);
321
+ const sectionIdx = findSectionHeaderIndex(plainLines);
322
+ if (sectionIdx === null) {
323
+ throw new Error(`insert_set_line called but [${SECTION_NAME}] header not found`);
324
+ }
325
+ const terminator = lineTerminator(linesWithEnds[sectionIdx]);
326
+ const setValue = emitSetInlineTable({ [MANAGED_KEY]: installRoot });
327
+ const insertedLine = `set = ${setValue}${terminator}`;
328
+ return [...linesWithEnds.slice(0, sectionIdx + 1), insertedLine, ...linesWithEnds.slice(sectionIdx + 1)].join("");
329
+ }
330
+ export function rewriteSetLine(text, mergedPairs) {
331
+ const linesWithEnds = splitKeepEnds(text);
332
+ const plainLines = linesWithEnds.map(rstripEol);
333
+ const sectionIdx = findSectionHeaderIndex(plainLines);
334
+ if (sectionIdx === null) {
335
+ throw new Error(`rewrite_set_line called but [${SECTION_NAME}] header not found`);
336
+ }
337
+ const setIdx = findSetLineIndex(plainLines, sectionIdx);
338
+ if (setIdx === null) {
339
+ throw new Error(`rewrite_set_line called but no set line found in [${SECTION_NAME}]`);
340
+ }
341
+ const setLine = plainLines[setIdx];
342
+ if (setLine.includes("{") && !setLine.includes("}")) {
343
+ throw new Error("existing set value spans multiple lines; cannot safely merge");
344
+ }
345
+ const setLineWithEnd = linesWithEnds[setIdx];
346
+ const terminator = setLineWithEnd.endsWith("\r\n") ? "\r\n" : setLineWithEnd.endsWith("\n") ? "\n" : "";
347
+ const setValue = emitSetInlineTable(mergedPairs);
348
+ const newLine = `set = ${setValue}${terminator}`;
349
+ return [...linesWithEnds.slice(0, setIdx), newLine, ...linesWithEnds.slice(setIdx + 1)].join("");
350
+ }
351
+ function tableHeaderRe(table) {
352
+ const dotted = table
353
+ .split(".")
354
+ .map((part) => part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
355
+ .join("\\s*\\.\\s*");
356
+ return new RegExp(`^\\s*\\[\\s*${dotted}\\s*\\]\\s*$`);
357
+ }
358
+ function findTableHeaderIndex(lines, table) {
359
+ const pattern = tableHeaderRe(table);
360
+ for (let idx = 0; idx < lines.length; idx++) {
361
+ if (pattern.test(lines[idx]))
362
+ return idx;
363
+ }
364
+ return null;
365
+ }
366
+ function findTableKeyIndex(lines, tableIdx, keyLiteral) {
367
+ const keyRe = new RegExp(`^\\s*${keyLiteral.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*=`);
368
+ for (let idx = tableIdx + 1; idx < lines.length; idx++) {
369
+ const line = lines[idx];
370
+ if (/^\s*\[/.test(line))
371
+ return null;
372
+ if (keyRe.test(line))
373
+ return idx;
374
+ }
375
+ return null;
376
+ }
377
+ function insertTableKeyLine(text, table, line) {
378
+ const linesWithEnds = splitKeepEnds(text);
379
+ const plainLines = linesWithEnds.map(rstripEol);
380
+ const tableIdx = findTableHeaderIndex(plainLines, table);
381
+ if (tableIdx === null)
382
+ throw new Error(`[${table}] header not found`);
383
+ const terminator = lineTerminator(linesWithEnds[tableIdx]);
384
+ return [...linesWithEnds.slice(0, tableIdx + 1), line + terminator, ...linesWithEnds.slice(tableIdx + 1)].join("");
385
+ }
386
+ function replaceTableKeyLine(text, table, keyLiteral, line) {
387
+ const linesWithEnds = splitKeepEnds(text);
388
+ const plainLines = linesWithEnds.map(rstripEol);
389
+ const tableIdx = findTableHeaderIndex(plainLines, table);
390
+ if (tableIdx === null)
391
+ throw new Error(`[${table}] header not found`);
392
+ const keyIdx = findTableKeyIndex(plainLines, tableIdx, keyLiteral);
393
+ if (keyIdx === null)
394
+ throw new Error(`${keyLiteral} not found in [${table}]`);
395
+ if (plainLines[keyIdx].includes("{") && !plainLines[keyIdx].includes("}")) {
396
+ throw new Error(`${keyLiteral} spans multiple lines in [${table}]`);
397
+ }
398
+ const terminator = lineTerminator(linesWithEnds[keyIdx]);
399
+ return [...linesWithEnds.slice(0, keyIdx), line + terminator, ...linesWithEnds.slice(keyIdx + 1)].join("");
400
+ }
401
+ function appendTable(text, table, lines) {
402
+ let prefix = text;
403
+ if (!prefix.endsWith("\n"))
404
+ prefix += "\n";
405
+ if (!prefix.endsWith("\n\n"))
406
+ prefix += "\n";
407
+ return prefix + `[${table}]\n` + lines.join("\n") + "\n";
408
+ }
409
+ function tomlLoadOrEmpty(text) {
410
+ return text.trim() ? parseToml(text) : {};
411
+ }
412
+ function ensureFeatureEnabled(text, key) {
413
+ const parsed = tomlLoadOrEmpty(text);
414
+ const features = parsed.features;
415
+ if (features && typeof features === "object" && !Array.isArray(features) && features[key] === true) {
416
+ return text;
417
+ }
418
+ const lines = splitKeepEnds(text).map(rstripEol);
419
+ const tableIdx = findTableHeaderIndex(lines, "features");
420
+ if (tableIdx === null) {
421
+ if (features && typeof features === "object" && !Array.isArray(features)) {
422
+ if (lines.some((line) => /^\s*features\s*=/.test(line))) {
423
+ throw new Error("[features] uses an unsupported inline or dotted-table form");
424
+ }
425
+ }
426
+ return appendTable(text, "features", [`${key} = true`]);
427
+ }
428
+ const keyIdx = findTableKeyIndex(lines, tableIdx, key);
429
+ if (keyIdx === null)
430
+ return insertTableKeyLine(text, "features", `${key} = true`);
431
+ return replaceTableKeyLine(text, "features", key, `${key} = true`);
432
+ }
433
+ function ensureFeaturesHooksEnabled(text) {
434
+ return ensureFeatureEnabled(text, "hooks");
435
+ }
436
+ function ensureFeaturesPluginHooksEnabled(text) {
437
+ return ensureFeatureEnabled(ensureFeaturesHooksEnabled(text), "plugin_hooks");
438
+ }
439
+ function removeTableKeyLine(text, table, key) {
440
+ const linesWithEnds = splitKeepEnds(text);
441
+ const plainLines = linesWithEnds.map(rstripEol);
442
+ const tableIdx = findTableHeaderIndex(plainLines, table);
443
+ if (tableIdx === null)
444
+ return text;
445
+ const keyLiteral = tomlBasicString(key);
446
+ let keyIdx = findTableKeyIndex(plainLines, tableIdx, keyLiteral);
447
+ if (keyIdx === null)
448
+ keyIdx = findTableKeyIndex(plainLines, tableIdx, key);
449
+ if (keyIdx === null)
450
+ return text;
451
+ return [...linesWithEnds.slice(0, keyIdx), ...linesWithEnds.slice(keyIdx + 1)].join("");
452
+ }
453
+ function codexMultiAgentThreadLimit(parsed) {
454
+ const agents = parsed.agents;
455
+ if (agents && typeof agents === "object" && !Array.isArray(agents) && "max_threads" in agents) {
456
+ const n = Number(agents.max_threads);
457
+ if (Number.isInteger(n))
458
+ return n;
459
+ }
460
+ const features = parsed.features;
461
+ if (features && typeof features === "object" && !Array.isArray(features)) {
462
+ const multi = features.multi_agent_v2;
463
+ if (multi && typeof multi === "object" && "max_concurrent_threads_per_session" in multi) {
464
+ const n = Number(multi.max_concurrent_threads_per_session);
465
+ if (Number.isInteger(n))
466
+ return n;
467
+ }
468
+ }
469
+ return 6;
470
+ }
471
+ function ensureCodexMultiAgentV2(text, maxThreadsVal) {
472
+ const parsed = tomlLoadOrEmpty(text);
473
+ const features = parsed.features;
474
+ let multi = {};
475
+ if (features && typeof features === "object" && !Array.isArray(features)) {
476
+ const m = features.multi_agent_v2;
477
+ if (m && typeof m === "object" && !Array.isArray(m))
478
+ multi = m;
479
+ }
480
+ if (multi.max_concurrent_threads_per_session === maxThreadsVal)
481
+ return text;
482
+ const lines = splitKeepEnds(text).map(rstripEol);
483
+ const tableIdx = findTableHeaderIndex(lines, "features.multi_agent_v2");
484
+ const key = "max_concurrent_threads_per_session";
485
+ const line = `${key} = ${maxThreadsVal}`;
486
+ if (tableIdx === null)
487
+ return appendTable(text, "features.multi_agent_v2", [line]);
488
+ const keyIdx = findTableKeyIndex(lines, tableIdx, key);
489
+ if (keyIdx === null)
490
+ return insertTableKeyLine(text, "features.multi_agent_v2", line);
491
+ return replaceTableKeyLine(text, "features.multi_agent_v2", key, line);
492
+ }
493
+ export function ensureCodexAgentLimits(text) {
494
+ let parsed = tomlLoadOrEmpty(text);
495
+ const maxThreadsVal = codexMultiAgentThreadLimit(parsed);
496
+ text = removeTableKeyLine(text, "agents", "max_threads");
497
+ parsed = tomlLoadOrEmpty(text);
498
+ const agents = parsed.agents;
499
+ const agentsMatches = agents && typeof agents === "object" && !Array.isArray(agents) &&
500
+ Object.entries(DEFAULT_AGENT_LIMITS).every(([k, v]) => agents[k] === v);
501
+ if (!agentsMatches) {
502
+ const lines = splitKeepEnds(text).map(rstripEol);
503
+ const tableIdx = findTableHeaderIndex(lines, "agents");
504
+ if (tableIdx === null) {
505
+ if (agents && typeof agents === "object" && !Array.isArray(agents) && Object.keys(agents).length > 0) {
506
+ throw new Error("[agents] uses an unsupported inline or child-table-only form");
507
+ }
508
+ text = appendTable(text, "agents", Object.entries(DEFAULT_AGENT_LIMITS).map(([k, v]) => `${k} = ${v}`));
509
+ }
510
+ else {
511
+ for (const [key, value] of Object.entries(DEFAULT_AGENT_LIMITS)) {
512
+ const line = `${key} = ${value}`;
513
+ const curLines = splitKeepEnds(text).map(rstripEol);
514
+ const curTableIdx = findTableHeaderIndex(curLines, "agents");
515
+ if (curTableIdx === null)
516
+ throw new Error("[agents] header disappeared during update");
517
+ if (findTableKeyIndex(curLines, curTableIdx, key) === null) {
518
+ text = insertTableKeyLine(text, "agents", line);
519
+ }
520
+ else {
521
+ text = replaceTableKeyLine(text, "agents", key, line);
522
+ }
523
+ }
524
+ }
525
+ }
526
+ return ensureCodexMultiAgentV2(text, maxThreadsVal);
527
+ }
528
+ function hookStateLine(key, trustedHash) {
529
+ return `${tomlBasicString(key)} = { trusted_hash = ${tomlBasicString(trustedHash)}, enabled = true }`;
530
+ }
531
+ function ensureCodexHookStateEntries(text, entries) {
532
+ const parsed = tomlLoadOrEmpty(text);
533
+ const hooks = parsed.hooks;
534
+ let state = {};
535
+ if (hooks && typeof hooks === "object" && !Array.isArray(hooks)) {
536
+ const s = hooks.state;
537
+ if (s && typeof s === "object" && !Array.isArray(s))
538
+ state = s;
539
+ }
540
+ const allPresent = Object.entries(entries).every(([key, trustedHash]) => {
541
+ const e = state[key];
542
+ return e && typeof e === "object" && e.trusted_hash === trustedHash && e.enabled === true;
543
+ });
544
+ if (allPresent)
545
+ return text;
546
+ const lines = splitKeepEnds(text).map(rstripEol);
547
+ const tableIdx = findTableHeaderIndex(lines, "hooks.state");
548
+ if (tableIdx === null) {
549
+ if (Object.keys(state).length > 0) {
550
+ throw new Error("[hooks.state] uses an unsupported inline or dotted-table form");
551
+ }
552
+ return appendTable(text, "hooks.state", Object.entries(entries).map(([key, trustedHash]) => hookStateLine(key, trustedHash)));
553
+ }
554
+ for (const [key, trustedHash] of Object.entries(entries)) {
555
+ const keyLiteral = tomlBasicString(key);
556
+ const line = hookStateLine(key, trustedHash);
557
+ const curLines = splitKeepEnds(text).map(rstripEol);
558
+ const curTableIdx = findTableHeaderIndex(curLines, "hooks.state");
559
+ if (curTableIdx === null)
560
+ throw new Error("[hooks.state] header disappeared during update");
561
+ if (findTableKeyIndex(curLines, curTableIdx, keyLiteral) === null) {
562
+ text = insertTableKeyLine(text, "hooks.state", line);
563
+ }
564
+ else {
565
+ text = replaceTableKeyLine(text, "hooks.state", keyLiteral, line);
566
+ }
567
+ }
568
+ return text;
569
+ }
570
+ export function ensureCodexHookTrust(text, hooksPath, command = CODEX_HOOK_COMMAND) {
571
+ return ensureCodexHookStateEntries(ensureFeaturesHooksEnabled(text), codexHookStateEntries(hooksPath, command));
572
+ }
573
+ export function codexCopiedHooksAreAgenteraOnly(text) {
574
+ let payload;
575
+ try {
576
+ payload = JSON.parse(text);
577
+ }
578
+ catch {
579
+ return false;
580
+ }
581
+ if (!payload || typeof payload !== "object" || Array.isArray(payload))
582
+ return false;
583
+ const p = payload;
584
+ if (typeof p.description !== "string" || !p.description.includes("agentera v2 Codex hooks"))
585
+ return false;
586
+ const hooks = p.hooks;
587
+ if (!hooks || typeof hooks !== "object" || Array.isArray(hooks))
588
+ return false;
589
+ const keys = Object.keys(hooks);
590
+ if (keys.length === 0)
591
+ return false;
592
+ for (const key of keys) {
593
+ if (key !== "PreToolUse" && key !== "PostToolUse")
594
+ return false;
595
+ }
596
+ for (const [event, entries] of Object.entries(hooks)) {
597
+ if (event !== "PreToolUse" && event !== "PostToolUse")
598
+ return false;
599
+ if (!Array.isArray(entries) || entries.length !== 1)
600
+ return false;
601
+ const entry = entries[0];
602
+ if (!entry || typeof entry !== "object" || entry.matcher !== CODEX_HOOK_MATCHER)
603
+ return false;
604
+ const handlers = entry.hooks;
605
+ if (!Array.isArray(handlers) || handlers.length !== 1)
606
+ return false;
607
+ const handler = handlers[0];
608
+ if (!handler || typeof handler !== "object")
609
+ return false;
610
+ const command = handler.command;
611
+ if (handler.type !== "command" || typeof command !== "string")
612
+ return false;
613
+ if (!command.includes("hooks/validate_artifact.py") && !command.includes("hook validate-artifact"))
614
+ return false;
615
+ if (handler.timeout !== undefined && handler.timeout !== CODEX_HOOK_TIMEOUT)
616
+ return false;
617
+ if (handler.statusMessage !== undefined && handler.statusMessage !== CODEX_HOOK_STATUS_MESSAGE)
618
+ return false;
619
+ }
620
+ return true;
621
+ }
622
+ export function retireCodexCopiedHookTrust(text, hooksPath) {
623
+ if (pathExists(hooksPath)) {
624
+ let hooksText;
625
+ try {
626
+ hooksText = fs.readFileSync(hooksPath, "utf8");
627
+ }
628
+ catch {
629
+ return text;
630
+ }
631
+ if (!codexCopiedHooksAreAgenteraOnly(hooksText))
632
+ return text;
633
+ }
634
+ const resolved = resolvePath(hooksPath);
635
+ text = removeTableKeyLine(text, "hooks.state", `${resolved}:pre_tool_use:0:0`);
636
+ text = removeTableKeyLine(text, "hooks.state", `${resolved}:post_tool_use:0:0`);
637
+ return text;
638
+ }
639
+ export function ensureCodexPluginHookTrust(text, command = CODEX_PLUGIN_HOOK_COMMAND, hooksPath = null) {
640
+ text = ensureCodexHookStateEntries(ensureFeaturesPluginHooksEnabled(text), codexPluginHookStateEntries(command));
641
+ const target = hooksPath ?? path.join(os.homedir(), ".codex", "hooks.json");
642
+ return retireCodexCopiedHookTrust(text, target);
643
+ }
644
+ //# sourceMappingURL=configToml.js.map