@aperant/framework 0.8.1 → 0.8.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 (308) hide show
  1. package/CHANGELOG.md +443 -1
  2. package/agents/apt-planner.md +39 -7
  3. package/dist/cli/commands/adr.mjs +1 -1
  4. package/dist/cli/commands/audit-branch-current.d.mts +25 -0
  5. package/dist/cli/commands/audit-branch-current.d.mts.map +1 -0
  6. package/dist/cli/commands/audit-branch-current.mjs +252 -0
  7. package/dist/cli/commands/audit-branch-current.mjs.map +1 -0
  8. package/dist/cli/commands/audit.d.mts.map +1 -1
  9. package/dist/cli/commands/audit.mjs +13 -2
  10. package/dist/cli/commands/audit.mjs.map +1 -1
  11. package/dist/cli/commands/check-version.d.mts.map +1 -1
  12. package/dist/cli/commands/check-version.mjs +19 -1
  13. package/dist/cli/commands/check-version.mjs.map +1 -1
  14. package/dist/cli/commands/context.mjs +3 -3
  15. package/dist/cli/commands/context.mjs.map +1 -1
  16. package/dist/cli/commands/coverage-check.d.mts.map +1 -1
  17. package/dist/cli/commands/coverage-check.mjs +74 -7
  18. package/dist/cli/commands/coverage-check.mjs.map +1 -1
  19. package/dist/cli/commands/detect-runtime.d.mts +6 -0
  20. package/dist/cli/commands/detect-runtime.d.mts.map +1 -0
  21. package/dist/cli/commands/detect-runtime.mjs +142 -0
  22. package/dist/cli/commands/detect-runtime.mjs.map +1 -0
  23. package/dist/cli/commands/driver-doctor.d.mts +29 -0
  24. package/dist/cli/commands/driver-doctor.d.mts.map +1 -0
  25. package/dist/cli/commands/driver-doctor.mjs +291 -0
  26. package/dist/cli/commands/driver-doctor.mjs.map +1 -0
  27. package/dist/cli/commands/gate.mjs +14 -0
  28. package/dist/cli/commands/gate.mjs.map +1 -1
  29. package/dist/cli/commands/init.d.mts.map +1 -1
  30. package/dist/cli/commands/init.mjs +9 -6
  31. package/dist/cli/commands/init.mjs.map +1 -1
  32. package/dist/cli/commands/install-from-source.d.mts +2 -0
  33. package/dist/cli/commands/install-from-source.d.mts.map +1 -0
  34. package/dist/cli/commands/install-from-source.mjs +2 -0
  35. package/dist/cli/commands/install-from-source.mjs.map +1 -0
  36. package/dist/cli/commands/modes.mjs +1 -1
  37. package/dist/cli/commands/route.d.mts.map +1 -1
  38. package/dist/cli/commands/route.mjs +38 -1
  39. package/dist/cli/commands/route.mjs.map +1 -1
  40. package/dist/cli/commands/triage.mjs +1 -1
  41. package/dist/cli/config/load.d.mts.map +1 -1
  42. package/dist/cli/config/load.mjs +9 -3
  43. package/dist/cli/config/load.mjs.map +1 -1
  44. package/dist/cli/coordination/auto-emit-artifact-ready.mjs +1 -1
  45. package/dist/cli/coordination/event-schema.d.mts.map +1 -1
  46. package/dist/cli/coordination/event-schema.mjs +18 -0
  47. package/dist/cli/coordination/event-schema.mjs.map +1 -1
  48. package/dist/cli/coverage-check/user-outcomes.d.mts +84 -0
  49. package/dist/cli/coverage-check/user-outcomes.d.mts.map +1 -0
  50. package/dist/cli/coverage-check/user-outcomes.mjs +265 -0
  51. package/dist/cli/coverage-check/user-outcomes.mjs.map +1 -0
  52. package/dist/cli/dispatch.d.mts.map +1 -1
  53. package/dist/cli/dispatch.mjs +18 -1
  54. package/dist/cli/dispatch.mjs.map +1 -1
  55. package/dist/cli/gate/context.d.mts +1 -0
  56. package/dist/cli/gate/context.d.mts.map +1 -1
  57. package/dist/cli/gate/context.mjs +14 -1
  58. package/dist/cli/gate/context.mjs.map +1 -1
  59. package/dist/cli/gate/gates/consistency-check.d.mts +1 -0
  60. package/dist/cli/gate/gates/consistency-check.d.mts.map +1 -1
  61. package/dist/cli/gate/gates/consistency-check.mjs +1 -0
  62. package/dist/cli/gate/gates/consistency-check.mjs.map +1 -1
  63. package/dist/cli/gate/gates/review-clean.d.mts +1 -0
  64. package/dist/cli/gate/gates/review-clean.d.mts.map +1 -1
  65. package/dist/cli/gate/gates/review-clean.mjs +1 -0
  66. package/dist/cli/gate/gates/review-clean.mjs.map +1 -1
  67. package/dist/cli/gate/gates/verify-approved.d.mts +1 -0
  68. package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
  69. package/dist/cli/gate/gates/verify-approved.mjs +1 -0
  70. package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
  71. package/dist/cli/gate/registry.d.mts.map +1 -1
  72. package/dist/cli/gate/registry.mjs +9 -1
  73. package/dist/cli/gate/registry.mjs.map +1 -1
  74. package/dist/cli/host/detect.mjs +1 -1
  75. package/dist/cli/host/detect.mjs.map +1 -1
  76. package/dist/cli/install/find-workspace-framework-version.d.mts +16 -0
  77. package/dist/cli/install/find-workspace-framework-version.d.mts.map +1 -0
  78. package/dist/cli/install/find-workspace-framework-version.mjs +85 -0
  79. package/dist/cli/install/find-workspace-framework-version.mjs.map +1 -0
  80. package/dist/cli/install/install-from-source.d.mts +10 -0
  81. package/dist/cli/install/install-from-source.d.mts.map +1 -0
  82. package/dist/cli/install/install-from-source.mjs +271 -0
  83. package/dist/cli/install/install-from-source.mjs.map +1 -0
  84. package/dist/cli/install/install-kernel.d.mts.map +1 -1
  85. package/dist/cli/install/install-kernel.mjs +24 -0
  86. package/dist/cli/install/install-kernel.mjs.map +1 -1
  87. package/dist/cli/install/legacy-paths.d.mts +33 -11
  88. package/dist/cli/install/legacy-paths.d.mts.map +1 -1
  89. package/dist/cli/install/legacy-paths.mjs +163 -39
  90. package/dist/cli/install/legacy-paths.mjs.map +1 -1
  91. package/dist/cli/install/runtime-detect.mjs +1 -1
  92. package/dist/cli/install/runtime-detect.mjs.map +1 -1
  93. package/dist/cli/install/runtime-migrate.d.mts +34 -14
  94. package/dist/cli/install/runtime-migrate.d.mts.map +1 -1
  95. package/dist/cli/install/runtime-migrate.mjs +63 -30
  96. package/dist/cli/install/runtime-migrate.mjs.map +1 -1
  97. package/dist/cli/install/transforms/codex.d.mts.map +1 -1
  98. package/dist/cli/install/transforms/codex.mjs +28 -17
  99. package/dist/cli/install/transforms/codex.mjs.map +1 -1
  100. package/dist/cli/skill-author/contract.mjs +2 -2
  101. package/dist/cli/skill-author/contract.mjs.map +1 -1
  102. package/dist/cli/verify-proof/audit.d.mts +34 -0
  103. package/dist/cli/verify-proof/audit.d.mts.map +1 -0
  104. package/dist/cli/verify-proof/audit.mjs +53 -0
  105. package/dist/cli/verify-proof/audit.mjs.map +1 -0
  106. package/dist/cli/verify-proof/exec.d.mts +20 -0
  107. package/dist/cli/verify-proof/exec.d.mts.map +1 -0
  108. package/dist/cli/verify-proof/exec.mjs +74 -0
  109. package/dist/cli/verify-proof/exec.mjs.map +1 -0
  110. package/dist/cli/verify-proof/idl/index.d.mts +2 -0
  111. package/dist/cli/verify-proof/idl/index.d.mts.map +1 -0
  112. package/dist/cli/verify-proof/idl/index.mjs +13 -0
  113. package/dist/cli/verify-proof/idl/index.mjs.map +1 -0
  114. package/dist/cli/verify-proof/idl/types.d.ts +10 -0
  115. package/dist/cli/verify-proof/idl/types.d.ts.map +1 -0
  116. package/dist/cli/verify-proof/idl/types.js +10 -0
  117. package/dist/cli/verify-proof/idl/types.js.map +1 -0
  118. package/dist/cli/verify-proof/manifest-validator.d.mts +19 -0
  119. package/dist/cli/verify-proof/manifest-validator.d.mts.map +1 -0
  120. package/dist/cli/verify-proof/manifest-validator.mjs +182 -0
  121. package/dist/cli/verify-proof/manifest-validator.mjs.map +1 -0
  122. package/dist/cli/verify-proof/resolver.d.mts +105 -0
  123. package/dist/cli/verify-proof/resolver.d.mts.map +1 -0
  124. package/dist/cli/verify-proof/resolver.mjs +320 -0
  125. package/dist/cli/verify-proof/resolver.mjs.map +1 -0
  126. package/dist/cli/verify-proof/runtime-detect.d.mts +30 -0
  127. package/dist/cli/verify-proof/runtime-detect.d.mts.map +1 -0
  128. package/dist/cli/verify-proof/runtime-detect.mjs +209 -0
  129. package/dist/cli/verify-proof/runtime-detect.mjs.map +1 -0
  130. package/dist/cli/verify-proof/trust.d.mts +70 -0
  131. package/dist/cli/verify-proof/trust.d.mts.map +1 -0
  132. package/dist/cli/verify-proof/trust.mjs +174 -0
  133. package/dist/cli/verify-proof/trust.mjs.map +1 -0
  134. package/dist/driver-sdk/conformance.d.ts +41 -0
  135. package/dist/driver-sdk/conformance.d.ts.map +1 -0
  136. package/dist/driver-sdk/conformance.js +123 -0
  137. package/dist/driver-sdk/conformance.js.map +1 -0
  138. package/dist/driver-sdk/errors.d.ts +75 -0
  139. package/dist/driver-sdk/errors.d.ts.map +1 -0
  140. package/dist/driver-sdk/errors.js +80 -0
  141. package/dist/driver-sdk/errors.js.map +1 -0
  142. package/dist/driver-sdk/idl.d.ts +221 -0
  143. package/dist/driver-sdk/idl.d.ts.map +1 -0
  144. package/dist/driver-sdk/idl.js +140 -0
  145. package/dist/driver-sdk/idl.js.map +1 -0
  146. package/dist/driver-sdk/index.d.ts +28 -0
  147. package/dist/driver-sdk/index.d.ts.map +1 -0
  148. package/dist/driver-sdk/index.js +28 -0
  149. package/dist/driver-sdk/index.js.map +1 -0
  150. package/dist/driver-sdk/manifest.d.ts +93 -0
  151. package/dist/driver-sdk/manifest.d.ts.map +1 -0
  152. package/dist/driver-sdk/manifest.js +12 -0
  153. package/dist/driver-sdk/manifest.js.map +1 -0
  154. package/dist/driver-sdk/retry.d.ts +33 -0
  155. package/dist/driver-sdk/retry.d.ts.map +1 -0
  156. package/dist/driver-sdk/retry.js +50 -0
  157. package/dist/driver-sdk/retry.js.map +1 -0
  158. package/dist/plugin/.claude-plugin/plugin.json +4 -1
  159. package/dist/plugin/agents/apt-planner.md +39 -7
  160. package/dist/plugin/skills/apt/SKILL.md +75 -6
  161. package/dist/plugin/skills/apt-caveman/SKILL.md +64 -0
  162. package/dist/plugin/skills/apt-debug/SKILL.md +36 -4
  163. package/dist/plugin/skills/apt-debug/appendices/diagnose-discipline.md +2 -11
  164. package/dist/plugin/skills/apt-discuss/SKILL.md +4 -4
  165. package/dist/plugin/skills/apt-discuss/appendices/grill-discipline.md +2 -11
  166. package/dist/plugin/skills/apt-discuss/appendices/zoom-out-helper.md +0 -8
  167. package/dist/plugin/skills/apt-execute/SKILL.md +27 -4
  168. package/dist/plugin/skills/apt-execute/appendices/tdd-mode.md +2 -10
  169. package/dist/plugin/skills/apt-fan-out/SKILL.md +36 -1
  170. package/dist/plugin/skills/apt-handoff/SKILL.md +228 -0
  171. package/dist/plugin/skills/apt-improve/DEEPENING.md +0 -8
  172. package/dist/plugin/skills/apt-improve/INTERFACE-DESIGN.md +0 -8
  173. package/dist/plugin/skills/apt-improve/LANGUAGE.md +0 -8
  174. package/dist/plugin/skills/apt-improve/SKILL.md +4 -4
  175. package/dist/plugin/skills/apt-plan/SKILL.md +73 -5
  176. package/dist/plugin/skills/apt-plan/adapters/conductor.md +1 -1
  177. package/dist/plugin/skills/apt-pr-review/SKILL.md +1 -1
  178. package/dist/plugin/skills/apt-prototype/LOGIC.md +0 -8
  179. package/dist/plugin/skills/apt-prototype/SKILL.md +4 -4
  180. package/dist/plugin/skills/apt-prototype/UI.md +0 -8
  181. package/dist/plugin/skills/apt-quick/SKILL.md +31 -1
  182. package/dist/plugin/skills/apt-research/SKILL.md +526 -0
  183. package/dist/plugin/skills/apt-research/appendices/budget-loop.md +397 -0
  184. package/dist/plugin/skills/apt-research/appendices/claim-graph-schema.md +206 -0
  185. package/dist/plugin/skills/apt-research/appendices/domain-tools.md +236 -0
  186. package/dist/plugin/skills/apt-resume/SKILL.md +54 -31
  187. package/dist/plugin/skills/apt-run/SKILL.md +114 -16
  188. package/dist/plugin/skills/apt-setup/SKILL.md +97 -8
  189. package/dist/plugin/skills/apt-ship/SKILL.md +165 -9
  190. package/dist/plugin/skills/apt-spar/SKILL.md +84 -23
  191. package/dist/plugin/skills/apt-triage/AGENT-BRIEF.md +0 -8
  192. package/dist/plugin/skills/apt-triage/OUT-OF-SCOPE.md +0 -7
  193. package/dist/plugin/skills/apt-triage/SKILL.md +2 -2
  194. package/dist/plugin/skills/apt-update/SKILL.md +74 -17
  195. package/dist/plugin/skills/apt-verify-proof/SKILL.md +87 -1
  196. package/dist/plugin/skills/apt-zoom-out/SKILL.md +3 -3
  197. package/dist/schemas/quick-task.d.ts +17 -17
  198. package/dist/schemas/quick-task.d.ts.map +1 -1
  199. package/dist/schemas/quick-task.js +2 -2
  200. package/dist/schemas/quick-task.js.map +1 -1
  201. package/dist/types/config.d.ts +33 -0
  202. package/dist/types/config.d.ts.map +1 -1
  203. package/dist/types/state.d.ts +1 -1
  204. package/dist/types/state.d.ts.map +1 -1
  205. package/dist/types/task-record.d.ts +1 -1
  206. package/dist/types/task-record.d.ts.map +1 -1
  207. package/drivers/.gitkeep +0 -0
  208. package/drivers/api/README.md +40 -0
  209. package/drivers/api/driver.mjs +59 -0
  210. package/drivers/api/manifest.json +26 -0
  211. package/drivers/browser/README.md +105 -0
  212. package/drivers/browser/driver.mjs +134 -0
  213. package/drivers/browser/manifest.json +35 -0
  214. package/drivers/cli/README.md +44 -0
  215. package/drivers/cli/driver.mjs +62 -0
  216. package/drivers/cli/manifest.json +28 -0
  217. package/drivers/electron/README.md +64 -0
  218. package/drivers/electron/driver.mjs +87 -0
  219. package/drivers/electron/manifest.json +37 -0
  220. package/package.json +138 -133
  221. package/prompts/planner.md +1 -1
  222. package/prompts/spec_writer.md +1 -1
  223. package/skills/apt/SKILL.md +75 -6
  224. package/skills/apt-caveman/SKILL.md +64 -0
  225. package/skills/apt-debug/SKILL.md +36 -4
  226. package/skills/apt-debug/appendices/diagnose-discipline.md +2 -11
  227. package/skills/apt-discuss/SKILL.md +4 -4
  228. package/skills/apt-discuss/appendices/grill-discipline.md +2 -11
  229. package/skills/apt-discuss/appendices/zoom-out-helper.md +0 -8
  230. package/skills/apt-execute/SKILL.md +27 -4
  231. package/skills/apt-execute/appendices/tdd-mode.md +2 -10
  232. package/skills/apt-fan-out/SKILL.md +36 -1
  233. package/skills/apt-handoff/SKILL.md +228 -0
  234. package/skills/apt-improve/DEEPENING.md +0 -8
  235. package/skills/apt-improve/INTERFACE-DESIGN.md +0 -8
  236. package/skills/apt-improve/LANGUAGE.md +0 -8
  237. package/skills/apt-improve/SKILL.md +4 -4
  238. package/skills/apt-plan/SKILL.md +73 -5
  239. package/skills/apt-plan/adapters/conductor.md +1 -1
  240. package/skills/apt-planner.md +17 -1
  241. package/skills/apt-pr-review/SKILL.md +1 -1
  242. package/skills/apt-prototype/LOGIC.md +0 -8
  243. package/skills/apt-prototype/SKILL.md +4 -4
  244. package/skills/apt-prototype/UI.md +0 -8
  245. package/skills/apt-quick/SKILL.md +31 -1
  246. package/skills/apt-research/SKILL.md +526 -0
  247. package/skills/apt-research/appendices/budget-loop.md +397 -0
  248. package/skills/apt-research/appendices/claim-graph-schema.md +206 -0
  249. package/skills/apt-research/appendices/domain-tools.md +236 -0
  250. package/skills/apt-resume/SKILL.md +54 -31
  251. package/skills/apt-run/SKILL.md +114 -16
  252. package/skills/apt-setup/SKILL.md +97 -8
  253. package/skills/apt-ship/SKILL.md +165 -9
  254. package/skills/apt-spar/SKILL.md +84 -23
  255. package/skills/apt-triage/AGENT-BRIEF.md +0 -8
  256. package/skills/apt-triage/OUT-OF-SCOPE.md +0 -7
  257. package/skills/apt-triage/SKILL.md +2 -2
  258. package/skills/apt-update/SKILL.md +74 -17
  259. package/skills/apt-verify-proof/SKILL.md +87 -1
  260. package/skills/apt-zoom-out/SKILL.md +3 -3
  261. package/src/cli/commands/adr.mjs +1 -1
  262. package/src/cli/commands/audit-branch-current.mjs +250 -0
  263. package/src/cli/commands/audit.mjs +13 -2
  264. package/src/cli/commands/check-version.mjs +20 -1
  265. package/src/cli/commands/context.mjs +3 -3
  266. package/src/cli/commands/coverage-check.mjs +126 -44
  267. package/src/cli/commands/detect-runtime.mjs +143 -0
  268. package/src/cli/commands/driver-doctor.mjs +294 -0
  269. package/src/cli/commands/gate.mjs +15 -0
  270. package/src/cli/commands/init.mjs +9 -6
  271. package/src/cli/commands/install-from-source.mjs +1 -0
  272. package/src/cli/commands/modes.mjs +1 -1
  273. package/src/cli/commands/route.mjs +42 -1
  274. package/src/cli/commands/triage.mjs +1 -1
  275. package/src/cli/config/load.mjs +9 -3
  276. package/src/cli/coordination/auto-emit-artifact-ready.mjs +1 -1
  277. package/src/cli/coordination/event-schema.mjs +19 -0
  278. package/src/cli/coverage-check/user-outcomes.mjs +273 -0
  279. package/src/cli/dispatch.mjs +17 -1
  280. package/src/cli/gate/context.mjs +20 -1
  281. package/src/cli/gate/gates/consistency-check.mjs +1 -0
  282. package/src/cli/gate/gates/review-clean.mjs +1 -0
  283. package/src/cli/gate/gates/verify-approved.mjs +1 -0
  284. package/src/cli/gate/registry.mjs +11 -1
  285. package/src/cli/host/detect.mjs +1 -1
  286. package/src/cli/install/find-workspace-framework-version.mjs +88 -0
  287. package/src/cli/install/install-from-source.mjs +276 -0
  288. package/src/cli/install/install-kernel.mjs +24 -0
  289. package/src/cli/install/legacy-paths.mjs +164 -39
  290. package/src/cli/install/runtime-detect.mjs +1 -1
  291. package/src/cli/install/runtime-migrate.mjs +63 -30
  292. package/src/cli/install/transforms/codex.mjs +26 -17
  293. package/src/cli/skill-author/contract.mjs +2 -2
  294. package/src/cli/verify-proof/.gitkeep +0 -0
  295. package/src/cli/verify-proof/audit.mjs +55 -0
  296. package/src/cli/verify-proof/exec.mjs +74 -0
  297. package/src/cli/verify-proof/idl/index.mjs +23 -0
  298. package/src/cli/verify-proof/idl/types.ts +42 -0
  299. package/src/cli/verify-proof/manifest-schema.json +212 -0
  300. package/src/cli/verify-proof/manifest-validator.mjs +184 -0
  301. package/src/cli/verify-proof/resolver.mjs +330 -0
  302. package/src/cli/verify-proof/runtime-detect.mjs +211 -0
  303. package/src/cli/verify-proof/trust.mjs +187 -0
  304. package/templates/adr-format.md +0 -8
  305. package/templates/aperant-claude-md-appendix.md +1 -1
  306. package/templates/context-format.md +1 -9
  307. package/templates/proof-verification.md +51 -8
  308. package/workflows/verify-proof.md +130 -19
