@jeger-ai/opengantry 2.2.5 → 2.3.1

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 (267) hide show
  1. package/README.md +61 -59
  2. package/dist/cli/commands/context-request.d.ts +2 -2
  3. package/dist/cli/commands/context-request.d.ts.map +1 -1
  4. package/dist/cli/commands/context-request.js +13 -13
  5. package/dist/cli/commands/context-request.js.map +1 -1
  6. package/dist/cli/commands/doctor.d.ts.map +1 -1
  7. package/dist/cli/commands/doctor.js +2 -2
  8. package/dist/cli/commands/doctor.js.map +1 -1
  9. package/dist/cli/commands/init.js +2 -2
  10. package/dist/cli/commands/onboarding.js +4 -4
  11. package/dist/cli/commands/onboarding.js.map +1 -1
  12. package/dist/cli/commands/planner.d.ts +11 -0
  13. package/dist/cli/commands/{teacher.d.ts.map → planner.d.ts.map} +1 -1
  14. package/dist/cli/commands/{teacher.js → planner.js} +11 -11
  15. package/dist/cli/commands/{teacher.js.map → planner.js.map} +1 -1
  16. package/dist/cli/commands/runtime.d.ts +1 -1
  17. package/dist/cli/commands/runtime.d.ts.map +1 -1
  18. package/dist/cli/commands/runtime.js +4 -4
  19. package/dist/cli/commands/runtime.js.map +1 -1
  20. package/dist/cli/commands/status.js +2 -2
  21. package/dist/cli/commands/status.js.map +1 -1
  22. package/dist/cli/lib/audience-output.d.ts +2 -2
  23. package/dist/cli/lib/audience-output.d.ts.map +1 -1
  24. package/dist/cli/lib/audience-output.js +27 -38
  25. package/dist/cli/lib/audience-output.js.map +1 -1
  26. package/dist/cli/lib/break-glass.js +1 -1
  27. package/dist/cli/lib/command-reporter.d.ts.map +1 -1
  28. package/dist/cli/lib/command-reporter.js +9 -4
  29. package/dist/cli/lib/command-reporter.js.map +1 -1
  30. package/dist/cli/lib/config-namespace.d.ts +2 -2
  31. package/dist/cli/lib/config-namespace.js +2 -2
  32. package/dist/cli/lib/constants.d.ts +8 -8
  33. package/dist/cli/lib/constants.d.ts.map +1 -1
  34. package/dist/cli/lib/constants.js +8 -8
  35. package/dist/cli/lib/constants.js.map +1 -1
  36. package/dist/cli/lib/context-feed-remediation.d.ts.map +1 -1
  37. package/dist/cli/lib/context-feed-remediation.js +25 -3
  38. package/dist/cli/lib/context-feed-remediation.js.map +1 -1
  39. package/dist/cli/lib/context-request.d.ts +4 -4
  40. package/dist/cli/lib/context-request.d.ts.map +1 -1
  41. package/dist/cli/lib/context-request.js +11 -11
  42. package/dist/cli/lib/context-request.js.map +1 -1
  43. package/dist/cli/lib/doctor-core.d.ts.map +1 -1
  44. package/dist/cli/lib/doctor-core.js +49 -20
  45. package/dist/cli/lib/doctor-core.js.map +1 -1
  46. package/dist/cli/lib/doctor-types.d.ts +2 -2
  47. package/dist/cli/lib/errors.js +6 -6
  48. package/dist/cli/lib/errors.js.map +1 -1
  49. package/dist/cli/lib/executor-log-integrity.d.ts +4 -0
  50. package/dist/cli/lib/executor-log-integrity.d.ts.map +1 -0
  51. package/dist/cli/lib/executor-log-integrity.js +48 -0
  52. package/dist/cli/lib/executor-log-integrity.js.map +1 -0
  53. package/dist/cli/lib/{worker-log-line-map.d.ts → executor-log-line-map.d.ts} +4 -4
  54. package/dist/cli/lib/executor-log-line-map.d.ts.map +1 -0
  55. package/dist/cli/lib/{worker-log-line-map.js → executor-log-line-map.js} +4 -4
  56. package/dist/cli/lib/executor-log-line-map.js.map +1 -0
  57. package/dist/cli/lib/file-merge-gxt.js +1 -1
  58. package/dist/cli/lib/file-merge-gxt.js.map +1 -1
  59. package/dist/cli/lib/fix-hints.d.ts +6 -6
  60. package/dist/cli/lib/fix-hints.d.ts.map +1 -1
  61. package/dist/cli/lib/fix-hints.js +36 -30
  62. package/dist/cli/lib/fix-hints.js.map +1 -1
  63. package/dist/cli/lib/git-metrics.js +10 -10
  64. package/dist/cli/lib/git-metrics.js.map +1 -1
  65. package/dist/cli/lib/git-proof.d.ts +7 -5
  66. package/dist/cli/lib/git-proof.d.ts.map +1 -1
  67. package/dist/cli/lib/git-proof.js +42 -19
  68. package/dist/cli/lib/git-proof.js.map +1 -1
  69. package/dist/cli/lib/gxt-config.d.ts +9 -0
  70. package/dist/cli/lib/gxt-config.d.ts.map +1 -0
  71. package/dist/cli/lib/gxt-config.js +20 -0
  72. package/dist/cli/lib/gxt-config.js.map +1 -0
  73. package/dist/cli/lib/gxt-error-codes.d.ts +2 -0
  74. package/dist/cli/lib/gxt-error-codes.d.ts.map +1 -1
  75. package/dist/cli/lib/gxt-error-codes.js +7 -3
  76. package/dist/cli/lib/gxt-error-codes.js.map +1 -1
  77. package/dist/cli/lib/init-compose.js +1 -1
  78. package/dist/cli/lib/init-interactive.js +1 -1
  79. package/dist/cli/lib/init-interactive.js.map +1 -1
  80. package/dist/cli/lib/init-plan.d.ts.map +1 -1
  81. package/dist/cli/lib/init-plan.js +6 -18
  82. package/dist/cli/lib/init-plan.js.map +1 -1
  83. package/dist/cli/lib/init-tutorial.js +14 -14
  84. package/dist/cli/lib/init-tutorial.js.map +1 -1
  85. package/dist/cli/lib/kpi-engine.d.ts +1 -1
  86. package/dist/cli/lib/kpi-engine.d.ts.map +1 -1
  87. package/dist/cli/lib/kpi-engine.js +15 -11
  88. package/dist/cli/lib/kpi-engine.js.map +1 -1
  89. package/dist/cli/lib/legislate-forbidden-zone.d.ts +7 -0
  90. package/dist/cli/lib/legislate-forbidden-zone.d.ts.map +1 -0
  91. package/dist/cli/lib/legislate-forbidden-zone.js +43 -0
  92. package/dist/cli/lib/legislate-forbidden-zone.js.map +1 -0
  93. package/dist/cli/lib/legislate.d.ts.map +1 -1
  94. package/dist/cli/lib/legislate.js +7 -3
  95. package/dist/cli/lib/legislate.js.map +1 -1
  96. package/dist/cli/lib/mcp-governance.d.ts +2 -2
  97. package/dist/cli/lib/mcp-governance.d.ts.map +1 -1
  98. package/dist/cli/lib/mcp-governance.js +40 -10
  99. package/dist/cli/lib/mcp-governance.js.map +1 -1
  100. package/dist/cli/lib/mcp-tools-register.js +3 -3
  101. package/dist/cli/lib/mcp-tools-register.js.map +1 -1
  102. package/dist/cli/lib/mcp-upgrade.d.ts.map +1 -1
  103. package/dist/cli/lib/mcp-upgrade.js +8 -0
  104. package/dist/cli/lib/mcp-upgrade.js.map +1 -1
  105. package/dist/cli/lib/mcp-write-guard.d.ts +20 -0
  106. package/dist/cli/lib/mcp-write-guard.d.ts.map +1 -0
  107. package/dist/cli/lib/mcp-write-guard.js +82 -0
  108. package/dist/cli/lib/mcp-write-guard.js.map +1 -0
  109. package/dist/cli/lib/missions/formatter.d.ts +1 -1
  110. package/dist/cli/lib/missions/formatter.js +1 -1
  111. package/dist/cli/lib/onboarding-flow.js +1 -1
  112. package/dist/cli/lib/out-of-scope-hint.js +1 -1
  113. package/dist/cli/lib/perimeter.d.ts +1 -1
  114. package/dist/cli/lib/perimeter.js +10 -10
  115. package/dist/cli/lib/planner-identity.d.ts +23 -0
  116. package/dist/cli/lib/{teacher-identity.d.ts.map → planner-identity.d.ts.map} +1 -1
  117. package/dist/cli/lib/{teacher-identity.js → planner-identity.js} +34 -34
  118. package/dist/cli/lib/{teacher-identity.js.map → planner-identity.js.map} +1 -1
  119. package/dist/cli/lib/planner-signature.d.ts +11 -0
  120. package/dist/cli/lib/planner-signature.d.ts.map +1 -0
  121. package/dist/cli/lib/planner-signature.js +17 -0
  122. package/dist/cli/lib/planner-signature.js.map +1 -0
  123. package/dist/cli/lib/program-audience-hook.js +1 -1
  124. package/dist/cli/lib/program-audience-hook.js.map +1 -1
  125. package/dist/cli/lib/register-proposals.js +1 -1
  126. package/dist/cli/lib/runtime-env.d.ts +3 -3
  127. package/dist/cli/lib/runtime-env.d.ts.map +1 -1
  128. package/dist/cli/lib/runtime-env.js +4 -4
  129. package/dist/cli/lib/runtime-env.js.map +1 -1
  130. package/dist/cli/lib/runtime-exec.d.ts +4 -4
  131. package/dist/cli/lib/runtime-exec.d.ts.map +1 -1
  132. package/dist/cli/lib/runtime-exec.js +14 -14
  133. package/dist/cli/lib/runtime-exec.js.map +1 -1
  134. package/dist/cli/lib/staged-tmvc-guard.js +1 -1
  135. package/dist/cli/lib/staged-tmvc-guard.js.map +1 -1
  136. package/dist/cli/lib/start-orchestration.d.ts.map +1 -1
  137. package/dist/cli/lib/start-orchestration.js +28 -13
  138. package/dist/cli/lib/start-orchestration.js.map +1 -1
  139. package/dist/cli/lib/status-report.d.ts +1 -1
  140. package/dist/cli/lib/status-report.js +7 -7
  141. package/dist/cli/lib/status-report.js.map +1 -1
  142. package/dist/cli/lib/surgeon.d.ts +3 -3
  143. package/dist/cli/lib/surgeon.d.ts.map +1 -1
  144. package/dist/cli/lib/surgeon.js +7 -7
  145. package/dist/cli/lib/surgeon.js.map +1 -1
  146. package/dist/cli/lib/surgeons/registry.d.ts +1 -1
  147. package/dist/cli/lib/surgeons/registry.d.ts.map +1 -1
  148. package/dist/cli/lib/telemetry-log.d.ts +1 -1
  149. package/dist/cli/lib/telemetry-log.d.ts.map +1 -1
  150. package/dist/cli/lib/telemetry-log.js +4 -4
  151. package/dist/cli/lib/telemetry-log.js.map +1 -1
  152. package/dist/cli/lib/tmvc-path.d.ts +1 -1
  153. package/dist/cli/lib/tmvc-path.d.ts.map +1 -1
  154. package/dist/cli/lib/tmvc-path.js +1 -1
  155. package/dist/cli/lib/tmvc-path.js.map +1 -1
  156. package/dist/cli/lib/trace.d.ts +8 -8
  157. package/dist/cli/lib/trace.d.ts.map +1 -1
  158. package/dist/cli/lib/trace.js +21 -21
  159. package/dist/cli/lib/trace.js.map +1 -1
  160. package/dist/cli/lib/triage-logic.js +1 -1
  161. package/dist/cli/lib/types.d.ts +1 -1
  162. package/dist/cli/lib/upgrade-apply.d.ts.map +1 -1
  163. package/dist/cli/lib/upgrade-apply.js +14 -2
  164. package/dist/cli/lib/upgrade-apply.js.map +1 -1
  165. package/dist/cli/lib/upgrade-plan.js +3 -3
  166. package/dist/cli/lib/verify-engine.d.ts +8 -5
  167. package/dist/cli/lib/verify-engine.d.ts.map +1 -1
  168. package/dist/cli/lib/verify-engine.js +40 -30
  169. package/dist/cli/lib/verify-engine.js.map +1 -1
  170. package/dist/cli/lib/verify-failure-normalize-phases.d.ts +1 -1
  171. package/dist/cli/lib/verify-failure-normalize-phases.d.ts.map +1 -1
  172. package/dist/cli/lib/verify-failure-normalize-phases.js +1 -1
  173. package/dist/cli/lib/verify-failure-normalize-phases.js.map +1 -1
  174. package/dist/cli/lib/verify-failure-normalize.d.ts +54 -8
  175. package/dist/cli/lib/verify-failure-normalize.d.ts.map +1 -1
  176. package/dist/cli/lib/verify-failure-normalize.js +0 -25
  177. package/dist/cli/lib/verify-failure-normalize.js.map +1 -1
  178. package/dist/cli/lib/verify-hints.d.ts +3 -2
  179. package/dist/cli/lib/verify-hints.d.ts.map +1 -1
  180. package/dist/cli/lib/verify-hints.js +33 -24
  181. package/dist/cli/lib/verify-hints.js.map +1 -1
  182. package/dist/cli/lib/verify-payload-types.d.ts +1 -0
  183. package/dist/cli/lib/verify-payload-types.d.ts.map +1 -1
  184. package/dist/cli/lib/verify-payload.d.ts.map +1 -1
  185. package/dist/cli/lib/verify-payload.js +3 -0
  186. package/dist/cli/lib/verify-payload.js.map +1 -1
  187. package/dist/cli/lib/verify-presentation.d.ts +4 -4
  188. package/dist/cli/lib/verify-presentation.d.ts.map +1 -1
  189. package/dist/cli/lib/verify-presentation.js +6 -2
  190. package/dist/cli/lib/verify-presentation.js.map +1 -1
  191. package/dist/cli/lib/verify-presenters.js +3 -3
  192. package/dist/cli/lib/verify-presenters.js.map +1 -1
  193. package/dist/cli/lib/version.gen.d.ts +1 -1
  194. package/dist/cli/lib/version.gen.js +1 -1
  195. package/dist/cli/program-core.d.ts.map +1 -1
  196. package/dist/cli/program-core.js +4 -17
  197. package/dist/cli/program-core.js.map +1 -1
  198. package/dist/cli/program-mission.js +15 -15
  199. package/dist/cli/program-mission.js.map +1 -1
  200. package/dist/cli/program-planner.d.ts +3 -0
  201. package/dist/cli/program-planner.d.ts.map +1 -0
  202. package/dist/cli/program-planner.js +19 -0
  203. package/dist/cli/{program-teacher.js.map → program-planner.js.map} +1 -1
  204. package/dist/cli/program-workflow.js +7 -7
  205. package/dist/cli/program-workflow.js.map +1 -1
  206. package/dist/cli/program.js +3 -3
  207. package/dist/cli/program.js.map +1 -1
  208. package/package.json +3 -2
  209. package/templates/.cursor/hooks/gxt-before-shell.sh +4 -4
  210. package/templates/.cursor/hooks/gxt-session-start.sh +2 -2
  211. package/templates/.cursor/rules/opengantry-gxt-substrate.mdc +4 -4
  212. package/templates/.gitagent/ARCHITECTURE.pointer.json +2 -2
  213. package/templates/.gitagent/foreman/MANIFEST.json +3 -3
  214. package/templates/.gitagent/foreman/PLANNER.allowlist.example +4 -0
  215. package/templates/.gitagent/missions/README.md +1 -1
  216. package/templates/.gitagent/{teacher → planner}/ARCHITECTURE-ACCESS.md +3 -3
  217. package/templates/.gitagent/{teacher → planner}/ARCHITECTURE-DISCOVERY.md +2 -2
  218. package/templates/.gitagent/{teacher/WORKER_LOG.template.md → planner/EXECUTOR_LOG.template.md} +2 -2
  219. package/templates/.gitagent/{teacher → planner}/MISSION-ARCHITECT.md +11 -11
  220. package/templates/.gitagent/{teacher → planner}/RULES.md +4 -4
  221. package/templates/.githooks/post-checkout +4 -4
  222. package/templates/.githooks/pre-push +1 -1
  223. package/templates/.github/workflows/gxt-validate.yml +1 -1
  224. package/templates/.gitignore.gxt +1 -1
  225. package/templates/.prettierignore.gxt +1 -1
  226. package/templates/AGENTS.md +6 -6
  227. package/templates/docs/ARCHITECTURE.md +2 -2
  228. package/templates/integrations/aider/.aider.conf.yml +1 -1
  229. package/templates/integrations/antigravity/.agent/rules/gxt.md +1 -1
  230. package/templates/integrations/asset-catalog.json +7 -7
  231. package/templates/integrations/claude-code/CLAUDE.md +1 -1
  232. package/templates/integrations/cline/.clinerules/gxt.md +1 -1
  233. package/templates/integrations/compatibility.json +1 -1
  234. package/templates/integrations/junie/.junie/guidelines.md +1 -1
  235. package/templates/integrations/opencode/opencode.json +1 -1
  236. package/templates/integrations/openhands/.openhands/microagents/gxt.md +1 -1
  237. package/templates/integrations/recipes/_footer.md +7 -7
  238. package/templates/integrations/recipes/_preamble.md +7 -7
  239. package/templates/integrations/recipes/claude-code.md +1 -1
  240. package/templates/integrations/recipes/cursor.md +2 -2
  241. package/templates/scripts/gxt-manifest-lib.mjs +30 -5
  242. package/templates/scripts/gxt-runtime-env.sh +1 -1
  243. package/templates/scripts/validate-gxt.sh +6 -1
  244. package/templates/skills/gantry.md +1 -1
  245. package/templates/skills/substrate.md +1 -1
  246. package/dist/cli/commands/teacher.d.ts +0 -11
  247. package/dist/cli/lib/teacher-identity.d.ts +0 -23
  248. package/dist/cli/lib/verify-failure-format.d.ts +0 -4
  249. package/dist/cli/lib/verify-failure-format.d.ts.map +0 -1
  250. package/dist/cli/lib/verify-failure-format.js +0 -6
  251. package/dist/cli/lib/verify-failure-format.js.map +0 -1
  252. package/dist/cli/lib/verify-failure-normalize-types.d.ts +0 -32
  253. package/dist/cli/lib/verify-failure-normalize-types.d.ts.map +0 -1
  254. package/dist/cli/lib/verify-failure-normalize-types.js +0 -2
  255. package/dist/cli/lib/verify-failure-normalize-types.js.map +0 -1
  256. package/dist/cli/lib/verify-failure-presentation-types.d.ts +0 -29
  257. package/dist/cli/lib/verify-failure-presentation-types.d.ts.map +0 -1
  258. package/dist/cli/lib/verify-failure-presentation-types.js +0 -2
  259. package/dist/cli/lib/verify-failure-presentation-types.js.map +0 -1
  260. package/dist/cli/lib/worker-log-line-map.d.ts.map +0 -1
  261. package/dist/cli/lib/worker-log-line-map.js.map +0 -1
  262. package/dist/cli/program-teacher.d.ts +0 -3
  263. package/dist/cli/program-teacher.d.ts.map +0 -1
  264. package/dist/cli/program-teacher.js +0 -19
  265. package/templates/.gitagent/foreman/TEACHER.allowlist.example +0 -4
  266. /package/templates/.gitagent/{teacher → planner}/KPI-REPORT.schema.yaml +0 -0
  267. /package/templates/.gitagent/{teacher → planner}/MISSION.schema.yaml +0 -0
