raptor-aios 0.1.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.
- package/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +315 -0
- package/bin/raptor.js +5 -0
- package/dist/_core/dist/agents/adapters/antigravity.d.ts +9 -0
- package/dist/_core/dist/agents/adapters/antigravity.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/antigravity.js +72 -0
- package/dist/_core/dist/agents/adapters/antigravity.js.map +1 -0
- package/dist/_core/dist/agents/adapters/claude-code.d.ts +9 -0
- package/dist/_core/dist/agents/adapters/claude-code.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/claude-code.js +71 -0
- package/dist/_core/dist/agents/adapters/claude-code.js.map +1 -0
- package/dist/_core/dist/agents/adapters/codex.d.ts +12 -0
- package/dist/_core/dist/agents/adapters/codex.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/codex.js +69 -0
- package/dist/_core/dist/agents/adapters/codex.js.map +1 -0
- package/dist/_core/dist/agents/adapters/copilot.d.ts +12 -0
- package/dist/_core/dist/agents/adapters/copilot.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/copilot.js +71 -0
- package/dist/_core/dist/agents/adapters/copilot.js.map +1 -0
- package/dist/_core/dist/agents/adapters/cursor.d.ts +9 -0
- package/dist/_core/dist/agents/adapters/cursor.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/cursor.js +62 -0
- package/dist/_core/dist/agents/adapters/cursor.js.map +1 -0
- package/dist/_core/dist/agents/adapters/gemini.d.ts +11 -0
- package/dist/_core/dist/agents/adapters/gemini.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/gemini.js +68 -0
- package/dist/_core/dist/agents/adapters/gemini.js.map +1 -0
- package/dist/_core/dist/agents/adapters/human.d.ts +10 -0
- package/dist/_core/dist/agents/adapters/human.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/human.js +48 -0
- package/dist/_core/dist/agents/adapters/human.js.map +1 -0
- package/dist/_core/dist/agents/artifact-watcher.d.ts +86 -0
- package/dist/_core/dist/agents/artifact-watcher.d.ts.map +1 -0
- package/dist/_core/dist/agents/artifact-watcher.js +214 -0
- package/dist/_core/dist/agents/artifact-watcher.js.map +1 -0
- package/dist/_core/dist/agents/backup.d.ts +69 -0
- package/dist/_core/dist/agents/backup.d.ts.map +1 -0
- package/dist/_core/dist/agents/backup.js +107 -0
- package/dist/_core/dist/agents/backup.js.map +1 -0
- package/dist/_core/dist/agents/config.d.ts +36 -0
- package/dist/_core/dist/agents/config.d.ts.map +1 -0
- package/dist/_core/dist/agents/config.js +270 -0
- package/dist/_core/dist/agents/config.js.map +1 -0
- package/dist/_core/dist/agents/context-file.d.ts +35 -0
- package/dist/_core/dist/agents/context-file.d.ts.map +1 -0
- package/dist/_core/dist/agents/context-file.js +106 -0
- package/dist/_core/dist/agents/context-file.js.map +1 -0
- package/dist/_core/dist/agents/handoff.d.ts +57 -0
- package/dist/_core/dist/agents/handoff.d.ts.map +1 -0
- package/dist/_core/dist/agents/handoff.js +71 -0
- package/dist/_core/dist/agents/handoff.js.map +1 -0
- package/dist/_core/dist/agents/index.d.ts +32 -0
- package/dist/_core/dist/agents/index.d.ts.map +1 -0
- package/dist/_core/dist/agents/index.js +37 -0
- package/dist/_core/dist/agents/index.js.map +1 -0
- package/dist/_core/dist/agents/keys.d.ts +50 -0
- package/dist/_core/dist/agents/keys.d.ts.map +1 -0
- package/dist/_core/dist/agents/keys.js +91 -0
- package/dist/_core/dist/agents/keys.js.map +1 -0
- package/dist/_core/dist/agents/materialize.d.ts +37 -0
- package/dist/_core/dist/agents/materialize.d.ts.map +1 -0
- package/dist/_core/dist/agents/materialize.js +157 -0
- package/dist/_core/dist/agents/materialize.js.map +1 -0
- package/dist/_core/dist/agents/prompt-builder.d.ts +35 -0
- package/dist/_core/dist/agents/prompt-builder.d.ts.map +1 -0
- package/dist/_core/dist/agents/prompt-builder.js +261 -0
- package/dist/_core/dist/agents/prompt-builder.js.map +1 -0
- package/dist/_core/dist/agents/prompt-markers.d.ts +69 -0
- package/dist/_core/dist/agents/prompt-markers.d.ts.map +1 -0
- package/dist/_core/dist/agents/prompt-markers.js +111 -0
- package/dist/_core/dist/agents/prompt-markers.js.map +1 -0
- package/dist/_core/dist/agents/registry.d.ts +35 -0
- package/dist/_core/dist/agents/registry.d.ts.map +1 -0
- package/dist/_core/dist/agents/registry.js +102 -0
- package/dist/_core/dist/agents/registry.js.map +1 -0
- package/dist/_core/dist/agents/selector.d.ts +33 -0
- package/dist/_core/dist/agents/selector.d.ts.map +1 -0
- package/dist/_core/dist/agents/selector.js +120 -0
- package/dist/_core/dist/agents/selector.js.map +1 -0
- package/dist/_core/dist/agents/slash-materializer.d.ts +63 -0
- package/dist/_core/dist/agents/slash-materializer.d.ts.map +1 -0
- package/dist/_core/dist/agents/slash-materializer.js +131 -0
- package/dist/_core/dist/agents/slash-materializer.js.map +1 -0
- package/dist/_core/dist/agents/types.d.ts +121 -0
- package/dist/_core/dist/agents/types.d.ts.map +1 -0
- package/dist/_core/dist/agents/types.js +10 -0
- package/dist/_core/dist/agents/types.js.map +1 -0
- package/dist/_core/dist/audit/hash.d.ts +4 -0
- package/dist/_core/dist/audit/hash.d.ts.map +1 -0
- package/dist/_core/dist/audit/hash.js +12 -0
- package/dist/_core/dist/audit/hash.js.map +1 -0
- package/dist/_core/dist/audit/index.d.ts +6 -0
- package/dist/_core/dist/audit/index.d.ts.map +1 -0
- package/dist/_core/dist/audit/index.js +6 -0
- package/dist/_core/dist/audit/index.js.map +1 -0
- package/dist/_core/dist/audit/logger.d.ts +77 -0
- package/dist/_core/dist/audit/logger.d.ts.map +1 -0
- package/dist/_core/dist/audit/logger.js +93 -0
- package/dist/_core/dist/audit/logger.js.map +1 -0
- package/dist/_core/dist/audit/query.d.ts +13 -0
- package/dist/_core/dist/audit/query.d.ts.map +1 -0
- package/dist/_core/dist/audit/query.js +57 -0
- package/dist/_core/dist/audit/query.js.map +1 -0
- package/dist/_core/dist/audit/schema.d.ts +455 -0
- package/dist/_core/dist/audit/schema.d.ts.map +1 -0
- package/dist/_core/dist/audit/schema.js +341 -0
- package/dist/_core/dist/audit/schema.js.map +1 -0
- package/dist/_core/dist/audit/validate.d.ts +21 -0
- package/dist/_core/dist/audit/validate.d.ts.map +1 -0
- package/dist/_core/dist/audit/validate.js +139 -0
- package/dist/_core/dist/audit/validate.js.map +1 -0
- package/dist/_core/dist/constitution/core.d.ts +22 -0
- package/dist/_core/dist/constitution/core.d.ts.map +1 -0
- package/dist/_core/dist/constitution/core.js +102 -0
- package/dist/_core/dist/constitution/core.js.map +1 -0
- package/dist/_core/dist/constitution/index.d.ts +2 -0
- package/dist/_core/dist/constitution/index.d.ts.map +1 -0
- package/dist/_core/dist/constitution/index.js +2 -0
- package/dist/_core/dist/constitution/index.js.map +1 -0
- package/dist/_core/dist/extensions/index.d.ts +12 -0
- package/dist/_core/dist/extensions/index.d.ts.map +1 -0
- package/dist/_core/dist/extensions/index.js +12 -0
- package/dist/_core/dist/extensions/index.js.map +1 -0
- package/dist/_core/dist/extensions/integrate.d.ts +69 -0
- package/dist/_core/dist/extensions/integrate.d.ts.map +1 -0
- package/dist/_core/dist/extensions/integrate.js +181 -0
- package/dist/_core/dist/extensions/integrate.js.map +1 -0
- package/dist/_core/dist/extensions/loader.d.ts +24 -0
- package/dist/_core/dist/extensions/loader.d.ts.map +1 -0
- package/dist/_core/dist/extensions/loader.js +73 -0
- package/dist/_core/dist/extensions/loader.js.map +1 -0
- package/dist/_core/dist/extensions/manifest.d.ts +23 -0
- package/dist/_core/dist/extensions/manifest.d.ts.map +1 -0
- package/dist/_core/dist/extensions/manifest.js +176 -0
- package/dist/_core/dist/extensions/manifest.js.map +1 -0
- package/dist/_core/dist/extensions/registry.d.ts +32 -0
- package/dist/_core/dist/extensions/registry.d.ts.map +1 -0
- package/dist/_core/dist/extensions/registry.js +57 -0
- package/dist/_core/dist/extensions/registry.js.map +1 -0
- package/dist/_core/dist/extensions/resolver.d.ts +55 -0
- package/dist/_core/dist/extensions/resolver.d.ts.map +1 -0
- package/dist/_core/dist/extensions/resolver.js +143 -0
- package/dist/_core/dist/extensions/resolver.js.map +1 -0
- package/dist/_core/dist/extensions/types.d.ts +173 -0
- package/dist/_core/dist/extensions/types.d.ts.map +1 -0
- package/dist/_core/dist/extensions/types.js +83 -0
- package/dist/_core/dist/extensions/types.js.map +1 -0
- package/dist/_core/dist/frontmatter/index.d.ts +10 -0
- package/dist/_core/dist/frontmatter/index.d.ts.map +1 -0
- package/dist/_core/dist/frontmatter/index.js +24 -0
- package/dist/_core/dist/frontmatter/index.js.map +1 -0
- package/dist/_core/dist/gates/agent-gates.d.ts +16 -0
- package/dist/_core/dist/gates/agent-gates.d.ts.map +1 -0
- package/dist/_core/dist/gates/agent-gates.js +205 -0
- package/dist/_core/dist/gates/agent-gates.js.map +1 -0
- package/dist/_core/dist/gates/builtin.d.ts +18 -0
- package/dist/_core/dist/gates/builtin.d.ts.map +1 -0
- package/dist/_core/dist/gates/builtin.js +860 -0
- package/dist/_core/dist/gates/builtin.js.map +1 -0
- package/dist/_core/dist/gates/index.d.ts +7 -0
- package/dist/_core/dist/gates/index.d.ts.map +1 -0
- package/dist/_core/dist/gates/index.js +7 -0
- package/dist/_core/dist/gates/index.js.map +1 -0
- package/dist/_core/dist/gates/m7-gates.d.ts +17 -0
- package/dist/_core/dist/gates/m7-gates.d.ts.map +1 -0
- package/dist/_core/dist/gates/m7-gates.js +309 -0
- package/dist/_core/dist/gates/m7-gates.js.map +1 -0
- package/dist/_core/dist/gates/phase-gates.d.ts +18 -0
- package/dist/_core/dist/gates/phase-gates.d.ts.map +1 -0
- package/dist/_core/dist/gates/phase-gates.js +275 -0
- package/dist/_core/dist/gates/phase-gates.js.map +1 -0
- package/dist/_core/dist/gates/runner.d.ts +4 -0
- package/dist/_core/dist/gates/runner.d.ts.map +1 -0
- package/dist/_core/dist/gates/runner.js +64 -0
- package/dist/_core/dist/gates/runner.js.map +1 -0
- package/dist/_core/dist/gates/types.d.ts +36 -0
- package/dist/_core/dist/gates/types.d.ts.map +1 -0
- package/dist/_core/dist/gates/types.js +2 -0
- package/dist/_core/dist/gates/types.js.map +1 -0
- package/dist/_core/dist/hooks/index.d.ts +4 -0
- package/dist/_core/dist/hooks/index.d.ts.map +1 -0
- package/dist/_core/dist/hooks/index.js +4 -0
- package/dist/_core/dist/hooks/index.js.map +1 -0
- package/dist/_core/dist/hooks/runner.d.ts +28 -0
- package/dist/_core/dist/hooks/runner.d.ts.map +1 -0
- package/dist/_core/dist/hooks/runner.js +294 -0
- package/dist/_core/dist/hooks/runner.js.map +1 -0
- package/dist/_core/dist/hooks/runtime.d.ts +65 -0
- package/dist/_core/dist/hooks/runtime.d.ts.map +1 -0
- package/dist/_core/dist/hooks/runtime.js +212 -0
- package/dist/_core/dist/hooks/runtime.js.map +1 -0
- package/dist/_core/dist/hooks/types.d.ts +36 -0
- package/dist/_core/dist/hooks/types.d.ts.map +1 -0
- package/dist/_core/dist/hooks/types.js +23 -0
- package/dist/_core/dist/hooks/types.js.map +1 -0
- package/dist/_core/dist/index.d.ts +21 -0
- package/dist/_core/dist/index.d.ts.map +1 -0
- package/dist/_core/dist/index.js +20 -0
- package/dist/_core/dist/index.js.map +1 -0
- package/dist/_core/dist/manifest/index.d.ts +119 -0
- package/dist/_core/dist/manifest/index.d.ts.map +1 -0
- package/dist/_core/dist/manifest/index.js +125 -0
- package/dist/_core/dist/manifest/index.js.map +1 -0
- package/dist/_core/dist/markers/index.d.ts +47 -0
- package/dist/_core/dist/markers/index.d.ts.map +1 -0
- package/dist/_core/dist/markers/index.js +97 -0
- package/dist/_core/dist/markers/index.js.map +1 -0
- package/dist/_core/dist/mcp/config.d.ts +19 -0
- package/dist/_core/dist/mcp/config.d.ts.map +1 -0
- package/dist/_core/dist/mcp/config.js +114 -0
- package/dist/_core/dist/mcp/config.js.map +1 -0
- package/dist/_core/dist/mcp/index.d.ts +9 -0
- package/dist/_core/dist/mcp/index.d.ts.map +1 -0
- package/dist/_core/dist/mcp/index.js +8 -0
- package/dist/_core/dist/mcp/index.js.map +1 -0
- package/dist/_core/dist/mcp/materializer.d.ts +40 -0
- package/dist/_core/dist/mcp/materializer.d.ts.map +1 -0
- package/dist/_core/dist/mcp/materializer.js +161 -0
- package/dist/_core/dist/mcp/materializer.js.map +1 -0
- package/dist/_core/dist/mcp/targets.d.ts +37 -0
- package/dist/_core/dist/mcp/targets.d.ts.map +1 -0
- package/dist/_core/dist/mcp/targets.js +56 -0
- package/dist/_core/dist/mcp/targets.js.map +1 -0
- package/dist/_core/dist/mcp/types.d.ts +34 -0
- package/dist/_core/dist/mcp/types.d.ts.map +1 -0
- package/dist/_core/dist/mcp/types.js +8 -0
- package/dist/_core/dist/mcp/types.js.map +1 -0
- package/dist/_core/dist/models/analyze.d.ts +131 -0
- package/dist/_core/dist/models/analyze.d.ts.map +1 -0
- package/dist/_core/dist/models/analyze.js +301 -0
- package/dist/_core/dist/models/analyze.js.map +1 -0
- package/dist/_core/dist/models/checklist.d.ts +113 -0
- package/dist/_core/dist/models/checklist.d.ts.map +1 -0
- package/dist/_core/dist/models/checklist.js +159 -0
- package/dist/_core/dist/models/checklist.js.map +1 -0
- package/dist/_core/dist/models/clarify.d.ts +116 -0
- package/dist/_core/dist/models/clarify.d.ts.map +1 -0
- package/dist/_core/dist/models/clarify.js +166 -0
- package/dist/_core/dist/models/clarify.js.map +1 -0
- package/dist/_core/dist/models/impl-log.d.ts +64 -0
- package/dist/_core/dist/models/impl-log.d.ts.map +1 -0
- package/dist/_core/dist/models/impl-log.js +137 -0
- package/dist/_core/dist/models/impl-log.js.map +1 -0
- package/dist/_core/dist/models/index.d.ts +8 -0
- package/dist/_core/dist/models/index.d.ts.map +1 -0
- package/dist/_core/dist/models/index.js +8 -0
- package/dist/_core/dist/models/index.js.map +1 -0
- package/dist/_core/dist/models/plan.d.ts +24 -0
- package/dist/_core/dist/models/plan.d.ts.map +1 -0
- package/dist/_core/dist/models/plan.js +15 -0
- package/dist/_core/dist/models/plan.js.map +1 -0
- package/dist/_core/dist/models/spec.d.ts +23 -0
- package/dist/_core/dist/models/spec.d.ts.map +1 -0
- package/dist/_core/dist/models/spec.js +22 -0
- package/dist/_core/dist/models/spec.js.map +1 -0
- package/dist/_core/dist/models/tasks.d.ts +33 -0
- package/dist/_core/dist/models/tasks.d.ts.map +1 -0
- package/dist/_core/dist/models/tasks.js +78 -0
- package/dist/_core/dist/models/tasks.js.map +1 -0
- package/dist/_core/dist/presets/gates.d.ts +9 -0
- package/dist/_core/dist/presets/gates.d.ts.map +1 -0
- package/dist/_core/dist/presets/gates.js +173 -0
- package/dist/_core/dist/presets/gates.js.map +1 -0
- package/dist/_core/dist/presets/index.d.ts +10 -0
- package/dist/_core/dist/presets/index.d.ts.map +1 -0
- package/dist/_core/dist/presets/index.js +7 -0
- package/dist/_core/dist/presets/index.js.map +1 -0
- package/dist/_core/dist/presets/loader.d.ts +56 -0
- package/dist/_core/dist/presets/loader.d.ts.map +1 -0
- package/dist/_core/dist/presets/loader.js +216 -0
- package/dist/_core/dist/presets/loader.js.map +1 -0
- package/dist/_core/dist/presets/mobile-opinionated.d.ts +3 -0
- package/dist/_core/dist/presets/mobile-opinionated.d.ts.map +1 -0
- package/dist/_core/dist/presets/mobile-opinionated.js +78 -0
- package/dist/_core/dist/presets/mobile-opinionated.js.map +1 -0
- package/dist/_core/dist/presets/registry.d.ts +5 -0
- package/dist/_core/dist/presets/registry.d.ts.map +1 -0
- package/dist/_core/dist/presets/registry.js +14 -0
- package/dist/_core/dist/presets/registry.js.map +1 -0
- package/dist/_core/dist/presets/renderer.d.ts +5 -0
- package/dist/_core/dist/presets/renderer.d.ts.map +1 -0
- package/dist/_core/dist/presets/renderer.js +37 -0
- package/dist/_core/dist/presets/renderer.js.map +1 -0
- package/dist/_core/dist/presets/stacking.d.ts +29 -0
- package/dist/_core/dist/presets/stacking.d.ts.map +1 -0
- package/dist/_core/dist/presets/stacking.js +91 -0
- package/dist/_core/dist/presets/stacking.js.map +1 -0
- package/dist/_core/dist/presets/types.d.ts +22 -0
- package/dist/_core/dist/presets/types.d.ts.map +1 -0
- package/dist/_core/dist/presets/types.js +2 -0
- package/dist/_core/dist/presets/types.js.map +1 -0
- package/dist/_core/dist/prompts/audit-log.d.ts +73 -0
- package/dist/_core/dist/prompts/audit-log.d.ts.map +1 -0
- package/dist/_core/dist/prompts/audit-log.js +73 -0
- package/dist/_core/dist/prompts/audit-log.js.map +1 -0
- package/dist/_core/dist/prompts/index.d.ts +9 -0
- package/dist/_core/dist/prompts/index.d.ts.map +1 -0
- package/dist/_core/dist/prompts/index.js +7 -0
- package/dist/_core/dist/prompts/index.js.map +1 -0
- package/dist/_core/dist/prompts/renderer.d.ts +73 -0
- package/dist/_core/dist/prompts/renderer.d.ts.map +1 -0
- package/dist/_core/dist/prompts/renderer.js +179 -0
- package/dist/_core/dist/prompts/renderer.js.map +1 -0
- package/dist/_core/dist/prompts/resumption.d.ts +59 -0
- package/dist/_core/dist/prompts/resumption.d.ts.map +1 -0
- package/dist/_core/dist/prompts/resumption.js +149 -0
- package/dist/_core/dist/prompts/resumption.js.map +1 -0
- package/dist/_core/dist/skills/config.d.ts +27 -0
- package/dist/_core/dist/skills/config.d.ts.map +1 -0
- package/dist/_core/dist/skills/config.js +102 -0
- package/dist/_core/dist/skills/config.js.map +1 -0
- package/dist/_core/dist/skills/index.d.ts +9 -0
- package/dist/_core/dist/skills/index.d.ts.map +1 -0
- package/dist/_core/dist/skills/index.js +8 -0
- package/dist/_core/dist/skills/index.js.map +1 -0
- package/dist/_core/dist/skills/materializer.d.ts +45 -0
- package/dist/_core/dist/skills/materializer.d.ts.map +1 -0
- package/dist/_core/dist/skills/materializer.js +97 -0
- package/dist/_core/dist/skills/materializer.js.map +1 -0
- package/dist/_core/dist/skills/registry.d.ts +18 -0
- package/dist/_core/dist/skills/registry.d.ts.map +1 -0
- package/dist/_core/dist/skills/registry.js +36 -0
- package/dist/_core/dist/skills/registry.js.map +1 -0
- package/dist/_core/dist/skills/types.d.ts +39 -0
- package/dist/_core/dist/skills/types.d.ts.map +1 -0
- package/dist/_core/dist/skills/types.js +13 -0
- package/dist/_core/dist/skills/types.js.map +1 -0
- package/dist/_core/dist/state/feature.d.ts +58 -0
- package/dist/_core/dist/state/feature.d.ts.map +1 -0
- package/dist/_core/dist/state/feature.js +81 -0
- package/dist/_core/dist/state/feature.js.map +1 -0
- package/dist/_core/dist/state/index.d.ts +8 -0
- package/dist/_core/dist/state/index.d.ts.map +1 -0
- package/dist/_core/dist/state/index.js +6 -0
- package/dist/_core/dist/state/index.js.map +1 -0
- package/dist/_core/dist/state/init-options.d.ts +60 -0
- package/dist/_core/dist/state/init-options.d.ts.map +1 -0
- package/dist/_core/dist/state/init-options.js +74 -0
- package/dist/_core/dist/state/init-options.js.map +1 -0
- package/dist/_core/dist/template/engine.d.ts +7 -0
- package/dist/_core/dist/template/engine.d.ts.map +1 -0
- package/dist/_core/dist/template/engine.js +86 -0
- package/dist/_core/dist/template/engine.js.map +1 -0
- package/dist/_core/dist/template/helpers.d.ts +5 -0
- package/dist/_core/dist/template/helpers.d.ts.map +1 -0
- package/dist/_core/dist/template/helpers.js +59 -0
- package/dist/_core/dist/template/helpers.js.map +1 -0
- package/dist/_core/dist/template/index.d.ts +6 -0
- package/dist/_core/dist/template/index.d.ts.map +1 -0
- package/dist/_core/dist/template/index.js +6 -0
- package/dist/_core/dist/template/index.js.map +1 -0
- package/dist/_core/dist/template/loader.d.ts +36 -0
- package/dist/_core/dist/template/loader.d.ts.map +1 -0
- package/dist/_core/dist/template/loader.js +62 -0
- package/dist/_core/dist/template/loader.js.map +1 -0
- package/dist/_core/dist/template/parser.d.ts +3 -0
- package/dist/_core/dist/template/parser.d.ts.map +1 -0
- package/dist/_core/dist/template/parser.js +234 -0
- package/dist/_core/dist/template/parser.js.map +1 -0
- package/dist/_core/dist/template/types.d.ts +40 -0
- package/dist/_core/dist/template/types.d.ts.map +1 -0
- package/dist/_core/dist/template/types.js +14 -0
- package/dist/_core/dist/template/types.js.map +1 -0
- package/dist/_core/dist/verify/a11y.d.ts +36 -0
- package/dist/_core/dist/verify/a11y.d.ts.map +1 -0
- package/dist/_core/dist/verify/a11y.js +153 -0
- package/dist/_core/dist/verify/a11y.js.map +1 -0
- package/dist/_core/dist/verify/architecture.d.ts +37 -0
- package/dist/_core/dist/verify/architecture.d.ts.map +1 -0
- package/dist/_core/dist/verify/architecture.js +113 -0
- package/dist/_core/dist/verify/architecture.js.map +1 -0
- package/dist/_core/dist/verify/index.d.ts +10 -0
- package/dist/_core/dist/verify/index.d.ts.map +1 -0
- package/dist/_core/dist/verify/index.js +10 -0
- package/dist/_core/dist/verify/index.js.map +1 -0
- package/dist/_core/dist/verify/os-matrix.d.ts +35 -0
- package/dist/_core/dist/verify/os-matrix.d.ts.map +1 -0
- package/dist/_core/dist/verify/os-matrix.js +104 -0
- package/dist/_core/dist/verify/os-matrix.js.map +1 -0
- package/dist/_core/dist/verify/perf.d.ts +43 -0
- package/dist/_core/dist/verify/perf.d.ts.map +1 -0
- package/dist/_core/dist/verify/perf.js +69 -0
- package/dist/_core/dist/verify/perf.js.map +1 -0
- package/dist/_core/dist/verify/stores.d.ts +38 -0
- package/dist/_core/dist/verify/stores.d.ts.map +1 -0
- package/dist/_core/dist/verify/stores.js +57 -0
- package/dist/_core/dist/verify/stores.js.map +1 -0
- package/dist/_core/dist/version.d.ts +8 -0
- package/dist/_core/dist/version.d.ts.map +1 -0
- package/dist/_core/dist/version.js +11 -0
- package/dist/_core/dist/version.js.map +1 -0
- package/dist/_core/dist/workflows/bundled.d.ts +32 -0
- package/dist/_core/dist/workflows/bundled.d.ts.map +1 -0
- package/dist/_core/dist/workflows/bundled.js +254 -0
- package/dist/_core/dist/workflows/bundled.js.map +1 -0
- package/dist/_core/dist/workflows/engine.d.ts +74 -0
- package/dist/_core/dist/workflows/engine.d.ts.map +1 -0
- package/dist/_core/dist/workflows/engine.js +574 -0
- package/dist/_core/dist/workflows/engine.js.map +1 -0
- package/dist/_core/dist/workflows/expressions.d.ts +48 -0
- package/dist/_core/dist/workflows/expressions.d.ts.map +1 -0
- package/dist/_core/dist/workflows/expressions.js +336 -0
- package/dist/_core/dist/workflows/expressions.js.map +1 -0
- package/dist/_core/dist/workflows/index.d.ts +16 -0
- package/dist/_core/dist/workflows/index.d.ts.map +1 -0
- package/dist/_core/dist/workflows/index.js +15 -0
- package/dist/_core/dist/workflows/index.js.map +1 -0
- package/dist/_core/dist/workflows/parser.d.ts +38 -0
- package/dist/_core/dist/workflows/parser.d.ts.map +1 -0
- package/dist/_core/dist/workflows/parser.js +386 -0
- package/dist/_core/dist/workflows/parser.js.map +1 -0
- package/dist/_core/dist/workflows/sdd-flow.d.ts +85 -0
- package/dist/_core/dist/workflows/sdd-flow.d.ts.map +1 -0
- package/dist/_core/dist/workflows/sdd-flow.js +269 -0
- package/dist/_core/dist/workflows/sdd-flow.js.map +1 -0
- package/dist/_core/dist/workflows/types.d.ts +285 -0
- package/dist/_core/dist/workflows/types.d.ts.map +1 -0
- package/dist/_core/dist/workflows/types.js +13 -0
- package/dist/_core/dist/workflows/types.js.map +1 -0
- package/dist/_core/package.json +6 -0
- package/dist/_core/templates/constitution.md.hbs +46 -0
- package/dist/_core/templates/ghaWorkflow.yml.hbs +58 -0
- package/dist/_core/templates/hotfix.md.hbs +39 -0
- package/dist/_core/templates/plan.md.hbs +212 -0
- package/dist/_core/templates/preCommitHook.sh.hbs +30 -0
- package/dist/_core/templates/prePushHook.sh.hbs +45 -0
- package/dist/_core/templates/raptor.yml.hbs +24 -0
- package/dist/_core/templates/spec.md.hbs +127 -0
- package/dist/_core/templates/tasks.md.hbs +71 -0
- package/dist/commands/add-agent.d.ts +22 -0
- package/dist/commands/add-agent.d.ts.map +1 -0
- package/dist/commands/add-agent.js +121 -0
- package/dist/commands/add-agent.js.map +1 -0
- package/dist/commands/add-extension.d.ts +18 -0
- package/dist/commands/add-extension.d.ts.map +1 -0
- package/dist/commands/add-extension.js +83 -0
- package/dist/commands/add-extension.js.map +1 -0
- package/dist/commands/analyze.d.ts +18 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +323 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/approve.d.ts +14 -0
- package/dist/commands/approve.d.ts.map +1 -0
- package/dist/commands/approve.js +116 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/audit/query.d.ts +23 -0
- package/dist/commands/audit/query.d.ts.map +1 -0
- package/dist/commands/audit/query.js +118 -0
- package/dist/commands/audit/query.js.map +1 -0
- package/dist/commands/audit/show.d.ts +17 -0
- package/dist/commands/audit/show.d.ts.map +1 -0
- package/dist/commands/audit/show.js +53 -0
- package/dist/commands/audit/show.js.map +1 -0
- package/dist/commands/checklist.d.ts +17 -0
- package/dist/commands/checklist.d.ts.map +1 -0
- package/dist/commands/checklist.js +255 -0
- package/dist/commands/checklist.js.map +1 -0
- package/dist/commands/clarify.d.ts +17 -0
- package/dist/commands/clarify.d.ts.map +1 -0
- package/dist/commands/clarify.js +254 -0
- package/dist/commands/clarify.js.map +1 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +435 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/extension/add.d.ts +15 -0
- package/dist/commands/extension/add.d.ts.map +1 -0
- package/dist/commands/extension/add.js +93 -0
- package/dist/commands/extension/add.js.map +1 -0
- package/dist/commands/extension/info.d.ts +13 -0
- package/dist/commands/extension/info.d.ts.map +1 -0
- package/dist/commands/extension/info.js +75 -0
- package/dist/commands/extension/info.js.map +1 -0
- package/dist/commands/extension/list.d.ts +10 -0
- package/dist/commands/extension/list.d.ts.map +1 -0
- package/dist/commands/extension/list.js +71 -0
- package/dist/commands/extension/list.js.map +1 -0
- package/dist/commands/extension/remove.d.ts +14 -0
- package/dist/commands/extension/remove.d.ts.map +1 -0
- package/dist/commands/extension/remove.js +49 -0
- package/dist/commands/extension/remove.js.map +1 -0
- package/dist/commands/gate/approve.d.ts +15 -0
- package/dist/commands/gate/approve.d.ts.map +1 -0
- package/dist/commands/gate/approve.js +106 -0
- package/dist/commands/gate/approve.js.map +1 -0
- package/dist/commands/gate/list.d.ts +6 -0
- package/dist/commands/gate/list.d.ts.map +1 -0
- package/dist/commands/gate/list.js +38 -0
- package/dist/commands/gate/list.js.map +1 -0
- package/dist/commands/gate/skip.d.ts +14 -0
- package/dist/commands/gate/skip.d.ts.map +1 -0
- package/dist/commands/gate/skip.js +95 -0
- package/dist/commands/gate/skip.js.map +1 -0
- package/dist/commands/hook/list.d.ts +11 -0
- package/dist/commands/hook/list.d.ts.map +1 -0
- package/dist/commands/hook/list.js +152 -0
- package/dist/commands/hook/list.js.map +1 -0
- package/dist/commands/hook/run.d.ts +16 -0
- package/dist/commands/hook/run.d.ts.map +1 -0
- package/dist/commands/hook/run.js +74 -0
- package/dist/commands/hook/run.js.map +1 -0
- package/dist/commands/hotfix.d.ts +21 -0
- package/dist/commands/hotfix.d.ts.map +1 -0
- package/dist/commands/hotfix.js +216 -0
- package/dist/commands/hotfix.js.map +1 -0
- package/dist/commands/implement.d.ts +19 -0
- package/dist/commands/implement.d.ts.map +1 -0
- package/dist/commands/implement.js +282 -0
- package/dist/commands/implement.js.map +1 -0
- package/dist/commands/init.d.ts +43 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +465 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list-agents.d.ts +12 -0
- package/dist/commands/list-agents.d.ts.map +1 -0
- package/dist/commands/list-agents.js +55 -0
- package/dist/commands/list-agents.js.map +1 -0
- package/dist/commands/mcp/add.d.ts +21 -0
- package/dist/commands/mcp/add.d.ts.map +1 -0
- package/dist/commands/mcp/add.js +119 -0
- package/dist/commands/mcp/add.js.map +1 -0
- package/dist/commands/mcp/list.d.ts +10 -0
- package/dist/commands/mcp/list.d.ts.map +1 -0
- package/dist/commands/mcp/list.js +54 -0
- package/dist/commands/mcp/list.js.map +1 -0
- package/dist/commands/mcp/remove.d.ts +10 -0
- package/dist/commands/mcp/remove.d.ts.map +1 -0
- package/dist/commands/mcp/remove.js +53 -0
- package/dist/commands/mcp/remove.js.map +1 -0
- package/dist/commands/mcp/sync.d.ts +7 -0
- package/dist/commands/mcp/sync.d.ts.map +1 -0
- package/dist/commands/mcp/sync.js +31 -0
- package/dist/commands/mcp/sync.js.map +1 -0
- package/dist/commands/new.d.ts +19 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +306 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/plan.d.ts +17 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +200 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/preset/add.d.ts +13 -0
- package/dist/commands/preset/add.d.ts.map +1 -0
- package/dist/commands/preset/add.js +66 -0
- package/dist/commands/preset/add.js.map +1 -0
- package/dist/commands/preset/info.d.ts +13 -0
- package/dist/commands/preset/info.d.ts.map +1 -0
- package/dist/commands/preset/info.js +80 -0
- package/dist/commands/preset/info.js.map +1 -0
- package/dist/commands/preset/list.d.ts +10 -0
- package/dist/commands/preset/list.d.ts.map +1 -0
- package/dist/commands/preset/list.js +63 -0
- package/dist/commands/preset/list.js.map +1 -0
- package/dist/commands/preset/remove.d.ts +14 -0
- package/dist/commands/preset/remove.d.ts.map +1 -0
- package/dist/commands/preset/remove.js +60 -0
- package/dist/commands/preset/remove.js.map +1 -0
- package/dist/commands/repair/constitution.d.ts +11 -0
- package/dist/commands/repair/constitution.d.ts.map +1 -0
- package/dist/commands/repair/constitution.js +117 -0
- package/dist/commands/repair/constitution.js.map +1 -0
- package/dist/commands/resync.d.ts +22 -0
- package/dist/commands/resync.d.ts.map +1 -0
- package/dist/commands/resync.js +103 -0
- package/dist/commands/resync.js.map +1 -0
- package/dist/commands/skill/add.d.ts +19 -0
- package/dist/commands/skill/add.d.ts.map +1 -0
- package/dist/commands/skill/add.js +107 -0
- package/dist/commands/skill/add.js.map +1 -0
- package/dist/commands/skill/list.d.ts +10 -0
- package/dist/commands/skill/list.d.ts.map +1 -0
- package/dist/commands/skill/list.js +56 -0
- package/dist/commands/skill/list.js.map +1 -0
- package/dist/commands/skill/remove.d.ts +10 -0
- package/dist/commands/skill/remove.d.ts.map +1 -0
- package/dist/commands/skill/remove.js +47 -0
- package/dist/commands/skill/remove.js.map +1 -0
- package/dist/commands/skill/sync.d.ts +7 -0
- package/dist/commands/skill/sync.d.ts.map +1 -0
- package/dist/commands/skill/sync.js +30 -0
- package/dist/commands/skill/sync.js.map +1 -0
- package/dist/commands/status.d.ts +17 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +265 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/tasks.d.ts +16 -0
- package/dist/commands/tasks.d.ts.map +1 -0
- package/dist/commands/tasks.js +176 -0
- package/dist/commands/tasks.js.map +1 -0
- package/dist/commands/trace.d.ts +16 -0
- package/dist/commands/trace.d.ts.map +1 -0
- package/dist/commands/trace.js +113 -0
- package/dist/commands/trace.js.map +1 -0
- package/dist/commands/upgrade.d.ts +20 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +178 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/verify/a11y.d.ts +15 -0
- package/dist/commands/verify/a11y.d.ts.map +1 -0
- package/dist/commands/verify/a11y.js +121 -0
- package/dist/commands/verify/a11y.js.map +1 -0
- package/dist/commands/verify/architecture.d.ts +11 -0
- package/dist/commands/verify/architecture.d.ts.map +1 -0
- package/dist/commands/verify/architecture.js +71 -0
- package/dist/commands/verify/architecture.js.map +1 -0
- package/dist/commands/verify/audit.d.ts +18 -0
- package/dist/commands/verify/audit.d.ts.map +1 -0
- package/dist/commands/verify/audit.js +108 -0
- package/dist/commands/verify/audit.js.map +1 -0
- package/dist/commands/verify/constitution.d.ts +10 -0
- package/dist/commands/verify/constitution.d.ts.map +1 -0
- package/dist/commands/verify/constitution.js +91 -0
- package/dist/commands/verify/constitution.js.map +1 -0
- package/dist/commands/verify/os-matrix.d.ts +14 -0
- package/dist/commands/verify/os-matrix.d.ts.map +1 -0
- package/dist/commands/verify/os-matrix.js +108 -0
- package/dist/commands/verify/os-matrix.js.map +1 -0
- package/dist/commands/verify/perf.d.ts +17 -0
- package/dist/commands/verify/perf.d.ts.map +1 -0
- package/dist/commands/verify/perf.js +106 -0
- package/dist/commands/verify/perf.js.map +1 -0
- package/dist/commands/verify/stores.d.ts +14 -0
- package/dist/commands/verify/stores.d.ts.map +1 -0
- package/dist/commands/verify/stores.js +98 -0
- package/dist/commands/verify/stores.js.map +1 -0
- package/dist/commands/verify.d.ts +14 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +97 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/workflow/catalog.d.ts +11 -0
- package/dist/commands/workflow/catalog.d.ts.map +1 -0
- package/dist/commands/workflow/catalog.js +164 -0
- package/dist/commands/workflow/catalog.js.map +1 -0
- package/dist/commands/workflow/list.d.ts +7 -0
- package/dist/commands/workflow/list.d.ts.map +1 -0
- package/dist/commands/workflow/list.js +50 -0
- package/dist/commands/workflow/list.js.map +1 -0
- package/dist/commands/workflow/resume.d.ts +13 -0
- package/dist/commands/workflow/resume.d.ts.map +1 -0
- package/dist/commands/workflow/resume.js +126 -0
- package/dist/commands/workflow/resume.js.map +1 -0
- package/dist/commands/workflow/run.d.ts +14 -0
- package/dist/commands/workflow/run.d.ts.map +1 -0
- package/dist/commands/workflow/run.js +139 -0
- package/dist/commands/workflow/run.js.map +1 -0
- package/dist/commands/workflow/status.d.ts +10 -0
- package/dist/commands/workflow/status.d.ts.map +1 -0
- package/dist/commands/workflow/status.js +86 -0
- package/dist/commands/workflow/status.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/shared/agents.d.ts +12 -0
- package/dist/shared/agents.d.ts.map +1 -0
- package/dist/shared/agents.js +31 -0
- package/dist/shared/agents.js.map +1 -0
- package/dist/shared/artifact-io.d.ts +54 -0
- package/dist/shared/artifact-io.d.ts.map +1 -0
- package/dist/shared/artifact-io.js +71 -0
- package/dist/shared/artifact-io.js.map +1 -0
- package/dist/shared/feature-prompt.d.ts +18 -0
- package/dist/shared/feature-prompt.d.ts.map +1 -0
- package/dist/shared/feature-prompt.js +21 -0
- package/dist/shared/feature-prompt.js.map +1 -0
- package/dist/shared/hooks.d.ts +7 -0
- package/dist/shared/hooks.d.ts.map +1 -0
- package/dist/shared/hooks.js +52 -0
- package/dist/shared/hooks.js.map +1 -0
- package/dist/shared/mcp.d.ts +9 -0
- package/dist/shared/mcp.d.ts.map +1 -0
- package/dist/shared/mcp.js +15 -0
- package/dist/shared/mcp.js.map +1 -0
- package/dist/shared/project.d.ts +42 -0
- package/dist/shared/project.d.ts.map +1 -0
- package/dist/shared/project.js +98 -0
- package/dist/shared/project.js.map +1 -0
- package/dist/shared/workflow-resolver.d.ts +19 -0
- package/dist/shared/workflow-resolver.d.ts.map +1 -0
- package/dist/shared/workflow-resolver.js +71 -0
- package/dist/shared/workflow-resolver.js.map +1 -0
- package/dist/workflow/args-builder.d.ts +31 -0
- package/dist/workflow/args-builder.d.ts.map +1 -0
- package/dist/workflow/args-builder.js +110 -0
- package/dist/workflow/args-builder.js.map +1 -0
- package/dist/workflow/executor.d.ts +18 -0
- package/dist/workflow/executor.d.ts.map +1 -0
- package/dist/workflow/executor.js +112 -0
- package/dist/workflow/executor.js.map +1 -0
- package/extensions/git/commands/rpt.git.feature.md +85 -0
- package/extensions/git/extension.yml +47 -0
- package/package.json +58 -0
- package/scripts/bash/check-prerequisites.sh +149 -0
- package/scripts/bash/common.sh +389 -0
- package/scripts/bash/create-new-feature.sh +164 -0
- package/scripts/bash/setup-plan.sh +113 -0
- package/scripts/check-naming.sh +138 -0
- package/scripts/check-prompts.sh +165 -0
- package/scripts/check-tasks.sh +166 -0
- package/scripts/powershell/check-prerequisites.ps1 +117 -0
- package/scripts/powershell/common.ps1 +328 -0
- package/scripts/powershell/create-new-feature.ps1 +138 -0
- package/scripts/powershell/setup-plan.ps1 +96 -0
- package/scripts/prepare-npm.mjs +157 -0
- package/templates/checklist-template.md +103 -0
- package/templates/commands/analyze.md +103 -0
- package/templates/commands/checklist.md +87 -0
- package/templates/commands/clarify.md +85 -0
- package/templates/commands/constitution.md +126 -0
- package/templates/commands/implement.md +117 -0
- package/templates/commands/plan.md +125 -0
- package/templates/commands/specify.md +127 -0
- package/templates/commands/tasks.md +98 -0
- package/templates/commands/taskstoissues.md +81 -0
- package/templates/constitution-template.md +48 -0
- package/templates/plan-template.md +150 -0
- package/templates/spec-template.md +116 -0
- package/templates/tasks-template.md +77 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot adapter.
|
|
3
|
+
*
|
|
4
|
+
* Materializes Raptor commands into `.github/prompts/<command>.prompt.md`
|
|
5
|
+
* (the GitHub Copilot prompt-library convention) and uses
|
|
6
|
+
* `.github/copilot-instructions.md` as the persistent context file.
|
|
7
|
+
*
|
|
8
|
+
* Spec Kit ref: E11 — "Adaptador Copilot".
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentAdapter } from "../types.js";
|
|
11
|
+
export declare const copilotAdapter: AgentAdapter;
|
|
12
|
+
//# sourceMappingURL=copilot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,cAAc,EAAE,YAiC5B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot adapter.
|
|
3
|
+
*
|
|
4
|
+
* Materializes Raptor commands into `.github/prompts/<command>.prompt.md`
|
|
5
|
+
* (the GitHub Copilot prompt-library convention) and uses
|
|
6
|
+
* `.github/copilot-instructions.md` as the persistent context file.
|
|
7
|
+
*
|
|
8
|
+
* Spec Kit ref: E11 — "Adaptador Copilot".
|
|
9
|
+
*/
|
|
10
|
+
export const copilotAdapter = {
|
|
11
|
+
id: "copilot",
|
|
12
|
+
displayName: "GitHub Copilot",
|
|
13
|
+
commandDir: ".github/prompts",
|
|
14
|
+
commandExt: ".prompt.md",
|
|
15
|
+
contextFile: ".github/copilot-instructions.md",
|
|
16
|
+
argumentSyntax: "$ARGUMENTS",
|
|
17
|
+
capabilities: ["coding", "refactoring", "inline-edit"],
|
|
18
|
+
quirks: {},
|
|
19
|
+
installCheck: "which gh",
|
|
20
|
+
packPrompt(canonical) {
|
|
21
|
+
const frontmatter = [
|
|
22
|
+
"---",
|
|
23
|
+
`description: Raptor ${canonical.command} — feature ${canonical.feature}`,
|
|
24
|
+
`mode: agent`,
|
|
25
|
+
`raptor.command: ${canonical.command}`,
|
|
26
|
+
`raptor.feature: "${canonical.feature}"`,
|
|
27
|
+
`raptor.prompt_hash: "${canonical.promptHash}"`,
|
|
28
|
+
`raptor.generated_at: "${canonical.generatedAt}"`,
|
|
29
|
+
"---",
|
|
30
|
+
].join("\n");
|
|
31
|
+
const header = `# Comando: ${canonical.command} — Feature ${canonical.feature}`;
|
|
32
|
+
const contract = buildContractSection(canonical);
|
|
33
|
+
return `${frontmatter}\n\n${header}\n\n${contract}\n`;
|
|
34
|
+
},
|
|
35
|
+
commandFileName(command) {
|
|
36
|
+
return `raptor-${command}.prompt.md`;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
function buildContractSection(canonical) {
|
|
40
|
+
const sections = [];
|
|
41
|
+
sections.push("## Contrato operacional\n");
|
|
42
|
+
sections.push(canonical.body);
|
|
43
|
+
if (canonical.invariants.length > 0) {
|
|
44
|
+
sections.push("\n## Invariantes a preservar\n");
|
|
45
|
+
for (const inv of canonical.invariants) {
|
|
46
|
+
sections.push(`- ${inv}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (canonical.inputs.length > 0) {
|
|
50
|
+
sections.push("\n## Entradas\n");
|
|
51
|
+
for (const input of canonical.inputs) {
|
|
52
|
+
sections.push(`- \`${input.path}\` (${input.role}, hash: \`${input.hash.slice(0, 16)}…\`)`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
sections.push("\n## Saída esperada\n");
|
|
56
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
57
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
58
|
+
if (canonical.articles.length > 0) {
|
|
59
|
+
sections.push("\n## Artigos constitucionais aplicáveis\n");
|
|
60
|
+
sections.push(`- ${canonical.articles.join(", ")}`);
|
|
61
|
+
}
|
|
62
|
+
sections.push("\n## Escopo de arquivos\n");
|
|
63
|
+
sections.push(`- **Leitura**: ${canonical.scope.read.join(", ") || "(sem restrição)"}`);
|
|
64
|
+
sections.push(`- **Escrita**: ${canonical.scope.write.join(", ") || "(sem restrição)"}`);
|
|
65
|
+
if (canonical.scope.forbidden.length > 0) {
|
|
66
|
+
sections.push(`- **Proibido**: ${canonical.scope.forbidden.join(", ")}`);
|
|
67
|
+
}
|
|
68
|
+
sections.push("\n## Forma de assinatura\n", "Ao finalizar, grave o arquivo diretamente. O Raptor detectará via hash.", "NÃO adicione comentários como `// gerado por Copilot`.");
|
|
69
|
+
return sections.join("\n");
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=copilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../../src/agents/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAiB;I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1E,CAAC;IACF,IAAI,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,QAAQ,CAAC,IAAI,CACX,4BAA4B,EAC5B,yEAAyE,EACzE,wDAAwD,CACzD,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.cursor/rules/raptor-<command>.mdc` with Cursor MDC format.
|
|
5
|
+
* Blueprint ref: 17.5.2.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentAdapter } from "../types.js";
|
|
8
|
+
export declare const cursorAdapter: AgentAdapter;
|
|
9
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/cursor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,YAiC3B,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.cursor/rules/raptor-<command>.mdc` with Cursor MDC format.
|
|
5
|
+
* Blueprint ref: 17.5.2.
|
|
6
|
+
*/
|
|
7
|
+
export const cursorAdapter = {
|
|
8
|
+
id: "cursor",
|
|
9
|
+
displayName: "Cursor",
|
|
10
|
+
commandDir: ".cursor/rules",
|
|
11
|
+
commandExt: ".mdc",
|
|
12
|
+
contextFile: ".cursor/rules/raptor-context.mdc",
|
|
13
|
+
argumentSyntax: "$ARGUMENTS",
|
|
14
|
+
capabilities: ["coding", "refactoring", "inline-edit"],
|
|
15
|
+
quirks: {},
|
|
16
|
+
installCheck: "which cursor",
|
|
17
|
+
packPrompt(canonical) {
|
|
18
|
+
const frontmatter = [
|
|
19
|
+
"---",
|
|
20
|
+
`description: Raptor ${canonical.command} — feature ${canonical.feature}`,
|
|
21
|
+
`globs: ${canonical.scope.write.join(",")}`,
|
|
22
|
+
"alwaysApply: false",
|
|
23
|
+
`raptor.command: ${canonical.command}`,
|
|
24
|
+
`raptor.feature: "${canonical.feature}"`,
|
|
25
|
+
`raptor.prompt_hash: "${canonical.promptHash}"`,
|
|
26
|
+
"---",
|
|
27
|
+
].join("\n");
|
|
28
|
+
const header = `# Regra ativa — ${canonical.command} ${canonical.feature}`;
|
|
29
|
+
const body = buildCursorBody(canonical);
|
|
30
|
+
return `${frontmatter}\n\n${header}\n\n${body}\n`;
|
|
31
|
+
},
|
|
32
|
+
commandFileName(command) {
|
|
33
|
+
return `raptor-${command}.mdc`;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
function buildCursorBody(canonical) {
|
|
37
|
+
const sections = [];
|
|
38
|
+
sections.push(`Quando o arquivo \`${canonical.expectedOutput}\` for aberto com o stub`, "`<!-- raptor:await-agent -->`, substituir pelo corpo seguindo o contrato abaixo.\n");
|
|
39
|
+
sections.push("## Contrato\n");
|
|
40
|
+
sections.push(canonical.body);
|
|
41
|
+
if (canonical.invariants.length > 0) {
|
|
42
|
+
sections.push("\n## Invariantes\n");
|
|
43
|
+
for (const inv of canonical.invariants) {
|
|
44
|
+
sections.push(`- ${inv}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (canonical.inputs.length > 0) {
|
|
48
|
+
sections.push("\n## Entradas\n");
|
|
49
|
+
for (const input of canonical.inputs) {
|
|
50
|
+
sections.push(`- \`${input.path}\` (${input.role}, hash: \`${input.hash.slice(0, 16)}…\`)`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
sections.push("\n## Saída\n");
|
|
54
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
55
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
56
|
+
if (canonical.articles.length > 0) {
|
|
57
|
+
sections.push("\n## Artigos\n");
|
|
58
|
+
sections.push(`- ${canonical.articles.join(", ")}`);
|
|
59
|
+
}
|
|
60
|
+
return sections.join("\n");
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../../src/agents/adapters/cursor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,EAAE,EAAE,QAAQ;IACZ,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,kCAAkC;IAC/C,cAAc,EAAE,YAAY;IAC5B,YAAY,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,aAAa,CAAC;IACtD,MAAM,EAAE,EAAE;IACV,YAAY,EAAE,cAAc;IAE5B,UAAU,CAAC,SAA0B;QACnC,MAAM,WAAW,GAAG;YAClB,KAAK;YACL,uBAAuB,SAAS,CAAC,OAAO,cAAc,SAAS,CAAC,OAAO,EAAE;YACzE,UAAU,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YAC3C,oBAAoB;YACpB,mBAAmB,SAAS,CAAC,OAAO,EAAE;YACtC,oBAAoB,SAAS,CAAC,OAAO,GAAG;YACxC,wBAAwB,SAAS,CAAC,UAAU,GAAG;YAC/C,KAAK;SACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,MAAM,GAAG,mBAAmB,SAAS,CAAC,OAAO,IAAI,SAAS,C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AC,cAAc,IAAI,CAAC,CAAC;IAC5D,QAAQ,CAAC,IAAI,CAAC,eAAe,SAAS,CAAC,YAAY,IAAI,CAAC,CAAC;IAEzD,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAChC,QAAQ,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.gemini/commands/<command>.md` with YAML frontmatter.
|
|
5
|
+
* Gemini uses GEMINI.md as its context file.
|
|
6
|
+
*
|
|
7
|
+
* Spec Kit ref: E11 — "Adaptador Gemini"
|
|
8
|
+
*/
|
|
9
|
+
import type { AgentAdapter } from "../types.js";
|
|
10
|
+
export declare const geminiAdapter: AgentAdapter;
|
|
11
|
+
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/gemini.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,YA+B3B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.gemini/commands/<command>.md` with YAML frontmatter.
|
|
5
|
+
* Gemini uses GEMINI.md as its context file.
|
|
6
|
+
*
|
|
7
|
+
* Spec Kit ref: E11 — "Adaptador Gemini"
|
|
8
|
+
*/
|
|
9
|
+
export const geminiAdapter = {
|
|
10
|
+
id: "gemini",
|
|
11
|
+
displayName: "Gemini (Antigravity)",
|
|
12
|
+
commandDir: ".gemini/commands",
|
|
13
|
+
commandExt: ".md",
|
|
14
|
+
contextFile: "GEMINI.md",
|
|
15
|
+
argumentSyntax: "$ARGUMENTS",
|
|
16
|
+
capabilities: ["reasoning", "coding", "refactoring", "planning"],
|
|
17
|
+
quirks: {},
|
|
18
|
+
installCheck: undefined,
|
|
19
|
+
packPrompt(canonical) {
|
|
20
|
+
const frontmatter = [
|
|
21
|
+
"---",
|
|
22
|
+
`raptor.command: ${canonical.command}`,
|
|
23
|
+
`raptor.feature: "${canonical.feature}"`,
|
|
24
|
+
`raptor.prompt_hash: "${canonical.promptHash}"`,
|
|
25
|
+
`raptor.generated_at: "${canonical.generatedAt}"`,
|
|
26
|
+
"---",
|
|
27
|
+
].join("\n");
|
|
28
|
+
const header = `# Comando: ${canonical.command} — Feature ${canonical.feature}`;
|
|
29
|
+
const contract = buildContractSection(canonical);
|
|
30
|
+
return `${frontmatter}\n\n${header}\n\n${contract}\n`;
|
|
31
|
+
},
|
|
32
|
+
commandFileName(command) {
|
|
33
|
+
return `rpt-${command}.md`;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
function buildContractSection(canonical) {
|
|
37
|
+
const sections = [];
|
|
38
|
+
sections.push("## Contrato operacional\n");
|
|
39
|
+
sections.push(canonical.body);
|
|
40
|
+
if (canonical.invariants.length > 0) {
|
|
41
|
+
sections.push("\n## Invariantes a preservar\n");
|
|
42
|
+
for (const inv of canonical.invariants) {
|
|
43
|
+
sections.push(`- ${inv}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (canonical.inputs.length > 0) {
|
|
47
|
+
sections.push("\n## Entradas\n");
|
|
48
|
+
for (const input of canonical.inputs) {
|
|
49
|
+
sections.push(`- \`${input.path}\` (${input.role}, hash: \`${input.hash.slice(0, 16)}…\`)`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
sections.push("\n## Saída esperada\n");
|
|
53
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
54
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
55
|
+
if (canonical.articles.length > 0) {
|
|
56
|
+
sections.push("\n## Artigos constitucionais aplicáveis\n");
|
|
57
|
+
sections.push(`- ${canonical.articles.join(", ")}`);
|
|
58
|
+
}
|
|
59
|
+
sections.push("\n## Escopo de arquivos\n");
|
|
60
|
+
sections.push(`- **Leitura**: ${canonical.scope.read.join(", ") || "(sem restrição)"}`);
|
|
61
|
+
sections.push(`- **Escrita**: ${canonical.scope.write.join(", ") || "(sem restrição)"}`);
|
|
62
|
+
if (canonical.scope.forbidden.length > 0) {
|
|
63
|
+
sections.push(`- **Proibido**: ${canonical.scope.forbidden.join(", ")}`);
|
|
64
|
+
}
|
|
65
|
+
sections.push("\n## Forma de assinatura\n", "Ao finalizar, grave o arquivo diretamente. O Raptor detectará via hash.", "NÃO adicione comentários como `// gerado por Gemini`.");
|
|
66
|
+
return sections.join("\n");
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=gemini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../../src/agents/adapters/gemini.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,EAAE,EAAE,QAAQ;IACZ,WAAW,EAAE,sBAAsB;IACnC,UAAU,EAAE,kBAAkB;IAC9B,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,WAAW;IACxB,cAAc,EAAE,YAAY;IAC5B,YAAY,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC;IAChE,MAAM,EAAE,EAAE;IACV,YAAY,EAAE,SAAS;IAEvB,UAAU,CAAC,SAA0B;QACnC,MAAM,WAAW,GAAG;YAClB,KAAK;YACL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
|
+
/**
|
|
2
|
+
* Human fallback adapter.
|
|
3
|
+
*
|
|
4
|
+
* Renders the canonical prompt to stdout for manual copy-paste.
|
|
5
|
+
* Always available — used when no AI agent is installed.
|
|
6
|
+
* Blueprint ref: 17.2 (Humano — fallback).
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentAdapter } from "../types.js";
|
|
9
|
+
export declare const humanAdapter: AgentAdapter;
|
|
10
|
+
//# sourceMappingURL=human.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/human.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,YAoD1B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human fallback adapter.
|
|
3
|
+
*
|
|
4
|
+
* Renders the canonical prompt to stdout for manual copy-paste.
|
|
5
|
+
* Always available — used when no AI agent is installed.
|
|
6
|
+
* Blueprint ref: 17.2 (Humano — fallback).
|
|
7
|
+
*/
|
|
8
|
+
export const humanAdapter = {
|
|
9
|
+
id: "human",
|
|
10
|
+
displayName: "Human (manual)",
|
|
11
|
+
commandDir: ".raptor/prompts",
|
|
12
|
+
commandExt: ".md",
|
|
13
|
+
contextFile: "",
|
|
14
|
+
argumentSyntax: "",
|
|
15
|
+
capabilities: ["reasoning", "coding", "refactoring", "planning"],
|
|
16
|
+
quirks: {},
|
|
17
|
+
packPrompt(canonical) {
|
|
18
|
+
const sections = [];
|
|
19
|
+
sections.push(`# Prompt Manual — ${canonical.command} (Feature ${canonical.feature})`);
|
|
20
|
+
sections.push("");
|
|
21
|
+
sections.push(`> Hash: ${canonical.promptHash}`);
|
|
22
|
+
sections.push(`> Gerado em: ${canonical.generatedAt}`);
|
|
23
|
+
sections.push("");
|
|
24
|
+
sections.push("**Copie este prompt para o agente de IA de sua escolha.**", "");
|
|
25
|
+
sections.push("---\n");
|
|
26
|
+
sections.push(canonical.body);
|
|
27
|
+
if (canonical.invariants.length > 0) {
|
|
28
|
+
sections.push("\n---\n\n## Invariantes\n");
|
|
29
|
+
for (const inv of canonical.invariants) {
|
|
30
|
+
sections.push(`- ${inv}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (canonical.inputs.length > 0) {
|
|
34
|
+
sections.push("\n## Entradas\n");
|
|
35
|
+
for (const input of canonical.inputs) {
|
|
36
|
+
sections.push(`- \`${input.path}\` (${input.role})`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
sections.push("\n## Saída esperada\n");
|
|
40
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
41
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
42
|
+
return sections.join("\n") + "\n";
|
|
43
|
+
},
|
|
44
|
+
commandFileName(command) {
|
|
45
|
+
return `raptor-${command}.md`;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=human.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human.js","sourceRoot":"","sources":["../../../src/agents/adapters/human.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,EAAE,EAAE,OAAO;IACX,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,iBAAiB;IAC7B,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,EAAE;IAClB,YAAY,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC;IAChE,MAAM,EAAE,EAAE;IAEV,UAAU,CAAC,SAA0B;QACnC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,QAAQ,CAAC,IAAI,CACX,qBAAqB,SAAS,CAAC,OAAO,aAAa,SAAS,CAAC,O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AC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,CAAC;IAED,eAAe,CAAC,OAAe;QAC7B,OAAO,UAAU,OAAO,KAAK,CAAC;IAChC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifact Watcher — polling-based file detection.
|
|
3
|
+
*
|
|
4
|
+
* Watches an expected artifact path (e.g. `specs/<feature>/plan.md`) and
|
|
5
|
+
* resolves when the agent has produced/updated the file. Used by the
|
|
6
|
+
* `--wait-artifact` flag in phase commands to allow the CLI to block
|
|
7
|
+
* until an external agent (Claude Code, Cursor, Antigravity) finishes
|
|
8
|
+
* producing the canonical output.
|
|
9
|
+
*
|
|
10
|
+
* Design choices:
|
|
11
|
+
* - Polls with `fs.stat` at a configurable interval (default 500ms).
|
|
12
|
+
* - Watches for either (a) new file creation after the baseline snapshot,
|
|
13
|
+
* or (b) mtime change on an existing file.
|
|
14
|
+
* - Supports glob patterns (`specs/<f>/code/**`) via minimal base-dir
|
|
15
|
+
* directory scan — for our use case we only need to detect "something
|
|
16
|
+
* new appeared under this directory".
|
|
17
|
+
* - Returns { path, hash, detectedAt } mirroring `ArtifactDetection`.
|
|
18
|
+
*
|
|
19
|
+
* Not goals:
|
|
20
|
+
* - Recursive/native fs watching (avoided for cross-platform determinism).
|
|
21
|
+
* - Debouncing writes larger than one tick (caller reads stable mtime).
|
|
22
|
+
*
|
|
23
|
+
* Blueprint ref: 17.7 — "Captura de artefatos".
|
|
24
|
+
*/
|
|
25
|
+
import type { ArtifactDetection } from "./types.js";
|
|
26
|
+
export interface WatchOptions {
|
|
27
|
+
/** Absolute path of the artifact, or an absolute path with a `**` suffix for glob-dir. */
|
|
28
|
+
expectedPath: string;
|
|
29
|
+
/** Agent id that is expected to produce the file (for the detection record). */
|
|
30
|
+
agentId: string;
|
|
31
|
+
/** Polling interval in milliseconds (default 500). */
|
|
32
|
+
pollIntervalMs?: number;
|
|
33
|
+
/** Overall timeout in milliseconds (default 300_000 = 5 minutes). */
|
|
34
|
+
timeoutMs?: number;
|
|
35
|
+
/** Optional AbortSignal — aborts the wait when triggered. */
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
}
|
|
38
|
+
export declare class ArtifactWaitTimeoutError extends Error {
|
|
39
|
+
readonly expectedPath: string;
|
|
40
|
+
readonly elapsedMs: number;
|
|
41
|
+
constructor(expectedPath: string, elapsedMs: number);
|
|
42
|
+
}
|
|
43
|
+
export declare class ArtifactWaitAbortedError extends Error {
|
|
44
|
+
readonly expectedPath: string;
|
|
45
|
+
constructor(expectedPath: string);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Snapshot of a single path's mtime — `null` when the file does not exist.
|
|
49
|
+
* The caller compares against a later snapshot to detect change.
|
|
50
|
+
*/
|
|
51
|
+
export declare function snapshotMtime(path: string): number | null;
|
|
52
|
+
/**
|
|
53
|
+
* Snapshot a directory (non-recursive): returns a map of filename → mtime.
|
|
54
|
+
* Used to detect when a new file appears under a directory (e.g. `code/**`).
|
|
55
|
+
*/
|
|
56
|
+
export declare function snapshotDir(dir: string): Map<string, number>;
|
|
57
|
+
/**
|
|
58
|
+
* Wait for an artifact to appear or change (by mtime) at `expectedPath`.
|
|
59
|
+
*
|
|
60
|
+
* - File mode: resolves when `expectedPath` exists AND (a) didn't exist
|
|
61
|
+
* at the baseline OR (b) its mtime differs from the baseline.
|
|
62
|
+
* - Dir mode (trailing `/**`): resolves when any new file appears in the
|
|
63
|
+
* target directory OR an existing file's mtime changes.
|
|
64
|
+
*
|
|
65
|
+
* Returns the detected file path (in dir mode, the first changed/new file
|
|
66
|
+
* encountered) along with its SHA-256 hash and detection timestamp.
|
|
67
|
+
*/
|
|
68
|
+
export declare function waitForArtifact(opts: WatchOptions): Promise<ArtifactDetection>;
|
|
69
|
+
/**
|
|
70
|
+
* Resolve an artifact path relative to a project root.
|
|
71
|
+
*
|
|
72
|
+
* Exported as a helper for CLI commands that know the feature slug and
|
|
73
|
+
* the expected output pattern from `CanonicalPrompt.expectedOutput`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveArtifactPath(projectRoot: string, expectedOutput: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Determine the "watch target directory" for a given expected path.
|
|
78
|
+
* Useful for callers that want to show the user what they are waiting on.
|
|
79
|
+
*/
|
|
80
|
+
export declare function watchTargetOf(expectedPath: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* Returns the relative path of `absolute` from `root`, using forward slashes
|
|
83
|
+
* so messages look uniform across platforms.
|
|
84
|
+
*/
|
|
85
|
+
export declare function relPath(root: string, absolute: string): string;
|
|
86
|
+
//# sourceMappingURL=artifact-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-watcher.d.ts","sourceRoot":"","sources":["../../src/agents/artifact-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,0FAA0F;IAC1F,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,YAAY,EAAE,MAAM;aACpB,SAAS,EAAE,MAAM;gBADjB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM;CAOpC;AAED,qBAAa,wBAAyB,SAAQ,KAAK;aACrB,YAAY,EAAE,MAAM;gBAApB,YAAY,EAAE,MAAM;CAIjD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqB5D;AAsBD;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,iBAAiB,CAAC,CAoF5B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,GACrB,MAAM,CAIR;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifact Watcher — polling-based file detection.
|
|
3
|
+
*
|
|
4
|
+
* Watches an expected artifact path (e.g. `specs/<feature>/plan.md`) and
|
|
5
|
+
* resolves when the agent has produced/updated the file. Used by the
|
|
6
|
+
* `--wait-artifact` flag in phase commands to allow the CLI to block
|
|
7
|
+
* until an external agent (Claude Code, Cursor, Antigravity) finishes
|
|
8
|
+
* producing the canonical output.
|
|
9
|
+
*
|
|
10
|
+
* Design choices:
|
|
11
|
+
* - Polls with `fs.stat` at a configurable interval (default 500ms).
|
|
12
|
+
* - Watches for either (a) new file creation after the baseline snapshot,
|
|
13
|
+
* or (b) mtime change on an existing file.
|
|
14
|
+
* - Supports glob patterns (`specs/<f>/code/**`) via minimal base-dir
|
|
15
|
+
* directory scan — for our use case we only need to detect "something
|
|
16
|
+
* new appeared under this directory".
|
|
17
|
+
* - Returns { path, hash, detectedAt } mirroring `ArtifactDetection`.
|
|
18
|
+
*
|
|
19
|
+
* Not goals:
|
|
20
|
+
* - Recursive/native fs watching (avoided for cross-platform determinism).
|
|
21
|
+
* - Debouncing writes larger than one tick (caller reads stable mtime).
|
|
22
|
+
*
|
|
23
|
+
* Blueprint ref: 17.7 — "Captura de artefatos".
|
|
24
|
+
*/
|
|
25
|
+
import { readdirSync, statSync, existsSync } from "node:fs";
|
|
26
|
+
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
27
|
+
import { hashFile } from "../audit/hash.js";
|
|
28
|
+
export class ArtifactWaitTimeoutError extends Error {
|
|
29
|
+
expectedPath;
|
|
30
|
+
elapsedMs;
|
|
31
|
+
constructor(expectedPath, elapsedMs) {
|
|
32
|
+
super(`Timed out after ${elapsedMs}ms waiting for artifact: ${expectedPath}`);
|
|
33
|
+
this.expectedPath = expectedPath;
|
|
34
|
+
this.elapsedMs = elapsedMs;
|
|
35
|
+
this.name = "ArtifactWaitTimeoutError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class ArtifactWaitAbortedError extends Error {
|
|
39
|
+
expectedPath;
|
|
40
|
+
constructor(expectedPath) {
|
|
41
|
+
super(`Aborted while waiting for artifact: ${expectedPath}`);
|
|
42
|
+
this.expectedPath = expectedPath;
|
|
43
|
+
this.name = "ArtifactWaitAbortedError";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Snapshot of a single path's mtime — `null` when the file does not exist.
|
|
48
|
+
* The caller compares against a later snapshot to detect change.
|
|
49
|
+
*/
|
|
50
|
+
export function snapshotMtime(path) {
|
|
51
|
+
try {
|
|
52
|
+
return statSync(path).mtimeMs;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Snapshot a directory (non-recursive): returns a map of filename → mtime.
|
|
60
|
+
* Used to detect when a new file appears under a directory (e.g. `code/**`).
|
|
61
|
+
*/
|
|
62
|
+
export function snapshotDir(dir) {
|
|
63
|
+
const out = new Map();
|
|
64
|
+
if (!existsSync(dir))
|
|
65
|
+
return out;
|
|
66
|
+
let entries;
|
|
67
|
+
try {
|
|
68
|
+
entries = readdirSync(dir);
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
73
|
+
for (const name of entries) {
|
|
74
|
+
const full = join(dir, name);
|
|
75
|
+
try {
|
|
76
|
+
const st = statSync(full);
|
|
77
|
+
if (st.isFile()) {
|
|
78
|
+
out.set(name, st.mtimeMs);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// ignore
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Parse an expected path: either a concrete file (`specs/x/plan.md`) or a
|
|
89
|
+
* glob-dir pattern ending in `/**` (`specs/x/code/**`). Returns the mode
|
|
90
|
+
* and the effective directory/file path.
|
|
91
|
+
*/
|
|
92
|
+
function parseExpected(expectedPath) {
|
|
93
|
+
if (!isAbsolute(expectedPath)) {
|
|
94
|
+
throw new Error(`Artifact path must be absolute: "${expectedPath}"`);
|
|
95
|
+
}
|
|
96
|
+
if (expectedPath.endsWith("/**")) {
|
|
97
|
+
return { mode: "dir", watchTarget: expectedPath.slice(0, -3) };
|
|
98
|
+
}
|
|
99
|
+
return { mode: "file", watchTarget: expectedPath };
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Wait for an artifact to appear or change (by mtime) at `expectedPath`.
|
|
103
|
+
*
|
|
104
|
+
* - File mode: resolves when `expectedPath` exists AND (a) didn't exist
|
|
105
|
+
* at the baseline OR (b) its mtime differs from the baseline.
|
|
106
|
+
* - Dir mode (trailing `/**`): resolves when any new file appears in the
|
|
107
|
+
* target directory OR an existing file's mtime changes.
|
|
108
|
+
*
|
|
109
|
+
* Returns the detected file path (in dir mode, the first changed/new file
|
|
110
|
+
* encountered) along with its SHA-256 hash and detection timestamp.
|
|
111
|
+
*/
|
|
112
|
+
export async function waitForArtifact(opts) {
|
|
113
|
+
const pollIntervalMs = opts.pollIntervalMs ?? 500;
|
|
114
|
+
const timeoutMs = opts.timeoutMs ?? 300_000;
|
|
115
|
+
const { mode, watchTarget } = parseExpected(opts.expectedPath);
|
|
116
|
+
const baseline = mode === "file"
|
|
117
|
+
? { kind: "file", mtime: snapshotMtime(watchTarget) }
|
|
118
|
+
: { kind: "dir", entries: snapshotDir(watchTarget) };
|
|
119
|
+
const startedAt = Date.now();
|
|
120
|
+
return new Promise((resolve, reject) => {
|
|
121
|
+
let stopped = false;
|
|
122
|
+
let timer = null;
|
|
123
|
+
const cleanup = () => {
|
|
124
|
+
stopped = true;
|
|
125
|
+
if (timer)
|
|
126
|
+
clearTimeout(timer);
|
|
127
|
+
if (opts.signal)
|
|
128
|
+
opts.signal.removeEventListener("abort", onAbort);
|
|
129
|
+
};
|
|
130
|
+
const onAbort = () => {
|
|
131
|
+
cleanup();
|
|
132
|
+
reject(new ArtifactWaitAbortedError(opts.expectedPath));
|
|
133
|
+
};
|
|
134
|
+
if (opts.signal) {
|
|
135
|
+
if (opts.signal.aborted) {
|
|
136
|
+
reject(new ArtifactWaitAbortedError(opts.expectedPath));
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
opts.signal.addEventListener("abort", onAbort, { once: true });
|
|
140
|
+
}
|
|
141
|
+
const poll = () => {
|
|
142
|
+
if (stopped)
|
|
143
|
+
return;
|
|
144
|
+
const elapsed = Date.now() - startedAt;
|
|
145
|
+
if (elapsed >= timeoutMs) {
|
|
146
|
+
cleanup();
|
|
147
|
+
reject(new ArtifactWaitTimeoutError(opts.expectedPath, elapsed));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
let detected = null;
|
|
151
|
+
if (baseline.kind === "file") {
|
|
152
|
+
const current = snapshotMtime(watchTarget);
|
|
153
|
+
if (current !== null && current !== baseline.mtime) {
|
|
154
|
+
detected = watchTarget;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
const current = snapshotDir(watchTarget);
|
|
159
|
+
for (const [name, mtime] of current) {
|
|
160
|
+
const prev = baseline.entries.get(name);
|
|
161
|
+
if (prev === undefined || prev !== mtime) {
|
|
162
|
+
detected = join(watchTarget, name);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (detected) {
|
|
168
|
+
cleanup();
|
|
169
|
+
try {
|
|
170
|
+
const detection = {
|
|
171
|
+
path: detected,
|
|
172
|
+
hash: hashFile(detected),
|
|
173
|
+
agentId: opts.agentId,
|
|
174
|
+
detectedAt: new Date().toISOString(),
|
|
175
|
+
};
|
|
176
|
+
resolve(detection);
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
reject(err instanceof Error ? err : new Error(String(err)));
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
timer = setTimeout(poll, pollIntervalMs);
|
|
184
|
+
};
|
|
185
|
+
timer = setTimeout(poll, pollIntervalMs);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Resolve an artifact path relative to a project root.
|
|
190
|
+
*
|
|
191
|
+
* Exported as a helper for CLI commands that know the feature slug and
|
|
192
|
+
* the expected output pattern from `CanonicalPrompt.expectedOutput`.
|
|
193
|
+
*/
|
|
194
|
+
export function resolveArtifactPath(projectRoot, expectedOutput) {
|
|
195
|
+
return isAbsolute(expectedOutput)
|
|
196
|
+
? expectedOutput
|
|
197
|
+
: join(projectRoot, expectedOutput);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Determine the "watch target directory" for a given expected path.
|
|
201
|
+
* Useful for callers that want to show the user what they are waiting on.
|
|
202
|
+
*/
|
|
203
|
+
export function watchTargetOf(expectedPath) {
|
|
204
|
+
const { mode, watchTarget } = parseExpected(expectedPath);
|
|
205
|
+
return mode === "dir" ? watchTarget : dirname(watchTarget);
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Returns the relative path of `absolute` from `root`, using forward slashes
|
|
209
|
+
* so messages look uniform across platforms.
|
|
210
|
+
*/
|
|
211
|
+
export function relPath(root, absolute) {
|
|
212
|
+
return relative(root, absolute).replace(/\\/g, "/");
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=artifact-watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-watcher.js","sourceRoot":"","sources":["../../src/agents/artifact-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAgB5C,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAE/B;IACA;IAFlB,YACkB,YAAoB,EACpB,SAAiB;QAEjC,KAAK,CACH,mBAAmB,SAAS,4BAA4B,YAAY,EAAE,CACvE,CAAC;QALc,iBAAY,GAAZ,YAAY,CAAQ;QACpB,cAAS,GAAT,SAAS,CAAQ;QAKjC,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACrB;IAA5B,YAA4B,YAAoB;QAC9C,KAAK,CAAC,uCAAuC,YAAY,EAAE,CAAC,CAAC;QADnC,iBAAY,GAAZ,YAAY,CAAQ;QAE9C,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH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