@specforge/canary-cli 0.1.11 → 0.1.13
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/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +16 -15
- package/dist/tools/index.js.map +1 -1
- package/node_modules/@specforge/session-types/CHANGELOG.md +56 -0
- package/node_modules/@specforge/session-types/README.md +18 -0
- package/node_modules/@specforge/session-types/dist/index.d.ts +47 -0
- package/node_modules/@specforge/session-types/dist/index.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/index.js +47 -0
- package/node_modules/@specforge/session-types/dist/index.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.d.ts +46 -0
- package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.js +41 -0
- package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/discovery.d.ts +9 -0
- package/node_modules/@specforge/session-types/dist/runtime/discovery.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/discovery.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/discovery.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/enums.d.ts +51 -0
- package/node_modules/@specforge/session-types/dist/runtime/enums.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/enums.js +162 -0
- package/node_modules/@specforge/session-types/dist/runtime/enums.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-config.d.ts +177 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-config.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-config.js +90 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-config.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.d.ts +8 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.d.ts +433 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.js +128 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session.d.ts +8 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/implementation-session.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.d.ts +301 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts +128 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.js +30 -0
- package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-config.d.ts +82 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-config.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-config.js +61 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-config.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.d.ts +34 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.js +14 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-operations.d.ts +6 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-operations.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-operations.js +32 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-operations.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.d.ts +34 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.js +22 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.d.ts +73 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.js +56 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.d.ts +239 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.js +88 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session.d.ts +574 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session.js +40 -0
- package/node_modules/@specforge/session-types/dist/runtime/planning-session.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/process-guidance.d.ts +221 -0
- package/node_modules/@specforge/session-types/dist/runtime/process-guidance.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/process-guidance.js +41 -0
- package/node_modules/@specforge/session-types/dist/runtime/process-guidance.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-action.d.ts +9 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-action.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-action.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-action.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session.d.ts +4 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/work-session.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/working-context.d.ts +43 -0
- package/node_modules/@specforge/session-types/dist/runtime/working-context.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/working-context.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/working-context.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/write-plan.d.ts +146 -0
- package/node_modules/@specforge/session-types/dist/runtime/write-plan.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/runtime/write-plan.js +2 -0
- package/node_modules/@specforge/session-types/dist/runtime/write-plan.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/discovery.d.ts +76 -0
- package/node_modules/@specforge/session-types/dist/schema/discovery.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/discovery.js +42 -0
- package/node_modules/@specforge/session-types/dist/schema/discovery.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.d.ts +48 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.js +28 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-session.d.ts +37 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-session.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-session.js +24 -0
- package/node_modules/@specforge/session-types/dist/schema/implementation-session.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/index.d.ts +12 -0
- package/node_modules/@specforge/session-types/dist/schema/index.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/index.js +12 -0
- package/node_modules/@specforge/session-types/dist/schema/index.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.d.ts +74 -0
- package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.js +31 -0
- package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.d.ts +27 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.js +11 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-action.d.ts +91 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-action.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-action.js +71 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-action.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.d.ts +42 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.js +25 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.d.ts +27 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.js +11 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.d.ts +42 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.js +28 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.d.ts +72 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.js +32 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session.d.ts +174 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session.js +63 -0
- package/node_modules/@specforge/session-types/dist/schema/work-session.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/config-store-interface.d.ts +17 -0
- package/node_modules/@specforge/session-types/dist/stores/config-store-interface.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/config-store-interface.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/config-store-interface.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/discovery-store.d.ts +31 -0
- package/node_modules/@specforge/session-types/dist/stores/discovery-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/discovery-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/discovery-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.d.ts +19 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.d.ts +16 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.d.ts +28 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.d.ts +12 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.d.ts +10 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.d.ts +13 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.d.ts +10 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-store.d.ts +20 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/planning-session-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.d.ts +15 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.d.ts +29 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.d.ts +9 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.d.ts +9 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.d.ts +10 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-store.d.ts +14 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.d.ts +8 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.js.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/working-context-store.d.ts +27 -0
- package/node_modules/@specforge/session-types/dist/stores/working-context-store.d.ts.map +1 -0
- package/node_modules/@specforge/session-types/dist/stores/working-context-store.js +2 -0
- package/node_modules/@specforge/session-types/dist/stores/working-context-store.js.map +1 -0
- package/node_modules/@specforge/session-types/package.json +43 -0
- package/package.json +6 -5
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import type { PlanningPhase, PlanningSessionStatus, WorkPhase, WorkSessionStatus } from './enums.js';
|
|
2
|
+
import type { PlanningOperationName } from './planning-operations.js';
|
|
3
|
+
import type { WritePlan } from './write-plan.js';
|
|
4
|
+
export type LifecycleEvent = 'start_planning_session' | 'action_planning_session' | 'complete_planning_session';
|
|
5
|
+
/**
|
|
6
|
+
* The response shape returned by every planning lifecycle verb (SPS / APS / CPS),
|
|
7
|
+
* on BOTH success and denial branches.
|
|
8
|
+
*
|
|
9
|
+
* `sessionId`, `planningPhase`, and `planningStatus` are read from the session AFTER
|
|
10
|
+
* any state mutation the verb applied, so a single verb call returns enough state to
|
|
11
|
+
* drive the next agent-loop iteration without a follow-up read.
|
|
12
|
+
*
|
|
13
|
+
* Work + review lifecycles (M16–M25) specialise via `LifecycleResult<WorkAgentResponse>`
|
|
14
|
+
* / `LifecycleResult<ReviewAgentResponse>` rather than widening this shape.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* MB.10.5 — the exact repo-relative paths the CPS pass-1 asks the MCP-local to
|
|
18
|
+
* probe for existence. Rides on {@link PlanningAgentResponse.grepRequest}; the
|
|
19
|
+
* grep is scoped to EXACTLY these paths (no repo-wide scan).
|
|
20
|
+
*/
|
|
21
|
+
export interface GrepRequest {
|
|
22
|
+
paths: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface PlanningAgentResponse {
|
|
25
|
+
sessionId: string;
|
|
26
|
+
planningPhase: PlanningPhase;
|
|
27
|
+
planningStatus: PlanningSessionStatus;
|
|
28
|
+
/**
|
|
29
|
+
* `'success'`/`'denied'` are the terminal verb outcomes. MB.10.5 adds
|
|
30
|
+
* `'evidence_required'` — a NON-COMMITTING, CLI-internal CPS pass-1 outcome:
|
|
31
|
+
* the verb needs real-repo file evidence (see {@link grepRequest}) that only
|
|
32
|
+
* the MCP-local can observe (the Lambda has no worktree). The CLI probes those
|
|
33
|
+
* paths and re-calls CPS with `existingFiles` injected (pass-2); the agent only
|
|
34
|
+
* ever sees the pass-2 `'success'`/`'denied'`. It never reaches a non-cli caller
|
|
35
|
+
* — the mcp-handler boundary injects `existingFiles: []` for non-cli origins so
|
|
36
|
+
* those callers get the strict verdict via the same presence-discriminator.
|
|
37
|
+
*/
|
|
38
|
+
outcome: 'success' | 'denied' | 'evidence_required';
|
|
39
|
+
/**
|
|
40
|
+
* ME.15.3 — the LOCAL score of the single entity this verb touched
|
|
41
|
+
* (`update_ticket`/`update_epic` → that ticket/epic's per-entity score;
|
|
42
|
+
* `update_spec` → the spec's local score), versus its per-phase threshold →
|
|
43
|
+
* that entity's own pass/fail. `null` for verbs that don't touch a single
|
|
44
|
+
* scored entity (SPS/CPS, `get_planning_status`, denials) and for the binary
|
|
45
|
+
* structural phases (epic/ticket_decomposition, cross_validation) which have
|
|
46
|
+
* no per-entity score. Do NOT confuse with the phase average (`avgLocalScore`).
|
|
47
|
+
*/
|
|
48
|
+
localScore: number | null;
|
|
49
|
+
/**
|
|
50
|
+
* ME.15.3 — the phase AVERAGE local score across the entities the validator
|
|
51
|
+
* scored this phase (the number that used to be mislabeled `scoreLocal`).
|
|
52
|
+
* `null` for the binary phases (no per-entity score) and denials.
|
|
53
|
+
*/
|
|
54
|
+
avgLocalScore: number | null;
|
|
55
|
+
/**
|
|
56
|
+
* ME.15.3 (ex-`scoreGlobal`) — the real WEIGHTED global readiness score
|
|
57
|
+
* (ME.13.3 Bug #2 carrier). Never a copy of the local score.
|
|
58
|
+
*/
|
|
59
|
+
globalScore: number | null;
|
|
60
|
+
gatePassed: boolean | null;
|
|
61
|
+
guidance: string;
|
|
62
|
+
/**
|
|
63
|
+
* MB.10.5 — present ONLY on `outcome: 'evidence_required'`. The union of the
|
|
64
|
+
* consumed-but-uncreated paths (consume-exists) and ALL `filesToBeCreated`
|
|
65
|
+
* paths (create-fresh) the file-provenance model needs real-repo evidence for.
|
|
66
|
+
* The MCP-local probes exactly these paths and re-submits the existing subset
|
|
67
|
+
* as `existingFiles` (pass-2).
|
|
68
|
+
*/
|
|
69
|
+
grepRequest?: GrepRequest;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A machine-readable pointer to the next action the work agent should take, surfaced on
|
|
73
|
+
* `WorkAgentResponse` so a single verb call drives the next agent-loop iteration without a
|
|
74
|
+
* follow-up read. The human-readable next-step instruction is composed into `guidance`
|
|
75
|
+
* (prose/content — M18); these are the bare refs. The assay (M17) produces the rich
|
|
76
|
+
* `NextStep` (in `@specforge/assayforge`); the work lifecycle (M16) projects it down to this
|
|
77
|
+
* wire-safe ref (session-types cannot import assayforge — the dependency runs the other way).
|
|
78
|
+
*/
|
|
79
|
+
export interface WorkNextStepRef {
|
|
80
|
+
/** The work dimension the next action targets. */
|
|
81
|
+
workPhase: WorkPhase;
|
|
82
|
+
/**
|
|
83
|
+
* The plan entity the next action concerns when anchored to one — a step id,
|
|
84
|
+
* acceptance-criterion id, or file path. Omitted for aggregate / terminal steps.
|
|
85
|
+
*/
|
|
86
|
+
entityId?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The response shape returned by every work lifecycle verb (SWS / AWS / CWS), on BOTH
|
|
90
|
+
* success and denial branches — the work sibling of `PlanningAgentResponse`, specialised
|
|
91
|
+
* via `LifecycleResult<WorkAgentResponse>` (M6.5 generic; M16 implements the verbs).
|
|
92
|
+
*
|
|
93
|
+
* `sessionId`, `workPhase`, and `workStatus` are non-optional on EVERY branch (success AND
|
|
94
|
+
* denied), read from the session AFTER any state mutation the verb applied, so a single verb
|
|
95
|
+
* call returns enough state to drive the next agent-loop iteration without a follow-up read.
|
|
96
|
+
*
|
|
97
|
+
* `guidance` is composed verbatim via the agent-directed prose pipeline (never parsed
|
|
98
|
+
* downstream). The work-specific fields (`progress`, `coherence`, `gatePassed`,
|
|
99
|
+
* `nextStepRefs`) carry the assay's per-call signals; their content/prose lands in M18 — the
|
|
100
|
+
* TYPE lands here (M14.1).
|
|
101
|
+
*/
|
|
102
|
+
export interface WorkAgentResponse {
|
|
103
|
+
/** The work session id (echoed on every branch, incl. denials). */
|
|
104
|
+
sessionId: string;
|
|
105
|
+
/** Current progress stage AFTER the verb's mutation. */
|
|
106
|
+
workPhase: WorkPhase;
|
|
107
|
+
/** Post-mutation work-session lifecycle state. */
|
|
108
|
+
workStatus: WorkSessionStatus;
|
|
109
|
+
/** Self-discriminates success vs. negotiated denial (both ride the lifecycle envelope). */
|
|
110
|
+
outcome: 'success' | 'denied';
|
|
111
|
+
/** Aggregate ticket completion progress; `null` when no assay has run for the verb. */
|
|
112
|
+
progress: number | null;
|
|
113
|
+
/** Coherence score from the assay (files/tests justification); `null` when not applicable. */
|
|
114
|
+
coherence: number | null;
|
|
115
|
+
/** Gate verdict; `null` when no gate has run for the phase. */
|
|
116
|
+
gatePassed: boolean | null;
|
|
117
|
+
/** Refs to the next action(s) the agent should take; `null` on terminal / denial branches. */
|
|
118
|
+
nextStepRefs: WorkNextStepRef[] | null;
|
|
119
|
+
/** Composed agent-facing prose — read verbatim, never parsed. */
|
|
120
|
+
guidance: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Two generic axes (see M6.5 §A0.2):
|
|
124
|
+
* - `R` (response): defaults to `PlanningAgentResponse`; work/review lifecycles override.
|
|
125
|
+
* - `W` (writePlan): defaults to `unknown` so generic call sites stay agnostic.
|
|
126
|
+
* `@specforge/lifecycle` binds `W = WritePlan` (now defined here in session-types —
|
|
127
|
+
* M7.4d) via its own `LifecycleResult` subtype.
|
|
128
|
+
*/
|
|
129
|
+
export interface LifecycleResult<R = PlanningAgentResponse, W = unknown> {
|
|
130
|
+
response: R;
|
|
131
|
+
writePlan?: W;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Per-verb payloads for the planning lifecycle dispatch union. These are the
|
|
135
|
+
* wire contracts the resolver/CLI map AppSync/REST arguments into; the lifecycle
|
|
136
|
+
* verbs consume them directly. Relocated from `@specforge/lifecycle` in M7.4d so
|
|
137
|
+
* `@specforge/resolvers` can type the planning-resolver handler without importing
|
|
138
|
+
* the lifecycle package (monorepo-topology §2.1d).
|
|
139
|
+
*/
|
|
140
|
+
export interface StartPlanningPayload {
|
|
141
|
+
/**
|
|
142
|
+
* Injected by the client (CLI mcp-local / webapp), NOT derived server-side.
|
|
143
|
+
* The public `start_planning_session` tool already declares `projectId` required;
|
|
144
|
+
* SPS now consumes the injected value instead of reading it off the spec row, so
|
|
145
|
+
* the project scope is client-authoritative.
|
|
146
|
+
*/
|
|
147
|
+
projectId: string;
|
|
148
|
+
specId: string;
|
|
149
|
+
userId?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* MB.11.1 — payload for the `justify` operation carried on
|
|
153
|
+
* {@link ActionPlanningPayload.payload} when `operation === 'justify'`. Declares a
|
|
154
|
+
* field N/A. The tool-level `type: 'justify'` discriminant is mapped into
|
|
155
|
+
* `ActionPlanningPayload.operation`, so the payload the verb consumes is the
|
|
156
|
+
* type-stripped rest (`{ scope, entityId, reason }`) — the same convention every
|
|
157
|
+
* other planning op follows (e.g. `update_ticket` → `{ id, fields }`, no `type`).
|
|
158
|
+
*
|
|
159
|
+
* - `scope` — the CANONICAL `fieldDeclarations` key the checks read (the exact
|
|
160
|
+
* bare key, e.g. `dependencies`, `codeReferences`, `apiContracts`).
|
|
161
|
+
* - `entityId` — the spec/epic/ticket the field belongs to (resolved server-side;
|
|
162
|
+
* ids are unique across the spec).
|
|
163
|
+
* - `reason` — the justification (≥ `config.naReason.minLength` = 20 chars).
|
|
164
|
+
*/
|
|
165
|
+
export interface JustifyPayload {
|
|
166
|
+
scope: string;
|
|
167
|
+
entityId: string;
|
|
168
|
+
reason: string;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* MB.11.1 — payload for the `unjustify` operation (the paired remove op). Clears the
|
|
172
|
+
* `fieldDeclarations[scope]` declaration. No `reason` (a delete is unconditional; a
|
|
173
|
+
* no-op if the key is absent).
|
|
174
|
+
*/
|
|
175
|
+
export interface UnjustifyPayload {
|
|
176
|
+
scope: string;
|
|
177
|
+
entityId: string;
|
|
178
|
+
}
|
|
179
|
+
export interface ActionPlanningPayload {
|
|
180
|
+
sessionId: string;
|
|
181
|
+
operation: PlanningOperationName;
|
|
182
|
+
payload: unknown;
|
|
183
|
+
userId?: string;
|
|
184
|
+
/**
|
|
185
|
+
* M11.1 — actor discriminator. Derived SERVER-SIDE from the authenticated
|
|
186
|
+
* identity (webapp custom mutation → `'human'`; MCP/CLI → `'agent'`), never
|
|
187
|
+
* trusted from the client payload. Defaults to `'agent'` when omitted.
|
|
188
|
+
*
|
|
189
|
+
* It drives BOTH the audit row's `performedByActor` AND the actor-conditional
|
|
190
|
+
* post-APS status of an edit on an `awaiting_human_review` session:
|
|
191
|
+
* - `'human'` → the session STAYS `awaiting_human_review` (re-scores in place;
|
|
192
|
+
* the human never leaves the review window by editing).
|
|
193
|
+
* - `'agent'` (default) → the session flips to `active` exactly as before (the
|
|
194
|
+
* agent then re-requests the gate via a subsequent CPS).
|
|
195
|
+
*/
|
|
196
|
+
actor?: 'agent' | 'human';
|
|
197
|
+
}
|
|
198
|
+
export interface CompletePlanningPayload {
|
|
199
|
+
sessionId: string;
|
|
200
|
+
userId?: string;
|
|
201
|
+
/**
|
|
202
|
+
* MB.10.5 grep evidence, injected by the MCP-local CLI double-call: the subset
|
|
203
|
+
* of the pass-1 `grepRequest.paths` that actually exist in the real repository.
|
|
204
|
+
* PRESENCE (even `[]`) is the "probed" marker → the verb runs the real gate
|
|
205
|
+
* with `E = existingFiles ∪ createdPaths` (pass-2). ABSENT → pass-1: the verb
|
|
206
|
+
* returns `evidence_required` carrying `grepRequest` and commits NOTHING. The
|
|
207
|
+
* mcp-handler boundary injects `[]` for any non-cli origin so only the cli
|
|
208
|
+
* double-call ever sends it absent (only the cli knows how to probe + re-call).
|
|
209
|
+
*/
|
|
210
|
+
existingFiles?: string[];
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Payload-carrying dispatch union accepted by `Lifecycle.handle`. Discriminated
|
|
214
|
+
* by `type`. (Distinct from the string-only `LifecycleEvent` above, which just
|
|
215
|
+
* enumerates the verb names.)
|
|
216
|
+
*/
|
|
217
|
+
export type PlanningLifecycleEvent = {
|
|
218
|
+
type: 'start_planning_session';
|
|
219
|
+
payload: StartPlanningPayload;
|
|
220
|
+
} | {
|
|
221
|
+
type: 'action_planning_session';
|
|
222
|
+
payload: ActionPlanningPayload;
|
|
223
|
+
} | {
|
|
224
|
+
type: 'complete_planning_session';
|
|
225
|
+
payload: CompletePlanningPayload;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* The planning lifecycle dispatch contract. The implementation factory
|
|
229
|
+
* (`createLifecycle`) stays in `@specforge/lifecycle`; only this interface lives
|
|
230
|
+
* here so downstream Lambda factories can type against it without a lifecycle
|
|
231
|
+
* import (M7.4d).
|
|
232
|
+
*/
|
|
233
|
+
export interface Lifecycle {
|
|
234
|
+
handle(event: PlanningLifecycleEvent): Promise<LifecycleResult<PlanningAgentResponse, WritePlan>>;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The string-only enumeration of the work lifecycle verbs (the work sibling of
|
|
238
|
+
* the planning `LifecycleEvent`). All three are agent-facing and keyed by
|
|
239
|
+
* `ticketId`; the human surfaces (resolution window M21, abort kill-switch M24)
|
|
240
|
+
* are separate webapp verbs and are NOT part of this agent dispatch union.
|
|
241
|
+
*/
|
|
242
|
+
export type WorkLifecycleVerb = 'start_work_session' | 'action_work_session' | 'complete_work_session';
|
|
243
|
+
/**
|
|
244
|
+
* SWS — `start_work_session`. Starts (or attaches to) the WorkSession for a
|
|
245
|
+
* ticket, creating the parent ImplementationSession on first start for the spec.
|
|
246
|
+
* Keyed by `ticketId` (the session id is assigned by the verb). `worktreePath` /
|
|
247
|
+
* `branch` are the optional worktree provenance the MCP-local reports (M23.2) and
|
|
248
|
+
* SWS persists (M16.2) when the agent runs inside a git worktree.
|
|
249
|
+
*/
|
|
250
|
+
export interface StartWorkSessionPayload {
|
|
251
|
+
ticketId: string;
|
|
252
|
+
userId?: string;
|
|
253
|
+
worktreePath?: string;
|
|
254
|
+
branch?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Clean-git-workspace status injected by the MCP-local (M23). `false` = the
|
|
257
|
+
* agent's worktree has uncommitted changes → SWS denies (`git_dirty`,
|
|
258
|
+
* "clean your git workspace before starting"). `true` / absent = clean (no
|
|
259
|
+
* denial), so non-git callers still start. M16 consumes this as a MOCK input;
|
|
260
|
+
* M23 wires the real `git status` injection.
|
|
261
|
+
*/
|
|
262
|
+
gitClean?: boolean;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* AWS — `action_work_session`. Updates the WorkSession checklist state (step /
|
|
266
|
+
* AC / test / file progress, discovery, blocker) for the ticket's active session.
|
|
267
|
+
* The structured action payload — including the action-operation discriminator —
|
|
268
|
+
* is typed at dispatch time in M16; held as `unknown` here so generic call sites
|
|
269
|
+
* stay agnostic (mirrors the planning `ActionPlanningPayload.payload`).
|
|
270
|
+
*/
|
|
271
|
+
export interface ActionWorkSessionPayload {
|
|
272
|
+
ticketId: string;
|
|
273
|
+
payload: unknown;
|
|
274
|
+
userId?: string;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* CWS — `complete_work_session`. Finalizes the ticket's active WorkSession (and,
|
|
278
|
+
* when it is the last open WorkSession of the spec, the parent
|
|
279
|
+
* ImplementationSession + spec→done). Keyed by `ticketId`.
|
|
280
|
+
*/
|
|
281
|
+
export interface CompleteWorkSessionPayload {
|
|
282
|
+
ticketId: string;
|
|
283
|
+
userId?: string;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Payload-carrying dispatch union accepted by the work lifecycle (the work
|
|
287
|
+
* counterpart of `PlanningLifecycleEvent`). Discriminated by `type`. (Distinct
|
|
288
|
+
* from the string-only `WorkLifecycleVerb` above, which just enumerates the verb
|
|
289
|
+
* names.) The work `Lifecycle.handle` overload that consumes this lands in M16.
|
|
290
|
+
*/
|
|
291
|
+
export type WorkLifecycleEvent = {
|
|
292
|
+
type: 'start_work_session';
|
|
293
|
+
payload: StartWorkSessionPayload;
|
|
294
|
+
} | {
|
|
295
|
+
type: 'action_work_session';
|
|
296
|
+
payload: ActionWorkSessionPayload;
|
|
297
|
+
} | {
|
|
298
|
+
type: 'complete_work_session';
|
|
299
|
+
payload: CompleteWorkSessionPayload;
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=lifecycle-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-contract.d.ts","sourceRoot":"","sources":["../../src/runtime/lifecycle-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,iBAAiB,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EA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,OAAO,EAAE,0BAA0B,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-contract.js","sourceRoot":"","sources":["../../src/runtime/lifecycle-contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LifecyclePlanningGuidanceSchema: z.ZodObject<{
|
|
3
|
+
variant: z.ZodEnum<["denied", "gate_failed", "gate_passed", "human_handover", "human_feedback", "phase_advance", "phase_rollback", "phase_complete", "phase_status_report", "awaiting_human_review_handover", "human_feedback_received", "human_rejected_no_feedback", "phase_advanced_after_approve", "session_closed"]>;
|
|
4
|
+
fieldsToFill: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5
|
+
fieldId: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
required: z.ZodBoolean;
|
|
9
|
+
currentState: z.ZodEnum<["empty", "partial", "filled", "na"]>;
|
|
10
|
+
minCount: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
shape: z.ZodOptional<z.ZodString>;
|
|
13
|
+
interview_hooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
naEligible: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
na_when: z.ZodOptional<z.ZodString>;
|
|
16
|
+
tier: z.ZodOptional<z.ZodEnum<["critical", "recommended", "standard"]>>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
fieldId: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
currentState: "empty" | "partial" | "filled" | "na";
|
|
23
|
+
minCount?: number | undefined;
|
|
24
|
+
examples?: string[] | undefined;
|
|
25
|
+
shape?: string | undefined;
|
|
26
|
+
interview_hooks?: string[] | undefined;
|
|
27
|
+
naEligible?: boolean | undefined;
|
|
28
|
+
na_when?: string | undefined;
|
|
29
|
+
tier?: "critical" | "recommended" | "standard" | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
fieldId: string;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
required: boolean;
|
|
35
|
+
currentState: "empty" | "partial" | "filled" | "na";
|
|
36
|
+
minCount?: number | undefined;
|
|
37
|
+
examples?: string[] | undefined;
|
|
38
|
+
shape?: string | undefined;
|
|
39
|
+
interview_hooks?: string[] | undefined;
|
|
40
|
+
naEligible?: boolean | undefined;
|
|
41
|
+
na_when?: string | undefined;
|
|
42
|
+
tier?: "critical" | "recommended" | "standard" | undefined;
|
|
43
|
+
}>, "many">>;
|
|
44
|
+
humanHandoff: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
message: z.ZodString;
|
|
46
|
+
observatoryLink: z.ZodOptional<z.ZodString>;
|
|
47
|
+
iterationNeeded: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
focus: z.ZodString;
|
|
49
|
+
suggestion: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
focus: string;
|
|
52
|
+
suggestion: string;
|
|
53
|
+
}, {
|
|
54
|
+
focus: string;
|
|
55
|
+
suggestion: string;
|
|
56
|
+
}>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
message: string;
|
|
59
|
+
observatoryLink?: string | undefined;
|
|
60
|
+
iterationNeeded?: {
|
|
61
|
+
focus: string;
|
|
62
|
+
suggestion: string;
|
|
63
|
+
} | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
message: string;
|
|
66
|
+
observatoryLink?: string | undefined;
|
|
67
|
+
iterationNeeded?: {
|
|
68
|
+
focus: string;
|
|
69
|
+
suggestion: string;
|
|
70
|
+
} | undefined;
|
|
71
|
+
}>>;
|
|
72
|
+
postApprovalActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
+
composedAt: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
variant: "denied" | "gate_failed" | "gate_passed" | "human_handover" | "human_feedback" | "phase_advance" | "phase_rollback" | "phase_complete" | "phase_status_report" | "awaiting_human_review_handover" | "human_feedback_received" | "human_rejected_no_feedback" | "phase_advanced_after_approve" | "session_closed";
|
|
76
|
+
composedAt: string;
|
|
77
|
+
fieldsToFill?: {
|
|
78
|
+
fieldId: string;
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
required: boolean;
|
|
82
|
+
currentState: "empty" | "partial" | "filled" | "na";
|
|
83
|
+
minCount?: number | undefined;
|
|
84
|
+
examples?: string[] | undefined;
|
|
85
|
+
shape?: string | undefined;
|
|
86
|
+
interview_hooks?: string[] | undefined;
|
|
87
|
+
naEligible?: boolean | undefined;
|
|
88
|
+
na_when?: string | undefined;
|
|
89
|
+
tier?: "critical" | "recommended" | "standard" | undefined;
|
|
90
|
+
}[] | undefined;
|
|
91
|
+
humanHandoff?: {
|
|
92
|
+
message: string;
|
|
93
|
+
observatoryLink?: string | undefined;
|
|
94
|
+
iterationNeeded?: {
|
|
95
|
+
focus: string;
|
|
96
|
+
suggestion: string;
|
|
97
|
+
} | undefined;
|
|
98
|
+
} | undefined;
|
|
99
|
+
postApprovalActions?: string[] | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
variant: "denied" | "gate_failed" | "gate_passed" | "human_handover" | "human_feedback" | "phase_advance" | "phase_rollback" | "phase_complete" | "phase_status_report" | "awaiting_human_review_handover" | "human_feedback_received" | "human_rejected_no_feedback" | "phase_advanced_after_approve" | "session_closed";
|
|
102
|
+
composedAt: string;
|
|
103
|
+
fieldsToFill?: {
|
|
104
|
+
fieldId: string;
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
required: boolean;
|
|
108
|
+
currentState: "empty" | "partial" | "filled" | "na";
|
|
109
|
+
minCount?: number | undefined;
|
|
110
|
+
examples?: string[] | undefined;
|
|
111
|
+
shape?: string | undefined;
|
|
112
|
+
interview_hooks?: string[] | undefined;
|
|
113
|
+
naEligible?: boolean | undefined;
|
|
114
|
+
na_when?: string | undefined;
|
|
115
|
+
tier?: "critical" | "recommended" | "standard" | undefined;
|
|
116
|
+
}[] | undefined;
|
|
117
|
+
humanHandoff?: {
|
|
118
|
+
message: string;
|
|
119
|
+
observatoryLink?: string | undefined;
|
|
120
|
+
iterationNeeded?: {
|
|
121
|
+
focus: string;
|
|
122
|
+
suggestion: string;
|
|
123
|
+
} | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
postApprovalActions?: string[] | undefined;
|
|
126
|
+
}>;
|
|
127
|
+
export type LifecyclePlanningGuidance = z.infer<typeof LifecyclePlanningGuidanceSchema>;
|
|
128
|
+
//# sourceMappingURL=lifecycle-planning-guidance.d.ts.map
|
package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-planning-guidance.d.ts","sourceRoot":"","sources":["../../src/runtime/lifecycle-planning-guidance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GUIDANCE_VARIANTS, FIELD_STATES } from './enums.js';
|
|
3
|
+
export const LifecyclePlanningGuidanceSchema = z.object({
|
|
4
|
+
variant: z.enum(GUIDANCE_VARIANTS),
|
|
5
|
+
fieldsToFill: z.array(z.object({
|
|
6
|
+
fieldId: z.string(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
description: z.string(),
|
|
9
|
+
required: z.boolean(),
|
|
10
|
+
currentState: z.enum(FIELD_STATES),
|
|
11
|
+
minCount: z.number().int().nonnegative().optional(),
|
|
12
|
+
examples: z.array(z.string()).optional(),
|
|
13
|
+
shape: z.string().optional(),
|
|
14
|
+
interview_hooks: z.array(z.string()).optional(),
|
|
15
|
+
naEligible: z.boolean().optional(),
|
|
16
|
+
na_when: z.string().optional(),
|
|
17
|
+
tier: z.enum(['critical', 'recommended', 'standard']).optional(),
|
|
18
|
+
})).optional(),
|
|
19
|
+
humanHandoff: z.object({
|
|
20
|
+
message: z.string(),
|
|
21
|
+
observatoryLink: z.string().optional(),
|
|
22
|
+
iterationNeeded: z.object({
|
|
23
|
+
focus: z.string(),
|
|
24
|
+
suggestion: z.string(),
|
|
25
|
+
}).optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
postApprovalActions: z.array(z.string()).optional(),
|
|
28
|
+
composedAt: z.string().datetime(),
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=lifecycle-planning-guidance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-planning-guidance.js","sourceRoot":"","sources":["../../src/runtime/lifecycle-planning-guidance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE7D,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IAClC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,CAAC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AAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsed-git-evidence.d.ts","sourceRoot":"","sources":["../../src/runtime/parsed-git-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsed-git-evidence.js","sourceRoot":"","sources":["../../src/runtime/parsed-git-evidence.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Planning lifecycle config — the canonical contract type, resolved per-project/spec
|
|
4
|
+
* and persisted via the IConfigStore (domain `planning-lifecycle`). Lives here in
|
|
5
|
+
* session-types (alongside the other planning contracts + IConfigStore) so every
|
|
6
|
+
* consumer shares ONE source: the lifecycle resolver, and the M8.7 project-stream
|
|
7
|
+
* config-bootstrap in operations, both import from here — no operations→lifecycle dep.
|
|
8
|
+
*
|
|
9
|
+
* Behaviour (deepMerge + PlanningLifecycleConfigResolver) stays in @specforge/lifecycle.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PLANNING_LIFECYCLE_CONFIG_DOMAIN: "planning-lifecycle";
|
|
12
|
+
export declare const PLANNING_LIFECYCLE_CONFIG_SCHEMA_VERSION = 2;
|
|
13
|
+
export declare const PlanningLifecycleConfigSchema: z.ZodObject<{
|
|
14
|
+
gateResultCacheTtlMs: z.ZodNumber;
|
|
15
|
+
observatoryBaseUrl: z.ZodString;
|
|
16
|
+
guidance: z.ZodObject<{
|
|
17
|
+
maxNextEntitiesToShow: z.ZodNumber;
|
|
18
|
+
fieldRenderDetail: z.ZodOptional<z.ZodEnum<["rich", "concise"]>>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
maxNextEntitiesToShow: number;
|
|
21
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
maxNextEntitiesToShow: number;
|
|
24
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
gateResultCacheTtlMs: number;
|
|
28
|
+
observatoryBaseUrl: string;
|
|
29
|
+
guidance: {
|
|
30
|
+
maxNextEntitiesToShow: number;
|
|
31
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
gateResultCacheTtlMs: number;
|
|
35
|
+
observatoryBaseUrl: string;
|
|
36
|
+
guidance: {
|
|
37
|
+
maxNextEntitiesToShow: number;
|
|
38
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
export type PlanningLifecycleConfig = z.infer<typeof PlanningLifecycleConfigSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* PlanningLifecycleConfigOverridesSchema — a permissive DeepPartial of
|
|
44
|
+
* {@link PlanningLifecycleConfigSchema}. A project-level override is a sparse
|
|
45
|
+
* `DeepPartial<PlanningLifecycleConfig>` (e.g. `{ guidance: { maxNextEntitiesToShow: 5 } }`).
|
|
46
|
+
*
|
|
47
|
+
* `PlanningLifecycleConfigSchema` is a plain `ZodObject` tree of objects + primitives with
|
|
48
|
+
* NO cross-field refinements, so `.deepPartial()` is safe here (no `ZodEffects` to trip
|
|
49
|
+
* over, unlike the validator's `ValidatorConfigSchema`). The full schema is still re-checked
|
|
50
|
+
* on the deepMerged result by `validateOverrides` in @specforge/lifecycle.
|
|
51
|
+
*/
|
|
52
|
+
export declare const PlanningLifecycleConfigOverridesSchema: z.ZodObject<{
|
|
53
|
+
gateResultCacheTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
observatoryBaseUrl: z.ZodOptional<z.ZodString>;
|
|
55
|
+
guidance: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
maxNextEntitiesToShow: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
fieldRenderDetail: z.ZodOptional<z.ZodOptional<z.ZodEnum<["rich", "concise"]>>>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
maxNextEntitiesToShow?: number | undefined;
|
|
60
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
maxNextEntitiesToShow?: number | undefined;
|
|
63
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
64
|
+
}>>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
gateResultCacheTtlMs?: number | undefined;
|
|
67
|
+
observatoryBaseUrl?: string | undefined;
|
|
68
|
+
guidance?: {
|
|
69
|
+
maxNextEntitiesToShow?: number | undefined;
|
|
70
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
gateResultCacheTtlMs?: number | undefined;
|
|
74
|
+
observatoryBaseUrl?: string | undefined;
|
|
75
|
+
guidance?: {
|
|
76
|
+
maxNextEntitiesToShow?: number | undefined;
|
|
77
|
+
fieldRenderDetail?: "rich" | "concise" | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
export type PlanningLifecycleConfigOverrides = z.infer<typeof PlanningLifecycleConfigOverridesSchema>;
|
|
81
|
+
export declare const PLANNING_LIFECYCLE_DEFAULTS: PlanningLifecycleConfig;
|
|
82
|
+
//# sourceMappingURL=planning-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning-config.d.ts","sourceRoot":"","sources":["../../src/runtime/planning-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAG,oBAA6B,CAAC;AAG9E,eAAO,MAAM,wCAAwC,IAAI,CAAC;AAE1D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;;;;GASG;AACH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8C,CAAC;AAClG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAKtG,eAAO,MAAM,2BAA2B,EAAE,uBAOzC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Planning lifecycle config — the canonical contract type, resolved per-project/spec
|
|
4
|
+
* and persisted via the IConfigStore (domain `planning-lifecycle`). Lives here in
|
|
5
|
+
* session-types (alongside the other planning contracts + IConfigStore) so every
|
|
6
|
+
* consumer shares ONE source: the lifecycle resolver, and the M8.7 project-stream
|
|
7
|
+
* config-bootstrap in operations, both import from here — no operations→lifecycle dep.
|
|
8
|
+
*
|
|
9
|
+
* Behaviour (deepMerge + PlanningLifecycleConfigResolver) stays in @specforge/lifecycle.
|
|
10
|
+
*/
|
|
11
|
+
export const PLANNING_LIFECYCLE_CONFIG_DOMAIN = 'planning-lifecycle';
|
|
12
|
+
// ME.10.5 — bumped 1 → 2 after the clean-break trim (thresholds, arrayCountPhases
|
|
13
|
+
// removed; gate knobs moved to the validator config). No migration — greenfield wipe.
|
|
14
|
+
export const PLANNING_LIFECYCLE_CONFIG_SCHEMA_VERSION = 2;
|
|
15
|
+
export const PlanningLifecycleConfigSchema = z.object({
|
|
16
|
+
// ME.10.3 — the entity-count bounds (minEpics/maxEpics/min/maxTicketsPerEpic) moved
|
|
17
|
+
// to the validator config (domain `planning`,
|
|
18
|
+
// ValidatorConfig.structuralRequirements.arrayMin/MaxCounts) as the single owner.
|
|
19
|
+
// ME.10.4 — the blueprint:epic ratio also moved to the validator config
|
|
20
|
+
// (ValidatorConfig.crossValidation.ratios.blueprintToEpic.min), emptying
|
|
21
|
+
// `arrayCountPhases` entirely — the object is gone.
|
|
22
|
+
gateResultCacheTtlMs: z.number().int(), // CPS stale-cache check (default: 5 minutes)
|
|
23
|
+
// ME.10.8 — `.url()`-validated so a non-URL override is a value error (not just a
|
|
24
|
+
// UI gate). The env-aware host is resolved SERVER-SIDE at handover-link-build time
|
|
25
|
+
// (process.env.OBSERVATORY_BASE_URL ?? config.observatoryBaseUrl); this static
|
|
26
|
+
// default stays free of process.env so it bundles identically into the webapp client.
|
|
27
|
+
observatoryBaseUrl: z.string().url(),
|
|
28
|
+
guidance: z.object({
|
|
29
|
+
// Max entities shown in the "next to fill" block during expansion-phase APS guidance
|
|
30
|
+
// (epic_expansion / ticket_expansion). Caps response size. Default: 3.
|
|
31
|
+
maxNextEntitiesToShow: z.number().int(),
|
|
32
|
+
// Fidelity of the phase-entry field block (composePhaseIntro). Optional; absent ⇒ 'rich'.
|
|
33
|
+
// - 'rich' → full per-field render (shape, interview hooks, examples, NA mechanism,
|
|
34
|
+
// min count, tier) — the agent fills without guessing. Default.
|
|
35
|
+
// - 'concise' → one line per field (name — description) + an optional list. Lighter.
|
|
36
|
+
fieldRenderDetail: z.enum(['rich', 'concise']).optional(),
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* PlanningLifecycleConfigOverridesSchema — a permissive DeepPartial of
|
|
41
|
+
* {@link PlanningLifecycleConfigSchema}. A project-level override is a sparse
|
|
42
|
+
* `DeepPartial<PlanningLifecycleConfig>` (e.g. `{ guidance: { maxNextEntitiesToShow: 5 } }`).
|
|
43
|
+
*
|
|
44
|
+
* `PlanningLifecycleConfigSchema` is a plain `ZodObject` tree of objects + primitives with
|
|
45
|
+
* NO cross-field refinements, so `.deepPartial()` is safe here (no `ZodEffects` to trip
|
|
46
|
+
* over, unlike the validator's `ValidatorConfigSchema`). The full schema is still re-checked
|
|
47
|
+
* on the deepMerged result by `validateOverrides` in @specforge/lifecycle.
|
|
48
|
+
*/
|
|
49
|
+
export const PlanningLifecycleConfigOverridesSchema = PlanningLifecycleConfigSchema.deepPartial();
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// PLANNING_LIFECYCLE_DEFAULTS — baseline merged under project/spec overrides.
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
export const PLANNING_LIFECYCLE_DEFAULTS = {
|
|
54
|
+
gateResultCacheTtlMs: 5 * 60 * 1000,
|
|
55
|
+
observatoryBaseUrl: 'https://specforge.tech',
|
|
56
|
+
guidance: {
|
|
57
|
+
maxNextEntitiesToShow: 3,
|
|
58
|
+
fieldRenderDetail: 'rich',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=planning-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning-config.js","sourceRoot":"","sources":["../../src/runtime/planning-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,oBAA6B,CAAC;AAC9E,kFAAkF;AAClF,sFAAsF;AACtF,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,oFAAoF;IACpF,8CAA8C;IAC9C,kFAAkF;IAClF,wEAAwE;IACxE,yEAAyE;IACzE,oDAAoD;IACpD,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAI,6CAA6C;IAC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