mewkit 1.15.0 → 1.16.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/NOTICE +24 -0
- package/README.md +29 -70
- package/dist/commands/visual-plan.d.ts +23 -0
- package/dist/commands/visual-plan.d.ts.map +1 -0
- package/dist/commands/visual-plan.js +26 -0
- package/dist/commands/visual-plan.js.map +1 -0
- package/dist/core/capability.d.ts +81 -81
- package/dist/core/consolidation-ledger.d.ts.map +1 -1
- package/dist/core/consolidation-ledger.js +13 -11
- package/dist/core/consolidation-ledger.js.map +1 -1
- package/dist/core/install-metadata.d.ts +27 -27
- package/dist/core/plugin-manifest.d.ts +16 -16
- package/dist/core/release-metadata.d.ts +2 -2
- package/dist/core/task-record.d.ts +8 -8
- package/dist/index.js +33 -21
- package/dist/index.js.map +1 -1
- package/dist/local-web/atomic-write.d.ts +15 -0
- package/dist/local-web/atomic-write.d.ts.map +1 -0
- package/dist/local-web/atomic-write.js +69 -0
- package/dist/local-web/atomic-write.js.map +1 -0
- package/dist/local-web/constants.d.ts +13 -0
- package/dist/local-web/constants.d.ts.map +1 -0
- package/dist/local-web/constants.js +13 -0
- package/dist/local-web/constants.js.map +1 -0
- package/dist/local-web/etag.d.ts +19 -0
- package/dist/local-web/etag.d.ts.map +1 -0
- package/dist/local-web/etag.js +32 -0
- package/dist/local-web/etag.js.map +1 -0
- package/dist/local-web/host-guard.d.ts +12 -0
- package/dist/local-web/host-guard.d.ts.map +1 -0
- package/dist/local-web/host-guard.js +18 -0
- package/dist/local-web/host-guard.js.map +1 -0
- package/dist/local-web/index.d.ts +23 -0
- package/dist/local-web/index.d.ts.map +1 -0
- package/dist/local-web/index.js +23 -0
- package/dist/local-web/index.js.map +1 -0
- package/dist/local-web/local-server.d.ts +37 -0
- package/dist/local-web/local-server.d.ts.map +1 -0
- package/dist/local-web/local-server.js +85 -0
- package/dist/local-web/local-server.js.map +1 -0
- package/dist/local-web/open-browser.d.ts +12 -0
- package/dist/local-web/open-browser.d.ts.map +1 -0
- package/dist/{orchviz/open-url.js → local-web/open-browser.js} +9 -8
- package/dist/local-web/open-browser.js.map +1 -0
- package/dist/local-web/origin-guard.d.ts +11 -0
- package/dist/local-web/origin-guard.d.ts.map +1 -0
- package/dist/local-web/origin-guard.js +15 -0
- package/dist/local-web/origin-guard.js.map +1 -0
- package/dist/local-web/path-boundary.d.ts +20 -0
- package/dist/local-web/path-boundary.d.ts.map +1 -0
- package/dist/local-web/path-boundary.js +39 -0
- package/dist/local-web/path-boundary.js.map +1 -0
- package/dist/local-web/request-body.d.ts +24 -0
- package/dist/local-web/request-body.d.ts.map +1 -0
- package/dist/local-web/request-body.js +68 -0
- package/dist/local-web/request-body.js.map +1 -0
- package/dist/local-web/static-handler.d.ts +14 -0
- package/dist/local-web/static-handler.d.ts.map +1 -0
- package/dist/{orchviz/server → local-web}/static-handler.js +11 -6
- package/dist/local-web/static-handler.js.map +1 -0
- package/dist/migrate/reconcile/portable-manifest.d.ts +12 -12
- package/dist/migrate/reconcile/portable-registry.d.ts +24 -24
- package/dist/migrate/types.d.ts +10 -10
- package/dist/{orchviz/token-estimator.d.ts → token-estimator/index.d.ts} +6 -1
- package/dist/token-estimator/index.d.ts.map +1 -0
- package/dist/{orchviz/token-estimator.js → token-estimator/index.js} +11 -2
- package/dist/token-estimator/index.js.map +1 -0
- package/dist/visual-plan/__fixtures__/valid-plan.d.ts +15 -0
- package/dist/visual-plan/__fixtures__/valid-plan.d.ts.map +1 -0
- package/dist/visual-plan/__fixtures__/valid-plan.js +79 -0
- package/dist/visual-plan/__fixtures__/valid-plan.js.map +1 -0
- package/dist/visual-plan/application/apply-feedback.d.ts +31 -0
- package/dist/visual-plan/application/apply-feedback.d.ts.map +1 -0
- package/dist/visual-plan/application/apply-feedback.js +85 -0
- package/dist/visual-plan/application/apply-feedback.js.map +1 -0
- package/dist/visual-plan/application/apply-patch-op.d.ts +13 -0
- package/dist/visual-plan/application/apply-patch-op.d.ts.map +1 -0
- package/dist/visual-plan/application/apply-patch-op.js +72 -0
- package/dist/visual-plan/application/apply-patch-op.js.map +1 -0
- package/dist/visual-plan/application/approve.d.ts +24 -0
- package/dist/visual-plan/application/approve.d.ts.map +1 -0
- package/dist/visual-plan/application/approve.js +53 -0
- package/dist/visual-plan/application/approve.js.map +1 -0
- package/dist/visual-plan/application/clock.d.ts +8 -0
- package/dist/visual-plan/application/clock.d.ts.map +1 -0
- package/dist/visual-plan/application/clock.js +10 -0
- package/dist/visual-plan/application/clock.js.map +1 -0
- package/dist/visual-plan/application/export-plan.d.ts +19 -0
- package/dist/visual-plan/application/export-plan.d.ts.map +1 -0
- package/dist/visual-plan/application/export-plan.js +59 -0
- package/dist/visual-plan/application/export-plan.js.map +1 -0
- package/dist/visual-plan/application/patch-plan.d.ts +26 -0
- package/dist/visual-plan/application/patch-plan.d.ts.map +1 -0
- package/dist/visual-plan/application/patch-plan.js +48 -0
- package/dist/visual-plan/application/patch-plan.js.map +1 -0
- package/dist/visual-plan/application/prepare-feedback.d.ts +24 -0
- package/dist/visual-plan/application/prepare-feedback.d.ts.map +1 -0
- package/dist/visual-plan/application/prepare-feedback.js +70 -0
- package/dist/visual-plan/application/prepare-feedback.js.map +1 -0
- package/dist/visual-plan/application/rehash.d.ts +19 -0
- package/dist/visual-plan/application/rehash.d.ts.map +1 -0
- package/dist/visual-plan/application/rehash.js +43 -0
- package/dist/visual-plan/application/rehash.js.map +1 -0
- package/dist/visual-plan/application/status.d.ts +20 -0
- package/dist/visual-plan/application/status.d.ts.map +1 -0
- package/dist/visual-plan/application/status.js +27 -0
- package/dist/visual-plan/application/status.js.map +1 -0
- package/dist/visual-plan/application/validate-plan.d.ts +30 -0
- package/dist/visual-plan/application/validate-plan.d.ts.map +1 -0
- package/dist/visual-plan/application/validate-plan.js +59 -0
- package/dist/visual-plan/application/validate-plan.js.map +1 -0
- package/dist/visual-plan/domain/coverage.d.ts +35 -0
- package/dist/visual-plan/domain/coverage.d.ts.map +1 -0
- package/dist/visual-plan/domain/coverage.js +99 -0
- package/dist/visual-plan/domain/coverage.js.map +1 -0
- package/dist/visual-plan/domain/cross-refs.d.ts +20 -0
- package/dist/visual-plan/domain/cross-refs.d.ts.map +1 -0
- package/dist/visual-plan/domain/cross-refs.js +92 -0
- package/dist/visual-plan/domain/cross-refs.js.map +1 -0
- package/dist/visual-plan/domain/errors.d.ts +43 -0
- package/dist/visual-plan/domain/errors.d.ts.map +1 -0
- package/dist/visual-plan/domain/errors.js +33 -0
- package/dist/visual-plan/domain/errors.js.map +1 -0
- package/dist/visual-plan/domain/feedback-schemas.d.ts +160 -0
- package/dist/visual-plan/domain/feedback-schemas.d.ts.map +1 -0
- package/dist/visual-plan/domain/feedback-schemas.js +71 -0
- package/dist/visual-plan/domain/feedback-schemas.js.map +1 -0
- package/dist/visual-plan/domain/ids.d.ts +21 -0
- package/dist/visual-plan/domain/ids.d.ts.map +1 -0
- package/dist/visual-plan/domain/ids.js +25 -0
- package/dist/visual-plan/domain/ids.js.map +1 -0
- package/dist/visual-plan/domain/patches.d.ts +176 -0
- package/dist/visual-plan/domain/patches.d.ts.map +1 -0
- package/dist/visual-plan/domain/patches.js +41 -0
- package/dist/visual-plan/domain/patches.js.map +1 -0
- package/dist/visual-plan/domain/sanitizer-config.d.ts +61 -0
- package/dist/visual-plan/domain/sanitizer-config.d.ts.map +1 -0
- package/dist/visual-plan/domain/sanitizer-config.js +70 -0
- package/dist/visual-plan/domain/sanitizer-config.js.map +1 -0
- package/dist/visual-plan/domain/schemas.d.ts +1492 -0
- package/dist/visual-plan/domain/schemas.d.ts.map +1 -0
- package/dist/visual-plan/domain/schemas.js +166 -0
- package/dist/visual-plan/domain/schemas.js.map +1 -0
- package/dist/visual-plan/infrastructure/atomic-write.d.ts +11 -0
- package/dist/visual-plan/infrastructure/atomic-write.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/atomic-write.js +44 -0
- package/dist/visual-plan/infrastructure/atomic-write.js.map +1 -0
- package/dist/visual-plan/infrastructure/feedback-repository.d.ts +18 -0
- package/dist/visual-plan/infrastructure/feedback-repository.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/feedback-repository.js +59 -0
- package/dist/visual-plan/infrastructure/feedback-repository.js.map +1 -0
- package/dist/visual-plan/infrastructure/hashing.d.ts +37 -0
- package/dist/visual-plan/infrastructure/hashing.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/hashing.js +81 -0
- package/dist/visual-plan/infrastructure/hashing.js.map +1 -0
- package/dist/visual-plan/infrastructure/plan-state.d.ts +32 -0
- package/dist/visual-plan/infrastructure/plan-state.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/plan-state.js +58 -0
- package/dist/visual-plan/infrastructure/plan-state.js.map +1 -0
- package/dist/visual-plan/infrastructure/receipt-repository.d.ts +17 -0
- package/dist/visual-plan/infrastructure/receipt-repository.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/receipt-repository.js +59 -0
- package/dist/visual-plan/infrastructure/receipt-repository.js.map +1 -0
- package/dist/visual-plan/infrastructure/visual-plan-repository.d.ts +38 -0
- package/dist/visual-plan/infrastructure/visual-plan-repository.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/visual-plan-repository.js +97 -0
- package/dist/visual-plan/infrastructure/visual-plan-repository.js.map +1 -0
- package/dist/visual-plan/infrastructure/wireframe-sanitizer.d.ts +41 -0
- package/dist/visual-plan/infrastructure/wireframe-sanitizer.d.ts.map +1 -0
- package/dist/visual-plan/infrastructure/wireframe-sanitizer.js +72 -0
- package/dist/visual-plan/infrastructure/wireframe-sanitizer.js.map +1 -0
- package/dist/visual-plan/interface/cli.d.ts +29 -0
- package/dist/visual-plan/interface/cli.d.ts.map +1 -0
- package/dist/visual-plan/interface/cli.js +280 -0
- package/dist/visual-plan/interface/cli.js.map +1 -0
- package/dist/visual-plan/interface/studio.d.ts +20 -0
- package/dist/visual-plan/interface/studio.d.ts.map +1 -0
- package/dist/visual-plan/interface/studio.js +74 -0
- package/dist/visual-plan/interface/studio.js.map +1 -0
- package/dist/visual-plan/server/csp.d.ts +13 -0
- package/dist/visual-plan/server/csp.d.ts.map +1 -0
- package/dist/visual-plan/server/csp.js +17 -0
- package/dist/visual-plan/server/csp.js.map +1 -0
- package/dist/visual-plan/server/edit-lock.d.ts +28 -0
- package/dist/visual-plan/server/edit-lock.d.ts.map +1 -0
- package/dist/visual-plan/server/edit-lock.js +71 -0
- package/dist/visual-plan/server/edit-lock.js.map +1 -0
- package/dist/visual-plan/server/routes/feedback.d.ts +12 -0
- package/dist/visual-plan/server/routes/feedback.d.ts.map +1 -0
- package/dist/visual-plan/server/routes/feedback.js +63 -0
- package/dist/visual-plan/server/routes/feedback.js.map +1 -0
- package/dist/visual-plan/server/routes/get-plan.d.ts +14 -0
- package/dist/visual-plan/server/routes/get-plan.d.ts.map +1 -0
- package/dist/visual-plan/server/routes/get-plan.js +38 -0
- package/dist/visual-plan/server/routes/get-plan.js.map +1 -0
- package/dist/visual-plan/server/routes/patch.d.ts +10 -0
- package/dist/visual-plan/server/routes/patch.d.ts.map +1 -0
- package/dist/visual-plan/server/routes/patch.js +66 -0
- package/dist/visual-plan/server/routes/patch.js.map +1 -0
- package/dist/visual-plan/server/visual-plan-server.d.ts +30 -0
- package/dist/visual-plan/server/visual-plan-server.d.ts.map +1 -0
- package/dist/visual-plan/server/visual-plan-server.js +79 -0
- package/dist/visual-plan/server/visual-plan-server.js.map +1 -0
- package/dist/visual-plan-web/architects-daughter-latin-400-normal.woff +0 -0
- package/dist/visual-plan-web/architects-daughter-latin-400-normal.woff2 +0 -0
- package/dist/visual-plan-web/architects-daughter-latin-ext-400-normal.woff +0 -0
- package/dist/visual-plan-web/architects-daughter-latin-ext-400-normal.woff2 +0 -0
- package/dist/visual-plan-web/index.css +1 -0
- package/dist/visual-plan-web/index.html +17 -0
- package/dist/visual-plan-web/index.js +51 -0
- package/package.json +14 -17
- package/dist/commands/orchviz.d.ts +0 -12
- package/dist/commands/orchviz.d.ts.map +0 -1
- package/dist/commands/orchviz.js +0 -157
- package/dist/commands/orchviz.js.map +0 -1
- package/dist/migrate/converters/md-to-codex-rules.d.ts +0 -10
- package/dist/migrate/converters/md-to-codex-rules.d.ts.map +0 -1
- package/dist/migrate/converters/md-to-codex-rules.js +0 -133
- package/dist/migrate/converters/md-to-codex-rules.js.map +0 -1
- package/dist/orchviz/constants.d.ts +0 -72
- package/dist/orchviz/constants.d.ts.map +0 -1
- package/dist/orchviz/constants.js +0 -105
- package/dist/orchviz/constants.js.map +0 -1
- package/dist/orchviz/fs-utils.d.ts +0 -24
- package/dist/orchviz/fs-utils.d.ts.map +0 -1
- package/dist/orchviz/fs-utils.js +0 -49
- package/dist/orchviz/fs-utils.js.map +0 -1
- package/dist/orchviz/index.d.ts +0 -29
- package/dist/orchviz/index.d.ts.map +0 -1
- package/dist/orchviz/index.js +0 -28
- package/dist/orchviz/index.js.map +0 -1
- package/dist/orchviz/log-persister.d.ts +0 -22
- package/dist/orchviz/log-persister.d.ts.map +0 -1
- package/dist/orchviz/log-persister.js +0 -96
- package/dist/orchviz/log-persister.js.map +0 -1
- package/dist/orchviz/logger.d.ts +0 -13
- package/dist/orchviz/logger.d.ts.map +0 -1
- package/dist/orchviz/logger.js +0 -47
- package/dist/orchviz/logger.js.map +0 -1
- package/dist/orchviz/open-url.d.ts +0 -11
- package/dist/orchviz/open-url.d.ts.map +0 -1
- package/dist/orchviz/open-url.js.map +0 -1
- package/dist/orchviz/overlay/collector.d.ts +0 -29
- package/dist/orchviz/overlay/collector.d.ts.map +0 -1
- package/dist/orchviz/overlay/collector.js +0 -38
- package/dist/orchviz/overlay/collector.js.map +0 -1
- package/dist/orchviz/overlay/gate-readers.d.ts +0 -18
- package/dist/orchviz/overlay/gate-readers.d.ts.map +0 -1
- package/dist/orchviz/overlay/gate-readers.js +0 -111
- package/dist/orchviz/overlay/gate-readers.js.map +0 -1
- package/dist/orchviz/overlay/session-state-readers.d.ts +0 -18
- package/dist/orchviz/overlay/session-state-readers.d.ts.map +0 -1
- package/dist/orchviz/overlay/session-state-readers.js +0 -78
- package/dist/orchviz/overlay/session-state-readers.js.map +0 -1
- package/dist/orchviz/parser/handle-progress.d.ts +0 -9
- package/dist/orchviz/parser/handle-progress.d.ts.map +0 -1
- package/dist/orchviz/parser/handle-progress.js +0 -38
- package/dist/orchviz/parser/handle-progress.js.map +0 -1
- package/dist/orchviz/parser/handle-system.d.ts +0 -22
- package/dist/orchviz/parser/handle-system.d.ts.map +0 -1
- package/dist/orchviz/parser/handle-system.js +0 -99
- package/dist/orchviz/parser/handle-system.js.map +0 -1
- package/dist/orchviz/parser/handle-text.d.ts +0 -10
- package/dist/orchviz/parser/handle-text.d.ts.map +0 -1
- package/dist/orchviz/parser/handle-text.js +0 -83
- package/dist/orchviz/parser/handle-text.js.map +0 -1
- package/dist/orchviz/parser/handle-thinking.d.ts +0 -10
- package/dist/orchviz/parser/handle-thinking.d.ts.map +0 -1
- package/dist/orchviz/parser/handle-thinking.js +0 -35
- package/dist/orchviz/parser/handle-thinking.js.map +0 -1
- package/dist/orchviz/parser/handle-tool-result.d.ts +0 -10
- package/dist/orchviz/parser/handle-tool-result.d.ts.map +0 -1
- package/dist/orchviz/parser/handle-tool-result.js +0 -130
- package/dist/orchviz/parser/handle-tool-result.js.map +0 -1
- package/dist/orchviz/parser/handle-tool-use.d.ts +0 -11
- package/dist/orchviz/parser/handle-tool-use.d.ts.map +0 -1
- package/dist/orchviz/parser/handle-tool-use.js +0 -120
- package/dist/orchviz/parser/handle-tool-use.js.map +0 -1
- package/dist/orchviz/parser/index.d.ts +0 -38
- package/dist/orchviz/parser/index.d.ts.map +0 -1
- package/dist/orchviz/parser/index.js +0 -144
- package/dist/orchviz/parser/index.js.map +0 -1
- package/dist/orchviz/parser/label-helpers.d.ts +0 -9
- package/dist/orchviz/parser/label-helpers.d.ts.map +0 -1
- package/dist/orchviz/parser/label-helpers.js +0 -44
- package/dist/orchviz/parser/label-helpers.js.map +0 -1
- package/dist/orchviz/parser/strip-ansi.d.ts +0 -6
- package/dist/orchviz/parser/strip-ansi.d.ts.map +0 -1
- package/dist/orchviz/parser/strip-ansi.js +0 -14
- package/dist/orchviz/parser/strip-ansi.js.map +0 -1
- package/dist/orchviz/parser/utils.d.ts +0 -20
- package/dist/orchviz/parser/utils.d.ts.map +0 -1
- package/dist/orchviz/parser/utils.js +0 -54
- package/dist/orchviz/parser/utils.js.map +0 -1
- package/dist/orchviz/permission-detection.d.ts +0 -32
- package/dist/orchviz/permission-detection.d.ts.map +0 -1
- package/dist/orchviz/permission-detection.js +0 -104
- package/dist/orchviz/permission-detection.js.map +0 -1
- package/dist/orchviz/plan/apply-todo-toggle.d.ts +0 -29
- package/dist/orchviz/plan/apply-todo-toggle.d.ts.map +0 -1
- package/dist/orchviz/plan/apply-todo-toggle.js +0 -129
- package/dist/orchviz/plan/apply-todo-toggle.js.map +0 -1
- package/dist/orchviz/plan/atomic-write.d.ts +0 -25
- package/dist/orchviz/plan/atomic-write.d.ts.map +0 -1
- package/dist/orchviz/plan/atomic-write.js +0 -85
- package/dist/orchviz/plan/atomic-write.js.map +0 -1
- package/dist/orchviz/plan/collector.d.ts +0 -49
- package/dist/orchviz/plan/collector.d.ts.map +0 -1
- package/dist/orchviz/plan/collector.js +0 -169
- package/dist/orchviz/plan/collector.js.map +0 -1
- package/dist/orchviz/plan/etag.d.ts +0 -24
- package/dist/orchviz/plan/etag.d.ts.map +0 -1
- package/dist/orchviz/plan/etag.js +0 -58
- package/dist/orchviz/plan/etag.js.map +0 -1
- package/dist/orchviz/plan/find-active-plan.d.ts +0 -9
- package/dist/orchviz/plan/find-active-plan.d.ts.map +0 -1
- package/dist/orchviz/plan/find-active-plan.js +0 -90
- package/dist/orchviz/plan/find-active-plan.js.map +0 -1
- package/dist/orchviz/plan/index.d.ts +0 -23
- package/dist/orchviz/plan/index.d.ts.map +0 -1
- package/dist/orchviz/plan/index.js +0 -91
- package/dist/orchviz/plan/index.js.map +0 -1
- package/dist/orchviz/plan/list-plans.d.ts +0 -19
- package/dist/orchviz/plan/list-plans.d.ts.map +0 -1
- package/dist/orchviz/plan/list-plans.js +0 -143
- package/dist/orchviz/plan/list-plans.js.map +0 -1
- package/dist/orchviz/plan/parse-phase-file.d.ts +0 -13
- package/dist/orchviz/plan/parse-phase-file.d.ts.map +0 -1
- package/dist/orchviz/plan/parse-phase-file.js +0 -134
- package/dist/orchviz/plan/parse-phase-file.js.map +0 -1
- package/dist/orchviz/plan/parse-plan-file.d.ts +0 -19
- package/dist/orchviz/plan/parse-plan-file.d.ts.map +0 -1
- package/dist/orchviz/plan/parse-plan-file.js +0 -62
- package/dist/orchviz/plan/parse-plan-file.js.map +0 -1
- package/dist/orchviz/plan/plan-constants.d.ts +0 -17
- package/dist/orchviz/plan/plan-constants.d.ts.map +0 -1
- package/dist/orchviz/plan/plan-constants.js +0 -19
- package/dist/orchviz/plan/plan-constants.js.map +0 -1
- package/dist/orchviz/plan/plan-lifecycle.d.ts +0 -17
- package/dist/orchviz/plan/plan-lifecycle.d.ts.map +0 -1
- package/dist/orchviz/plan/plan-lifecycle.js +0 -97
- package/dist/orchviz/plan/plan-lifecycle.js.map +0 -1
- package/dist/orchviz/plan/types.d.ts +0 -46
- package/dist/orchviz/plan/types.d.ts.map +0 -1
- package/dist/orchviz/plan/types.js +0 -6
- package/dist/orchviz/plan/types.js.map +0 -1
- package/dist/orchviz/protocol.d.ts +0 -171
- package/dist/orchviz/protocol.d.ts.map +0 -1
- package/dist/orchviz/protocol.js +0 -23
- package/dist/orchviz/protocol.js.map +0 -1
- package/dist/orchviz/redact.d.ts +0 -10
- package/dist/orchviz/redact.d.ts.map +0 -1
- package/dist/orchviz/redact.js +0 -38
- package/dist/orchviz/redact.js.map +0 -1
- package/dist/orchviz/sanitize.d.ts +0 -11
- package/dist/orchviz/sanitize.d.ts.map +0 -1
- package/dist/orchviz/sanitize.js +0 -38
- package/dist/orchviz/sanitize.js.map +0 -1
- package/dist/orchviz/server/api-handlers.d.ts +0 -55
- package/dist/orchviz/server/api-handlers.d.ts.map +0 -1
- package/dist/orchviz/server/api-handlers.js +0 -112
- package/dist/orchviz/server/api-handlers.js.map +0 -1
- package/dist/orchviz/server/index.d.ts +0 -36
- package/dist/orchviz/server/index.d.ts.map +0 -1
- package/dist/orchviz/server/index.js +0 -144
- package/dist/orchviz/server/index.js.map +0 -1
- package/dist/orchviz/server/sse-handler.d.ts +0 -28
- package/dist/orchviz/server/sse-handler.d.ts.map +0 -1
- package/dist/orchviz/server/sse-handler.js +0 -217
- package/dist/orchviz/server/sse-handler.js.map +0 -1
- package/dist/orchviz/server/static-handler.d.ts +0 -9
- package/dist/orchviz/server/static-handler.d.ts.map +0 -1
- package/dist/orchviz/server/static-handler.js.map +0 -1
- package/dist/orchviz/server/write-handlers.d.ts +0 -20
- package/dist/orchviz/server/write-handlers.d.ts.map +0 -1
- package/dist/orchviz/server/write-handlers.js +0 -184
- package/dist/orchviz/server/write-handlers.js.map +0 -1
- package/dist/orchviz/server/write-utils.d.ts +0 -59
- package/dist/orchviz/server/write-utils.d.ts.map +0 -1
- package/dist/orchviz/server/write-utils.js +0 -161
- package/dist/orchviz/server/write-utils.js.map +0 -1
- package/dist/orchviz/session-discovery.d.ts +0 -19
- package/dist/orchviz/session-discovery.d.ts.map +0 -1
- package/dist/orchviz/session-discovery.js +0 -104
- package/dist/orchviz/session-discovery.js.map +0 -1
- package/dist/orchviz/session-manager.d.ts +0 -17
- package/dist/orchviz/session-manager.d.ts.map +0 -1
- package/dist/orchviz/session-manager.js +0 -63
- package/dist/orchviz/session-manager.js.map +0 -1
- package/dist/orchviz/session-runtime.d.ts +0 -21
- package/dist/orchviz/session-runtime.d.ts.map +0 -1
- package/dist/orchviz/session-runtime.js +0 -135
- package/dist/orchviz/session-runtime.js.map +0 -1
- package/dist/orchviz/session-watcher.d.ts +0 -33
- package/dist/orchviz/session-watcher.d.ts.map +0 -1
- package/dist/orchviz/session-watcher.js +0 -135
- package/dist/orchviz/session-watcher.js.map +0 -1
- package/dist/orchviz/subagent-meta.d.ts +0 -12
- package/dist/orchviz/subagent-meta.d.ts.map +0 -1
- package/dist/orchviz/subagent-meta.js +0 -34
- package/dist/orchviz/subagent-meta.js.map +0 -1
- package/dist/orchviz/subagent-scanner.d.ts +0 -15
- package/dist/orchviz/subagent-scanner.d.ts.map +0 -1
- package/dist/orchviz/subagent-scanner.js +0 -27
- package/dist/orchviz/subagent-scanner.js.map +0 -1
- package/dist/orchviz/subagent-watcher.d.ts +0 -20
- package/dist/orchviz/subagent-watcher.d.ts.map +0 -1
- package/dist/orchviz/subagent-watcher.js +0 -160
- package/dist/orchviz/subagent-watcher.js.map +0 -1
- package/dist/orchviz/token-estimator.d.ts.map +0 -1
- package/dist/orchviz/token-estimator.js.map +0 -1
- package/dist/orchviz/tool-input-data.d.ts +0 -11
- package/dist/orchviz/tool-input-data.d.ts.map +0 -1
- package/dist/orchviz/tool-input-data.js +0 -74
- package/dist/orchviz/tool-input-data.js.map +0 -1
- package/dist/orchviz/tool-summarizer.d.ts +0 -16
- package/dist/orchviz/tool-summarizer.d.ts.map +0 -1
- package/dist/orchviz/tool-summarizer.js +0 -129
- package/dist/orchviz/tool-summarizer.js.map +0 -1
- package/dist/orchviz-web/fira-code-cyrillic-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-400-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-500-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-500-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-ext-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-ext-500-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-greek-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-greek-400-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-greek-500-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-greek-500-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-greek-ext-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-greek-ext-400-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-greek-ext-500-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-greek-ext-500-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-latin-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-latin-400-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-latin-500-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-latin-500-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-latin-ext-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-latin-ext-400-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-latin-ext-500-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-latin-ext-500-normal.woff2 +0 -0
- package/dist/orchviz-web/fira-code-symbols2-400-normal.woff +0 -0
- package/dist/orchviz-web/fira-code-symbols2-500-normal.woff +0 -0
- package/dist/orchviz-web/index.css +0 -1
- package/dist/orchviz-web/index.html +0 -18
- package/dist/orchviz-web/index.js +0 -53
- package/dist/orchviz-web/inter-cyrillic-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-cyrillic-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-cyrillic-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-cyrillic-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-cyrillic-ext-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-cyrillic-ext-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-cyrillic-ext-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-greek-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-greek-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-greek-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-greek-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-greek-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-greek-600-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-greek-ext-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-greek-ext-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-greek-ext-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-greek-ext-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-latin-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-latin-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-latin-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-latin-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-latin-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-latin-600-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-latin-ext-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-latin-ext-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-latin-ext-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-latin-ext-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-vietnamese-400-normal.woff +0 -0
- package/dist/orchviz-web/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-vietnamese-500-normal.woff +0 -0
- package/dist/orchviz-web/inter-vietnamese-500-normal.woff2 +0 -0
- package/dist/orchviz-web/inter-vietnamese-600-normal.woff +0 -0
- package/dist/orchviz-web/inter-vietnamese-600-normal.woff2 +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `visual-feedback/v1` immutable batch schema + resolution-receipt schema.
|
|
3
|
+
*
|
|
4
|
+
* A feedback batch is written once and never mutated (red-team: immutability is
|
|
5
|
+
* the misapplication guard). It captures the reviewer's intent against an exact
|
|
6
|
+
* `baseRevision` + `baseHash`; the apply loop (Phase 6) refuses to apply a batch
|
|
7
|
+
* whose base no longer matches the artifact. The batch `id` is charset-locked so
|
|
8
|
+
* a consumer can validate it BEFORE any path join.
|
|
9
|
+
*
|
|
10
|
+
* The resolution receipt mirrors the batch, recording a per-operation outcome
|
|
11
|
+
* (`applied | rejected | unresolved`). Batches remain byte-immutable after
|
|
12
|
+
* resolution; the receipt is the mutable-outcome surface.
|
|
13
|
+
*
|
|
14
|
+
* `markup` operation points are position-absolute / unanchored (red-team L3):
|
|
15
|
+
* they do NOT track frames across layout regeneration — documented, not a bug.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from "zod";
|
|
18
|
+
export declare const FEEDBACK_OP_TYPES: readonly ["annotation", "copy-change", "field-change", "flow-change", "scope-change", "other"];
|
|
19
|
+
export declare const FeedbackBatchSchema: z.ZodObject<{
|
|
20
|
+
schemaVersion: z.ZodLiteral<"visual-feedback/v1">;
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
planId: z.ZodString;
|
|
23
|
+
baseRevision: z.ZodNumber;
|
|
24
|
+
baseHash: z.ZodString;
|
|
25
|
+
createdAt: z.ZodString;
|
|
26
|
+
operations: z.ZodArray<z.ZodObject<{
|
|
27
|
+
type: z.ZodEnum<["annotation", "copy-change", "field-change", "flow-change", "scope-change", "other"]>;
|
|
28
|
+
frameId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
elementId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
sourceRefId: z.ZodOptional<z.ZodString>;
|
|
31
|
+
visualPoint: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
x: z.ZodNumber;
|
|
33
|
+
y: z.ZodNumber;
|
|
34
|
+
}, "strict", z.ZodTypeAny, {
|
|
35
|
+
y: number;
|
|
36
|
+
x: number;
|
|
37
|
+
}, {
|
|
38
|
+
y: number;
|
|
39
|
+
x: number;
|
|
40
|
+
}>>;
|
|
41
|
+
intent: z.ZodString;
|
|
42
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
43
|
+
context: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, "strict", z.ZodTypeAny, {
|
|
45
|
+
type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
|
|
46
|
+
intent: string;
|
|
47
|
+
context?: string | undefined;
|
|
48
|
+
frameId?: string | undefined;
|
|
49
|
+
elementId?: string | undefined;
|
|
50
|
+
sourceRefId?: string | undefined;
|
|
51
|
+
visualPoint?: {
|
|
52
|
+
y: number;
|
|
53
|
+
x: number;
|
|
54
|
+
} | undefined;
|
|
55
|
+
comment?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
|
|
58
|
+
intent: string;
|
|
59
|
+
context?: string | undefined;
|
|
60
|
+
frameId?: string | undefined;
|
|
61
|
+
elementId?: string | undefined;
|
|
62
|
+
sourceRefId?: string | undefined;
|
|
63
|
+
visualPoint?: {
|
|
64
|
+
y: number;
|
|
65
|
+
x: number;
|
|
66
|
+
} | undefined;
|
|
67
|
+
comment?: string | undefined;
|
|
68
|
+
}>, "many">;
|
|
69
|
+
status: z.ZodDefault<z.ZodEnum<["open", "resolved"]>>;
|
|
70
|
+
}, "strict", z.ZodTypeAny, {
|
|
71
|
+
status: "resolved" | "open";
|
|
72
|
+
schemaVersion: "visual-feedback/v1";
|
|
73
|
+
id: string;
|
|
74
|
+
planId: string;
|
|
75
|
+
baseRevision: number;
|
|
76
|
+
baseHash: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
operations: {
|
|
79
|
+
type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
|
|
80
|
+
intent: string;
|
|
81
|
+
context?: string | undefined;
|
|
82
|
+
frameId?: string | undefined;
|
|
83
|
+
elementId?: string | undefined;
|
|
84
|
+
sourceRefId?: string | undefined;
|
|
85
|
+
visualPoint?: {
|
|
86
|
+
y: number;
|
|
87
|
+
x: number;
|
|
88
|
+
} | undefined;
|
|
89
|
+
comment?: string | undefined;
|
|
90
|
+
}[];
|
|
91
|
+
}, {
|
|
92
|
+
schemaVersion: "visual-feedback/v1";
|
|
93
|
+
id: string;
|
|
94
|
+
planId: string;
|
|
95
|
+
baseRevision: number;
|
|
96
|
+
baseHash: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
operations: {
|
|
99
|
+
type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
|
|
100
|
+
intent: string;
|
|
101
|
+
context?: string | undefined;
|
|
102
|
+
frameId?: string | undefined;
|
|
103
|
+
elementId?: string | undefined;
|
|
104
|
+
sourceRefId?: string | undefined;
|
|
105
|
+
visualPoint?: {
|
|
106
|
+
y: number;
|
|
107
|
+
x: number;
|
|
108
|
+
} | undefined;
|
|
109
|
+
comment?: string | undefined;
|
|
110
|
+
}[];
|
|
111
|
+
status?: "resolved" | "open" | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
export type FeedbackBatch = z.infer<typeof FeedbackBatchSchema>;
|
|
114
|
+
export declare const ResolutionReceiptSchema: z.ZodObject<{
|
|
115
|
+
schemaVersion: z.ZodLiteral<"visual-feedback-receipt/v1">;
|
|
116
|
+
batchId: z.ZodString;
|
|
117
|
+
planId: z.ZodString;
|
|
118
|
+
baseRevision: z.ZodNumber;
|
|
119
|
+
resolvedAtRevision: z.ZodNumber;
|
|
120
|
+
resolvedAt: z.ZodString;
|
|
121
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
122
|
+
index: z.ZodNumber;
|
|
123
|
+
outcome: z.ZodEnum<["applied", "rejected", "unresolved"]>;
|
|
124
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
index: number;
|
|
127
|
+
outcome: "rejected" | "applied" | "unresolved";
|
|
128
|
+
notes?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
index: number;
|
|
131
|
+
outcome: "rejected" | "applied" | "unresolved";
|
|
132
|
+
notes?: string | undefined;
|
|
133
|
+
}>, "many">;
|
|
134
|
+
}, "strict", z.ZodTypeAny, {
|
|
135
|
+
entries: {
|
|
136
|
+
index: number;
|
|
137
|
+
outcome: "rejected" | "applied" | "unresolved";
|
|
138
|
+
notes?: string | undefined;
|
|
139
|
+
}[];
|
|
140
|
+
schemaVersion: "visual-feedback-receipt/v1";
|
|
141
|
+
planId: string;
|
|
142
|
+
baseRevision: number;
|
|
143
|
+
batchId: string;
|
|
144
|
+
resolvedAtRevision: number;
|
|
145
|
+
resolvedAt: string;
|
|
146
|
+
}, {
|
|
147
|
+
entries: {
|
|
148
|
+
index: number;
|
|
149
|
+
outcome: "rejected" | "applied" | "unresolved";
|
|
150
|
+
notes?: string | undefined;
|
|
151
|
+
}[];
|
|
152
|
+
schemaVersion: "visual-feedback-receipt/v1";
|
|
153
|
+
planId: string;
|
|
154
|
+
baseRevision: number;
|
|
155
|
+
batchId: string;
|
|
156
|
+
resolvedAtRevision: number;
|
|
157
|
+
resolvedAt: string;
|
|
158
|
+
}>;
|
|
159
|
+
export type ResolutionReceipt = z.infer<typeof ResolutionReceiptSchema>;
|
|
160
|
+
//# sourceMappingURL=feedback-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-schemas.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/feedback-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,iBAAiB,gGAOpB,CAAC;AAeX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWtB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAUhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU1B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `visual-feedback/v1` immutable batch schema + resolution-receipt schema.
|
|
3
|
+
*
|
|
4
|
+
* A feedback batch is written once and never mutated (red-team: immutability is
|
|
5
|
+
* the misapplication guard). It captures the reviewer's intent against an exact
|
|
6
|
+
* `baseRevision` + `baseHash`; the apply loop (Phase 6) refuses to apply a batch
|
|
7
|
+
* whose base no longer matches the artifact. The batch `id` is charset-locked so
|
|
8
|
+
* a consumer can validate it BEFORE any path join.
|
|
9
|
+
*
|
|
10
|
+
* The resolution receipt mirrors the batch, recording a per-operation outcome
|
|
11
|
+
* (`applied | rejected | unresolved`). Batches remain byte-immutable after
|
|
12
|
+
* resolution; the receipt is the mutable-outcome surface.
|
|
13
|
+
*
|
|
14
|
+
* `markup` operation points are position-absolute / unanchored (red-team L3):
|
|
15
|
+
* they do NOT track frames across layout regeneration — documented, not a bug.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from "zod";
|
|
18
|
+
import { ENTITY_ID_RE, FEEDBACK_BATCH_ID_RE } from "./ids.js";
|
|
19
|
+
const EntityId = z.string().regex(ENTITY_ID_RE);
|
|
20
|
+
const BatchId = z.string().regex(FEEDBACK_BATCH_ID_RE, "invalid feedback batch id (path-injection guard)");
|
|
21
|
+
export const FEEDBACK_OP_TYPES = [
|
|
22
|
+
"annotation",
|
|
23
|
+
"copy-change",
|
|
24
|
+
"field-change",
|
|
25
|
+
"flow-change",
|
|
26
|
+
"scope-change",
|
|
27
|
+
"other",
|
|
28
|
+
];
|
|
29
|
+
const FeedbackOperationSchema = z
|
|
30
|
+
.object({
|
|
31
|
+
type: z.enum(FEEDBACK_OP_TYPES),
|
|
32
|
+
frameId: EntityId.optional(),
|
|
33
|
+
elementId: z.string().optional(),
|
|
34
|
+
sourceRefId: EntityId.optional(),
|
|
35
|
+
visualPoint: z.object({ x: z.number(), y: z.number() }).strict().optional(),
|
|
36
|
+
intent: z.string().min(1),
|
|
37
|
+
comment: z.string().optional(),
|
|
38
|
+
context: z.string().optional(),
|
|
39
|
+
})
|
|
40
|
+
.strict();
|
|
41
|
+
export const FeedbackBatchSchema = z
|
|
42
|
+
.object({
|
|
43
|
+
schemaVersion: z.literal("visual-feedback/v1"),
|
|
44
|
+
id: BatchId,
|
|
45
|
+
planId: EntityId,
|
|
46
|
+
baseRevision: z.number().int().nonnegative(),
|
|
47
|
+
baseHash: z.string().min(1),
|
|
48
|
+
createdAt: z.string().min(1),
|
|
49
|
+
operations: z.array(FeedbackOperationSchema).min(1).max(500),
|
|
50
|
+
status: z.enum(["open", "resolved"]).default("open"),
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
const ResolutionEntrySchema = z
|
|
54
|
+
.object({
|
|
55
|
+
index: z.number().int().nonnegative(),
|
|
56
|
+
outcome: z.enum(["applied", "rejected", "unresolved"]),
|
|
57
|
+
notes: z.string().optional(),
|
|
58
|
+
})
|
|
59
|
+
.strict();
|
|
60
|
+
export const ResolutionReceiptSchema = z
|
|
61
|
+
.object({
|
|
62
|
+
schemaVersion: z.literal("visual-feedback-receipt/v1"),
|
|
63
|
+
batchId: BatchId,
|
|
64
|
+
planId: EntityId,
|
|
65
|
+
baseRevision: z.number().int().nonnegative(),
|
|
66
|
+
resolvedAtRevision: z.number().int().nonnegative(),
|
|
67
|
+
resolvedAt: z.string().min(1),
|
|
68
|
+
entries: z.array(ResolutionEntrySchema),
|
|
69
|
+
})
|
|
70
|
+
.strict();
|
|
71
|
+
//# sourceMappingURL=feedback-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-schemas.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/feedback-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAChD,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,kDAAkD,CAAC,CAAC;AAE3G,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,YAAY;IACZ,aAAa;IACb,cAAc;IACd,aAAa;IACb,cAAc;IACd,OAAO;CACE,CAAC;AAEX,MAAM,uBAAuB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC;KACD,MAAM,EAAE,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KAClC,MAAM,CAAC;IACP,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAC9C,EAAE,EAAE,OAAO;IACX,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC5D,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CACpD,CAAC;KACD,MAAM,EAAE,CAAC;AAIX,MAAM,qBAAqB,GAAG,CAAC;KAC7B,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACrC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACtC,MAAM,CAAC;IACP,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC;IACtD,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC5C,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAClD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC;CACvC,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared identifier patterns for the visual-plan contracts.
|
|
3
|
+
*
|
|
4
|
+
* Feedback batch ids are the security-sensitive one: a consumer validates the
|
|
5
|
+
* id against `FEEDBACK_BATCH_ID_RE` BEFORE any path join (red-team M8), so the
|
|
6
|
+
* charset is deliberately narrow — no dots, slashes, or path separators can
|
|
7
|
+
* appear in a batch filename.
|
|
8
|
+
*/
|
|
9
|
+
/** Generic artifact-internal id: lowercase/uppercase alnum + hyphen/underscore. */
|
|
10
|
+
export declare const ENTITY_ID_RE: RegExp;
|
|
11
|
+
/**
|
|
12
|
+
* Strict feedback-batch id: `feedback-<digits>-<slug>`. The fixed charset makes
|
|
13
|
+
* the id safe to interpolate into a filename without traversal risk. Validated
|
|
14
|
+
* before any path join.
|
|
15
|
+
*/
|
|
16
|
+
export declare const FEEDBACK_BATCH_ID_RE: RegExp;
|
|
17
|
+
/** True when `id` is a structurally valid artifact-internal id. */
|
|
18
|
+
export declare function isValidEntityId(id: string): boolean;
|
|
19
|
+
/** True when `id` is a structurally valid feedback-batch id (path-injection safe). */
|
|
20
|
+
export declare function isValidFeedbackBatchId(id: string): boolean;
|
|
21
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/ids.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mFAAmF;AACnF,eAAO,MAAM,YAAY,QAAsC,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAgD,CAAC;AAElF,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared identifier patterns for the visual-plan contracts.
|
|
3
|
+
*
|
|
4
|
+
* Feedback batch ids are the security-sensitive one: a consumer validates the
|
|
5
|
+
* id against `FEEDBACK_BATCH_ID_RE` BEFORE any path join (red-team M8), so the
|
|
6
|
+
* charset is deliberately narrow — no dots, slashes, or path separators can
|
|
7
|
+
* appear in a batch filename.
|
|
8
|
+
*/
|
|
9
|
+
/** Generic artifact-internal id: lowercase/uppercase alnum + hyphen/underscore. */
|
|
10
|
+
export const ENTITY_ID_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
|
|
11
|
+
/**
|
|
12
|
+
* Strict feedback-batch id: `feedback-<digits>-<slug>`. The fixed charset makes
|
|
13
|
+
* the id safe to interpolate into a filename without traversal risk. Validated
|
|
14
|
+
* before any path join.
|
|
15
|
+
*/
|
|
16
|
+
export const FEEDBACK_BATCH_ID_RE = /^feedback-\d{8,}-[a-z0-9]([a-z0-9-]{0,63})$/;
|
|
17
|
+
/** True when `id` is a structurally valid artifact-internal id. */
|
|
18
|
+
export function isValidEntityId(id) {
|
|
19
|
+
return ENTITY_ID_RE.test(id);
|
|
20
|
+
}
|
|
21
|
+
/** True when `id` is a structurally valid feedback-batch id (path-injection safe). */
|
|
22
|
+
export function isValidFeedbackBatchId(id) {
|
|
23
|
+
return FEEDBACK_BATCH_ID_RE.test(id);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/ids.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAG,mCAAmC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,6CAA6C,CAAC;AAElF,mEAAmE;AACnE,MAAM,UAAU,eAAe,CAAC,EAAU;IACzC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,sBAAsB,CAAC,EAAU;IAChD,OAAO,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed VISUAL-ONLY patch operations (Phase 5).
|
|
3
|
+
*
|
|
4
|
+
* These are the only mutations the studio may apply directly to the artifact —
|
|
5
|
+
* lane/order moves, annotation add/edit/remove, connector-label edits, and
|
|
6
|
+
* schema-backed wireframe TEXT-field edits. Raw HTML/CSS editing, freeform
|
|
7
|
+
* resize, and Markdown edits are NOT patch ops (semantic changes go through the
|
|
8
|
+
* feedback→agent loop). Every accepted patch bumps `revision` and clears
|
|
9
|
+
* approval; the application layer re-validates the mutated plan before writing.
|
|
10
|
+
*
|
|
11
|
+
* A wireframe field is targeted by a `wf-field-<id>` CLASS in the wireframe HTML
|
|
12
|
+
* (class is in the sanitizer allowlist, so no allowlist change is needed) — only
|
|
13
|
+
* that element's TEXT content is replaced, then the whole wireframe re-sanitized.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
export declare const PatchOpSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"move-frame-lane">;
|
|
18
|
+
frameId: z.ZodString;
|
|
19
|
+
laneId: z.ZodString;
|
|
20
|
+
}, "strict", z.ZodTypeAny, {
|
|
21
|
+
type: "move-frame-lane";
|
|
22
|
+
laneId: string;
|
|
23
|
+
frameId: string;
|
|
24
|
+
}, {
|
|
25
|
+
type: "move-frame-lane";
|
|
26
|
+
laneId: string;
|
|
27
|
+
frameId: string;
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"reorder-frame">;
|
|
30
|
+
frameId: z.ZodString;
|
|
31
|
+
order: z.ZodNumber;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
type: "reorder-frame";
|
|
34
|
+
order: number;
|
|
35
|
+
frameId: string;
|
|
36
|
+
}, {
|
|
37
|
+
type: "reorder-frame";
|
|
38
|
+
order: number;
|
|
39
|
+
frameId: string;
|
|
40
|
+
}>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"update-annotation">;
|
|
42
|
+
annotationId: z.ZodString;
|
|
43
|
+
text: z.ZodOptional<z.ZodString>;
|
|
44
|
+
placement: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
|
|
45
|
+
points: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
y: number;
|
|
50
|
+
x: number;
|
|
51
|
+
}, {
|
|
52
|
+
y: number;
|
|
53
|
+
x: number;
|
|
54
|
+
}>, "many">>;
|
|
55
|
+
}, "strict", z.ZodTypeAny, {
|
|
56
|
+
type: "update-annotation";
|
|
57
|
+
annotationId: string;
|
|
58
|
+
text?: string | undefined;
|
|
59
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
60
|
+
points?: {
|
|
61
|
+
y: number;
|
|
62
|
+
x: number;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
type: "update-annotation";
|
|
66
|
+
annotationId: string;
|
|
67
|
+
text?: string | undefined;
|
|
68
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
69
|
+
points?: {
|
|
70
|
+
y: number;
|
|
71
|
+
x: number;
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
}>, z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<"append-annotation">;
|
|
75
|
+
annotation: z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
kind: z.ZodEnum<["note", "markup"]>;
|
|
78
|
+
text: z.ZodString;
|
|
79
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
placement: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
|
|
81
|
+
points: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
+
x: z.ZodNumber;
|
|
83
|
+
y: z.ZodNumber;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
y: number;
|
|
86
|
+
x: number;
|
|
87
|
+
}, {
|
|
88
|
+
y: number;
|
|
89
|
+
x: number;
|
|
90
|
+
}>, "many">>;
|
|
91
|
+
}, "strict", z.ZodTypeAny, {
|
|
92
|
+
id: string;
|
|
93
|
+
kind: "note" | "markup";
|
|
94
|
+
text: string;
|
|
95
|
+
targetId?: string | undefined;
|
|
96
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
97
|
+
points?: {
|
|
98
|
+
y: number;
|
|
99
|
+
x: number;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
id: string;
|
|
103
|
+
kind: "note" | "markup";
|
|
104
|
+
text: string;
|
|
105
|
+
targetId?: string | undefined;
|
|
106
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
107
|
+
points?: {
|
|
108
|
+
y: number;
|
|
109
|
+
x: number;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
}, "strict", z.ZodTypeAny, {
|
|
113
|
+
type: "append-annotation";
|
|
114
|
+
annotation: {
|
|
115
|
+
id: string;
|
|
116
|
+
kind: "note" | "markup";
|
|
117
|
+
text: string;
|
|
118
|
+
targetId?: string | undefined;
|
|
119
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
120
|
+
points?: {
|
|
121
|
+
y: number;
|
|
122
|
+
x: number;
|
|
123
|
+
}[] | undefined;
|
|
124
|
+
};
|
|
125
|
+
}, {
|
|
126
|
+
type: "append-annotation";
|
|
127
|
+
annotation: {
|
|
128
|
+
id: string;
|
|
129
|
+
kind: "note" | "markup";
|
|
130
|
+
text: string;
|
|
131
|
+
targetId?: string | undefined;
|
|
132
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
133
|
+
points?: {
|
|
134
|
+
y: number;
|
|
135
|
+
x: number;
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
};
|
|
138
|
+
}>, z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"remove-annotation">;
|
|
140
|
+
annotationId: z.ZodString;
|
|
141
|
+
}, "strict", z.ZodTypeAny, {
|
|
142
|
+
type: "remove-annotation";
|
|
143
|
+
annotationId: string;
|
|
144
|
+
}, {
|
|
145
|
+
type: "remove-annotation";
|
|
146
|
+
annotationId: string;
|
|
147
|
+
}>, z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<"update-connector-label">;
|
|
149
|
+
connectorId: z.ZodString;
|
|
150
|
+
label: z.ZodString;
|
|
151
|
+
}, "strict", z.ZodTypeAny, {
|
|
152
|
+
type: "update-connector-label";
|
|
153
|
+
label: string;
|
|
154
|
+
connectorId: string;
|
|
155
|
+
}, {
|
|
156
|
+
type: "update-connector-label";
|
|
157
|
+
label: string;
|
|
158
|
+
connectorId: string;
|
|
159
|
+
}>, z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"update-wireframe-field">;
|
|
161
|
+
frameId: z.ZodString;
|
|
162
|
+
fieldId: z.ZodString;
|
|
163
|
+
text: z.ZodString;
|
|
164
|
+
}, "strict", z.ZodTypeAny, {
|
|
165
|
+
type: "update-wireframe-field";
|
|
166
|
+
text: string;
|
|
167
|
+
frameId: string;
|
|
168
|
+
fieldId: string;
|
|
169
|
+
}, {
|
|
170
|
+
type: "update-wireframe-field";
|
|
171
|
+
text: string;
|
|
172
|
+
frameId: string;
|
|
173
|
+
fieldId: string;
|
|
174
|
+
}>]>;
|
|
175
|
+
export type PatchOp = z.infer<typeof PatchOpSchema>;
|
|
176
|
+
//# sourceMappingURL=patches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/patches.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed VISUAL-ONLY patch operations (Phase 5).
|
|
3
|
+
*
|
|
4
|
+
* These are the only mutations the studio may apply directly to the artifact —
|
|
5
|
+
* lane/order moves, annotation add/edit/remove, connector-label edits, and
|
|
6
|
+
* schema-backed wireframe TEXT-field edits. Raw HTML/CSS editing, freeform
|
|
7
|
+
* resize, and Markdown edits are NOT patch ops (semantic changes go through the
|
|
8
|
+
* feedback→agent loop). Every accepted patch bumps `revision` and clears
|
|
9
|
+
* approval; the application layer re-validates the mutated plan before writing.
|
|
10
|
+
*
|
|
11
|
+
* A wireframe field is targeted by a `wf-field-<id>` CLASS in the wireframe HTML
|
|
12
|
+
* (class is in the sanitizer allowlist, so no allowlist change is needed) — only
|
|
13
|
+
* that element's TEXT content is replaced, then the whole wireframe re-sanitized.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
import { ENTITY_ID_RE } from "./ids.js";
|
|
17
|
+
import { AnnotationSchema } from "./schemas.js";
|
|
18
|
+
const EntityId = z.string().regex(ENTITY_ID_RE);
|
|
19
|
+
const Placement = z.enum(["top", "right", "bottom", "left"]);
|
|
20
|
+
const Points = z.array(z.object({ x: z.number(), y: z.number() }).strict());
|
|
21
|
+
const MoveFrameLane = z.object({ type: z.literal("move-frame-lane"), frameId: EntityId, laneId: EntityId }).strict();
|
|
22
|
+
const ReorderFrame = z.object({ type: z.literal("reorder-frame"), frameId: EntityId, order: z.number().int() }).strict();
|
|
23
|
+
const UpdateAnnotation = z
|
|
24
|
+
.object({ type: z.literal("update-annotation"), annotationId: EntityId, text: z.string().min(1).optional(), placement: Placement.optional(), points: Points.optional() })
|
|
25
|
+
.strict();
|
|
26
|
+
const AppendAnnotation = z.object({ type: z.literal("append-annotation"), annotation: AnnotationSchema }).strict();
|
|
27
|
+
const RemoveAnnotation = z.object({ type: z.literal("remove-annotation"), annotationId: EntityId }).strict();
|
|
28
|
+
const UpdateConnectorLabel = z.object({ type: z.literal("update-connector-label"), connectorId: EntityId, label: z.string() }).strict();
|
|
29
|
+
const UpdateWireframeField = z
|
|
30
|
+
.object({ type: z.literal("update-wireframe-field"), frameId: EntityId, fieldId: EntityId, text: z.string() })
|
|
31
|
+
.strict();
|
|
32
|
+
export const PatchOpSchema = z.discriminatedUnion("type", [
|
|
33
|
+
MoveFrameLane,
|
|
34
|
+
ReorderFrame,
|
|
35
|
+
UpdateAnnotation,
|
|
36
|
+
AppendAnnotation,
|
|
37
|
+
RemoveAnnotation,
|
|
38
|
+
UpdateConnectorLabel,
|
|
39
|
+
UpdateWireframeField,
|
|
40
|
+
]);
|
|
41
|
+
//# sourceMappingURL=patches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patches.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/patches.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAChD,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAE5E,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACrH,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACzH,MAAM,gBAAgB,GAAG,CAAC;KACxB,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;KACxK,MAAM,EAAE,CAAC;AACX,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACnH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAC7G,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACxI,MAAM,oBAAoB,GAAG,CAAC;KAC5B,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;KAC7G,MAAM,EAAE,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACzD,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,oBAAoB;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared wireframe-sanitizer allowlist config.
|
|
3
|
+
*
|
|
4
|
+
* This module is the SINGLE source of truth for the sanitizer boundary and is
|
|
5
|
+
* imported by BOTH sides (red-team H2): the Node save-time sanitizer here in
|
|
6
|
+
* Phase 1 (jsdom-backed DOMPurify) and the browser render-time sanitizer in
|
|
7
|
+
* Phase 4 (native-DOM DOMPurify). Two parsers over ONE allowlist is the only
|
|
8
|
+
* way to keep the reject-at-save and re-sanitize-at-render decisions identical.
|
|
9
|
+
*
|
|
10
|
+
* It is pure data — no DOM, no jsdom, no dompurify import — so both environments
|
|
11
|
+
* can consume it without pulling in the other's engine.
|
|
12
|
+
*
|
|
13
|
+
* Reject semantics (not repair): the caller sanitizes with this config, then
|
|
14
|
+
* diffs the sanitized output against the DOM-normalized input; ANY delta is a
|
|
15
|
+
* rejection with a JSON path. This config's job is only to define what "safe"
|
|
16
|
+
* means; the diff enforces reject-not-repair.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Semantic wireframe tag vocabulary. Anything outside this list is stripped by
|
|
20
|
+
* DOMPurify, which the reject-diff then turns into a hard error. Interactive
|
|
21
|
+
* form controls (`input`, `textarea`, `select`, `form`) are intentionally
|
|
22
|
+
* absent — wireframes represent them as `.wf-*`-classed structural elements,
|
|
23
|
+
* never live controls.
|
|
24
|
+
*/
|
|
25
|
+
export declare const WIREFRAME_ALLOWED_TAGS: readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* Allowed attributes. `class` carries the `.wf-*` vocabulary; `href` is allowed
|
|
28
|
+
* but scheme-restricted by `WIREFRAME_ALLOWED_URI_REGEXP`. `style` is NOT
|
|
29
|
+
* allowed (inline CSS is how fixed-position / z-index / font-face attacks
|
|
30
|
+
* arrive), so any `style=` attribute is stripped and the diff rejects it.
|
|
31
|
+
*/
|
|
32
|
+
export declare const WIREFRAME_ALLOWED_ATTR: readonly string[];
|
|
33
|
+
/**
|
|
34
|
+
* URL scheme allowlist for `href`. Permits http(s), mailto, in-page anchors,
|
|
35
|
+
* and site-relative paths (a single leading `/`). Everything else —
|
|
36
|
+
* `javascript:`, `data:`, `vbscript:`, tab/entity-obfuscated schemes, AND
|
|
37
|
+
* protocol-relative `//host` (which resolves to an external origin) — is
|
|
38
|
+
* rejected by DOMPurify and the diff.
|
|
39
|
+
*/
|
|
40
|
+
export declare const WIREFRAME_ALLOWED_URI_REGEXP: RegExp;
|
|
41
|
+
/**
|
|
42
|
+
* The DOMPurify config object, identical on both sides.
|
|
43
|
+
*
|
|
44
|
+
* NOTE: `USE_PROFILES` is deliberately NOT set — DOMPurify IGNORES
|
|
45
|
+
* `ALLOWED_TAGS`/`ALLOWED_ATTR` whenever a profile is present, and the built-in
|
|
46
|
+
* html profile permits form controls. The explicit `ALLOWED_TAGS` allowlist is
|
|
47
|
+
* strictly stronger: anything outside it (form controls, SVG, MathML, script)
|
|
48
|
+
* is stripped, which the reject-diff turns into a hard error. Data/ARIA attrs
|
|
49
|
+
* are off; `style` is force-forbidden even though it is already off-allowlist.
|
|
50
|
+
*/
|
|
51
|
+
export declare const WIREFRAME_SANITIZE_CONFIG: {
|
|
52
|
+
ALLOWED_TAGS: string[];
|
|
53
|
+
ALLOWED_ATTR: string[];
|
|
54
|
+
ALLOW_DATA_ATTR: boolean;
|
|
55
|
+
ALLOW_ARIA_ATTR: boolean;
|
|
56
|
+
FORBID_ATTR: string[];
|
|
57
|
+
FORBID_TAGS: string[];
|
|
58
|
+
ALLOWED_URI_REGEXP: RegExp;
|
|
59
|
+
WHOLE_DOCUMENT: boolean;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=sanitizer-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizer-config.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/sanitizer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EASnD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAuC,CAAC;AAE5F;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,QAAwC,CAAC;AAElF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;CASrC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared wireframe-sanitizer allowlist config.
|
|
3
|
+
*
|
|
4
|
+
* This module is the SINGLE source of truth for the sanitizer boundary and is
|
|
5
|
+
* imported by BOTH sides (red-team H2): the Node save-time sanitizer here in
|
|
6
|
+
* Phase 1 (jsdom-backed DOMPurify) and the browser render-time sanitizer in
|
|
7
|
+
* Phase 4 (native-DOM DOMPurify). Two parsers over ONE allowlist is the only
|
|
8
|
+
* way to keep the reject-at-save and re-sanitize-at-render decisions identical.
|
|
9
|
+
*
|
|
10
|
+
* It is pure data — no DOM, no jsdom, no dompurify import — so both environments
|
|
11
|
+
* can consume it without pulling in the other's engine.
|
|
12
|
+
*
|
|
13
|
+
* Reject semantics (not repair): the caller sanitizes with this config, then
|
|
14
|
+
* diffs the sanitized output against the DOM-normalized input; ANY delta is a
|
|
15
|
+
* rejection with a JSON path. This config's job is only to define what "safe"
|
|
16
|
+
* means; the diff enforces reject-not-repair.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Semantic wireframe tag vocabulary. Anything outside this list is stripped by
|
|
20
|
+
* DOMPurify, which the reject-diff then turns into a hard error. Interactive
|
|
21
|
+
* form controls (`input`, `textarea`, `select`, `form`) are intentionally
|
|
22
|
+
* absent — wireframes represent them as `.wf-*`-classed structural elements,
|
|
23
|
+
* never live controls.
|
|
24
|
+
*/
|
|
25
|
+
export const WIREFRAME_ALLOWED_TAGS = [
|
|
26
|
+
"section", "header", "footer", "main", "nav", "aside", "article",
|
|
27
|
+
"div", "span", "p",
|
|
28
|
+
"h1", "h2", "h3", "h4", "h5", "h6",
|
|
29
|
+
"ul", "ol", "li", "dl", "dt", "dd",
|
|
30
|
+
"a", "strong", "em", "small", "b", "i", "u", "code", "pre", "blockquote",
|
|
31
|
+
"figure", "figcaption", "hr", "br",
|
|
32
|
+
"table", "thead", "tbody", "tfoot", "tr", "th", "td", "caption",
|
|
33
|
+
"label",
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Allowed attributes. `class` carries the `.wf-*` vocabulary; `href` is allowed
|
|
37
|
+
* but scheme-restricted by `WIREFRAME_ALLOWED_URI_REGEXP`. `style` is NOT
|
|
38
|
+
* allowed (inline CSS is how fixed-position / z-index / font-face attacks
|
|
39
|
+
* arrive), so any `style=` attribute is stripped and the diff rejects it.
|
|
40
|
+
*/
|
|
41
|
+
export const WIREFRAME_ALLOWED_ATTR = ["class", "href", "title", "role"];
|
|
42
|
+
/**
|
|
43
|
+
* URL scheme allowlist for `href`. Permits http(s), mailto, in-page anchors,
|
|
44
|
+
* and site-relative paths (a single leading `/`). Everything else —
|
|
45
|
+
* `javascript:`, `data:`, `vbscript:`, tab/entity-obfuscated schemes, AND
|
|
46
|
+
* protocol-relative `//host` (which resolves to an external origin) — is
|
|
47
|
+
* rejected by DOMPurify and the diff.
|
|
48
|
+
*/
|
|
49
|
+
export const WIREFRAME_ALLOWED_URI_REGEXP = /^(?:(?:https?|mailto):|#|\/(?!\/))/i;
|
|
50
|
+
/**
|
|
51
|
+
* The DOMPurify config object, identical on both sides.
|
|
52
|
+
*
|
|
53
|
+
* NOTE: `USE_PROFILES` is deliberately NOT set — DOMPurify IGNORES
|
|
54
|
+
* `ALLOWED_TAGS`/`ALLOWED_ATTR` whenever a profile is present, and the built-in
|
|
55
|
+
* html profile permits form controls. The explicit `ALLOWED_TAGS` allowlist is
|
|
56
|
+
* strictly stronger: anything outside it (form controls, SVG, MathML, script)
|
|
57
|
+
* is stripped, which the reject-diff turns into a hard error. Data/ARIA attrs
|
|
58
|
+
* are off; `style` is force-forbidden even though it is already off-allowlist.
|
|
59
|
+
*/
|
|
60
|
+
export const WIREFRAME_SANITIZE_CONFIG = {
|
|
61
|
+
ALLOWED_TAGS: [...WIREFRAME_ALLOWED_TAGS],
|
|
62
|
+
ALLOWED_ATTR: [...WIREFRAME_ALLOWED_ATTR],
|
|
63
|
+
ALLOW_DATA_ATTR: false,
|
|
64
|
+
ALLOW_ARIA_ATTR: false,
|
|
65
|
+
FORBID_ATTR: ["style"],
|
|
66
|
+
FORBID_TAGS: ["style", "script", "iframe", "object", "embed", "form", "svg", "math"],
|
|
67
|
+
ALLOWED_URI_REGEXP: WIREFRAME_ALLOWED_URI_REGEXP,
|
|
68
|
+
WHOLE_DOCUMENT: false,
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=sanitizer-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizer-config.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/sanitizer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACxD,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS;IAChE,KAAK,EAAE,MAAM,EAAE,GAAG;IAClB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;IACxE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI;IAClC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS;IAC/D,OAAO;CACP,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAE5F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,qCAAqC,CAAC;AAElF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,YAAY,EAAE,CAAC,GAAG,sBAAsB,CAAC;IACzC,YAAY,EAAE,CAAC,GAAG,sBAAsB,CAAC;IACzC,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,KAAK;IACtB,WAAW,EAAE,CAAC,OAAO,CAAC;IACtB,WAAW,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;IACpF,kBAAkB,EAAE,4BAA4B;IAChD,cAAc,EAAE,KAAK;CACrB,CAAC"}
|