teamcast 0.9.3 → 1.0.0

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 (294) hide show
  1. package/README.md +219 -146
  2. package/dist/application/team.d.ts.map +1 -1
  3. package/dist/application/team.js +0 -1
  4. package/dist/application/team.js.map +1 -1
  5. package/dist/application/validate-team.d.ts.map +1 -1
  6. package/dist/application/validate-team.js +7 -4
  7. package/dist/application/validate-team.js.map +1 -1
  8. package/dist/cli/explain.d.ts.map +1 -1
  9. package/dist/cli/explain.js +4 -2
  10. package/dist/cli/explain.js.map +1 -1
  11. package/dist/cli/init.js +2 -5
  12. package/dist/cli/init.js.map +1 -1
  13. package/dist/cli/manage.d.ts.map +1 -1
  14. package/dist/cli/manage.js +6 -15
  15. package/dist/cli/manage.js.map +1 -1
  16. package/dist/core/assertions.d.ts +4 -4
  17. package/dist/core/assertions.d.ts.map +1 -1
  18. package/dist/core/capability-resolver.d.ts +7 -0
  19. package/dist/core/capability-resolver.d.ts.map +1 -0
  20. package/dist/core/capability-resolver.js +18 -0
  21. package/dist/core/capability-resolver.js.map +1 -0
  22. package/dist/core/compose-policies.d.ts +15 -0
  23. package/dist/core/compose-policies.d.ts.map +1 -0
  24. package/dist/core/compose-policies.js +106 -0
  25. package/dist/core/compose-policies.js.map +1 -0
  26. package/dist/core/environment-resolver.d.ts +20 -0
  27. package/dist/core/environment-resolver.d.ts.map +1 -0
  28. package/dist/core/environment-resolver.js +202 -0
  29. package/dist/core/environment-resolver.js.map +1 -0
  30. package/dist/core/policy-evaluator.d.ts +2 -2
  31. package/dist/core/policy-evaluator.d.ts.map +1 -1
  32. package/dist/core/policy-evaluator.js +7 -7
  33. package/dist/core/policy-evaluator.js.map +1 -1
  34. package/dist/core/types.d.ts +5 -2
  35. package/dist/core/types.d.ts.map +1 -1
  36. package/dist/explainer/index.js +1 -1
  37. package/dist/explainer/index.js.map +1 -1
  38. package/dist/generator/index.d.ts.map +1 -1
  39. package/dist/generator/index.js +4 -3
  40. package/dist/generator/index.js.map +1 -1
  41. package/dist/importer/codex.js.map +1 -1
  42. package/dist/importer/index.d.ts +0 -3
  43. package/dist/importer/index.d.ts.map +1 -1
  44. package/dist/importer/index.js +2 -3
  45. package/dist/importer/index.js.map +1 -1
  46. package/dist/manifest/normalize.d.ts.map +1 -1
  47. package/dist/manifest/normalize.js +41 -6
  48. package/dist/manifest/normalize.js.map +1 -1
  49. package/dist/manifest/types.d.ts +15 -10
  50. package/dist/manifest/types.d.ts.map +1 -1
  51. package/dist/manifest/types.js.map +1 -1
  52. package/dist/registry/capabilities.d.ts +6 -0
  53. package/dist/registry/capabilities.d.ts.map +1 -0
  54. package/dist/registry/capabilities.js +14 -0
  55. package/dist/registry/capabilities.js.map +1 -0
  56. package/dist/registry/environments.d.ts +5 -0
  57. package/dist/registry/environments.d.ts.map +1 -0
  58. package/dist/registry/environments.js +106 -0
  59. package/dist/registry/environments.js.map +1 -0
  60. package/dist/registry/index.d.ts +23 -0
  61. package/dist/registry/index.d.ts.map +1 -0
  62. package/dist/registry/index.js +85 -0
  63. package/dist/registry/index.js.map +1 -0
  64. package/dist/registry/instruction-fragments.d.ts +11 -0
  65. package/dist/registry/instruction-fragments.d.ts.map +1 -0
  66. package/dist/{components/agent-fragments.js → registry/instruction-fragments.js} +22 -73
  67. package/dist/registry/instruction-fragments.js.map +1 -0
  68. package/dist/registry/models.d.ts +3 -0
  69. package/dist/registry/models.d.ts.map +1 -0
  70. package/dist/registry/models.js +46 -0
  71. package/dist/registry/models.js.map +1 -0
  72. package/dist/registry/policy-fragments.d.ts +6 -0
  73. package/dist/registry/policy-fragments.d.ts.map +1 -0
  74. package/dist/registry/policy-fragments.js +49 -0
  75. package/dist/registry/policy-fragments.js.map +1 -0
  76. package/dist/registry/skills.d.ts +5 -0
  77. package/dist/registry/skills.d.ts.map +1 -0
  78. package/dist/registry/skills.js +182 -0
  79. package/dist/registry/skills.js.map +1 -0
  80. package/dist/registry/traits.d.ts +16 -0
  81. package/dist/registry/traits.d.ts.map +1 -0
  82. package/dist/registry/traits.js +109 -0
  83. package/dist/registry/traits.js.map +1 -0
  84. package/dist/registry/types.d.ts +77 -0
  85. package/dist/registry/types.d.ts.map +1 -0
  86. package/dist/registry/types.js +21 -0
  87. package/dist/registry/types.js.map +1 -0
  88. package/dist/renderers/claude/docs.d.ts +0 -1
  89. package/dist/renderers/claude/docs.d.ts.map +1 -1
  90. package/dist/renderers/claude/docs.js +0 -95
  91. package/dist/renderers/claude/docs.js.map +1 -1
  92. package/dist/renderers/claude/index.d.ts.map +1 -1
  93. package/dist/renderers/claude/index.js +1 -2
  94. package/dist/renderers/claude/index.js.map +1 -1
  95. package/dist/renderers/claude/skill-map.d.ts +8 -8
  96. package/dist/renderers/claude/skill-map.d.ts.map +1 -1
  97. package/dist/renderers/claude/skill-map.js +9 -9
  98. package/dist/renderers/claude/skill-map.js.map +1 -1
  99. package/dist/renderers/claude/skill-md.d.ts.map +1 -1
  100. package/dist/renderers/claude/skill-md.js +73 -5
  101. package/dist/renderers/claude/skill-md.js.map +1 -1
  102. package/dist/renderers/codex/agents-md.d.ts +4 -0
  103. package/dist/renderers/codex/agents-md.d.ts.map +1 -0
  104. package/dist/renderers/codex/agents-md.js +94 -0
  105. package/dist/renderers/codex/agents-md.js.map +1 -0
  106. package/dist/renderers/codex/index.d.ts.map +1 -1
  107. package/dist/renderers/codex/index.js +4 -0
  108. package/dist/renderers/codex/index.js.map +1 -1
  109. package/dist/renderers/codex/skill-map.d.ts +3 -4
  110. package/dist/renderers/codex/skill-map.d.ts.map +1 -1
  111. package/dist/renderers/codex/skill-map.js +1 -1
  112. package/dist/renderers/codex/skill-map.js.map +1 -1
  113. package/dist/renderers/codex/skill-md.d.ts +4 -0
  114. package/dist/renderers/codex/skill-md.d.ts.map +1 -0
  115. package/dist/renderers/codex/skill-md.js +125 -0
  116. package/dist/renderers/codex/skill-md.js.map +1 -0
  117. package/dist/renderers/target-context.d.ts +3 -4
  118. package/dist/renderers/target-context.d.ts.map +1 -1
  119. package/dist/team-templates/policies.js +1 -1
  120. package/dist/team-templates/policies.js.map +1 -1
  121. package/dist/team-templates/presets.d.ts.map +1 -1
  122. package/dist/team-templates/presets.js +5 -8
  123. package/dist/team-templates/presets.js.map +1 -1
  124. package/dist/team-templates/roles.d.ts +3 -3
  125. package/dist/team-templates/roles.d.ts.map +1 -1
  126. package/dist/team-templates/roles.js +2 -4
  127. package/dist/team-templates/roles.js.map +1 -1
  128. package/dist/types/manifest.d.ts +2 -2
  129. package/dist/types/manifest.d.ts.map +1 -1
  130. package/dist/types/manifest.js +3 -3
  131. package/dist/types/manifest.js.map +1 -1
  132. package/dist/utils/skill-prompt-options.d.ts +4 -0
  133. package/dist/utils/skill-prompt-options.d.ts.map +1 -0
  134. package/dist/utils/skill-prompt-options.js +12 -0
  135. package/dist/utils/skill-prompt-options.js.map +1 -0
  136. package/dist/validator/checks/capability-policy.d.ts +5 -0
  137. package/dist/validator/checks/capability-policy.d.ts.map +1 -0
  138. package/dist/validator/checks/capability-policy.js +40 -0
  139. package/dist/validator/checks/capability-policy.js.map +1 -0
  140. package/dist/validator/checks/capability-tools.d.ts +5 -0
  141. package/dist/validator/checks/capability-tools.d.ts.map +1 -0
  142. package/dist/validator/checks/capability-tools.js +23 -0
  143. package/dist/validator/checks/capability-tools.js.map +1 -0
  144. package/dist/validator/checks/environment.d.ts +8 -0
  145. package/dist/validator/checks/environment.d.ts.map +1 -0
  146. package/dist/validator/checks/environment.js +28 -0
  147. package/dist/validator/checks/environment.js.map +1 -0
  148. package/dist/validator/checks/handoff-graph.d.ts +2 -2
  149. package/dist/validator/checks/handoff-graph.d.ts.map +1 -1
  150. package/dist/validator/checks/handoff-graph.js +2 -2
  151. package/dist/validator/checks/handoff-graph.js.map +1 -1
  152. package/dist/validator/checks/instructions.d.ts +5 -0
  153. package/dist/validator/checks/instructions.d.ts.map +1 -0
  154. package/dist/validator/checks/instructions.js +169 -0
  155. package/dist/validator/checks/instructions.js.map +1 -0
  156. package/dist/validator/checks/manifest-registry.d.ts +8 -0
  157. package/dist/validator/checks/manifest-registry.d.ts.map +1 -0
  158. package/dist/validator/checks/manifest-registry.js +68 -0
  159. package/dist/validator/checks/manifest-registry.js.map +1 -0
  160. package/dist/validator/checks/mcp.d.ts +4 -0
  161. package/dist/validator/checks/mcp.d.ts.map +1 -0
  162. package/dist/validator/checks/mcp.js +73 -0
  163. package/dist/validator/checks/mcp.js.map +1 -0
  164. package/dist/validator/checks/policy-coherence.d.ts +4 -0
  165. package/dist/validator/checks/policy-coherence.d.ts.map +1 -0
  166. package/dist/validator/checks/policy-coherence.js +69 -0
  167. package/dist/validator/checks/policy-coherence.js.map +1 -0
  168. package/dist/validator/checks/registry.d.ts +8 -0
  169. package/dist/validator/checks/registry.d.ts.map +1 -0
  170. package/dist/validator/checks/registry.js +23 -0
  171. package/dist/validator/checks/registry.js.map +1 -0
  172. package/dist/validator/checks/role-warnings.d.ts +2 -2
  173. package/dist/validator/checks/role-warnings.d.ts.map +1 -1
  174. package/dist/validator/checks/role-warnings.js +5 -5
  175. package/dist/validator/checks/role-warnings.js.map +1 -1
  176. package/dist/validator/checks/runtime-models.d.ts +4 -0
  177. package/dist/validator/checks/runtime-models.d.ts.map +1 -0
  178. package/dist/validator/checks/runtime-models.js +14 -0
  179. package/dist/validator/checks/runtime-models.js.map +1 -0
  180. package/dist/validator/checks/skill-requirements.d.ts +5 -0
  181. package/dist/validator/checks/skill-requirements.d.ts.map +1 -0
  182. package/dist/validator/checks/skill-requirements.js +143 -0
  183. package/dist/validator/checks/skill-requirements.js.map +1 -0
  184. package/dist/validator/checks/team-graph-enhanced.d.ts +4 -0
  185. package/dist/validator/checks/team-graph-enhanced.d.ts.map +1 -0
  186. package/dist/validator/checks/team-graph-enhanced.js +71 -0
  187. package/dist/validator/checks/team-graph-enhanced.js.map +1 -0
  188. package/dist/validator/checks/tool-conflicts.d.ts +2 -2
  189. package/dist/validator/checks/tool-conflicts.d.ts.map +1 -1
  190. package/dist/validator/checks/tool-conflicts.js +3 -3
  191. package/dist/validator/checks/tool-conflicts.js.map +1 -1
  192. package/dist/validator/checks/trait-capability.d.ts +4 -0
  193. package/dist/validator/checks/trait-capability.d.ts.map +1 -0
  194. package/dist/validator/checks/trait-capability.js +23 -0
  195. package/dist/validator/checks/trait-capability.js.map +1 -0
  196. package/dist/validator/heuristics.d.ts +25 -0
  197. package/dist/validator/heuristics.d.ts.map +1 -0
  198. package/dist/validator/heuristics.js +87 -0
  199. package/dist/validator/heuristics.js.map +1 -0
  200. package/dist/validator/index.d.ts.map +1 -1
  201. package/dist/validator/index.js +24 -4
  202. package/dist/validator/index.js.map +1 -1
  203. package/dist/validator/reporter.d.ts.map +1 -1
  204. package/dist/validator/reporter.js +37 -10
  205. package/dist/validator/reporter.js.map +1 -1
  206. package/dist/validator/types.d.ts +3 -0
  207. package/dist/validator/types.d.ts.map +1 -1
  208. package/dist/wizard/index.d.ts.map +1 -1
  209. package/dist/wizard/index.js +2 -5
  210. package/dist/wizard/index.js.map +1 -1
  211. package/dist/wizard/steps/agent-customization.d.ts.map +1 -1
  212. package/dist/wizard/steps/agent-customization.js +6 -19
  213. package/dist/wizard/steps/agent-customization.js.map +1 -1
  214. package/dist/wizard/steps/environment-selection.d.ts +11 -0
  215. package/dist/wizard/steps/environment-selection.d.ts.map +1 -0
  216. package/dist/wizard/steps/environment-selection.js +46 -0
  217. package/dist/wizard/steps/environment-selection.js.map +1 -0
  218. package/package.json +5 -5
  219. package/schema/teamcast.schema.json +30 -11
  220. package/templates/presets/feature-team.yaml +30 -10
  221. package/templates/presets/research-and-build.yaml +28 -3
  222. package/templates/presets/secure-dev.yaml +33 -0
  223. package/templates/presets/solo-dev.yaml +9 -0
  224. package/dist/components/agent-fragments.d.ts +0 -15
  225. package/dist/components/agent-fragments.d.ts.map +0 -1
  226. package/dist/components/agent-fragments.js.map +0 -1
  227. package/dist/components/policy-fragments.d.ts +0 -5
  228. package/dist/components/policy-fragments.d.ts.map +0 -1
  229. package/dist/components/policy-fragments.js +0 -88
  230. package/dist/components/policy-fragments.js.map +0 -1
  231. package/dist/core/index.d.ts +0 -8
  232. package/dist/core/index.d.ts.map +0 -1
  233. package/dist/core/index.js +0 -8
  234. package/dist/core/index.js.map +0 -1
  235. package/dist/core/skill-resolver.d.ts +0 -8
  236. package/dist/core/skill-resolver.d.ts.map +0 -1
  237. package/dist/core/skill-resolver.js +0 -17
  238. package/dist/core/skill-resolver.js.map +0 -1
  239. package/dist/core/skills.d.ts +0 -4
  240. package/dist/core/skills.d.ts.map +0 -1
  241. package/dist/core/skills.js +0 -14
  242. package/dist/core/skills.js.map +0 -1
  243. package/dist/plugins/catalog.d.ts +0 -10
  244. package/dist/plugins/catalog.d.ts.map +0 -1
  245. package/dist/plugins/catalog.js +0 -30
  246. package/dist/plugins/catalog.js.map +0 -1
  247. package/dist/plugins/core/models-plugin.d.ts +0 -3
  248. package/dist/plugins/core/models-plugin.d.ts.map +0 -1
  249. package/dist/plugins/core/models-plugin.js +0 -50
  250. package/dist/plugins/core/models-plugin.js.map +0 -1
  251. package/dist/plugins/core/presets-plugin.d.ts +0 -3
  252. package/dist/plugins/core/presets-plugin.d.ts.map +0 -1
  253. package/dist/plugins/core/presets-plugin.js +0 -10
  254. package/dist/plugins/core/presets-plugin.js.map +0 -1
  255. package/dist/plugins/core/tools-plugin.d.ts +0 -3
  256. package/dist/plugins/core/tools-plugin.d.ts.map +0 -1
  257. package/dist/plugins/core/tools-plugin.js +0 -44
  258. package/dist/plugins/core/tools-plugin.js.map +0 -1
  259. package/dist/plugins/environments/node-env-plugin.d.ts +0 -3
  260. package/dist/plugins/environments/node-env-plugin.d.ts.map +0 -1
  261. package/dist/plugins/environments/node-env-plugin.js +0 -31
  262. package/dist/plugins/environments/node-env-plugin.js.map +0 -1
  263. package/dist/plugins/environments/python-env-plugin.d.ts +0 -3
  264. package/dist/plugins/environments/python-env-plugin.d.ts.map +0 -1
  265. package/dist/plugins/environments/python-env-plugin.js +0 -33
  266. package/dist/plugins/environments/python-env-plugin.js.map +0 -1
  267. package/dist/plugins/index.d.ts +0 -3
  268. package/dist/plugins/index.d.ts.map +0 -1
  269. package/dist/plugins/index.js +0 -14
  270. package/dist/plugins/index.js.map +0 -1
  271. package/dist/plugins/inject.d.ts +0 -7
  272. package/dist/plugins/inject.d.ts.map +0 -1
  273. package/dist/plugins/inject.js +0 -48
  274. package/dist/plugins/inject.js.map +0 -1
  275. package/dist/plugins/merge-policies.d.ts +0 -8
  276. package/dist/plugins/merge-policies.d.ts.map +0 -1
  277. package/dist/plugins/merge-policies.js +0 -90
  278. package/dist/plugins/merge-policies.js.map +0 -1
  279. package/dist/plugins/registry.d.ts +0 -27
  280. package/dist/plugins/registry.d.ts.map +0 -1
  281. package/dist/plugins/registry.js +0 -97
  282. package/dist/plugins/registry.js.map +0 -1
  283. package/dist/plugins/types.d.ts +0 -75
  284. package/dist/plugins/types.d.ts.map +0 -1
  285. package/dist/plugins/types.js +0 -2
  286. package/dist/plugins/types.js.map +0 -1
  287. package/dist/renderers/index.d.ts +0 -6
  288. package/dist/renderers/index.d.ts.map +0 -1
  289. package/dist/renderers/index.js +0 -4
  290. package/dist/renderers/index.js.map +0 -1
  291. package/dist/validator/checks/instruction-blocks.d.ts +0 -5
  292. package/dist/validator/checks/instruction-blocks.d.ts.map +0 -1
  293. package/dist/validator/checks/instruction-blocks.js +0 -47
  294. package/dist/validator/checks/instruction-blocks.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/registry/models.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAI7C,MAAM,CAAC,MAAM,aAAa,GAAoC;IAC5D,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,WAAW,EAAE,iBAAiB;QAC9B,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;KAC/B;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC;KACnD;IACD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,WAAW,EAAE,kBAAkB;QAC/B,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC;KACjC;IACD,eAAe,EAAE;QACf,EAAE,EAAE,eAAe;QACnB,WAAW,EAAE,eAAe;QAC5B,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;KACjC;IACD,eAAe,EAAE;QACf,EAAE,EAAE,eAAe;QACnB,WAAW,EAAE,eAAe;QAC5B,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;KACjC;IACD,aAAa,EAAE;QACb,EAAE,EAAE,aAAa;QACjB,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;KACjC;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,oBAAoB;QACxB,WAAW,EAAE,oBAAoB;QACjC,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC5B;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { TeamPolicies } from '../core/types.js';