@@ -2,15 +2,14 @@
2
2
  * install/runtime-migrate.mjs — at-install cleanup of legacy install
3
3
  * trees the framework no longer owns (FRAMEWORK-BUG-021).
4
4
  *
5
- * Codex was originally installed into `.agents/skills/` (commit 1a8dd8a8)
6
- * and later moved to `.codex/`. Projects that upgraded across that move
7
- * end up with a stale `.agents/skills/` tree that:
8
- *
9
- * - keeps `.apt-version` on disk the legacy fallback in
10
- * `readSkillInstallState` reports a stale codex install.
11
- * - shows up in `health-check` as `stale-skills`.
12
- * - leaves dozens of orphaned SKILL.md files the runtime no longer
13
- * reads.
5
+ * Codex shuffled install roots twice:
6
+ * - Pre-0.7: installed at `.agents/skills/` (commit 1a8dd8a8).
7
+ * - v0.7/v0.8: moved to `.codex/agents/` + `.codex/commands/` a
8
+ * misdirect, since Codex CLI 0.132.0 doesn't discover skills there.
9
+ * - v0.8.2 (this fix): moved back to `.agents/skills/<folder>/SKILL.md`
10
+ * (Codex's documented surface). The v0.7/v0.8 `.codex/` markdown
11
+ * tree is now the legacy target — `LEGACY_INSTALL_PATHS.codex` was
12
+ * re-pointed accordingly.
14
13
  *
15
14
  * `runLegacyCleanup` runs once per `apt-tools init` when codex is in the
16
15
  * requested runtime set. It is conservative by default:
@@ -20,8 +19,11 @@
20
19
  * preserved. If anything beyond the known framework set remains,
21
20
  * `retained[]` lists those paths.
22
21
  * - A present-and-current `apt-file-manifest.json` is treated as the
23
- * authoritative "this is a managed install, leave it alone" signal:
24
- * the function no-ops with `reason: 'managed'`.
22
+ * authoritative "this is a managed install, leave it alone" signal
23
+ * — but ONLY when the legacy entry has `honor_manifest: true` (the
24
+ * default). When `honor_manifest: false` (the current codex entry,
25
+ * because `.codex/` is known-dead), the manifest is removed alongside
26
+ * framework files.
25
27
  * - The caller can suppress cleanup entirely via `--keep-legacy` at the
26
28
  * init.mjs site; the function itself is dumb about flags.
27
29
  */
@@ -33,7 +35,8 @@ import { MANIFEST_FILENAME } from './manifest.mjs'
33
35
 
34
36
  /**
35
37
  * @typedef {Object} LegacyCodexDetection
36
- * @property {boolean} present True when `.agents/skills/` exists.
38
+ * @property {boolean} present True when the legacy install_root
39
+ * (currently `.codex/`) exists.
37
40
  * @property {string[]} frameworkFiles Subset of `framework_files` that
38
41
  * actually exist on disk (relative
39
42
  * to install_root).
@@ -46,9 +49,15 @@ import { MANIFEST_FILENAME } from './manifest.mjs'
46
49
  * stamp is present.
47
50
  * @property {boolean} hasManifest Whether an
48
51
  * `apt-file-manifest.json` is
49
- * present at install_root (signals
50
- * a managed install — cleanup
51
- * should no-op).
52
+ * present at install_root. When the
53
+ * legacy entry has
54
+ * `honor_manifest: true` (default)
55
+ * this signals a managed install
56
+ * and cleanup no-ops; when
57
+ * `honor_manifest: false` the
58
+ * manifest is treated as orphan
59
+ * and removed alongside framework
60
+ * files.
52
61
  */
53
62
 
54
63
  const LEGACY = LEGACY_INSTALL_PATHS.codex
@@ -93,7 +102,9 @@ function walkRelative(dir) {
93
102
  }
94
103
 
95
104
  /**
96
- * Probe the codex legacy install tree at `<targetDir>/.agents/skills/`.
105
+ * Probe the codex legacy install tree at `<targetDir>/<LEGACY.install_root>`
106
+ * (currently `.codex/` after the v0.8.2 registry inversion — the v0.7/v0.8
107
+ * misdirect topology).
97
108
  *
98
109
  * @param {string} targetDir
99
110
  * @returns {LegacyCodexDetection}
@@ -142,25 +153,36 @@ function rmEmptyDir(dir) {
142
153
  }
143
154
 
144
155
  /**
145
- * Clean up the legacy `.agents/skills/` tree if it looks orphaned.
156
+ * Clean up the legacy install tree at `<targetDir>/<LEGACY.install_root>`
157
+ * if it looks orphaned. Post v0.8.2 the codex legacy root is `.codex/`
158
+ * with framework files at `agents/<file>.md` + `commands/<file>.md` +
159
+ * `apt-file-manifest.json`.
146
160
  *
147
161
  * Branches:
148
162
  * 1. `present: false` OR `frameworkFiles.length === 0` → no-op,
149
163
  * `{ ran: false, reason: 'no-legacy' }`.
150
- * 2. `hasManifest: true` managed install, no-op,
151
- * `{ ran: false, reason: 'managed' }`.
164
+ * 2. `hasManifest: true` AND `LEGACY.honor_manifest !== false`
165
+ * (default true) managed install, no-op,
166
+ * `{ ran: false, reason: 'managed' }`. When `honor_manifest: false`
167
+ * (known-dead surface like the v0.7/v0.8 codex misdirect) the
168
+ * manifest is treated as orphan and removed alongside framework
169
+ * files.
152
170
  * 3. Otherwise: per-file `unlinkSync` each framework-owned file;
153
- * `rmdirSync` any now-empty `apt-*` subdirectory; sweep
154
- * `.agents/skills/` only if it is empty; sweep `.agents/` only if
155
- * its `skills/` got removed and `.agents/` is empty.
171
+ * `rmdirSync` any subdirectory left empty after the unlinks (e.g.
172
+ * `.codex/agents/`, `.codex/commands/`); sweep the install_root
173
+ * itself only if it is fully empty after the per-file pass; sweep
174
+ * the install_root's parent only if it too became empty (relevant
175
+ * for legacy topologies two levels deep, e.g. the pre-0.7
176
+ * `.agents/skills/` codex layout).
156
177
  *
157
178
  * Returns `{ ran: true, removed, retained, rmdirs }` on the cleanup
158
179
  * branch:
159
180
  * - `removed` — relative paths under `install_root` that were unlinked.
160
181
  * - `retained` — relative paths under `install_root` that were NOT
161
- * removed (user-added skills / files not in the legacy set).
162
- * - `rmdirs` — absolute paths of directories that were removed
163
- * (apt-* subdirs, the install_root itself, .agents/), in removal order.
182
+ * removed (user-added skills / files not in the legacy set, e.g.
183
+ * `.codex/config.toml`).
184
+ * - `rmdirs` — absolute paths of directories that were removed,
185
+ * in removal order.
164
186
  *
165
187
  * Atomicity: per-file unlink is non-atomic. A partial-failure scenario
166
188
  * (process killed mid-loop) is tolerable — the next `init` run will
@@ -178,7 +200,14 @@ export function runLegacyCleanup({ targetDir, dryRun = false }) {
178
200
  if (!detection.present || detection.frameworkFiles.length === 0) {
179
201
  return { ran: false, reason: 'no-legacy' }
180
202
  }
181
- if (detection.hasManifest) {
203
+ // `honor_manifest: false` means the legacy install_root is a known-dead
204
+ // surface (the v0.7/v0.8 codex misdirect). A manifest sitting there is
205
+ // by definition stale — fall through and remove it alongside framework
206
+ // files. `honor_manifest: true` (default) preserves the managed-install
207
+ // safety for legacy roots that could legitimately re-host a managed
208
+ // install.
209
+ const honorManifest = LEGACY.honor_manifest !== false
210
+ if (detection.hasManifest && honorManifest) {
182
211
  return { ran: false, reason: 'managed' }
183
212
  }
184
213
 
@@ -233,12 +262,16 @@ export function runLegacyCleanup({ targetDir, dryRun = false }) {
233
262
  if (rmEmptyDir(abs)) rmdirs.push(abs)
234
263
  }
235
264
 
236
- // Sweep `.agents/skills/` only if fully empty after the per-file
237
- // pass — preserves any user-added skill dirs.
265
+ // Sweep the legacy install_root only if fully empty after the per-file
266
+ // pass — preserves any user-added content under it (e.g. `.codex/config.toml`
267
+ // when LEGACY.install_root is `.codex/`).
238
268
  if (rmEmptyDir(installRoot)) {
239
269
  rmdirs.push(installRoot)
240
- // Sweep `.agents/` only if it became empty too (i.e. no other
241
- // `.agents/<sibling>` content the user keeps there).
270
+ // Sweep the install_root's parent only if it became empty too
271
+ // (relevant for legacy topologies whose install_root sits two
272
+ // levels deep, e.g. the pre-0.7 `.agents/skills/` codex layout).
273
+ // No-op when install_root is a top-level dir like `.codex/` —
274
+ // rmEmptyDir refuses to remove a non-empty project root.
242
275
  const agentsRoot = dirname(installRoot)
243
276
  if (rmEmptyDir(agentsRoot)) rmdirs.push(agentsRoot)
244
277
  }
@@ -2,13 +2,18 @@
2
2
  * install/transforms/codex.mjs — Codex transform.
3
3
  *
4
4
  * Codex quirks:
5
- * - frontmatter strips `tools` and `color` (Codex validates strictly and
6
- * rejects unknown/style-only keys).
5
+ * - frontmatter is whitelisted to `KEEP = {name, description}` (Codex
6
+ * validates strictly against its `allowed_properties` set and rejects
7
+ * unknown keys; the whitelist is drift-proof against new framework
8
+ * frontmatter keys).
7
9
  * - body is wrapped in <codex_agent_role>…</codex_agent_role>.
8
10
  * - slash-command refs `/apt:foo` rewritten to `/apt-foo` (Codex command
9
11
  * names disallow `:`).
10
- * - output: .codex/agents/<name>.md AND .codex/commands/<name>.md (some
11
- * skills register both as agent + invocable command).
12
+ * - output: skills/<folder>/SKILL.md (the documented Codex discovery
13
+ * surface per https://developers.openai.com/codex/skills resolved
14
+ * against installRoot `.agents` to land at `.agents/skills/<folder>/SKILL.md`).
15
+ * Markdown agents are NOT a Codex surface (custom-agents are TOML
16
+ * under `.codex/agents/`); only skills are emitted.
12
17
  */
13
18
 
14
19
  import { basename, dirname } from 'node:path'
@@ -16,11 +21,16 @@ import {
16
21
  parseFrontmatter,
17
22
  rewriteCommandRefs,
18
23
  serializeFrontmatter,
19
- stripFields,
20
24
  substituteVersion,
21
25
  } from './_shared.mjs'
22
26
 
23
- const STRIP = ['tools', 'color']
27
+ // Codex's `allowed_properties` set (see
28
+ // ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py:40):
29
+ // {"name", "description", "license", "allowed-tools", "metadata"}.
30
+ // We use the minimum viable whitelist {name, description} so adding new
31
+ // framework frontmatter keys (a routine occurrence) doesn't break Codex
32
+ // validation — only the 2 keys Codex actually consumes are emitted.
33
+ const KEEP = ['name', 'description']
24
34
 
25
35
  /**
26
36
  * @param {import('../pipeline.mjs').TransformInput} input
@@ -31,7 +41,10 @@ export function transform({ canonicalContent, canonicalRelPath, version, fileTyp
31
41
  const parsed = parseFrontmatter(subbed)
32
42
  let payload
33
43
  if (parsed.hasFrontmatter && parsed.fm) {
34
- stripFields(parsed.fm, STRIP)
44
+ // Whitelist filter: drop every frontmatter key NOT in KEEP.
45
+ for (const k of Object.keys(parsed.fm)) {
46
+ if (!KEEP.includes(k)) delete parsed.fm[k]
47
+ }
35
48
  const wrappedBody = `<codex_agent_role>\n${parsed.body}\n</codex_agent_role>\n`
36
49
  payload = serializeFrontmatter({ ...parsed, body: wrappedBody })
37
50
  } else {
@@ -41,16 +54,12 @@ export function transform({ canonicalContent, canonicalRelPath, version, fileTyp
41
54
 
42
55
  if (fileType === 'skill') {
43
56
  const folder = basename(dirname(canonicalRelPath))
44
- // Skills emit BOTH an agent definition (for invocation context) and a
45
- // command (so the user can type `/apt-foo` directly in Codex).
46
- return [
47
- { outputPath: `agents/${folder}.md`, content: payload },
48
- { outputPath: `commands/${folder}.md`, content: payload },
49
- ]
50
- }
51
- if (fileType === 'agent') {
52
- const file = basename(canonicalRelPath, '.md')
53
- return [{ outputPath: `agents/${file}.md`, content: payload }]
57
+ // Codex's documented skill discovery surface is `.agents/skills/<folder>/SKILL.md`
58
+ // (one folder per skill, canonical SKILL.md filename).
59
+ return [{ outputPath: `skills/${folder}/SKILL.md`, content: payload }]
54
60
  }
61
+ // Markdown agents are not a Codex surface. Codex custom-agents are TOML
62
+ // under `.codex/agents/`; emitting markdown there would just create
63
+ // another dead surface. Drop the agent branch entirely.
55
64
  return []
56
65
  }
@@ -164,9 +164,9 @@ export const SkillFrontmatterSchema = z
164
164
  // don't immediately break skills that carry them.
165
165
  triggers: z.array(z.string()).optional(),
166
166
  color: z.string().optional(),
167
- // Pocock adoption ST-13 (AC12): optional `produces:` field enumerates
167
+ // ST-13 (AC12): optional `produces:` field enumerates
168
168
  // the content-formats a skill emits (e.g. "PRD-shaped spec.md",
169
- // "vertical-slice subtasks", "Pocock-format CONTEXT.md term-block").
169
+ // "vertical-slice subtasks", "Aperant CONTEXT.md term-block").
170
170
  // Consumed by `apt-tools modes list` to surface what each skill ships.
171
171
  // Additive and backward-compatible — skills without the field default
172
172
  // to [] in modes list output.
File without changes
@@ -0,0 +1,55 @@
1
+ /**
2
+ * audit.mjs — append-only JSONL audit log for driver invocations.
3
+ *
4
+ * ID-05: one file per day at .aperant/events/{YYYY-MM-DD}.jsonl.
5
+ * One line per driver invocation:
6
+ * {ts, driver_id, version, manifest_sha256, trust_tier, sandbox_profile,
7
+ * decision: "allow|deny|requires_approval",
8
+ * result: "success|fail|skip"}
9
+ *
10
+ * Append-only — no rewrites. Each appendDriverEvent() opens the file in
11
+ * 'a' mode and writes a single line; concurrent agents may interleave
12
+ * lines but no line is ever overwritten.
13
+ */
14
+
15
+ import { appendFileSync, mkdirSync } from 'node:fs'
16
+ import { dirname, join, resolve } from 'node:path'
17
+
18
+ /**
19
+ * Compute today's events filename relative to projectDir.
20
+ * @param {string} projectDir
21
+ * @param {Date} [now]
22
+ * @returns {string}
23
+ */
24
+ export function dailyEventsPath(projectDir, now = new Date()) {
25
+ const yyyy = now.getUTCFullYear()
26
+ const mm = String(now.getUTCMonth() + 1).padStart(2, '0')
27
+ const dd = String(now.getUTCDate()).padStart(2, '0')
28
+ return join(resolve(projectDir), '.aperant/events', `${yyyy}-${mm}-${dd}.jsonl`)
29
+ }
30
+
31
+ /**
32
+ * Append a driver-invocation audit line.
33
+ *
34
+ * @param {string} projectDir
35
+ * @param {Object} entry
36
+ * @param {string} entry.driver_id
37
+ * @param {string} entry.version
38
+ * @param {string} entry.manifest_sha256
39
+ * @param {string} entry.trust_tier
40
+ * @param {string} entry.sandbox_profile
41
+ * @param {'allow' | 'deny' | 'requires_approval'} entry.decision
42
+ * @param {'success' | 'fail' | 'skip'} entry.result
43
+ * @param {string} [entry.verb] — IDL verb invoked (optional metadata)
44
+ * @param {string} [entry.reason] — decision-rationale string (optional)
45
+ */
46
+ export function appendDriverEvent(projectDir, entry) {
47
+ const path = dailyEventsPath(projectDir)
48
+ mkdirSync(dirname(path), { recursive: true })
49
+ const line = JSON.stringify({
50
+ ts: new Date().toISOString(),
51
+ kind: 'driver_invocation',
52
+ ...entry,
53
+ })
54
+ appendFileSync(path, line + '\n', 'utf-8')
55
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * exec.mjs — execFile-only execution layer for local_command transports.
3
+ *
4
+ * ID-03 security invariant: drivers with `transport: { local_command }`
5
+ * MUST be invoked through execFile (NO shell, NO pipes, NO redirects).
6
+ *
7
+ * This module exposes ONE function — execLocalCommand — which:
8
+ * 1. Asserts the transport is { local_command: { binary, args[] } }
9
+ * (the manifest validator already structurally enforces this; this
10
+ * is defense-in-depth at runtime).
11
+ * 2. Rejects any args entry that is not a plain string.
12
+ * 3. Invokes node:child_process.execFile (NOT child_process.exec, NOT
13
+ * spawn with shell:true).
14
+ *
15
+ * Grep guard (TD-05): the test verify-proof-local-command-security.test.ts
16
+ * statically asserts that exec.mjs imports execFile from
17
+ * 'node:child_process' and never references child_process.exec / spawn
18
+ * with shell:true.
19
+ */
20
+
21
+ import { execFile } from 'node:child_process'
22
+ import { promisify } from 'node:util'
23
+
24
+ const execFileAsync = promisify(execFile)
25
+
26
+ /**
27
+ * Type-check that a transport is the structured local_command variant.
28
+ * @param {unknown} transport
29
+ * @returns {transport is {local_command: {binary: string, args: string[]}}}
30
+ */
31
+ function isStructuredLocalCommand(transport) {
32
+ if (transport === null || typeof transport !== 'object' || Array.isArray(transport)) return false
33
+ const obj = /** @type {Record<string, unknown>} */ (transport)
34
+ if (obj.local_command === null || typeof obj.local_command !== 'object') return false
35
+ const lc = /** @type {Record<string, unknown>} */ (obj.local_command)
36
+ if (typeof lc.binary !== 'string') return false
37
+ if (!Array.isArray(lc.args)) return false
38
+ for (const a of lc.args) {
39
+ if (typeof a !== 'string') return false
40
+ }
41
+ return true
42
+ }
43
+
44
+ /**
45
+ * Execute a manifest's local_command transport via execFile (no shell).
46
+ * Throws if the transport is not the structured variant.
47
+ *
48
+ * @param {{transport: unknown}} manifest
49
+ * @param {string[]} [extraArgs] — appended to manifest.transport.local_command.args.
50
+ * @param {{cwd?: string, env?: Record<string,string>, timeout?: number}} [options]
51
+ * @returns {Promise<{stdout: string, stderr: string}>}
52
+ */
53
+ export async function execLocalCommand(manifest, extraArgs = [], options = {}) {
54
+ const transport = manifest.transport
55
+ if (!isStructuredLocalCommand(transport)) {
56
+ throw new Error(
57
+ `execLocalCommand: transport is not a structured local_command — refusing to invoke. Got: ${JSON.stringify(transport)}`,
58
+ )
59
+ }
60
+ const { binary, args } = transport.local_command
61
+ for (const arg of extraArgs) {
62
+ if (typeof arg !== 'string') {
63
+ throw new Error(`execLocalCommand: extraArgs must be strings, got ${typeof arg}`)
64
+ }
65
+ }
66
+ return execFileAsync(binary, [...args, ...extraArgs], {
67
+ cwd: options.cwd,
68
+ env: options.env,
69
+ timeout: options.timeout,
70
+ // Explicit — never pass shell:true. execFile defaults to no shell, but
71
+ // we surface the invariant in code for grep-guard purposes.
72
+ shell: false,
73
+ })
74
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * idl/index.mjs — framework-side re-export of the IDL v1 runtime registry.
3
+ *
4
+ * Single source of truth lives at packages/framework/src/driver-sdk/idl.ts
5
+ * (inlined in 0.8.5 — originally `@aperant/driver-sdk`). This file
6
+ * re-exports those runtime values so existing callers (bundled drivers,
7
+ * resolver, driver-doctor, conformance kit) keep working without a
8
+ * refactor of every callsite.
9
+ *
10
+ * If you add a verb, edit packages/framework/src/driver-sdk/idl.ts.
11
+ */
12
+
13
+ export {
14
+ ASSERTION_VERBS,
15
+ ASYNC_VERBS,
16
+ EVIDENCE_VERBS,
17
+ IDL_VERB_ARGS,
18
+ IDL_VERB_NAMES,
19
+ INTERACTION_VERBS,
20
+ isVerbResult,
21
+ LIFECYCLE_VERBS,
22
+ validateVerbArgs,
23
+ } from '@aperant/framework/driver-sdk'
@@ -0,0 +1,42 @@
1
+ /**
2
+ * idl/types.ts — re-export the SDK's IDL types for framework-internal use.
3
+ *
4
+ * Single source of truth lives at packages/framework/src/driver-sdk/idl.ts
5
+ * (inlined in 0.8.5). Framework code imports from here so future moves
6
+ * (e.g. an internal-only IDL extension or re-extraction) only touch this
7
+ * re-export, not every call site.
8
+ */
9
+
10
+ export type {
11
+ AssertNetworkArgs,
12
+ AssertOutputArgs,
13
+ AssertTextArgs,
14
+ AssertVisibleArgs,
15
+ AwaitSignalArgs,
16
+ CaptureLogsArgs,
17
+ ClickArgs,
18
+ DomDumpArgs,
19
+ DragDropArgs,
20
+ DriverModule,
21
+ DumpStateArgs,
22
+ ExecuteJsArgs,
23
+ Handle,
24
+ IdlVerbName,
25
+ KeyArgs,
26
+ LaunchArgs,
27
+ NavigateArgs,
28
+ RecordVideoArgs,
29
+ ScreenshotArgs,
30
+ SelectArgs,
31
+ SwipeArgs,
32
+ SwitchContextArgs,
33
+ Target,
34
+ TargetKind,
35
+ TeardownArgs,
36
+ TriggerArgs,
37
+ TypeArgs,
38
+ UploadFileArgs,
39
+ VerbResult,
40
+ WaitForEventArgs,
41
+ WaitForIdleArgs,
42
+ } from '@aperant/framework/driver-sdk'
@@ -0,0 +1,212 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://aperant.dev/schemas/driver-manifest-v1.json",
4
+ "title": "Aperant Driver Manifest v1",
5
+ "description": "Structural contract for a verify-proof driver manifest. Validates at publish-time (apt-tools driver doctor) and at load-time (resolver). The transport oneOf rejects free-form shell strings — local_command MUST be a structured {binary, args[]} object per ID-03.",
6
+ "type": "object",
7
+ "required": [
8
+ "driverId",
9
+ "version",
10
+ "targets",
11
+ "capabilities",
12
+ "frameworkApiRange",
13
+ "priority",
14
+ "stability",
15
+ "trust",
16
+ "security",
17
+ "transport"
18
+ ],
19
+ "properties": {
20
+ "driverId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9_-]*$"
23
+ },
24
+ "version": {
25
+ "type": "string"
26
+ },
27
+ "targets": {
28
+ "type": "array",
29
+ "items": { "type": "string" }
30
+ },
31
+ "capabilities": {
32
+ "type": "array",
33
+ "items": { "type": "string" }
34
+ },
35
+ "evidence_capabilities": {
36
+ "type": "array",
37
+ "items": { "type": "string" }
38
+ },
39
+ "frameworkApiRange": {
40
+ "type": "string"
41
+ },
42
+ "requires": {
43
+ "type": "object",
44
+ "properties": {
45
+ "allOf": { "type": "array", "items": { "type": "string" } },
46
+ "anyOf": { "type": "array", "items": { "type": "string" } }
47
+ }
48
+ },
49
+ "os": {
50
+ "type": "array",
51
+ "items": { "type": "string" }
52
+ },
53
+ "arch": {
54
+ "type": "array",
55
+ "items": { "type": "string" }
56
+ },
57
+ "container_support": { "type": "boolean" },
58
+ "conflicts_with": {
59
+ "type": "array",
60
+ "items": { "type": "string" }
61
+ },
62
+ "priority": { "type": "number" },
63
+ "stability": {
64
+ "type": "string",
65
+ "enum": ["experimental", "beta", "ga"]
66
+ },
67
+ "trust": {
68
+ "type": "object",
69
+ "required": ["tier"],
70
+ "properties": {
71
+ "tier": {
72
+ "type": "string",
73
+ "enum": [
74
+ "first_party_signed",
75
+ "community_verified",
76
+ "community_unverified",
77
+ "local_unverified"
78
+ ]
79
+ },
80
+ "publisher": {
81
+ "type": "object",
82
+ "required": ["name"],
83
+ "properties": {
84
+ "name": { "type": "string" },
85
+ "npm_scope": { "type": "string" },
86
+ "github_org": { "type": "string" },
87
+ "verified": { "type": "boolean" }
88
+ }
89
+ },
90
+ "provenance": {
91
+ "type": "object",
92
+ "properties": {
93
+ "scheme": {
94
+ "type": "string",
95
+ "enum": ["sigstore", "npm-provenance", "gpg", "none"]
96
+ },
97
+ "identity": { "type": "string" },
98
+ "signature": { "type": "string" },
99
+ "certificate": { "type": "string" }
100
+ }
101
+ },
102
+ "integrity": {
103
+ "type": "object",
104
+ "properties": {
105
+ "manifest_sha256": { "type": "string" },
106
+ "artifact_digest": { "type": "string" }
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "security": {
112
+ "type": "object",
113
+ "required": ["sandbox_profile", "network"],
114
+ "properties": {
115
+ "sandbox_profile": {
116
+ "type": "string",
117
+ "enum": ["read_only", "workspace_write", "system_write"]
118
+ },
119
+ "network": {
120
+ "type": "string",
121
+ "enum": ["deny", "allowlist", "allow"]
122
+ },
123
+ "allowed_executables": {
124
+ "type": "array",
125
+ "items": { "type": "string" }
126
+ },
127
+ "allow_shell": { "type": "boolean" },
128
+ "requires_user_approval": { "type": "boolean" }
129
+ }
130
+ },
131
+ "audit": {
132
+ "type": "object",
133
+ "required": ["log_invocations", "log_manifest_hash"],
134
+ "properties": {
135
+ "log_invocations": { "type": "boolean" },
136
+ "log_manifest_hash": { "type": "boolean" }
137
+ }
138
+ },
139
+ "preflight": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "required": ["name", "required"],
144
+ "properties": {
145
+ "name": { "type": "string" },
146
+ "command": {
147
+ "type": "object",
148
+ "required": ["binary", "args"],
149
+ "properties": {
150
+ "binary": { "type": "string" },
151
+ "args": {
152
+ "type": "array",
153
+ "items": { "type": "string" }
154
+ }
155
+ }
156
+ },
157
+ "required": { "type": "boolean" }
158
+ }
159
+ }
160
+ },
161
+ "transport": {
162
+ "oneOf": [
163
+ {
164
+ "type": "object",
165
+ "required": ["mcp_server_id"],
166
+ "properties": {
167
+ "mcp_server_id": { "type": "string" },
168
+ "skill_id": { "type": "string" }
169
+ }
170
+ },
171
+ {
172
+ "type": "object",
173
+ "required": ["local_command"],
174
+ "properties": {
175
+ "local_command": {
176
+ "type": "object",
177
+ "required": ["binary", "args"],
178
+ "properties": {
179
+ "binary": { "type": "string" },
180
+ "args": {
181
+ "type": "array",
182
+ "items": { "type": "string" }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ {
189
+ "type": "object",
190
+ "required": ["http_endpoint"],
191
+ "properties": {
192
+ "http_endpoint": { "type": "string" }
193
+ }
194
+ },
195
+ {
196
+ "type": "object",
197
+ "required": ["npm_package"],
198
+ "properties": {
199
+ "npm_package": { "type": "string" }
200
+ }
201
+ },
202
+ {
203
+ "type": "object",
204
+ "required": ["builtin"],
205
+ "properties": {
206
+ "builtin": { "const": true }
207
+ }
208
+ }
209
+ ]
210
+ }
211
+ }
212
+ }