@beyondwork/docx-react-component 1.0.0 → 1.0.2
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 +44 -104
- package/package.json +66 -15
- package/src/api/public-types.ts +1 -1
- package/src/compare/diff-engine.ts +530 -0
- package/src/compare/export-redlines.ts +162 -0
- package/src/compare/snapshot.ts +37 -0
- package/src/core/commands/index.ts +1 -1
- package/src/core/state/editor-state.ts +2 -2
- package/src/index.ts +45 -0
- package/src/legal/bookmarks.ts +196 -0
- package/src/legal/cross-references.ts +356 -0
- package/src/legal/defined-terms.ts +203 -0
- package/src/runtime/document-runtime.ts +3 -5
- package/src/runtime/table-commands.ts +4 -1
- package/src/runtime/table-schema.ts +17 -2
- package/src/runtime/virtualized-rendering.ts +258 -0
- package/src/ui/WordReviewEditor.tsx +256 -35
- package/src/ui-tailwind/editor-surface/tw-editor-surface.tsx +2 -2
- package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +16 -2
- package/.codex/config.toml +0 -5
- package/.corepack/v1/pnpm/10.30.3/.corepack +0 -1
- package/.corepack/v1/pnpm/10.30.3/LICENSE +0 -22
- package/.corepack/v1/pnpm/10.30.3/README.md +0 -240
- package/.corepack/v1/pnpm/10.30.3/dist/node-gyp-bin/node-gyp +0 -6
- package/.corepack/v1/pnpm/10.30.3/dist/node-gyp-bin/node-gyp.cmd +0 -5
- package/.corepack/v1/pnpm/10.30.3/dist/pnpm.cjs +0 -195400
- package/.corepack/v1/pnpm/10.30.3/dist/pnpmrc +0 -2
- package/.corepack/v1/pnpm/10.30.3/dist/reflink.darwin-arm64-2HJ4WGO6.node +0 -0
- package/.corepack/v1/pnpm/10.30.3/dist/reflink.darwin-x64-3G3H6IW4.node +0 -0
- package/.corepack/v1/pnpm/10.30.3/dist/reflink.win32-arm64-msvc-Q6BARPPB.node +0 -0
- package/.corepack/v1/pnpm/10.30.3/dist/reflink.win32-x64-msvc-J2TZHRQI.node +0 -0
- package/.corepack/v1/pnpm/10.30.3/dist/templates/completion.bash +0 -31
- package/.corepack/v1/pnpm/10.30.3/dist/templates/completion.fish +0 -22
- package/.corepack/v1/pnpm/10.30.3/dist/templates/completion.ps1 +0 -193
- package/.corepack/v1/pnpm/10.30.3/dist/templates/completion.zsh +0 -27
- package/.corepack/v1/pnpm/10.30.3/dist/vendor/fastlist-0.3.0-x64.exe +0 -0
- package/.corepack/v1/pnpm/10.30.3/dist/vendor/fastlist-0.3.0-x86.exe +0 -0
- package/.corepack/v1/pnpm/10.30.3/dist/worker.js +0 -10119
- package/.corepack/v1/pnpm/10.30.3/package.json +0 -192
- package/.cursor/mcp.json +0 -7
- package/.github/workflows/ci.yml +0 -35
- package/.mcp.json +0 -7
- package/.openclaw/workspace-state.json +0 -4
- package/.pnpmrc.json +0 -1
- package/.wave-launch.sh +0 -7
- package/.workspace-marker +0 -1
- package/AGENTS.md +0 -78
- package/CHANGELOG.md +0 -177
- package/DESIGN.md +0 -929
- package/HEARTBEAT.md +0 -7
- package/IDENTITY.md +0 -23
- package/SOUL.md +0 -36
- package/TOOLS.md +0 -40
- package/USER.md +0 -17
- package/docs/README.md +0 -107
- package/docs/agents/wave-cont-eval-role.md +0 -36
- package/docs/agents/wave-cont-qa-role.md +0 -52
- package/docs/agents/wave-deploy-verifier-role.md +0 -34
- package/docs/agents/wave-design-role.md +0 -47
- package/docs/agents/wave-documentation-role.md +0 -34
- package/docs/agents/wave-infra-role.md +0 -34
- package/docs/agents/wave-integration-role.md +0 -37
- package/docs/agents/wave-launcher-role.md +0 -41
- package/docs/agents/wave-orchestrator-role.md +0 -52
- package/docs/agents/wave-planner-role.md +0 -39
- package/docs/agents/wave-security-role.md +0 -40
- package/docs/architecture/docx/README.md +0 -10
- package/docs/architecture/future/README.md +0 -8
- package/docs/architecture/ooxml-upgrade-analysis.md +0 -134
- package/docs/architecture/platform/shared-openxml-editor-platform.md +0 -153
- package/docs/architecture/xlsx/canonical-workbook-model-and-commands.md +0 -187
- package/docs/architecture/xlsx/spreadsheet-editor-frontend-architecture.md +0 -150
- package/docs/comment-redline-overview.md +0 -350
- package/docs/concepts/context7-vs-skills.md +0 -118
- package/docs/concepts/operating-modes.md +0 -91
- package/docs/concepts/runtime-agnostic-orchestration.md +0 -111
- package/docs/concepts/what-is-a-wave.md +0 -217
- package/docs/context7/bundles.json +0 -222
- package/docs/context7/planner-agent/README.md +0 -28
- package/docs/context7/planner-agent/manifest.json +0 -83
- package/docs/context7/planner-agent/papers/cooperbench-why-coding-agents-cannot-be-your-teammates-yet.md +0 -3283
- package/docs/context7/planner-agent/papers/dova-deliberation-first-multi-agent-orchestration-for-autonomous-research-automation.md +0 -1699
- package/docs/context7/planner-agent/papers/dpbench-large-language-models-struggle-with-simultaneous-coordination.md +0 -2251
- package/docs/context7/planner-agent/papers/incremental-planning-to-control-a-blackboard-based-problem-solver.md +0 -1729
- package/docs/context7/planner-agent/papers/silo-bench-a-scalable-environment-for-evaluating-distributed-coordination-in-multi-agent-llm-systems.md +0 -3747
- package/docs/context7/planner-agent/papers/todoevolve-learning-to-architect-agent-planning-systems.md +0 -1675
- package/docs/context7/planner-agent/papers/verified-multi-agent-orchestration-a-plan-execute-verify-replan-framework-for-complex-query-resolution.md +0 -1173
- package/docs/context7/planner-agent/papers/why-do-multi-agent-llm-systems-fail.md +0 -5211
- package/docs/context7/planner-agent/topics/planning-and-orchestration.md +0 -24
- package/docs/evals/arm-templates/README.md +0 -13
- package/docs/evals/arm-templates/full-wave.json +0 -15
- package/docs/evals/arm-templates/single-agent.json +0 -15
- package/docs/evals/benchmark-catalog.json +0 -670
- package/docs/evals/cases/README.md +0 -47
- package/docs/evals/cases/wave-blackboard-inbox-targeting.json +0 -73
- package/docs/evals/cases/wave-contradiction-conflict.json +0 -104
- package/docs/evals/cases/wave-expert-routing-preservation.json +0 -69
- package/docs/evals/cases/wave-hidden-profile-private-evidence.json +0 -81
- package/docs/evals/cases/wave-premature-closure-guard.json +0 -71
- package/docs/evals/cases/wave-silo-cross-agent-state.json +0 -77
- package/docs/evals/cases/wave-simultaneous-lockstep.json +0 -92
- package/docs/evals/external-benchmarks.json +0 -85
- package/docs/evals/external-command-config.sample.json +0 -9
- package/docs/evals/external-command-config.swe-bench-pro.json +0 -8
- package/docs/evals/pilots/README.md +0 -47
- package/docs/evals/pilots/swe-bench-pro-public-full-wave-review-10.json +0 -64
- package/docs/evals/pilots/swe-bench-pro-public-pilot.json +0 -111
- package/docs/evals/wave-benchmark-program.md +0 -302
- package/docs/guides/planner.md +0 -220
- package/docs/guides/recommendations-0.8.9.md +0 -133
- package/docs/guides/signal-wrappers.md +0 -165
- package/docs/guides/terminal-surfaces.md +0 -96
- package/docs/image copy.png +0 -0
- package/docs/image.png +0 -0
- package/docs/images/image.png +0 -0
- package/docs/legal-feedback-architecture.md +0 -498
- package/docs/plans/component-cutover-matrix.json +0 -1072
- package/docs/plans/component-cutover-matrix.md +0 -307
- package/docs/plans/context7-wave-orchestrator.md +0 -155
- package/docs/plans/current-state.md +0 -198
- package/docs/plans/docx/README.md +0 -9
- package/docs/plans/examples/wave-benchmark-improvement.md +0 -108
- package/docs/plans/examples/wave-example-live-proof.md +0 -435
- package/docs/plans/master-plan.md +0 -224
- package/docs/plans/migration.md +0 -538
- package/docs/plans/operations/README.md +0 -7
- package/docs/plans/operations/wave-10-word-certification.md +0 -87
- package/docs/plans/operations/wave-8-railway-staging.md +0 -153
- package/docs/plans/operations/wave-9-manual-certification.md +0 -73
- package/docs/plans/platform/README.md +0 -9
- package/docs/plans/reference/legal-checklist-coverage.md +0 -258
- package/docs/plans/wave-orchestrator.md +0 -423
- package/docs/plans/waves/README.md +0 -75
- package/docs/plans/waves/completed/wave-0.md +0 -195
- package/docs/plans/waves/completed/wave-1.md +0 -379
- package/docs/plans/waves/completed/wave-10.md +0 -670
- package/docs/plans/waves/completed/wave-11.md +0 -335
- package/docs/plans/waves/completed/wave-12.md +0 -417
- package/docs/plans/waves/completed/wave-13.md +0 -316
- package/docs/plans/waves/completed/wave-14.md +0 -319
- package/docs/plans/waves/completed/wave-15.md +0 -321
- package/docs/plans/waves/completed/wave-16.md +0 -316
- package/docs/plans/waves/completed/wave-17.md +0 -331
- package/docs/plans/waves/completed/wave-18.md +0 -328
- package/docs/plans/waves/completed/wave-2.md +0 -438
- package/docs/plans/waves/completed/wave-3.md +0 -435
- package/docs/plans/waves/completed/wave-4.md +0 -430
- package/docs/plans/waves/completed/wave-5.md +0 -430
- package/docs/plans/waves/completed/wave-6.md +0 -430
- package/docs/plans/waves/completed/wave-7.md +0 -526
- package/docs/plans/waves/completed/wave-8.md +0 -596
- package/docs/plans/waves/completed/wave-9.md +0 -552
- package/docs/plans/waves/deferred/README.md +0 -14
- package/docs/plans/waves/deferred/encrypted-intake-contracts.md +0 -282
- package/docs/plans/waves/deferred/legal-feedback-wave-expansion.md +0 -308
- package/docs/plans/waves/deferred/wave-encrypted-intake.md +0 -451
- package/docs/plans/waves/design/README.md +0 -5
- package/docs/plans/waves/design/wave-1-a1.md +0 -309
- package/docs/plans/waves/reviews/README.md +0 -5
- package/docs/plans/waves/reviews/wave-0-cont-qa.md +0 -151
- package/docs/plans/waves/reviews/wave-1-cont-qa.md +0 -46
- package/docs/plans/waves/reviews/wave-10-accessibility-and-design.md +0 -51
- package/docs/plans/waves/reviews/wave-10-cont-qa.md +0 -24
- package/docs/plans/waves/reviews/wave-10-dashboard-proof.md +0 -46
- package/docs/plans/waves/reviews/wave-10-performance-signoff.md +0 -55
- package/docs/plans/waves/reviews/wave-10-regression-proof.md +0 -23
- package/docs/plans/waves/reviews/wave-10-release-audit.md +0 -31
- package/docs/plans/waves/reviews/wave-10-service-proof.md +0 -83
- package/docs/plans/waves/reviews/wave-10-word-certification.md +0 -31
- package/docs/plans/waves/reviews/wave-18-ai-contract-closure.md +0 -277
- package/docs/plans/waves/reviews/wave-18-cont-qa.md +0 -255
- package/docs/plans/waves/reviews/wave-18-parity-proof.md +0 -271
- package/docs/plans/waves/reviews/wave-19-cont-qa.md +0 -59
- package/docs/plans/waves/reviews/wave-2-cont-qa.md +0 -72
- package/docs/plans/waves/reviews/wave-20-cont-qa.md +0 -60
- package/docs/plans/waves/reviews/wave-25-cont-qa.md +0 -48
- package/docs/plans/waves/reviews/wave-28-cont-qa.md +0 -46
- package/docs/plans/waves/reviews/wave-29-cont-qa.md +0 -53
- package/docs/plans/waves/reviews/wave-3-cont-qa.md +0 -53
- package/docs/plans/waves/reviews/wave-3-core-proof.md +0 -77
- package/docs/plans/waves/reviews/wave-3-validator-proof.md +0 -73
- package/docs/plans/waves/reviews/wave-32-cont-qa.md +0 -43
- package/docs/plans/waves/reviews/wave-33-cont-qa.md +0 -526
- package/docs/plans/waves/reviews/wave-34-cont-qa.md +0 -100
- package/docs/plans/waves/reviews/wave-35-cont-qa.md +0 -145
- package/docs/plans/waves/reviews/wave-4-cont-qa.md +0 -47
- package/docs/plans/waves/reviews/wave-4-structure-proof.md +0 -69
- package/docs/plans/waves/reviews/wave-5-comment-proof.md +0 -158
- package/docs/plans/waves/reviews/wave-5-cont-qa.md +0 -68
- package/docs/plans/waves/reviews/wave-6-cont-qa.md +0 -416
- package/docs/plans/waves/reviews/wave-6-redline-proof.md +0 -130
- package/docs/plans/waves/reviews/wave-7-cont-qa.md +0 -82
- package/docs/plans/waves/reviews/wave-7-ooxml-compliance.md +0 -85
- package/docs/plans/waves/reviews/wave-7-preservation-proof.md +0 -119
- package/docs/plans/waves/reviews/wave-7-trust-ux.md +0 -87
- package/docs/plans/waves/reviews/wave-8-accessibility-and-design.md +0 -128
- package/docs/plans/waves/reviews/wave-8-cont-qa.md +0 -92
- package/docs/plans/waves/reviews/wave-8-live-proof.md +0 -140
- package/docs/plans/waves/reviews/wave-8-security.md +0 -47
- package/docs/plans/waves/reviews/wave-9-editor-embedding.md +0 -39
- package/docs/plans/waves/reviews/wave-9-fixture-runner.md +0 -56
- package/docs/plans/waves/reviews/wave-9-live-proof.md +0 -105
- package/docs/plans/waves/reviews/wave-9-usability-and-performance.md +0 -152
- package/docs/plans/waves/specs/README.md +0 -5
- package/docs/plans/waves/specs/wave-1-component-boundaries.md +0 -322
- package/docs/plans/waves/specs/wave-1-ooxml-contracts.md +0 -323
- package/docs/plans/waves/specs/wave-1-review-and-ui-contracts.md +0 -339
- package/docs/plans/waves/specs/wave-1-runtime-contracts.md +0 -509
- package/docs/plans/waves/wave-19.md +0 -341
- package/docs/plans/waves/wave-20.md +0 -308
- package/docs/plans/waves/wave-21.md +0 -289
- package/docs/plans/waves/wave-22.md +0 -221
- package/docs/plans/waves/wave-23.md +0 -295
- package/docs/plans/waves/wave-24.md +0 -286
- package/docs/plans/waves/wave-25.md +0 -313
- package/docs/plans/waves/wave-26.md +0 -300
- package/docs/plans/waves/wave-27.md +0 -299
- package/docs/plans/waves/wave-28.md +0 -368
- package/docs/plans/waves/wave-29.md +0 -303
- package/docs/plans/waves/wave-30.md +0 -307
- package/docs/plans/waves/wave-31.md +0 -231
- package/docs/plans/waves/wave-32.md +0 -152
- package/docs/plans/waves/wave-33.md +0 -147
- package/docs/plans/waves/wave-34.md +0 -148
- package/docs/plans/waves/wave-35.md +0 -141
- package/docs/plans/waves/wave-36.md +0 -146
- package/docs/plans/xlsx/README.md +0 -14
- package/docs/plans/xlsx/xlsx-fixture-corpus-and-certification-plan.md +0 -126
- package/docs/reference/cli-reference.md +0 -600
- package/docs/reference/coordination-and-closure.md +0 -487
- package/docs/reference/deep-research-report (15).md +0 -25
- package/docs/reference/docx/README.md +0 -10
- package/docs/reference/legal-checklist.md +0 -445
- package/docs/reference/live-proof-waves.md +0 -199
- package/docs/reference/ooxml-compliance.md +0 -129
- package/docs/reference/ooxml-feature-parity-matrix.md +0 -172
- package/docs/reference/platform/shared-ooxml-platform-guidance.md +0 -77
- package/docs/reference/prototype-agent-prompt-legal-fidelity.md +0 -155
- package/docs/reference/public-api.md +0 -456
- package/docs/reference/repository-guidance.md +0 -58
- package/docs/reference/runtime-config/README.md +0 -182
- package/docs/reference/runtime-config/claude.md +0 -110
- package/docs/reference/runtime-config/codex.md +0 -82
- package/docs/reference/runtime-config/opencode.md +0 -93
- package/docs/reference/sample-waves.md +0 -105
- package/docs/reference/skills.md +0 -237
- package/docs/reference/templates/AGENTS.md +0 -78
- package/docs/reference/templates/HEARTBEAT.md +0 -7
- package/docs/reference/templates/IDENTITY.md +0 -23
- package/docs/reference/templates/SOUL.md +0 -36
- package/docs/reference/templates/TOOLS.md +0 -40
- package/docs/reference/templates/USER.md +0 -17
- package/docs/reference/wave-control.md +0 -184
- package/docs/reference/wave-planning-lessons.md +0 -167
- package/docs/reference/word-review-editor-frontend-architecture.md +0 -479
- package/docs/reference/word-review-editor-ux-guide.md +0 -253
- package/docs/reference/xlsx/xlsx-ooxml-compliance.md +0 -137
- package/docs/research/agent-context-sources.md +0 -178
- package/docs/research/coordination-failure-review.md +0 -290
- package/docs/research/docx-react-component/Canonical Document Schema Specification for a React-based Word-compatible Editor.md +0 -2317
- package/docs/research/docx-react-component/Feature Compatibility Matrix for a React Word Compatible Legal Editor v1.md +0 -219
- package/docs/research/docx-react-component/React Component Architecture and Front-End Structure Specification for a Word-Compatible Legal Review Editor.md +0 -1112
- package/docs/research/docx-react-component/document_compatibility_and_testing_spec.md +0 -751
- package/docs/research/xlsx/raw/README.md +0 -13
- package/docs/roadmap.md +0 -174
- package/docs/superpowers/plans/2026-03-28-harness-control-bar.md +0 -677
- package/docs/superpowers/specs/2026-03-28-harness-control-bar-design.md +0 -274
- package/docs/xlsx-react/README.md +0 -38
- package/docs/xlsx-react/agent-llm-interaction-layer-docx-xlsx.md +0 -621
- package/docs/xlsx-react/canonical-workbook-model-and-commands.md +0 -948
- package/docs/xlsx-react/shared-openxml-editor-platform-docx-xlsx.md +0 -228
- package/docs/xlsx-react/spreadsheet-editor-component-architecture.md +0 -809
- package/docs/xlsx-react/spreadsheet-editor-frontend-architecture.md +0 -537
- package/docs/xlsx-react/spreadsheet-editor-ux-guide.md +0 -520
- package/docs/xlsx-react/xlsx-editor-research-pack.md +0 -871
- package/docs/xlsx-react/xlsx-fixture-corpus-and-certification-plan.md +0 -436
- package/docs/xlsx-react/xlsx-ooxml-compliance.md +0 -320
- package/examples/README.md +0 -16
- package/memory/MEMORY.md +0 -24
- package/pnpm-workspace.yaml +0 -4
- package/scripts/check-no-authored-js.sh +0 -13
- package/scripts/context7-api-check.sh +0 -65
- package/scripts/context7-export-env.sh +0 -42
- package/scripts/run-context7-mcp.sh +0 -8
- package/scripts/run-workspace-tests.sh +0 -15
- package/scripts/start-wave-10-local.sh +0 -189
- package/scripts/wave-agent-attach.sh +0 -47
- package/scripts/wave-auto-answer.sh +0 -118
- package/scripts/wave-dashboard-attach.sh +0 -13
- package/scripts/wave-launch.sh +0 -273
- package/scripts/wave-overnight-supervisor.sh +0 -145
- package/scripts/wave-status.sh +0 -379
- package/scripts/wave-watch.sh +0 -231
- package/services/README.md +0 -17
- package/services/openxml-validator/Dockerfile +0 -29
- package/services/openxml-validator/OpenXmlValidator.Api.csproj +0 -12
- package/services/openxml-validator/Program.cs +0 -436
- package/services/openxml-validator/README.md +0 -152
- package/services/openxml-validator/railway.json +0 -16
- package/services/react-word-editor/.tmp-a4/src/api/public-types.ts +0 -318
- package/services/react-word-editor/.tmp-a4/src/ui/WordReviewEditor.tsx +0 -1302
- package/services/react-word-editor/.tmp-a4/src/ui/editor-surface/editor-surface.tsx +0 -546
- package/services/react-word-editor/.tmp-a4/test/ui/word-review-editor.test.tsx +0 -146
- package/services/react-word-editor/.tmp-a4-build/src/api/public-types.js +0 -2
- package/services/react-word-editor/.tmp-a4-build/src/ui/WordReviewEditor.js +0 -818
- package/services/react-word-editor/.tmp-a4-build/src/ui/editor-surface/editor-surface.js +0 -229
- package/services/react-word-editor/.tmp-a4-build/test/ui/word-review-editor.test.js +0 -121
- package/services/react-word-editor/.tmp-wave-4-a3-tsconfig.json +0 -21
- package/services/react-word-editor/.tmp-wave-4-a3-tsconfig.tsbuildinfo +0 -1
- package/services/react-word-editor/Dockerfile +0 -26
- package/services/react-word-editor/README.md +0 -254
- package/services/react-word-editor/app/api/certification/route.ts +0 -79
- package/services/react-word-editor/app/api/demo-sessions/route.ts +0 -109
- package/services/react-word-editor/app/api/deploy-health/route.ts +0 -23
- package/services/react-word-editor/app/api/exports/[exportId]/route.ts +0 -34
- package/services/react-word-editor/app/api/exports/route.ts +0 -81
- package/services/react-word-editor/app/api/fixtures/[fixtureId]/run/route.ts +0 -100
- package/services/react-word-editor/app/api/health/route.ts +0 -70
- package/services/react-word-editor/app/api/runs/[runId]/route.ts +0 -36
- package/services/react-word-editor/app/api/scenarios/[scenarioId]/run/route.ts +0 -85
- package/services/react-word-editor/app/api/sessions/[sessionId]/route.ts +0 -199
- package/services/react-word-editor/app/api/sessions/[sessionId]/source/route.ts +0 -45
- package/services/react-word-editor/app/api/uploads/route.ts +0 -70
- package/services/react-word-editor/app/api/validate/route.ts +0 -310
- package/services/react-word-editor/app/certification/[runId]/page.tsx +0 -14
- package/services/react-word-editor/app/certification/page.tsx +0 -32
- package/services/react-word-editor/app/dashboard/page.tsx +0 -7
- package/services/react-word-editor/app/demo/page.tsx +0 -30
- package/services/react-word-editor/app/demo/prototype-client.tsx +0 -1080
- package/services/react-word-editor/app/editor/[sessionId]/page.tsx +0 -33
- package/services/react-word-editor/app/fixtures/page.tsx +0 -7
- package/services/react-word-editor/app/globals.css +0 -121
- package/services/react-word-editor/app/layout.tsx +0 -32
- package/services/react-word-editor/app/page.tsx +0 -30
- package/services/react-word-editor/app/runs/[runId]/page.tsx +0 -34
- package/services/react-word-editor/app/wave-10-word-review/page.tsx +0 -7
- package/services/react-word-editor/components/harness-control-bar.tsx +0 -289
- package/services/react-word-editor/components/harness-editor-session-client.tsx +0 -1214
- package/services/react-word-editor/components/harness-workspace-page.tsx +0 -715
- package/services/react-word-editor/components/reduced-motion-toggle.tsx +0 -79
- package/services/react-word-editor/components/workspace-certification-panel.tsx +0 -307
- package/services/react-word-editor/lib/certification-bundle.ts +0 -796
- package/services/react-word-editor/lib/certification-store.ts +0 -661
- package/services/react-word-editor/lib/demo-fixtures.test.mjs +0 -195
- package/services/react-word-editor/lib/demo-fixtures.ts +0 -1519
- package/services/react-word-editor/lib/editor-session-summary.test.mjs +0 -68
- package/services/react-word-editor/lib/editor-session-summary.ts +0 -14
- package/services/react-word-editor/lib/editor-session.ts +0 -228
- package/services/react-word-editor/lib/exports-route.test.mjs +0 -32
- package/services/react-word-editor/lib/harness-client.ts +0 -347
- package/services/react-word-editor/lib/harness-config.json +0 -30
- package/services/react-word-editor/lib/harness-config.test.mjs +0 -31
- package/services/react-word-editor/lib/harness-config.ts +0 -21
- package/services/react-word-editor/lib/harness-editor-datastore.test.mjs +0 -220
- package/services/react-word-editor/lib/harness-editor-datastore.ts +0 -161
- package/services/react-word-editor/lib/private-mode.test.mjs +0 -42
- package/services/react-word-editor/lib/private-mode.ts +0 -61
- package/services/react-word-editor/lib/regression-report.test.mjs +0 -352
- package/services/react-word-editor/lib/regression-report.ts +0 -896
- package/services/react-word-editor/lib/run-artifacts.ts +0 -934
- package/services/react-word-editor/lib/run-history.ts +0 -755
- package/services/react-word-editor/lib/scenario-artifacts.test.mjs +0 -41
- package/services/react-word-editor/lib/scenario-artifacts.ts +0 -44
- package/services/react-word-editor/lib/storage.ts +0 -953
- package/services/react-word-editor/lib/validator-client.test.mjs +0 -54
- package/services/react-word-editor/lib/validator-client.ts +0 -95
- package/services/react-word-editor/lib/workspace-navigation.ts +0 -79
- package/services/react-word-editor/middleware.ts +0 -35
- package/services/react-word-editor/next-env.d.ts +0 -6
- package/services/react-word-editor/next.config.mjs +0 -15
- package/services/react-word-editor/package.json +0 -38
- package/services/react-word-editor/postcss.config.mjs +0 -8
- package/services/react-word-editor/railway.json +0 -21
- package/services/react-word-editor/scripts/wave-10-certification.mjs +0 -101
- package/services/react-word-editor/scripts/wave-9-live-usability-pilot.mjs +0 -911
- package/services/react-word-editor/tsconfig.json +0 -39
- package/services/react-word-editor/tsconfig.tsbuildinfo +0 -1
- package/skills/README.md +0 -48
- package/skills/domain-docx-compatibility/SKILL.md +0 -44
- package/skills/domain-docx-compatibility/skill.json +0 -19
- package/skills/domain-editor-architecture/SKILL.md +0 -49
- package/skills/domain-editor-architecture/skill.json +0 -19
- package/skills/domain-legal-review/SKILL.md +0 -39
- package/skills/domain-legal-review/skill.json +0 -19
- package/skills/provider-aws/SKILL.md +0 -117
- package/skills/provider-aws/adapters/claude.md +0 -1
- package/skills/provider-aws/adapters/codex.md +0 -1
- package/skills/provider-aws/references/service-verification.md +0 -39
- package/skills/provider-aws/skill.json +0 -54
- package/skills/provider-custom-deploy/SKILL.md +0 -64
- package/skills/provider-custom-deploy/skill.json +0 -50
- package/skills/provider-docker-compose/SKILL.md +0 -96
- package/skills/provider-docker-compose/adapters/local.md +0 -1
- package/skills/provider-docker-compose/skill.json +0 -53
- package/skills/provider-github-release/SKILL.md +0 -121
- package/skills/provider-github-release/adapters/claude.md +0 -1
- package/skills/provider-github-release/adapters/codex.md +0 -1
- package/skills/provider-github-release/skill.json +0 -55
- package/skills/provider-kubernetes/SKILL.md +0 -143
- package/skills/provider-kubernetes/adapters/claude.md +0 -1
- package/skills/provider-kubernetes/adapters/codex.md +0 -1
- package/skills/provider-kubernetes/references/kubectl-patterns.md +0 -58
- package/skills/provider-kubernetes/skill.json +0 -52
- package/skills/provider-railway/SKILL.md +0 -123
- package/skills/provider-railway/adapters/claude.md +0 -1
- package/skills/provider-railway/adapters/codex.md +0 -1
- package/skills/provider-railway/adapters/local.md +0 -1
- package/skills/provider-railway/adapters/opencode.md +0 -1
- package/skills/provider-railway/references/verification-commands.md +0 -39
- package/skills/provider-railway/skill.json +0 -71
- package/skills/provider-ssh-manual/SKILL.md +0 -97
- package/skills/provider-ssh-manual/skill.json +0 -54
- package/skills/repo-coding-rules/SKILL.md +0 -55
- package/skills/repo-coding-rules/skill.json +0 -34
- package/skills/role-cont-eval/SKILL.md +0 -91
- package/skills/role-cont-eval/adapters/codex.md +0 -1
- package/skills/role-cont-eval/skill.json +0 -36
- package/skills/role-cont-qa/SKILL.md +0 -100
- package/skills/role-cont-qa/adapters/claude.md +0 -1
- package/skills/role-cont-qa/skill.json +0 -36
- package/skills/role-deploy/SKILL.md +0 -97
- package/skills/role-deploy/skill.json +0 -36
- package/skills/role-design/SKILL.md +0 -50
- package/skills/role-design/skill.json +0 -36
- package/skills/role-documentation/SKILL.md +0 -76
- package/skills/role-documentation/skill.json +0 -36
- package/skills/role-implementation/SKILL.md +0 -45
- package/skills/role-implementation/skill.json +0 -36
- package/skills/role-infra/SKILL.md +0 -81
- package/skills/role-infra/skill.json +0 -36
- package/skills/role-integration/SKILL.md +0 -91
- package/skills/role-integration/skill.json +0 -36
- package/skills/role-planner/SKILL.md +0 -39
- package/skills/role-planner/skill.json +0 -21
- package/skills/role-research/SKILL.md +0 -65
- package/skills/role-research/skill.json +0 -36
- package/skills/role-security/SKILL.md +0 -60
- package/skills/role-security/skill.json +0 -36
- package/skills/runtime-claude/SKILL.md +0 -66
- package/skills/runtime-claude/skill.json +0 -36
- package/skills/runtime-codex/SKILL.md +0 -58
- package/skills/runtime-codex/skill.json +0 -36
- package/skills/runtime-local/SKILL.md +0 -46
- package/skills/runtime-local/skill.json +0 -36
- package/skills/runtime-opencode/SKILL.md +0 -58
- package/skills/runtime-opencode/skill.json +0 -36
- package/skills/signal-hygiene/SKILL.md +0 -51
- package/skills/signal-hygiene/skill.json +0 -20
- package/skills/tui-design/SKILL.md +0 -77
- package/skills/tui-design/references/tui-design.md +0 -259
- package/skills/tui-design/skill.json +0 -36
- package/skills/wave-core/SKILL.md +0 -141
- package/skills/wave-core/references/marker-syntax.md +0 -70
- package/skills/wave-core/skill.json +0 -35
- package/test/README.md +0 -16
- package/test/core/formatting-commands.test.ts +0 -285
- package/test/core/image-commands.test.ts +0 -298
- package/test/core/mapping.test.ts +0 -186
- package/test/core/text-commands.test.ts +0 -176
- package/test/fixtures/docx/F01-basic-contract.docx +0 -0
- package/test/fixtures/docx/F01-basic-contract.md +0 -33
- package/test/fixtures/docx/F02-headings-styles.docx +0 -0
- package/test/fixtures/docx/F02-headings-styles.md +0 -33
- package/test/fixtures/docx/F03-legal-outline-numbering.docx +0 -0
- package/test/fixtures/docx/F03-legal-outline-numbering.md +0 -34
- package/test/fixtures/docx/F04-restart-numbering-schedules.docx +0 -0
- package/test/fixtures/docx/F04-restart-numbering-schedules.md +0 -33
- package/test/fixtures/docx/F05-table-heavy-agreement.docx +0 -0
- package/test/fixtures/docx/F05-table-heavy-agreement.md +0 -34
- package/test/fixtures/docx/F06-merged-cells-signature-table.docx +0 -0
- package/test/fixtures/docx/F06-merged-cells-signature-table.md +0 -34
- package/test/fixtures/docx/F07-inline-images-exhibit.docx +0 -0
- package/test/fixtures/docx/F07-inline-images-exhibit.md +0 -34
- package/test/fixtures/docx/F08-hyperlinks.docx +0 -0
- package/test/fixtures/docx/F08-hyperlinks.md +0 -33
- package/test/fixtures/docx/F09-comments-single-paragraph.docx +0 -0
- package/test/fixtures/docx/F09-comments-single-paragraph.md +0 -33
- package/test/fixtures/docx/F10-threaded-comments-resolve.docx +0 -0
- package/test/fixtures/docx/F10-threaded-comments-resolve.md +0 -33
- package/test/fixtures/docx/F11-redlines-basic.docx +0 -0
- package/test/fixtures/docx/F11-redlines-basic.md +0 -33
- package/test/fixtures/docx/F12-redlines-paragraph-joins-splits.docx +0 -0
- package/test/fixtures/docx/F12-redlines-paragraph-joins-splits.md +0 -33
- package/test/fixtures/docx/F13-comments-on-deleted-text.docx +0 -0
- package/test/fixtures/docx/F13-comments-on-deleted-text.md +0 -33
- package/test/fixtures/docx/F14-revisions-in-tables-and-lists.docx +0 -0
- package/test/fixtures/docx/F14-revisions-in-tables-and-lists.md +0 -33
- package/test/fixtures/docx/F15-sections-headers-footers.docx +0 -0
- package/test/fixtures/docx/F15-sections-headers-footers.md +0 -33
- package/test/fixtures/docx/F16-footnotes-endnotes.docx +0 -0
- package/test/fixtures/docx/F16-footnotes-endnotes.md +0 -33
- package/test/fixtures/docx/F17-fields-and-toc.docx +0 -0
- package/test/fixtures/docx/F17-fields-and-toc.md +0 -33
- package/test/fixtures/docx/F18-content-controls-template.docx +0 -0
- package/test/fixtures/docx/F18-content-controls-template.md +0 -33
- package/test/fixtures/docx/F19-custom-xml-doc-assembly.docx +0 -0
- package/test/fixtures/docx/F19-custom-xml-doc-assembly.md +0 -35
- package/test/fixtures/docx/F20-unknown-ooxml-and-alternatecontent.docx +0 -0
- package/test/fixtures/docx/F20-unknown-ooxml-and-alternatecontent.md +0 -33
- package/test/fixtures/docx/F21-malformed-broken-docx.docx +0 -0
- package/test/fixtures/docx/F21-malformed-broken-docx.md +0 -33
- package/test/fixtures/docx/README.md +0 -74
- package/test/fixtures/docx/certification-manifest.json +0 -104
- package/test/fixtures/docx/fixtures.manifest.json +0 -196
- package/test/fixtures/encrypted-docx/README.md +0 -27
- package/test/fixtures/encrypted-docx/certification-manifest.json +0 -9
- package/test/fixtures/encrypted-docx/fixtures.manifest.json +0 -47
- package/test/fixtures/scenarios/docx/README.md +0 -25
- package/test/fixtures/scenarios/docx/S01-sow-template.docx +0 -0
- package/test/fixtures/scenarios/docx/S01-sow-template.md +0 -30
- package/test/fixtures/scenarios/docx/S02-bw-partner-user-licence-agreement-redlines.docx +0 -0
- package/test/fixtures/scenarios/docx/S02-bw-partner-user-licence-agreement-redlines.md +0 -32
- package/test/fixtures/scenarios/docx/scenario-manifest.json +0 -53
- package/test/formats/xlsx/io/xlsx-import.test.ts +0 -766
- package/test/formats/xlsx/model/workbook.test.ts +0 -669
- package/test/helpers/dom-setup.ts +0 -124
- package/test/io/comment-roundtrip.test.ts +0 -272
- package/test/io/complex-content-roundtrip.test.ts +0 -632
- package/test/io/docx-compatibility-regression.test.ts +0 -199
- package/test/io/docx-session.test.ts +0 -1495
- package/test/io/footnotes-roundtrip.test.ts +0 -318
- package/test/io/headers-footers-roundtrip.test.ts +0 -547
- package/test/io/numbering-roundtrip.test.ts +0 -234
- package/test/io/package-reader.test.ts +0 -199
- package/test/io/paragraph-properties-roundtrip.test.ts +0 -129
- package/test/io/preserved-package-roundtrip.test.ts +0 -365
- package/test/io/property-completeness.test.ts +0 -292
- package/test/io/revision-roundtrip.test.ts +0 -347
- package/test/io/structural-blocks.test.ts +0 -202
- package/test/io/table-media-roundtrip.test.ts +0 -448
- package/test/io/table-properties-roundtrip.test.ts +0 -569
- package/test/io/table-roundtrip.test.ts +0 -302
- package/test/io/text-roundtrip.test.ts +0 -344
- package/test/model/canonical-document.test.ts +0 -285
- package/test/preservation/opaque-fragment-store.test.ts +0 -121
- package/test/preservation/package-preservation.test.ts +0 -395
- package/test/preservation/store.test.ts +0 -84
- package/test/review/comment-remapping.test.ts +0 -220
- package/test/review/comment-store.test.ts +0 -180
- package/test/review/move-revisions.test.ts +0 -143
- package/test/review/property-change-revisions.test.ts +0 -225
- package/test/review/revision-actions.test.ts +0 -330
- package/test/review/revision-store.test.ts +0 -193
- package/test/runtime/session-capabilities.test.ts +0 -260
- package/test/runtime/table-commands.test.ts +0 -356
- package/test/runtime/table-schema.test.ts +0 -221
- package/test/runtime/tracked-changes-toggle.test.ts +0 -107
- package/test/ui/comment-review-surface.test.tsx +0 -114
- package/test/ui/reduced-motion-toggle.test.tsx +0 -137
- package/test/ui/word-review-editor.imported-scenarios.test.tsx +0 -169
- package/test/ui/word-review-editor.interaction.test.tsx +0 -1198
- package/test/ui/word-review-editor.test.js +0 -188
- package/test/ui/word-review-editor.test.tsx +0 -280
- package/test/ui-tailwind/search-plugin.test.ts +0 -286
- package/test/validation/compatibility-engine.test.ts +0 -336
- package/test/validation/compatibility-report.test.ts +0 -189
- package/test/validation/low-priority-word-surfaces.test.ts +0 -282
- package/test/validation/malformed-doc.test.ts +0 -113
- package/test-results/.last-run.json +0 -4
- package/wave.config.json +0 -406
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import test from "node:test";
|
|
3
|
-
|
|
4
|
-
import { countOpaqueFragmentsInSnapshot } from "./editor-session-summary.ts";
|
|
5
|
-
|
|
6
|
-
function createSnapshot(documentId) {
|
|
7
|
-
return {
|
|
8
|
-
snapshotVersion: "persisted-editor-snapshot/1",
|
|
9
|
-
schemaVersion: "cds/1.0.0",
|
|
10
|
-
documentId,
|
|
11
|
-
docId: `${documentId}-doc`,
|
|
12
|
-
createdAt: "2026-03-27T00:00:00.000Z",
|
|
13
|
-
updatedAt: "2026-03-27T00:00:00.000Z",
|
|
14
|
-
savedAt: "2026-03-27T00:00:00.000Z",
|
|
15
|
-
editorBuild: "wave-9-editor-session-test",
|
|
16
|
-
canonicalDocument: {
|
|
17
|
-
schemaVersion: "cds/1.0.0",
|
|
18
|
-
docId: `${documentId}-doc`,
|
|
19
|
-
createdAt: "2026-03-27T00:00:00.000Z",
|
|
20
|
-
updatedAt: "2026-03-27T00:00:00.000Z",
|
|
21
|
-
metadata: {},
|
|
22
|
-
styles: {},
|
|
23
|
-
numbering: {},
|
|
24
|
-
media: {},
|
|
25
|
-
content: {
|
|
26
|
-
type: "doc",
|
|
27
|
-
children: [
|
|
28
|
-
{
|
|
29
|
-
type: "paragraph",
|
|
30
|
-
children: [{ type: "text", text: "Alpha" }],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
review: {
|
|
35
|
-
comments: {},
|
|
36
|
-
revisions: {},
|
|
37
|
-
},
|
|
38
|
-
preservation: {
|
|
39
|
-
opaqueFragments: {
|
|
40
|
-
"fragment:one": {
|
|
41
|
-
fragmentId: "fragment:one",
|
|
42
|
-
},
|
|
43
|
-
"fragment:two": {
|
|
44
|
-
fragmentId: "fragment:two",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
packageParts: {},
|
|
48
|
-
},
|
|
49
|
-
diagnostics: {
|
|
50
|
-
warnings: [],
|
|
51
|
-
errors: [],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
compatibility: {
|
|
55
|
-
reportVersion: "compatibility-report/1",
|
|
56
|
-
generatedAt: "2026-03-27T00:00:00.000Z",
|
|
57
|
-
blockExport: false,
|
|
58
|
-
featureEntries: [],
|
|
59
|
-
warnings: [],
|
|
60
|
-
errors: [],
|
|
61
|
-
},
|
|
62
|
-
warningLog: [],
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
test("opaque fragment summary counts keyed preserve-only fragments", () => {
|
|
67
|
-
assert.equal(countOpaqueFragmentsInSnapshot(createSnapshot("doc-editor-session")), 2);
|
|
68
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { PersistedEditorSnapshot } from "../../../src/api/public-types";
|
|
2
|
-
|
|
3
|
-
export function countOpaqueFragmentsInSnapshot(
|
|
4
|
-
snapshot: PersistedEditorSnapshot,
|
|
5
|
-
): number {
|
|
6
|
-
const opaqueFragments =
|
|
7
|
-
(
|
|
8
|
-
snapshot.canonicalDocument as {
|
|
9
|
-
preservation?: { opaqueFragments?: Record<string, unknown> };
|
|
10
|
-
}
|
|
11
|
-
).preservation?.opaqueFragments ?? {};
|
|
12
|
-
|
|
13
|
-
return Object.keys(opaqueFragments).length;
|
|
14
|
-
}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
|
|
4
|
-
import type {
|
|
5
|
-
PersistedEditorSnapshot,
|
|
6
|
-
SaveExportResult,
|
|
7
|
-
SaveSnapshotResult,
|
|
8
|
-
} from "../../../src/api/public-types";
|
|
9
|
-
import {
|
|
10
|
-
DOCX_MIME_TYPE,
|
|
11
|
-
getHarnessSession,
|
|
12
|
-
getHarnessSource,
|
|
13
|
-
getHarnessStorageAssumptions,
|
|
14
|
-
listHarnessExportsForSession,
|
|
15
|
-
listHarnessValidationRuns,
|
|
16
|
-
readHarnessSourceBytes,
|
|
17
|
-
saveHarnessExport,
|
|
18
|
-
type HarnessExportRecord,
|
|
19
|
-
type HarnessSessionRecord,
|
|
20
|
-
type HarnessSourceRecord,
|
|
21
|
-
type HarnessValidationRunRecord,
|
|
22
|
-
} from "./storage.ts";
|
|
23
|
-
import { countOpaqueFragmentsInSnapshot } from "./editor-session-summary.ts";
|
|
24
|
-
|
|
25
|
-
const HARNESS_EDITOR_SESSION_STATE_VERSION = "harness-editor-session-state/1";
|
|
26
|
-
|
|
27
|
-
type StoredHarnessEditorSnapshot = {
|
|
28
|
-
version: typeof HARNESS_EDITOR_SESSION_STATE_VERSION;
|
|
29
|
-
sessionId: string;
|
|
30
|
-
documentId: string;
|
|
31
|
-
sourceId: string;
|
|
32
|
-
savedAt: string;
|
|
33
|
-
isAutosave: boolean;
|
|
34
|
-
snapshot: PersistedEditorSnapshot;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export type HarnessEditorSessionSnapshotSummary = {
|
|
38
|
-
savedAt: string;
|
|
39
|
-
isAutosave: boolean;
|
|
40
|
-
warningCount: number;
|
|
41
|
-
errorCount: number;
|
|
42
|
-
featureEntryCount: number;
|
|
43
|
-
opaqueFragmentCount: number;
|
|
44
|
-
snapshot: PersistedEditorSnapshot;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export type HarnessEditorSessionState = {
|
|
48
|
-
session: HarnessSessionRecord;
|
|
49
|
-
source: HarnessSourceRecord;
|
|
50
|
-
sourceDownloadPath: string;
|
|
51
|
-
storage: ReturnType<typeof getHarnessStorageAssumptions>;
|
|
52
|
-
latestExport: HarnessExportRecord | null;
|
|
53
|
-
latestValidation: HarnessValidationRunRecord | null;
|
|
54
|
-
snapshot: HarnessEditorSessionSnapshotSummary | null;
|
|
55
|
-
controls: {
|
|
56
|
-
supportsSourceReload: true;
|
|
57
|
-
supportsSnapshotSave: true;
|
|
58
|
-
supportsExportPersist: true;
|
|
59
|
-
notes: string[];
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
function getEditorSessionStatePath(sessionId: string): string {
|
|
64
|
-
return path.join(
|
|
65
|
-
getHarnessStorageAssumptions().activeStorageDir,
|
|
66
|
-
"editor-sessions",
|
|
67
|
-
`${sessionId}.json`,
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async function writeJsonAtomically(filePath: string, value: unknown): Promise<void> {
|
|
72
|
-
const directory = path.dirname(filePath);
|
|
73
|
-
await mkdir(directory, { recursive: true });
|
|
74
|
-
const tempPath = `${filePath}.${process.pid}.tmp`;
|
|
75
|
-
await writeFile(tempPath, JSON.stringify(value, null, 2));
|
|
76
|
-
await rename(tempPath, filePath);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function toSnapshotSummary(
|
|
80
|
-
record: StoredHarnessEditorSnapshot,
|
|
81
|
-
): HarnessEditorSessionSnapshotSummary {
|
|
82
|
-
return {
|
|
83
|
-
savedAt: record.savedAt,
|
|
84
|
-
isAutosave: record.isAutosave,
|
|
85
|
-
warningCount: record.snapshot.warningLog.length,
|
|
86
|
-
errorCount: record.snapshot.compatibility.errors.length,
|
|
87
|
-
featureEntryCount: record.snapshot.compatibility.featureEntries.length,
|
|
88
|
-
opaqueFragmentCount: countOpaqueFragmentsInSnapshot(record.snapshot),
|
|
89
|
-
snapshot: record.snapshot,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export async function readHarnessEditorSessionSnapshot(
|
|
94
|
-
sessionId: string,
|
|
95
|
-
): Promise<HarnessEditorSessionSnapshotSummary | null> {
|
|
96
|
-
try {
|
|
97
|
-
const raw = await readFile(getEditorSessionStatePath(sessionId), "utf8");
|
|
98
|
-
const parsed = JSON.parse(raw) as StoredHarnessEditorSnapshot;
|
|
99
|
-
|
|
100
|
-
if (parsed.version !== HARNESS_EDITOR_SESSION_STATE_VERSION) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return toSnapshotSummary(parsed);
|
|
105
|
-
} catch (error) {
|
|
106
|
-
if ((error as NodeJS.ErrnoException)?.code === "ENOENT") {
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
throw error;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export async function loadHarnessEditorSessionState(
|
|
115
|
-
sessionId: string,
|
|
116
|
-
): Promise<HarnessEditorSessionState | null> {
|
|
117
|
-
const session = await getHarnessSession(sessionId);
|
|
118
|
-
|
|
119
|
-
if (!session) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const [source, exports, validationRuns, snapshot] = await Promise.all([
|
|
124
|
-
getHarnessSource(session.sourceId),
|
|
125
|
-
listHarnessExportsForSession(sessionId),
|
|
126
|
-
listHarnessValidationRuns({ sessionId, limit: 1 }),
|
|
127
|
-
readHarnessEditorSessionSnapshot(sessionId),
|
|
128
|
-
]);
|
|
129
|
-
|
|
130
|
-
if (!source) {
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return {
|
|
135
|
-
session,
|
|
136
|
-
source,
|
|
137
|
-
sourceDownloadPath: `/api/sessions/${sessionId}/source`,
|
|
138
|
-
storage: getHarnessStorageAssumptions(),
|
|
139
|
-
latestExport: exports[0] ?? null,
|
|
140
|
-
latestValidation: validationRuns[0] ?? null,
|
|
141
|
-
snapshot,
|
|
142
|
-
controls: {
|
|
143
|
-
supportsSourceReload: true,
|
|
144
|
-
supportsSnapshotSave: true,
|
|
145
|
-
supportsExportPersist: true,
|
|
146
|
-
notes: [
|
|
147
|
-
"This route reports internal pilot controls only. Manual Word reopen evidence still lives outside the mounted editor.",
|
|
148
|
-
"The mounted editor runtime remains package-backed and schema-driven, so later table and font work can grow without changing the session contract shape.",
|
|
149
|
-
],
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export async function saveHarnessEditorSessionSnapshot(input: {
|
|
155
|
-
sessionId: string;
|
|
156
|
-
snapshot: PersistedEditorSnapshot;
|
|
157
|
-
isAutosave?: boolean;
|
|
158
|
-
}): Promise<SaveSnapshotResult & { snapshot: HarnessEditorSessionSnapshotSummary }> {
|
|
159
|
-
const session = await getHarnessSession(input.sessionId);
|
|
160
|
-
|
|
161
|
-
if (!session) {
|
|
162
|
-
throw new Error(`Harness session ${input.sessionId} does not exist.`);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const savedAt = input.snapshot.savedAt || new Date().toISOString();
|
|
166
|
-
const record: StoredHarnessEditorSnapshot = {
|
|
167
|
-
version: HARNESS_EDITOR_SESSION_STATE_VERSION,
|
|
168
|
-
sessionId: session.sessionId,
|
|
169
|
-
documentId: session.documentId,
|
|
170
|
-
sourceId: session.sourceId,
|
|
171
|
-
savedAt,
|
|
172
|
-
isAutosave: input.isAutosave ?? false,
|
|
173
|
-
snapshot: {
|
|
174
|
-
...input.snapshot,
|
|
175
|
-
savedAt,
|
|
176
|
-
},
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
await writeJsonAtomically(getEditorSessionStatePath(session.sessionId), record);
|
|
180
|
-
|
|
181
|
-
return {
|
|
182
|
-
savedAt,
|
|
183
|
-
snapshot: toSnapshotSummary(record),
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export async function persistHarnessEditorSessionExport(input: {
|
|
188
|
-
sessionId: string;
|
|
189
|
-
fileName: string;
|
|
190
|
-
mimeType?: string;
|
|
191
|
-
bytes: Uint8Array;
|
|
192
|
-
reason?: string;
|
|
193
|
-
}): Promise<SaveExportResult & { exportRecord: HarnessExportRecord }> {
|
|
194
|
-
const exportRecord = await saveHarnessExport({
|
|
195
|
-
sessionId: input.sessionId,
|
|
196
|
-
fileName: input.fileName,
|
|
197
|
-
mimeType: input.mimeType || DOCX_MIME_TYPE,
|
|
198
|
-
bytes: input.bytes,
|
|
199
|
-
reason: input.reason,
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
return {
|
|
203
|
-
savedAt: exportRecord.createdAt,
|
|
204
|
-
exportRecord,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export async function readHarnessEditorSessionSource(
|
|
209
|
-
sessionId: string,
|
|
210
|
-
): Promise<{ session: HarnessSessionRecord; source: HarnessSourceRecord; bytes: Uint8Array } | null> {
|
|
211
|
-
const session = await getHarnessSession(sessionId);
|
|
212
|
-
|
|
213
|
-
if (!session) {
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const source = await getHarnessSource(session.sourceId);
|
|
218
|
-
|
|
219
|
-
if (!source) {
|
|
220
|
-
return null;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
return {
|
|
224
|
-
session,
|
|
225
|
-
source,
|
|
226
|
-
bytes: await readHarnessSourceBytes(source.sourceId),
|
|
227
|
-
};
|
|
228
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import test from "node:test";
|
|
3
|
-
|
|
4
|
-
import { POST } from "../app/api/exports/route.ts";
|
|
5
|
-
import {
|
|
6
|
-
HARNESS_MAX_UPLOAD_BYTES,
|
|
7
|
-
getHarnessStorageAssumptions,
|
|
8
|
-
} from "./storage.ts";
|
|
9
|
-
|
|
10
|
-
test("exports route rejects oversized multipart requests before parsing the body", async () => {
|
|
11
|
-
const response = await POST(
|
|
12
|
-
new Request("http://localhost/api/exports", {
|
|
13
|
-
method: "POST",
|
|
14
|
-
headers: {
|
|
15
|
-
"content-type": "multipart/form-data; boundary=----cursor-boundary",
|
|
16
|
-
"content-length": String(HARNESS_MAX_UPLOAD_BYTES + 1),
|
|
17
|
-
},
|
|
18
|
-
body: "",
|
|
19
|
-
}),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
assert.equal(response.status, 413);
|
|
23
|
-
assert.equal(response.headers.get("cache-control"), "no-store");
|
|
24
|
-
|
|
25
|
-
const payload = await response.json();
|
|
26
|
-
const expectedStorage = JSON.parse(JSON.stringify(getHarnessStorageAssumptions()));
|
|
27
|
-
assert.deepEqual(payload, {
|
|
28
|
-
error: "file_too_large",
|
|
29
|
-
detail: `Requests larger than ${Math.round(HARNESS_MAX_UPLOAD_BYTES / (1024 * 1024))} MiB are rejected before upload parsing.`,
|
|
30
|
-
storage: expectedStorage,
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getHarnessExport,
|
|
3
|
-
getHarnessHealthSnapshot,
|
|
4
|
-
getHarnessSession,
|
|
5
|
-
getHarnessSource,
|
|
6
|
-
getHarnessValidationRun,
|
|
7
|
-
listHarnessExportsForSession,
|
|
8
|
-
listHarnessSessions,
|
|
9
|
-
listHarnessSources,
|
|
10
|
-
listHarnessValidationRuns,
|
|
11
|
-
readHarnessValidationReport,
|
|
12
|
-
type HarnessExportRecord,
|
|
13
|
-
type HarnessSessionRecord,
|
|
14
|
-
type HarnessSourceRecord,
|
|
15
|
-
type HarnessValidationReport,
|
|
16
|
-
type HarnessValidationRunRecord,
|
|
17
|
-
} from "./storage.ts";
|
|
18
|
-
|
|
19
|
-
type ReviewStatusTone = "neutral" | "success" | "warning";
|
|
20
|
-
|
|
21
|
-
export type HarnessSourceDescriptor = {
|
|
22
|
-
id: string;
|
|
23
|
-
kind: HarnessSourceRecord["sourceKind"];
|
|
24
|
-
kindLabel: string;
|
|
25
|
-
releaseLabel: string;
|
|
26
|
-
releaseTone: ReviewStatusTone;
|
|
27
|
-
primaryBadge?: string;
|
|
28
|
-
secondaryBadge?: string;
|
|
29
|
-
note?: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type HarnessValidationSnapshotSummary = {
|
|
33
|
-
runId?: string;
|
|
34
|
-
label: string;
|
|
35
|
-
detail: string;
|
|
36
|
-
tone: ReviewStatusTone;
|
|
37
|
-
findingCount: number;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type HarnessExportSnapshotSummary = {
|
|
41
|
-
exportId?: string;
|
|
42
|
-
label: string;
|
|
43
|
-
detail: string;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type HarnessActivitySummary = {
|
|
47
|
-
exports: number;
|
|
48
|
-
validationRuns: number;
|
|
49
|
-
latestExport: HarnessExportSnapshotSummary;
|
|
50
|
-
latestValidation: HarnessValidationSnapshotSummary;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export type HarnessDashboardModel = {
|
|
54
|
-
health: Awaited<ReturnType<typeof getHarnessHealthSnapshot>>;
|
|
55
|
-
fixtures: HarnessSourceRecord[];
|
|
56
|
-
scenarios: HarnessSourceRecord[];
|
|
57
|
-
uploads: HarnessSourceRecord[];
|
|
58
|
-
browseableSources: Array<{
|
|
59
|
-
source: HarnessSourceRecord;
|
|
60
|
-
descriptor: HarnessSourceDescriptor;
|
|
61
|
-
}>;
|
|
62
|
-
recentUploads: HarnessSourceRecord[];
|
|
63
|
-
recentSessions: Array<{
|
|
64
|
-
session: HarnessSessionRecord;
|
|
65
|
-
source?: HarnessSourceRecord;
|
|
66
|
-
latestExport?: HarnessExportRecord;
|
|
67
|
-
latestValidationRun?: HarnessValidationRunRecord;
|
|
68
|
-
descriptor: HarnessSourceDescriptor;
|
|
69
|
-
activity: HarnessActivitySummary;
|
|
70
|
-
}>;
|
|
71
|
-
recentValidationRuns: Array<{
|
|
72
|
-
run: HarnessValidationRunRecord;
|
|
73
|
-
session?: HarnessSessionRecord;
|
|
74
|
-
source?: HarnessSourceRecord;
|
|
75
|
-
exportRecord?: HarnessExportRecord;
|
|
76
|
-
descriptor?: HarnessSourceDescriptor;
|
|
77
|
-
validation: HarnessValidationSnapshotSummary;
|
|
78
|
-
}>;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export type HarnessEditorSessionModel = {
|
|
82
|
-
session: HarnessSessionRecord;
|
|
83
|
-
source: HarnessSourceRecord;
|
|
84
|
-
exports: HarnessExportRecord[];
|
|
85
|
-
validationRuns: HarnessValidationRunRecord[];
|
|
86
|
-
relatedSessions: HarnessSessionRecord[];
|
|
87
|
-
descriptor: HarnessSourceDescriptor;
|
|
88
|
-
activity: HarnessActivitySummary;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export type HarnessValidationRunModel = {
|
|
92
|
-
run: HarnessValidationRunRecord;
|
|
93
|
-
report: HarnessValidationReport;
|
|
94
|
-
session?: HarnessSessionRecord;
|
|
95
|
-
source?: HarnessSourceRecord;
|
|
96
|
-
exportRecord?: HarnessExportRecord;
|
|
97
|
-
relatedRuns: HarnessValidationRunRecord[];
|
|
98
|
-
descriptor?: HarnessSourceDescriptor;
|
|
99
|
-
validation: HarnessValidationSnapshotSummary;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
function getSourceDescriptor(source: HarnessSourceRecord): HarnessSourceDescriptor {
|
|
103
|
-
if (source.sourceKind === "fixture") {
|
|
104
|
-
return {
|
|
105
|
-
id: source.fixtureId || source.sourceId,
|
|
106
|
-
kind: source.sourceKind,
|
|
107
|
-
kindLabel: "Release-gate fixture",
|
|
108
|
-
releaseLabel: "release-gate corpus",
|
|
109
|
-
releaseTone: "success",
|
|
110
|
-
primaryBadge: source.fixtureId,
|
|
111
|
-
secondaryBadge: source.featureClassFocus,
|
|
112
|
-
note: source.primaryFocus,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (source.sourceKind === "scenario") {
|
|
117
|
-
return {
|
|
118
|
-
id: source.scenarioId || source.sourceId,
|
|
119
|
-
kind: source.sourceKind,
|
|
120
|
-
kindLabel: "Representative scenario",
|
|
121
|
-
releaseLabel: "non-release-gate",
|
|
122
|
-
releaseTone: "warning",
|
|
123
|
-
primaryBadge: source.scenarioId,
|
|
124
|
-
secondaryBadge: source.validatorPolicy
|
|
125
|
-
? `${source.validatorPolicy.mode} validator policy`
|
|
126
|
-
: undefined,
|
|
127
|
-
note: source.wordExpectation || source.primaryFocus,
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
id: source.sourceId,
|
|
133
|
-
kind: source.sourceKind,
|
|
134
|
-
kindLabel: "Operator upload",
|
|
135
|
-
releaseLabel: "operator-upload",
|
|
136
|
-
releaseTone: "neutral",
|
|
137
|
-
primaryBadge: "upload",
|
|
138
|
-
note: "Durable internal upload source",
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function summarizeExport(exportRecord?: HarnessExportRecord): HarnessExportSnapshotSummary {
|
|
143
|
-
if (!exportRecord) {
|
|
144
|
-
return {
|
|
145
|
-
label: "Pending export",
|
|
146
|
-
detail: "No durable export artifact stored yet.",
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return {
|
|
151
|
-
exportId: exportRecord.exportId,
|
|
152
|
-
label: `Export ${exportRecord.exportId.slice(0, 8)}`,
|
|
153
|
-
detail: `${exportRecord.byteLength.toLocaleString()} bytes saved at ${exportRecord.createdAt}`,
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function summarizeValidation(
|
|
158
|
-
run?: HarnessValidationRunRecord,
|
|
159
|
-
): HarnessValidationSnapshotSummary {
|
|
160
|
-
if (!run) {
|
|
161
|
-
return {
|
|
162
|
-
label: "Pending validation",
|
|
163
|
-
detail: "No validator snapshot stored yet.",
|
|
164
|
-
tone: "neutral",
|
|
165
|
-
findingCount: 0,
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const findingCount = run.summary.packageFindingCount + run.summary.sdkFindingCount;
|
|
170
|
-
|
|
171
|
-
return {
|
|
172
|
-
runId: run.runId,
|
|
173
|
-
label: run.summary.isValid ? "Clean snapshot" : "Findings recorded",
|
|
174
|
-
detail: run.summary.isValid
|
|
175
|
-
? "No stored package or SDK findings in this run."
|
|
176
|
-
: `${findingCount} stored finding${findingCount === 1 ? "" : "s"} across package and SDK checks.`,
|
|
177
|
-
tone: run.summary.isValid ? "success" : "warning",
|
|
178
|
-
findingCount,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function buildActivitySummary(input: {
|
|
183
|
-
exports: HarnessExportRecord[];
|
|
184
|
-
validationRuns: HarnessValidationRunRecord[];
|
|
185
|
-
latestExport?: HarnessExportRecord;
|
|
186
|
-
latestValidationRun?: HarnessValidationRunRecord;
|
|
187
|
-
}): HarnessActivitySummary {
|
|
188
|
-
return {
|
|
189
|
-
exports: input.exports.length,
|
|
190
|
-
validationRuns: input.validationRuns.length,
|
|
191
|
-
latestExport: summarizeExport(input.latestExport || input.exports[0]),
|
|
192
|
-
latestValidation: summarizeValidation(
|
|
193
|
-
input.latestValidationRun || input.validationRuns[0],
|
|
194
|
-
),
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export async function getHarnessDashboardModel(): Promise<HarnessDashboardModel> {
|
|
199
|
-
const [health, sources, sessions, runs] = await Promise.all([
|
|
200
|
-
getHarnessHealthSnapshot(),
|
|
201
|
-
listHarnessSources(),
|
|
202
|
-
listHarnessSessions(),
|
|
203
|
-
listHarnessValidationRuns({ limit: 10 }),
|
|
204
|
-
]);
|
|
205
|
-
|
|
206
|
-
const recentValidationRuns = await Promise.all(
|
|
207
|
-
runs.map(async (run) => ({
|
|
208
|
-
run,
|
|
209
|
-
session: run.sessionId ? await getHarnessSession(run.sessionId) : undefined,
|
|
210
|
-
source: run.sourceId ? await getHarnessSource(run.sourceId) : undefined,
|
|
211
|
-
exportRecord: run.exportId ? await getHarnessExport(run.exportId) : undefined,
|
|
212
|
-
descriptor: run.sourceId
|
|
213
|
-
? await getHarnessSource(run.sourceId).then((source) =>
|
|
214
|
-
source ? getSourceDescriptor(source) : undefined,
|
|
215
|
-
)
|
|
216
|
-
: undefined,
|
|
217
|
-
validation: summarizeValidation(run),
|
|
218
|
-
})),
|
|
219
|
-
);
|
|
220
|
-
const recentSessions = await Promise.all(
|
|
221
|
-
sessions.slice(0, 10).map(async (session) => {
|
|
222
|
-
const [source, latestExport, latestValidationRun, exports, validationRuns] =
|
|
223
|
-
await Promise.all([
|
|
224
|
-
getHarnessSource(session.sourceId),
|
|
225
|
-
session.latestExportId ? getHarnessExport(session.latestExportId) : undefined,
|
|
226
|
-
session.latestValidationRunId
|
|
227
|
-
? getHarnessValidationRun(session.latestValidationRunId)
|
|
228
|
-
: undefined,
|
|
229
|
-
listHarnessExportsForSession(session.sessionId),
|
|
230
|
-
listHarnessValidationRuns({ sessionId: session.sessionId }),
|
|
231
|
-
]);
|
|
232
|
-
|
|
233
|
-
return {
|
|
234
|
-
session,
|
|
235
|
-
source,
|
|
236
|
-
latestExport,
|
|
237
|
-
latestValidationRun,
|
|
238
|
-
descriptor: source
|
|
239
|
-
? getSourceDescriptor(source)
|
|
240
|
-
: {
|
|
241
|
-
id: session.sourceId,
|
|
242
|
-
kind: session.sourceKind,
|
|
243
|
-
kindLabel: session.sourceKind,
|
|
244
|
-
releaseLabel: "source record missing",
|
|
245
|
-
releaseTone: "warning",
|
|
246
|
-
},
|
|
247
|
-
activity: buildActivitySummary({
|
|
248
|
-
exports,
|
|
249
|
-
validationRuns,
|
|
250
|
-
latestExport,
|
|
251
|
-
latestValidationRun,
|
|
252
|
-
}),
|
|
253
|
-
};
|
|
254
|
-
}),
|
|
255
|
-
);
|
|
256
|
-
const uploads = sources.filter((source) => source.sourceKind === "upload");
|
|
257
|
-
|
|
258
|
-
return {
|
|
259
|
-
health,
|
|
260
|
-
fixtures: sources.filter((source) => source.sourceKind === "fixture"),
|
|
261
|
-
scenarios: sources.filter((source) => source.sourceKind === "scenario"),
|
|
262
|
-
uploads,
|
|
263
|
-
browseableSources: sources.map((source) => ({
|
|
264
|
-
source,
|
|
265
|
-
descriptor: getSourceDescriptor(source),
|
|
266
|
-
})),
|
|
267
|
-
recentUploads: uploads.slice(0, 8),
|
|
268
|
-
recentSessions,
|
|
269
|
-
recentValidationRuns,
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export async function getHarnessEditorSessionModel(
|
|
274
|
-
sessionId: string,
|
|
275
|
-
): Promise<HarnessEditorSessionModel | undefined> {
|
|
276
|
-
const session = await getHarnessSession(sessionId);
|
|
277
|
-
|
|
278
|
-
if (!session) {
|
|
279
|
-
return undefined;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const [source, exports, validationRuns] = await Promise.all([
|
|
283
|
-
getHarnessSource(session.sourceId),
|
|
284
|
-
listHarnessExportsForSession(sessionId),
|
|
285
|
-
listHarnessValidationRuns({ sessionId }),
|
|
286
|
-
]);
|
|
287
|
-
|
|
288
|
-
if (!source) {
|
|
289
|
-
return undefined;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return {
|
|
293
|
-
session,
|
|
294
|
-
source,
|
|
295
|
-
exports,
|
|
296
|
-
validationRuns,
|
|
297
|
-
descriptor: getSourceDescriptor(source),
|
|
298
|
-
activity: buildActivitySummary({
|
|
299
|
-
exports,
|
|
300
|
-
validationRuns,
|
|
301
|
-
latestExport: exports[0],
|
|
302
|
-
latestValidationRun: validationRuns[0],
|
|
303
|
-
}),
|
|
304
|
-
relatedSessions: (await listHarnessSessions())
|
|
305
|
-
.filter(
|
|
306
|
-
(candidate) =>
|
|
307
|
-
candidate.sessionId !== sessionId && candidate.sourceId === session.sourceId,
|
|
308
|
-
)
|
|
309
|
-
.slice(0, 8),
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export async function getHarnessValidationRunModel(
|
|
314
|
-
runId: string,
|
|
315
|
-
): Promise<HarnessValidationRunModel | undefined> {
|
|
316
|
-
const run = await getHarnessValidationRun(runId);
|
|
317
|
-
|
|
318
|
-
if (!run) {
|
|
319
|
-
return undefined;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
const [report, session, source, exportRecord] = await Promise.all([
|
|
323
|
-
readHarnessValidationReport(runId),
|
|
324
|
-
run.sessionId ? getHarnessSession(run.sessionId) : Promise.resolve(undefined),
|
|
325
|
-
run.sourceId ? getHarnessSource(run.sourceId) : Promise.resolve(undefined),
|
|
326
|
-
run.exportId ? getHarnessExport(run.exportId) : Promise.resolve(undefined),
|
|
327
|
-
]);
|
|
328
|
-
const relatedRuns = run.sessionId
|
|
329
|
-
? (
|
|
330
|
-
await listHarnessValidationRuns({
|
|
331
|
-
sessionId: run.sessionId,
|
|
332
|
-
limit: 8,
|
|
333
|
-
})
|
|
334
|
-
).filter((candidate) => candidate.runId !== runId)
|
|
335
|
-
: [];
|
|
336
|
-
|
|
337
|
-
return {
|
|
338
|
-
run,
|
|
339
|
-
report,
|
|
340
|
-
session,
|
|
341
|
-
source,
|
|
342
|
-
exportRecord,
|
|
343
|
-
relatedRuns,
|
|
344
|
-
descriptor: source ? getSourceDescriptor(source) : undefined,
|
|
345
|
-
validation: summarizeValidation(run),
|
|
346
|
-
};
|
|
347
|
-
}
|