2
+ import type { PolicyFragmentId } from './types.js';
3
+ export declare function listPolicyFragments(): PolicyFragmentId[];
4
+ export declare function isPolicyFragmentId(value: string): value is PolicyFragmentId;
5
+ export declare function composePoliciesFromFragments(fragments: PolicyFragmentId[] | undefined, overrides?: TeamPolicies): TeamPolicies;
6
+ //# sourceMappingURL=policy-fragments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-fragments.d.ts","sourceRoot":"","sources":["../../src/registry/policy-fragments.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAgCnD,wBAAgB,mBAAmB,IAAI,gBAAgB,EAAE,CAExD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAE3E;AAED,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,gBAAgB,EAAE,GAAG,SAAS,EACzC,SAAS,GAAE,YAAiB,GAC3B,YAAY,CAYd"}
@@ -0,0 +1,49 @@
1
+ // Policy fragments catalog — builtin policy fragment definitions.
2
+ import { composePolicies } from '../core/compose-policies.js';
3
+ const POLICY_FRAGMENTS = {
4
+ 'allow-git-read': {
5
+ permissions: { rules: { allow: ['Bash(git status)', 'Bash(git diff *)'] } },
6
+ },
7
+ 'allow-git-write': {
8
+ permissions: { rules: { allow: ['Bash(git add *)', 'Bash(git commit *)'] } },
9
+ },
10
+ 'ask-git-push': {
11
+ permissions: { rules: { ask: ['Bash(git push *)'] } },
12
+ },
13
+ 'deny-destructive-shell': {
14
+ permissions: { rules: { deny: ['Bash(rm -rf *)', 'Bash(git push --force *)'] } },
15
+ },
16
+ 'deny-network-downloads': {
17
+ permissions: { rules: { deny: ['Bash(curl *)', 'Bash(wget *)'] } },
18
+ },
19
+ 'deny-dynamic-exec': {
20
+ permissions: { rules: { deny: ['Bash(eval *)', 'Bash(exec *)'] } },
21
+ },
22
+ 'deny-env-files': {
23
+ permissions: { rules: { deny: ['Write(.env*)', 'Edit(.env*)'] } },
24
+ },
25
+ 'sandbox-default': {
26
+ sandbox: {
27
+ enabled: true,
28
+ autoAllowBash: true,
29
+ },
30
+ },
31
+ };
32
+ export function listPolicyFragments() {
33
+ return Object.keys(POLICY_FRAGMENTS);
34
+ }
35
+ export function isPolicyFragmentId(value) {
36
+ return Object.prototype.hasOwnProperty.call(POLICY_FRAGMENTS, value);
37
+ }
38
+ export function composePoliciesFromFragments(fragments, overrides = {}) {
39
+ const layers = (fragments ?? []).map((fragmentId) => {
40
+ const fragment = POLICY_FRAGMENTS[fragmentId];
41
+ if (!fragment) {
42
+ throw new Error(`Unknown policy fragment "${fragmentId}"`);
43
+ }
44
+ return { label: `fragment:${fragmentId}`, policies: fragment };
45
+ });
46
+ layers.push({ label: 'inline', policies: overrides });
47
+ return composePolicies(layers);
48
+ }
49
+ //# sourceMappingURL=policy-fragments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-fragments.js","sourceRoot":"","sources":["../../src/registry/policy-fragments.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,MAAM,gBAAgB,GAA2C;IAC/D,gBAAgB,EAAE;QAChB,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,EAAE,EAAE;KAC5E;IACD,iBAAiB,EAAE;QACjB,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,EAAE,EAAE;KAC7E;IACD,cAAc,EAAE;QACd,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE;KACtD;IACD,wBAAwB,EAAE;QACxB,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,EAAE,EAAE;KACjF;IACD,wBAAwB,EAAE;QACxB,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,EAAE;KACnE;IACD,mBAAmB,EAAE;QACnB,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,EAAE;KACnE;IACD,gBAAgB,EAAE;QAChB,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC,EAAE,EAAE;KAClE;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,IAAI;SACpB;KACF;CACF,CAAC;AAEF,MAAM,UAAU,mBAAmB;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAuB,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,SAAyC,EACzC,YAA0B,EAAE;IAE5B,MAAM,MAAM,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;QAClD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,GAAG,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,YAAY,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAEtD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { SkillDefinition } from './types.js';
2
+ export declare const BUILTIN_SKILLS: SkillDefinition[];
3
+ export declare function getBuiltinSkill(id: string): SkillDefinition | undefined;
4
+ export declare function isBuiltinSkillId(id: string): boolean;
5
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/registry/skills.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,eAAe,EA4K3C,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEpD"}
@@ -0,0 +1,182 @@
1
+ // Built-in skill definitions catalog.
2
+ // Each skill corresponds to a reusable agent behavior referenced by presets.
3
+ export const BUILTIN_SKILLS = [
4
+ {
5
+ id: 'test-first',
6
+ name: 'Test First',
7
+ description: 'Write tests before implementation. Verify each change with a failing test first.',
8
+ instructions: [
9
+ 'Before writing any implementation code, write a failing test that describes the expected behavior.',
10
+ 'Run the test to confirm it fails for the right reason.',
11
+ 'Implement the minimum code to make the test pass.',
12
+ 'Refactor if needed while keeping tests green.',
13
+ ].join('\n'),
14
+ source: 'builtin',
15
+ required_capabilities: ['execute'],
16
+ },
17
+ {
18
+ id: 'clean-code',
19
+ name: 'Clean Code',
20
+ description: 'Follow clean code principles: small functions, meaningful names, no duplication.',
21
+ instructions: [
22
+ 'Keep functions small and focused on a single responsibility.',
23
+ 'Use descriptive, intention-revealing names for variables, functions, and types.',
24
+ 'Eliminate code duplication — extract shared logic into reusable helpers.',
25
+ 'Prefer composition over inheritance. Favor pure functions where possible.',
26
+ ].join('\n'),
27
+ source: 'builtin',
28
+ },
29
+ {
30
+ id: 'planning',
31
+ name: 'Planning',
32
+ description: 'Analyze the codebase and produce a step-by-step implementation plan before coding.',
33
+ instructions: [
34
+ 'Read relevant source files to understand the current architecture.',
35
+ 'Identify affected modules, types, and test files.',
36
+ 'Produce a numbered step-by-step plan with clear deliverables per step.',
37
+ 'Flag risks, open questions, and dependencies between steps.',
38
+ ].join('\n'),
39
+ source: 'builtin',
40
+ required_capabilities: ['read_files', 'search'],
41
+ },
42
+ {
43
+ id: 'triage',
44
+ name: 'Triage',
45
+ description: 'Assess incoming requests: classify priority, estimate scope, identify blockers.',
46
+ instructions: [
47
+ 'Read the request carefully and classify it: bug fix, feature, refactor, docs, or chore.',
48
+ 'Estimate scope: small (single file), medium (2-5 files), or large (cross-cutting).',
49
+ 'Identify blockers: missing context, unclear requirements, external dependencies.',
50
+ 'Summarize findings and recommend which agent or workflow should handle the task.',
51
+ ].join('\n'),
52
+ source: 'builtin',
53
+ required_capabilities: ['read_files', 'search'],
54
+ },
55
+ {
56
+ id: 'routing',
57
+ name: 'Routing',
58
+ description: 'Route tasks to the appropriate specialist agent based on the request type.',
59
+ instructions: [
60
+ 'Analyze the task to determine which specialist is best suited.',
61
+ 'Consider agent capabilities, current workload hints, and task requirements.',
62
+ 'Delegate with a clear, self-contained description of what the specialist should do.',
63
+ 'Include relevant file paths, context, and acceptance criteria in the handoff.',
64
+ ].join('\n'),
65
+ source: 'builtin',
66
+ required_capabilities: ['delegate'],
67
+ },
68
+ {
69
+ id: 'architecture-analysis',
70
+ name: 'Architecture Analysis',
71
+ description: 'Deep codebase analysis: module boundaries, dependency graph, design patterns.',
72
+ instructions: [
73
+ 'Map the module structure and identify public API boundaries.',
74
+ 'Trace key data flows through the system.',
75
+ 'Identify design patterns in use (e.g., registry, strategy, observer).',
76
+ 'Note coupling hotspots, circular dependencies, and layering violations.',
77
+ ].join('\n'),
78
+ source: 'builtin',
79
+ required_capabilities: ['read_files', 'search'],
80
+ },
81
+ {
82
+ id: 'code-review',
83
+ name: 'Code Review',
84
+ description: 'Review code for correctness, style, performance, and security issues.',
85
+ instructions: [
86
+ 'Check for logical errors, edge cases, and off-by-one mistakes.',
87
+ 'Verify naming conventions, code style, and consistent patterns.',
88
+ 'Look for performance issues: unnecessary allocations, O(n^2) loops, missing caching.',
89
+ 'Flag security concerns: injection, auth bypass, data exposure.',
90
+ 'Provide actionable feedback with specific file and line references.',
91
+ ].join('\n'),
92
+ source: 'builtin',
93
+ required_capabilities: ['read_files', 'search'],
94
+ },
95
+ {
96
+ id: 'security-check',
97
+ name: 'Security Check',
98
+ description: 'Check code for common security vulnerabilities and OWASP top 10 issues.',
99
+ instructions: [
100
+ 'Scan for injection vulnerabilities: SQL, command, XSS, LDAP.',
101
+ 'Check authentication and authorization logic for bypass opportunities.',
102
+ 'Verify sensitive data handling: encryption, logging, error messages.',
103
+ 'Review dependency versions for known CVEs.',
104
+ 'Assess input validation at system boundaries.',
105
+ ].join('\n'),
106
+ source: 'builtin',
107
+ required_capabilities: ['read_files', 'search'],
108
+ },
109
+ {
110
+ id: 'threat-modeling',
111
+ name: 'Threat Modeling',
112
+ description: 'Identify threat vectors, attack surfaces, and security boundaries.',
113
+ instructions: [
114
+ 'Enumerate system entry points and trust boundaries.',
115
+ 'Identify assets worth protecting (credentials, PII, business logic).',
116
+ 'Map potential threat actors and their capabilities.',
117
+ 'Produce a threat matrix: threat, likelihood, impact, mitigation.',
118
+ ].join('\n'),
119
+ source: 'builtin',
120
+ required_capabilities: ['read_files', 'search'],
121
+ },
122
+ {
123
+ id: 'secure-coding',
124
+ name: 'Secure Coding',
125
+ description: 'Write code following secure development practices and OWASP guidelines.',
126
+ instructions: [
127
+ 'Validate all input at system boundaries. Never trust external data.',
128
+ 'Use parameterized queries — never concatenate user input into SQL or commands.',
129
+ 'Apply the principle of least privilege to file access, network calls, and permissions.',
130
+ 'Handle errors without leaking internal details. Log securely.',
131
+ ].join('\n'),
132
+ source: 'builtin',
133
+ required_capabilities: ['write_files', 'execute'],
134
+ },
135
+ {
136
+ id: 'vulnerability-scan',
137
+ name: 'Vulnerability Scan',
138
+ description: 'Systematically scan code for known vulnerability patterns.',
139
+ instructions: [
140
+ 'Search for hardcoded secrets: API keys, tokens, passwords in source.',
141
+ 'Check for unsafe deserialization, prototype pollution, path traversal.',
142
+ 'Verify TLS/SSL configuration and certificate validation.',
143
+ 'Review file permission settings and temporary file handling.',
144
+ 'Report findings with severity (critical/high/medium/low) and remediation steps.',
145
+ ].join('\n'),
146
+ source: 'builtin',
147
+ required_capabilities: ['read_files', 'search'],
148
+ },
149
+ {
150
+ id: 'research-report',
151
+ name: 'Research Report',
152
+ description: 'Produce a structured research report with citations and key findings.',
153
+ instructions: [
154
+ 'Gather information from documentation, source code, and trusted references.',
155
+ 'Organize findings into sections: summary, key findings, details, recommendations.',
156
+ 'Cite sources with specific file paths, URLs, or documentation references.',
157
+ 'Highlight confidence levels: confirmed, likely, uncertain.',
158
+ ].join('\n'),
159
+ source: 'builtin',
160
+ required_capabilities: ['read_files', 'search', 'web'],
161
+ },
162
+ {
163
+ id: 'source-validation',
164
+ name: 'Source Validation',
165
+ description: 'Validate information accuracy by cross-referencing multiple sources.',
166
+ instructions: [
167
+ 'Cross-reference claims against official documentation and source code.',
168
+ 'Flag contradictions between sources. Prefer primary sources over secondary.',
169
+ 'Verify version-specific information matches the project\'s actual dependencies.',
170
+ 'Note when information could not be independently verified.',
171
+ ].join('\n'),
172
+ source: 'builtin',
173
+ required_capabilities: ['read_files', 'search', 'web'],
174
+ },
175
+ ];
176
+ export function getBuiltinSkill(id) {
177
+ return BUILTIN_SKILLS.find((skill) => skill.id === id);
178
+ }
179
+ export function isBuiltinSkillId(id) {
180
+ return BUILTIN_SKILLS.some((skill) => skill.id === id);
181
+ }
182
+ //# sourceMappingURL=skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/registry/skills.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,6EAA6E;AAI7E,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,kFAAkF;QAC/F,YAAY,EAAE;YACZ,oGAAoG;YACpG,wDAAwD;YACxD,mDAAmD;YACnD,+CAA+C;SAChD,CAAC,IAAI,CAAC,IAAI,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AC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AgentRuntime } from '../core/types.js';
2
+ import type { CapabilityId, CapabilityTraitId, CapabilityToolMap } from './types.js';
3
+ interface TraitRecord {
4
+ grant: CapabilityId[];
5
+ deny: CapabilityId[];
6
+ }
7
+ export declare function listCapabilityTraits(): CapabilityTraitId[];
8
+ export declare function isCapabilityTraitName(value: string): value is CapabilityTraitId;
9
+ export declare function getCapabilityTrait(id: CapabilityTraitId): TraitRecord;
10
+ /**
11
+ * Resolve capability traits to allowed/disallowed tool lists using the provided capability mapping.
12
+ */
13
+ export declare function resolveCapabilityTraits(traits: CapabilityTraitId[] | undefined, capabilityMap: CapabilityToolMap): Pick<AgentRuntime, 'tools' | 'disallowedTools'>;
14
+ export declare function mergeRuntimeWithTraits(base: Omit<AgentRuntime, 'tools' | 'disallowedTools'> & Pick<AgentRuntime, 'tools' | 'disallowedTools'>, capabilityTraits: CapabilityTraitId[] | undefined, capabilityMap: CapabilityToolMap): AgentRuntime;
15
+ export {};
16
+ //# sourceMappingURL=traits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["../../src/registry/traits.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGrF,UAAU,WAAW;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB;AAiDD,wBAAgB,oBAAoB,IAAI,iBAAiB,EAAE,CAE1D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,iBAAiB,CAE/E;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,iBAAiB,GAAG,WAAW,CAMrE;AAuBD;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,EAAE,GAAG,SAAS,EACvC,aAAa,EAAE,iBAAiB,GAC/B,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAmBjD;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,iBAAiB,CAAC,EACvG,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,SAAS,EACjD,aAAa,EAAE,iBAAiB,GAC/B,YAAY,CAOd"}
@@ -0,0 +1,109 @@
1
+ // Capability traits catalog — builtin capability trait definitions.
2
+ const CAPABILITY_TRAITS = {
3
+ 'base-read': {
4
+ grant: ['read_files', 'search'],
5
+ deny: [],
6
+ },
7
+ 'file-authoring': {
8
+ grant: ['write_files'],
9
+ deny: [],
10
+ },
11
+ 'command-execution': {
12
+ grant: ['execute'],
13
+ deny: [],
14
+ },
15
+ 'web-research': {
16
+ grant: ['web'],
17
+ deny: [],
18
+ },
19
+ delegation: {
20
+ grant: ['delegate'],
21
+ deny: [],
22
+ },
23
+ interaction: {
24
+ grant: ['interact'],
25
+ deny: [],
26
+ },
27
+ 'notebook-editing': {
28
+ grant: ['notebook'],
29
+ deny: [],
30
+ },
31
+ 'no-file-edits': {
32
+ grant: [],
33
+ deny: ['write_files'],
34
+ },
35
+ 'no-commands': {
36
+ grant: [],
37
+ deny: ['execute'],
38
+ },
39
+ 'no-web': {
40
+ grant: [],
41
+ deny: ['web'],
42
+ },
43
+ 'full-access': {
44
+ grant: ['read_files', 'write_files', 'execute', 'search', 'web', 'delegate', 'interact', 'notebook'],
45
+ deny: [],
46
+ },
47
+ };
48
+ export function listCapabilityTraits() {
49
+ return Object.keys(CAPABILITY_TRAITS);
50
+ }
51
+ export function isCapabilityTraitName(value) {
52
+ return Object.prototype.hasOwnProperty.call(CAPABILITY_TRAITS, value);
53
+ }
54
+ export function getCapabilityTrait(id) {
55
+ const trait = CAPABILITY_TRAITS[id];
56
+ if (!trait) {
57
+ throw new Error(`Unknown capability trait "${id}"`);
58
+ }
59
+ return trait;
60
+ }
61
+ // --- Expand capabilities to platform tools ---
62
+ function expandCapabilities(capabilities, mapping) {
63
+ const toolSet = new Set();
64
+ for (const cap of capabilities) {
65
+ const tools = mapping[cap];
66
+ if (tools)
67
+ for (const tool of tools)
68
+ toolSet.add(tool);
69
+ }
70
+ return [...toolSet];
71
+ }
72
+ function dedupeTools(tools) {
73
+ if (!tools?.length)
74
+ return undefined;
75
+ return [...new Set(tools)];
76
+ }
77
+ function mergeUnique(left, right) {
78
+ const merged = [...(left ?? []), ...(right ?? [])];
79
+ return merged.length > 0 ? [...new Set(merged)] : undefined;
80
+ }
81
+ /**
82
+ * Resolve capability traits to allowed/disallowed tool lists using the provided capability mapping.
83
+ */
84
+ export function resolveCapabilityTraits(traits, capabilityMap) {
85
+ const allowTools = [];
86
+ const denyTools = [];
87
+ for (const traitId of traits ?? []) {
88
+ const trait = getCapabilityTrait(traitId);
89
+ if (trait.grant.length > 0) {
90
+ allowTools.push(...expandCapabilities(trait.grant, capabilityMap));
91
+ }
92
+ if (trait.deny.length > 0) {
93
+ denyTools.push(...expandCapabilities(trait.deny, capabilityMap));
94
+ }
95
+ }
96
+ return {
97
+ tools: dedupeTools(allowTools),
98
+ disallowedTools: dedupeTools(denyTools),
99
+ };
100
+ }
101
+ export function mergeRuntimeWithTraits(base, capabilityTraits, capabilityMap) {
102
+ const composed = resolveCapabilityTraits(capabilityTraits, capabilityMap);
103
+ return {
104
+ ...base,
105
+ tools: mergeUnique(composed.tools, base.tools),
106
+ disallowedTools: mergeUnique(composed.disallowedTools, base.disallowedTools),
107
+ };
108
+ }
109
+ //# sourceMappingURL=traits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traits.js","sourceRoot":"","sources":["../../src/registry/traits.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAWpE,MAAM,iBAAi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;IAChC,MAAM,SAAS,GAAa,EAAE,CAAC;IAE/B,KAAK,MAAM,OAAO,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAE1C,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,UAAU,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,SAAS,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC;QAC9B,eAAe,EAAE,WAAW,CAAC,SAAS,CAAC;KACxC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,IAAuG,EACvG,gBAAiD,EACjD,aAAgC;IAEhC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAC1E,OAAO;QACL,GAAG,IAAI;QACP,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC;QAC9C,eAAe,EAAE,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC;KAC7E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,77 @@
1
+ import type { TeamPolicies } from '../core/types.js';
2
+ export declare const CAPABILITY_IDS: readonly ["read_files", "write_files", "execute", "search", "web", "delegate", "interact", "notebook"];
3
+ export type CapabilityId = typeof CAPABILITY_IDS[number];
4
+ export declare function isCapability(value: string): value is CapabilityId;
5
+ export interface CapabilityDefinition {
6
+ id: CapabilityId;
7
+ description: string;
8
+ }
9
+ export type CapabilityTraitId = 'base-read' | 'file-authoring' | 'command-execution' | 'web-research' | 'delegation' | 'interaction' | 'notebook-editing' | 'no-file-edits' | 'no-commands' | 'no-web' | 'full-access';
10
+ export interface CapabilityTraitDef {
11
+ id: CapabilityTraitId;
12
+ grant: CapabilityId[];
13
+ deny: CapabilityId[];
14
+ }
15
+ export type PolicyFragmentId = 'allow-git-read' | 'allow-git-write' | 'ask-git-push' | 'deny-destructive-shell' | 'deny-network-downloads' | 'deny-dynamic-exec' | 'deny-env-files' | 'sandbox-default';
16
+ export interface PolicyFragmentDef {
17
+ id: PolicyFragmentId;
18
+ policies: TeamPolicies;
19
+ }
20
+ export type InstructionKind = 'behavior' | 'workflow' | 'safety' | 'style' | 'delegation';
21
+ export type InstructionFragmentId = 'coordination-core' | 'delegate-first' | 'planning-core' | 'planning-read-only' | 'research-core' | 'research-citation' | 'research-no-file-edits' | 'development-core' | 'development-workflow' | 'tester-core' | 'tester-read-only' | 'review-core' | 'review-feedback' | 'security-audit-core' | 'security-audit-severity' | 'research-handoff' | 'secure-planning' | 'secure-development' | 'secure-development-tests' | 'security-review-gate' | 'post-audit-review' | 'solo-dev-core' | 'solo-dev-workflow' | 'solo-dev-style' | 'feature-orchestrator-workflow' | 'feature-orchestrator-output' | 'feature-planner-workflow' | 'feature-planner-read-only' | 'feature-developer-core' | 'feature-developer-workflow' | 'feature-developer-summary' | 'feature-reviewer-checklist' | 'feature-reviewer-style' | 'research-orchestrator-core' | 'research-orchestrator-workflow' | 'research-orchestrator-output' | 'research-planner-core' | 'research-planner-constraints' | 'research-developer-core' | 'research-developer-tests' | 'secure-orchestrator-core' | 'secure-orchestrator-workflow' | 'secure-orchestrator-gate' | 'post-audit-review-core';
22
+ export interface InstructionFragmentDef {
23
+ id: InstructionFragmentId;
24
+ kind: InstructionKind;
25
+ content: string;
26
+ requires_capabilities?: CapabilityId[];
27
+ conflicts_with?: InstructionFragmentId[];
28
+ }
29
+ export interface ModelDefinition {
30
+ id: string;
31
+ displayName: string;
32
+ target?: string;
33
+ features: string[];
34
+ }
35
+ export type SkillSource = 'builtin' | 'user' | 'extension';
36
+ export interface SkillDefinition {
37
+ id: string;
38
+ name: string;
39
+ description: string;
40
+ instructions: string;
41
+ source: SkillSource;
42
+ required_capabilities?: CapabilityId[];
43
+ allowed_tools?: string[];
44
+ required_mcp_servers?: string[];
45
+ reference_files?: Record<string, string>;
46
+ scripts?: Record<string, string>;
47
+ compatibility?: {
48
+ targets?: string[];
49
+ };
50
+ conflicts_with?: string[];
51
+ metadata?: {
52
+ author?: string;
53
+ version?: string;
54
+ tags?: string[];
55
+ };
56
+ }
57
+ export type EnvironmentId = 'node' | 'python';
58
+ export declare const ENVIRONMENT_IDS: readonly EnvironmentId[];
59
+ export declare function isEnvironmentId(value: string): value is EnvironmentId;
60
+ export interface EnvironmentInstruction {
61
+ content: string;
62
+ requires_capabilities: CapabilityId[];
63
+ }
64
+ export interface EnvironmentDef {
65
+ id: EnvironmentId;
66
+ description: string;
67
+ detect: (cwd: string) => boolean;
68
+ policyRules: {
69
+ sandbox?: {
70
+ enabled?: boolean;
71
+ };
72
+ allow?: string[];
73
+ };
74
+ instructionFragments: Record<string, string | EnvironmentInstruction>;
75
+ }
76
+ export type CapabilityToolMap = Record<CapabilityId, string[]>;
77
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,cAAc,wGASjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAEzD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAEjE;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,YAAY,CAAC;IACjB,WAA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CAAC;KACjB,CAAC;CACH;AAID,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAAuB,CAAC;AAE5E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAErE;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,EAAE,YAAY,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,aAAa,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,WAAW,EAAE;QACX,OAAO,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QAChC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;IACF,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,CAAC,CAAC;CACvE;AAID,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ // Registry types — canonical definitions for all building blocks.
2
+ // This module is the single source of truth for block type shapes.
3
+ // --- Capability (abstract agent ability) ---
4
+ export const CAPABILITY_IDS = [
5
+ 'read_files',
6
+ 'write_files',
7
+ 'execute',
8
+ 'search',
9
+ 'web',
10
+ 'delegate',
11
+ 'interact',
12
+ 'notebook',
13
+ ];
14
+ export function isCapability(value) {
15
+ return CAPABILITY_IDS.includes(value);
16
+ }
17
+ export const ENVIRONMENT_IDS = ['node', 'python'];
18
+ export function isEnvironmentId(value) {
19
+ return ENVIRONMENT_IDS.includes(value);
20
+ }
21
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,mEAAmE;AAInE,8CAA8C;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,YAAY;IACZ,aAAa;IACb,SAAS;IACT,QAAQ;IACR,KAAK;IACL,UAAU;IACV,UAAU;IACV,UAAU;CACF,CAAC;AAIX,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAQ,cAAoC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AA8ID,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE5E,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAQ,eAAqC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import type { CoreTeam } from '../../core/types.js';
2
2
  import type { RenderedFile } from '../types.js';
