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,172 @@
|
|
|
1
|
+
export type EventCodecOptions = {
|
|
2
|
+
objectIdLength?: number;
|
|
3
|
+
legacy?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type EventSource = string | NodeJS.ArrayBufferView | ArrayBuffer;
|
|
6
|
+
type EventPayload = Record<string, string | null>;
|
|
7
|
+
type SignalEvent = {
|
|
8
|
+
sequence: number;
|
|
9
|
+
type: "ping" | "pong";
|
|
10
|
+
payload: EventPayload & {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type FieldEvent = {
|
|
15
|
+
sequence: number;
|
|
16
|
+
type: "setAlias" | "setLanguage" | "submitIdeal" | "submitInner" | "submitOuter" | "acceptIdeal" | "acceptInner" | "acceptOuter" | "alias.updated" | "language.updated" | "ideal.approved" | "implementation.accepted" | "deployment.accepted";
|
|
17
|
+
payload: EventPayload;
|
|
18
|
+
};
|
|
19
|
+
type StateEvent = {
|
|
20
|
+
sequence: number;
|
|
21
|
+
type: "abandon" | "resume" | "idea.abandoned" | "idea.resumed";
|
|
22
|
+
};
|
|
23
|
+
export type IdeaEvent = SignalEvent | FieldEvent | StateEvent;
|
|
24
|
+
export type IdeaEventStatus = Record<string, string | true | undefined> & {
|
|
25
|
+
id: string;
|
|
26
|
+
alias?: string;
|
|
27
|
+
language?: string;
|
|
28
|
+
abandoned?: true;
|
|
29
|
+
approvedRevision?: string;
|
|
30
|
+
implementationAcceptedRevision?: string;
|
|
31
|
+
deploymentAcceptedRevision?: string;
|
|
32
|
+
submittedIdealRevision?: string;
|
|
33
|
+
submittedImplementationRevision?: string;
|
|
34
|
+
submittedDeploymentRevision?: string;
|
|
35
|
+
};
|
|
36
|
+
export type IdeaControlOwner = "upstream" | "downstream" | "none";
|
|
37
|
+
export interface IdeaControl {
|
|
38
|
+
owner: IdeaControlOwner;
|
|
39
|
+
lastTransfer: {
|
|
40
|
+
sequence: number;
|
|
41
|
+
type: "ping" | "pong" | "submitIdeal" | "submitInner" | "submitOuter" | "acceptIdeal" | "acceptInner" | "acceptOuter" | "abandon" | "resume";
|
|
42
|
+
} | null;
|
|
43
|
+
}
|
|
44
|
+
export type IdeaEventState = {
|
|
45
|
+
status: IdeaEventStatus;
|
|
46
|
+
sequence: number;
|
|
47
|
+
interaction?: {
|
|
48
|
+
messages: Array<{
|
|
49
|
+
sequence: number;
|
|
50
|
+
type: "ping" | "pong";
|
|
51
|
+
message: string;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
control?: IdeaControl;
|
|
55
|
+
};
|
|
56
|
+
export type IdeaEventReduction = {
|
|
57
|
+
ok: false;
|
|
58
|
+
code: string;
|
|
59
|
+
sequence: number;
|
|
60
|
+
} | {
|
|
61
|
+
ok: true;
|
|
62
|
+
state: IdeaEventState;
|
|
63
|
+
};
|
|
64
|
+
/** @pure */
|
|
65
|
+
export declare function eventLifecycleStatus(status: IdeaEventStatus): {
|
|
66
|
+
version: 1;
|
|
67
|
+
id: string;
|
|
68
|
+
alias?: string;
|
|
69
|
+
language?: string;
|
|
70
|
+
abandoned?: true;
|
|
71
|
+
approvedRevision?: string;
|
|
72
|
+
implementationAcceptedRevision?: string;
|
|
73
|
+
deploymentAcceptedRevision?: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const EVENT_RENAMES: Readonly<Record<string, string>>;
|
|
76
|
+
export declare const LEGACY_EVENT_TYPES: readonly string[];
|
|
77
|
+
export declare const IDEA_EVENT_TYPES: readonly string[];
|
|
78
|
+
/** @pure */
|
|
79
|
+
export declare function renameLegacyEvents(events: unknown[]): ({
|
|
80
|
+
type: string;
|
|
81
|
+
sequence: number;
|
|
82
|
+
payload: EventPayload & {
|
|
83
|
+
message: string;
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
type: string;
|
|
87
|
+
sequence: number;
|
|
88
|
+
payload: EventPayload;
|
|
89
|
+
} | {
|
|
90
|
+
type: string;
|
|
91
|
+
sequence: number;
|
|
92
|
+
})[];
|
|
93
|
+
export declare const EVENT_PERMISSIONS: Readonly<{
|
|
94
|
+
setAlias: "both";
|
|
95
|
+
setLanguage: "both";
|
|
96
|
+
submitIdeal: "downstream";
|
|
97
|
+
submitInner: "downstream";
|
|
98
|
+
submitOuter: "downstream";
|
|
99
|
+
acceptIdeal: "upstream";
|
|
100
|
+
acceptInner: "upstream";
|
|
101
|
+
acceptOuter: "upstream";
|
|
102
|
+
abandon: "upstream";
|
|
103
|
+
resume: "upstream";
|
|
104
|
+
ping: "upstream";
|
|
105
|
+
pong: "downstream";
|
|
106
|
+
}>;
|
|
107
|
+
export declare class IdeaEventFormatError extends Error {
|
|
108
|
+
constructor(message: string, options?: ErrorOptions);
|
|
109
|
+
}
|
|
110
|
+
/** @pure */
|
|
111
|
+
export declare function validateIdeaEvent(event: unknown, options?: EventCodecOptions): IdeaEvent;
|
|
112
|
+
/** @pure */
|
|
113
|
+
export declare function serializeIdeaEvent(event: unknown, options?: EventCodecOptions): string;
|
|
114
|
+
/** @pure */
|
|
115
|
+
export declare function serializeIdeaEvents(events: unknown, options?: EventCodecOptions): string;
|
|
116
|
+
/** @pure */
|
|
117
|
+
export declare function parseIdeaEvents(source: EventSource | undefined, options?: EventCodecOptions): IdeaEvent[];
|
|
118
|
+
/** @pure */
|
|
119
|
+
export declare function initialEventState(ideaId: string | undefined, options?: EventCodecOptions): IdeaEventState;
|
|
120
|
+
/** @pure */
|
|
121
|
+
export declare function reduceIdeaEvent(before: IdeaEventState, event: unknown, options?: EventCodecOptions): IdeaEventReduction;
|
|
122
|
+
/** @pure */
|
|
123
|
+
export declare function replayIdeaEvents(ideaId: string, events: readonly unknown[], options?: EventCodecOptions): IdeaEventReduction;
|
|
124
|
+
/** @pure */
|
|
125
|
+
export declare function eventsFromStatus(status: IdeaEventStatus & {
|
|
126
|
+
version: 1;
|
|
127
|
+
}, options?: EventCodecOptions): ({
|
|
128
|
+
sequence: number;
|
|
129
|
+
type: string | undefined;
|
|
130
|
+
payload: {
|
|
131
|
+
[x: string]: string | true | undefined;
|
|
132
|
+
};
|
|
133
|
+
} | {
|
|
134
|
+
sequence: number;
|
|
135
|
+
type: string;
|
|
136
|
+
payload?: never;
|
|
137
|
+
})[];
|
|
138
|
+
/** @pure */
|
|
139
|
+
export declare function checkEventChange(ideaId: string, baseSource: EventSource, candidateSource: EventSource, options?: EventCodecOptions): {
|
|
140
|
+
ok: boolean;
|
|
141
|
+
mode: string;
|
|
142
|
+
base: IdeaEventReduction;
|
|
143
|
+
candidate: {
|
|
144
|
+
ok: false;
|
|
145
|
+
code: string;
|
|
146
|
+
sequence: number;
|
|
147
|
+
};
|
|
148
|
+
code: string;
|
|
149
|
+
} | {
|
|
150
|
+
ok: boolean;
|
|
151
|
+
mode: string;
|
|
152
|
+
base: {
|
|
153
|
+
ok: true;
|
|
154
|
+
state: IdeaEventState;
|
|
155
|
+
};
|
|
156
|
+
candidate: {
|
|
157
|
+
ok: true;
|
|
158
|
+
state: IdeaEventState;
|
|
159
|
+
};
|
|
160
|
+
code: string;
|
|
161
|
+
} | {
|
|
162
|
+
ok: boolean;
|
|
163
|
+
mode: string;
|
|
164
|
+
base: IdeaEventReduction;
|
|
165
|
+
candidate: {
|
|
166
|
+
ok: true;
|
|
167
|
+
state: IdeaEventState;
|
|
168
|
+
};
|
|
169
|
+
code?: never;
|
|
170
|
+
};
|
|
171
|
+
export {};
|
|
172
|
+
//# sourceMappingURL=grammar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../../../../src/foundation/event-codec/grammar.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,WAAW,GAAG,MAAM,GAAC,MAAM,CAAC,eAAe,GAAC,WAAW,CAAC;AAC7D,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAA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MAAM,EAAE,SAAS,OAAO,EAAE,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,kBAAkB,CAQpB;AAGD,YAAY;AACZ,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,eAAe,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,EACxC,OAAO,CAAC,EAAE,iBAAiB;;;;;;;;;;KAc5B;AAED,YAAY;AACZ,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,WAAW,EACvB,eAAe,EAAE,WAAW,EAC5B,OAAO,CAAC,EAAE,iBAAiB;;;;;YA1YnB,KAAK;cAAQ,MAAM;kBAAY,MAAM;;;;;;;YACrC,IAAI;eAAS,cAAc;;;YAA3B,IAAI;eAAS,cAAc;;;;;;;;YAA3B,IAAI;eAAS,cAAc;;;EA+ZpC"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from "node:util";
|
|
2
|
+
import { isValidUlid, validateIdeaStatus } from "../idea-model/index.js";
|
|
3
|
+
/** @pure */
|
|
4
|
+
export function eventLifecycleStatus(status) {
|
|
5
|
+
return validateIdeaStatus({
|
|
6
|
+
version: 1,
|
|
7
|
+
id: status.id,
|
|
8
|
+
...(status.alias === undefined ? {} : { alias: status.alias }),
|
|
9
|
+
...(status.language === undefined ? {} : { language: status.language }),
|
|
10
|
+
...(status.abandoned === undefined ? {} : { abandoned: status.abandoned }),
|
|
11
|
+
...(status.approvedRevision === undefined
|
|
12
|
+
? {}
|
|
13
|
+
: { approvedRevision: status.approvedRevision }),
|
|
14
|
+
...(status.implementationAcceptedRevision === undefined
|
|
15
|
+
? {}
|
|
16
|
+
: {
|
|
17
|
+
implementationAcceptedRevision: status.implementationAcceptedRevision,
|
|
18
|
+
}),
|
|
19
|
+
...(status.deploymentAcceptedRevision === undefined
|
|
20
|
+
? {}
|
|
21
|
+
: {
|
|
22
|
+
deploymentAcceptedRevision: status.deploymentAcceptedRevision,
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const LEGACY_FIELDS = Object.freeze({
|
|
27
|
+
"alias.updated": ["alias", "alias"],
|
|
28
|
+
"language.updated": ["language", "language"],
|
|
29
|
+
"ideal.approved": ["idealRevision", "approvedRevision"],
|
|
30
|
+
"implementation.accepted": ["implementationRevision", "implementationAcceptedRevision"],
|
|
31
|
+
"deployment.accepted": ["deploymentRevision", "deploymentAcceptedRevision"],
|
|
32
|
+
});
|
|
33
|
+
const SUBMISSION_FIELDS = Object.freeze({
|
|
34
|
+
submitIdeal: ["idealRevision", "submittedIdealRevision", "approvedRevision"],
|
|
35
|
+
submitInner: [
|
|
36
|
+
"implementationRevision",
|
|
37
|
+
"submittedImplementationRevision",
|
|
38
|
+
"implementationAcceptedRevision",
|
|
39
|
+
],
|
|
40
|
+
submitOuter: [
|
|
41
|
+
"deploymentRevision",
|
|
42
|
+
"submittedDeploymentRevision",
|
|
43
|
+
"deploymentAcceptedRevision",
|
|
44
|
+
],
|
|
45
|
+
});
|
|
46
|
+
export const EVENT_RENAMES = Object.freeze({
|
|
47
|
+
"alias.updated": "setAlias",
|
|
48
|
+
"language.updated": "setLanguage",
|
|
49
|
+
"ideal.approved": "acceptIdeal",
|
|
50
|
+
"implementation.accepted": "acceptInner",
|
|
51
|
+
"deployment.accepted": "acceptOuter",
|
|
52
|
+
"idea.abandoned": "abandon",
|
|
53
|
+
"idea.resumed": "resume",
|
|
54
|
+
});
|
|
55
|
+
export const LEGACY_EVENT_TYPES = Object.freeze([
|
|
56
|
+
...Object.keys(LEGACY_FIELDS), "idea.abandoned", "idea.resumed",
|
|
57
|
+
]);
|
|
58
|
+
export const IDEA_EVENT_TYPES = Object.freeze([
|
|
59
|
+
...Object.values(EVENT_RENAMES),
|
|
60
|
+
...Object.keys(SUBMISSION_FIELDS),
|
|
61
|
+
"ping",
|
|
62
|
+
"pong",
|
|
63
|
+
]);
|
|
64
|
+
/** @pure */
|
|
65
|
+
export function renameLegacyEvents(events) {
|
|
66
|
+
return events.map((event) => {
|
|
67
|
+
const validated = validateIdeaEvent(event, { legacy: true });
|
|
68
|
+
const type = EVENT_RENAMES[validated.type];
|
|
69
|
+
if (!type)
|
|
70
|
+
throw new IdeaEventFormatError(`unsupported legacy event type: ${validated.type}`);
|
|
71
|
+
return { ...validated, type };
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export const EVENT_PERMISSIONS = Object.freeze({
|
|
75
|
+
setAlias: "both",
|
|
76
|
+
setLanguage: "both",
|
|
77
|
+
submitIdeal: "downstream",
|
|
78
|
+
submitInner: "downstream",
|
|
79
|
+
submitOuter: "downstream",
|
|
80
|
+
acceptIdeal: "upstream",
|
|
81
|
+
acceptInner: "upstream",
|
|
82
|
+
acceptOuter: "upstream",
|
|
83
|
+
abandon: "upstream",
|
|
84
|
+
resume: "upstream",
|
|
85
|
+
ping: "upstream",
|
|
86
|
+
pong: "downstream",
|
|
87
|
+
});
|
|
88
|
+
const LEGACY_TYPES = Object.fromEntries(Object.entries(EVENT_RENAMES).map(([legacy, current]) => [current, legacy]));
|
|
89
|
+
const CONTROL_OWNERS = Object.freeze({
|
|
90
|
+
ping: "downstream",
|
|
91
|
+
pong: "upstream",
|
|
92
|
+
submitIdeal: "upstream",
|
|
93
|
+
submitInner: "upstream",
|
|
94
|
+
submitOuter: "upstream",
|
|
95
|
+
acceptIdeal: "downstream",
|
|
96
|
+
acceptInner: "downstream",
|
|
97
|
+
acceptOuter: "none",
|
|
98
|
+
abandon: "none",
|
|
99
|
+
resume: "downstream",
|
|
100
|
+
});
|
|
101
|
+
const VALIDATION_ID = "00000000000000000000000000";
|
|
102
|
+
/** @pure */
|
|
103
|
+
function fieldDefinition(type, legacy) {
|
|
104
|
+
if (legacy)
|
|
105
|
+
return LEGACY_FIELDS[type];
|
|
106
|
+
const legacyType = LEGACY_TYPES[type];
|
|
107
|
+
return (legacyType === undefined ? undefined : LEGACY_FIELDS[legacyType])
|
|
108
|
+
?? SUBMISSION_FIELDS[type];
|
|
109
|
+
}
|
|
110
|
+
export class IdeaEventFormatError extends Error {
|
|
111
|
+
constructor(message, options) {
|
|
112
|
+
super(`Invalid idea events: ${message}`, options);
|
|
113
|
+
this.name = "IdeaEventFormatError";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** @pure */
|
|
117
|
+
function keys(value, expected, label) {
|
|
118
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)
|
|
119
|
+
|| Object.keys(value).length !== expected.length
|
|
120
|
+
|| expected.some((key) => !Object.hasOwn(value, key)))
|
|
121
|
+
throw new IdeaEventFormatError(`${label} requires exactly ${expected.join(", ")}`);
|
|
122
|
+
}
|
|
123
|
+
/** @pure */
|
|
124
|
+
function errorMessage(cause) {
|
|
125
|
+
return cause instanceof Error ? cause.message : String(cause);
|
|
126
|
+
}
|
|
127
|
+
/** @pure */
|
|
128
|
+
function isRecord(value) {
|
|
129
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
130
|
+
}
|
|
131
|
+
/** @pure */
|
|
132
|
+
function payloadValue(event, key) {
|
|
133
|
+
if (!("payload" in event)) {
|
|
134
|
+
throw new IdeaEventFormatError(`payload requires exactly ${key}`);
|
|
135
|
+
}
|
|
136
|
+
const value = event.payload[key];
|
|
137
|
+
if (typeof value !== "string" && value !== null) {
|
|
138
|
+
throw new IdeaEventFormatError(`payload requires exactly ${key}`);
|
|
139
|
+
}
|
|
140
|
+
return value;
|
|
141
|
+
}
|
|
142
|
+
/** @pure */
|
|
143
|
+
function assertValidIdeaEvent(event, options) {
|
|
144
|
+
const legacy = options?.legacy === true;
|
|
145
|
+
const type = isRecord(event) ? event.type : undefined;
|
|
146
|
+
if (typeof type !== "string"
|
|
147
|
+
|| !(legacy ? LEGACY_EVENT_TYPES : IDEA_EVENT_TYPES).includes(type)) {
|
|
148
|
+
throw new IdeaEventFormatError(`unsupported event type: ${String(type)}`);
|
|
149
|
+
}
|
|
150
|
+
const field = fieldDefinition(type, legacy);
|
|
151
|
+
const message = !legacy && (type === "ping" || type === "pong");
|
|
152
|
+
keys(event, field || message ? ["sequence", "type", "payload"] : ["sequence", "type"], "event");
|
|
153
|
+
if (!Number.isSafeInteger(event.sequence)
|
|
154
|
+
|| typeof event.sequence !== "number" || event.sequence < 1) {
|
|
155
|
+
throw new IdeaEventFormatError("sequence must be a positive safe integer");
|
|
156
|
+
}
|
|
157
|
+
if (field) {
|
|
158
|
+
const [input, output, validationOutput = output] = field;
|
|
159
|
+
keys(event.payload, [input], "payload");
|
|
160
|
+
const value = event.payload[input];
|
|
161
|
+
if (value === null && (output === "alias" || output === "language"))
|
|
162
|
+
return;
|
|
163
|
+
try {
|
|
164
|
+
validateIdeaStatus({
|
|
165
|
+
version: 1,
|
|
166
|
+
id: VALIDATION_ID,
|
|
167
|
+
[validationOutput]: value,
|
|
168
|
+
}, options);
|
|
169
|
+
}
|
|
170
|
+
catch (cause) {
|
|
171
|
+
throw new IdeaEventFormatError(errorMessage(cause), { cause });
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (message) {
|
|
175
|
+
keys(event.payload, ["message"], "payload");
|
|
176
|
+
if (typeof event.payload.message !== "string" || !event.payload.message.trim()) {
|
|
177
|
+
throw new IdeaEventFormatError("message must be a nonempty string");
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/** @pure */
|
|
182
|
+
export function validateIdeaEvent(event, options) {
|
|
183
|
+
assertValidIdeaEvent(event, options);
|
|
184
|
+
return event;
|
|
185
|
+
}
|
|
186
|
+
/** @pure */
|
|
187
|
+
export function serializeIdeaEvent(event, options) {
|
|
188
|
+
const validated = validateIdeaEvent(event, options);
|
|
189
|
+
const value = {
|
|
190
|
+
sequence: validated.sequence,
|
|
191
|
+
type: validated.type,
|
|
192
|
+
};
|
|
193
|
+
const field = fieldDefinition(validated.type, options?.legacy === true);
|
|
194
|
+
if (field && "payload" in validated) {
|
|
195
|
+
value.payload = { [field[0]]: payloadValue(validated, field[0]) };
|
|
196
|
+
}
|
|
197
|
+
else if (validated.type === "ping" || validated.type === "pong") {
|
|
198
|
+
value.payload = { message: validated.payload.message };
|
|
199
|
+
}
|
|
200
|
+
return JSON.stringify(value);
|
|
201
|
+
}
|
|
202
|
+
/** @pure */
|
|
203
|
+
export function serializeIdeaEvents(events, options) {
|
|
204
|
+
if (!Array.isArray(events))
|
|
205
|
+
throw new IdeaEventFormatError("events must be an array");
|
|
206
|
+
return events.map((event) => `${serializeIdeaEvent(event, options)}\n`).join("");
|
|
207
|
+
}
|
|
208
|
+
/** @pure */
|
|
209
|
+
export function parseIdeaEvents(source, options) {
|
|
210
|
+
let text;
|
|
211
|
+
try {
|
|
212
|
+
text = typeof source === "string"
|
|
213
|
+
? source
|
|
214
|
+
: new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(source);
|
|
215
|
+
}
|
|
216
|
+
catch (cause) {
|
|
217
|
+
throw new IdeaEventFormatError("log must contain valid UTF-8", { cause });
|
|
218
|
+
}
|
|
219
|
+
if (text === "")
|
|
220
|
+
return [];
|
|
221
|
+
if (!text.endsWith("\n"))
|
|
222
|
+
throw new IdeaEventFormatError("last record must end with LF");
|
|
223
|
+
return text.slice(0, -1).split("\n").map((line, index) => {
|
|
224
|
+
try {
|
|
225
|
+
const event = JSON.parse(line);
|
|
226
|
+
if (serializeIdeaEvent(event, options) !== line) {
|
|
227
|
+
throw new IdeaEventFormatError("record is not canonical JSON");
|
|
228
|
+
}
|
|
229
|
+
return event;
|
|
230
|
+
}
|
|
231
|
+
catch (cause) {
|
|
232
|
+
throw new IdeaEventFormatError(`line ${index + 1}: ${errorMessage(cause)}`, { cause });
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/** @pure */
|
|
237
|
+
export function initialEventState(ideaId, options) {
|
|
238
|
+
if (!isValidUlid(ideaId))
|
|
239
|
+
throw new IdeaEventFormatError("invalid idea identity");
|
|
240
|
+
return options?.legacy
|
|
241
|
+
? { status: { id: ideaId }, sequence: 0 }
|
|
242
|
+
: {
|
|
243
|
+
status: { id: ideaId },
|
|
244
|
+
sequence: 0,
|
|
245
|
+
interaction: { messages: [] },
|
|
246
|
+
control: { owner: "downstream", lastTransfer: null },
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/** @pure */
|
|
250
|
+
function nextControl(before, event) {
|
|
251
|
+
if (!before.control) {
|
|
252
|
+
throw new IdeaEventFormatError("current events require control state");
|
|
253
|
+
}
|
|
254
|
+
const owner = CONTROL_OWNERS[event.type];
|
|
255
|
+
if (owner === undefined)
|
|
256
|
+
return before.control;
|
|
257
|
+
return {
|
|
258
|
+
owner,
|
|
259
|
+
lastTransfer: {
|
|
260
|
+
sequence: event.sequence,
|
|
261
|
+
type: event.type,
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/** @pure */
|
|
266
|
+
export function reduceIdeaEvent(before, event, options) {
|
|
267
|
+
const validated = validateIdeaEvent(event, options);
|
|
268
|
+
const reject = (code) => ({ ok: false, code, sequence: validated.sequence });
|
|
269
|
+
if (validated.sequence !== before.sequence + 1)
|
|
270
|
+
return reject("sequence-conflict");
|
|
271
|
+
const legacy = options?.legacy === true;
|
|
272
|
+
if (!legacy && before.status.abandoned && validated.type !== "resume")
|
|
273
|
+
return reject("abandoned");
|
|
274
|
+
const status = { ...before.status };
|
|
275
|
+
const field = fieldDefinition(validated.type, legacy);
|
|
276
|
+
if (field && "payload" in validated) {
|
|
277
|
+
const [input, output] = field;
|
|
278
|
+
const value = payloadValue(validated, input);
|
|
279
|
+
if (value === null)
|
|
280
|
+
delete status[output];
|
|
281
|
+
else
|
|
282
|
+
status[output] = value;
|
|
283
|
+
}
|
|
284
|
+
else if (validated.type === "idea.abandoned" || validated.type === "abandon") {
|
|
285
|
+
status.abandoned = true;
|
|
286
|
+
}
|
|
287
|
+
else if (validated.type === "idea.resumed" || validated.type === "resume") {
|
|
288
|
+
delete status.abandoned;
|
|
289
|
+
}
|
|
290
|
+
if (!legacy && (validated.type === "ping" || validated.type === "pong")) {
|
|
291
|
+
if (!before.interaction) {
|
|
292
|
+
throw new IdeaEventFormatError("current events require interaction state");
|
|
293
|
+
}
|
|
294
|
+
return { ok: true, state: {
|
|
295
|
+
status, sequence: validated.sequence,
|
|
296
|
+
interaction: {
|
|
297
|
+
messages: [...before.interaction.messages, {
|
|
298
|
+
sequence: validated.sequence,
|
|
299
|
+
type: validated.type,
|
|
300
|
+
message: validated.payload.message,
|
|
301
|
+
}],
|
|
302
|
+
},
|
|
303
|
+
control: nextControl(before, validated),
|
|
304
|
+
} };
|
|
305
|
+
}
|
|
306
|
+
if (isDeepStrictEqual(status, before.status))
|
|
307
|
+
return reject("no-state-change");
|
|
308
|
+
if (legacy)
|
|
309
|
+
return { ok: true, state: { status, sequence: validated.sequence } };
|
|
310
|
+
if (!before.interaction) {
|
|
311
|
+
throw new IdeaEventFormatError("current events require interaction state");
|
|
312
|
+
}
|
|
313
|
+
return { ok: true, state: {
|
|
314
|
+
status,
|
|
315
|
+
sequence: validated.sequence,
|
|
316
|
+
interaction: before.interaction,
|
|
317
|
+
control: nextControl(before, validated),
|
|
318
|
+
} };
|
|
319
|
+
}
|
|
320
|
+
/** @pure */
|
|
321
|
+
export function replayIdeaEvents(ideaId, events, options) {
|
|
322
|
+
let state = initialEventState(ideaId, options);
|
|
323
|
+
for (const event of events) {
|
|
324
|
+
const result = reduceIdeaEvent(state, event, options);
|
|
325
|
+
if (!result.ok)
|
|
326
|
+
return result;
|
|
327
|
+
state = result.state;
|
|
328
|
+
}
|
|
329
|
+
return { ok: true, state };
|
|
330
|
+
}
|
|
331
|
+
// The migration order is a representation order, not a reconstructed chronology.
|
|
332
|
+
/** @pure */
|
|
333
|
+
export function eventsFromStatus(status, options) {
|
|
334
|
+
validateIdeaStatus(status, options);
|
|
335
|
+
const events = [];
|
|
336
|
+
for (const [type, [input, output]] of Object.entries(LEGACY_FIELDS)) {
|
|
337
|
+
if (Object.hasOwn(status, output)) {
|
|
338
|
+
events.push({ sequence: events.length + 1,
|
|
339
|
+
type: options?.legacy ? type : EVENT_RENAMES[type],
|
|
340
|
+
payload: { [input]: status[output] } });
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (status.abandoned)
|
|
344
|
+
events.push({ sequence: events.length + 1,
|
|
345
|
+
type: options?.legacy ? "idea.abandoned" : "abandon" });
|
|
346
|
+
return events;
|
|
347
|
+
}
|
|
348
|
+
/** @pure */
|
|
349
|
+
export function checkEventChange(ideaId, baseSource, candidateSource, options) {
|
|
350
|
+
// Format errors deliberately do not become reduction failures or repair permission.
|
|
351
|
+
function inspect(source, stage) {
|
|
352
|
+
try {
|
|
353
|
+
return replayIdeaEvents(ideaId, parseIdeaEvents(source, options), options);
|
|
354
|
+
}
|
|
355
|
+
catch (cause) {
|
|
356
|
+
if (cause instanceof Error) {
|
|
357
|
+
Object.defineProperty(cause, "eventStage", { value: stage, configurable: true });
|
|
358
|
+
}
|
|
359
|
+
throw cause;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
const base = inspect(baseSource, "base");
|
|
363
|
+
const candidate = inspect(candidateSource, "candidate");
|
|
364
|
+
const mode = base.ok ? "append" : "repair";
|
|
365
|
+
if (!candidate.ok)
|
|
366
|
+
return { ok: false, mode, base, candidate, code: candidate.code };
|
|
367
|
+
const baseBytes = sourceBuffer(baseSource);
|
|
368
|
+
if (base.ok && !sourceBuffer(candidateSource).subarray(0, baseBytes.length)
|
|
369
|
+
.equals(baseBytes)) {
|
|
370
|
+
return { ok: false, mode, base, candidate, code: "not-append-only" };
|
|
371
|
+
}
|
|
372
|
+
return { ok: true, mode, base, candidate };
|
|
373
|
+
}
|
|
374
|
+
/** @pure */
|
|
375
|
+
function sourceBuffer(source) {
|
|
376
|
+
if (typeof source === "string")
|
|
377
|
+
return Buffer.from(source);
|
|
378
|
+
if (ArrayBuffer.isView(source)) {
|
|
379
|
+
return Buffer.from(source.buffer, source.byteOffset, source.byteLength);
|
|
380
|
+
}
|
|
381
|
+
return Buffer.from(source);
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=grammar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.js","sourceRoot":"","sources":["../../../../src/foundation/event-codec/grammar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAqEzE,YAAY;AACZ,MAAM,UAAU,oBAAoB,CAAC,MAAuB;IAU1D,OAAO,kBAAkB,CAAC;QACxB,OAAO,EAAE,CAAC;QACV,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvE,GAAG,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;QAC1E,GAAG,CAAC,MAAM,CAAC,gBAAgB,KAAK,SAAS;YACvC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAClD,GAAG,CAAC,MAAM,CAAC,8BAA8B,KAAK,SAAS;YACrD,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE,8BAA8B,EAC5B,MAAM,CAAC,8BAA8B;aACxC,CAAC;QACN,GAAG,CAAC,MAAM,CAAC,0BAA0B,KAAK,SAA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aEvents, reduceIdeaEvent, renameLegacyEvents, replayIdeaEvents, serializeIdeaEvent, serializeIdeaEvents, validateIdeaEvent, } from "./grammar.ts";
|
|
2
|
+
export type { EventCodecOptions, IdeaEvent, IdeaEventReduction, IdeaEventState, IdeaEventStatus, } from "./grammar.ts";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/foundation/event-codec/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,eAAe,GAChB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { EVENT_PERMISSIONS, EVENT_RENAMES, IDEA_EVENT_TYPES, IdeaEventFormatError, LEGACY_EVENT_TYPES, checkEventChange, eventLifecycleStatus, eventsFromStatus, initialEventState, parseIdeaEvents, reduceIdeaEvent, renameLegacyEvents, replayIdeaEvents, serializeIdeaEvent, serializeIdeaEvents, validateIdeaEvent, } from "./grammar.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/foundation/event-codec/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type SnapshotEntry = {
|
|
2
|
+
mode: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
object: string;
|
|
6
|
+
size: number;
|
|
7
|
+
};
|
|
8
|
+
type SnapshotFileSystem = {
|
|
9
|
+
lstat(path: string): Promise<{
|
|
10
|
+
isDirectory(): boolean;
|
|
11
|
+
isFile(): boolean;
|
|
12
|
+
isSymbolicLink(): boolean;
|
|
13
|
+
}>;
|
|
14
|
+
readFile(path: string): Promise<Buffer>;
|
|
15
|
+
readdir(path: string): Promise<string[]>;
|
|
16
|
+
snapshotEntries(path: unknown): SnapshotEntry[];
|
|
17
|
+
snapshotFile(path: unknown): Promise<Buffer>;
|
|
18
|
+
snapshotEntry?(path: string): SnapshotEntry | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare function readEventDelta(root: string, paths: {
|
|
21
|
+
eventsPath: string;
|
|
22
|
+
}, options: {
|
|
23
|
+
objectIdLength: number;
|
|
24
|
+
legacy?: boolean;
|
|
25
|
+
}, filesystem: SnapshotFileSystem, cursor: {
|
|
26
|
+
length: number;
|
|
27
|
+
digest: string;
|
|
28
|
+
}): Promise<{
|
|
29
|
+
outcome: string;
|
|
30
|
+
length: number;
|
|
31
|
+
digest: string;
|
|
32
|
+
after: {
|
|
33
|
+
length: number;
|
|
34
|
+
digest: string;
|
|
35
|
+
};
|
|
36
|
+
events: import("../event-codec/grammar.ts").IdeaEvent[];
|
|
37
|
+
sequence: number;
|
|
38
|
+
}>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/foundation/event-cursor/cursor.ts"],"names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