@rpamis/comet 0.3.8 → 0.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +381 -234
- package/assets/manifest.json +33 -12
- package/assets/skills/comet/SKILL.md +87 -102
- package/assets/skills/comet/reference/auto-transition.md +1 -1
- package/assets/skills/comet/reference/comet-yaml-fields.md +11 -4
- package/assets/skills/comet/reference/context-recovery.md +12 -2
- package/assets/skills/comet/reference/debug-gate.md +17 -1
- package/assets/skills/comet/reference/decision-point.md +13 -2
- package/assets/skills/comet/reference/dirty-worktree.md +59 -59
- package/assets/skills/comet/reference/intent-frame.md +74 -0
- package/assets/skills/comet/reference/scripts.md +69 -0
- package/assets/skills/comet/reference/subagent-dispatch.md +79 -23
- package/assets/skills/comet/rules/comet-phase-guard.en.md +43 -11
- package/assets/skills/comet/rules/comet-phase-guard.md +44 -11
- package/assets/skills/comet/runtime/classic/checks.yaml +6 -0
- package/assets/skills/comet/runtime/classic/guardrails.yaml +13 -0
- package/assets/skills/comet/runtime/classic/skill.yaml +122 -0
- package/assets/skills/comet/scripts/comet-archive.mjs +3 -0
- package/assets/skills/comet/scripts/comet-env.mjs +15 -0
- package/assets/skills/comet/scripts/comet-guard.mjs +3 -0
- package/assets/skills/comet/scripts/comet-handoff.mjs +3 -0
- package/assets/skills/comet/scripts/comet-hook-guard.mjs +3 -0
- package/assets/skills/comet/scripts/comet-intent.mjs +3 -0
- package/assets/skills/comet/scripts/comet-runtime.mjs +12857 -0
- package/assets/skills/comet/scripts/comet-state.mjs +3 -0
- package/assets/skills/comet/scripts/comet-yaml-validate.mjs +3 -0
- package/assets/skills/comet-any/SKILL.md +118 -0
- package/assets/skills/comet-any/reference/authored-zone-example.md +100 -0
- package/assets/skills/comet-any/reference/authoring-protocol.json +91 -0
- package/assets/skills/comet-any/reference/authoring-subagents.md +102 -0
- package/assets/skills/comet-any/reference/bundle-authoring.md +166 -0
- package/assets/skills/comet-any/reference/eval-provider.md +83 -0
- package/assets/skills/comet-any/reference/subagents/pause-points-author.md +75 -0
- package/assets/skills/comet-any/reference/subagents/reference-author.md +77 -0
- package/assets/skills/comet-any/reference/subagents/script-author.md +81 -0
- package/assets/skills/comet-any/reference/subagents/skill-core-author.md +129 -0
- package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +124 -0
- package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +100 -0
- package/assets/skills/comet-archive/SKILL.md +25 -15
- package/assets/skills/comet-build/SKILL.md +51 -40
- package/assets/skills/comet-design/SKILL.md +14 -18
- package/assets/skills/comet-hotfix/SKILL.md +33 -43
- package/assets/skills/comet-open/SKILL.md +28 -21
- package/assets/skills/comet-tweak/SKILL.md +71 -65
- package/assets/skills/comet-verify/SKILL.md +31 -35
- package/assets/skills-zh/comet/SKILL.md +88 -102
- package/assets/skills-zh/comet/reference/auto-transition.md +3 -3
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +11 -4
- package/assets/skills-zh/comet/reference/context-recovery.md +12 -2
- package/assets/skills-zh/comet/reference/debug-gate.md +19 -3
- package/assets/skills-zh/comet/reference/decision-point.md +13 -2
- package/assets/skills-zh/comet/reference/dirty-worktree.md +59 -59
- package/assets/skills-zh/comet/reference/intent-frame.md +74 -0
- package/assets/skills-zh/comet/reference/scripts.md +69 -0
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +79 -23
- package/assets/skills-zh/comet/runtime/classic/checks.yaml +6 -0
- package/assets/skills-zh/comet/runtime/classic/guardrails.yaml +13 -0
- package/assets/skills-zh/comet/runtime/classic/skill.yaml +122 -0
- package/assets/skills-zh/comet-any/SKILL.md +118 -0
- package/assets/skills-zh/comet-any/reference/authored-zone-example.md +100 -0
- package/assets/skills-zh/comet-any/reference/authoring-protocol.json +91 -0
- package/assets/skills-zh/comet-any/reference/authoring-subagents.md +107 -0
- package/assets/skills-zh/comet-any/reference/bundle-authoring.md +166 -0
- package/assets/skills-zh/comet-any/reference/eval-provider.md +66 -0
- package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +79 -0
- package/assets/skills-zh/comet-any/reference/subagents/reference-author.md +81 -0
- package/assets/skills-zh/comet-any/reference/subagents/script-author.md +84 -0
- package/assets/skills-zh/comet-any/reference/subagents/skill-core-author.md +129 -0
- package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +124 -0
- package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +98 -0
- package/assets/skills-zh/comet-archive/SKILL.md +25 -15
- package/assets/skills-zh/comet-build/SKILL.md +54 -43
- package/assets/skills-zh/comet-design/SKILL.md +16 -20
- package/assets/skills-zh/comet-hotfix/SKILL.md +37 -47
- package/assets/skills-zh/comet-open/SKILL.md +30 -23
- package/assets/skills-zh/comet-tweak/SKILL.md +70 -63
- package/assets/skills-zh/comet-verify/SKILL.md +30 -32
- package/bin/comet.js +1 -1
- package/dist/{cli → app/cli}/index.d.ts.map +1 -1
- package/dist/app/cli/index.js +430 -0
- package/dist/app/cli/index.js.map +1 -0
- package/dist/app/commands/bundle.d.ts +51 -0
- package/dist/app/commands/bundle.d.ts.map +1 -0
- package/dist/app/commands/bundle.js +387 -0
- package/dist/app/commands/bundle.js.map +1 -0
- package/dist/app/commands/creator.d.ts +14 -0
- package/dist/app/commands/creator.d.ts.map +1 -0
- package/dist/app/commands/creator.js +82 -0
- package/dist/app/commands/creator.js.map +1 -0
- package/dist/app/commands/dashboard.d.ts +16 -0
- package/dist/app/commands/dashboard.d.ts.map +1 -0
- package/dist/app/commands/dashboard.js +53 -0
- package/dist/app/commands/dashboard.js.map +1 -0
- package/dist/{commands → app/commands}/doctor.d.ts +1 -1
- package/dist/app/commands/doctor.d.ts.map +1 -0
- package/dist/{commands → app/commands}/doctor.js +114 -60
- package/dist/app/commands/doctor.js.map +1 -0
- package/dist/app/commands/eval.d.ts +17 -0
- package/dist/app/commands/eval.d.ts.map +1 -0
- package/dist/app/commands/eval.js +169 -0
- package/dist/app/commands/eval.js.map +1 -0
- package/dist/app/commands/i18n.d.ts +4 -0
- package/dist/app/commands/i18n.d.ts.map +1 -0
- package/dist/app/commands/i18n.js +174 -0
- package/dist/app/commands/i18n.js.map +1 -0
- package/dist/{commands → app/commands}/init.d.ts +6 -1
- package/dist/app/commands/init.d.ts.map +1 -0
- package/dist/app/commands/init.js +402 -0
- package/dist/app/commands/init.js.map +1 -0
- package/dist/app/commands/platform-select-prompt.d.ts +38 -0
- package/dist/app/commands/platform-select-prompt.d.ts.map +1 -0
- package/dist/app/commands/platform-select-prompt.js +141 -0
- package/dist/app/commands/platform-select-prompt.js.map +1 -0
- package/dist/app/commands/publish.d.ts +7 -0
- package/dist/app/commands/publish.d.ts.map +1 -0
- package/dist/app/commands/publish.js +14 -0
- package/dist/app/commands/publish.js.map +1 -0
- package/dist/app/commands/skill.d.ts +23 -0
- package/dist/app/commands/skill.d.ts.map +1 -0
- package/dist/app/commands/skill.js +208 -0
- package/dist/app/commands/skill.js.map +1 -0
- package/dist/app/commands/status.d.ts.map +1 -0
- package/dist/app/commands/status.js +159 -0
- package/dist/app/commands/status.js.map +1 -0
- package/dist/{commands → app/commands}/uninstall.d.ts +1 -1
- package/dist/app/commands/uninstall.d.ts.map +1 -0
- package/dist/{commands → app/commands}/uninstall.js +37 -18
- package/dist/app/commands/uninstall.js.map +1 -0
- package/dist/{commands → app/commands}/update.d.ts +6 -4
- package/dist/app/commands/update.d.ts.map +1 -0
- package/dist/{commands → app/commands}/update.js +77 -46
- package/dist/app/commands/update.js.map +1 -0
- package/dist/config/repository-layout.json +98 -0
- package/dist/domains/bundle/authoring.d.ts +82 -0
- package/dist/domains/bundle/authoring.d.ts.map +1 -0
- package/dist/domains/bundle/authoring.js +185 -0
- package/dist/domains/bundle/authoring.js.map +1 -0
- package/dist/domains/bundle/bundle-platform.d.ts +39 -0
- package/dist/domains/bundle/bundle-platform.d.ts.map +1 -0
- package/dist/domains/bundle/bundle-platform.js +287 -0
- package/dist/domains/bundle/bundle-platform.js.map +1 -0
- package/dist/domains/bundle/candidates.d.ts +29 -0
- package/dist/domains/bundle/candidates.d.ts.map +1 -0
- package/dist/domains/bundle/candidates.js +37 -0
- package/dist/domains/bundle/candidates.js.map +1 -0
- package/dist/domains/bundle/compatibility-benchmark.d.ts +12 -0
- package/dist/domains/bundle/compatibility-benchmark.d.ts.map +1 -0
- package/dist/domains/bundle/compatibility-benchmark.js +224 -0
- package/dist/domains/bundle/compatibility-benchmark.js.map +1 -0
- package/dist/domains/bundle/compiler.d.ts +5 -0
- package/dist/domains/bundle/compiler.d.ts.map +1 -0
- package/dist/domains/bundle/compiler.js +106 -0
- package/dist/domains/bundle/compiler.js.map +1 -0
- package/dist/domains/bundle/distribute.d.ts +33 -0
- package/dist/domains/bundle/distribute.d.ts.map +1 -0
- package/dist/domains/bundle/distribute.js +166 -0
- package/dist/domains/bundle/distribute.js.map +1 -0
- package/dist/domains/bundle/draft.d.ts +19 -0
- package/dist/domains/bundle/draft.d.ts.map +1 -0
- package/dist/domains/bundle/draft.js +82 -0
- package/dist/domains/bundle/draft.js.map +1 -0
- package/dist/domains/bundle/eval.d.ts +36 -0
- package/dist/domains/bundle/eval.d.ts.map +1 -0
- package/dist/domains/bundle/eval.js +501 -0
- package/dist/domains/bundle/eval.js.map +1 -0
- package/dist/domains/bundle/factory-compose.d.ts +12 -0
- package/dist/domains/bundle/factory-compose.d.ts.map +1 -0
- package/dist/domains/bundle/factory-compose.js +309 -0
- package/dist/domains/bundle/factory-compose.js.map +1 -0
- package/dist/domains/bundle/factory-guide.d.ts +37 -0
- package/dist/domains/bundle/factory-guide.d.ts.map +1 -0
- package/dist/domains/bundle/factory-guide.js +96 -0
- package/dist/domains/bundle/factory-guide.js.map +1 -0
- package/dist/domains/bundle/factory-plan.d.ts +48 -0
- package/dist/domains/bundle/factory-plan.d.ts.map +1 -0
- package/dist/domains/bundle/factory-plan.js +172 -0
- package/dist/domains/bundle/factory-plan.js.map +1 -0
- package/dist/domains/bundle/factory-proposal.d.ts +31 -0
- package/dist/domains/bundle/factory-proposal.d.ts.map +1 -0
- package/dist/domains/bundle/factory-proposal.js +225 -0
- package/dist/domains/bundle/factory-proposal.js.map +1 -0
- package/dist/domains/bundle/factory-resolve.d.ts +11 -0
- package/dist/domains/bundle/factory-resolve.d.ts.map +1 -0
- package/dist/domains/bundle/factory-resolve.js +121 -0
- package/dist/domains/bundle/factory-resolve.js.map +1 -0
- package/dist/domains/bundle/factory.d.ts +17 -0
- package/dist/domains/bundle/factory.d.ts.map +1 -0
- package/dist/domains/bundle/factory.js +511 -0
- package/dist/domains/bundle/factory.js.map +1 -0
- package/dist/domains/bundle/hash.d.ts +3 -0
- package/dist/domains/bundle/hash.d.ts.map +1 -0
- package/dist/domains/bundle/hash.js +72 -0
- package/dist/domains/bundle/hash.js.map +1 -0
- package/dist/domains/bundle/load.d.ts +4 -0
- package/dist/domains/bundle/load.d.ts.map +1 -0
- package/dist/domains/bundle/load.js +355 -0
- package/dist/domains/bundle/load.js.map +1 -0
- package/dist/domains/bundle/next-action.d.ts +37 -0
- package/dist/domains/bundle/next-action.d.ts.map +1 -0
- package/dist/domains/bundle/next-action.js +185 -0
- package/dist/domains/bundle/next-action.js.map +1 -0
- package/dist/domains/bundle/platform.d.ts +21 -0
- package/dist/domains/bundle/platform.d.ts.map +1 -0
- package/dist/domains/bundle/platform.js +170 -0
- package/dist/domains/bundle/platform.js.map +1 -0
- package/dist/domains/bundle/preferences.d.ts +11 -0
- package/dist/domains/bundle/preferences.d.ts.map +1 -0
- package/dist/domains/bundle/preferences.js +17 -0
- package/dist/domains/bundle/preferences.js.map +1 -0
- package/dist/domains/bundle/publish.d.ts +14 -0
- package/dist/domains/bundle/publish.d.ts.map +1 -0
- package/dist/domains/bundle/publish.js +159 -0
- package/dist/domains/bundle/publish.js.map +1 -0
- package/dist/domains/bundle/readiness-user-summary.d.ts +25 -0
- package/dist/domains/bundle/readiness-user-summary.d.ts.map +1 -0
- package/dist/domains/bundle/readiness-user-summary.js +186 -0
- package/dist/domains/bundle/readiness-user-summary.js.map +1 -0
- package/dist/domains/bundle/review-summary.d.ts +36 -0
- package/dist/domains/bundle/review-summary.d.ts.map +1 -0
- package/dist/domains/bundle/review-summary.js +348 -0
- package/dist/domains/bundle/review-summary.js.map +1 -0
- package/dist/domains/bundle/state.d.ts +7 -0
- package/dist/domains/bundle/state.d.ts.map +1 -0
- package/dist/domains/bundle/state.js +132 -0
- package/dist/domains/bundle/state.js.map +1 -0
- package/dist/domains/bundle/types.d.ts +347 -0
- package/dist/domains/bundle/types.d.ts.map +1 -0
- package/dist/domains/bundle/types.js.map +1 -0
- package/dist/domains/bundle/user-facing.d.ts +48 -0
- package/dist/domains/bundle/user-facing.d.ts.map +1 -0
- package/dist/domains/bundle/user-facing.js +73 -0
- package/dist/domains/bundle/user-facing.js.map +1 -0
- package/dist/domains/bundle/validate.d.ts +5 -0
- package/dist/domains/bundle/validate.d.ts.map +1 -0
- package/dist/domains/bundle/validate.js +292 -0
- package/dist/domains/bundle/validate.js.map +1 -0
- package/dist/domains/comet-classic/classic-archive-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-archive-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-archive-entry.js +4 -0
- package/dist/domains/comet-classic/classic-archive-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-archive.d.ts +3 -0
- package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-archive.js +392 -0
- package/dist/domains/comet-classic/classic-archive.js.map +1 -0
- package/dist/domains/comet-classic/classic-cli.d.ts +15 -0
- package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-cli.js +94 -0
- package/dist/domains/comet-classic/classic-cli.js.map +1 -0
- package/dist/domains/comet-classic/classic-diagnostics.d.ts +16 -0
- package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-diagnostics.js +57 -0
- package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -0
- package/dist/domains/comet-classic/classic-evidence.d.ts +10 -0
- package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-evidence.js +114 -0
- package/dist/domains/comet-classic/classic-evidence.js.map +1 -0
- package/dist/domains/comet-classic/classic-guard-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-guard-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-guard-entry.js +4 -0
- package/dist/domains/comet-classic/classic-guard-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-guard.d.ts +3 -0
- package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-guard.js +833 -0
- package/dist/domains/comet-classic/classic-guard.js.map +1 -0
- package/dist/domains/comet-classic/classic-handoff-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-handoff-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-handoff-entry.js +4 -0
- package/dist/domains/comet-classic/classic-handoff-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-handoff.d.ts +3 -0
- package/dist/domains/comet-classic/classic-handoff.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-handoff.js +478 -0
- package/dist/domains/comet-classic/classic-handoff.js.map +1 -0
- package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-hook-guard-entry.js +4 -0
- package/dist/domains/comet-classic/classic-hook-guard-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-hook-guard.d.ts +3 -0
- package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-hook-guard.js +302 -0
- package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -0
- package/dist/domains/comet-classic/classic-intent-command.d.ts +3 -0
- package/dist/domains/comet-classic/classic-intent-command.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-intent-command.js +40 -0
- package/dist/domains/comet-classic/classic-intent-command.js.map +1 -0
- package/dist/domains/comet-classic/classic-intent-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-intent-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-intent-entry.js +4 -0
- package/dist/domains/comet-classic/classic-intent-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-intent.d.ts +79 -0
- package/dist/domains/comet-classic/classic-intent.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-intent.js +307 -0
- package/dist/domains/comet-classic/classic-intent.js.map +1 -0
- package/dist/domains/comet-classic/classic-migrate.d.ts +18 -0
- package/dist/domains/comet-classic/classic-migrate.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-migrate.js +184 -0
- package/dist/domains/comet-classic/classic-migrate.js.map +1 -0
- package/dist/domains/comet-classic/classic-paths.d.ts +8 -0
- package/dist/domains/comet-classic/classic-paths.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-paths.js +61 -0
- package/dist/domains/comet-classic/classic-paths.js.map +1 -0
- package/dist/domains/comet-classic/classic-resolver.d.ts +10 -0
- package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resolver.js +89 -0
- package/dist/domains/comet-classic/classic-resolver.js.map +1 -0
- package/dist/domains/comet-classic/classic-runtime-evals.d.ts +9 -0
- package/dist/domains/comet-classic/classic-runtime-evals.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-runtime-evals.js +45 -0
- package/dist/domains/comet-classic/classic-runtime-evals.js.map +1 -0
- package/dist/domains/comet-classic/classic-runtime-run.d.ts +7 -0
- package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-runtime-run.js +105 -0
- package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -0
- package/dist/domains/comet-classic/classic-script-entry.d.ts +3 -0
- package/dist/domains/comet-classic/classic-script-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-script-entry.js +31 -0
- package/dist/domains/comet-classic/classic-script-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-state-command.d.ts +3 -0
- package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-state-command.js +984 -0
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -0
- package/dist/domains/comet-classic/classic-state-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-state-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-state-entry.js +4 -0
- package/dist/domains/comet-classic/classic-state-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-state-events.d.ts +18 -0
- package/dist/domains/comet-classic/classic-state-events.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-state-events.js +15 -0
- package/dist/domains/comet-classic/classic-state-events.js.map +1 -0
- package/dist/domains/comet-classic/classic-state.d.ts +69 -0
- package/dist/domains/comet-classic/classic-state.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-state.js +238 -0
- package/dist/domains/comet-classic/classic-state.js.map +1 -0
- package/dist/domains/comet-classic/classic-store.d.ts +7 -0
- package/dist/domains/comet-classic/classic-store.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-store.js +127 -0
- package/dist/domains/comet-classic/classic-store.js.map +1 -0
- package/dist/domains/comet-classic/classic-transitions.d.ts +24 -0
- package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-transitions.js +124 -0
- package/dist/domains/comet-classic/classic-transitions.js.map +1 -0
- package/dist/domains/comet-classic/classic-validate-command.d.ts +3 -0
- package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-validate-command.js +154 -0
- package/dist/domains/comet-classic/classic-validate-command.js.map +1 -0
- package/dist/domains/comet-classic/classic-validate-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-validate-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-validate-entry.js +4 -0
- package/dist/domains/comet-classic/classic-validate-entry.js.map +1 -0
- package/dist/domains/comet-classic/index.d.ts +20 -0
- package/dist/domains/comet-classic/index.d.ts.map +1 -0
- package/dist/domains/comet-classic/index.js +20 -0
- package/dist/domains/comet-classic/index.js.map +1 -0
- package/dist/domains/dashboard/collector.d.ts +12 -0
- package/dist/domains/dashboard/collector.d.ts.map +1 -0
- package/dist/domains/dashboard/collector.js +475 -0
- package/dist/domains/dashboard/collector.js.map +1 -0
- package/dist/domains/dashboard/git.d.ts +8 -0
- package/dist/domains/dashboard/git.d.ts.map +1 -0
- package/dist/domains/dashboard/git.js +69 -0
- package/dist/domains/dashboard/git.js.map +1 -0
- package/dist/domains/dashboard/next-action.d.ts +17 -0
- package/dist/domains/dashboard/next-action.d.ts.map +1 -0
- package/dist/domains/dashboard/next-action.js +83 -0
- package/dist/domains/dashboard/next-action.js.map +1 -0
- package/dist/domains/dashboard/open-browser.d.ts +9 -0
- package/dist/domains/dashboard/open-browser.d.ts.map +1 -0
- package/dist/domains/dashboard/open-browser.js +40 -0
- package/dist/domains/dashboard/open-browser.js.map +1 -0
- package/dist/domains/dashboard/risk.d.ts +24 -0
- package/dist/domains/dashboard/risk.d.ts.map +1 -0
- package/dist/domains/dashboard/risk.js +97 -0
- package/dist/domains/dashboard/risk.js.map +1 -0
- package/dist/domains/dashboard/server.d.ts +21 -0
- package/dist/domains/dashboard/server.d.ts.map +1 -0
- package/dist/domains/dashboard/server.js +149 -0
- package/dist/domains/dashboard/server.js.map +1 -0
- package/dist/domains/dashboard/task-parser.d.ts +13 -0
- package/dist/domains/dashboard/task-parser.d.ts.map +1 -0
- package/dist/domains/dashboard/task-parser.js +82 -0
- package/dist/domains/dashboard/task-parser.js.map +1 -0
- package/dist/domains/dashboard/types.d.ts +122 -0
- package/dist/domains/dashboard/types.d.ts.map +1 -0
- package/dist/domains/dashboard/types.js +10 -0
- package/dist/domains/dashboard/types.js.map +1 -0
- package/dist/domains/dashboard/verify-parser.d.ts +18 -0
- package/dist/domains/dashboard/verify-parser.d.ts.map +1 -0
- package/dist/domains/dashboard/verify-parser.js +94 -0
- package/dist/domains/dashboard/verify-parser.js.map +1 -0
- package/dist/domains/dashboard/web/assets/demo-DQyfozbi.js +1 -0
- package/dist/domains/dashboard/web/assets/index-BcO3_QlT.css +1 -0
- package/dist/domains/dashboard/web/assets/index-CjU3VXVu.js +22 -0
- package/dist/domains/dashboard/web/favicon.png +0 -0
- package/dist/domains/dashboard/web/index.html +16 -0
- package/dist/domains/dashboard/yaml.d.ts +13 -0
- package/dist/domains/dashboard/yaml.d.ts.map +1 -0
- package/dist/domains/dashboard/yaml.js +61 -0
- package/dist/domains/dashboard/yaml.js.map +1 -0
- package/dist/domains/engine/evals.d.ts +4 -0
- package/dist/domains/engine/evals.d.ts.map +1 -0
- package/dist/domains/engine/evals.js +25 -0
- package/dist/domains/engine/evals.js.map +1 -0
- package/dist/domains/engine/guardrails.d.ts +10 -0
- package/dist/domains/engine/guardrails.d.ts.map +1 -0
- package/dist/domains/engine/guardrails.js +25 -0
- package/dist/domains/engine/guardrails.js.map +1 -0
- package/dist/domains/engine/loop.d.ts +15 -0
- package/dist/domains/engine/loop.d.ts.map +1 -0
- package/dist/domains/engine/loop.js +126 -0
- package/dist/domains/engine/loop.js.map +1 -0
- package/dist/domains/engine/manual-run.d.ts +30 -0
- package/dist/domains/engine/manual-run.d.ts.map +1 -0
- package/dist/domains/engine/manual-run.js +184 -0
- package/dist/domains/engine/manual-run.js.map +1 -0
- package/dist/domains/engine/resolver.d.ts +20 -0
- package/dist/domains/engine/resolver.d.ts.map +1 -0
- package/dist/domains/engine/resolver.js +36 -0
- package/dist/domains/engine/resolver.js.map +1 -0
- package/dist/domains/engine/run-store.d.ts +13 -0
- package/dist/domains/engine/run-store.d.ts.map +1 -0
- package/dist/domains/engine/run-store.js +100 -0
- package/dist/domains/engine/run-store.js.map +1 -0
- package/dist/domains/engine/runtime-types.d.ts +11 -0
- package/dist/domains/engine/runtime-types.d.ts.map +1 -0
- package/dist/domains/engine/runtime-types.js +2 -0
- package/dist/domains/engine/runtime-types.js.map +1 -0
- package/dist/domains/engine/standalone-run.d.ts +13 -0
- package/dist/domains/engine/standalone-run.d.ts.map +1 -0
- package/dist/domains/engine/standalone-run.js +27 -0
- package/dist/domains/engine/standalone-run.js.map +1 -0
- package/dist/domains/engine/state.d.ts +10 -0
- package/dist/domains/engine/state.d.ts.map +1 -0
- package/dist/domains/engine/state.js +160 -0
- package/dist/domains/engine/state.js.map +1 -0
- package/dist/domains/engine/types.d.ts +51 -0
- package/dist/domains/engine/types.d.ts.map +1 -0
- package/dist/domains/engine/types.js +2 -0
- package/dist/domains/engine/types.js.map +1 -0
- package/dist/domains/eval/index.d.ts +7 -0
- package/dist/domains/eval/index.d.ts.map +1 -0
- package/dist/domains/eval/index.js +11 -0
- package/dist/domains/eval/index.js.map +1 -0
- package/dist/domains/eval/repository-benchmarks.d.ts +6 -0
- package/dist/domains/eval/repository-benchmarks.d.ts.map +1 -0
- package/dist/domains/eval/repository-benchmarks.js +10 -0
- package/dist/domains/eval/repository-benchmarks.js.map +1 -0
- package/dist/domains/factory/artifacts.d.ts +53 -0
- package/dist/domains/factory/artifacts.d.ts.map +1 -0
- package/dist/domains/factory/artifacts.js +8 -0
- package/dist/domains/factory/artifacts.js.map +1 -0
- package/dist/domains/factory/package.d.ts +7 -0
- package/dist/domains/factory/package.d.ts.map +1 -0
- package/dist/domains/factory/package.js +1511 -0
- package/dist/domains/factory/package.js.map +1 -0
- package/dist/domains/factory/types.d.ts +127 -0
- package/dist/domains/factory/types.d.ts.map +1 -0
- package/dist/domains/factory/types.js +2 -0
- package/dist/domains/factory/types.js.map +1 -0
- package/dist/domains/integrations/codegraph.d.ts +6 -0
- package/dist/domains/integrations/codegraph.d.ts.map +1 -0
- package/dist/domains/integrations/codegraph.js +118 -0
- package/dist/domains/integrations/codegraph.js.map +1 -0
- package/dist/domains/integrations/openspec.d.ts +18 -0
- package/dist/domains/integrations/openspec.d.ts.map +1 -0
- package/dist/{core → domains/integrations}/openspec.js +114 -31
- package/dist/domains/integrations/openspec.js.map +1 -0
- package/dist/domains/integrations/superpowers.d.ts +21 -0
- package/dist/domains/integrations/superpowers.d.ts.map +1 -0
- package/dist/{core → domains/integrations}/superpowers.js +63 -14
- package/dist/domains/integrations/superpowers.js.map +1 -0
- package/dist/domains/skill/discovery.d.ts +17 -0
- package/dist/domains/skill/discovery.d.ts.map +1 -0
- package/dist/domains/skill/discovery.js +80 -0
- package/dist/domains/skill/discovery.js.map +1 -0
- package/dist/domains/skill/find.d.ts +41 -0
- package/dist/domains/skill/find.d.ts.map +1 -0
- package/dist/domains/skill/find.js +251 -0
- package/dist/domains/skill/find.js.map +1 -0
- package/dist/domains/skill/install.d.ts +11 -0
- package/dist/domains/skill/install.d.ts.map +1 -0
- package/dist/domains/skill/install.js +82 -0
- package/dist/domains/skill/install.js.map +1 -0
- package/dist/domains/skill/inventory.d.ts +19 -0
- package/dist/domains/skill/inventory.d.ts.map +1 -0
- package/dist/domains/skill/inventory.js +64 -0
- package/dist/domains/skill/inventory.js.map +1 -0
- package/dist/domains/skill/languages.d.ts +19 -0
- package/dist/domains/skill/languages.d.ts.map +1 -0
- package/dist/domains/skill/languages.js +21 -0
- package/dist/domains/skill/languages.js.map +1 -0
- package/dist/domains/skill/load.d.ts +5 -0
- package/dist/domains/skill/load.d.ts.map +1 -0
- package/dist/domains/skill/load.js +313 -0
- package/dist/domains/skill/load.js.map +1 -0
- package/dist/domains/skill/platform-install.d.ts +87 -0
- package/dist/domains/skill/platform-install.d.ts.map +1 -0
- package/dist/{core/skills.js → domains/skill/platform-install.js} +242 -42
- package/dist/domains/skill/platform-install.js.map +1 -0
- package/dist/domains/skill/preferences.d.ts +42 -0
- package/dist/domains/skill/preferences.d.ts.map +1 -0
- package/dist/domains/skill/preferences.js +118 -0
- package/dist/domains/skill/preferences.js.map +1 -0
- package/dist/domains/skill/snapshot.d.ts +8 -0
- package/dist/domains/skill/snapshot.d.ts.map +1 -0
- package/dist/domains/skill/snapshot.js +184 -0
- package/dist/domains/skill/snapshot.js.map +1 -0
- package/dist/domains/skill/types.d.ts +85 -0
- package/dist/domains/skill/types.d.ts.map +1 -0
- package/dist/domains/skill/types.js +2 -0
- package/dist/{core → domains/skill}/types.js.map +1 -1
- package/dist/{core → domains/skill}/uninstall.d.ts +2 -18
- package/dist/domains/skill/uninstall.d.ts.map +1 -0
- package/dist/{core → domains/skill}/uninstall.js +15 -66
- package/dist/domains/skill/uninstall.js.map +1 -0
- package/dist/domains/skill/validate.d.ts +3 -0
- package/dist/domains/skill/validate.d.ts.map +1 -0
- package/dist/domains/skill/validate.js +81 -0
- package/dist/domains/skill/validate.js.map +1 -0
- package/dist/domains/workflow-contract/builtins.d.ts +8 -0
- package/dist/domains/workflow-contract/builtins.d.ts.map +1 -0
- package/dist/domains/workflow-contract/builtins.js +229 -0
- package/dist/domains/workflow-contract/builtins.js.map +1 -0
- package/dist/domains/workflow-contract/hash.d.ts +3 -0
- package/dist/domains/workflow-contract/hash.d.ts.map +1 -0
- package/dist/domains/workflow-contract/hash.js +16 -0
- package/dist/domains/workflow-contract/hash.js.map +1 -0
- package/dist/domains/workflow-contract/index.d.ts +6 -0
- package/dist/domains/workflow-contract/index.d.ts.map +1 -0
- package/dist/domains/workflow-contract/index.js +5 -0
- package/dist/domains/workflow-contract/index.js.map +1 -0
- package/dist/domains/workflow-contract/normalize.d.ts +3 -0
- package/dist/domains/workflow-contract/normalize.d.ts.map +1 -0
- package/dist/domains/workflow-contract/normalize.js +146 -0
- package/dist/domains/workflow-contract/normalize.js.map +1 -0
- package/dist/domains/workflow-contract/types.d.ts +128 -0
- package/dist/domains/workflow-contract/types.d.ts.map +1 -0
- package/dist/domains/workflow-contract/types.js +2 -0
- package/dist/domains/workflow-contract/types.js.map +1 -0
- package/dist/domains/workflow-contract/validation.d.ts +3 -0
- package/dist/domains/workflow-contract/validation.d.ts.map +1 -0
- package/dist/domains/workflow-contract/validation.js +180 -0
- package/dist/domains/workflow-contract/validation.js.map +1 -0
- package/dist/platform/fs/file-system.d.ts.map +1 -0
- package/dist/platform/fs/file-system.js.map +1 -0
- package/dist/{core → platform/install}/detect.d.ts +6 -1
- package/dist/platform/install/detect.d.ts.map +1 -0
- package/dist/{core → platform/install}/detect.js +32 -14
- package/dist/platform/install/detect.js.map +1 -0
- package/dist/platform/install/platforms.d.ts.map +1 -0
- package/dist/{core → platform/install}/platforms.js +41 -0
- package/dist/platform/install/platforms.js.map +1 -0
- package/dist/platform/install/types.d.ts +3 -0
- package/dist/platform/install/types.d.ts.map +1 -0
- package/dist/platform/install/types.js +2 -0
- package/dist/platform/install/types.js.map +1 -0
- package/dist/platform/paths/repository-layout.d.ts +22 -0
- package/dist/platform/paths/repository-layout.d.ts.map +1 -0
- package/dist/platform/paths/repository-layout.js +11 -0
- package/dist/platform/paths/repository-layout.js.map +1 -0
- package/dist/platform/process/command-error.d.ts.map +1 -0
- package/dist/platform/process/command-error.js.map +1 -0
- package/dist/platform/process/shell-quote.d.ts +22 -0
- package/dist/platform/process/shell-quote.d.ts.map +1 -0
- package/dist/platform/process/shell-quote.js +34 -0
- package/dist/platform/process/shell-quote.js.map +1 -0
- package/dist/platform/version/version.d.ts.map +1 -0
- package/dist/{core → platform/version}/version.js +16 -3
- package/dist/platform/version/version.js.map +1 -0
- package/package.json +40 -14
- package/assets/skills/comet/scripts/comet-archive.sh +0 -311
- package/assets/skills/comet/scripts/comet-env.sh +0 -110
- package/assets/skills/comet/scripts/comet-guard.sh +0 -752
- package/assets/skills/comet/scripts/comet-handoff.sh +0 -390
- package/assets/skills/comet/scripts/comet-hook-guard.sh +0 -260
- package/assets/skills/comet/scripts/comet-state.sh +0 -1245
- package/assets/skills/comet/scripts/comet-yaml-validate.sh +0 -223
- package/dist/cli/index.js +0 -83
- package/dist/cli/index.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -300
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -108
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js.map +0 -1
- package/dist/core/codegraph.d.ts +0 -4
- package/dist/core/codegraph.d.ts.map +0 -1
- package/dist/core/codegraph.js +0 -63
- package/dist/core/codegraph.js.map +0 -1
- package/dist/core/command-error.d.ts.map +0 -1
- package/dist/core/command-error.js.map +0 -1
- package/dist/core/detect.d.ts.map +0 -1
- package/dist/core/detect.js.map +0 -1
- package/dist/core/openspec.d.ts +0 -11
- package/dist/core/openspec.d.ts.map +0 -1
- package/dist/core/openspec.js.map +0 -1
- package/dist/core/platforms.d.ts.map +0 -1
- package/dist/core/platforms.js.map +0 -1
- package/dist/core/skills.d.ts +0 -58
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/skills.js.map +0 -1
- package/dist/core/superpowers.d.ts +0 -13
- package/dist/core/superpowers.d.ts.map +0 -1
- package/dist/core/superpowers.js.map +0 -1
- package/dist/core/types.d.ts +0 -2
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/uninstall.d.ts.map +0 -1
- package/dist/core/uninstall.js.map +0 -1
- package/dist/core/version.d.ts.map +0 -1
- package/dist/core/version.js.map +0 -1
- package/dist/utils/file-system.d.ts.map +0 -1
- package/dist/utils/file-system.js.map +0 -1
- /package/dist/{cli → app/cli}/index.d.ts +0 -0
- /package/dist/{commands → app/commands}/status.d.ts +0 -0
- /package/dist/{core → domains/bundle}/types.js +0 -0
- /package/dist/{utils → platform/fs}/file-system.d.ts +0 -0
- /package/dist/{utils → platform/fs}/file-system.js +0 -0
- /package/dist/{core → platform/install}/platforms.d.ts +0 -0
- /package/dist/{core → platform/process}/command-error.d.ts +0 -0
- /package/dist/{core → platform/process}/command-error.js +0 -0
- /package/dist/{core → platform/version}/version.d.ts +0 -0
- /package/scripts/{postinstall.js → install/postinstall.js} +0 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { parse } from 'yaml';
|
|
4
|
+
const CAPABILITIES = [
|
|
5
|
+
'skills',
|
|
6
|
+
'rules',
|
|
7
|
+
'hooks',
|
|
8
|
+
'scripts',
|
|
9
|
+
'references',
|
|
10
|
+
'assets',
|
|
11
|
+
'agents',
|
|
12
|
+
];
|
|
13
|
+
const AGENT_PLATFORMS = ['claude'];
|
|
14
|
+
const SKILL_VISIBILITIES = ['entry', 'internal'];
|
|
15
|
+
const RULE_MODES = ['always', 'matched'];
|
|
16
|
+
const SIDE_EFFECTS = ['none', 'read', 'write', 'external'];
|
|
17
|
+
const SCRIPT_RUNTIMES = ['node', 'bash', 'python'];
|
|
18
|
+
function invalidDocument(filePath, fieldPath, message) {
|
|
19
|
+
return new Error(`${filePath}: ${fieldPath} ${message}`);
|
|
20
|
+
}
|
|
21
|
+
function assertObject(value, filePath, fieldPath = 'document') {
|
|
22
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
23
|
+
throw invalidDocument(filePath, fieldPath, 'must be an object');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function assertArray(value, filePath, fieldPath) {
|
|
27
|
+
if (!Array.isArray(value)) {
|
|
28
|
+
throw invalidDocument(filePath, fieldPath, 'must be an array');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function assertString(value, filePath, fieldPath) {
|
|
32
|
+
if (typeof value !== 'string') {
|
|
33
|
+
throw invalidDocument(filePath, fieldPath, 'must be a string');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function assertBoolean(value, filePath, fieldPath) {
|
|
37
|
+
if (typeof value !== 'boolean') {
|
|
38
|
+
throw invalidDocument(filePath, fieldPath, 'must be a boolean');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function assertOptionalBoolean(document, field, filePath, objectPath) {
|
|
42
|
+
if (field in document) {
|
|
43
|
+
assertBoolean(document[field], filePath, `${objectPath}.${field}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function assertOptionalNumber(document, field, filePath, objectPath) {
|
|
47
|
+
if (field in document &&
|
|
48
|
+
(typeof document[field] !== 'number' || !Number.isFinite(document[field]))) {
|
|
49
|
+
throw invalidDocument(filePath, `${objectPath}.${field}`, 'must be a finite number');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function assertOptionalString(document, field, filePath, objectPath) {
|
|
53
|
+
if (field in document) {
|
|
54
|
+
assertString(document[field], filePath, `${objectPath}.${field}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function assertEnum(value, values, filePath, fieldPath) {
|
|
58
|
+
if (typeof value !== 'string' || !values.includes(value)) {
|
|
59
|
+
throw invalidDocument(filePath, fieldPath, `must be one of ${values.join(', ')}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function stringArray(value, filePath, fieldPath) {
|
|
63
|
+
assertArray(value, filePath, fieldPath);
|
|
64
|
+
return value.map((entry, index) => {
|
|
65
|
+
assertString(entry, filePath, `${fieldPath}[${index}]`);
|
|
66
|
+
return entry;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function optionalArray(document, field, filePath, objectPath) {
|
|
70
|
+
if (!(field in document))
|
|
71
|
+
return [];
|
|
72
|
+
assertArray(document[field], filePath, `${objectPath}.${field}`);
|
|
73
|
+
return document[field];
|
|
74
|
+
}
|
|
75
|
+
function normalizeResourcePath(value) {
|
|
76
|
+
return value.replaceAll('\\', '/');
|
|
77
|
+
}
|
|
78
|
+
function narrowSkill(value, filePath, index) {
|
|
79
|
+
const fieldPath = `skills[${index}]`;
|
|
80
|
+
assertObject(value, filePath, fieldPath);
|
|
81
|
+
assertString(value.id, filePath, `${fieldPath}.id`);
|
|
82
|
+
assertString(value.path, filePath, `${fieldPath}.path`);
|
|
83
|
+
assertEnum(value.visibility, SKILL_VISIBILITIES, filePath, `${fieldPath}.visibility`);
|
|
84
|
+
return {
|
|
85
|
+
id: value.id,
|
|
86
|
+
path: normalizeResourcePath(value.path),
|
|
87
|
+
visibility: value.visibility,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function narrowRule(value, filePath, index) {
|
|
91
|
+
const fieldPath = `resources.rules[${index}]`;
|
|
92
|
+
assertObject(value, filePath, fieldPath);
|
|
93
|
+
assertString(value.id, filePath, `${fieldPath}.id`);
|
|
94
|
+
assertString(value.path, filePath, `${fieldPath}.path`);
|
|
95
|
+
assertEnum(value.mode, RULE_MODES, filePath, `${fieldPath}.mode`);
|
|
96
|
+
assertBoolean(value.required, filePath, `${fieldPath}.required`);
|
|
97
|
+
assertOptionalNumber(value, 'priority', filePath, fieldPath);
|
|
98
|
+
const match = 'match' in value ? stringArray(value.match, filePath, `${fieldPath}.match`) : undefined;
|
|
99
|
+
return {
|
|
100
|
+
id: value.id,
|
|
101
|
+
path: normalizeResourcePath(value.path),
|
|
102
|
+
mode: value.mode,
|
|
103
|
+
...(match ? { match } : {}),
|
|
104
|
+
...(typeof value.priority === 'number' ? { priority: value.priority } : {}),
|
|
105
|
+
required: value.required,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function narrowHook(value, filePath, index) {
|
|
109
|
+
const fieldPath = `resources.hooks[${index}]`;
|
|
110
|
+
assertObject(value, filePath, fieldPath);
|
|
111
|
+
assertString(value.id, filePath, `${fieldPath}.id`);
|
|
112
|
+
assertString(value.path, filePath, `${fieldPath}.path`);
|
|
113
|
+
return { id: value.id, path: normalizeResourcePath(value.path) };
|
|
114
|
+
}
|
|
115
|
+
function narrowScript(value, filePath, index) {
|
|
116
|
+
const fieldPath = `resources.scripts[${index}]`;
|
|
117
|
+
assertObject(value, filePath, fieldPath);
|
|
118
|
+
assertString(value.id, filePath, `${fieldPath}.id`);
|
|
119
|
+
assertString(value.path, filePath, `${fieldPath}.path`);
|
|
120
|
+
assertEnum(value.sideEffect, SIDE_EFFECTS, filePath, `${fieldPath}.sideEffect`);
|
|
121
|
+
assertEnum(value.runtime, SCRIPT_RUNTIMES, filePath, `${fieldPath}.runtime`);
|
|
122
|
+
assertOptionalBoolean(value, 'requiresConfirmation', filePath, fieldPath);
|
|
123
|
+
return {
|
|
124
|
+
id: value.id,
|
|
125
|
+
path: normalizeResourcePath(value.path),
|
|
126
|
+
sideEffect: value.sideEffect,
|
|
127
|
+
runtime: value.runtime,
|
|
128
|
+
...(typeof value.requiresConfirmation === 'boolean'
|
|
129
|
+
? { requiresConfirmation: value.requiresConfirmation }
|
|
130
|
+
: {}),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function narrowAgent(value, filePath, index) {
|
|
134
|
+
const fieldPath = `resources.agents[${index}]`;
|
|
135
|
+
assertObject(value, filePath, fieldPath);
|
|
136
|
+
assertString(value.id, filePath, `${fieldPath}.id`);
|
|
137
|
+
assertString(value.path, filePath, `${fieldPath}.path`);
|
|
138
|
+
assertEnum(value.platform, AGENT_PLATFORMS, filePath, `${fieldPath}.platform`);
|
|
139
|
+
assertBoolean(value.required, filePath, `${fieldPath}.required`);
|
|
140
|
+
return {
|
|
141
|
+
id: value.id,
|
|
142
|
+
path: normalizeResourcePath(value.path),
|
|
143
|
+
platform: value.platform,
|
|
144
|
+
required: value.required,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function narrowCapabilityArray(value, filePath, fieldPath) {
|
|
148
|
+
assertArray(value, filePath, fieldPath);
|
|
149
|
+
return value.map((entry, index) => {
|
|
150
|
+
assertEnum(entry, CAPABILITIES, filePath, `${fieldPath}[${index}]`);
|
|
151
|
+
return entry;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function narrowOverride(value, filePath, index) {
|
|
155
|
+
const fieldPath = `platforms.overrides[${index}]`;
|
|
156
|
+
assertObject(value, filePath, fieldPath);
|
|
157
|
+
assertString(value.platform, filePath, `${fieldPath}.platform`);
|
|
158
|
+
assertString(value.replaces, filePath, `${fieldPath}.replaces`);
|
|
159
|
+
assertString(value.path, filePath, `${fieldPath}.path`);
|
|
160
|
+
return {
|
|
161
|
+
platform: value.platform,
|
|
162
|
+
replaces: value.replaces,
|
|
163
|
+
path: normalizeResourcePath(value.path),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function narrowManifest(document, filePath) {
|
|
167
|
+
assertObject(document, filePath);
|
|
168
|
+
assertEnum(document.apiVersion, ['comet/v1alpha1'], filePath, 'apiVersion');
|
|
169
|
+
assertEnum(document.kind, ['SkillBundle'], filePath, 'kind');
|
|
170
|
+
assertObject(document.metadata, filePath, 'metadata');
|
|
171
|
+
assertString(document.metadata.name, filePath, 'metadata.name');
|
|
172
|
+
assertString(document.metadata.version, filePath, 'metadata.version');
|
|
173
|
+
assertString(document.metadata.description, filePath, 'metadata.description');
|
|
174
|
+
assertString(document.metadata.defaultLocale, filePath, 'metadata.defaultLocale');
|
|
175
|
+
const locales = stringArray(document.metadata.locales, filePath, 'metadata.locales');
|
|
176
|
+
assertArray(document.skills, filePath, 'skills');
|
|
177
|
+
const skills = document.skills.map((entry, index) => narrowSkill(entry, filePath, index));
|
|
178
|
+
const resourcesValue = document.resources ?? {};
|
|
179
|
+
assertObject(resourcesValue, filePath, 'resources');
|
|
180
|
+
const resources = {
|
|
181
|
+
rules: optionalArray(resourcesValue, 'rules', filePath, 'resources').map((entry, index) => narrowRule(entry, filePath, index)),
|
|
182
|
+
hooks: optionalArray(resourcesValue, 'hooks', filePath, 'resources').map((entry, index) => narrowHook(entry, filePath, index)),
|
|
183
|
+
references: optionalArray(resourcesValue, 'references', filePath, 'resources').map((entry, index) => {
|
|
184
|
+
assertString(entry, filePath, `resources.references[${index}]`);
|
|
185
|
+
return normalizeResourcePath(entry);
|
|
186
|
+
}),
|
|
187
|
+
scripts: optionalArray(resourcesValue, 'scripts', filePath, 'resources').map((entry, index) => narrowScript(entry, filePath, index)),
|
|
188
|
+
assets: optionalArray(resourcesValue, 'assets', filePath, 'resources').map((entry, index) => {
|
|
189
|
+
assertString(entry, filePath, `resources.assets[${index}]`);
|
|
190
|
+
return normalizeResourcePath(entry);
|
|
191
|
+
}),
|
|
192
|
+
agents: optionalArray(resourcesValue, 'agents', filePath, 'resources').map((entry, index) => narrowAgent(entry, filePath, index)),
|
|
193
|
+
};
|
|
194
|
+
const platformsValue = document.platforms ?? {};
|
|
195
|
+
assertObject(platformsValue, filePath, 'platforms');
|
|
196
|
+
const platforms = {
|
|
197
|
+
requires: 'requires' in platformsValue
|
|
198
|
+
? narrowCapabilityArray(platformsValue.requires, filePath, 'platforms.requires')
|
|
199
|
+
: [],
|
|
200
|
+
optional: 'optional' in platformsValue
|
|
201
|
+
? narrowCapabilityArray(platformsValue.optional, filePath, 'platforms.optional')
|
|
202
|
+
: [],
|
|
203
|
+
overrides: optionalArray(platformsValue, 'overrides', filePath, 'platforms').map((entry, index) => narrowOverride(entry, filePath, index)),
|
|
204
|
+
};
|
|
205
|
+
const engineValue = document.engine ?? { enabled: false };
|
|
206
|
+
assertObject(engineValue, filePath, 'engine');
|
|
207
|
+
assertBoolean(engineValue.enabled, filePath, 'engine.enabled');
|
|
208
|
+
assertOptionalString(engineValue, 'path', filePath, 'engine');
|
|
209
|
+
return {
|
|
210
|
+
apiVersion: document.apiVersion,
|
|
211
|
+
kind: document.kind,
|
|
212
|
+
metadata: {
|
|
213
|
+
name: document.metadata.name,
|
|
214
|
+
version: document.metadata.version,
|
|
215
|
+
description: document.metadata.description,
|
|
216
|
+
defaultLocale: document.metadata.defaultLocale,
|
|
217
|
+
locales,
|
|
218
|
+
},
|
|
219
|
+
skills,
|
|
220
|
+
resources,
|
|
221
|
+
platforms,
|
|
222
|
+
engine: {
|
|
223
|
+
enabled: engineValue.enabled,
|
|
224
|
+
...(typeof engineValue.path === 'string'
|
|
225
|
+
? { path: normalizeResourcePath(engineValue.path) }
|
|
226
|
+
: {}),
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
async function readYaml(filePath) {
|
|
231
|
+
const source = await fs.readFile(filePath, 'utf8');
|
|
232
|
+
try {
|
|
233
|
+
return parse(source);
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
237
|
+
throw invalidDocument(filePath, 'document', message);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export async function loadBundle(root) {
|
|
241
|
+
const bundleRoot = path.resolve(root);
|
|
242
|
+
const manifestPath = path.join(bundleRoot, 'bundle.yaml');
|
|
243
|
+
return {
|
|
244
|
+
root: bundleRoot,
|
|
245
|
+
manifest: narrowManifest(await readYaml(manifestPath), manifestPath),
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
async function collectDirectoryFiles(root, directory, files) {
|
|
249
|
+
const entries = await fs.readdir(directory, { withFileTypes: true });
|
|
250
|
+
entries.sort((left, right) => (left.name < right.name ? -1 : left.name > right.name ? 1 : 0));
|
|
251
|
+
for (const entry of entries) {
|
|
252
|
+
const target = path.join(directory, entry.name);
|
|
253
|
+
const stats = await fs.lstat(target);
|
|
254
|
+
const relative = normalizeResourcePath(path.relative(root, target));
|
|
255
|
+
if (stats.isSymbolicLink()) {
|
|
256
|
+
throw new Error(`${relative} is a symbolic link`);
|
|
257
|
+
}
|
|
258
|
+
if (stats.isDirectory()) {
|
|
259
|
+
await collectDirectoryFiles(root, target, files);
|
|
260
|
+
}
|
|
261
|
+
else if (stats.isFile()) {
|
|
262
|
+
files.set(relative, target);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function declaredLocalizedPaths(bundle) {
|
|
267
|
+
return new Set([
|
|
268
|
+
...bundle.manifest.resources.rules.map((item) => item.path),
|
|
269
|
+
...bundle.manifest.resources.hooks.map((item) => item.path),
|
|
270
|
+
...bundle.manifest.resources.references,
|
|
271
|
+
...bundle.manifest.resources.agents.map((item) => item.path),
|
|
272
|
+
...bundle.manifest.platforms.overrides.map((item) => item.path),
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
function sharedResourcePaths(bundle) {
|
|
276
|
+
return new Set([
|
|
277
|
+
...bundle.manifest.resources.scripts.map((item) => item.path),
|
|
278
|
+
...bundle.manifest.resources.assets,
|
|
279
|
+
]);
|
|
280
|
+
}
|
|
281
|
+
function insideDeclaredSkill(bundle, logicalPath) {
|
|
282
|
+
return bundle.manifest.skills.some((skill) => {
|
|
283
|
+
const prefix = `${skill.path.replace(/\/+$/, '')}/`;
|
|
284
|
+
return logicalPath.startsWith(prefix);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
async function addDeclaredFile(bundle, logicalPath, files) {
|
|
288
|
+
const source = path.resolve(bundle.root, logicalPath);
|
|
289
|
+
const stats = await fs.lstat(source);
|
|
290
|
+
if (stats.isSymbolicLink())
|
|
291
|
+
throw new Error(`${logicalPath} is a symbolic link`);
|
|
292
|
+
if (!stats.isFile())
|
|
293
|
+
throw new Error(`${logicalPath} must reference a file`);
|
|
294
|
+
files.set(logicalPath, source);
|
|
295
|
+
}
|
|
296
|
+
async function collectBaselineFiles(bundle) {
|
|
297
|
+
const files = new Map();
|
|
298
|
+
for (const skill of bundle.manifest.skills) {
|
|
299
|
+
await collectDirectoryFiles(bundle.root, path.resolve(bundle.root, skill.path), files);
|
|
300
|
+
}
|
|
301
|
+
const directFiles = [
|
|
302
|
+
...bundle.manifest.resources.rules.map((item) => item.path),
|
|
303
|
+
...bundle.manifest.resources.hooks.map((item) => item.path),
|
|
304
|
+
...bundle.manifest.resources.references,
|
|
305
|
+
...bundle.manifest.resources.scripts.map((item) => item.path),
|
|
306
|
+
...bundle.manifest.resources.assets,
|
|
307
|
+
...bundle.manifest.resources.agents.map((item) => item.path),
|
|
308
|
+
...bundle.manifest.platforms.overrides.map((item) => item.path),
|
|
309
|
+
];
|
|
310
|
+
for (const logicalPath of directFiles) {
|
|
311
|
+
await addDeclaredFile(bundle, logicalPath, files);
|
|
312
|
+
}
|
|
313
|
+
if (bundle.manifest.engine.enabled) {
|
|
314
|
+
await collectDirectoryFiles(bundle.root, path.resolve(bundle.root, bundle.manifest.engine.path ?? 'engine'), files);
|
|
315
|
+
}
|
|
316
|
+
return files;
|
|
317
|
+
}
|
|
318
|
+
async function applyLocaleOverlay(bundle, locale, files) {
|
|
319
|
+
const localeRoot = path.join(bundle.root, 'locales', locale);
|
|
320
|
+
try {
|
|
321
|
+
const stats = await fs.lstat(localeRoot);
|
|
322
|
+
if (stats.isSymbolicLink())
|
|
323
|
+
throw new Error(`locales/${locale} is a symbolic link`);
|
|
324
|
+
if (!stats.isDirectory())
|
|
325
|
+
throw new Error(`locales/${locale} must be a directory`);
|
|
326
|
+
}
|
|
327
|
+
catch (error) {
|
|
328
|
+
if (error.code === 'ENOENT')
|
|
329
|
+
return;
|
|
330
|
+
throw error;
|
|
331
|
+
}
|
|
332
|
+
const overlays = new Map();
|
|
333
|
+
await collectDirectoryFiles(localeRoot, localeRoot, overlays);
|
|
334
|
+
const localizedPaths = declaredLocalizedPaths(bundle);
|
|
335
|
+
const sharedPaths = sharedResourcePaths(bundle);
|
|
336
|
+
for (const [logicalPath, source] of overlays) {
|
|
337
|
+
if (sharedPaths.has(logicalPath)) {
|
|
338
|
+
throw new Error(`Locale overlay cannot replace shared resource: ${logicalPath}`);
|
|
339
|
+
}
|
|
340
|
+
if (!localizedPaths.has(logicalPath) && !insideDeclaredSkill(bundle, logicalPath)) {
|
|
341
|
+
throw new Error(`Locale overlay is outside the Bundle resource graph: ${logicalPath}`);
|
|
342
|
+
}
|
|
343
|
+
files.set(logicalPath, source);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
export async function resolveBundleLocale(bundle, requested) {
|
|
347
|
+
const locale = requested ?? bundle.manifest.metadata.defaultLocale;
|
|
348
|
+
if (!bundle.manifest.metadata.locales.includes(locale)) {
|
|
349
|
+
throw new Error(`Unsupported Bundle locale: ${locale}`);
|
|
350
|
+
}
|
|
351
|
+
const files = await collectBaselineFiles(bundle);
|
|
352
|
+
await applyLocaleOverlay(bundle, locale, files);
|
|
353
|
+
return { bundle, locale, files };
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=load.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../../domains/bundle/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAgB7B,MAAM,YAAY,GAAG;IACnB,QAAQ;IACR,OAAO;IACP,OAAO;IACP,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,QAAQ;CACA,CAAC;AACX,MAAM,eAAe,GAAG,CAAC,QAAQ,CAAU,CAAC;AAC5C,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAC;AAC1D,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC;AAClD,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AACpE,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAE5D,SAAS,eAAe,CAAC,QAAgB,EAAE,SAAiB,EAAE,OAAe;IAC3E,OAAO,IAAI,KAAK,CAAC,GAAG,QAAQ,KAAK,SAAS,IAAI,OAAO,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,YAAY,CACnB,KAAc,EACd,QAAgB,EAChB,SAAS,GAAG,UAAU;IAEtB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK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,EAAE,CAAC,CAAC;IAC1D,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BundleAuthoringState } from './types.js';
|
|
2
|
+
export type BundleNextActionKind = 'resolve-candidates' | 'fix-composition' | 'confirm-proposal' | 'generate-factory-package' | 'choose-eval-level' | 'request-review' | 'publish' | 'ask-distribution' | 'done';
|
|
3
|
+
export type BundleNextActionCategory = 'factory' | 'eval' | 'review' | 'publish' | 'distribute' | 'complete';
|
|
4
|
+
export interface BundleNextAction {
|
|
5
|
+
action: BundleNextActionKind;
|
|
6
|
+
category: BundleNextActionCategory;
|
|
7
|
+
userLabel: string;
|
|
8
|
+
reason: string;
|
|
9
|
+
backendCommand: string;
|
|
10
|
+
userCommand: string;
|
|
11
|
+
requiresUserConfirmation: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface BundleResumeSummary {
|
|
14
|
+
schemaVersion: 1;
|
|
15
|
+
name: string;
|
|
16
|
+
goal: string | null;
|
|
17
|
+
status: BundleAuthoringState['status'];
|
|
18
|
+
currentStep: 'needs-candidate-resolution' | 'needs-composition-fix' | 'needs-proposal-confirmation' | 'needs-generation' | 'needs-eval' | 'needs-review' | 'needs-publish' | 'needs-distribution' | 'complete';
|
|
19
|
+
completed: string[];
|
|
20
|
+
missing: string[];
|
|
21
|
+
evidencePaths: Record<string, string>;
|
|
22
|
+
preferenceDrift: {
|
|
23
|
+
changed: boolean;
|
|
24
|
+
storedHash: string | null;
|
|
25
|
+
currentHash: string | null;
|
|
26
|
+
};
|
|
27
|
+
recommendedNextStep: BundleNextAction;
|
|
28
|
+
choices: Array<{
|
|
29
|
+
id: 'continue' | 'view-details' | 'abandon';
|
|
30
|
+
label: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function determineBundleNextAction(state: BundleAuthoringState): BundleNextAction;
|
|
34
|
+
export declare function buildBundleResumeSummary(state: BundleAuthoringState, options?: {
|
|
35
|
+
currentPreferenceHash?: string | null;
|
|
36
|
+
}): BundleResumeSummary;
|
|
37
|
+
//# sourceMappingURL=next-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../domains/bundle/next-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,MAAM,oBAAoB,GAC5B,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,GAClB,0BAA0B,GAC1B,mBAAmB,GACnB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,MAAM,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,MAAM,GACN,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,UAAU,CAAC;AAEf,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,EAAE,wBAAwB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,CAAC,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACvC,WAAW,EACP,4BAA4B,GAC5B,uBAAuB,GACvB,6BAA6B,GAC7B,kBAAkB,GAClB,YAAY,GACZ,cAAc,GACd,eAAe,GACf,oBAAoB,GACpB,UAAU,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC;IACF,mBAAmB,EAAE,gBAAgB,CAAC;IACtC,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,UAAU,GAAG,cAAc,GAAG,SAAS,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChF;AAUD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,oBAAoB,GAAG,gBAAgB,CA2HvF;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,oBAAoB,EAC3B,OAAO,GAAE;IAAE,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GACtD,mBAAmB,CA+DrB"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
function factoryPackagePath(state) {
|
|
2
|
+
return state.factory?.generatedSkillPackage?.packageRoot ?? null;
|
|
3
|
+
}
|
|
4
|
+
function generatedEvalManifest(state) {
|
|
5
|
+
return state.factory?.generatedSkillPackage?.evalManifestPath ?? null;
|
|
6
|
+
}
|
|
7
|
+
export function determineBundleNextAction(state) {
|
|
8
|
+
const unresolved = state.factory?.resolvedSkills.filter((skill) => skill.status === 'missing' || skill.status === 'ambiguous') ?? [];
|
|
9
|
+
if (unresolved.length > 0) {
|
|
10
|
+
const first = unresolved[0];
|
|
11
|
+
return {
|
|
12
|
+
action: 'resolve-candidates',
|
|
13
|
+
category: 'factory',
|
|
14
|
+
userLabel: 'Resolve missing or ambiguous Skill candidates',
|
|
15
|
+
reason: `${unresolved.length} unresolved Skill Creator candidate(s) remain`,
|
|
16
|
+
backendCommand: `comet creator resolve ${state.name} --candidate ${first.query}`,
|
|
17
|
+
userCommand: `Ask /comet-any to resolve ${first.query}`,
|
|
18
|
+
requiresUserConfirmation: true,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const compositionIssues = state.factory?.composition?.issues ?? [];
|
|
22
|
+
if (compositionIssues.length > 0) {
|
|
23
|
+
const first = compositionIssues[0];
|
|
24
|
+
return {
|
|
25
|
+
action: 'fix-composition',
|
|
26
|
+
category: 'factory',
|
|
27
|
+
userLabel: 'Fix the composition plan',
|
|
28
|
+
reason: `Skill Creator composition has ${compositionIssues.length} issue(s): ${first.message}`,
|
|
29
|
+
backendCommand: `comet bundle review-summary ${state.name} --platform <reference-platform>`,
|
|
30
|
+
userCommand: 'Ask /comet-any to revise the composition proposal',
|
|
31
|
+
requiresUserConfirmation: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (state.factory && state.factory.proposalConfirmation?.confirmed !== true) {
|
|
35
|
+
const planPath = state.factory.planPath ?? '<plan.json>';
|
|
36
|
+
return {
|
|
37
|
+
action: 'confirm-proposal',
|
|
38
|
+
category: 'factory',
|
|
39
|
+
userLabel: 'Confirm the resolved composition proposal',
|
|
40
|
+
reason: 'Skill Creator candidates and composition are resolved but proposal confirmation is missing',
|
|
41
|
+
backendCommand: `comet creator init ${state.name} --file ${planPath} --confirmed-proposal`,
|
|
42
|
+
userCommand: 'Ask /comet-any to show and confirm the resolved composition proposal',
|
|
43
|
+
requiresUserConfirmation: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (state.factory && !state.factory.generatedSkillPackage) {
|
|
47
|
+
return {
|
|
48
|
+
action: 'generate-factory-package',
|
|
49
|
+
category: 'factory',
|
|
50
|
+
userLabel: 'Generate the Comet-native Skill package',
|
|
51
|
+
reason: 'Skill Creator metadata exists but no generated Skill package is recorded yet',
|
|
52
|
+
backendCommand: `comet creator generate ${state.name}`,
|
|
53
|
+
userCommand: 'Ask /comet-any to continue generation',
|
|
54
|
+
requiresUserConfirmation: false,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (!state.eval || state.eval.hash !== state.currentHash || !state.eval.passed) {
|
|
58
|
+
const evalManifest = generatedEvalManifest(state);
|
|
59
|
+
return {
|
|
60
|
+
action: 'choose-eval-level',
|
|
61
|
+
category: 'eval',
|
|
62
|
+
userLabel: 'Run repository eval for the generated Skill',
|
|
63
|
+
reason: 'Current draft hash is missing passing eval evidence',
|
|
64
|
+
backendCommand: `comet bundle eval-plan ${state.name} --level quick`,
|
|
65
|
+
userCommand: evalManifest !== null
|
|
66
|
+
? `comet eval ${evalManifest} --quick --html`
|
|
67
|
+
: 'comet eval <generated-skill> --quick --html',
|
|
68
|
+
requiresUserConfirmation: true,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (!state.review ||
|
|
72
|
+
state.review.hash !== state.currentHash ||
|
|
73
|
+
state.review.decision !== 'approved') {
|
|
74
|
+
return {
|
|
75
|
+
action: 'request-review',
|
|
76
|
+
category: 'review',
|
|
77
|
+
userLabel: 'Review readiness before approval',
|
|
78
|
+
reason: 'Current draft hash is missing review approval',
|
|
79
|
+
backendCommand: `comet bundle review-summary ${state.name} --platform <reference-platform>`,
|
|
80
|
+
userCommand: `comet publish review ${state.name} --platform <reference-platform>`,
|
|
81
|
+
requiresUserConfirmation: true,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (state.status === 'review-approved' && !state.ready) {
|
|
85
|
+
return {
|
|
86
|
+
action: 'publish',
|
|
87
|
+
category: 'publish',
|
|
88
|
+
userLabel: 'Publish the approved candidate',
|
|
89
|
+
reason: 'Eval and review are present; the draft is ready to publish',
|
|
90
|
+
backendCommand: `comet bundle publish ${state.name} --platform <reference-platform>`,
|
|
91
|
+
userCommand: `comet publish run ${state.name} --platform <reference-platform>`,
|
|
92
|
+
requiresUserConfirmation: true,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (state.ready) {
|
|
96
|
+
return {
|
|
97
|
+
action: 'ask-distribution',
|
|
98
|
+
category: 'distribute',
|
|
99
|
+
userLabel: 'Preview distribution before installing into Agent platforms',
|
|
100
|
+
reason: 'Ready Bundle exists; the next step is distribution after user confirmation',
|
|
101
|
+
backendCommand: `comet bundle distribute ${state.name} --platform <platform> --scope project --preview`,
|
|
102
|
+
userCommand: `comet publish distribute ${state.name} --platform <platform> --scope project --preview`,
|
|
103
|
+
requiresUserConfirmation: true,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
action: 'done',
|
|
108
|
+
category: 'complete',
|
|
109
|
+
userLabel: 'No further action required',
|
|
110
|
+
reason: 'No further automatic Bundle action is required',
|
|
111
|
+
backendCommand: 'none',
|
|
112
|
+
userCommand: 'none',
|
|
113
|
+
requiresUserConfirmation: false,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export function buildBundleResumeSummary(state, options = {}) {
|
|
117
|
+
const nextAction = determineBundleNextAction(state);
|
|
118
|
+
const currentStepByAction = {
|
|
119
|
+
'resolve-candidates': 'needs-candidate-resolution',
|
|
120
|
+
'fix-composition': 'needs-composition-fix',
|
|
121
|
+
'confirm-proposal': 'needs-proposal-confirmation',
|
|
122
|
+
'generate-factory-package': 'needs-generation',
|
|
123
|
+
'choose-eval-level': 'needs-eval',
|
|
124
|
+
'request-review': 'needs-review',
|
|
125
|
+
publish: 'needs-publish',
|
|
126
|
+
'ask-distribution': 'needs-distribution',
|
|
127
|
+
done: 'complete',
|
|
128
|
+
};
|
|
129
|
+
const completed = [];
|
|
130
|
+
const missing = [];
|
|
131
|
+
if (state.factory)
|
|
132
|
+
completed.push('Skill Creator metadata initialized');
|
|
133
|
+
else
|
|
134
|
+
missing.push('Skill Creator metadata');
|
|
135
|
+
if (state.factory?.generatedSkillPackage)
|
|
136
|
+
completed.push('Generated Skill package recorded');
|
|
137
|
+
else if (state.factory)
|
|
138
|
+
missing.push('Generated Skill package');
|
|
139
|
+
if (state.eval?.hash === state.currentHash && state.eval.passed)
|
|
140
|
+
completed.push('Passing eval evidence');
|
|
141
|
+
else
|
|
142
|
+
missing.push('Passing eval evidence for the current draft');
|
|
143
|
+
if (state.review?.hash === state.currentHash && state.review.decision === 'approved') {
|
|
144
|
+
completed.push('Review approval for the current draft');
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
missing.push('Review approval for the current draft');
|
|
148
|
+
}
|
|
149
|
+
if (state.ready?.hash === state.currentHash)
|
|
150
|
+
completed.push('Published Bundle');
|
|
151
|
+
else if (state.status === 'review-approved')
|
|
152
|
+
missing.push('Published Bundle');
|
|
153
|
+
const storedHash = state.factory?.preferenceHash ?? null;
|
|
154
|
+
const currentHash = options.currentPreferenceHash ?? null;
|
|
155
|
+
const generatedSkill = factoryPackagePath(state);
|
|
156
|
+
const evalManifest = generatedEvalManifest(state);
|
|
157
|
+
return {
|
|
158
|
+
schemaVersion: 1,
|
|
159
|
+
name: state.name,
|
|
160
|
+
goal: state.factory?.goal ?? null,
|
|
161
|
+
status: state.status,
|
|
162
|
+
currentStep: currentStepByAction[nextAction.action],
|
|
163
|
+
completed,
|
|
164
|
+
missing,
|
|
165
|
+
evidencePaths: {
|
|
166
|
+
draft: state.draftPath,
|
|
167
|
+
...(generatedSkill ? { generatedSkill } : {}),
|
|
168
|
+
...(evalManifest ? { evalManifest } : {}),
|
|
169
|
+
...(state.eval?.resultPath ? { evalResult: state.eval.resultPath } : {}),
|
|
170
|
+
...(state.ready?.path ? { publishedBundle: state.ready.path } : {}),
|
|
171
|
+
},
|
|
172
|
+
preferenceDrift: {
|
|
173
|
+
changed: storedHash !== null && currentHash !== storedHash,
|
|
174
|
+
storedHash,
|
|
175
|
+
currentHash,
|
|
176
|
+
},
|
|
177
|
+
recommendedNextStep: nextAction,
|
|
178
|
+
choices: [
|
|
179
|
+
{ id: 'continue', label: 'Continue' },
|
|
180
|
+
{ id: 'view-details', label: 'View details' },
|
|
181
|
+
{ id: 'abandon', label: 'Abandon this flow' },
|
|
182
|
+
],
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=next-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-action.js","sourceRoot":"","sources":["../../../domains/bundle/next-action.ts"],"names":[],"mappings":"AA0DA,SAAS,kBAAkB,CAAC,KAA2B;IACrD,OAAO,KAAK,CAAC,OAAO,EAAE,qBAAqB,EAAE,WAAW,IAAI,IAAI,CAAC;AACnE,CAAC;AAED,SAAS,qBAAqB,CAAC,KAA2B;IACxD,OAAO,KAAK,CAAC,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,IAAI,IAAI,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAA2B;IACnE,MAAM,UAAU,GACd,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,CACtE,IAAI,EAAE,CAAC;IACV,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC5B,OAAO;YACL,MAAM,EAAE,oBAAoB;YAC5B,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,+CAA+C;YAC1D,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,+CAA+C;YAC3E,cAAc,EAAE,yBAAyB,KAAK,CAAC,IAAI,gBAAgB,KAAK,CAAC,KAAK,EAAE;YAChF,WAAW,EAAE,6BAA6B,KAAK,CAAC,KAAK,EAAE;YACvD,wBAAwB,EAAE,IAAI;SAC/B,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,EAAE,CAAC;IACnE,IAAI,iBAAiB,CAAC,MAAM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AAC,MAAM,CAAC;QACnD,SAAS;QACT,OAAO;QACP,aAAa,EAAE;YACb,KAAK,EAAE,KAAK,CAAC,SAAS;YACtB,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxE,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpE;QACD,eAAe,EAAE;YACf,OAAO,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW,KAAK,UAAU;YAC1D,UAAU;YACV,WAAW;SACZ;QACD,mBAAmB,EAAE,UAAU;QAC/B,OAAO,EAAE;YACP,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;YACrC,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;YAC7C,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB,EAAE;SAC9C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BundlePlatformTarget } from './bundle-platform.js';
|
|
2
|
+
import type { BundleCapability, BundleCompilerIr, ExecutableDisclosure, PlatformInstallFile } from './types.js';
|
|
3
|
+
export interface PlatformCompileReport {
|
|
4
|
+
platform: string;
|
|
5
|
+
scope: 'project' | 'global';
|
|
6
|
+
files: PlatformInstallFile[];
|
|
7
|
+
entrySkills: string[];
|
|
8
|
+
unsupported: Array<{
|
|
9
|
+
capability: BundleCapability;
|
|
10
|
+
required: boolean;
|
|
11
|
+
reason: string;
|
|
12
|
+
}>;
|
|
13
|
+
executableDisclosures: ExecutableDisclosure[];
|
|
14
|
+
}
|
|
15
|
+
export declare function compileBundleForPlatform(ir: BundleCompilerIr, target: BundlePlatformTarget, options: {
|
|
16
|
+
projectRoot: string;
|
|
17
|
+
scope: 'project' | 'global';
|
|
18
|
+
locale: string;
|
|
19
|
+
}): Promise<PlatformCompileReport>;
|
|
20
|
+
export type { BundlePlatformTarget };
|
|
21
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../domains/bundle/platform.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,KAAK,CAAC;QACjB,UAAU,EAAE,gBAAgB,CAAC;QAC7B,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;CAC/C;AAkGD,wBAAsB,wBAAwB,CAC5C,EAAE,EAAE,gBAAgB,EACpB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5E,OAAO,CAAC,qBAAqB,CAAC,CAwIhC;AAED,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
|