3
3
  export declare function renderClaudeMd(team: CoreTeam): RenderedFile;
4
- export declare function renderAgentsMd(team: CoreTeam): RenderedFile;
5
4
  //# sourceMappingURL=docs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/renderers/claude/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoBhD,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAuE3D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,CA4F3D"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/renderers/claude/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAuE3D"}
@@ -1,22 +1,4 @@
1
1
  import { mapPoliciesToClaudePermissions } from './policy-mapper.js';
2
- function describeCapabilities(tools) {
3
- const result = [];
4
- if (!tools)
5
- return result;
6
- if (tools.includes('Read') || tools.includes('Grep') || tools.includes('Glob')) {
7
- result.push('read files');
8
- }
9
- if (tools.includes('Write') || tools.includes('Edit') || tools.includes('MultiEdit')) {
10
- result.push('write files');
11
- }
12
- if (tools.includes('Bash'))
13
- result.push('run commands');
14
- if (tools.includes('WebFetch') || tools.includes('WebSearch'))
15
- result.push('access internet');
16
- if (tools.includes('Agent'))
17
- result.push('delegate tasks');
18
- return result;
19
- }
20
2
  export function renderClaudeMd(team) {
21
3
  const lines = [];
22
4
  lines.push(`# ${team.project.name}`);
@@ -75,81 +57,4 @@ export function renderClaudeMd(team) {
75
57
  content: lines.join('\n'),
76
58
  };
77
59
  }