@@ -1,8 +1,8 @@
1
1
  ### Cursor
2
2
 
3
3
  - **Context injection:** `.cursor/rules/opengantry-gxt-substrate.mdc` (`alwaysApply: true`); `.cursor/hooks.json` — `sessionStart` mission scope + `beforeShellExecution` fallback guard; `.cursor/mcp.json` — `gantry mcp serve`.
4
- - **Mission Architect:** `/gantry` macro (do not use `/plan` — Cursor native Plan Mode); implicit activation when user asks to **write/edit code** with no pinned mission. Follow `.gitagent/teacher/MISSION-ARCHITECT.md`.
5
- - **MCP legislation:** `gxt_draft_legislation` → semantic chat approval → `gxt_execute_legislation` → Teacher commit → `gxt_check_signature` → `gxt_pin_mission`. Or **`gxt_start_orchestration`** for goal-first CLI parity.
4
+ - **Mission Architect:** `/gantry` macro (do not use `/plan` — Cursor native Plan Mode); implicit activation when user asks to **write/edit code** with no pinned mission. Follow `.gitagent/planner/MISSION-ARCHITECT.md`.
5
+ - **MCP legislation:** `gxt_draft_legislation` → semantic chat approval → `gxt_execute_legislation` → Planner commit → `gxt_check_signature` → `gxt_pin_mission`. Or **`gxt_start_orchestration`** for goal-first CLI parity.
6
6
  - **Verify remediation:** `gxt_verify` returns `error_code`, `fix_hints`, `next_actions` on failure; CLI equivalent: `gantry verify --mission … --fix`.
