silvermoon 0.3.0-rc.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/README.zh-CN.md +26 -24
- package/dist/bin/build-npm-tarball.d.ts +28 -0
- package/dist/bin/build-npm-tarball.d.ts.map +1 -0
- package/dist/bin/build-npm-tarball.js +200 -0
- package/dist/bin/build-npm-tarball.js.map +1 -0
- package/dist/bin/check-pack.d.ts +2 -0
- package/dist/bin/check-pack.d.ts.map +1 -0
- package/dist/bin/check-pack.js +421 -0
- package/dist/bin/check-pack.js.map +1 -0
- package/dist/bin/ci-package-risk.d.ts +19 -0
- package/dist/bin/ci-package-risk.d.ts.map +1 -0
- package/dist/bin/ci-package-risk.js +78 -0
- package/dist/bin/ci-package-risk.js.map +1 -0
- package/dist/bin/generate-npm-readme.d.ts +7 -0
- package/dist/bin/generate-npm-readme.d.ts.map +1 -0
- package/dist/bin/generate-npm-readme.js +232 -0
- package/dist/bin/generate-npm-readme.js.map +1 -0
- package/dist/bin/migrate-v1-to-v2.d.ts +3 -0
- package/dist/bin/migrate-v1-to-v2.d.ts.map +1 -0
- package/dist/bin/migrate-v1-to-v2.js +25 -0
- package/dist/bin/migrate-v1-to-v2.js.map +1 -0
- package/dist/bin/prepare-npm-release.d.ts +46 -0
- package/dist/bin/prepare-npm-release.d.ts.map +1 -0
- package/dist/bin/prepare-npm-release.js +210 -0
- package/dist/bin/prepare-npm-release.js.map +1 -0
- package/dist/bin/pure-check.d.ts +15 -0
- package/dist/bin/pure-check.d.ts.map +1 -0
- package/dist/bin/pure-check.js +448 -0
- package/dist/bin/pure-check.js.map +1 -0
- package/dist/bin/run-checks.d.ts +34 -0
- package/dist/bin/run-checks.d.ts.map +1 -0
- package/dist/bin/run-checks.js +149 -0
- package/dist/bin/run-checks.js.map +1 -0
- package/dist/bin/silvermoon.d.ts +76 -0
- package/dist/bin/silvermoon.d.ts.map +1 -0
- package/dist/bin/silvermoon.js +401 -0
- package/dist/bin/silvermoon.js.map +1 -0
- package/dist/bin/sync-skills.d.ts +2 -0
- package/dist/bin/sync-skills.d.ts.map +1 -0
- package/dist/bin/sync-skills.js +78 -0
- package/dist/bin/sync-skills.js.map +1 -0
- package/dist/bin/verify-npm-release.d.ts +55 -0
- package/dist/bin/verify-npm-release.d.ts.map +1 -0
- package/dist/bin/verify-npm-release.js +418 -0
- package/dist/bin/verify-npm-release.js.map +1 -0
- package/dist/src/business/agent-copilot.d.ts +82 -0
- package/dist/src/business/agent-copilot.d.ts.map +1 -0
- package/dist/src/business/agent-copilot.js +330 -0
- package/dist/src/business/agent-copilot.js.map +1 -0
- package/dist/src/business/agent-project-registry.d.ts +22 -0
- package/dist/src/business/agent-project-registry.d.ts.map +1 -0
- package/dist/src/business/agent-project-registry.js +239 -0
- package/dist/src/business/agent-project-registry.js.map +1 -0
- package/dist/src/business/agent-project-runtime.d.ts +37 -0
- package/dist/src/business/agent-project-runtime.d.ts.map +1 -0
- package/dist/src/business/agent-project-runtime.js +198 -0
- package/dist/src/business/agent-project-runtime.js.map +1 -0
- package/dist/src/business/append-event-history.d.ts +21 -0
- package/dist/src/business/append-event-history.d.ts.map +1 -0
- package/dist/src/business/append-event-history.js +138 -0
- package/dist/src/business/append-event-history.js.map +1 -0
- package/dist/src/business/append-event.d.ts +140 -0
- package/dist/src/business/append-event.d.ts.map +1 -0
- package/dist/src/business/append-event.js +292 -0
- package/dist/src/business/append-event.js.map +1 -0
- package/dist/src/business/check-repository.d.ts +109 -0
- package/dist/src/business/check-repository.d.ts.map +1 -0
- package/dist/src/business/check-repository.js +379 -0
- package/dist/src/business/check-repository.js.map +1 -0
- package/dist/src/business/create-idea.d.ts +100 -0
- package/dist/src/business/create-idea.d.ts.map +1 -0
- package/dist/src/business/create-idea.js +224 -0
- package/dist/src/business/create-idea.js.map +1 -0
- package/dist/src/business/event-command.d.ts +111 -0
- package/dist/src/business/event-command.d.ts.map +1 -0
- package/dist/src/business/event-command.js +239 -0
- package/dist/src/business/event-command.js.map +1 -0
- package/dist/src/business/index.d.ts +7 -0
- package/dist/src/business/index.d.ts.map +1 -0
- package/dist/src/business/index.js +7 -0
- package/dist/src/business/index.js.map +1 -0
- package/dist/src/business/list-ideas.d.ts +97 -0
- package/dist/src/business/list-ideas.d.ts.map +1 -0
- package/dist/src/business/list-ideas.js +177 -0
- package/dist/src/business/list-ideas.js.map +1 -0
- package/dist/src/business/migrate-v1-to-v2.d.ts +23 -0
- package/dist/src/business/migrate-v1-to-v2.d.ts.map +1 -0
- package/dist/src/business/migrate-v1-to-v2.js +152 -0
- package/dist/src/business/migrate-v1-to-v2.js.map +1 -0
- package/dist/src/business/replay-events.d.ts +20 -0
- package/dist/src/business/replay-events.d.ts.map +1 -0
- package/dist/src/business/replay-events.js +27 -0
- package/dist/src/business/replay-events.js.map +1 -0
- package/dist/src/business/schema-migration.d.ts +19 -0
- package/dist/src/business/schema-migration.d.ts.map +1 -0
- package/dist/src/business/schema-migration.js +23 -0
- package/dist/src/business/schema-migration.js.map +1 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.d.ts +3 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.d.ts.map +1 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.js +9 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.js.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness-with.d.ts +18 -0
- package/dist/src/business/shared/assess-repository-readiness-with.d.ts.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness-with.js +125 -0
- package/dist/src/business/shared/assess-repository-readiness-with.js.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness.d.ts +3 -0
- package/dist/src/business/shared/assess-repository-readiness.d.ts.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness.js +6 -0
- package/dist/src/business/shared/assess-repository-readiness.js.map +1 -0
- package/dist/src/business/shared/business-types.d.ts +151 -0
- package/dist/src/business/shared/business-types.d.ts.map +1 -0
- package/dist/src/business/shared/business-types.js +83 -0
- package/dist/src/business/shared/business-types.js.map +1 -0
- package/dist/src/business/shared/evaluate-local-readiness.d.ts +9 -0
- package/dist/src/business/shared/evaluate-local-readiness.d.ts.map +1 -0
- package/dist/src/business/shared/evaluate-local-readiness.js +97 -0
- package/dist/src/business/shared/evaluate-local-readiness.js.map +1 -0
- package/dist/src/business/shared/evaluate-primary-relation.d.ts +12 -0
- package/dist/src/business/shared/evaluate-primary-relation.d.ts.map +1 -0
- package/dist/src/business/shared/evaluate-primary-relation.js +40 -0
- package/dist/src/business/shared/evaluate-primary-relation.js.map +1 -0
- package/dist/src/business/shared/idea-layout.d.ts +55 -0
- package/dist/src/business/shared/idea-layout.d.ts.map +1 -0
- package/dist/src/business/shared/idea-layout.js +434 -0
- package/dist/src/business/shared/idea-layout.js.map +1 -0
- package/dist/src/business/shared/index.d.ts +18 -0
- package/dist/src/business/shared/index.d.ts.map +1 -0
- package/dist/src/business/shared/index.js +17 -0
- package/dist/src/business/shared/index.js.map +1 -0
- package/dist/src/business/shared/inspect-candidate.d.ts +5 -0
- package/dist/src/business/shared/inspect-candidate.d.ts.map +1 -0
- package/dist/src/business/shared/inspect-candidate.js +57 -0
- package/dist/src/business/shared/inspect-candidate.js.map +1 -0
- package/dist/src/business/shared/metadata-failure-observation.d.ts +21 -0
- package/dist/src/business/shared/metadata-failure-observation.d.ts.map +1 -0
- package/dist/src/business/shared/metadata-failure-observation.js +30 -0
- package/dist/src/business/shared/metadata-failure-observation.js.map +1 -0
- package/dist/src/business/shared/observe-device.d.ts +150 -0
- package/dist/src/business/shared/observe-device.d.ts.map +1 -0
- package/dist/src/business/shared/observe-device.js +71 -0
- package/dist/src/business/shared/observe-device.js.map +1 -0
- package/dist/src/business/shared/observe-idea.d.ts +14 -0
- package/dist/src/business/shared/observe-idea.d.ts.map +1 -0
- package/dist/src/business/shared/observe-idea.js +14 -0
- package/dist/src/business/shared/observe-idea.js.map +1 -0
- package/dist/src/business/shared/observe-project.d.ts +39 -0
- package/dist/src/business/shared/observe-project.d.ts.map +1 -0
- package/dist/src/business/shared/observe-project.js +11 -0
- package/dist/src/business/shared/observe-project.js.map +1 -0
- package/dist/src/business/shared/observe-snapshot.d.ts +35 -0
- package/dist/src/business/shared/observe-snapshot.d.ts.map +1 -0
- package/dist/src/business/shared/observe-snapshot.js +518 -0
- package/dist/src/business/shared/observe-snapshot.js.map +1 -0
- package/dist/src/business/shared/read-idea-inventory-item.d.ts +13 -0
- package/dist/src/business/shared/read-idea-inventory-item.d.ts.map +1 -0
- package/dist/src/business/shared/read-idea-inventory-item.js +18 -0
- package/dist/src/business/shared/read-idea-inventory-item.js.map +1 -0
- package/dist/src/business/shared/resolve-idea.d.ts +7 -0
- package/dist/src/business/shared/resolve-idea.d.ts.map +1 -0
- package/dist/src/business/shared/resolve-idea.js +14 -0
- package/dist/src/business/shared/resolve-idea.js.map +1 -0
- package/dist/src/business/shared/with-observation-language.d.ts +3 -0
- package/dist/src/business/shared/with-observation-language.d.ts.map +1 -0
- package/dist/src/business/shared/with-observation-language.js +20 -0
- package/dist/src/business/shared/with-observation-language.js.map +1 -0
- package/dist/src/business/whats-next.d.ts +94 -0
- package/dist/src/business/whats-next.d.ts.map +1 -0
- package/dist/src/business/whats-next.js +208 -0
- package/dist/src/business/whats-next.js.map +1 -0
- package/dist/src/foundation/command-message/index.d.ts +3 -0
- package/dist/src/foundation/command-message/index.d.ts.map +1 -0
- package/dist/src/foundation/command-message/index.js +3 -0
- package/dist/src/foundation/command-message/index.js.map +1 -0
- package/dist/src/foundation/command-message/observation.d.ts +223 -0
- package/dist/src/foundation/command-message/observation.d.ts.map +1 -0
- package/dist/src/foundation/command-message/observation.js +364 -0
- package/dist/src/foundation/command-message/observation.js.map +1 -0
- package/dist/src/foundation/command-message/runtime.d.ts +214 -0
- package/dist/src/foundation/command-message/runtime.d.ts.map +1 -0
- package/dist/src/foundation/command-message/runtime.js +215 -0
- package/dist/src/foundation/command-message/runtime.js.map +1 -0
- package/dist/src/foundation/coordinates/index.d.ts +3 -0
- package/dist/src/foundation/coordinates/index.d.ts.map +1 -0
- package/dist/src/foundation/coordinates/index.js +3 -0
- package/dist/src/foundation/coordinates/index.js.map +1 -0
- package/dist/src/foundation/coordinates/layout.d.ts +27 -0
- package/dist/src/foundation/coordinates/layout.d.ts.map +1 -0
- package/dist/src/foundation/coordinates/layout.js +41 -0
- package/dist/src/foundation/coordinates/layout.js.map +1 -0
- package/dist/src/foundation/coordinates/repository.d.ts +16 -0
- package/dist/src/foundation/coordinates/repository.d.ts.map +1 -0
- package/dist/src/foundation/coordinates/repository.js +75 -0
- package/dist/src/foundation/coordinates/repository.js.map +1 -0
- package/dist/src/foundation/device-config/index.d.ts +2 -0
- package/dist/src/foundation/device-config/index.d.ts.map +1 -0
- package/dist/src/foundation/device-config/index.js +2 -0
- package/dist/src/foundation/device-config/index.js.map +1 -0
- package/dist/src/foundation/device-config/user-config.d.ts +19 -0
- package/dist/src/foundation/device-config/user-config.d.ts.map +1 -0
- package/dist/src/foundation/device-config/user-config.js +94 -0
- package/dist/src/foundation/device-config/user-config.js.map +1 -0
- package/dist/src/foundation/event-codec/grammar.d.ts +172 -0
- package/dist/src/foundation/event-codec/grammar.d.ts.map +1 -0
- package/dist/src/foundation/event-codec/grammar.js +383 -0
- package/dist/src/foundation/event-codec/grammar.js.map +1 -0
- package/dist/src/foundation/event-codec/index.d.ts +3 -0
- package/dist/src/foundation/event-codec/index.d.ts.map +1 -0
- package/dist/src/foundation/event-codec/index.js +2 -0
- package/dist/src/foundation/event-codec/index.js.map +1 -0
- package/dist/src/foundation/event-cursor/cursor.d.ts +40 -0
- package/dist/src/foundation/event-cursor/cursor.d.ts.map +1 -0
- package/dist/src/foundation/event-cursor/cursor.js +42 -0
- package/dist/src/foundation/event-cursor/cursor.js.map +1 -0
- package/dist/src/foundation/event-cursor/index.d.ts +2 -0
- package/dist/src/foundation/event-cursor/index.d.ts.map +1 -0
- package/dist/src/foundation/event-cursor/index.js +2 -0
- package/dist/src/foundation/event-cursor/index.js.map +1 -0
- package/dist/src/foundation/event-history/digest.d.ts +2 -0
- package/dist/src/foundation/event-history/digest.d.ts.map +1 -0
- package/dist/src/foundation/event-history/digest.js +2 -0
- package/dist/src/foundation/event-history/digest.js.map +1 -0
- package/dist/src/foundation/event-history/history.d.ts +86 -0
- package/dist/src/foundation/event-history/history.d.ts.map +1 -0
- package/dist/src/foundation/event-history/history.js +481 -0
- package/dist/src/foundation/event-history/history.js.map +1 -0
- package/dist/src/foundation/event-history/index.d.ts +3 -0
- package/dist/src/foundation/event-history/index.d.ts.map +1 -0
- package/dist/src/foundation/event-history/index.js +3 -0
- package/dist/src/foundation/event-history/index.js.map +1 -0
- package/dist/src/foundation/event-reducer/index.d.ts +2 -0
- package/dist/src/foundation/event-reducer/index.d.ts.map +1 -0
- package/dist/src/foundation/event-reducer/index.js +2 -0
- package/dist/src/foundation/event-reducer/index.js.map +1 -0
- package/dist/src/foundation/event-reducer/policy.d.ts +69 -0
- package/dist/src/foundation/event-reducer/policy.d.ts.map +1 -0
- package/dist/src/foundation/event-reducer/policy.js +138 -0
- package/dist/src/foundation/event-reducer/policy.js.map +1 -0
- package/dist/src/foundation/event-store/digest.d.ts +11 -0
- package/dist/src/foundation/event-store/digest.d.ts.map +1 -0
- package/dist/src/foundation/event-store/digest.js +38 -0
- package/dist/src/foundation/event-store/digest.js.map +1 -0
- package/dist/src/foundation/event-store/index.d.ts +3 -0
- package/dist/src/foundation/event-store/index.d.ts.map +1 -0
- package/dist/src/foundation/event-store/index.js +3 -0
- package/dist/src/foundation/event-store/index.js.map +1 -0
- package/dist/src/foundation/event-store/storage.d.ts +50 -0
- package/dist/src/foundation/event-store/storage.d.ts.map +1 -0
- package/dist/src/foundation/event-store/storage.js +109 -0
- package/dist/src/foundation/event-store/storage.js.map +1 -0
- package/dist/src/foundation/git/derived-cache.d.ts +5 -0
- package/dist/src/foundation/git/derived-cache.d.ts.map +1 -0
- package/dist/src/foundation/git/derived-cache.js +117 -0
- package/dist/src/foundation/git/derived-cache.js.map +1 -0
- package/dist/src/foundation/git/git.d.ts +100 -0
- package/dist/src/foundation/git/git.d.ts.map +1 -0
- package/dist/src/foundation/git/git.js +677 -0
- package/dist/src/foundation/git/git.js.map +1 -0
- package/dist/src/foundation/git/index.d.ts +3 -0
- package/dist/src/foundation/git/index.d.ts.map +1 -0
- package/dist/src/foundation/git/index.js +3 -0
- package/dist/src/foundation/git/index.js.map +1 -0
- package/dist/src/foundation/guidance/guidance.d.ts +36 -0
- package/dist/src/foundation/guidance/guidance.d.ts.map +1 -0
- package/dist/src/foundation/guidance/guidance.js +198 -0
- package/dist/src/foundation/guidance/guidance.js.map +1 -0
- package/dist/src/foundation/guidance/index.d.ts +3 -0
- package/dist/src/foundation/guidance/index.d.ts.map +1 -0
- package/dist/src/foundation/guidance/index.js +3 -0
- package/dist/src/foundation/guidance/index.js.map +1 -0
- package/dist/src/foundation/guidance/rules.d.ts +36 -0
- package/dist/src/foundation/guidance/rules.d.ts.map +1 -0
- package/dist/src/foundation/guidance/rules.js +65 -0
- package/dist/src/foundation/guidance/rules.js.map +1 -0
- package/dist/src/foundation/idea-model/index.d.ts +3 -0
- package/dist/src/foundation/idea-model/index.d.ts.map +1 -0
- package/dist/src/foundation/idea-model/index.js +3 -0
- package/dist/src/foundation/idea-model/index.js.map +1 -0
- package/dist/src/foundation/idea-model/status.d.ts +28 -0
- package/dist/src/foundation/idea-model/status.d.ts.map +1 -0
- package/dist/src/foundation/idea-model/status.js +192 -0
- package/dist/src/foundation/idea-model/status.js.map +1 -0
- package/dist/src/foundation/idea-model/ulid.d.ts +6 -0
- package/dist/src/foundation/idea-model/ulid.d.ts.map +1 -0
- package/dist/src/foundation/idea-model/ulid.js +16 -0
- package/dist/src/foundation/idea-model/ulid.js.map +1 -0
- package/dist/src/foundation/idea-query/index.d.ts +3 -0
- package/dist/src/foundation/idea-query/index.d.ts.map +1 -0
- package/dist/src/foundation/idea-query/index.js +3 -0
- package/dist/src/foundation/idea-query/index.js.map +1 -0
- package/dist/src/foundation/idea-query/query.d.ts +13 -0
- package/dist/src/foundation/idea-query/query.d.ts.map +1 -0
- package/dist/src/foundation/idea-query/query.js +17 -0
- package/dist/src/foundation/idea-query/query.js.map +1 -0
- package/dist/src/foundation/idea-query/rules.d.ts +55 -0
- package/dist/src/foundation/idea-query/rules.d.ts.map +1 -0
- package/dist/src/foundation/idea-query/rules.js +223 -0
- package/dist/src/foundation/idea-query/rules.js.map +1 -0
- package/dist/src/foundation/idea-template/index.d.ts +2 -0
- package/dist/src/foundation/idea-template/index.d.ts.map +1 -0
- package/dist/src/foundation/idea-template/index.js +2 -0
- package/dist/src/foundation/idea-template/index.js.map +1 -0
- package/dist/src/foundation/idea-template/templates.d.ts +21 -0
- package/dist/src/foundation/idea-template/templates.d.ts.map +1 -0
- package/dist/src/foundation/idea-template/templates.js +265 -0
- package/dist/src/foundation/idea-template/templates.js.map +1 -0
- package/dist/src/foundation/installation/device-readiness.d.ts +94 -0
- package/dist/src/foundation/installation/device-readiness.d.ts.map +1 -0
- package/dist/src/foundation/installation/device-readiness.js +274 -0
- package/dist/src/foundation/installation/device-readiness.js.map +1 -0
- package/dist/src/foundation/installation/index.d.ts +4 -0
- package/dist/src/foundation/installation/index.d.ts.map +1 -0
- package/dist/src/foundation/installation/index.js +4 -0
- package/dist/src/foundation/installation/index.js.map +1 -0
- package/dist/src/foundation/installation/installation.d.ts +25 -0
- package/dist/src/foundation/installation/installation.d.ts.map +1 -0
- package/dist/src/foundation/installation/installation.js +125 -0
- package/dist/src/foundation/installation/installation.js.map +1 -0
- package/dist/src/foundation/installation/rules.d.ts +12 -0
- package/dist/src/foundation/installation/rules.d.ts.map +1 -0
- package/dist/src/foundation/installation/rules.js +63 -0
- package/dist/src/foundation/installation/rules.js.map +1 -0
- package/dist/src/foundation/language/index.d.ts +3 -0
- package/dist/src/foundation/language/index.d.ts.map +1 -0
- package/dist/src/foundation/language/index.js +2 -0
- package/dist/src/foundation/language/index.js.map +1 -0
- package/dist/src/foundation/language/language.d.ts +36 -0
- package/dist/src/foundation/language/language.d.ts.map +1 -0
- package/dist/src/foundation/language/language.js +94 -0
- package/dist/src/foundation/language/language.js.map +1 -0
- package/dist/src/foundation/owned-write/index.d.ts +2 -0
- package/dist/src/foundation/owned-write/index.d.ts.map +1 -0
- package/dist/src/foundation/owned-write/index.js +2 -0
- package/dist/src/foundation/owned-write/index.js.map +1 -0
- package/dist/src/foundation/owned-write/writer.d.ts +86 -0
- package/dist/src/foundation/owned-write/writer.d.ts.map +1 -0
- package/dist/src/foundation/owned-write/writer.js +244 -0
- package/dist/src/foundation/owned-write/writer.js.map +1 -0
- package/dist/src/foundation/package-resource/index.d.ts +2 -0
- package/dist/src/foundation/package-resource/index.d.ts.map +1 -0
- package/dist/src/foundation/package-resource/index.js +2 -0
- package/dist/src/foundation/package-resource/index.js.map +1 -0
- package/dist/src/foundation/package-resource/npm-tarball.d.ts +15 -0
- package/dist/src/foundation/package-resource/npm-tarball.d.ts.map +1 -0
- package/dist/src/foundation/package-resource/npm-tarball.js +124 -0
- package/dist/src/foundation/package-resource/npm-tarball.js.map +1 -0
- package/dist/src/foundation/process/index.d.ts +3 -0
- package/dist/src/foundation/process/index.d.ts.map +1 -0
- package/dist/src/foundation/process/index.js +3 -0
- package/dist/src/foundation/process/index.js.map +1 -0
- package/dist/src/foundation/process/npm-command.d.ts +9 -0
- package/dist/src/foundation/process/npm-command.d.ts.map +1 -0
- package/dist/src/foundation/process/npm-command.js +11 -0
- package/dist/src/foundation/process/npm-command.js.map +1 -0
- package/dist/src/foundation/process/subprocess.d.ts +8 -0
- package/dist/src/foundation/process/subprocess.d.ts.map +1 -0
- package/dist/src/foundation/process/subprocess.js +12 -0
- package/dist/src/foundation/process/subprocess.js.map +1 -0
- package/dist/src/foundation/project-config/config.d.ts +30 -0
- package/dist/src/foundation/project-config/config.d.ts.map +1 -0
- package/dist/src/foundation/project-config/config.js +112 -0
- package/dist/src/foundation/project-config/config.js.map +1 -0
- package/dist/src/foundation/project-config/index.d.ts +3 -0
- package/dist/src/foundation/project-config/index.d.ts.map +1 -0
- package/dist/src/foundation/project-config/index.js +3 -0
- package/dist/src/foundation/project-config/index.js.map +1 -0
- package/dist/src/foundation/project-config/rules.d.ts +32 -0
- package/dist/src/foundation/project-config/rules.d.ts.map +1 -0
- package/dist/src/foundation/project-config/rules.js +119 -0
- package/dist/src/foundation/project-config/rules.js.map +1 -0
- package/dist/src/foundation/projection-cache/index.d.ts +2 -0
- package/dist/src/foundation/projection-cache/index.d.ts.map +1 -0
- package/dist/src/foundation/projection-cache/index.js +2 -0
- package/dist/src/foundation/projection-cache/index.js.map +1 -0
- package/dist/src/foundation/projection-cache/projection.d.ts +36 -0
- package/dist/src/foundation/projection-cache/projection.d.ts.map +1 -0
- package/dist/src/foundation/projection-cache/projection.js +105 -0
- package/dist/src/foundation/projection-cache/projection.js.map +1 -0
- package/dist/src/foundation/renderer/index.d.ts +3 -0
- package/dist/src/foundation/renderer/index.d.ts.map +1 -0
- package/dist/src/foundation/renderer/index.js +3 -0
- package/dist/src/foundation/renderer/index.js.map +1 -0
- package/dist/src/foundation/renderer/markdown.d.ts +7 -0
- package/dist/src/foundation/renderer/markdown.d.ts.map +1 -0
- package/dist/src/foundation/renderer/markdown.js +355 -0
- package/dist/src/foundation/renderer/markdown.js.map +1 -0
- package/dist/src/foundation/renderer/render.d.ts +6 -0
- package/dist/src/foundation/renderer/render.d.ts.map +1 -0
- package/dist/src/foundation/renderer/render.js +23 -0
- package/dist/src/foundation/renderer/render.js.map +1 -0
- package/dist/src/foundation/report/dialogue.d.ts +37 -0
- package/dist/src/foundation/report/dialogue.d.ts.map +1 -0
- package/dist/src/foundation/report/dialogue.js +59 -0
- package/dist/src/foundation/report/dialogue.js.map +1 -0
- package/dist/src/foundation/report/index.d.ts +6 -0
- package/dist/src/foundation/report/index.d.ts.map +1 -0
- package/dist/src/foundation/report/index.js +6 -0
- package/dist/src/foundation/report/index.js.map +1 -0
- package/dist/src/foundation/report/instructions.d.ts +77 -0
- package/dist/src/foundation/report/instructions.d.ts.map +1 -0
- package/dist/src/foundation/report/instructions.js +374 -0
- package/dist/src/foundation/report/instructions.js.map +1 -0
- package/dist/src/foundation/report/observation.d.ts +31 -0
- package/dist/src/foundation/report/observation.d.ts.map +1 -0
- package/dist/src/foundation/report/observation.js +83 -0
- package/dist/src/foundation/report/observation.js.map +1 -0
- package/dist/src/foundation/report/projection.d.ts +7 -0
- package/dist/src/foundation/report/projection.d.ts.map +1 -0
- package/dist/src/foundation/report/projection.js +199 -0
- package/dist/src/foundation/report/projection.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/contract.d.ts +148 -0
- package/dist/src/foundation/report/templates/whats-next/contract.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/contract.js +34 -0
- package/dist/src/foundation/report/templates/whats-next/contract.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.d.ts +12 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.d.ts +63 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.js +63 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.js +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.js +39 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.js +12 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/index.d.ts +5 -0
- package/dist/src/foundation/report/templates/whats-next/index.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/index.js +4 -0
- package/dist/src/foundation/report/templates/whats-next/index.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/registry.d.ts +4 -0
- package/dist/src/foundation/report/templates/whats-next/registry.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/registry.js +14 -0
- package/dist/src/foundation/report/templates/whats-next/registry.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.d.ts +63 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.js +176 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.d.ts +12 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.d.ts +63 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.js +63 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.js +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.js +39 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.js +12 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.js.map +1 -0
- package/dist/src/foundation/report/types.d.ts +321 -0
- package/dist/src/foundation/report/types.d.ts.map +1 -0
- package/dist/src/foundation/report/types.js +2 -0
- package/dist/src/foundation/report/types.js.map +1 -0
- package/dist/src/foundation/scaffold-plan/index.d.ts +2 -0
- package/dist/src/foundation/scaffold-plan/index.d.ts.map +1 -0
- package/dist/src/foundation/scaffold-plan/index.js +2 -0
- package/dist/src/foundation/scaffold-plan/index.js.map +1 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.d.ts +11 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.d.ts.map +1 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.js +36 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.js.map +1 -0
- package/dist/src/foundation/schema/index.d.ts +3 -0
- package/dist/src/foundation/schema/index.d.ts.map +1 -0
- package/dist/src/foundation/schema/index.js +3 -0
- package/dist/src/foundation/schema/index.js.map +1 -0
- package/dist/src/foundation/schema/schema.d.ts +3 -0
- package/dist/src/foundation/schema/schema.d.ts.map +1 -0
- package/dist/src/foundation/schema/schema.js +10 -0
- package/dist/src/foundation/schema/schema.js.map +1 -0
- package/dist/src/foundation/schema/yaml.d.ts +10 -0
- package/dist/src/foundation/schema/yaml.d.ts.map +1 -0
- package/dist/src/foundation/schema/yaml.js +60 -0
- package/dist/src/foundation/schema/yaml.js.map +1 -0
- package/dist/src/foundation/schema-capability/index.d.ts +6 -0
- package/dist/src/foundation/schema-capability/index.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/index.js +4 -0
- package/dist/src/foundation/schema-capability/index.js.map +1 -0
- package/dist/src/foundation/schema-capability/inspection.d.ts +38 -0
- package/dist/src/foundation/schema-capability/inspection.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/inspection.js +249 -0
- package/dist/src/foundation/schema-capability/inspection.js.map +1 -0
- package/dist/src/foundation/schema-capability/manifest.d.ts +6 -0
- package/dist/src/foundation/schema-capability/manifest.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/manifest.js +17 -0
- package/dist/src/foundation/schema-capability/manifest.js.map +1 -0
- package/dist/src/foundation/schema-capability/rules.d.ts +38 -0
- package/dist/src/foundation/schema-capability/rules.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/rules.js +297 -0
- package/dist/src/foundation/schema-capability/rules.js.map +1 -0
- package/dist/src/foundation/skill-registration/adoption.d.ts +40 -0
- package/dist/src/foundation/skill-registration/adoption.d.ts.map +1 -0
- package/dist/src/foundation/skill-registration/adoption.js +63 -0
- package/dist/src/foundation/skill-registration/adoption.js.map +1 -0
- package/dist/src/foundation/skill-registration/index.d.ts +2 -0
- package/dist/src/foundation/skill-registration/index.d.ts.map +1 -0
- package/dist/src/foundation/skill-registration/index.js +2 -0
- package/dist/src/foundation/skill-registration/index.js.map +1 -0
- package/dist/src/foundation/skill-registration/rules.d.ts +2 -0
- package/dist/src/foundation/skill-registration/rules.d.ts.map +1 -0
- package/dist/src/foundation/skill-registration/rules.js +2 -0
- package/dist/src/foundation/skill-registration/rules.js.map +1 -0
- package/dist/src/foundation/snapshot/git-snapshot.d.ts +40 -0
- package/dist/src/foundation/snapshot/git-snapshot.d.ts.map +1 -0
- package/dist/src/foundation/snapshot/git-snapshot.js +168 -0
- package/dist/src/foundation/snapshot/git-snapshot.js.map +1 -0
- package/dist/src/foundation/snapshot/index.d.ts +2 -0
- package/dist/src/foundation/snapshot/index.d.ts.map +1 -0
- package/dist/src/foundation/snapshot/index.js +2 -0
- package/dist/src/foundation/snapshot/index.js.map +1 -0
- package/dist/src/foundation/state-transaction/index.d.ts +2 -0
- package/dist/src/foundation/state-transaction/index.d.ts.map +1 -0
- package/dist/src/foundation/state-transaction/index.js +2 -0
- package/dist/src/foundation/state-transaction/index.js.map +1 -0
- package/dist/src/foundation/state-transaction/state-transaction.d.ts +48 -0
- package/dist/src/foundation/state-transaction/state-transaction.d.ts.map +1 -0
- package/dist/src/foundation/state-transaction/state-transaction.js +364 -0
- package/dist/src/foundation/state-transaction/state-transaction.js.map +1 -0
- package/dist/src/foundation/terminal/index.d.ts +2 -0
- package/dist/src/foundation/terminal/index.d.ts.map +1 -0
- package/dist/src/foundation/terminal/index.js +2 -0
- package/dist/src/foundation/terminal/index.js.map +1 -0
- package/dist/src/foundation/terminal/terminal.d.ts +17 -0
- package/dist/src/foundation/terminal/terminal.d.ts.map +1 -0
- package/dist/src/foundation/terminal/terminal.js +12 -0
- package/dist/src/foundation/terminal/terminal.js.map +1 -0
- package/dist/src/foundation/trace/index.d.ts +2 -0
- package/dist/src/foundation/trace/index.d.ts.map +1 -0
- package/dist/src/foundation/trace/index.js +2 -0
- package/dist/src/foundation/trace/index.js.map +1 -0
- package/dist/src/foundation/trace/trace.d.ts +12 -0
- package/dist/src/foundation/trace/trace.d.ts.map +1 -0
- package/dist/src/foundation/trace/trace.js +299 -0
- package/dist/src/foundation/trace/trace.js.map +1 -0
- package/dist/src/foundation/tui/index.d.ts +3 -0
- package/dist/src/foundation/tui/index.d.ts.map +1 -0
- package/dist/src/foundation/tui/index.js +3 -0
- package/dist/src/foundation/tui/index.js.map +1 -0
- package/dist/src/foundation/tui/table.d.ts +10 -0
- package/dist/src/foundation/tui/table.d.ts.map +1 -0
- package/dist/src/foundation/tui/table.js +91 -0
- package/dist/src/foundation/tui/table.js.map +1 -0
- package/dist/src/foundation/tui/tui.d.ts +33 -0
- package/dist/src/foundation/tui/tui.d.ts.map +1 -0
- package/dist/src/foundation/tui/tui.js +157 -0
- package/dist/src/foundation/tui/tui.js.map +1 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +16 -0
- package/dist/src/index.js.map +1 -0
- package/docs/core-concepts.md +48 -7
- package/docs/getting-started.md +60 -45
- package/docs/maintaining.md +132 -9
- package/docs/npm-package-releases.md +38 -9
- package/docs/operations.md +109 -35
- package/docs/reference.md +304 -35
- package/docs/repository-tasks.md +61 -20
- package/package.json +53 -27
- package/schema/capabilities.json +95 -0
- package/schema/capability-manifest.schema.json +139 -0
- package/schema/v1/command-report.schema.json +4 -2
- package/schema/v1/domain-message.schema.json +2 -1
- package/schema/v2/config.schema.json +14 -0
- package/schema/v2/idea-event.schema.json +121 -0
- package/skills/silvermoon/SKILL.md +204 -112
- package/skills/silvermoon/references/adoption.md +55 -24
- package/skills/silvermoon/references/events.md +296 -0
- package/bin/silvermoon.js +0 -10
- package/src/adoption.js +0 -559
- package/src/cli.js +0 -377
- package/src/config.js +0 -253
- package/src/create-idea.js +0 -497
- package/src/dialogue.js +0 -69
- package/src/domain.js +0 -592
- package/src/git-snapshot.js +0 -212
- package/src/git.js +0 -624
- package/src/guidance.js +0 -281
- package/src/idea-layout.js +0 -411
- package/src/idea-metadata.js +0 -48
- package/src/idea-query.js +0 -230
- package/src/idea-templates.js +0 -242
- package/src/ideas.js +0 -142
- package/src/index.js +0 -386
- package/src/language.js +0 -78
- package/src/layout.js +0 -38
- package/src/list-ideas.js +0 -196
- package/src/observation.js +0 -370
- package/src/repository.js +0 -82
- package/src/response.js +0 -492
- package/src/subprocess.js +0 -27
- package/src/trace.js +0 -292
- package/src/tui-table.js +0 -71
- package/src/tui.js +0 -205
- package/src/user-config.js +0 -135
- package/src/whatsnext.js +0 -726
- package/src/yaml.js +0 -66
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { respond } from "../report/index.js";
|
|
3
|
+
import { assertSchemaVersion } from "../schema/index.js";
|
|
4
|
+
export const DOMAIN_MESSAGE_SCHEMA_VERSION = 1;
|
|
5
|
+
const PROGRESS = new Set(["initial", "accepted", "observing", "ready", "blocked"]);
|
|
6
|
+
const TERMINAL_PROGRESS = new Set(["ready", "blocked"]);
|
|
7
|
+
/** @pure */
|
|
8
|
+
function isRecord(value) {
|
|
9
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
10
|
+
}
|
|
11
|
+
/** @pure */
|
|
12
|
+
export function clone(value) {
|
|
13
|
+
return structuredClone(value);
|
|
14
|
+
}
|
|
15
|
+
/** @pure */
|
|
16
|
+
export function deepFreeze(value) {
|
|
17
|
+
const owned = clone(value);
|
|
18
|
+
const pending = owned !== null && typeof owned === "object" ? [owned] : [];
|
|
19
|
+
while (pending.length > 0) {
|
|
20
|
+
const current = pending.pop();
|
|
21
|
+
if (current === undefined || Object.isFrozen(current))
|
|
22
|
+
continue;
|
|
23
|
+
for (const child of Object.values(current)) {
|
|
24
|
+
if (child !== null && typeof child === "object")
|
|
25
|
+
pending.push(child);
|
|
26
|
+
}
|
|
27
|
+
Object.freeze(current);
|
|
28
|
+
}
|
|
29
|
+
return owned;
|
|
30
|
+
}
|
|
31
|
+
/** @pure */
|
|
32
|
+
function frozenClone(value) {
|
|
33
|
+
return deepFreeze(value);
|
|
34
|
+
}
|
|
35
|
+
export class DomainInvariantError extends Error {
|
|
36
|
+
constructor(message) {
|
|
37
|
+
super(message);
|
|
38
|
+
this.name = "DomainInvariantError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** @pure */
|
|
42
|
+
export function initialInternalObservation() {
|
|
43
|
+
return deepFreeze({
|
|
44
|
+
actions: {},
|
|
45
|
+
intention: null,
|
|
46
|
+
nextSequence: 1,
|
|
47
|
+
observation: null,
|
|
48
|
+
progress: "initial",
|
|
49
|
+
responseContext: null,
|
|
50
|
+
responseKind: null,
|
|
51
|
+
responseMetadata: null,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/** @pure */
|
|
55
|
+
function requireMessage(state, message) {
|
|
56
|
+
try {
|
|
57
|
+
assertSchemaVersion(message?.schemaVersion, [DOMAIN_MESSAGE_SCHEMA_VERSION], "domain message schema");
|
|
58
|
+
}
|
|
59
|
+
catch (cause) {
|
|
60
|
+
throw new DomainInvariantError(cause instanceof Error ? cause.message : String(cause));
|
|
61
|
+
}
|
|
62
|
+
if (message.sequence !== state.nextSequence) {
|
|
63
|
+
throw new DomainInvariantError(`Expected domain message sequence ${state.nextSequence}, received ${message.sequence}`);
|
|
64
|
+
}
|
|
65
|
+
if (typeof message.type !== "string" || message.type.length === 0) {
|
|
66
|
+
throw new DomainInvariantError("Domain message type must be a non-empty string");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** @pure */
|
|
70
|
+
function transitionProgress(current, next) {
|
|
71
|
+
if (!PROGRESS.has(next)) {
|
|
72
|
+
throw new DomainInvariantError(`Unknown command progress: ${next}`);
|
|
73
|
+
}
|
|
74
|
+
if (TERMINAL_PROGRESS.has(current)) {
|
|
75
|
+
throw new DomainInvariantError(`Cannot transition command progress from terminal state ${current}`);
|
|
76
|
+
}
|
|
77
|
+
if (current === "initial" && next !== "accepted") {
|
|
78
|
+
throw new DomainInvariantError(`Command progress must transition from initial to accepted, not ${next}`);
|
|
79
|
+
}
|
|
80
|
+
if (current === "accepted" && next === "initial") {
|
|
81
|
+
throw new DomainInvariantError("Command progress cannot return to initial");
|
|
82
|
+
}
|
|
83
|
+
return next;
|
|
84
|
+
}
|
|
85
|
+
/** @pure */
|
|
86
|
+
function applyObservationFact(state, fact) {
|
|
87
|
+
if (typeof fact?.type !== "string" || fact.type.length === 0) {
|
|
88
|
+
throw new DomainInvariantError("Observation fact type must be a non-empty string");
|
|
89
|
+
}
|
|
90
|
+
if (!fact.observation || typeof fact.observation.state !== "string") {
|
|
91
|
+
throw new DomainInvariantError(`${fact.type} requires a structured observation`);
|
|
92
|
+
}
|
|
93
|
+
const progress = transitionProgress(state.progress, fact.progress);
|
|
94
|
+
return {
|
|
95
|
+
...state,
|
|
96
|
+
observation: frozenClone(fact.observation),
|
|
97
|
+
progress,
|
|
98
|
+
responseContext: frozenClone(fact.responseContext ?? {}),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/** @pure */
|
|
102
|
+
export function reduceObservation(state, message) {
|
|
103
|
+
const messageType = message.type;
|
|
104
|
+
requireMessage(state, message);
|
|
105
|
+
let next = { ...state, nextSequence: state.nextSequence + 1 };
|
|
106
|
+
if (message.type === "intention.accepted") {
|
|
107
|
+
if (state.intention !== null) {
|
|
108
|
+
throw new DomainInvariantError("A command can accept only one intention");
|
|
109
|
+
}
|
|
110
|
+
if (!isRecord(message.intention)
|
|
111
|
+
|| typeof message.intention.command !== "string"
|
|
112
|
+
|| !isRecord(message.intention.args)) {
|
|
113
|
+
throw new DomainInvariantError("intention.accepted requires a normalized command and args");
|
|
114
|
+
}
|
|
115
|
+
next.intention = frozenClone(message.intention);
|
|
116
|
+
next.progress = transitionProgress(state.progress, "accepted");
|
|
117
|
+
return deepFreeze(next);
|
|
118
|
+
}
|
|
119
|
+
if (state.intention === null) {
|
|
120
|
+
throw new DomainInvariantError("The first domain message must be intention.accepted");
|
|
121
|
+
}
|
|
122
|
+
if (message.type === "observation.fact") {
|
|
123
|
+
next = applyObservationFact(next, message.fact);
|
|
124
|
+
return deepFreeze(next);
|
|
125
|
+
}
|
|
126
|
+
if (message.type === "action.requested") {
|
|
127
|
+
if (TERMINAL_PROGRESS.has(state.progress)) {
|
|
128
|
+
throw new DomainInvariantError("Cannot request an action after a terminal observation");
|
|
129
|
+
}
|
|
130
|
+
if (state.actions[message.actionId] !== undefined) {
|
|
131
|
+
throw new DomainInvariantError(`Duplicate action id: ${message.actionId}`);
|
|
132
|
+
}
|
|
133
|
+
if (!isRecord(message.action) || typeof message.action.type !== "string") {
|
|
134
|
+
throw new DomainInvariantError(`Action ${message.actionId} requires a structured request`);
|
|
135
|
+
}
|
|
136
|
+
next.actions = {
|
|
137
|
+
...state.actions,
|
|
138
|
+
[message.actionId]: {
|
|
139
|
+
status: "requested",
|
|
140
|
+
type: message.action.type,
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
return deepFreeze(next);
|
|
144
|
+
}
|
|
145
|
+
if (message.type === "action.finished") {
|
|
146
|
+
const requested = state.actions[message.actionId];
|
|
147
|
+
if (requested === undefined) {
|
|
148
|
+
throw new DomainInvariantError(`Action ${message.actionId} finished without being requested`);
|
|
149
|
+
}
|
|
150
|
+
if (requested.status !== "requested") {
|
|
151
|
+
throw new DomainInvariantError(`Action ${message.actionId} finished more than once`);
|
|
152
|
+
}
|
|
153
|
+
if (requested.type !== message.actionType) {
|
|
154
|
+
throw new DomainInvariantError(`Action ${message.actionId} changed type from ${requested.type} to ${message.actionType}`);
|
|
155
|
+
}
|
|
156
|
+
if (!new Set(["success", "failure"]).has(message.status)) {
|
|
157
|
+
throw new DomainInvariantError(`Action ${message.actionId} has invalid status ${message.status}`);
|
|
158
|
+
}
|
|
159
|
+
if (!Array.isArray(message.facts)) {
|
|
160
|
+
throw new DomainInvariantError(`Action ${message.actionId} facts must be an array`);
|
|
161
|
+
}
|
|
162
|
+
if (message.status === "success" && !isRecord(message.result)) {
|
|
163
|
+
throw new DomainInvariantError(`Successful action ${message.actionId} requires a structured result`);
|
|
164
|
+
}
|
|
165
|
+
if (message.status === "failure" && message.problem.type.length === 0) {
|
|
166
|
+
throw new DomainInvariantError(`Failed action ${message.actionId} requires a structured problem`);
|
|
167
|
+
}
|
|
168
|
+
next.actions = {
|
|
169
|
+
...state.actions,
|
|
170
|
+
[message.actionId]: {
|
|
171
|
+
status: message.status,
|
|
172
|
+
type: message.actionType,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
for (const fact of message.facts ?? []) {
|
|
176
|
+
next = applyObservationFact(next, fact);
|
|
177
|
+
}
|
|
178
|
+
return deepFreeze(next);
|
|
179
|
+
}
|
|
180
|
+
if (message.type === "response.created") {
|
|
181
|
+
if (!TERMINAL_PROGRESS.has(state.progress) || state.observation === null) {
|
|
182
|
+
throw new DomainInvariantError("Cannot create a response before a terminal observation");
|
|
183
|
+
}
|
|
184
|
+
if (Object.values(state.actions).some(({ status }) => status === "requested")) {
|
|
185
|
+
throw new DomainInvariantError("Cannot create a response while an action is pending");
|
|
186
|
+
}
|
|
187
|
+
if (state.responseKind !== null) {
|
|
188
|
+
throw new DomainInvariantError("A command can create only one response");
|
|
189
|
+
}
|
|
190
|
+
if (typeof message.kind !== "string"
|
|
191
|
+
|| !isRecord(message.metadata)
|
|
192
|
+
|| !/^[0-9a-f]{64}$/.test(message.metadata.hash)
|
|
193
|
+
|| !Number.isInteger(message.metadata.nextStepCount)
|
|
194
|
+
|| !Number.isInteger(message.metadata.itemCount)) {
|
|
195
|
+
throw new DomainInvariantError("response.created requires a kind and deterministic metadata");
|
|
196
|
+
}
|
|
197
|
+
next.responseKind = message.kind;
|
|
198
|
+
next.responseMetadata = frozenClone(message.metadata);
|
|
199
|
+
return deepFreeze(next);
|
|
200
|
+
}
|
|
201
|
+
throw new DomainInvariantError(`Unknown domain message type: ${messageType}`);
|
|
202
|
+
}
|
|
203
|
+
/** @pure */
|
|
204
|
+
export function replayObservation(messages) {
|
|
205
|
+
return messages.reduce((state, message) => reduceObservation(state, message), initialInternalObservation());
|
|
206
|
+
}
|
|
207
|
+
/** @pure */
|
|
208
|
+
export function projectIntention(messages) {
|
|
209
|
+
const accepted = messages.filter((message) => message.type === "intention.accepted");
|
|
210
|
+
const acceptedMessage = accepted[0];
|
|
211
|
+
if (accepted.length !== 1
|
|
212
|
+
|| acceptedMessage === undefined
|
|
213
|
+
|| messages[0] !== acceptedMessage) {
|
|
214
|
+
throw new DomainInvariantError("A domain stream must begin with exactly one intention.accepted message");
|
|
215
|
+
}
|
|
216
|
+
return clone(acceptedMessage.intention);
|
|
217
|
+
}
|
|
218
|
+
/** @pure */
|
|
219
|
+
export function projectActions(messages, { allowPending = false } = {}) {
|
|
220
|
+
const records = new Map();
|
|
221
|
+
for (const message of messages) {
|
|
222
|
+
if (message.type === "action.requested") {
|
|
223
|
+
if (records.has(message.actionId)) {
|
|
224
|
+
throw new DomainInvariantError(`Duplicate action id: ${message.actionId}`);
|
|
225
|
+
}
|
|
226
|
+
records.set(message.actionId, {
|
|
227
|
+
id: message.actionId,
|
|
228
|
+
type: message.action.type,
|
|
229
|
+
status: "requested",
|
|
230
|
+
});
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (message.type !== "action.finished")
|
|
234
|
+
continue;
|
|
235
|
+
const record = records.get(message.actionId);
|
|
236
|
+
if (record === undefined) {
|
|
237
|
+
throw new DomainInvariantError(`Action ${message.actionId} finished without being requested`);
|
|
238
|
+
}
|
|
239
|
+
if (record.status !== "requested") {
|
|
240
|
+
throw new DomainInvariantError(`Action ${message.actionId} finished more than once`);
|
|
241
|
+
}
|
|
242
|
+
if (record.type !== message.actionType) {
|
|
243
|
+
throw new DomainInvariantError(`Action ${message.actionId} changed type from ${record.type} to ${message.actionType}`);
|
|
244
|
+
}
|
|
245
|
+
record.status = message.status;
|
|
246
|
+
if (message.status === "success") {
|
|
247
|
+
record.result = clone(message.result ?? {});
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
record.problem = clone(message.problem);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (!allowPending
|
|
254
|
+
&& [...records.values()].some(({ status }) => status === "requested")) {
|
|
255
|
+
throw new DomainInvariantError("A final report cannot contain a pending action");
|
|
256
|
+
}
|
|
257
|
+
return [...records.values()].map((record) => {
|
|
258
|
+
if (record.status === "success") {
|
|
259
|
+
return {
|
|
260
|
+
id: record.id,
|
|
261
|
+
type: record.type,
|
|
262
|
+
status: "success",
|
|
263
|
+
result: clone(record.result ?? {}),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
if (record.status === "failure") {
|
|
267
|
+
return {
|
|
268
|
+
id: record.id,
|
|
269
|
+
type: record.type,
|
|
270
|
+
status: "failure",
|
|
271
|
+
problem: clone(record.problem ?? {
|
|
272
|
+
type: "missing-action-problem",
|
|
273
|
+
summary: "Action failed without a problem",
|
|
274
|
+
}),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
return { id: record.id, type: record.type, status: "requested" };
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
/** @pure */
|
|
281
|
+
export function projectPublicObservation(internalObservation) {
|
|
282
|
+
const observation = clone(internalObservation);
|
|
283
|
+
if ((observation.state === "idea-created" || observation.state === "idea-selected")
|
|
284
|
+
&& observation.guidance?.content !== undefined) {
|
|
285
|
+
const { content: _content, ...provenance } = observation.guidance;
|
|
286
|
+
return { ...observation, guidance: provenance };
|
|
287
|
+
}
|
|
288
|
+
return observation;
|
|
289
|
+
}
|
|
290
|
+
/** @pure */
|
|
291
|
+
function responseHash(response) {
|
|
292
|
+
return createHash("sha256")
|
|
293
|
+
.update(JSON.stringify(response))
|
|
294
|
+
.digest("hex");
|
|
295
|
+
}
|
|
296
|
+
/** @pure */
|
|
297
|
+
export function responseMetadata(response) {
|
|
298
|
+
return {
|
|
299
|
+
hash: responseHash(response),
|
|
300
|
+
nextStepCount: "nextSteps" in response ? response.nextSteps.length : 0,
|
|
301
|
+
itemCount: response.kind === "idea-list"
|
|
302
|
+
? response.items.length
|
|
303
|
+
: response.kind === "choice-required"
|
|
304
|
+
? response.choices.length
|
|
305
|
+
: 0,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
/** @pure */
|
|
309
|
+
export function completionFactType(intention, observation) {
|
|
310
|
+
if (intention.command === "check") {
|
|
311
|
+
return observation.state === "project-ready"
|
|
312
|
+
? "validation.completed"
|
|
313
|
+
: "validation.failed";
|
|
314
|
+
}
|
|
315
|
+
const byState = {
|
|
316
|
+
"idea-create-failed": "idea.creation-failed",
|
|
317
|
+
"idea-created": "idea.created",
|
|
318
|
+
"idea-not-found": "idea.selection-missed",
|
|
319
|
+
"idea-selected": observation.state === "idea-selected"
|
|
320
|
+
&& observation.guidance === undefined
|
|
321
|
+
? "idea.selected"
|
|
322
|
+
: "guidance.selected",
|
|
323
|
+
"ideas-listed": "ideas.listed",
|
|
324
|
+
"navigation-ready": "idea.navigation-ready",
|
|
325
|
+
"phase-guidance-invalid": "guidance.validation-failed",
|
|
326
|
+
"project-setup-required": "project.readiness-blocked",
|
|
327
|
+
"repository-preparation-required": "repository.readiness-blocked",
|
|
328
|
+
"repository-sync-required": "repository.readiness-blocked",
|
|
329
|
+
};
|
|
330
|
+
return byState[observation.state] ?? "command.completed";
|
|
331
|
+
}
|
|
332
|
+
/** @pure */
|
|
333
|
+
export function buildReport(messages, { requireResponse = true } = {}) {
|
|
334
|
+
const state = replayObservation(messages);
|
|
335
|
+
if (state.observation === null || !TERMINAL_PROGRESS.has(state.progress)) {
|
|
336
|
+
throw new DomainInvariantError("A final report requires a terminal observation");
|
|
337
|
+
}
|
|
338
|
+
const intention = projectIntention(messages);
|
|
339
|
+
const response = respond(intention, {
|
|
340
|
+
observation: state.observation,
|
|
341
|
+
responseContext: state.responseContext,
|
|
342
|
+
});
|
|
343
|
+
if (requireResponse && state.responseKind === null) {
|
|
344
|
+
throw new DomainInvariantError("A final report requires one response.created message");
|
|
345
|
+
}
|
|
346
|
+
if (state.responseKind !== null && state.responseKind !== response.kind) {
|
|
347
|
+
throw new DomainInvariantError(`Response kind changed from ${state.responseKind} to ${response.kind}`);
|
|
348
|
+
}
|
|
349
|
+
if (state.responseMetadata !== null
|
|
350
|
+
&& JSON.stringify(state.responseMetadata) !== JSON.stringify(responseMetadata(response))) {
|
|
351
|
+
throw new DomainInvariantError("Response metadata does not match the projected response");
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
intention,
|
|
355
|
+
observation: projectPublicObservation(state.observation),
|
|
356
|
+
actions: projectActions(messages),
|
|
357
|
+
response,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
/** @pure */
|
|
361
|
+
export function projectReport(messages) {
|
|
362
|
+
return buildReport(messages);
|
|
363
|
+
}
|
|
364
|
+
//# sourceMappingURL=observation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.js","sourceRoot":"","sources":["../../../../src/foundation/command-message/observation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AASzD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACnF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AA4GxD,YAAY;AACZ,SAAS,QAAQ,CAAC,KAAgC;IAChD,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,YAAY;AACZ,MAAM,UAAU,KAAK,CAAI,KAAQ;IAC/B,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED,YAAY;AACZ,MAAM,UAAU,UAAU,CAAI,KAAQ;IACpC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,OAAO,GACX,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC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;AAC/B,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { buildReport } from "./observation.ts";
|
|
2
|
+
import type { ActionRequest, CommandProgress, DomainMessage, InternalObservation, ObservationFact } from "./observation.ts";
|
|
3
|
+
import type { CommandIntention, Observation, Problem, ResponseContext } from "../report/types.ts";
|
|
4
|
+
interface ActionSuccess<Result extends object> {
|
|
5
|
+
status: "success";
|
|
6
|
+
result: Result;
|
|
7
|
+
facts?: ObservationFact[];
|
|
8
|
+
}
|
|
9
|
+
interface ActionFailure<Internal extends object = Record<never, never>> {
|
|
10
|
+
status: "failure";
|
|
11
|
+
problem: Problem;
|
|
12
|
+
facts?: ObservationFact[];
|
|
13
|
+
internal?: Internal;
|
|
14
|
+
}
|
|
15
|
+
type ActionCompletion<Result extends object, Internal extends object = Record<never, never>> = ActionSuccess<Result> | ActionFailure<Internal>;
|
|
16
|
+
interface ActionFailureMapping<Internal extends object> {
|
|
17
|
+
problem: Problem;
|
|
18
|
+
facts?: ObservationFact[];
|
|
19
|
+
internal?: Internal;
|
|
20
|
+
}
|
|
21
|
+
interface ObserveOptions {
|
|
22
|
+
factType?: string;
|
|
23
|
+
progress?: CommandProgress;
|
|
24
|
+
responseContext?: ResponseContext;
|
|
25
|
+
}
|
|
26
|
+
interface CompleteOptions {
|
|
27
|
+
factType?: string;
|
|
28
|
+
}
|
|
29
|
+
interface CommandRunApi {
|
|
30
|
+
eventSink: (message: DomainMessage) => void;
|
|
31
|
+
readonly events: DomainMessage[];
|
|
32
|
+
readonly observation: InternalObservation;
|
|
33
|
+
observe(observation: Observation, options?: ObserveOptions): DomainMessage;
|
|
34
|
+
requestAction(action: ActionRequest): string;
|
|
35
|
+
finishAction(actionId: string, actionType: string, completion: ActionCompletion<object, object>): DomainMessage;
|
|
36
|
+
performAction<Result extends object, ProjectedResult extends object = Result, Internal extends object = Record<never, never>>(action: ActionRequest, execute: (context: {
|
|
37
|
+
actionId: string;
|
|
38
|
+
}) => Result | Promise<Result>, mapError?: (caught: unknown) => ActionFailureMapping<Internal>, mapSuccess?: (completed: Result) => {
|
|
39
|
+
result: ProjectedResult;
|
|
40
|
+
facts?: ObservationFact[];
|
|
41
|
+
}): Promise<ActionCompletion<Result | ProjectedResult, Internal>>;
|
|
42
|
+
finish(): ReturnType<typeof buildReport>;
|
|
43
|
+
complete(observation: Observation, responseContext?: ResponseContext, options?: CompleteOptions): ReturnType<typeof buildReport>;
|
|
44
|
+
}
|
|
45
|
+
interface CreateCommandRunOptions {
|
|
46
|
+
eventSink?: (message: DomainMessage) => void;
|
|
47
|
+
dispatch?: CommandRunApi;
|
|
48
|
+
onReady?: (run: CommandRunApi) => void;
|
|
49
|
+
}
|
|
50
|
+
export declare function createCommandRun(intention: CommandIntention, { eventSink, dispatch, onReady, }?: CreateCommandRunOptions): CommandRunApi;
|
|
51
|
+
export declare class CommandRun implements CommandRunApi {
|
|
52
|
+
#private;
|
|
53
|
+
eventSink: (message: DomainMessage) => void;
|
|
54
|
+
constructor(intention: CommandIntention, { eventSink }?: Pick<CreateCommandRunOptions, "eventSink">);
|
|
55
|
+
get events(): DomainMessage[];
|
|
56
|
+
get observation(): InternalObservation;
|
|
57
|
+
observe(observation: Observation, options?: ObserveOptions): DomainMessage;
|
|
58
|
+
requestAction(action: ActionRequest): string;
|
|
59
|
+
finishAction(actionId: string, actionType: string, completion: ActionCompletion<object, object>): DomainMessage;
|
|
60
|
+
performAction<Result extends object, ProjectedResult extends object = Result, Internal extends object = Record<never, never>>(action: ActionRequest, execute: (context: {
|
|
61
|
+
actionId: string;
|
|
62
|
+
}) => Result | Promise<Result>, mapError?: (caught: unknown) => ActionFailureMapping<Internal>, mapSuccess?: (completed: Result) => {
|
|
63
|
+
result: ProjectedResult;
|
|
64
|
+
facts?: ObservationFact[];
|
|
65
|
+
}): Promise<ActionCompletion<Result | ProjectedResult, Internal>>;
|
|
66
|
+
finish(): {
|
|
67
|
+
intention: CommandIntention;
|
|
68
|
+
observation: import("../report/types.ts").ProjectSetupObservation | import("../report/types.ts").CheckUnavailableObservation | import("../report/types.ts").ProjectReadyObservation | import("../report/types.ts").RepositoryBlockedObservation | import("../report/types.ts").NavigationReadyObservation | import("../report/types.ts").IdeaNotFoundObservation | import("../report/types.ts").IdeaSelectedObservation | import("../report/types.ts").IdeaCreatedObservation | import("../report/types.ts").IdeasListedObservation | import("../report/types.ts").EventResultObservation | {
|
|
69
|
+
guidance: {
|
|
70
|
+
phase: string;
|
|
71
|
+
path: string;
|
|
72
|
+
contentRevision: string;
|
|
73
|
+
};
|
|
74
|
+
state: "idea-selected";
|
|
75
|
+
configuration: import("../report/types.ts").ProjectConfiguration;
|
|
76
|
+
version: import("../report/types.ts").ProjectVersion;
|
|
77
|
+
selectedIdea: import("../report/types.ts").IdeaReference;
|
|
78
|
+
root: string;
|
|
79
|
+
outputLanguage: string;
|
|
80
|
+
problems: Problem[];
|
|
81
|
+
device?: import("../report/types.ts").DeviceAdvisory;
|
|
82
|
+
schemas?: import("../schema-capability/inspection.ts").ProjectSchemaReadiness;
|
|
83
|
+
} | {
|
|
84
|
+
guidance: {
|
|
85
|
+
phase: string;
|
|
86
|
+
path: string;
|
|
87
|
+
contentRevision: string;
|
|
88
|
+
};
|
|
89
|
+
state: "idea-created";
|
|
90
|
+
configuration: import("../report/types.ts").ProjectConfiguration;
|
|
91
|
+
version: import("../report/types.ts").ProjectVersion;
|
|
92
|
+
createdIdea: import("../report/types.ts").CreatedIdea;
|
|
93
|
+
root: string;
|
|
94
|
+
outputLanguage: string;
|
|
95
|
+
problems: Problem[];
|
|
96
|
+
device?: import("../report/types.ts").DeviceAdvisory;
|
|
97
|
+
schemas?: import("../schema-capability/inspection.ts").ProjectSchemaReadiness;
|
|
98
|
+
};
|
|
99
|
+
actions: import("./observation.ts").ProjectedAction[];
|
|
100
|
+
response: import("../report/types.ts").ReportResponse;
|
|
101
|
+
};
|
|
102
|
+
complete(observation: Observation, responseContext?: ResponseContext, options?: CompleteOptions): {
|
|
103
|
+
intention: CommandIntention;
|
|
104
|
+
observation: import("../report/types.ts").ProjectSetupObservation | import("../report/types.ts").CheckUnavailableObservation | import("../report/types.ts").ProjectReadyObservation | import("../report/types.ts").RepositoryBlockedObservation | import("../report/types.ts").NavigationReadyObservation | import("../report/types.ts").IdeaNotFoundObservation | import("../report/types.ts").IdeaSelectedObservation | import("../report/types.ts").IdeaCreatedObservation | import("../report/types.ts").IdeasListedObservation | import("../report/types.ts").EventResultObservation | {
|
|
105
|
+
guidance: {
|
|
106
|
+
phase: string;
|
|
107
|
+
path: string;
|
|
108
|
+
contentRevision: string;
|
|
109
|
+
};
|
|
110
|
+
state: "idea-selected";
|
|
111
|
+
configuration: import("../report/types.ts").ProjectConfiguration;
|
|
112
|
+
version: import("../report/types.ts").ProjectVersion;
|
|
113
|
+
selectedIdea: import("../report/types.ts").IdeaReference;
|
|
114
|
+
root: string;
|
|
115
|
+
outputLanguage: string;
|
|
116
|
+
problems: Problem[];
|
|
117
|
+
device?: import("../report/types.ts").DeviceAdvisory;
|
|
118
|
+
schemas?: import("../schema-capability/inspection.ts").ProjectSchemaReadiness;
|
|
119
|
+
} | {
|
|
120
|
+
guidance: {
|
|
121
|
+
phase: string;
|
|
122
|
+
path: string;
|
|
123
|
+
contentRevision: string;
|
|
124
|
+
};
|
|
125
|
+
state: "idea-created";
|
|
126
|
+
configuration: import("../report/types.ts").ProjectConfiguration;
|
|
127
|
+
version: import("../report/types.ts").ProjectVersion;
|
|
128
|
+
createdIdea: import("../report/types.ts").CreatedIdea;
|
|
129
|
+
root: string;
|
|
130
|
+
outputLanguage: string;
|
|
131
|
+
problems: Problem[];
|
|
132
|
+
device?: import("../report/types.ts").DeviceAdvisory;
|
|
133
|
+
schemas?: import("../schema-capability/inspection.ts").ProjectSchemaReadiness;
|
|
134
|
+
};
|
|
135
|
+
actions: import("./observation.ts").ProjectedAction[];
|
|
136
|
+
response: import("../report/types.ts").ReportResponse;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
interface ResponseDecision {
|
|
140
|
+
type: "response";
|
|
141
|
+
observation?: Observation;
|
|
142
|
+
responseContext?: ResponseContext;
|
|
143
|
+
}
|
|
144
|
+
interface ProbeDecision {
|
|
145
|
+
type: "probe";
|
|
146
|
+
effect: object;
|
|
147
|
+
factType?: string;
|
|
148
|
+
}
|
|
149
|
+
interface ActionDecision {
|
|
150
|
+
type: "action";
|
|
151
|
+
effect: ActionRequest;
|
|
152
|
+
mapError?: (caught: unknown) => ActionFailureMapping<object>;
|
|
153
|
+
}
|
|
154
|
+
type CommandDecision = ResponseDecision | ProbeDecision | ActionDecision;
|
|
155
|
+
interface CommandPorts {
|
|
156
|
+
probe(effect: object): Promise<{
|
|
157
|
+
observation: Observation;
|
|
158
|
+
factType?: string;
|
|
159
|
+
progress?: CommandProgress;
|
|
160
|
+
responseContext?: ResponseContext;
|
|
161
|
+
}>;
|
|
162
|
+
action(effect: ActionRequest, context: {
|
|
163
|
+
actionId: string;
|
|
164
|
+
}): {
|
|
165
|
+
result?: object;
|
|
166
|
+
facts?: ObservationFact[];
|
|
167
|
+
} | Promise<{
|
|
168
|
+
result?: object;
|
|
169
|
+
facts?: ObservationFact[];
|
|
170
|
+
}>;
|
|
171
|
+
}
|
|
172
|
+
export declare function driveCommand({ decide, intention, ports, responseContext, }: {
|
|
173
|
+
decide: (intention: CommandIntention, observation: InternalObservation) => CommandDecision;
|
|
174
|
+
intention: CommandIntention;
|
|
175
|
+
ports: CommandPorts;
|
|
176
|
+
responseContext?: ResponseContext;
|
|
177
|
+
}): Promise<{
|
|
178
|
+
intention: CommandIntention;
|
|
179
|
+
observation: import("../report/types.ts").ProjectSetupObservation | import("../report/types.ts").CheckUnavailableObservation | import("../report/types.ts").ProjectReadyObservation | import("../report/types.ts").RepositoryBlockedObservation | import("../report/types.ts").NavigationReadyObservation | import("../report/types.ts").IdeaNotFoundObservation | import("../report/types.ts").IdeaSelectedObservation | import("../report/types.ts").IdeaCreatedObservation | import("../report/types.ts").IdeasListedObservation | import("../report/types.ts").EventResultObservation | {
|
|
180
|
+
guidance: {
|
|
181
|
+
phase: string;
|
|
182
|
+
path: string;
|
|
183
|
+
contentRevision: string;
|
|
184
|
+
};
|
|
185
|
+
state: "idea-selected";
|
|
186
|
+
configuration: import("../report/types.ts").ProjectConfiguration;
|
|
187
|
+
version: import("../report/types.ts").ProjectVersion;
|
|
188
|
+
selectedIdea: import("../report/types.ts").IdeaReference;
|
|
189
|
+
root: string;
|
|
190
|
+
outputLanguage: string;
|
|
191
|
+
problems: Problem[];
|
|
192
|
+
device?: import("../report/types.ts").DeviceAdvisory;
|
|
193
|
+
schemas?: import("../schema-capability/inspection.ts").ProjectSchemaReadiness;
|
|
194
|
+
} | {
|
|
195
|
+
guidance: {
|
|
196
|
+
phase: string;
|
|
197
|
+
path: string;
|
|
198
|
+
contentRevision: string;
|
|
199
|
+
};
|
|
200
|
+
state: "idea-created";
|
|
201
|
+
configuration: import("../report/types.ts").ProjectConfiguration;
|
|
202
|
+
version: import("../report/types.ts").ProjectVersion;
|
|
203
|
+
createdIdea: import("../report/types.ts").CreatedIdea;
|
|
204
|
+
root: string;
|
|
205
|
+
outputLanguage: string;
|
|
206
|
+
problems: Problem[];
|
|
207
|
+
device?: import("../report/types.ts").DeviceAdvisory;
|
|
208
|
+
schemas?: import("../schema-capability/inspection.ts").ProjectSchemaReadiness;
|
|
209
|
+
};
|
|
210
|
+
actions: import("./observation.ts").ProjectedAction[];
|
|
211
|
+
response: import("../report/types.ts").ReportResponse;
|
|
212
|
+
}>;
|
|
213
|
+
export {};
|
|
214
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/foundation/command-message/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EASZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,aAAa,EACb,mBAAmB,EACn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