78
- export function renderAgentsMd(team) {
79
- const lines = [];
80
- lines.push(`# ${team.project.name}`);
81
- lines.push('');
82
- if (team.project.description) {
83
- lines.push(team.project.description);
84
- lines.push('');
85
- }
86
- lines.push('## Project Overview');
87
- lines.push('');
88
- lines.push('This project uses a multi-agent architecture managed by TeamCast.');
89
- lines.push('Agent configuration: `teamcast.yaml` (edit this file, then run `teamcast generate`)');
90
- lines.push('');
91
- lines.push('## Agent Roster');
92
- lines.push('');
93
- for (const [agentId, agent] of Object.entries(team.agents)) {
94
- const model = agent.runtime.model ?? 'unspecified';
95
- lines.push(`### ${agentId}`);
96
- lines.push('');
97
- lines.push(`**Role:** ${agent.description}`);
98
- lines.push(`**Model:** ${model}`);
99
- lines.push('');
100
- if (agent.runtime.tools?.length) {
101
- lines.push(`**Allowed tools:** ${agent.runtime.tools.join(', ')}`);
102
- }
103
- if (agent.runtime.disallowedTools?.length) {
104
- lines.push(`**Restricted tools:** ${agent.runtime.disallowedTools.join(', ')}`);
105
- }
106
- if (agent.metadata?.handoffs?.length) {
107
- lines.push(`**Can delegate to:** ${agent.metadata.handoffs.join(', ')}`);
108
- }
109
- if (agent.runtime.skillDocs?.length) {
110
- lines.push(`**Skill docs:** ${agent.runtime.skillDocs.join(', ')}`);
111
- }
112
- const capabilities = describeCapabilities(agent.runtime.tools);
113
- if (capabilities.length > 0) {
114
- lines.push(`**Capabilities:** ${capabilities.join(', ')}`);
115
- }
116
- lines.push('');
117
- }
118
- lines.push('## Access Control');
119
- lines.push('');
120
- const claudePermissions = mapPoliciesToClaudePermissions(team.policies);
121
- if (claudePermissions.allow.length) {
122
- lines.push('**Permitted operations:**');
123
- for (const rule of claudePermissions.allow) {
124
- lines.push(`- \`${rule}\``);
125
- }
126
- lines.push('');
127
- }
128
- if (claudePermissions.deny.length) {
129
- lines.push('**Prohibited operations:**');
130
- for (const rule of claudePermissions.deny) {
131
- lines.push(`- \`${rule}\``);
132
- }
133
- lines.push('');
134
- }
135
- if (claudePermissions.ask.length) {
136
- lines.push('**Requires confirmation:**');
137
- for (const rule of claudePermissions.ask) {
138
- lines.push(`- \`${rule}\``);
139
- }
140
- lines.push('');
141
- }
142
- if (team.policies?.network?.allowedDomains?.length) {
143
- lines.push(`**Network access:** restricted to ${team.policies.network.allowedDomains.join(', ')}`);
144
- lines.push('');
145
- }
146
- lines.push('---');
147
- lines.push('');
148
- lines.push('*Generated by [TeamCast](https://github.com/Katoshy/teamcast)*');
149
- lines.push('');
150
- return {
151
- path: 'AGENTS.md',
152
- content: lines.join('\n'),
153
- };
154
- }
155
60
  //# sourceMappingURL=docs.js.map