7
7
  - **Session bootstrap:**
8
8
 
@@ -16,7 +16,7 @@ import { fileURLToPath } from "node:url";
16
16
 
17
17
  const FIXED_MSN_PREFIXES = [
18
18
  ".gitagent/",
19
- "WORKER_LOG.md",
19
+ "EXECUTOR_LOG.md",
20
20
  ".githooks/",
21
21
  ".github/workflows/gxt-validate.yml",
22
22
  ];
@@ -129,6 +129,11 @@ export function loadTrustedAutomationRules(repoRoot) {
129
129
 
130
130
  export function matchGlob(pattern, filePath) {
131
131
  const normalized = normalizePath(filePath);
132
+ const g = normalizePath(pattern);
133
+ if (g.startsWith("**/")) {
134
+ const suffix = g.slice(3);
135
+ return normalized.endsWith(suffix) || normalized.includes(`/${suffix}`);
136
+ }
132
137
  const re = new RegExp(
133
138
  `^${normalizePath(pattern)
134
139
  .replace(/[.+^${}()|[\]\\]/g, "\\$&")
@@ -187,6 +192,16 @@ export function validateManifestStructure(repoRoot) {
187
192
  if (!Array.isArray(m.risk_keywords)) {
188
193
  throw new Error("validate-gxt: risk_keywords must be an array");
189
194
  }
195
+ if (m.perimeter_protected !== undefined) {
196
+ if (!Array.isArray(m.perimeter_protected)) {
197
+ throw new Error("validate-gxt: perimeter_protected must be an array when present");
198
+ }
199
+ for (const g of m.perimeter_protected) {
200
+ if (typeof g !== "string" || g.length === 0) {
201
+ throw new Error("validate-gxt: perimeter_protected items must be non-empty strings");
202
+ }
203
+ }
204
+ }
190
205
  for (const [key, skill] of Object.entries(skills)) {
191
206
  if (!skill || typeof skill !== "object") {
192
207
  throw new Error(`validate-gxt: skills.${key} must be an object`);
@@ -443,6 +458,8 @@ export function evaluateTrustedAutomationCommit(repoRoot, commitSha) {
443
458
 
444
459
  /**
445
460
  * Evaluate a PR commit range for trusted automation eligibility.
461
+ * Range net_loc uses the full base...head diff; actor is the author of the last commit
462
+ * in the range (same as prior behavior, documented here for audit).
446
463
  * @returns {{ eligible: boolean, reason: string }}
447
464
  */
448
465
  export function evaluateTrustedAutomationRange(repoRoot, baseSha, headSha) {
@@ -463,11 +480,10 @@ export function evaluateTrustedAutomationRange(repoRoot, baseSha, headSha) {
463
480
  const files = commitChangedFiles(repoRoot, commit).filter((f) => isMsnEnforcedPath(f, prefixes));
464
481
  if (files.length === 0) continue;
465
482
  const actorEmail = commitAuthorEmail(repoRoot, commit);
466
- const commitResult = evaluateTrustedAutomationCommit(repoRoot, commit);
467
- if (!commitResult.eligible) {
483
+ if (findMatchingRule(rules, actorEmail).length === 0) {
468
484
  return {
469
485
  eligible: false,
470
- reason: `commit ${commit.slice(0, 7)} failed: ${commitResult.reason}`,
486
+ reason: `commit ${commit.slice(0, 7)}: actor ${actorEmail} not covered by trusted_automation policy`,
471
487
  };
472
488
  }
473
489
  }
@@ -508,6 +524,15 @@ function main() {
508
524
  const stdin = fs.readFileSync(0, "utf8");
509
525
  process.exit(validateBypassNoteJson(stdin) ? 0 : 1);
510
526
  }
527
+ case "match-glob": {
528
+ const pattern = process.argv[4];
529
+ const filePath = process.argv[5];
530
+ if (!pattern || !filePath) {
531
+ console.error("Usage: gxt-manifest-lib.mjs match-glob <repoRoot> <pattern> <filePath>");
532
+ process.exit(2);
533
+ }
534
+ process.exit(matchGlob(pattern, filePath) ? 0 : 1);
535
+ }
511
536
  case "eval-commit": {
512
537
  const commitSha = process.argv[4];
513
538
  if (!commitSha) {
@@ -539,7 +564,7 @@ function main() {
539
564
  }
540
565
  default:
541
566
  console.error(
542
- "Usage: gxt-manifest-lib.mjs <prefixes|validate-manifest|validate-bypass-note|eval-commit|eval-range> [args]",
567
+ "Usage: gxt-manifest-lib.mjs <prefixes|validate-manifest|validate-bypass-note|match-glob|eval-commit|eval-range> [args]",
543
568
  );
544
569
  process.exit(2);
545
570
  }
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Load GXT Worker Runtime Contract into the current shell (any IDE terminal / manual runs).
2
+ # Load GXT Executor Runtime Contract into the current shell (any IDE terminal / manual runs).
3
3
  set -euo pipefail
4
4
 
5
5
  ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)"
@@ -87,7 +87,12 @@ cmd_upgrade_tmp() {
87
87
  }
88
88
 
89
89
  cmd_manifest() {
90
- node "$GXT_MANIFEST_LIB" validate-manifest "$ROOT"
90
+ if [[ -f dist/cli/index.js ]]; then
91
+ node dist/cli/index.js check >/dev/null
92
+ echo "MANIFEST OK (gantry check)"
93
+ else
94
+ node "$GXT_MANIFEST_LIB" validate-manifest "$ROOT"
95
+ fi
91
96
  }
92
97
 
93
98
  cmd_msn() {
@@ -2,4 +2,4 @@
2
2
 
3
3
  Manifest key `gantry`. **gantry** CLI and tests under `src/cli/` per [`.gitagent/foreman/MANIFEST.json`](../.gitagent/foreman/MANIFEST.json).
4
4
 
5
- Substrate paths (`.gitagent/`, hooks, workflows) require Teacher legislation and **`substrate`** or explicit mission scope — do not edit Foreman law without a mission.
5
+ Substrate paths (`.gitagent/`, hooks, workflows) require Planner legislation and **`substrate`** or explicit mission scope — do not edit Foreman law without a mission.
@@ -1,3 +1,3 @@
1
1
  # Skill: substrate
2
2
 
3
- Manifest key `substrate`. Reserved for high-risk substrate work; requires Teacher mission per manifest.
3
+ Manifest key `substrate`. Reserved for high-risk substrate work; requires Planner mission per manifest.
@@ -1,11 +0,0 @@
1
- export interface TeacherShowOptions {
2
- json?: boolean;
3
- cwd?: string;
4
- }
5
- export interface TeacherSetOptions {
6
- emails: string[];
7
- cwd?: string;
8
- }
9
- export declare function runTeacherShow(options?: TeacherShowOptions): void;
10
- export declare function runTeacherSet(options: TeacherSetOptions): void;
11
- //# sourceMappingURL=teacher.d.ts.map
@@ -1,23 +0,0 @@
1
- export { ENV_TEACHER_EMAILS } from "./config-namespace.js";
2
- export declare const REL_TEACHER_ALLOWLIST: ".gitagent/foreman/TEACHER.allowlist";
3
- export declare const REL_TEACHER_ALLOWLIST_LOCAL: ".gitagent/foreman/TEACHER.allowlist.local";
4
- export type TeacherIdentitySource = "allowlist_file" | "allowlist_local" | "git_config" | "env" | "git_user_email" | "unset";
5
- export interface ResolvedTeacherIdentity {
6
- emails: string[];
7
- source: TeacherIdentitySource;
8
- /** Human-readable detail for doctor / errors */
9
- detail: string;
10
- }
11
- /** Legacy env-only parser (tests / explicit CI override). */
12
- export declare function parseTeacherEmailsFromEnv(): string[];
13
- /**
14
- * Resolve Teacher legislation allowlist for a repository.
15
- * Repo-local sources win over shell env so multi-project developers are not cross-contaminated.
16
- */
17
- export declare function resolveTeacherEmails(repoRoot: string): ResolvedTeacherIdentity;
18
- export declare function serializeTeacherAllowlist(emails: string[]): string;
19
- export declare function writeTeacherAllowlistLocal(repoRoot: string, emails: string[]): void;
20
- /** Create gitignored local allowlist from repo git user.email when missing. */
21
- export declare function ensureTeacherAllowlistOnInit(repoRoot: string): boolean;
22
- export declare function teacherIdentitySetupHint(_repoRoot: string): string;
23
- //# sourceMappingURL=teacher-identity.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { VerifyFailurePresentation, VerifyFailurePresentationInput } from "./verify-failure-presentation-types.js";
2
- export type { AudienceTaggedStep, VerifyFailurePresentation, VerifyFailurePresentationInput, } from "./verify-failure-presentation-types.js";
3
- export declare function verifyFailurePresentation(input: VerifyFailurePresentationInput): VerifyFailurePresentation;
4
- //# sourceMappingURL=verify-failure-format.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-failure-format.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-failure-format.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,wCAAwC,CAAC;AAEhD,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,wCAAwC,CAAC;AAEhD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,GACpC,yBAAyB,CAG3B"}
@@ -1,6 +0,0 @@
1
- import { normalizeVerifyPhaseFailure, toFailurePresentation, } from "./verify-failure-normalize.js";
2
- export function verifyFailurePresentation(input) {
3
- const normalized = normalizeVerifyPhaseFailure(input);
4
- return toFailurePresentation(normalized);
5
- }
6
- //# sourceMappingURL=verify-failure-format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-failure-format.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-failure-format.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,GAEtB,MAAM,+BAA+B,CAAC;AAYvC,MAAM,UAAU,yBAAyB,CACvC,KAAqC;IAErC,MAAM,UAAU,GAAG,2BAA2B,CAAC,KAA0C,CAAC,CAAC;IAC3F,OAAO,qBAAqB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,32 +0,0 @@
1
- import type { GxtErrorCode } from "./gxt-error-codes.js";
2
- import type { AudienceTaggedStep } from "./verify-hints.js";
3
- import type { RemediationSnapshot } from "./context-feed-store.js";
4
- /** Canonical verify-failure contract — single mapping for all sinks. */
5
- export interface NormalizedVerifyFailure {
6
- phase: string;
7
- message: string;
8
- exit_code: number;
9
- error_code: GxtErrorCode;
10
- fix_hints: string[];
11
- next_actions: string[];
12
- tagged_steps?: AudienceTaggedStep[];
13
- headline: string;
14
- detail_lines: string[];
15
- stdout?: string;
16
- stderr?: string;
17
- failures?: string[];
18
- gate?: RemediationSnapshot["gate"];
19
- kpi?: RemediationSnapshot["kpi"];
20
- presentation_gate?: {
21
- stdout?: string;
22
- stderr?: string;
23
- exitCode?: number;
24
- };
25
- trace?: {
26
- failures?: string[];
27
- };
28
- mission_file_path?: string;
29
- msn_id?: string;
30
- }
31
- export type NormalizedVerifyFailureBase = Pick<NormalizedVerifyFailure, "phase" | "message" | "exit_code" | "error_code" | "fix_hints" | "next_actions" | "tagged_steps" | "mission_file_path" | "msn_id">;
32
- //# sourceMappingURL=verify-failure-normalize-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-failure-normalize-types.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-failure-normalize-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,YAAY,CAAC;IACzB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnC,GAAG,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5E,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,uBAAuB,EACrB,OAAO,GACP,SAAS,GACT,WAAW,GACX,YAAY,GACZ,WAAW,GACX,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,QAAQ,CACX,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=verify-failure-normalize-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-failure-normalize-types.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-failure-normalize-types.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- import type { GxtErrorCode } from "./gxt-error-codes.js";
2
- import type { VerifyOptions, VerifyPhaseFailure } from "./verify-engine.js";
3
- import type { AudienceTaggedStep } from "./verify-hints.js";
4
- export type { AudienceTaggedStep };
5
- export interface VerifyFailurePresentationInput {
6
- failure: VerifyPhaseFailure;
7
- missionArg: string;
8
- options: Pick<VerifyOptions, "strictTrace" | "audience">;
9
- root?: string;
10
- msnId?: string;
11
- }
12
- export interface VerifyFailurePresentation {
13
- error_code: GxtErrorCode;
14
- headline: string;
15
- detail_lines: string[];
16
- fix_hints: string[];
17
- next_actions: string[];
18
- tagged_steps?: AudienceTaggedStep[];
19
- exit_code: number;
20
- gate?: {
21
- stdout?: string;
22
- stderr?: string;
23
- exitCode?: number;
24
- };
25
- trace?: {
26
- failures?: string[];
27
- };
28
- }
29
- //# sourceMappingURL=verify-failure-presentation-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-failure-presentation-types.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-failure-presentation-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,kBAAkB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,YAAY,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACjC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=verify-failure-presentation-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-failure-presentation-types.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-failure-presentation-types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-log-line-map.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/worker-log-line-map.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACrC;AAED,uEAAuE;AACvE,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EAAE,GACf,gBAAgB,GAAG,IAAI,CAgBzB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE/E;AAED,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAK1D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-log-line-map.js","sourceRoot":"","sources":["../../../src/cli/lib/worker-log-line-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AASzB,uEAAuE;AACvE,MAAM,UAAU,8BAA8B,CAC5C,aAAqB,EACrB,MAAgB;IAEhB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAC;IACjD,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAChE,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEhD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;QACvB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,YAAY,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAqB,EAAE,KAAa;IACnE,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,OAAO,CACL,wCAAwC,CAAC,IAAI,CAAC,MAAM,CAAC;QACrD,uDAAuD,CAAC,IAAI,CAAC,MAAM,CAAC,CACrE,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerTeacherCommands(program: Command): void;
3
- //# sourceMappingURL=program-teacher.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"program-teacher.d.ts","sourceRoot":"","sources":["../../src/cli/program-teacher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkB9D"}
@@ -1,19 +0,0 @@
1
- import { runTeacherSet, runTeacherShow } from "./commands/teacher.js";
2
- export function registerTeacherCommands(program) {
3
- const teacher = program.command("teacher").description("Repo-local Teacher identity (git-proof allowlist)");
4
- teacher
5
- .command("show")
6
- .description("Show resolved Teacher emails and source for this repository")
7
- .option("--json", "Emit structured JSON")
8
- .action((opts) => {
9
- runTeacherShow({ json: opts.json });
10
- });
11
- teacher
12
- .command("set")
13
- .description(`Write ${".gitagent/foreman/TEACHER.allowlist.local"} (gitignored, per-repo)`)
14
- .argument("<emails...>", "One or more Teacher emails (comma-separated ok)")
15
- .action((emails) => {
16
- runTeacherSet({ emails });
17
- });
18
- }
19
- //# sourceMappingURL=program-teacher.js.map
@@ -1,4 +0,0 @@
1
- # One Git author email per line (case-insensitive). Committed team allowlist.
2
- # Personal override (gitignored): .gitagent/foreman/TEACHER.allowlist.local
3
- # Or: git config gantry.teacherEmails "you@example.com"
4
- teacher@example.com