oh-my-knowledge 0.53.0 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -15
- package/README.zh.md +49 -15
- package/dist/assets/agent-skills/omk/SKILL.md +35 -12
- package/dist/assets/agent-skills/omk/references/commands.md +45 -53
- package/dist/cli/commands/doctor.js +39 -36
- package/dist/cli/commands/eval/gold/compare.d.ts +5 -2
- package/dist/cli/commands/eval/gold/compare.js +57 -28
- package/dist/cli/commands/eval/gold/init.js +1 -1
- package/dist/cli/commands/eval/gold/validate.js +1 -1
- package/dist/cli/commands/eval/index.js +38 -360
- package/dist/cli/commands/evolve.d.ts +2 -12
- package/dist/cli/commands/evolve.js +67 -142
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +55 -65
- package/dist/cli/commands/install.js +2 -2
- package/dist/cli/commands/list.d.ts +1 -1
- package/dist/cli/commands/list.js +2 -2
- package/dist/cli/commands/observe/inbox.js +6 -6
- package/dist/cli/commands/observe/index.d.ts +4 -4
- package/dist/cli/commands/observe/index.js +22 -20
- package/dist/cli/commands/observe/ingest.d.ts +1 -1
- package/dist/cli/commands/observe/ingest.js +7 -7
- package/dist/cli/commands/observe/show.js +3 -3
- package/dist/cli/commands/promote.js +10 -18
- package/dist/cli/commands/rollback.js +2 -2
- package/dist/cli/commands/sample.d.ts +3 -20
- package/dist/cli/commands/sample.js +38 -306
- package/dist/cli/commands/studio.js +32 -42
- package/dist/cli/lib/cli-exit.d.ts +1 -1
- package/dist/cli/lib/cli-exit.js +1 -1
- package/dist/cli/lib/cmd-flags.d.ts +1 -14
- package/dist/cli/lib/i18n-dict/common.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/common.js +5 -5
- package/dist/cli/lib/i18n-dict/evolve.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/evolve.js +3 -27
- package/dist/cli/lib/i18n-dict/gen.js +4 -4
- package/dist/cli/lib/i18n-dict/help.js +26 -26
- package/dist/cli/lib/i18n-dict/init.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/init.js +15 -3
- package/dist/cli/lib/i18n-dict/promote.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/promote.js +2 -10
- package/dist/cli/lib/i18n-dict.d.ts +1 -1
- package/dist/cli/lib/i18n-dict.js +1 -1
- package/dist/cli/lib/i18n.d.ts +1 -1
- package/dist/cli/lib/localized-sample-discovery.d.ts +3 -0
- package/dist/cli/lib/localized-sample-discovery.js +16 -0
- package/dist/cli/lib/open-workbench.d.ts +2 -0
- package/dist/cli/lib/open-workbench.js +19 -0
- package/dist/cli/lib/parse-run-config/judge-models.d.ts +1 -1
- package/dist/cli/lib/parse-run-config/samples-discovery.d.ts +6 -7
- package/dist/cli/lib/parse-run-config/samples-discovery.js +19 -18
- package/dist/cli/lib/parse-run-config/variant-resolution.d.ts +2 -1
- package/dist/cli/lib/parse-run-config/variant-resolution.js +2 -2
- package/dist/cli/lib/parse-run-config.d.ts +5 -6
- package/dist/cli/lib/parse-run-config.js +10 -10
- package/dist/cli/lib/progress.d.ts +1 -1
- package/dist/cli/lib/record-evolve-outcome.d.ts +10 -25
- package/dist/cli/lib/record-evolve-outcome.js +26 -103
- package/dist/cli/lib/resolve-skill-input.js +8 -9
- package/dist/cli/lib/run-core-evaluation.d.ts +21 -0
- package/dist/cli/lib/run-core-evaluation.js +340 -0
- package/dist/cli/lib/shared.d.ts +0 -7
- package/dist/cli/lib/shared.js +0 -15
- package/dist/cli/lib/source-probe.d.ts +2 -2
- package/dist/cli/lib/source-probe.js +2 -2
- package/dist/cli/lib/update-check.d.ts +2 -3
- package/dist/cli/lib/update-check.js +4 -5
- package/dist/cli/lib/update-fetch-worker.js +2 -1
- package/dist/cli/templates/init-samples.d.ts +4 -0
- package/dist/cli/templates/init-samples.js +328 -0
- package/dist/diagnosis/contracts/parser.d.ts +9 -0
- package/dist/diagnosis/contracts/parser.js +181 -0
- package/dist/diagnosis/lifecycle.d.ts +4 -0
- package/dist/diagnosis/observe-mapper.d.ts +1 -1
- package/dist/diagnosis/observe-mapper.js +1 -1
- package/dist/diagnosis/observe-producer.d.ts +3 -3
- package/dist/diagnosis/observe-producer.js +2 -2
- package/dist/diagnosis/studio-projection.d.ts +1 -1
- package/dist/diagnosis/studio-projection.js +1 -1
- package/dist/dsh-plugin/cordis.patch.yml +1 -1
- package/dist/dsh-plugin/core-adapter.d.ts +26 -0
- package/dist/dsh-plugin/core-adapter.js +737 -0
- package/dist/dsh-plugin/core-command.d.ts +22 -0
- package/dist/dsh-plugin/core-command.js +305 -0
- package/dist/dsh-plugin/core-protocol.d.ts +16 -0
- package/dist/dsh-plugin/core-protocol.js +250 -0
- package/dist/dsh-plugin/host-executor.d.ts +7 -2
- package/dist/dsh-plugin/host-executor.js +1 -1
- package/dist/dsh-plugin/index.d.ts +5 -3
- package/dist/dsh-plugin/index.js +158 -100
- package/dist/dsh-plugin/observe.d.ts +47 -0
- package/dist/dsh-plugin/observe.js +359 -0
- package/dist/dsh-plugin/protocol.d.ts +1 -1
- package/dist/dsh-plugin/protocol.js +3 -3
- package/dist/dsh-plugin/trace-adapter.d.ts +49 -0
- package/dist/dsh-plugin/trace-adapter.js +590 -0
- package/dist/eval-core/analysis/builtins.d.ts +88 -0
- package/dist/eval-core/analysis/builtins.js +771 -0
- package/dist/eval-core/analysis/decision.d.ts +8 -0
- package/dist/eval-core/analysis/decision.js +488 -0
- package/dist/eval-core/analysis/index.d.ts +4 -0
- package/dist/eval-core/analysis/index.js +4 -0
- package/dist/eval-core/analysis/runtime.d.ts +6 -0
- package/dist/eval-core/analysis/runtime.js +908 -0
- package/dist/eval-core/analysis/types.d.ts +254 -0
- package/dist/eval-core/analysis/types.js +65 -0
- package/dist/eval-core/budget/index.d.ts +44 -0
- package/dist/eval-core/budget/index.js +577 -0
- package/dist/eval-core/compiler/errors.d.ts +24 -0
- package/dist/eval-core/compiler/errors.js +35 -0
- package/dist/eval-core/compiler/immutability.d.ts +2 -0
- package/dist/eval-core/compiler/immutability.js +17 -0
- package/dist/eval-core/compiler/index.d.ts +9 -0
- package/dist/eval-core/compiler/index.js +1013 -0
- package/dist/eval-core/compiler/types.d.ts +334 -0
- package/dist/eval-core/compiler/types.js +110 -0
- package/dist/eval-core/compiler/validation.d.ts +4 -0
- package/dist/eval-core/compiler/validation.js +566 -0
- package/dist/eval-core/contracts/analysis-bundle.d.ts +83 -0
- package/dist/eval-core/contracts/analysis-bundle.js +513 -0
- package/dist/eval-core/contracts/analysis-identities.d.ts +10 -0
- package/dist/eval-core/contracts/analysis-identities.js +24 -0
- package/dist/eval-core/contracts/artifacts.d.ts +9168 -0
- package/dist/eval-core/contracts/artifacts.js +468 -0
- package/dist/eval-core/contracts/budget.d.ts +299 -0
- package/dist/eval-core/contracts/budget.js +323 -0
- package/dist/eval-core/contracts/common.d.ts +191 -0
- package/dist/eval-core/contracts/common.js +132 -0
- package/dist/eval-core/contracts/comparability.d.ts +595 -0
- package/dist/eval-core/contracts/comparability.js +1208 -0
- package/dist/eval-core/contracts/definition.d.ts +1415 -0
- package/dist/eval-core/contracts/definition.js +335 -0
- package/dist/eval-core/contracts/digests.d.ts +118 -0
- package/dist/eval-core/contracts/digests.js +401 -0
- package/dist/eval-core/contracts/evaluation-bundle.d.ts +180 -0
- package/dist/eval-core/contracts/evaluation-bundle.js +862 -0
- package/dist/eval-core/contracts/evaluation-identities.d.ts +46 -0
- package/dist/eval-core/contracts/evaluation-identities.js +82 -0
- package/dist/eval-core/contracts/evaluation-report.d.ts +62 -0
- package/dist/eval-core/contracts/evaluation-report.js +233 -0
- package/dist/eval-core/contracts/execution-bundle.d.ts +150 -0
- package/dist/eval-core/contracts/execution-bundle.js +657 -0
- package/dist/eval-core/contracts/execution-controls.d.ts +147 -0
- package/dist/eval-core/contracts/execution-controls.js +77 -0
- package/dist/eval-core/contracts/execution-facts.d.ts +191 -0
- package/dist/eval-core/contracts/execution-facts.js +349 -0
- package/dist/eval-core/contracts/execution-identities.d.ts +96 -0
- package/dist/eval-core/contracts/execution-identities.js +374 -0
- package/dist/eval-core/contracts/index.d.ts +20 -0
- package/dist/eval-core/contracts/index.js +20 -0
- package/dist/eval-core/contracts/json-schema.d.ts +13 -0
- package/dist/eval-core/contracts/json-schema.js +183 -0
- package/dist/eval-core/contracts/json.d.ts +18 -0
- package/dist/eval-core/contracts/json.js +154 -0
- package/dist/eval-core/contracts/plans.d.ts +2562 -0
- package/dist/eval-core/contracts/plans.js +137 -0
- package/dist/eval-core/contracts/runtime-capabilities.d.ts +203 -0
- package/dist/eval-core/contracts/runtime-capabilities.js +48 -0
- package/dist/eval-core/contracts/schemas/v1/analysis-bundle.schema.json +991 -0
- package/dist/eval-core/contracts/schemas/v1/analysis-plan.schema.json +889 -0
- package/dist/eval-core/contracts/schemas/v1/budget-summary.schema.json +462 -0
- package/dist/eval-core/contracts/schemas/v1/comparability-assessment.schema.json +452 -0
- package/dist/eval-core/contracts/schemas/v1/comparability-policy.schema.json +84 -0
- package/dist/eval-core/contracts/schemas/v1/decision-plan.schema.json +389 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-bundle.schema.json +1793 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-definition.schema.json +1243 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-event.schema.json +144 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-plan.schema.json +789 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-report.schema.json +1041 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-series-definition.schema.json +333 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-series-plan.schema.json +573 -0
- package/dist/eval-core/contracts/schemas/v1/evaluation-series-report.schema.json +513 -0
- package/dist/eval-core/contracts/schemas/v1/execution-bundle.schema.json +1512 -0
- package/dist/eval-core/contracts/schemas/v1/execution-facts.schema.json +460 -0
- package/dist/eval-core/contracts/schemas/v1/execution-plan.schema.json +1007 -0
- package/dist/eval-core/contracts/schemas/v1/executor-capabilities.schema.json +307 -0
- package/dist/eval-core/contracts/schemas/v1/measurement-policy.schema.json +473 -0
- package/dist/eval-core/contracts/schemas/v1/run-plan.schema.json +2514 -0
- package/dist/eval-core/contracts/schemas/v1/series-analysis-bundle.schema.json +1299 -0
- package/dist/eval-core/contracts/series.d.ts +1924 -0
- package/dist/eval-core/contracts/series.js +686 -0
- package/dist/eval-core/engine/index.d.ts +7 -0
- package/dist/eval-core/engine/index.js +570 -0
- package/dist/eval-core/engine/types.d.ts +148 -0
- package/dist/eval-core/evaluation/index.d.ts +3 -0
- package/dist/eval-core/evaluation/index.js +3 -0
- package/dist/eval-core/evaluation/runtime.d.ts +6 -0
- package/dist/eval-core/evaluation/runtime.js +1224 -0
- package/dist/eval-core/evaluation/types.d.ts +163 -0
- package/dist/eval-core/evaluation/types.js +33 -0
- package/dist/eval-core/execution/index.d.ts +4 -0
- package/dist/eval-core/execution/index.js +4 -0
- package/dist/eval-core/execution/runtime.d.ts +6 -0
- package/dist/eval-core/execution/runtime.js +1140 -0
- package/dist/eval-core/execution/scheduler.d.ts +7 -0
- package/dist/eval-core/execution/scheduler.js +102 -0
- package/dist/eval-core/execution/semaphore.d.ts +6 -0
- package/dist/eval-core/execution/semaphore.js +54 -0
- package/dist/eval-core/execution/types.d.ts +115 -0
- package/dist/eval-core/execution/types.js +34 -0
- package/dist/eval-core/facade.d.ts +8 -0
- package/dist/eval-core/facade.js +2 -0
- package/dist/eval-core/index.d.ts +14 -0
- package/dist/eval-core/index.js +6 -0
- package/dist/eval-core/internal/sealed-run-plan.d.ts +14 -0
- package/dist/eval-core/internal/sealed-run-plan.js +12 -0
- package/dist/eval-core/runtime/event-stream.d.ts +8 -0
- package/dist/eval-core/runtime/event-stream.js +51 -0
- package/dist/eval-core/runtime/events.d.ts +30 -0
- package/dist/eval-core/runtime/events.js +102 -0
- package/dist/eval-core/runtime/snapshot.d.ts +6 -0
- package/dist/eval-core/runtime/snapshot.js +23 -0
- package/dist/eval-core/schema-url.d.ts +4 -0
- package/dist/eval-core/schema-url.js +10 -0
- package/dist/eval-core/schemas.d.ts +2 -0
- package/dist/eval-core/schemas.js +23 -0
- package/dist/eval-core/series/index.d.ts +1 -0
- package/dist/eval-core/series/index.js +1 -0
- package/dist/eval-core/series/runtime.d.ts +146 -0
- package/dist/eval-core/series/runtime.js +758 -0
- package/dist/eval-workflows/analysis/bootstrap.d.ts +145 -0
- package/dist/eval-workflows/analysis/bootstrap.js +274 -0
- package/dist/eval-workflows/artifact-store/batch-contracts.d.ts +117 -0
- package/dist/eval-workflows/artifact-store/batch-contracts.js +70 -0
- package/dist/eval-workflows/artifact-store/contracts.d.ts +161 -0
- package/dist/eval-workflows/artifact-store/contracts.js +115 -0
- package/dist/eval-workflows/artifact-store/index.d.ts +6 -0
- package/dist/eval-workflows/artifact-store/index.js +6 -0
- package/dist/eval-workflows/artifact-store/node-batch-store.d.ts +8 -0
- package/dist/eval-workflows/artifact-store/node-batch-store.js +187 -0
- package/dist/eval-workflows/artifact-store/node-content-store.d.ts +13 -0
- package/dist/eval-workflows/artifact-store/node-content-store.js +157 -0
- package/dist/eval-workflows/artifact-store/node-run-store.d.ts +12 -0
- package/dist/eval-workflows/artifact-store/node-run-store.js +516 -0
- package/dist/eval-workflows/artifact-store/overlay-store.d.ts +12 -0
- package/dist/eval-workflows/artifact-store/overlay-store.js +112 -0
- package/dist/eval-workflows/artifact-store/private-json-file.d.ts +4 -0
- package/dist/eval-workflows/artifact-store/private-json-file.js +50 -0
- package/dist/eval-workflows/assertions/deterministic.d.ts +31 -0
- package/dist/eval-workflows/assertions/deterministic.js +301 -0
- package/dist/eval-workflows/assertions/layers.d.ts +5 -0
- package/dist/eval-workflows/assertions/layers.js +55 -0
- package/dist/eval-workflows/evaluation-defaults.d.ts +4 -0
- package/dist/eval-workflows/evaluation-defaults.js +4 -0
- package/dist/eval-workflows/gold/cli.d.ts +9 -0
- package/dist/eval-workflows/gold/cli.js +61 -0
- package/dist/eval-workflows/gold/human.d.ts +103 -0
- package/dist/eval-workflows/gold/human.js +189 -0
- package/dist/eval-workflows/input-compilation/compile.d.ts +6 -0
- package/dist/eval-workflows/input-compilation/compile.js +1108 -0
- package/dist/eval-workflows/input-compilation/error.d.ts +16 -0
- package/dist/eval-workflows/input-compilation/error.js +14 -0
- package/dist/eval-workflows/input-compilation/index.d.ts +5 -0
- package/dist/eval-workflows/input-compilation/index.js +5 -0
- package/dist/eval-workflows/input-compilation/parse.d.ts +25 -0
- package/dist/eval-workflows/input-compilation/parse.js +546 -0
- package/dist/eval-workflows/input-compilation/registry.d.ts +35 -0
- package/dist/eval-workflows/input-compilation/registry.js +274 -0
- package/dist/eval-workflows/input-compilation/types.d.ts +396 -0
- package/dist/eval-workflows/input-compilation/types.js +4 -0
- package/dist/eval-workflows/inputs/assertion-types.d.ts +6 -0
- package/dist/eval-workflows/inputs/contracts/assertion-kind.d.ts +3 -0
- package/dist/eval-workflows/inputs/contracts/assertion.d.ts +25 -0
- package/dist/eval-workflows/inputs/contracts/config.d.ts +68 -0
- package/dist/eval-workflows/inputs/contracts/index.d.ts +5 -0
- package/dist/eval-workflows/inputs/contracts/sample.d.ts +78 -0
- package/dist/eval-workflows/inputs/contracts/schemas/v1/eval-sample-set.schema.json +620 -0
- package/dist/eval-workflows/inputs/contracts/variant.d.ts +16 -0
- package/dist/eval-workflows/inputs/eval-config.d.ts +19 -0
- package/dist/eval-workflows/inputs/eval-config.js +340 -0
- package/dist/eval-workflows/inputs/eval-samples.d.ts +8 -0
- package/dist/eval-workflows/inputs/eval-samples.js +12 -0
- package/dist/eval-workflows/inputs/load-samples.d.ts +43 -0
- package/dist/eval-workflows/inputs/load-samples.js +290 -0
- package/dist/eval-workflows/inputs/materialize-copy.js +193 -0
- package/dist/eval-workflows/inputs/sample-contract.d.ts +3 -0
- package/dist/eval-workflows/inputs/sample-contract.js +361 -0
- package/dist/eval-workflows/inputs/sample-document.d.ts +10 -0
- package/dist/eval-workflows/inputs/sample-document.js +94 -0
- package/dist/eval-workflows/inputs/sample-locator.d.ts +27 -0
- package/dist/eval-workflows/inputs/sample-locator.js +160 -0
- package/dist/eval-workflows/inputs/schemas/assertion.d.ts +4 -0
- package/dist/eval-workflows/inputs/schemas/assertion.js +23 -0
- package/dist/eval-workflows/inputs/schemas/error.d.ts +8 -0
- package/dist/eval-workflows/inputs/schemas/error.js +36 -0
- package/dist/eval-workflows/inputs/schemas/json-schema.d.ts +1 -0
- package/dist/eval-workflows/inputs/schemas/json-schema.js +27 -0
- package/dist/eval-workflows/inputs/schemas/mock.d.ts +6 -0
- package/dist/eval-workflows/inputs/schemas/mock.js +27 -0
- package/dist/eval-workflows/inputs/schemas/sample-set.d.ts +15 -0
- package/dist/eval-workflows/inputs/schemas/sample-set.js +60 -0
- package/dist/eval-workflows/inputs/skill-loader.d.ts +191 -0
- package/dist/eval-workflows/inputs/skill-loader.js +836 -0
- package/dist/eval-workflows/instruments/contracts/config.d.ts +7 -0
- package/dist/eval-workflows/instruments/contracts/index.d.ts +2 -0
- package/dist/eval-workflows/instruments/contracts/result.d.ts +54 -0
- package/dist/eval-workflows/instruments/judge-trace.d.ts +8 -0
- package/dist/eval-workflows/instruments/judge-trace.js +94 -0
- package/dist/eval-workflows/instruments/judge.d.ts +78 -0
- package/dist/eval-workflows/instruments/judge.js +323 -0
- package/dist/eval-workflows/instruments/prompts/debias-instructions.js +43 -0
- package/dist/eval-workflows/instruments/prompts/judge-prompts.d.ts +30 -0
- package/dist/eval-workflows/instruments/prompts/judge-prompts.js +205 -0
- package/dist/eval-workflows/messages.d.ts +1 -1
- package/dist/eval-workflows/production-host/artifact-graph-persistence.d.ts +11 -0
- package/dist/eval-workflows/production-host/artifact-graph-persistence.js +66 -0
- package/dist/eval-workflows/production-host/environment.d.ts +9 -0
- package/dist/eval-workflows/production-host/environment.js +34 -0
- package/dist/eval-workflows/production-host/holdout.d.ts +8 -0
- package/dist/eval-workflows/production-host/holdout.js +25 -0
- package/dist/eval-workflows/production-host/index.d.ts +9 -0
- package/dist/eval-workflows/production-host/index.js +9 -0
- package/dist/eval-workflows/production-host/measurement-design.d.ts +21 -0
- package/dist/eval-workflows/production-host/measurement-design.js +562 -0
- package/dist/eval-workflows/production-host/node-cli-composition.d.ts +26 -0
- package/dist/eval-workflows/production-host/node-cli-composition.js +474 -0
- package/dist/eval-workflows/production-host/node-cli-evaluation-resolver.d.ts +20 -0
- package/dist/eval-workflows/production-host/node-cli-evaluation-resolver.js +755 -0
- package/dist/eval-workflows/production-host/node-sample-content-resolver.d.ts +43 -0
- package/dist/eval-workflows/production-host/node-sample-content-resolver.js +270 -0
- package/dist/eval-workflows/production-host/orchestration.d.ts +78 -0
- package/dist/eval-workflows/production-host/orchestration.js +274 -0
- package/dist/eval-workflows/production-host/runtime-registry.d.ts +57 -0
- package/dist/eval-workflows/production-host/runtime-registry.js +270 -0
- package/dist/eval-workflows/production-host/safe-http-content-resolver.d.ts +4 -0
- package/dist/eval-workflows/production-host/safe-http-content-resolver.js +219 -0
- package/dist/eval-workflows/production-host/sample-content-resolution.d.ts +44 -0
- package/dist/eval-workflows/production-host/sample-content-resolution.js +242 -0
- package/dist/eval-workflows/production-host/workflow.d.ts +76 -0
- package/dist/eval-workflows/production-host/workflow.js +200 -0
- package/dist/eval-workflows/projections/artifact-graph.d.ts +15 -0
- package/dist/eval-workflows/projections/artifact-graph.js +388 -0
- package/dist/eval-workflows/projections/cli-gate.d.ts +3 -0
- package/dist/eval-workflows/projections/cli-gate.js +45 -0
- package/dist/eval-workflows/projections/cli.d.ts +39 -0
- package/dist/eval-workflows/projections/cli.js +334 -0
- package/dist/eval-workflows/projections/contracts.d.ts +332 -0
- package/dist/eval-workflows/projections/contracts.js +16 -0
- package/dist/eval-workflows/projections/decision.d.ts +4 -0
- package/dist/eval-workflows/projections/decision.js +27 -0
- package/dist/eval-workflows/projections/diagnostic.d.ts +7 -0
- package/dist/eval-workflows/projections/diagnostic.js +160 -0
- package/dist/eval-workflows/projections/evolution.d.ts +13 -0
- package/dist/eval-workflows/projections/evolution.js +144 -0
- package/dist/eval-workflows/projections/gold.d.ts +21 -0
- package/dist/eval-workflows/projections/gold.js +204 -0
- package/dist/eval-workflows/projections/index.d.ts +9 -0
- package/dist/eval-workflows/projections/index.js +9 -0
- package/dist/eval-workflows/projections/managed.d.ts +8 -0
- package/dist/eval-workflows/projections/managed.js +105 -0
- package/dist/eval-workflows/projections/source.d.ts +2 -0
- package/dist/eval-workflows/projections/source.js +48 -0
- package/dist/eval-workflows/resume-admission/admit.d.ts +8 -0
- package/dist/eval-workflows/resume-admission/admit.js +180 -0
- package/dist/eval-workflows/resume-admission/contracts.d.ts +81 -0
- package/dist/eval-workflows/resume-admission/contracts.js +22 -0
- package/dist/eval-workflows/resume-admission/index.d.ts +2 -0
- package/dist/eval-workflows/resume-admission/index.js +2 -0
- package/dist/eval-workflows/runtime-adapter/adapters/anthropic/api.d.ts +31 -0
- package/dist/eval-workflows/runtime-adapter/adapters/anthropic/api.js +286 -0
- package/dist/eval-workflows/runtime-adapter/adapters/anthropic/protocol.d.ts +67 -0
- package/dist/eval-workflows/runtime-adapter/adapters/anthropic/protocol.js +192 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/cli-protocol.d.ts +19 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/cli-protocol.js +322 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/cli.d.ts +48 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/cli.js +607 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/resources.d.ts +151 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/resources.js +664 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/sdk-protocol.d.ts +7 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/sdk-protocol.js +84 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/sdk-runtime.d.ts +40 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/sdk-runtime.js +163 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/sdk.d.ts +29 -0
- package/dist/eval-workflows/runtime-adapter/adapters/claude/sdk.js +507 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/cli-protocol.d.ts +61 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/cli-protocol.js +36 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/cli-resources.d.ts +13 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/cli-resources.js +16 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/cli.d.ts +44 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/cli.js +348 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/content-identity.d.ts +5 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/content-identity.js +3 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/environment.d.ts +4 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/environment.js +2 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/protocol-core.d.ts +21 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/protocol-core.js +232 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/resources.d.ts +108 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/resources.js +331 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/sdk-protocol.d.ts +61 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/sdk-protocol.js +20 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/sdk-runtime.d.ts +33 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/sdk-runtime.js +169 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/sdk.d.ts +32 -0
- package/dist/eval-workflows/runtime-adapter/adapters/codex/sdk.js +375 -0
- package/dist/eval-workflows/runtime-adapter/adapters/custom/command.d.ts +207 -0
- package/dist/eval-workflows/runtime-adapter/adapters/custom/command.js +696 -0
- package/dist/eval-workflows/runtime-adapter/adapters/index.d.ts +8 -0
- package/dist/eval-workflows/runtime-adapter/adapters/index.js +8 -0
- package/dist/eval-workflows/runtime-adapter/adapters/openai/api.d.ts +31 -0
- package/dist/eval-workflows/runtime-adapter/adapters/openai/api.js +292 -0
- package/dist/eval-workflows/runtime-adapter/adapters/openai/protocol.d.ts +67 -0
- package/dist/eval-workflows/runtime-adapter/adapters/openai/protocol.js +236 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/api-http.d.ts +53 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/api-http.js +167 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/api-protocol-core.d.ts +7 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/api-protocol-core.js +96 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/classified-environment.d.ts +21 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/classified-environment.js +43 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/content-identity.d.ts +16 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/content-identity.js +101 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/same-process.d.ts +109 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/same-process.js +322 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/stateless-api-resources.d.ts +80 -0
- package/dist/eval-workflows/runtime-adapter/adapters/shared/stateless-api-resources.js +230 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-node-contract.d.ts +10 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-node-contract.js +78 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-node.d.ts +3 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-node.js +29 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-parameters.d.ts +31 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-parameters.js +65 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-source-adapter.d.ts +11 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-source-adapter.js +114 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-table.d.ts +259 -0
- package/dist/eval-workflows/runtime-adapter/analysis/agreement-table.js +303 -0
- package/dist/eval-workflows/runtime-adapter/analysis/analysis-support.d.ts +14 -0
- package/dist/eval-workflows/runtime-adapter/analysis/analysis-support.js +44 -0
- package/dist/eval-workflows/runtime-adapter/analysis/assertion-layer-node.d.ts +5 -0
- package/dist/eval-workflows/runtime-adapter/analysis/assertion-layer-node.js +218 -0
- package/dist/eval-workflows/runtime-adapter/analysis/assertion-layer-parameters.d.ts +39 -0
- package/dist/eval-workflows/runtime-adapter/analysis/assertion-layer-parameters.js +49 -0
- package/dist/eval-workflows/runtime-adapter/analysis/assertion-layer.d.ts +552 -0
- package/dist/eval-workflows/runtime-adapter/analysis/assertion-layer.js +289 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-node-contract.d.ts +10 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-node-contract.js +89 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-node.d.ts +3 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-node.js +35 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-parameters.d.ts +41 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-parameters.js +111 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-source-adapter.d.ts +9 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-source-adapter.js +28 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-table.d.ts +240 -0
- package/dist/eval-workflows/runtime-adapter/analysis/bootstrap-family-table.js +368 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-node-contract.d.ts +10 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-node-contract.js +80 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-node.d.ts +3 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-node.js +79 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-parameters.d.ts +56 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-parameters.js +92 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-source-adapter.d.ts +13 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-source-adapter.js +60 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-table.d.ts +244 -0
- package/dist/eval-workflows/runtime-adapter/analysis/composite-table.js +199 -0
- package/dist/eval-workflows/runtime-adapter/analysis/dimension-node.d.ts +5 -0
- package/dist/eval-workflows/runtime-adapter/analysis/dimension-node.js +169 -0
- package/dist/eval-workflows/runtime-adapter/analysis/dimension-parameters.d.ts +24 -0
- package/dist/eval-workflows/runtime-adapter/analysis/dimension-parameters.js +44 -0
- package/dist/eval-workflows/runtime-adapter/analysis/dimension-table.d.ts +135 -0
- package/dist/eval-workflows/runtime-adapter/analysis/dimension-table.js +195 -0
- package/dist/eval-workflows/runtime-adapter/analysis/index.d.ts +21 -0
- package/dist/eval-workflows/runtime-adapter/analysis/index.js +21 -0
- package/dist/eval-workflows/runtime-adapter/analysis/judge-aggregation.d.ts +343 -0
- package/dist/eval-workflows/runtime-adapter/analysis/judge-aggregation.js +731 -0
- package/dist/eval-workflows/runtime-adapter/analysis/release-decision-parameters.d.ts +36 -0
- package/dist/eval-workflows/runtime-adapter/analysis/release-decision-parameters.js +114 -0
- package/dist/eval-workflows/runtime-adapter/analysis/release-decision.d.ts +6 -0
- package/dist/eval-workflows/runtime-adapter/analysis/release-decision.js +406 -0
- package/dist/eval-workflows/runtime-adapter/assembly.d.ts +6 -0
- package/dist/eval-workflows/runtime-adapter/assembly.js +787 -0
- package/dist/eval-workflows/runtime-adapter/builtins.d.ts +7 -0
- package/dist/eval-workflows/runtime-adapter/builtins.js +106 -0
- package/dist/eval-workflows/runtime-adapter/composition.d.ts +82 -0
- package/dist/eval-workflows/runtime-adapter/composition.js +824 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/assertion-common.d.ts +17 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/assertion-common.js +72 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/execution-assertions.d.ts +38 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/execution-assertions.js +307 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/index.d.ts +5 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/index.js +5 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/llm-assertions.d.ts +71 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/llm-assertions.js +493 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/llm-judge-invocation.d.ts +49 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/llm-judge-invocation.js +72 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/output-assertions.d.ts +33 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/output-assertions.js +168 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/rubric-judge.d.ts +73 -0
- package/dist/eval-workflows/runtime-adapter/evaluators/rubric-judge.js +431 -0
- package/dist/eval-workflows/runtime-adapter/event-projection.d.ts +34 -0
- package/dist/eval-workflows/runtime-adapter/event-projection.js +175 -0
- package/dist/eval-workflows/runtime-adapter/index.d.ts +11 -0
- package/dist/eval-workflows/runtime-adapter/index.js +11 -0
- package/dist/eval-workflows/runtime-adapter/preflight.d.ts +54 -0
- package/dist/eval-workflows/runtime-adapter/preflight.js +248 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/access.d.ts +14 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/access.js +173 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/index.d.ts +3 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/index.js +3 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/node.d.ts +24 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/node.js +803 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/types.d.ts +105 -0
- package/dist/eval-workflows/runtime-adapter/resource-leases/types.js +25 -0
- package/dist/eval-workflows/runtime-adapter/series-variance.d.ts +6 -0
- package/dist/eval-workflows/runtime-adapter/series-variance.js +94 -0
- package/dist/eval-workflows/runtime-adapter/source-neutral-trace.d.ts +57 -0
- package/dist/eval-workflows/runtime-adapter/source-neutral-trace.js +66 -0
- package/dist/eval-workflows/runtime-adapter/types.d.ts +159 -0
- package/dist/eval-workflows/runtime-adapter/types.js +12 -0
- package/dist/evidence/graph/contracts.d.ts +93 -0
- package/dist/evidence/graph/doctor.d.ts +22 -0
- package/dist/evidence/graph/doctor.js +572 -0
- package/dist/evidence/graph/schema.d.ts +3 -0
- package/dist/evidence/graph/schema.js +233 -0
- package/dist/evidence/storage/default-dirs.d.ts +34 -0
- package/dist/evidence/storage/default-dirs.js +35 -0
- package/dist/evidence/storage/directories.js +65 -0
- package/dist/evidence/storage/discovery-index.d.ts +88 -0
- package/dist/evidence/storage/discovery-index.js +307 -0
- package/dist/evidence/storage/file-names.d.ts +14 -0
- package/dist/evidence/storage/file-names.js +57 -0
- package/dist/evidence/storage/layout.d.ts +35 -0
- package/dist/evidence/storage/layout.js +50 -0
- package/dist/evidence/storage/report-bundle.d.ts +35 -0
- package/dist/evidence/storage/report-bundle.js +122 -0
- package/dist/evidence/storage/run-id.d.ts +2 -0
- package/dist/evidence/storage/run-id.js +19 -0
- package/dist/executors/anthropic/api.d.ts +3 -2
- package/dist/executors/anthropic/api.js +5 -3
- package/dist/executors/anthropic/claude/cli.d.ts +3 -2
- package/dist/executors/anthropic/claude/cli.js +3 -2
- package/dist/executors/anthropic/claude/protocol.d.ts +1 -1
- package/dist/executors/anthropic/claude/protocol.js +1 -1
- package/dist/executors/anthropic/claude/sdk.d.ts +3 -2
- package/dist/executors/anthropic/claude/sdk.js +7 -2
- package/dist/executors/anthropic/claude/trace.d.ts +1 -1
- package/dist/executors/anthropic/claude/trace.js +4 -4
- package/dist/executors/contracts/index.d.ts +4 -0
- package/dist/executors/contracts/index.js +1 -0
- package/dist/executors/contracts/mock.d.ts +65 -0
- package/dist/executors/contracts/mock.js +1 -0
- package/dist/executors/contracts/ports.d.ts +63 -0
- package/dist/executors/contracts/ports.js +1 -0
- package/dist/executors/contracts/result.d.ts +41 -0
- package/dist/executors/contracts/result.js +1 -0
- package/dist/executors/contracts/runtime.d.ts +40 -0
- package/dist/executors/contracts/runtime.js +1 -0
- package/dist/executors/contracts/trace-source.d.ts +2 -0
- package/dist/executors/contracts/trace-source.js +1 -0
- package/dist/executors/contracts/trace.d.ts +36 -0
- package/dist/executors/contracts/trace.js +1 -0
- package/dist/executors/core/capabilities.d.ts +6 -2
- package/dist/executors/core/runtime-fingerprint.d.ts +2 -1
- package/dist/executors/core/runtime.d.ts +1 -1
- package/dist/executors/core/subprocess.d.ts +1 -0
- package/dist/executors/core/subprocess.js +9 -8
- package/dist/executors/core/trace-source-kind.d.ts +4 -0
- package/dist/executors/core/trace-source-kind.js +13 -0
- package/dist/executors/index.d.ts +1 -1
- package/dist/executors/mock-runtime/mock-hook.cjs +271 -0
- package/dist/executors/mock-runtime/runtime.d.ts +103 -0
- package/dist/executors/mock-runtime/runtime.js +638 -0
- package/dist/executors/openai/api.d.ts +3 -2
- package/dist/executors/openai/api.js +5 -3
- package/dist/executors/openai/codex/cli.d.ts +3 -2
- package/dist/executors/openai/codex/cli.js +3 -1
- package/dist/executors/openai/codex/protocol.d.ts +2 -1
- package/dist/executors/openai/codex/protocol.js +1 -1
- package/dist/executors/openai/codex/sdk.d.ts +3 -2
- package/dist/executors/openai/codex/sdk.js +6 -1
- package/dist/executors/openai/codex/trace.d.ts +1 -1
- package/dist/executors/openai/codex/trace.js +2 -2
- package/dist/executors/preflight/contracts.d.ts +40 -0
- package/dist/executors/preflight/contracts.js +1 -0
- package/dist/executors/preflight/dependencies.d.ts +36 -0
- package/dist/executors/result-validation.d.ts +18 -0
- package/dist/executors/result-validation.js +221 -0
- package/dist/executors/script/index.d.ts +1 -1
- package/dist/executors/script/index.js +2 -2
- package/dist/executors/tool-call-status.d.ts +9 -0
- package/dist/executors/tool-call-status.js +79 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/knowledge-artifacts/authoring/core-evolver.d.ts +65 -0
- package/dist/knowledge-artifacts/authoring/core-evolver.js +277 -0
- package/dist/knowledge-artifacts/authoring/generator.d.ts +100 -0
- package/dist/knowledge-artifacts/authoring/generator.js +1019 -0
- package/dist/knowledge-artifacts/authoring/improvement.d.ts +15 -0
- package/dist/knowledge-artifacts/authoring/improvement.js +52 -0
- package/dist/knowledge-artifacts/contracts.d.ts +18 -0
- package/dist/knowledge-artifacts/contracts.js +1 -0
- package/dist/knowledge-artifacts/doctor/contracts.d.ts +199 -0
- package/dist/knowledge-artifacts/doctor/contracts.js +1 -0
- package/dist/knowledge-artifacts/doctor/endpoint-rule.d.ts +60 -0
- package/dist/knowledge-artifacts/doctor/endpoint-rule.js +382 -0
- package/dist/knowledge-artifacts/doctor/fixer.d.ts +11 -0
- package/dist/knowledge-artifacts/doctor/fixer.js +337 -0
- package/dist/knowledge-artifacts/doctor/health/composer.d.ts +18 -0
- package/dist/knowledge-artifacts/doctor/health/composer.js +407 -0
- package/dist/knowledge-artifacts/doctor/health/dimension-spec.d.ts +52 -0
- package/dist/knowledge-artifacts/doctor/health/merge-prompt.d.ts +22 -0
- package/dist/knowledge-artifacts/doctor/health/prompt-builder.d.ts +21 -0
- package/dist/knowledge-artifacts/doctor/index.d.ts +19 -0
- package/dist/knowledge-artifacts/doctor/index.js +274 -0
- package/dist/knowledge-artifacts/doctor/messages.d.ts +20 -0
- package/dist/knowledge-artifacts/doctor/preflight.d.ts +32 -0
- package/dist/knowledge-artifacts/doctor/preflight.js +31 -0
- package/dist/knowledge-artifacts/doctor/renderer.d.ts +17 -0
- package/dist/knowledge-artifacts/doctor/report-parser.d.ts +3 -0
- package/dist/knowledge-artifacts/doctor/report-parser.js +103 -0
- package/dist/knowledge-artifacts/doctor/report-schema.d.ts +3 -0
- package/dist/knowledge-artifacts/doctor/report-schema.js +3 -0
- package/dist/knowledge-artifacts/doctor/rule-kind.d.ts +2 -0
- package/dist/knowledge-artifacts/doctor/rule-kind.js +3 -0
- package/dist/knowledge-artifacts/doctor/rules.d.ts +32 -0
- package/dist/knowledge-artifacts/doctor/rules.js +290 -0
- package/dist/knowledge-artifacts/governance/contracts.d.ts +158 -0
- package/dist/knowledge-artifacts/governance/contracts.js +1 -0
- package/dist/knowledge-artifacts/governance/evidence.d.ts +24 -0
- package/dist/knowledge-artifacts/governance/evidence.js +109 -0
- package/dist/knowledge-artifacts/governance/index.d.ts +11 -0
- package/dist/knowledge-artifacts/governance/index.js +11 -0
- package/dist/knowledge-artifacts/governance/list-view.d.ts +67 -0
- package/dist/knowledge-artifacts/governance/list-view.js +77 -0
- package/dist/knowledge-artifacts/governance/observe-feedback.d.ts +60 -0
- package/dist/knowledge-artifacts/governance/promote-gate.d.ts +34 -0
- package/dist/knowledge-artifacts/governance/promote-gate.js +32 -0
- package/dist/knowledge-artifacts/governance/source-probe.d.ts +15 -0
- package/dist/knowledge-artifacts/governance/source-probe.js +129 -0
- package/dist/knowledge-artifacts/governance/store.d.ts +141 -0
- package/dist/knowledge-artifacts/governance/store.js +585 -0
- package/dist/knowledge-artifacts/skills/contracts.d.ts +35 -0
- package/dist/knowledge-artifacts/skills/contracts.js +1 -0
- package/dist/knowledge-artifacts/skills/hard-rules.d.ts +7 -0
- package/dist/knowledge-artifacts/sources/content-hash.d.ts +31 -0
- package/dist/knowledge-artifacts/sources/content-hash.js +121 -0
- package/dist/mcp/capture-store.d.ts +25 -0
- package/dist/mcp/capture-store.js +48 -0
- package/dist/mcp/feedback-store.d.ts +78 -0
- package/dist/mcp/feedback-store.js +241 -0
- package/dist/mcp/http.d.ts +26 -0
- package/dist/mcp/http.js +225 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.js +7 -0
- package/dist/mcp/mcp-server.d.ts +14 -0
- package/dist/mcp/mcp-server.js +293 -0
- package/dist/mcp/principal.d.ts +25 -0
- package/dist/mcp/principal.js +83 -0
- package/dist/mcp/review-component.d.ts +11 -0
- package/dist/mcp/review-component.js +846 -0
- package/dist/mcp/stdio.d.ts +2 -0
- package/dist/mcp/stdio.js +16 -0
- package/dist/observability/analysis/contracts.d.ts +57 -0
- package/dist/observability/analysis/contracts.js +1 -0
- package/dist/observability/analysis/coverage-analyzer.d.ts +53 -0
- package/dist/observability/analysis/coverage-analyzer.js +306 -0
- package/dist/observability/analysis/gap-analyzer.d.ts +118 -0
- package/dist/observability/analysis/gap-analyzer.js +470 -0
- package/dist/observability/analysis/hedging-classifier.d.ts +34 -0
- package/dist/observability/contracts/experience.d.ts +651 -0
- package/dist/observability/contracts/experience.js +1 -0
- package/dist/observability/contracts/inbox.d.ts +181 -0
- package/dist/observability/contracts/inbox.js +1 -0
- package/dist/observability/contracts/index.d.ts +7 -0
- package/dist/observability/contracts/index.js +1 -0
- package/dist/observability/contracts/problem-patterns.d.ts +50 -0
- package/dist/observability/contracts/problem-patterns.js +1 -0
- package/dist/observability/contracts/review.d.ts +47 -0
- package/dist/observability/contracts/review.js +1 -0
- package/dist/observability/contracts/skill-chain-advisories.d.ts +8 -0
- package/dist/observability/contracts/skill-chain-advisories.js +1 -0
- package/dist/observability/contracts/skill-chain.d.ts +114 -0
- package/dist/observability/contracts/skill-chain.js +1 -0
- package/dist/observability/contracts/trace.d.ts +22 -0
- package/dist/observability/contracts/trace.js +1 -0
- package/dist/observability/conversation/catalog.d.ts +42 -0
- package/dist/observability/conversation/catalog.js +575 -0
- package/dist/observability/conversation/index-process.d.ts +1 -0
- package/dist/observability/conversation/index-process.js +31 -0
- package/dist/observability/conversation/knowledge-debugger.d.ts +7 -0
- package/dist/observability/conversation/knowledge-debugger.js +397 -0
- package/dist/observability/conversation/task-semantic-projection.d.ts +11 -0
- package/dist/observability/conversation/task-window.d.ts +10 -0
- package/dist/observability/conversation/task-window.js +57 -0
- package/dist/observability/conversation/turn-index.d.ts +3 -0
- package/dist/observability/conversation/turn-index.js +255 -0
- package/dist/observability/conversation/view-model.d.ts +5 -0
- package/dist/observability/conversation/view-model.js +100 -0
- package/dist/observability/experience/primitives.d.ts +11 -0
- package/dist/observability/experience/primitives.js +75 -0
- package/dist/observability/experience/report-codec.d.ts +33 -0
- package/dist/observability/experience/report-codec.js +235 -0
- package/dist/observability/experience/report-derivations.d.ts +35 -0
- package/dist/observability/experience/report-derivations.js +283 -0
- package/dist/observability/experience/report-reference-validator.d.ts +18 -0
- package/dist/observability/experience/report-reference-validator.js +596 -0
- package/dist/observability/experience/report-structure.d.ts +9 -0
- package/dist/observability/experience/report-structure.js +93 -0
- package/dist/observability/experience/report-value-guards.d.ts +65 -0
- package/dist/observability/experience/report-value-guards.js +1224 -0
- package/dist/observability/experience/review-checklist.d.ts +43 -0
- package/dist/observability/experience/review-checklist.js +630 -0
- package/dist/observability/experience/reviewer-report.d.ts +17 -0
- package/dist/observability/experience/reviewer-report.js +281 -0
- package/dist/observability/experience/session-story.d.ts +93 -0
- package/dist/observability/experience/session-story.js +1351 -0
- package/dist/observability/experience/text-signals.d.ts +7 -0
- package/dist/observability/experience/text-signals.js +30 -0
- package/dist/observability/experience/timeline.d.ts +29 -0
- package/dist/observability/experience/timeline.js +495 -0
- package/dist/observability/experience.d.ts +13 -43
- package/dist/observability/experience.js +177 -5378
- package/dist/observability/inbox/capture-coverage.d.ts +3 -0
- package/dist/observability/inbox/capture-coverage.js +34 -0
- package/dist/observability/inbox/explicit-capture.d.ts +50 -0
- package/dist/observability/inbox/explicit-capture.js +223 -0
- package/dist/observability/inbox/feedback-projection.d.ts +20 -0
- package/dist/observability/inbox/identity.d.ts +6 -0
- package/dist/observability/inbox/identity.js +44 -0
- package/dist/observability/inbox/index.d.ts +36 -0
- package/dist/observability/inbox/index.js +1339 -0
- package/dist/observability/inbox/paths.d.ts +10 -0
- package/dist/observability/inbox/paths.js +65 -0
- package/dist/observability/inbox/problem-patterns.d.ts +11 -0
- package/dist/observability/inbox/problem-patterns.js +246 -0
- package/dist/observability/inbox/resolved-review.d.ts +36 -0
- package/dist/observability/inbox/review-state.d.ts +25 -0
- package/dist/observability/inbox/review-state.js +352 -0
- package/dist/observability/inbox/source-record-archive.d.ts +14 -0
- package/dist/observability/inbox/source-record-archive.js +328 -0
- package/dist/observability/inbox/view-model.d.ts +44 -0
- package/dist/observability/inbox/view-model.js +186 -0
- package/dist/observability/prompts/document.js +21 -0
- package/dist/observability/skill-health/advisories.d.ts +15 -0
- package/dist/observability/skill-health/analyzer.d.ts +129 -0
- package/dist/observability/skill-health/analyzer.js +328 -0
- package/dist/observability/skill-health/experience-frontmatter.d.ts +36 -0
- package/dist/observability/skill-health/experience-frontmatter.js +99 -0
- package/dist/observability/skill-health/report.d.ts +10 -0
- package/dist/observability/skill-health/report.js +620 -0
- package/dist/observability/skill-health/skill-chain.d.ts +7 -0
- package/dist/observability/skill-health/skill-chain.js +486 -0
- package/dist/observability/soft-standards/llm-extractor.js +1 -1
- package/dist/observability/soft-standards/runtime-evaluator.d.ts +1 -1
- package/dist/observability/soft-standards/skill-standards-store.d.ts +1 -1
- package/dist/observability/soft-standards/skill-standards-store.js +4 -3
- package/dist/observability/soft-standards/types.d.ts +2 -2
- package/dist/observability/trace/adapters/codex/conversation-index.d.ts +92 -0
- package/dist/observability/trace/adapters/codex/conversation-index.js +600 -0
- package/dist/observability/trace/adapters/codex/tool-status.d.ts +16 -0
- package/dist/observability/trace/adapters/codex/tool-status.js +114 -0
- package/dist/observability/trace/adapters/codex/trace.d.ts +5 -0
- package/dist/observability/trace/adapters/codex/trace.js +1091 -0
- package/dist/observability/trace/attribution.d.ts +63 -0
- package/dist/observability/trace/attribution.js +397 -0
- package/dist/observability/trace/index.d.ts +26 -0
- package/dist/observability/trace/index.js +20 -0
- package/dist/observability/trace/ingestion.d.ts +9 -0
- package/dist/observability/trace/ingestion.js +80 -0
- package/dist/observability/trace/message-classification.d.ts +6 -0
- package/dist/observability/trace/message-classification.js +34 -0
- package/dist/observability/trace/projection.d.ts +5 -0
- package/dist/observability/trace/projection.js +20 -0
- package/dist/observability/trace/segmentation.d.ts +66 -0
- package/dist/observability/trace/segmentation.js +496 -0
- package/dist/observability/trace/source.d.ts +100 -0
- package/dist/observability/trace/source.js +1233 -0
- package/dist/observability/trace/tool-search.d.ts +8 -0
- package/dist/observability/trace/tool-search.js +160 -0
- package/dist/observability/trace/trace-ir.d.ts +187 -0
- package/dist/observability/trace/trace-ir.js +87 -0
- package/dist/observability/view-models/conversation.d.ts +51 -0
- package/dist/observability/view-models/conversation.js +1 -0
- package/dist/observability/view-models/index.d.ts +3 -0
- package/dist/observability/view-models/index.js +1 -0
- package/dist/observability/view-models/knowledge-debugger.d.ts +84 -0
- package/dist/observability/view-models/knowledge-debugger.js +1 -0
- package/dist/shared/content-hash.d.ts +1 -0
- package/dist/shared/content-hash.js +4 -0
- package/dist/shared/language.d.ts +2 -0
- package/dist/shared/language.js +1 -0
- package/dist/studio/application/index.d.ts +2 -0
- package/dist/studio/application/index.js +2 -0
- package/dist/studio/application/skill-index.d.ts +9 -0
- package/dist/studio/application/skill-index.js +347 -0
- package/dist/studio/application/skill-insights.d.ts +6 -0
- package/dist/studio/application/skill-insights.js +231 -0
- package/dist/studio/core-runs/catalog.d.ts +3 -0
- package/dist/studio/core-runs/catalog.js +15 -0
- package/dist/studio/core-runs/contracts.d.ts +227 -0
- package/dist/studio/core-runs/contracts.js +2 -0
- package/dist/studio/core-runs/index.d.ts +5 -0
- package/dist/studio/core-runs/index.js +5 -0
- package/dist/studio/core-runs/projection.d.ts +4 -0
- package/dist/studio/core-runs/projection.js +307 -0
- package/dist/studio/core-runs/renderer.d.ts +11 -0
- package/dist/studio/core-runs/renderer.js +414 -0
- package/dist/studio/core-runs/route-handler.d.ts +19 -0
- package/dist/studio/core-runs/route-handler.js +122 -0
- package/dist/studio/http/contracts.d.ts +28 -0
- package/dist/studio/http/contracts.js +1 -0
- package/dist/studio/http/errors.d.ts +1 -0
- package/dist/studio/http/errors.js +3 -0
- package/dist/studio/http/report-server.d.ts +4 -0
- package/dist/studio/http/report-server.js +106 -0
- package/dist/studio/http/request-errors.d.ts +8 -0
- package/dist/studio/http/request-errors.js +77 -0
- package/dist/studio/http/request-handler.d.ts +12 -0
- package/dist/studio/http/request-handler.js +137 -0
- package/dist/studio/http/routes/contracts.d.ts +14 -0
- package/dist/studio/http/routes/contracts.js +1 -0
- package/dist/studio/http/routes/conversations.d.ts +8 -0
- package/dist/studio/http/routes/conversations.js +220 -0
- package/dist/studio/http/routes/knowledge.d.ts +14 -0
- package/dist/studio/http/routes/knowledge.js +781 -0
- package/dist/studio/http/routes/observations.d.ts +13 -0
- package/dist/studio/http/routes/observations.js +193 -0
- package/dist/studio/index.d.ts +1 -0
- package/dist/studio/index.js +1 -0
- package/dist/studio/presentation/conversation-renderer.d.ts +17 -0
- package/dist/studio/presentation/conversation-renderer.js +526 -0
- package/dist/studio/presentation/doctor-detail-renderer.d.ts +10 -0
- package/dist/studio/presentation/knowledge-debugger-renderer.d.ts +9 -0
- package/dist/studio/presentation/knowledge-debugger-renderer.js +2393 -0
- package/dist/studio/presentation/layout.d.ts +16 -0
- package/dist/studio/presentation/layout.js +788 -0
- package/dist/studio/presentation/managed-history-renderer.d.ts +5 -0
- package/dist/studio/presentation/managed-history-renderer.js +333 -0
- package/dist/studio/presentation/observation-inbox/client-script.d.ts +2 -0
- package/dist/studio/presentation/observation-inbox/client-script.js +1795 -0
- package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.d.ts +35 -0
- package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.js +1799 -0
- package/dist/studio/presentation/observation-inbox/helpers.d.ts +13 -0
- package/dist/studio/presentation/observation-inbox/metric-renderer.d.ts +50 -0
- package/dist/studio/presentation/observation-inbox/metric-renderer.js +750 -0
- package/dist/studio/presentation/observation-inbox/page-renderer.d.ts +12 -0
- package/dist/studio/presentation/observation-inbox/page-renderer.js +275 -0
- package/dist/studio/presentation/observation-inbox/process-workspace-renderer.d.ts +52 -0
- package/dist/studio/presentation/observation-inbox/process-workspace-renderer.js +380 -0
- package/dist/studio/presentation/observation-inbox/review-renderer.d.ts +28 -0
- package/dist/studio/presentation/observation-inbox/review-renderer.js +323 -0
- package/dist/studio/presentation/observation-inbox/reviewer-report.d.ts +8 -0
- package/dist/studio/presentation/observation-inbox/reviewer-report.js +449 -0
- package/dist/studio/presentation/observation-inbox/signal-renderer.d.ts +20 -0
- package/dist/studio/presentation/observation-inbox/signal-renderer.js +133 -0
- package/dist/studio/presentation/observation-inbox/skill-chain-renderer.d.ts +17 -0
- package/dist/studio/presentation/observation-inbox/skill-chain-renderer.js +738 -0
- package/dist/studio/presentation/observation-inbox/timeline.d.ts +18 -0
- package/dist/studio/presentation/observation-inbox/timeline.js +772 -0
- package/dist/studio/presentation/observation-inbox-renderer.d.ts +4 -0
- package/dist/studio/presentation/observation-inbox-renderer.js +130 -0
- package/dist/studio/presentation/report-shell.d.ts +77 -0
- package/dist/studio/presentation/skill-detail-renderer.d.ts +12 -0
- package/dist/studio/presentation/skill-detail-renderer.js +71 -0
- package/dist/studio/presentation/skill-health-renderer.d.ts +19 -0
- package/dist/studio/presentation/skill-health-renderer.js +315 -0
- package/dist/studio/presentation/skill-list-renderer.d.ts +3 -0
- package/dist/studio/presentation/skill-list-renderer.js +36 -0
- package/dist/studio/presentation/trajectory-evidence.d.ts +8 -0
- package/dist/studio/presentation/trajectory-live.d.ts +43 -0
- package/dist/studio/presentation/trajectory-live.js +261 -0
- package/dist/studio/view-models/index.d.ts +2 -0
- package/dist/studio/view-models/index.js +1 -0
- package/dist/studio/view-models/insight.d.ts +68 -0
- package/dist/studio/view-models/insight.js +1 -0
- package/dist/studio/view-models/skill-index.d.ts +110 -0
- package/dist/studio/view-models/skill-index.js +1 -0
- package/package.json +52 -7
- package/dist/analysis/coverage-analyzer.d.ts +0 -57
- package/dist/analysis/coverage-analyzer.js +0 -324
- package/dist/analysis/failure-clusterer.d.ts +0 -95
- package/dist/analysis/failure-clusterer.js +0 -298
- package/dist/analysis/gap-analyzer.d.ts +0 -120
- package/dist/analysis/gap-analyzer.js +0 -480
- package/dist/analysis/hedging-classifier.d.ts +0 -33
- package/dist/analysis/report-diagnostics.d.ts +0 -40
- package/dist/analysis/report-diagnostics.js +0 -862
- package/dist/analysis/sample-diagnostics.d.ts +0 -84
- package/dist/analysis/sample-diagnostics.js +0 -457
- package/dist/analysis/saturation.d.ts +0 -92
- package/dist/analysis/saturation.js +0 -181
- package/dist/artifact-graph/doctor.d.ts +0 -21
- package/dist/artifact-graph/doctor.js +0 -577
- package/dist/artifact-graph/eval.d.ts +0 -16
- package/dist/artifact-graph/eval.js +0 -471
- package/dist/authoring/evolver.d.ts +0 -263
- package/dist/authoring/evolver.js +0 -1333
- package/dist/authoring/generator.d.ts +0 -99
- package/dist/authoring/generator.js +0 -1018
- package/dist/authoring/sample-fixer.d.ts +0 -54
- package/dist/authoring/sample-fixer.js +0 -297
- package/dist/cli/lib/run-tally.d.ts +0 -17
- package/dist/cli/lib/run-tally.js +0 -30
- package/dist/diagnosis/types.d.ts +0 -5
- package/dist/doctor/endpoint-rule.d.ts +0 -60
- package/dist/doctor/endpoint-rule.js +0 -382
- package/dist/doctor/fixer.d.ts +0 -11
- package/dist/doctor/fixer.js +0 -325
- package/dist/doctor/health/composer.d.ts +0 -18
- package/dist/doctor/health/composer.js +0 -407
- package/dist/doctor/health/dimension-spec.d.ts +0 -52
- package/dist/doctor/health/prompt-builder.d.ts +0 -2
- package/dist/doctor/health/prompt-builder.js +0 -1
- package/dist/doctor/index.d.ts +0 -18
- package/dist/doctor/index.js +0 -273
- package/dist/doctor/messages.d.ts +0 -20
- package/dist/doctor/preflight.d.ts +0 -31
- package/dist/doctor/preflight.js +0 -31
- package/dist/doctor/renderer.d.ts +0 -17
- package/dist/doctor/rules.d.ts +0 -32
- package/dist/doctor/rules.js +0 -290
- package/dist/eval-core/artifact-file-names.d.ts +0 -15
- package/dist/eval-core/artifact-file-names.js +0 -62
- package/dist/eval-core/artifact-index.d.ts +0 -102
- package/dist/eval-core/artifact-index.js +0 -336
- package/dist/eval-core/bootstrap.d.ts +0 -130
- package/dist/eval-core/bootstrap.js +0 -258
- package/dist/eval-core/cache.d.ts +0 -47
- package/dist/eval-core/cache.js +0 -205
- package/dist/eval-core/comparability.d.ts +0 -10
- package/dist/eval-core/comparability.js +0 -302
- package/dist/eval-core/default-dirs.d.ts +0 -34
- package/dist/eval-core/default-dirs.js +0 -36
- package/dist/eval-core/dependency-checker.d.ts +0 -36
- package/dist/eval-core/evaluation-execution.d.ts +0 -66
- package/dist/eval-core/evaluation-execution.js +0 -424
- package/dist/eval-core/evaluation-job.d.ts +0 -57
- package/dist/eval-core/evaluation-job.js +0 -121
- package/dist/eval-core/evaluation-reporting.d.ts +0 -48
- package/dist/eval-core/evaluation-reporting.js +0 -353
- package/dist/eval-core/execution-strategy.d.ts +0 -12
- package/dist/eval-core/execution-strategy.js +0 -174
- package/dist/eval-core/fact-checker.d.ts +0 -37
- package/dist/eval-core/fact-checker.js +0 -128
- package/dist/eval-core/holdout.d.ts +0 -66
- package/dist/eval-core/holdout.js +0 -119
- package/dist/eval-core/judge-independence.d.ts +0 -28
- package/dist/eval-core/judge-independence.js +0 -29
- package/dist/eval-core/layer-gates.d.ts +0 -16
- package/dist/eval-core/layer-gates.js +0 -41
- package/dist/eval-core/measurement-dirs.js +0 -82
- package/dist/eval-core/mock-hook.cjs +0 -271
- package/dist/eval-core/mocks-runtime.d.ts +0 -99
- package/dist/eval-core/mocks-runtime.js +0 -617
- package/dist/eval-core/report-document.d.ts +0 -12
- package/dist/eval-core/report-document.js +0 -1157
- package/dist/eval-core/report-extensions.d.ts +0 -4
- package/dist/eval-core/report-extensions.js +0 -500
- package/dist/eval-core/report-file-migration.d.ts +0 -10
- package/dist/eval-core/report-file-migration.js +0 -95
- package/dist/eval-core/resume-compatibility.d.ts +0 -32
- package/dist/eval-core/resume-compatibility.js +0 -142
- package/dist/eval-core/sample-fingerprint.d.ts +0 -12
- package/dist/eval-core/sample-fingerprint.js +0 -193
- package/dist/eval-core/schema.d.ts +0 -29
- package/dist/eval-core/schema.js +0 -365
- package/dist/eval-core/statistics.d.ts +0 -85
- package/dist/eval-core/statistics.js +0 -209
- package/dist/eval-core/task-planner.d.ts +0 -11
- package/dist/eval-core/task-planner.js +0 -72
- package/dist/eval-core/verdict.d.ts +0 -179
- package/dist/eval-core/verdict.js +0 -669
- package/dist/eval-workflows/batch-evaluation-workflow.d.ts +0 -146
- package/dist/eval-workflows/batch-evaluation-workflow.js +0 -259
- package/dist/eval-workflows/evaluation-pipeline/preflight-warnings.d.ts +0 -26
- package/dist/eval-workflows/evaluation-pipeline/preflight-warnings.js +0 -105
- package/dist/eval-workflows/evaluation-pipeline/report-finalize.d.ts +0 -27
- package/dist/eval-workflows/evaluation-pipeline/report-finalize.js +0 -69
- package/dist/eval-workflows/evaluation-pipeline/run-state.d.ts +0 -62
- package/dist/eval-workflows/evaluation-pipeline/run-state.js +0 -91
- package/dist/eval-workflows/evaluation-pipeline/test-set-hash.d.ts +0 -21
- package/dist/eval-workflows/evaluation-pipeline/test-set-hash.js +0 -52
- package/dist/eval-workflows/evaluation-pipeline.d.ts +0 -99
- package/dist/eval-workflows/evaluation-pipeline.js +0 -188
- package/dist/eval-workflows/evaluation-preparation.d.ts +0 -56
- package/dist/eval-workflows/evaluation-preparation.js +0 -83
- package/dist/eval-workflows/run-evaluation.d.ts +0 -152
- package/dist/eval-workflows/run-evaluation.js +0 -556
- package/dist/grading/assertions.d.ts +0 -38
- package/dist/grading/assertions.js +0 -475
- package/dist/grading/diagnostic.d.ts +0 -46
- package/dist/grading/diagnostic.js +0 -472
- package/dist/grading/gold-cli.d.ts +0 -84
- package/dist/grading/gold-cli.js +0 -246
- package/dist/grading/human-gold.d.ts +0 -103
- package/dist/grading/human-gold.js +0 -189
- package/dist/grading/index.d.ts +0 -60
- package/dist/grading/index.js +0 -150
- package/dist/grading/judge.d.ts +0 -67
- package/dist/grading/judge.js +0 -405
- package/dist/grading/layered-scores.d.ts +0 -26
- package/dist/grading/layered-scores.js +0 -87
- package/dist/inputs/content-hash.d.ts +0 -28
- package/dist/inputs/content-hash.js +0 -106
- package/dist/inputs/eval-config.d.ts +0 -12
- package/dist/inputs/eval-config.js +0 -295
- package/dist/inputs/load-samples.d.ts +0 -39
- package/dist/inputs/load-samples.js +0 -298
- package/dist/inputs/materialize-copy.js +0 -193
- package/dist/inputs/mcp-resolver.d.ts +0 -49
- package/dist/inputs/mcp-resolver.js +0 -309
- package/dist/inputs/sample-document.d.ts +0 -11
- package/dist/inputs/sample-document.js +0 -96
- package/dist/inputs/sample-locator.d.ts +0 -23
- package/dist/inputs/sample-locator.js +0 -195
- package/dist/inputs/skill-loader.d.ts +0 -190
- package/dist/inputs/skill-loader.js +0 -852
- package/dist/inputs/url-fetcher.d.ts +0 -18
- package/dist/inputs/url-fetcher.js +0 -240
- package/dist/managed/evidence.d.ts +0 -24
- package/dist/managed/evidence.js +0 -155
- package/dist/managed/index.d.ts +0 -12
- package/dist/managed/index.js +0 -12
- package/dist/managed/list-view.d.ts +0 -72
- package/dist/managed/list-view.js +0 -78
- package/dist/managed/observe-feedback.d.ts +0 -60
- package/dist/managed/promote-gate.d.ts +0 -40
- package/dist/managed/promote-gate.js +0 -37
- package/dist/managed/source-probe.d.ts +0 -15
- package/dist/managed/source-probe.js +0 -129
- package/dist/managed/store.d.ts +0 -142
- package/dist/managed/store.js +0 -595
- package/dist/managed/version-scores.d.ts +0 -33
- package/dist/managed/version-scores.js +0 -70
- package/dist/observability/codex-conversation-index.d.ts +0 -92
- package/dist/observability/codex-conversation-index.js +0 -600
- package/dist/observability/codex-tool-status.d.ts +0 -16
- package/dist/observability/codex-tool-status.js +0 -114
- package/dist/observability/codex-trace-adapter.d.ts +0 -5
- package/dist/observability/codex-trace-adapter.js +0 -1091
- package/dist/observability/conversation-catalog.d.ts +0 -38
- package/dist/observability/conversation-catalog.js +0 -575
- package/dist/observability/conversation-index-process.js +0 -31
- package/dist/observability/conversation-view-model.d.ts +0 -5
- package/dist/observability/conversation-view-model.js +0 -100
- package/dist/observability/experience-frontmatter.d.ts +0 -36
- package/dist/observability/experience-frontmatter.js +0 -99
- package/dist/observability/feedback-projection.d.ts +0 -20
- package/dist/observability/inbox-view-model.d.ts +0 -43
- package/dist/observability/inbox-view-model.js +0 -185
- package/dist/observability/inbox.d.ts +0 -33
- package/dist/observability/inbox.js +0 -1343
- package/dist/observability/knowledge-debugger.d.ts +0 -4
- package/dist/observability/knowledge-debugger.js +0 -397
- package/dist/observability/problem-patterns.d.ts +0 -11
- package/dist/observability/problem-patterns.js +0 -245
- package/dist/observability/resolved-review.d.ts +0 -36
- package/dist/observability/review-state.d.ts +0 -25
- package/dist/observability/review-state.js +0 -351
- package/dist/observability/skill-chain-advisories.d.ts +0 -15
- package/dist/observability/skill-chain.d.ts +0 -6
- package/dist/observability/skill-chain.js +0 -486
- package/dist/observability/skill-health-analyzer.d.ts +0 -128
- package/dist/observability/skill-health-analyzer.js +0 -328
- package/dist/observability/skill-health-report.d.ts +0 -10
- package/dist/observability/skill-health-report.js +0 -620
- package/dist/observability/source-record-archive.d.ts +0 -13
- package/dist/observability/source-record-archive.js +0 -324
- package/dist/observability/task-semantic-projection.d.ts +0 -11
- package/dist/observability/task-window.d.ts +0 -9
- package/dist/observability/task-window.js +0 -57
- package/dist/observability/text-signals.d.ts +0 -13
- package/dist/observability/text-signals.js +0 -115
- package/dist/observability/trace-adapter.d.ts +0 -27
- package/dist/observability/trace-adapter.js +0 -22
- package/dist/observability/trace-attribution.d.ts +0 -63
- package/dist/observability/trace-attribution.js +0 -397
- package/dist/observability/trace-ingestion.d.ts +0 -9
- package/dist/observability/trace-ingestion.js +0 -80
- package/dist/observability/trace-ir.d.ts +0 -184
- package/dist/observability/trace-ir.js +0 -87
- package/dist/observability/trace-segmenter.d.ts +0 -64
- package/dist/observability/trace-segmenter.js +0 -502
- package/dist/observability/trace-source.d.ts +0 -100
- package/dist/observability/trace-source.js +0 -1232
- package/dist/observability/turn-index.d.ts +0 -3
- package/dist/observability/turn-index.js +0 -251
- package/dist/renderer/conversation-renderer.d.ts +0 -16
- package/dist/renderer/conversation-renderer.js +0 -512
- package/dist/renderer/doctor-detail-renderer.d.ts +0 -9
- package/dist/renderer/html-renderer.d.ts +0 -10
- package/dist/renderer/html-renderer.js +0 -706
- package/dist/renderer/knowledge-debugger-renderer.d.ts +0 -9
- package/dist/renderer/knowledge-debugger-renderer.js +0 -2388
- package/dist/renderer/layout.d.ts +0 -13
- package/dist/renderer/layout.js +0 -788
- package/dist/renderer/managed-history-renderer.d.ts +0 -5
- package/dist/renderer/managed-history-renderer.js +0 -437
- package/dist/renderer/observation-inbox/helpers.d.ts +0 -13
- package/dist/renderer/observation-inbox-renderer.d.ts +0 -4
- package/dist/renderer/observation-inbox-renderer.js +0 -7326
- package/dist/renderer/report-shell.d.ts +0 -77
- package/dist/renderer/skill-detail-renderer.d.ts +0 -12
- package/dist/renderer/skill-detail-renderer.js +0 -3115
- package/dist/renderer/skill-health-renderer.d.ts +0 -19
- package/dist/renderer/skill-health-renderer.js +0 -315
- package/dist/renderer/skill-list-renderer.d.ts +0 -2
- package/dist/renderer/skill-list-renderer.js +0 -394
- package/dist/renderer/summary.d.ts +0 -67
- package/dist/renderer/summary.js +0 -2094
- package/dist/renderer/table.d.ts +0 -2
- package/dist/renderer/table.js +0 -257
- package/dist/renderer/test-view.d.ts +0 -67
- package/dist/renderer/test-view.js +0 -1190
- package/dist/renderer/trajectory-evidence.d.ts +0 -8
- package/dist/renderer/trajectory-live.d.ts +0 -42
- package/dist/renderer/trajectory-live.js +0 -258
- package/dist/renderer/trends.d.ts +0 -5
- package/dist/renderer/trends.js +0 -130
- package/dist/server/indexed-report-store.d.ts +0 -8
- package/dist/server/indexed-report-store.js +0 -126
- package/dist/server/job-store.d.ts +0 -2
- package/dist/server/job-store.js +0 -103
- package/dist/server/report-server.d.ts +0 -39
- package/dist/server/report-server.js +0 -1610
- package/dist/server/report-store.d.ts +0 -51
- package/dist/server/report-store.js +0 -281
- package/dist/server/skill-index.d.ts +0 -25
- package/dist/server/skill-index.js +0 -955
- package/dist/server/skill-insights.d.ts +0 -31
- package/dist/server/skill-insights.js +0 -854
- package/dist/shared/artifact-graph.d.ts +0 -3
- package/dist/shared/artifact-graph.js +0 -224
- package/dist/shared/assertion-types.d.ts +0 -8
- package/dist/shared/diagnosis-schema.d.ts +0 -9
- package/dist/shared/diagnosis-schema.js +0 -181
- package/dist/shared/doctor-report.d.ts +0 -3
- package/dist/shared/doctor-report.js +0 -103
- package/dist/shared/evaluation-job.d.ts +0 -6
- package/dist/shared/evaluation-job.js +0 -217
- package/dist/shared/executor-result.d.ts +0 -17
- package/dist/shared/executor-result.js +0 -221
- package/dist/shared/hard-rules.d.ts +0 -41
- package/dist/shared/llm-prompts/debias-instructions.js +0 -44
- package/dist/shared/llm-prompts/index.js +0 -21
- package/dist/shared/llm-prompts/judge-prompts.d.ts +0 -30
- package/dist/shared/llm-prompts/judge-prompts.js +0 -205
- package/dist/shared/llm-prompts/registry.d.ts +0 -27
- package/dist/shared/llm-prompts/registry.js +0 -70
- package/dist/shared/llm-prompts/skill-health-merge.d.ts +0 -22
- package/dist/shared/llm-prompts/skill-health.d.ts +0 -21
- package/dist/shared/sample-contract.d.ts +0 -4
- package/dist/shared/sample-contract.js +0 -367
- package/dist/shared/tool-call-status.d.ts +0 -8
- package/dist/shared/tool-call-status.js +0 -28
- package/dist/shared/tool-search.d.ts +0 -8
- package/dist/shared/tool-search.js +0 -160
- package/dist/shared/trace-projection.d.ts +0 -5
- package/dist/shared/trace-projection.js +0 -20
- package/dist/shared/trace-source-kind.d.ts +0 -3
- package/dist/shared/trace-source-kind.js +0 -12
- package/dist/types/artifact-graph.d.ts +0 -93
- package/dist/types/dependencies.d.ts +0 -22
- package/dist/types/doctor.d.ts +0 -202
- package/dist/types/doctor.js +0 -6
- package/dist/types/eval.d.ts +0 -413
- package/dist/types/executor.d.ts +0 -191
- package/dist/types/index.d.ts +0 -14
- package/dist/types/index.js +0 -14
- package/dist/types/judge.d.ts +0 -204
- package/dist/types/judge.js +0 -3
- package/dist/types/managed.d.ts +0 -164
- package/dist/types/observability.d.ts +0 -1199
- package/dist/types/observability.js +0 -13
- package/dist/types/report.d.ts +0 -704
- package/dist/types/shared.d.ts +0 -1
- package/dist/types/skill-index.d.ts +0 -206
- package/dist/types/storage.d.ts +0 -20
- package/dist/types/trace.d.ts +0 -2
- /package/dist/{types/diagnosis.d.ts → diagnosis/contracts.d.ts} +0 -0
- /package/dist/{observability/conversation-index-process.d.ts → diagnosis/contracts.js} +0 -0
- /package/dist/diagnosis/{types.js → lifecycle.js} +0 -0
- /package/dist/{types/artifact-graph.js → eval-core/engine/types.js} +0 -0
- /package/dist/{grading/gold-dataset.d.ts → eval-workflows/gold/dataset.d.ts} +0 -0
- /package/dist/{grading/gold-dataset.js → eval-workflows/gold/dataset.js} +0 -0
- /package/dist/{shared → eval-workflows/inputs}/assertion-types.js +0 -0
- /package/dist/{types/dependencies.js → eval-workflows/inputs/contracts/assertion-kind.js} +0 -0
- /package/dist/{types/diagnosis.js → eval-workflows/inputs/contracts/assertion.js} +0 -0
- /package/dist/{types/eval.js → eval-workflows/inputs/contracts/config.js} +0 -0
- /package/dist/{types/executor.js → eval-workflows/inputs/contracts/index.js} +0 -0
- /package/dist/{types/managed.js → eval-workflows/inputs/contracts/sample.js} +0 -0
- /package/dist/{types/report.js → eval-workflows/inputs/contracts/variant.js} +0 -0
- /package/dist/{inputs → eval-workflows/inputs}/materialize-copy.d.ts +0 -0
- /package/dist/{inputs → eval-workflows/inputs}/source-resolver.d.ts +0 -0
- /package/dist/{inputs → eval-workflows/inputs}/source-resolver.js +0 -0
- /package/dist/{types/shared.js → eval-workflows/instruments/contracts/config.js} +0 -0
- /package/dist/{types/skill-index.js → eval-workflows/instruments/contracts/index.js} +0 -0
- /package/dist/{types/storage.js → eval-workflows/instruments/contracts/result.js} +0 -0
- /package/dist/{shared/llm-prompts → eval-workflows/instruments/prompts}/debias-instructions.d.ts +0 -0
- /package/dist/{types/trace.js → evidence/graph/contracts.js} +0 -0
- /package/dist/{eval-core/measurement-dirs.d.ts → evidence/storage/directories.d.ts} +0 -0
- /package/dist/{shared → executors/core}/token-usage.d.ts +0 -0
- /package/dist/{shared → executors/core}/token-usage.js +0 -0
- /package/dist/{shared → executors/core}/tool-identity.d.ts +0 -0
- /package/dist/{shared → executors/core}/tool-identity.js +0 -0
- /package/dist/{eval-core/dependency-checker.js → executors/preflight/dependencies.js} +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/builtin-dimensions.d.ts +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/builtin-dimensions.js +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/consensus.d.ts +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/consensus.js +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/dimension-registry.d.ts +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/dimension-registry.js +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/dimension-spec.js +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/load-custom-dimensions.d.ts +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/load-custom-dimensions.js +0 -0
- /package/dist/{shared/llm-prompts/skill-health-merge.js → knowledge-artifacts/doctor/health/merge-prompt.js} +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/parser.d.ts +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/parser.js +0 -0
- /package/dist/{shared/llm-prompts/skill-health.js → knowledge-artifacts/doctor/health/prompt-builder.js} +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/register.d.ts +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/health/register.js +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/messages.js +0 -0
- /package/dist/{doctor → knowledge-artifacts/doctor}/renderer.js +0 -0
- /package/dist/{managed → knowledge-artifacts/governance}/list-query.d.ts +0 -0
- /package/dist/{managed → knowledge-artifacts/governance}/list-query.js +0 -0
- /package/dist/{managed → knowledge-artifacts/governance}/observe-feedback.js +0 -0
- /package/dist/{shared → knowledge-artifacts/skills}/hard-rules.js +0 -0
- /package/dist/{analysis → observability/analysis}/hedging-classifier.js +0 -0
- /package/dist/observability/{polling-subscription-hub.d.ts → conversation/polling-subscription-hub.d.ts} +0 -0
- /package/dist/observability/{polling-subscription-hub.js → conversation/polling-subscription-hub.js} +0 -0
- /package/dist/observability/{task-semantic-projection.js → conversation/task-semantic-projection.js} +0 -0
- /package/dist/observability/{feedback-matchers.d.ts → inbox/feedback-matchers.d.ts} +0 -0
- /package/dist/observability/{feedback-matchers.js → inbox/feedback-matchers.js} +0 -0
- /package/dist/observability/{feedback-projection.js → inbox/feedback-projection.js} +0 -0
- /package/dist/observability/{resolved-review.js → inbox/resolved-review.js} +0 -0
- /package/dist/{shared/llm-prompts/index.d.ts → observability/prompts/document.d.ts} +0 -0
- /package/dist/observability/{skill-chain-advisories.js → skill-health/advisories.js} +0 -0
- /package/dist/observability/{codex-exec-command.d.ts → trace/adapters/codex/exec-command.d.ts} +0 -0
- /package/dist/observability/{codex-exec-command.js → trace/adapters/codex/exec-command.js} +0 -0
- /package/dist/observability/{codex-protocol.d.ts → trace/adapters/codex/protocol.d.ts} +0 -0
- /package/dist/observability/{codex-protocol.js → trace/adapters/codex/protocol.js} +0 -0
- /package/dist/observability/{trace-session-index.d.ts → trace/session-index.d.ts} +0 -0
- /package/dist/observability/{trace-session-index.js → trace/session-index.js} +0 -0
- /package/dist/{util/safe-slice.d.ts → shared/json-safe-truncation.d.ts} +0 -0
- /package/dist/{util/safe-slice.js → shared/json-safe-truncation.js} +0 -0
- /package/dist/{renderer → studio/presentation}/doctor-detail-renderer.js +0 -0
- /package/dist/{renderer → studio/presentation}/icons.d.ts +0 -0
- /package/dist/{renderer → studio/presentation}/icons.js +0 -0
- /package/dist/{renderer → studio/presentation}/inline-markdown.d.ts +0 -0
- /package/dist/{renderer → studio/presentation}/inline-markdown.js +0 -0
- /package/dist/{renderer → studio/presentation}/observation-inbox/helpers.js +0 -0
- /package/dist/{renderer → studio/presentation}/observation-inbox/styles.d.ts +0 -0
- /package/dist/{renderer → studio/presentation}/observation-inbox/styles.js +0 -0
- /package/dist/{renderer → studio/presentation}/report-shell.js +0 -0
- /package/dist/{renderer → studio/presentation}/trajectory-evidence.js +0 -0
- /package/dist/{renderer → studio/presentation}/trajectory-routing.d.ts +0 -0
- /package/dist/{renderer → studio/presentation}/trajectory-routing.js +0 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { existsSync, readFileSync, } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { writeJsonFileAtomic } from '../../shared/atomic-json.js';
|
|
5
|
+
import { withFileLock } from '../../shared/file-lock.js';
|
|
6
|
+
import { normalizeRfc3339Timestamp } from '../../shared/timestamp.js';
|
|
7
|
+
import { resolveObservationsDir } from './paths.js';
|
|
8
|
+
export class ObservationReviewStateValidationError extends Error {
|
|
9
|
+
name = 'ObservationReviewStateValidationError';
|
|
10
|
+
}
|
|
11
|
+
export function observationReviewStateKey(targetType, targetId) {
|
|
12
|
+
return `${targetType}:${targetId}`;
|
|
13
|
+
}
|
|
14
|
+
export function observationMetricScopeFor(metricKey) {
|
|
15
|
+
return metricKey === 'user_correction'
|
|
16
|
+
|| metricKey === 'user_interruption'
|
|
17
|
+
|| metricKey === 'user_follow_up'
|
|
18
|
+
|| metricKey === 'hard_rule'
|
|
19
|
+
|| metricKey === 'user_goal_shift'
|
|
20
|
+
? 'skill_segment'
|
|
21
|
+
: 'message';
|
|
22
|
+
}
|
|
23
|
+
export function observationMetricAnnotationTargetId(ref, metricKey) {
|
|
24
|
+
const hasStableTraceRef = Boolean(ref.traceId
|
|
25
|
+
|| ref.sourceTrace
|
|
26
|
+
|| ref.sessionId
|
|
27
|
+
|| ref.messageIndex !== undefined
|
|
28
|
+
|| ref.messageUuid
|
|
29
|
+
|| ref.callInstanceId
|
|
30
|
+
|| ref.toolUseId);
|
|
31
|
+
const scope = observationMetricScopeFor(metricKey);
|
|
32
|
+
const stable = [
|
|
33
|
+
metricKey,
|
|
34
|
+
...(scope === 'skill_segment' ? [scope, ref.metricScopeId ?? ''] : []),
|
|
35
|
+
ref.traceId ?? '',
|
|
36
|
+
ref.sourceTrace ?? '',
|
|
37
|
+
ref.sessionId ?? '',
|
|
38
|
+
ref.messageIndex === undefined ? '' : String(ref.messageIndex),
|
|
39
|
+
ref.messageUuid ?? '',
|
|
40
|
+
ref.callInstanceId ?? '',
|
|
41
|
+
ref.toolUseId ?? '',
|
|
42
|
+
hasStableTraceRef ? '' : ref.id ?? '',
|
|
43
|
+
].join('\u0000');
|
|
44
|
+
return `metric:${metricKey}:${createHash('sha256').update(stable).digest('hex').slice(0, 16)}`;
|
|
45
|
+
}
|
|
46
|
+
export function observationMetricAnnotationVerdict(state, ref, metricKey) {
|
|
47
|
+
const entry = observationMetricAnnotationEntry(state, ref, metricKey);
|
|
48
|
+
return entry?.verdict === 'confirmed' || entry?.verdict === 'rejected'
|
|
49
|
+
? entry.verdict
|
|
50
|
+
: undefined;
|
|
51
|
+
}
|
|
52
|
+
export function observationMetricAnnotationEntry(state, ref, metricKey) {
|
|
53
|
+
if (!state)
|
|
54
|
+
return undefined;
|
|
55
|
+
const candidates = [
|
|
56
|
+
ref,
|
|
57
|
+
...(ref.callInstanceId ? [{ ...ref, callInstanceId: undefined }] : []),
|
|
58
|
+
...(ref.traceId ? [{ ...ref, traceId: undefined }] : []),
|
|
59
|
+
...(ref.traceId && ref.callInstanceId
|
|
60
|
+
? [{ ...ref, traceId: undefined, callInstanceId: undefined }]
|
|
61
|
+
: []),
|
|
62
|
+
];
|
|
63
|
+
const seen = new Set();
|
|
64
|
+
for (const candidate of candidates) {
|
|
65
|
+
const targetId = observationMetricAnnotationTargetId(candidate, metricKey);
|
|
66
|
+
if (seen.has(targetId))
|
|
67
|
+
continue;
|
|
68
|
+
seen.add(targetId);
|
|
69
|
+
const entry = state.entries[observationReviewStateKey('evidence_metric', targetId)];
|
|
70
|
+
if (entry)
|
|
71
|
+
return entry;
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
export function observationReviewStatePath(observationsDir) {
|
|
76
|
+
return join(observationsDir, 'review-state.json');
|
|
77
|
+
}
|
|
78
|
+
const OBSERVATION_REVIEW_STATE_SCHEMA_VERSION = 2;
|
|
79
|
+
export function emptyObservationReviewState(now = new Date().toISOString()) {
|
|
80
|
+
const updatedAt = normalizedTimestamp(now);
|
|
81
|
+
if (!updatedAt)
|
|
82
|
+
throw new ObservationReviewStateValidationError('invalid updatedAt');
|
|
83
|
+
return {
|
|
84
|
+
kind: 'observe-review-state',
|
|
85
|
+
schemaVersion: OBSERVATION_REVIEW_STATE_SCHEMA_VERSION,
|
|
86
|
+
updatedAt,
|
|
87
|
+
entries: {},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export function loadObservationReviewState(observationsDir) {
|
|
91
|
+
const path = observationReviewStatePath(resolveObservationsDir(observationsDir));
|
|
92
|
+
if (!existsSync(path))
|
|
93
|
+
return emptyObservationReviewState();
|
|
94
|
+
let parsed;
|
|
95
|
+
try {
|
|
96
|
+
parsed = JSON.parse(readFileSync(path, 'utf-8'));
|
|
97
|
+
}
|
|
98
|
+
catch (cause) {
|
|
99
|
+
throw new Error(`无法读取观测复核状态:${path}`, { cause });
|
|
100
|
+
}
|
|
101
|
+
const normalized = normalizeObservationReviewState(parsed);
|
|
102
|
+
if (!normalized)
|
|
103
|
+
throw new Error(`观测复核状态格式无效:${path}`);
|
|
104
|
+
return normalized;
|
|
105
|
+
}
|
|
106
|
+
export function updateObservationReviewState(observationsDir, update, now) {
|
|
107
|
+
assertReviewStateUpdate(update);
|
|
108
|
+
const path = observationReviewStatePath(observationsDir);
|
|
109
|
+
return withFileLock(`${path}.lock`, () => {
|
|
110
|
+
const reviewedAt = normalizedTimestamp(now ?? new Date().toISOString());
|
|
111
|
+
if (!reviewedAt) {
|
|
112
|
+
throw new ObservationReviewStateValidationError('invalid reviewedAt');
|
|
113
|
+
}
|
|
114
|
+
const hadPersistedState = existsSync(path);
|
|
115
|
+
const state = loadObservationReviewState(observationsDir);
|
|
116
|
+
if (hadPersistedState && reviewedAt < state.updatedAt) {
|
|
117
|
+
throw new ObservationReviewStateValidationError('reviewedAt cannot precede state updatedAt');
|
|
118
|
+
}
|
|
119
|
+
const key = observationReviewStateKey(update.targetType, update.targetId);
|
|
120
|
+
state.entries[key] = {
|
|
121
|
+
targetType: update.targetType,
|
|
122
|
+
targetId: update.targetId,
|
|
123
|
+
verdict: update.verdict,
|
|
124
|
+
reviewedAt,
|
|
125
|
+
...(update.note ? { note: update.note.slice(0, 500) } : {}),
|
|
126
|
+
...(update.reason ? { reason: update.reason.slice(0, 500) } : {}),
|
|
127
|
+
...(update.metricKey ? { metricKey: update.metricKey } : {}),
|
|
128
|
+
...(update.metricKey ? {
|
|
129
|
+
metricScope: update.metricScope ?? observationMetricScopeFor(update.metricKey),
|
|
130
|
+
} : {}),
|
|
131
|
+
...(update.metricScopeId ? { metricScopeId: update.metricScopeId.slice(0, 200) } : {}),
|
|
132
|
+
...(update.traceId ? { traceId: update.traceId } : {}),
|
|
133
|
+
...(update.sourceTrace ? { sourceTrace: update.sourceTrace } : {}),
|
|
134
|
+
...(update.sessionId ? { sessionId: update.sessionId } : {}),
|
|
135
|
+
...(update.messageIndex !== undefined ? { messageIndex: update.messageIndex } : {}),
|
|
136
|
+
...(update.messageUuid ? { messageUuid: update.messageUuid } : {}),
|
|
137
|
+
...(update.callInstanceId ? { callInstanceId: update.callInstanceId } : {}),
|
|
138
|
+
...(update.toolUseId ? { toolUseId: update.toolUseId } : {}),
|
|
139
|
+
...(update.snippet ? { snippet: update.snippet.slice(0, 500) } : {}),
|
|
140
|
+
};
|
|
141
|
+
state.updatedAt = reviewedAt;
|
|
142
|
+
writeObservationReviewState(observationsDir, state);
|
|
143
|
+
return state;
|
|
144
|
+
}, { label: 'observation review state' });
|
|
145
|
+
}
|
|
146
|
+
function normalizeObservationReviewState(value) {
|
|
147
|
+
if (!value || typeof value !== 'object')
|
|
148
|
+
return null;
|
|
149
|
+
const parsed = value;
|
|
150
|
+
const kind = parsed.kind === 'observe-review-state' ? parsed.kind : null;
|
|
151
|
+
if (!kind)
|
|
152
|
+
return null;
|
|
153
|
+
if (parsed.schemaVersion !== OBSERVATION_REVIEW_STATE_SCHEMA_VERSION)
|
|
154
|
+
return null;
|
|
155
|
+
if (!parsed.entries || typeof parsed.entries !== 'object' || Array.isArray(parsed.entries))
|
|
156
|
+
return null;
|
|
157
|
+
const updatedAt = normalizedTimestamp(parsed.updatedAt);
|
|
158
|
+
if (!updatedAt)
|
|
159
|
+
return null;
|
|
160
|
+
const entries = {};
|
|
161
|
+
for (const [key, rawEntry] of Object.entries(parsed.entries)) {
|
|
162
|
+
const entry = normalizeReviewStateEntry(rawEntry);
|
|
163
|
+
if (!entry || key !== observationReviewStateKey(entry.targetType, entry.targetId))
|
|
164
|
+
return null;
|
|
165
|
+
entries[key] = entry;
|
|
166
|
+
}
|
|
167
|
+
if (Object.values(entries).some((entry) => entry.reviewedAt > updatedAt))
|
|
168
|
+
return null;
|
|
169
|
+
return {
|
|
170
|
+
kind: 'observe-review-state',
|
|
171
|
+
schemaVersion: OBSERVATION_REVIEW_STATE_SCHEMA_VERSION,
|
|
172
|
+
updatedAt,
|
|
173
|
+
entries,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
export function deleteObservationReviewState(observationsDir, targetType, targetId, now) {
|
|
177
|
+
if (!isReviewTargetType(targetType))
|
|
178
|
+
throw new ObservationReviewStateValidationError('invalid review targetType');
|
|
179
|
+
if (typeof targetId !== 'string' || targetId.trim() === '')
|
|
180
|
+
throw new ObservationReviewStateValidationError('invalid review targetId');
|
|
181
|
+
const path = observationReviewStatePath(observationsDir);
|
|
182
|
+
return withFileLock(`${path}.lock`, () => {
|
|
183
|
+
const updatedAt = normalizedTimestamp(now ?? new Date().toISOString());
|
|
184
|
+
if (!updatedAt) {
|
|
185
|
+
throw new ObservationReviewStateValidationError('invalid updatedAt');
|
|
186
|
+
}
|
|
187
|
+
const hadPersistedState = existsSync(path);
|
|
188
|
+
const state = loadObservationReviewState(observationsDir);
|
|
189
|
+
if (hadPersistedState && updatedAt < state.updatedAt) {
|
|
190
|
+
throw new ObservationReviewStateValidationError('updatedAt cannot precede state updatedAt');
|
|
191
|
+
}
|
|
192
|
+
const key = observationReviewStateKey(targetType, targetId);
|
|
193
|
+
delete state.entries[key];
|
|
194
|
+
state.updatedAt = updatedAt;
|
|
195
|
+
writeObservationReviewState(observationsDir, state);
|
|
196
|
+
return state;
|
|
197
|
+
}, { label: 'observation review state' });
|
|
198
|
+
}
|
|
199
|
+
function assertReviewStateUpdate(value) {
|
|
200
|
+
if (!isReviewTargetType(value.targetType))
|
|
201
|
+
throw new ObservationReviewStateValidationError('invalid review targetType');
|
|
202
|
+
if (typeof value.targetId !== 'string' || value.targetId.trim() === '')
|
|
203
|
+
throw new ObservationReviewStateValidationError('invalid review targetId');
|
|
204
|
+
if (!isReviewVerdict(value.verdict))
|
|
205
|
+
throw new ObservationReviewStateValidationError('invalid review verdict');
|
|
206
|
+
const optionalStrings = [
|
|
207
|
+
value.note,
|
|
208
|
+
value.reason,
|
|
209
|
+
value.metricScopeId,
|
|
210
|
+
value.traceId,
|
|
211
|
+
value.sourceTrace,
|
|
212
|
+
value.sessionId,
|
|
213
|
+
value.messageUuid,
|
|
214
|
+
value.callInstanceId,
|
|
215
|
+
value.toolUseId,
|
|
216
|
+
value.snippet,
|
|
217
|
+
];
|
|
218
|
+
if (!optionalStrings.every(optionalString))
|
|
219
|
+
throw new ObservationReviewStateValidationError('invalid review metadata');
|
|
220
|
+
if (value.messageIndex !== undefined
|
|
221
|
+
&& (!Number.isSafeInteger(value.messageIndex) || value.messageIndex < 0))
|
|
222
|
+
throw new ObservationReviewStateValidationError('invalid messageIndex');
|
|
223
|
+
if (value.targetType === 'evidence_metric') {
|
|
224
|
+
if (!isObservationMetricKey(value.metricKey))
|
|
225
|
+
throw new ObservationReviewStateValidationError('invalid metricKey');
|
|
226
|
+
if (value.verdict !== 'confirmed' && value.verdict !== 'rejected') {
|
|
227
|
+
throw new ObservationReviewStateValidationError('evidence_metric requires confirmed or rejected verdict');
|
|
228
|
+
}
|
|
229
|
+
const expectedScope = observationMetricScopeFor(value.metricKey);
|
|
230
|
+
if (value.metricScope !== undefined && value.metricScope !== expectedScope) {
|
|
231
|
+
throw new ObservationReviewStateValidationError('metricScope does not match metricKey');
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
if (value.verdict === 'confirmed' || value.verdict === 'rejected') {
|
|
236
|
+
throw new ObservationReviewStateValidationError('metric verdict requires evidence_metric targetType');
|
|
237
|
+
}
|
|
238
|
+
if (value.metricKey !== undefined || value.metricScope !== undefined || value.metricScopeId !== undefined) {
|
|
239
|
+
throw new ObservationReviewStateValidationError('metric metadata requires evidence_metric targetType');
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
function normalizeReviewStateEntry(value) {
|
|
244
|
+
if (!value || typeof value !== 'object')
|
|
245
|
+
return null;
|
|
246
|
+
const entry = value;
|
|
247
|
+
const reviewedAt = normalizedTimestamp(entry.reviewedAt);
|
|
248
|
+
if (!isReviewTargetType(entry.targetType)
|
|
249
|
+
|| typeof entry.targetId !== 'string'
|
|
250
|
+
|| entry.targetId.trim() === ''
|
|
251
|
+
|| !isReviewVerdict(entry.verdict)
|
|
252
|
+
|| !reviewedAt
|
|
253
|
+
|| !optionalString(entry.note)
|
|
254
|
+
|| !optionalString(entry.reason)
|
|
255
|
+
|| !optionalString(entry.metricScopeId)
|
|
256
|
+
|| !optionalString(entry.traceId)
|
|
257
|
+
|| !optionalString(entry.sourceTrace)
|
|
258
|
+
|| !optionalString(entry.sessionId)
|
|
259
|
+
|| !optionalString(entry.messageUuid)
|
|
260
|
+
|| !optionalString(entry.callInstanceId)
|
|
261
|
+
|| !optionalString(entry.toolUseId)
|
|
262
|
+
|| !optionalString(entry.snippet)
|
|
263
|
+
|| (entry.messageIndex !== undefined
|
|
264
|
+
&& (!Number.isSafeInteger(entry.messageIndex) || entry.messageIndex < 0))
|
|
265
|
+
|| (entry.metricKey !== undefined && !isObservationMetricKey(entry.metricKey))
|
|
266
|
+
|| (entry.metricScope !== undefined && !isObservationMetricScope(entry.metricScope)))
|
|
267
|
+
return null;
|
|
268
|
+
if (entry.targetType === 'evidence_metric') {
|
|
269
|
+
if (!isObservationMetricKey(entry.metricKey)
|
|
270
|
+
|| (entry.verdict !== 'confirmed' && entry.verdict !== 'rejected'))
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
else if (entry.verdict === 'confirmed'
|
|
274
|
+
|| entry.verdict === 'rejected'
|
|
275
|
+
|| entry.metricKey !== undefined
|
|
276
|
+
|| entry.metricScope !== undefined
|
|
277
|
+
|| entry.metricScopeId !== undefined) {
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
const metricScope = entry.metricKey
|
|
281
|
+
? entry.metricScope ?? observationMetricScopeFor(entry.metricKey)
|
|
282
|
+
: undefined;
|
|
283
|
+
if (entry.metricKey
|
|
284
|
+
&& metricScope !== observationMetricScopeFor(entry.metricKey))
|
|
285
|
+
return null;
|
|
286
|
+
return {
|
|
287
|
+
targetType: entry.targetType,
|
|
288
|
+
targetId: entry.targetId,
|
|
289
|
+
verdict: entry.verdict,
|
|
290
|
+
reviewedAt,
|
|
291
|
+
...(entry.note !== undefined ? { note: entry.note } : {}),
|
|
292
|
+
...(entry.reason !== undefined ? { reason: entry.reason } : {}),
|
|
293
|
+
...(entry.metricKey !== undefined ? { metricKey: entry.metricKey, metricScope } : {}),
|
|
294
|
+
...(entry.metricScopeId !== undefined ? { metricScopeId: entry.metricScopeId } : {}),
|
|
295
|
+
...(entry.traceId !== undefined ? { traceId: entry.traceId } : {}),
|
|
296
|
+
...(entry.sourceTrace !== undefined ? { sourceTrace: entry.sourceTrace } : {}),
|
|
297
|
+
...(entry.sessionId !== undefined ? { sessionId: entry.sessionId } : {}),
|
|
298
|
+
...(entry.messageIndex !== undefined ? { messageIndex: entry.messageIndex } : {}),
|
|
299
|
+
...(entry.messageUuid !== undefined ? { messageUuid: entry.messageUuid } : {}),
|
|
300
|
+
...(entry.callInstanceId !== undefined ? { callInstanceId: entry.callInstanceId } : {}),
|
|
301
|
+
...(entry.toolUseId !== undefined ? { toolUseId: entry.toolUseId } : {}),
|
|
302
|
+
...(entry.snippet !== undefined ? { snippet: entry.snippet } : {}),
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function normalizedTimestamp(value) {
|
|
306
|
+
return normalizeRfc3339Timestamp(value) ?? null;
|
|
307
|
+
}
|
|
308
|
+
function optionalString(value) {
|
|
309
|
+
return value === undefined || typeof value === 'string';
|
|
310
|
+
}
|
|
311
|
+
function writeObservationReviewState(observationsDir, state) {
|
|
312
|
+
const path = observationReviewStatePath(observationsDir);
|
|
313
|
+
writeJsonFileAtomic(path, state);
|
|
314
|
+
}
|
|
315
|
+
function isReviewTargetType(value) {
|
|
316
|
+
return value === 'experience_session'
|
|
317
|
+
|| value === 'inbox_item'
|
|
318
|
+
|| value === 'skill'
|
|
319
|
+
|| value === 'goal_slice_correction'
|
|
320
|
+
|| value === 'evidence_metric'
|
|
321
|
+
|| value === 'reviewer_judgment'
|
|
322
|
+
|| value === 'soft_standard'
|
|
323
|
+
|| value === 'goal_keyword_correction'
|
|
324
|
+
|| value === 'result_artifact_correction'
|
|
325
|
+
|| value === 'completion_result_correction'
|
|
326
|
+
|| value === 'deliverable_artifact_correction'
|
|
327
|
+
|| value === 'skill_relevance_correction'
|
|
328
|
+
|| value === 'workflow_completion_correction'
|
|
329
|
+
|| value === 'hardrule_execution_correction'
|
|
330
|
+
|| value === 'main_tool_execution_correction';
|
|
331
|
+
}
|
|
332
|
+
function isReviewVerdict(value) {
|
|
333
|
+
return value === 'reviewed' || value === 'real_issue' || value === 'not_issue' || value === 'needs_more_context' || value === 'confirmed' || value === 'rejected';
|
|
334
|
+
}
|
|
335
|
+
function isObservationMetricScope(value) {
|
|
336
|
+
return value === 'message' || value === 'skill_segment';
|
|
337
|
+
}
|
|
338
|
+
function isObservationMetricKey(value) {
|
|
339
|
+
return value === 'user_correction'
|
|
340
|
+
|| value === 'user_interruption'
|
|
341
|
+
|| value === 'user_follow_up'
|
|
342
|
+
|| value === 'negative_feedback'
|
|
343
|
+
|| value === 'positive_feedback'
|
|
344
|
+
|| value === 'hard_rule'
|
|
345
|
+
|| value === 'user_goal_shift'
|
|
346
|
+
|| value === 'result_artifact'
|
|
347
|
+
|| value === 'completion_result'
|
|
348
|
+
|| value === 'deliverable_artifact'
|
|
349
|
+
|| value === 'progress_update'
|
|
350
|
+
|| value === 'self_correction'
|
|
351
|
+
|| value === 'repeated_execution';
|
|
352
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ObservationInboxReport, ObservationSourceRecord, ObservationSourceRecordArchiveRef, ObservationSourceRecordArchiveView } from '../contracts/inbox.js';
|
|
2
|
+
/**
|
|
3
|
+
* Persist bounded source records in the observation archive. Absolute source
|
|
4
|
+
* paths are consumed only during trusted ingest; Studio later reads relative
|
|
5
|
+
* sidecars rooted in that archive.
|
|
6
|
+
*/
|
|
7
|
+
export declare function writeObservationSourceRecordArchives(report: ObservationInboxReport, outDir: string, reportPath: string): ObservationSourceRecordArchiveRef[];
|
|
8
|
+
export declare function loadObservationSourceRecordArchive(ref: ObservationSourceRecordArchiveRef | undefined, observationsDir: string): ObservationSourceRecordArchiveView;
|
|
9
|
+
/**
|
|
10
|
+
* Build the page-safe archive metadata without reading the potentially large
|
|
11
|
+
* sidecar. The source-record endpoint resolves the same ref on demand.
|
|
12
|
+
*/
|
|
13
|
+
export declare function summarizeObservationSourceRecordArchive(ref: ObservationSourceRecordArchiveRef | undefined): ObservationSourceRecordArchiveView;
|
|
14
|
+
export declare function observationSourceRecordFromLine(line: string, sourceIndex: number, traceId: string, sourceTrace: string): ObservationSourceRecord;
|