oh-my-knowledge 1.0.0-beta.8 → 1.0.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 +27 -75
- package/README.zh.md +27 -75
- package/dist/assets/agent-skills/omk/SKILL.md +114 -55
- package/dist/assets/agent-skills/omk/references/commands.md +505 -135
- package/dist/assets/agent-skills/omk/references/knowledge-maintenance.md +33 -0
- package/dist/assets/agent-skills/omk/references/knowledge-reuse.md +69 -0
- package/dist/cli/commands/agents.d.ts +21 -0
- package/dist/cli/commands/agents.js +251 -0
- package/dist/cli/commands/doctor.d.ts +1 -1
- package/dist/cli/commands/doctor.js +17 -11
- package/dist/cli/commands/eval/gold/compare.d.ts +1 -1
- package/dist/cli/commands/eval/gold/compare.js +1 -1
- package/dist/cli/commands/eval/gold/index.d.ts +1 -1
- package/dist/cli/commands/eval/gold/init.d.ts +1 -1
- package/dist/cli/commands/eval/gold/validate.d.ts +1 -1
- package/dist/cli/commands/eval/index.d.ts +1 -2
- package/dist/cli/commands/eval/index.js +4 -26
- package/dist/cli/commands/eval/task.d.ts +13 -0
- package/dist/cli/commands/eval/task.js +42 -0
- package/dist/cli/commands/evolve.d.ts +1 -1
- package/dist/cli/commands/evolve.js +6 -44
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/init.js +57 -18
- package/dist/cli/commands/install.d.ts +2 -2
- package/dist/cli/commands/install.js +50 -132
- package/dist/cli/commands/know/extract.d.ts +34 -0
- package/dist/cli/commands/know/extract.js +285 -0
- package/dist/cli/commands/know/index.d.ts +8 -0
- package/dist/cli/commands/know/index.js +16 -0
- package/dist/cli/commands/know/list.d.ts +10 -0
- package/dist/cli/commands/know/list.js +10 -0
- package/dist/cli/commands/know/migrate.d.ts +23 -0
- package/dist/cli/commands/know/migrate.js +131 -0
- package/dist/cli/commands/know/retrieve.d.ts +20 -0
- package/dist/cli/commands/know/retrieve.js +38 -0
- package/dist/cli/commands/know/review.d.ts +24 -0
- package/dist/cli/commands/know/review.js +98 -0
- package/dist/cli/commands/know/revise.d.ts +21 -0
- package/dist/cli/commands/know/revise.js +63 -0
- package/dist/cli/commands/know/runs.d.ts +28 -0
- package/dist/cli/commands/know/runs.js +115 -0
- package/dist/cli/commands/know/show.d.ts +24 -0
- package/dist/cli/commands/know/show.js +68 -0
- package/dist/cli/commands/know/sources.d.ts +20 -0
- package/dist/cli/commands/know/sources.js +98 -0
- package/dist/cli/commands/observe/entity-links.d.ts +37 -0
- package/dist/cli/commands/observe/entity-links.js +240 -0
- package/dist/cli/commands/observe/inbox.d.ts +1 -1
- package/dist/cli/commands/observe/inbox.js +11 -9
- package/dist/cli/commands/observe/index.d.ts +2 -3
- package/dist/cli/commands/observe/index.js +9 -71
- package/dist/cli/commands/observe/ingest.d.ts +2 -2
- package/dist/cli/commands/observe/ingest.js +12 -9
- package/dist/cli/commands/observe/show.d.ts +1 -1
- package/dist/cli/commands/observe/show.js +3 -3
- package/dist/cli/commands/sample.d.ts +1 -1
- package/dist/cli/commands/sample.js +6 -6
- package/dist/cli/commands/studio.d.ts +4 -1
- package/dist/cli/commands/studio.js +72 -48
- package/dist/cli/index.js +4 -5
- package/dist/cli/lib/cell-format.d.ts +1 -5
- package/dist/cli/lib/cell-format.js +1 -5
- package/dist/cli/lib/codex-model-hint.js +5 -14
- package/dist/cli/lib/core-report-service.js +6 -5
- package/dist/cli/lib/entity-link-output.d.ts +450 -0
- package/dist/cli/lib/entity-link-output.js +79 -0
- package/dist/cli/lib/eval-output.js +0 -5
- package/dist/cli/lib/generation-failure-hint.js +0 -21
- package/dist/cli/lib/i18n-dict/common.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/common.js +12 -8
- package/dist/cli/lib/i18n-dict/evolve.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/evolve.js +2 -6
- package/dist/cli/lib/i18n-dict/gen.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/gen.js +8 -20
- package/dist/cli/lib/i18n-dict/init.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/init.js +6 -0
- package/dist/cli/lib/i18n-dict/install.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/install.js +4 -20
- package/dist/cli/lib/i18n-dict/run.d.ts +1 -1
- package/dist/cli/lib/i18n-dict/run.js +4 -24
- package/dist/cli/lib/i18n-dict.d.ts +1 -4
- package/dist/cli/lib/i18n-dict.js +0 -6
- package/dist/cli/lib/i18n.d.ts +6 -3
- package/dist/cli/lib/i18n.js +18 -10
- package/dist/cli/lib/know-command.d.ts +60 -0
- package/dist/cli/lib/know-command.js +198 -0
- package/dist/cli/lib/knowledge-output.d.ts +4 -0
- package/dist/cli/lib/knowledge-output.js +39 -0
- package/dist/cli/lib/knowledge-review-actor.d.ts +3 -0
- package/dist/cli/lib/knowledge-review-actor.js +8 -0
- package/dist/cli/lib/prepare-evaluation.js +2 -2
- package/dist/cli/lib/progress.d.ts +1 -1
- package/dist/cli/lib/resolve-skill-input.d.ts +0 -1
- package/dist/cli/lib/run-core-evaluation.js +1 -13
- package/dist/cli/lib/runtime-defaults.d.ts +2 -6
- package/dist/cli/lib/runtime-defaults.js +15 -49
- package/dist/cli/lib/update-check.js +1 -1
- package/dist/cli/oclif/base-command.d.ts +6 -2
- package/dist/cli/oclif/base-command.js +32 -7
- package/dist/cli/oclif/i18n.d.ts +5 -2
- package/dist/cli/oclif/i18n.js +10 -5
- package/dist/cli/oclif/run.js +2 -1
- package/dist/cli/runtime/entity-capture.d.ts +10 -0
- package/dist/cli/runtime/entity-capture.js +15 -0
- package/dist/cli/templates/init-samples.d.ts +2 -1
- package/dist/cli/templates/init-samples.js +115 -43
- package/dist/dsh-plugin/cleanup.d.ts +3 -0
- package/dist/dsh-plugin/cleanup.js +22 -0
- package/dist/dsh-plugin/core-adapter.d.ts +2 -0
- package/dist/dsh-plugin/core-adapter.js +42 -48
- package/dist/dsh-plugin/core-command.js +2 -9
- package/dist/dsh-plugin/core-protocol.d.ts +1 -1
- package/dist/dsh-plugin/core-protocol.js +1 -1
- package/dist/dsh-plugin/host-executor.js +65 -50
- package/dist/dsh-plugin/index.js +52 -23
- package/dist/dsh-plugin/observe.d.ts +2 -2
- package/dist/dsh-plugin/observe.js +3 -3
- package/dist/dsh-plugin/protocol.js +2 -2
- package/dist/dsh-plugin/resources.d.ts +86 -0
- package/dist/dsh-plugin/resources.js +392 -0
- package/dist/dsh-plugin/trace-adapter.d.ts +2 -2
- package/dist/dsh-plugin/trace-adapter.js +4 -7
- package/dist/eval-core/analysis/bootstrap-kernel.d.ts +19 -0
- package/dist/eval-core/analysis/bootstrap-kernel.js +55 -0
- package/dist/eval-core/analysis/bootstrap.d.ts +158 -0
- package/dist/eval-core/analysis/bootstrap.js +205 -0
- package/dist/eval-core/analysis/builtin-aggregation.d.ts +28 -0
- package/dist/eval-core/analysis/builtin-aggregation.js +131 -0
- package/dist/eval-core/analysis/builtin-bootstrap.d.ts +16 -0
- package/dist/eval-core/analysis/builtin-bootstrap.js +447 -0
- package/dist/eval-core/analysis/builtin-composite.d.ts +25 -0
- package/dist/eval-core/analysis/builtin-composite.js +211 -0
- package/dist/eval-core/analysis/builtin-decisions.d.ts +38 -0
- package/dist/eval-core/analysis/builtin-decisions.js +177 -0
- package/dist/eval-core/analysis/builtin-hypothesis.d.ts +41 -0
- package/dist/eval-core/analysis/builtin-hypothesis.js +155 -0
- package/dist/eval-core/analysis/builtin-identity.d.ts +32 -0
- package/dist/eval-core/analysis/builtin-identity.js +134 -0
- package/dist/eval-core/analysis/builtin-primitives.d.ts +32 -0
- package/dist/eval-core/analysis/builtin-primitives.js +158 -0
- package/dist/eval-core/analysis/builtin-registry.d.ts +2 -0
- package/dist/eval-core/analysis/builtin-registry.js +235 -0
- package/dist/eval-core/analysis/builtin-schemas.d.ts +297 -0
- package/dist/eval-core/analysis/builtin-schemas.js +308 -0
- package/dist/eval-core/analysis/builtin-validation.d.ts +23 -0
- package/dist/eval-core/analysis/builtin-validation.js +74 -0
- package/dist/eval-core/analysis/builtins.d.ts +5 -60
- package/dist/eval-core/analysis/builtins.js +17 -1974
- package/dist/eval-core/analysis/decision.js +10 -9
- package/dist/eval-core/analysis/runtime.js +10 -35
- package/dist/eval-core/budget/index.js +5 -42
- package/dist/eval-core/compiler/index.d.ts +1 -3
- package/dist/eval-core/compiler/index.js +8 -895
- package/dist/eval-core/compiler/preparation/capabilities.d.ts +8 -0
- package/dist/eval-core/compiler/preparation/capabilities.js +175 -0
- package/dist/eval-core/compiler/preparation/definition.d.ts +5 -0
- package/dist/eval-core/compiler/preparation/definition.js +105 -0
- package/dist/eval-core/compiler/preparation/extensions.d.ts +11 -0
- package/dist/eval-core/compiler/preparation/extensions.js +74 -0
- package/dist/eval-core/compiler/preparation/runtimes.d.ts +7 -0
- package/dist/eval-core/compiler/preparation/runtimes.js +433 -0
- package/dist/eval-core/compiler/preparation/schemas.d.ts +9 -0
- package/dist/eval-core/compiler/preparation/schemas.js +122 -0
- package/dist/eval-core/compiler/types.d.ts +1 -1
- package/dist/eval-core/compiler/validation/analysis.d.ts +8 -0
- package/dist/eval-core/compiler/validation/analysis.js +304 -0
- package/dist/eval-core/compiler/validation/bindings.d.ts +4 -0
- package/dist/eval-core/compiler/validation/bindings.js +110 -0
- package/dist/eval-core/compiler/validation/policy.d.ts +2 -0
- package/dist/eval-core/compiler/validation/policy.js +56 -0
- package/dist/eval-core/compiler/validation/sampling.d.ts +2 -0
- package/dist/eval-core/compiler/validation/sampling.js +140 -0
- package/dist/eval-core/compiler/validation/shared.d.ts +3 -0
- package/dist/eval-core/compiler/validation/shared.js +19 -0
- package/dist/eval-core/compiler/validation.d.ts +2 -6
- package/dist/eval-core/compiler/validation.js +12 -621
- package/dist/eval-core/contracts/analysis-bundle.d.ts +17 -13
- package/dist/eval-core/contracts/analysis-bundle.js +0 -563
- package/dist/eval-core/contracts/analysis-input-matching.js +2 -2
- package/dist/eval-core/contracts/artifacts.js +2 -2
- package/dist/eval-core/contracts/budget.d.ts +18 -0
- package/dist/eval-core/contracts/budget.js +93 -83
- package/dist/eval-core/contracts/common.js +1 -1
- package/dist/eval-core/contracts/comparability.d.ts +15 -7
- package/dist/eval-core/contracts/comparability.js +11 -816
- package/dist/eval-core/contracts/definition.d.ts +10 -0
- package/dist/eval-core/contracts/definition.js +8 -2
- package/dist/eval-core/contracts/digests.d.ts +2 -2
- package/dist/eval-core/contracts/digests.js +8 -31
- package/dist/eval-core/contracts/evaluation-bundle.d.ts +13 -31
- package/dist/eval-core/contracts/evaluation-bundle.js +0 -843
- package/dist/eval-core/contracts/evaluation-identities.js +2 -2
- package/dist/eval-core/contracts/evaluation-report.d.ts +3 -17
- package/dist/eval-core/contracts/evaluation-report.js +2 -202
- package/dist/eval-core/contracts/execution-bundle.d.ts +6 -36
- package/dist/eval-core/contracts/execution-bundle.js +0 -649
- package/dist/eval-core/contracts/execution-controls.js +1 -3
- package/dist/eval-core/contracts/execution-facts.d.ts +2 -7
- package/dist/eval-core/contracts/execution-facts.js +1 -1
- package/dist/eval-core/contracts/execution-identities.d.ts +1 -1
- package/dist/eval-core/contracts/execution-identities.js +9 -31
- package/dist/eval-core/contracts/json-schema.d.ts +4 -1
- package/dist/eval-core/contracts/json-schema.js +10 -1
- package/dist/eval-core/contracts/json.js +3 -2
- package/dist/eval-core/contracts/plans.d.ts +5 -0
- package/dist/eval-core/contracts/runtime-capabilities.js +1 -1
- package/dist/eval-core/contracts/schemas/v1/measurement-policy.schema.json +8 -0
- package/dist/eval-core/contracts/schemas/v5/run-plan.schema.json +8 -0
- package/dist/eval-core/contracts/sealed-run-plan.d.ts +2 -2
- package/dist/eval-core/contracts/sealed-run-plan.js +1 -1
- package/dist/eval-core/contracts/series.d.ts +14 -24
- package/dist/eval-core/contracts/series.js +11 -387
- package/dist/eval-core/engine/index.js +6 -3
- package/dist/eval-core/evaluation/bundle.d.ts +4 -0
- package/dist/eval-core/evaluation/bundle.js +96 -0
- package/dist/eval-core/evaluation/coordinate.d.ts +34 -0
- package/dist/eval-core/evaluation/coordinate.js +776 -0
- package/dist/eval-core/evaluation/preparation.d.ts +6 -0
- package/dist/eval-core/evaluation/preparation.js +74 -0
- package/dist/eval-core/evaluation/runtime-state.d.ts +34 -0
- package/dist/eval-core/evaluation/runtime.js +73 -1009
- package/dist/eval-core/evaluation/types.d.ts +1 -1
- package/dist/eval-core/evaluation/types.js +1 -0
- package/dist/eval-core/execution/bundle.d.ts +4 -0
- package/dist/eval-core/execution/bundle.js +90 -0
- package/dist/eval-core/execution/coordinate.d.ts +27 -0
- package/dist/eval-core/execution/coordinate.js +669 -0
- package/dist/eval-core/execution/preparation.d.ts +4 -0
- package/dist/eval-core/execution/preparation.js +104 -0
- package/dist/eval-core/execution/runtime-state.d.ts +40 -0
- package/dist/eval-core/execution/runtime.js +20 -930
- package/dist/eval-core/execution/scheduler.js +1 -7
- package/dist/eval-core/index.d.ts +6 -5
- package/dist/eval-core/index.js +3 -2
- package/dist/eval-core/primitives/budget-outcome.d.ts +11 -0
- package/dist/eval-core/primitives/budget-outcome.js +8 -0
- package/dist/eval-core/primitives/graph.d.ts +2 -0
- package/dist/eval-core/primitives/graph.js +17 -0
- package/dist/eval-core/primitives/json-pointer.d.ts +12 -0
- package/dist/eval-core/primitives/json-pointer.js +31 -0
- package/dist/eval-core/primitives/ordering.d.ts +2 -0
- package/dist/eval-core/primitives/ordering.js +8 -0
- package/dist/eval-core/primitives/provenance.d.ts +11 -0
- package/dist/eval-core/primitives/provenance.js +19 -0
- package/dist/eval-core/runtime/abort.d.ts +2 -0
- package/dist/eval-core/runtime/abort.js +12 -0
- package/dist/eval-core/runtime/clock.d.ts +2 -0
- package/dist/eval-core/runtime/clock.js +4 -0
- package/dist/eval-core/runtime/event-stream.d.ts +1 -0
- package/dist/eval-core/runtime/event-stream.js +1 -0
- package/dist/eval-core/runtime/run-resources.d.ts +12 -0
- package/dist/eval-core/runtime/run-resources.js +39 -0
- package/dist/eval-core/schemas.js +2 -16
- package/dist/eval-core/series/runtime.js +21 -38
- package/dist/eval-core/verify/analysis-bundle.d.ts +13 -0
- package/dist/eval-core/verify/analysis-bundle.js +553 -0
- package/dist/eval-core/verify/comparability.d.ts +4 -0
- package/dist/eval-core/verify/comparability.js +804 -0
- package/dist/eval-core/verify/evaluation-bundle.d.ts +28 -0
- package/dist/eval-core/verify/evaluation-bundle.js +813 -0
- package/dist/eval-core/verify/evaluation-report.d.ts +18 -0
- package/dist/eval-core/verify/evaluation-report.js +201 -0
- package/dist/eval-core/verify/execution-bundle.d.ts +33 -0
- package/dist/eval-core/verify/execution-bundle.js +635 -0
- package/dist/eval-core/verify/index.d.ts +6 -0
- package/dist/eval-core/verify/index.js +6 -0
- package/dist/eval-core/verify/series.d.ts +24 -0
- package/dist/eval-core/verify/series.js +373 -0
- package/dist/eval-runtime/adapters/command-executor.d.ts +1 -1
- package/dist/eval-runtime/adapters/command-executor.js +1 -1
- package/dist/eval-runtime/adapters/json-executor.d.ts +3 -4
- package/dist/eval-runtime/adapters/json-executor.js +122 -222
- package/dist/eval-runtime/adapters/resource-lease.d.ts +56 -0
- package/dist/eval-runtime/adapters/resource-lease.js +107 -0
- package/dist/eval-runtime/builders/custom-evaluator.d.ts +49 -0
- package/dist/eval-runtime/builders/custom-evaluator.js +67 -0
- package/dist/eval-runtime/builders/paired-comparison.js +2 -2
- package/dist/eval-runtime/builders/policy.d.ts +19 -1
- package/dist/eval-runtime/builders/policy.js +11 -0
- package/dist/eval-runtime/builders/rubric-evaluator.d.ts +7 -0
- package/dist/eval-runtime/builders/rubric-evaluator.js +46 -0
- package/dist/eval-runtime/conformance/cache.d.ts +1 -1
- package/dist/eval-runtime/conformance/cache.js +15 -8
- package/dist/eval-runtime/conformance/content-store.d.ts +1 -1
- package/dist/eval-runtime/conformance/evaluator.d.ts +3 -3
- package/dist/eval-runtime/conformance/evaluator.js +28 -17
- package/dist/eval-runtime/conformance/executor.js +2 -2
- package/dist/eval-runtime/conformance/judge.js +5 -6
- package/dist/eval-runtime/conformance/runtime.d.ts +1 -1
- package/dist/eval-runtime/conformance/runtime.js +1 -1
- package/dist/eval-runtime/conformance/workspace-provider.d.ts +1 -1
- package/dist/eval-runtime/conformance/workspace-provider.js +1 -1
- package/dist/eval-runtime/content/executed-store.d.ts +48 -0
- package/dist/eval-runtime/content/executed-store.js +257 -0
- package/dist/eval-runtime/content/infrastructure.d.ts +51 -0
- package/dist/eval-runtime/content/infrastructure.js +89 -0
- package/dist/eval-runtime/content/result-store.d.ts +45 -0
- package/dist/eval-runtime/content/result-store.js +249 -0
- package/dist/eval-runtime/custom-evaluator.d.ts +14 -7
- package/dist/eval-runtime/custom-evaluator.js +173 -96
- package/dist/eval-runtime/debug/evaluator.d.ts +26 -0
- package/dist/eval-runtime/debug/evaluator.js +65 -0
- package/dist/eval-runtime/debug/rubric.d.ts +29 -0
- package/dist/eval-runtime/debug/rubric.js +92 -0
- package/dist/eval-runtime/evaluate.d.ts +2 -2
- package/dist/eval-runtime/evaluate.js +1 -1
- package/dist/eval-runtime/evaluation/capture-evaluators.d.ts +1 -1
- package/dist/eval-runtime/evaluation/capture-evaluators.js +29 -119
- package/dist/eval-runtime/evaluation/capture-input.d.ts +4 -4
- package/dist/eval-runtime/evaluation/capture-input.js +4 -4
- package/dist/eval-runtime/evaluation/capture-judge.d.ts +39 -0
- package/dist/eval-runtime/evaluation/capture-judge.js +45 -0
- package/dist/eval-runtime/evaluation/conformance.js +1 -1
- package/dist/eval-runtime/evaluation/contracts.d.ts +13 -9
- package/dist/eval-runtime/evaluation/definition.js +8 -8
- package/dist/eval-runtime/evaluation/errors.d.ts +9 -1
- package/dist/eval-runtime/evaluation/errors.js +7 -1
- package/dist/eval-runtime/evaluation/prepare.js +9 -6
- package/dist/eval-runtime/evaluation/result-state.d.ts +2 -2
- package/dist/eval-runtime/evaluation/result-state.js +1 -1
- package/dist/eval-runtime/evaluation/reuse.d.ts +2 -2
- package/dist/eval-runtime/evaluation/reuse.js +13 -8
- package/dist/eval-runtime/evaluation/rubric-declaration.d.ts +17 -0
- package/dist/eval-runtime/evaluation/rubric-declaration.js +118 -0
- package/dist/eval-runtime/evaluation/schemas.d.ts +15 -0
- package/dist/eval-runtime/evaluation/stage-session.js +1 -2
- package/dist/eval-runtime/evaluators/exact-match.d.ts +2 -0
- package/dist/eval-runtime/evaluators/exact-match.js +3 -2
- package/dist/eval-runtime/evaluators/formula.d.ts +28 -0
- package/dist/eval-runtime/evaluators/formula.js +208 -0
- package/dist/eval-runtime/execution/assembly.d.ts +35 -0
- package/dist/eval-runtime/execution/assembly.js +111 -0
- package/dist/eval-runtime/execution/clock.d.ts +3 -0
- package/dist/eval-runtime/execution/controls.d.ts +6 -0
- package/dist/eval-runtime/execution/controls.js +55 -0
- package/dist/eval-runtime/execution/lifecycle.d.ts +60 -0
- package/dist/eval-runtime/execution/lifecycle.js +183 -0
- package/dist/eval-runtime/execution/provider.d.ts +39 -0
- package/dist/eval-runtime/execution/provider.js +13 -0
- package/dist/eval-runtime/execution/run.d.ts +47 -0
- package/dist/eval-runtime/execution/run.js +116 -0
- package/dist/eval-runtime/index.d.ts +57 -12
- package/dist/eval-runtime/index.js +28 -3
- package/dist/eval-runtime/judges/rubric-contracts.d.ts +6 -5
- package/dist/eval-runtime/judges/rubric-contracts.js +25 -19
- package/dist/eval-runtime/judges/rubric-judge.d.ts +6 -5
- package/dist/eval-runtime/judges/rubric-judge.js +47 -62
- package/dist/eval-runtime/judges/rubric-kit.d.ts +6 -5
- package/dist/eval-runtime/judges/rubric-kit.js +9 -18
- package/dist/eval-runtime/judges/rubric-prompt.d.ts +2 -1
- package/dist/eval-runtime/judges/rubric-prompt.js +10 -12
- package/dist/eval-runtime/judges/rubric-readings.d.ts +13 -0
- package/dist/eval-runtime/judges/rubric-readings.js +44 -0
- package/dist/eval-runtime/resources/mcp-config.d.ts +48 -0
- package/dist/eval-runtime/resources/mcp-config.js +91 -0
- package/dist/eval-runtime/resources/mock-interception.d.ts +65 -0
- package/dist/eval-runtime/resources/mock-interception.js +110 -0
- package/dist/eval-runtime/resources/tool-policy.js +67 -0
- package/dist/eval-runtime/resources/workspace.d.ts +49 -0
- package/dist/eval-runtime/resources/workspace.js +85 -0
- package/dist/eval-runtime/series.js +3 -2
- package/dist/eval-runtime/traces/source-neutral.js +1 -1
- package/dist/eval-workflows/artifact-store/node-run-store.js +20 -15
- package/dist/eval-workflows/artifact-store/overlay-store.js +12 -10
- package/dist/eval-workflows/artifact-store/run-id.js +19 -0
- package/dist/eval-workflows/gold/dataset.js +15 -1
- package/dist/eval-workflows/gold/human.js +1 -1
- package/dist/eval-workflows/hosts/adapters/codex/cli.d.ts +1 -1
- package/dist/eval-workflows/hosts/adapters/codex/cli.js +19 -22
- package/dist/eval-workflows/hosts/adapters/codex/environment.d.ts +1 -2
- package/dist/eval-workflows/hosts/adapters/codex/environment.js +1 -1
- package/dist/eval-workflows/hosts/adapters/codex/reference-evaluator.d.ts +7 -0
- package/dist/eval-workflows/hosts/adapters/codex/reference-evaluator.js +48 -0
- package/dist/eval-workflows/hosts/adapters/codex/reference-executor.d.ts +24 -4
- package/dist/eval-workflows/hosts/adapters/codex/reference-executor.js +83 -56
- package/dist/eval-workflows/hosts/adapters/codex/reference-model.d.ts +3 -0
- package/dist/eval-workflows/hosts/adapters/codex/reference-model.js +37 -0
- package/dist/eval-workflows/hosts/adapters/codex/resources.js +3 -2
- package/dist/eval-workflows/hosts/adapters/codex/sdk-runtime.js +6 -32
- package/dist/eval-workflows/hosts/adapters/codex/sdk.d.ts +1 -1
- package/dist/eval-workflows/hosts/adapters/codex/sdk.js +19 -22
- package/dist/eval-workflows/hosts/adapters/custom/executor.d.ts +240 -0
- package/dist/eval-workflows/hosts/adapters/custom/executor.js +828 -0
- package/dist/eval-workflows/hosts/adapters/openai/api.js +18 -12
- package/dist/eval-workflows/hosts/adapters/openai/input.d.ts +7 -0
- package/dist/eval-workflows/hosts/adapters/openai/input.js +19 -0
- package/dist/eval-workflows/hosts/adapters/openai/protocol.d.ts +1 -1
- package/dist/eval-workflows/hosts/adapters/openai/protocol.js +1 -1
- package/dist/eval-workflows/hosts/adapters/shared/api-protocol-core.js +6 -3
- package/dist/eval-workflows/hosts/adapters/shared/classified-environment.js +2 -1
- package/dist/eval-workflows/hosts/adapters/shared/content-identity.d.ts +12 -0
- package/dist/eval-workflows/hosts/adapters/shared/content-identity.js +38 -3
- package/dist/eval-workflows/hosts/adapters/shared/sample-input.d.ts +18 -0
- package/dist/eval-workflows/hosts/adapters/shared/sample-input.js +40 -0
- package/dist/eval-workflows/hosts/adapters/shared/stateless-api-resources.d.ts +8 -2
- package/dist/eval-workflows/hosts/adapters/shared/stateless-api-resources.js +25 -5
- package/dist/eval-workflows/hosts/adapters/shared/trial-lifecycle.d.ts +44 -0
- package/dist/eval-workflows/hosts/adapters/shared/trial-lifecycle.js +41 -0
- package/dist/eval-workflows/hosts/application.d.ts +4 -10
- package/dist/eval-workflows/hosts/application.js +4 -19
- package/dist/eval-workflows/hosts/carrier-measurement.d.ts +18 -0
- package/dist/eval-workflows/hosts/carrier-measurement.js +249 -0
- package/dist/eval-workflows/hosts/composition/assembly.js +1 -3
- package/dist/eval-workflows/hosts/composition/builtins.js +22 -0
- package/dist/eval-workflows/hosts/composition/evolution-evaluation.js +0 -1
- package/dist/eval-workflows/hosts/composition/judge-provider-identity.d.ts +2 -1
- package/dist/eval-workflows/hosts/composition/judge-provider-identity.js +8 -2
- package/dist/eval-workflows/hosts/composition/node-preflight.js +2 -2
- package/dist/eval-workflows/hosts/composition/node-runtime.d.ts +1 -1
- package/dist/eval-workflows/hosts/composition/node-runtime.js +23 -39
- package/dist/eval-workflows/hosts/composition/preflight.js +1 -3
- package/dist/eval-workflows/hosts/composition/registered-runtime.d.ts +1 -1
- package/dist/eval-workflows/hosts/composition/runtime-registry.d.ts +5 -17
- package/dist/eval-workflows/hosts/composition/runtime-registry.js +9 -24
- package/dist/eval-workflows/hosts/composition/runtime.d.ts +3 -3
- package/dist/eval-workflows/hosts/composition/runtime.js +5 -4
- package/dist/eval-workflows/hosts/input-resolution/content-materialization.d.ts +27 -0
- package/dist/eval-workflows/hosts/input-resolution/content-materialization.js +85 -0
- package/dist/eval-workflows/hosts/input-resolution/node-cli-evaluation-resolver.js +45 -754
- package/dist/eval-workflows/hosts/input-resolution/resolution-artifacts.d.ts +21 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-artifacts.js +187 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-execution.d.ts +16 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-execution.js +201 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-resources.d.ts +29 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-resources.js +193 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-samples.d.ts +22 -0
- package/dist/eval-workflows/hosts/input-resolution/resolution-samples.js +130 -0
- package/dist/eval-workflows/hosts/local-task/acceptance.d.ts +13 -0
- package/dist/eval-workflows/hosts/local-task/acceptance.js +101 -0
- package/dist/eval-workflows/hosts/local-task/application.d.ts +99 -0
- package/dist/eval-workflows/hosts/local-task/application.js +177 -0
- package/dist/eval-workflows/hosts/local-task/diagnostics.d.ts +27 -0
- package/dist/eval-workflows/hosts/local-task/diagnostics.js +30 -0
- package/dist/eval-workflows/hosts/local-task/executor.d.ts +19 -0
- package/dist/eval-workflows/hosts/local-task/executor.js +135 -0
- package/dist/eval-workflows/hosts/local-task/files.d.ts +15 -0
- package/dist/eval-workflows/hosts/local-task/files.js +88 -0
- package/dist/eval-workflows/hosts/local-task/workspace.d.ts +6 -0
- package/dist/eval-workflows/hosts/local-task/workspace.js +32 -0
- package/dist/eval-workflows/hosts/node-environment.d.ts +3 -0
- package/dist/eval-workflows/hosts/node-environment.js +94 -0
- package/dist/eval-workflows/hosts/reference-executors.d.ts +1 -0
- package/dist/eval-workflows/hosts/reference-executors.js +1 -0
- package/dist/eval-workflows/hosts/resource-leases/access.js +1 -3
- package/dist/eval-workflows/hosts/resource-leases/node.js +1 -3
- package/dist/eval-workflows/hosts/resource-leases/types.d.ts +1 -1
- package/dist/eval-workflows/hosts/resource-leases/types.js +1 -1
- package/dist/eval-workflows/input-compilation/compile/binding.d.ts +3 -0
- package/dist/eval-workflows/input-compilation/compile/binding.js +190 -0
- package/dist/eval-workflows/input-compilation/compile/definition.d.ts +3 -0
- package/dist/eval-workflows/input-compilation/compile/definition.js +280 -0
- package/dist/eval-workflows/input-compilation/compile/policy.d.ts +4 -0
- package/dist/eval-workflows/input-compilation/compile/policy.js +155 -0
- package/dist/eval-workflows/input-compilation/compile/resources.d.ts +7 -0
- package/dist/eval-workflows/input-compilation/compile/resources.js +346 -0
- package/dist/eval-workflows/input-compilation/compile/values.d.ts +5 -0
- package/dist/eval-workflows/input-compilation/compile/values.js +95 -0
- package/dist/eval-workflows/input-compilation/compile.js +9 -1058
- package/dist/eval-workflows/input-compilation/parse.js +0 -6
- package/dist/eval-workflows/input-compilation/registry.d.ts +1 -1
- package/dist/eval-workflows/input-compilation/registry.js +0 -3
- package/dist/eval-workflows/input-compilation/types.d.ts +3 -4
- package/dist/eval-workflows/input-compilation/types.js +2 -2
- package/dist/eval-workflows/inputs/append-samples.js +2 -1
- package/dist/eval-workflows/inputs/contracts/config-schema.js +4 -4
- package/dist/eval-workflows/inputs/contracts/local-task-evidence.d.ts +46 -0
- package/dist/eval-workflows/inputs/contracts/local-task-evidence.js +26 -0
- package/dist/eval-workflows/inputs/contracts/local-task.d.ts +50 -0
- package/dist/eval-workflows/inputs/contracts/local-task.js +33 -0
- package/dist/eval-workflows/inputs/contracts/sample-input.d.ts +35 -0
- package/dist/eval-workflows/inputs/contracts/sample.d.ts +35 -6
- package/dist/eval-workflows/inputs/contracts/schemas/v3/eval-sample-set.schema.json +1021 -0
- package/dist/eval-workflows/inputs/contracts/variant.d.ts +1 -1
- package/dist/eval-workflows/inputs/eval-samples.d.ts +3 -6
- package/dist/eval-workflows/inputs/eval-samples.js +2 -12
- package/dist/eval-workflows/inputs/load-samples.d.ts +1 -1
- package/dist/eval-workflows/inputs/load-samples.js +10 -8
- package/dist/eval-workflows/inputs/rubric-contract.d.ts +1 -1
- package/dist/eval-workflows/inputs/rubric-contract.js +1 -1
- package/dist/eval-workflows/inputs/sample-contract.js +21 -5
- package/dist/eval-workflows/inputs/sample-document.js +7 -2
- package/dist/eval-workflows/inputs/sample-mapping.d.ts +4 -0
- package/dist/eval-workflows/inputs/sample-mapping.js +26 -0
- package/dist/eval-workflows/inputs/schemas/error.d.ts +5 -0
- package/dist/eval-workflows/inputs/schemas/error.js +12 -0
- package/dist/eval-workflows/inputs/schemas/json-schema.js +8 -2
- package/dist/eval-workflows/inputs/schemas/sample-input.d.ts +6 -0
- package/dist/eval-workflows/inputs/schemas/sample-input.js +102 -0
- package/dist/eval-workflows/inputs/schemas/sample-set.d.ts +7 -4
- package/dist/eval-workflows/inputs/schemas/sample-set.js +69 -9
- package/dist/eval-workflows/instruments/contracts/config.d.ts +1 -1
- package/dist/eval-workflows/instruments/prompts/judge-prompts.d.ts +1 -1
- package/dist/eval-workflows/instruments/prompts/judge-prompts.js +7 -1
- package/dist/eval-workflows/measurement/analysis/agreement-source-pairs.js +3 -26
- package/dist/eval-workflows/measurement/analysis/agreement-table.js +1 -1
- package/dist/eval-workflows/measurement/analysis/analysis-support.d.ts +0 -1
- package/dist/eval-workflows/measurement/analysis/analysis-support.js +0 -3
- package/dist/eval-workflows/measurement/analysis/assertion-layer-node.d.ts +1 -1
- package/dist/eval-workflows/measurement/analysis/assertion-layer-node.js +13 -9
- package/dist/eval-workflows/measurement/analysis/assertion-layer-parameters.d.ts +2 -0
- package/dist/eval-workflows/measurement/analysis/assertion-layer-parameters.js +14 -4
- package/dist/eval-workflows/measurement/analysis/assertion-layer.d.ts +2 -2
- package/dist/eval-workflows/measurement/analysis/assertion-layer.js +20 -7
- package/dist/eval-workflows/measurement/analysis/bootstrap-family-parameters.js +3 -2
- package/dist/eval-workflows/measurement/analysis/bootstrap-family-table-v2.d.ts +1 -1
- package/dist/eval-workflows/measurement/analysis/bootstrap-family-table-v2.js +1 -1
- package/dist/eval-workflows/measurement/analysis/bootstrap-family-table.js +3 -2
- package/dist/eval-workflows/measurement/analysis/composite-node-contract.d.ts +1 -0
- package/dist/eval-workflows/measurement/analysis/composite-node-contract.js +2 -1
- package/dist/eval-workflows/measurement/analysis/composite-table.js +2 -1
- package/dist/eval-workflows/measurement/analysis/dimension-node.js +2 -1
- package/dist/eval-workflows/measurement/analysis/dimension-parameters.js +2 -1
- package/dist/eval-workflows/measurement/analysis/dimension-table-v1.js +2 -1
- package/dist/eval-workflows/measurement/analysis/dimension-table.js +2 -1
- package/dist/eval-workflows/measurement/analysis/judge-aggregation.js +2 -1
- package/dist/eval-workflows/measurement/analysis/release-decision-parameters.js +2 -1
- package/dist/eval-workflows/measurement/analysis/release-decision.js +2 -1
- package/dist/eval-workflows/orchestration/artifact-graph-persistence.js +3 -2
- package/dist/eval-workflows/orchestration/evaluation-service.d.ts +2 -0
- package/dist/eval-workflows/orchestration/evaluation-service.js +9 -5
- package/dist/eval-workflows/orchestration/measurement-design.js +86 -32
- package/dist/eval-workflows/orchestration/orchestration.d.ts +2 -2
- package/dist/eval-workflows/orchestration/orchestration.js +6 -1
- package/dist/eval-workflows/orchestration/sample-content-resolution.d.ts +1 -1
- package/dist/eval-workflows/orchestration/sample-content-resolution.js +12 -18
- package/dist/eval-workflows/orchestration/workflow.d.ts +5 -5
- package/dist/eval-workflows/orchestration/workflow.js +6 -6
- package/dist/eval-workflows/projections/artifact-graph.d.ts +1 -1
- package/dist/eval-workflows/projections/artifact-graph.js +1 -1
- package/dist/eval-workflows/projections/carrier-measurement.d.ts +72 -0
- package/dist/eval-workflows/projections/contracts.d.ts +1 -47
- package/dist/eval-workflows/projections/contracts.js +0 -1
- package/dist/eval-workflows/projections/diagnostic.js +4 -6
- package/dist/eval-workflows/projections/evolution.js +2 -1
- package/dist/eval-workflows/projections/index.d.ts +0 -1
- package/dist/eval-workflows/projections/index.js +0 -1
- package/dist/eval-workflows/projections/local-task.d.ts +23 -0
- package/dist/eval-workflows/projections/local-task.js +25 -0
- package/dist/eval-workflows/resume-disposition/contracts.d.ts +80 -0
- package/dist/eval-workflows/resume-disposition/contracts.js +22 -0
- package/dist/eval-workflows/resume-disposition/disposition.d.ts +8 -0
- package/dist/eval-workflows/resume-disposition/disposition.js +176 -0
- package/dist/eval-workflows/resume-disposition/index.d.ts +2 -0
- package/dist/eval-workflows/resume-disposition/index.js +2 -0
- package/dist/eval-workflows/sample-generation/generator.d.ts +1 -1
- package/dist/eval-workflows/sample-generation/generator.js +53 -44
- package/dist/eval-workflows/sample-generation/skill-samples.js +2 -2
- package/dist/eval-workflows/sample-generation/trace-drafts.d.ts +2 -2
- package/dist/eval-workflows/sample-generation/trace-drafts.js +6 -6
- package/dist/executors/archive.d.ts +3 -0
- package/dist/executors/archive.js +18 -0
- package/dist/executors/contracts/archive.d.ts +23 -0
- package/dist/executors/contracts/mock.d.ts +1 -2
- package/dist/executors/contracts/openai-chat.d.ts +3 -0
- package/dist/executors/contracts/openai-chat.js +16 -0
- package/dist/executors/contracts/ports.d.ts +17 -31
- package/dist/executors/contracts/result.d.ts +11 -0
- package/dist/executors/contracts/token-budget.d.ts +25 -0
- package/dist/executors/contracts/token-budget.js +29 -0
- package/dist/executors/contracts/tool-call-status.d.ts +8 -0
- package/dist/executors/contracts/tool-call-status.js +71 -0
- package/dist/executors/contracts/tool-identity.d.ts +21 -0
- package/dist/executors/contracts/trace-source-kind.d.ts +4 -0
- package/dist/executors/contracts/trace-source-kind.js +5 -0
- package/dist/executors/contracts/trace-source-schema.d.ts +1 -0
- package/dist/executors/contracts/trace-source-schema.js +1 -0
- package/dist/executors/contracts/trace.d.ts +9 -0
- package/dist/executors/core/capabilities.d.ts +5 -1
- package/dist/executors/core/capabilities.js +30 -3
- package/dist/executors/core/diagnostics.d.ts +2 -0
- package/dist/executors/core/diagnostics.js +13 -0
- package/dist/executors/core/http.d.ts +6 -0
- package/dist/executors/core/http.js +46 -1
- package/dist/executors/core/optional-dependencies.js +1 -5
- package/dist/executors/core/registry.d.ts +8 -56
- package/dist/executors/core/registry.js +3 -45
- package/dist/executors/core/runtime-fingerprint.js +0 -27
- package/dist/executors/core/runtime.d.ts +1 -1
- package/dist/executors/core/runtime.js +2 -5
- package/dist/executors/core/subprocess.d.ts +2 -2
- package/dist/executors/core/subprocess.js +36 -16
- package/dist/executors/index.d.ts +7 -4
- package/dist/executors/index.js +13 -19
- package/dist/executors/mock-runtime/runtime.d.ts +5 -85
- package/dist/executors/mock-runtime/runtime.js +77 -335
- package/dist/executors/openai/api.d.ts +4 -1
- package/dist/executors/openai/api.js +115 -82
- package/dist/executors/openai/archive.d.ts +10 -0
- package/dist/executors/openai/archive.js +70 -0
- package/dist/executors/openai/codex/archive.d.ts +8 -0
- package/dist/executors/openai/codex/archive.js +231 -0
- package/dist/executors/openai/codex/cli-arguments.d.ts +1 -0
- package/dist/executors/openai/codex/cli-arguments.js +1 -0
- package/dist/executors/openai/codex/cli.d.ts +4 -6
- package/dist/executors/openai/codex/cli.js +77 -42
- package/dist/executors/openai/codex/config.d.ts +16 -0
- package/dist/executors/openai/codex/config.js +37 -0
- package/dist/executors/openai/codex/protocol.d.ts +4 -1
- package/dist/executors/openai/codex/protocol.js +12 -4
- package/dist/executors/openai/codex/sdk.d.ts +4 -6
- package/dist/executors/openai/codex/sdk.js +12 -9
- package/dist/executors/openai/codex/trace.js +2 -4
- package/dist/executors/openai/request.d.ts +14 -0
- package/dist/executors/openai/request.js +8 -0
- package/dist/executors/result-validation.js +21 -3
- package/dist/executors/script/index.d.ts +1 -1
- package/dist/executors/script/index.js +14 -17
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/knowledge/adapters/association-migration.d.ts +41 -0
- package/dist/knowledge/adapters/association-migration.js +205 -0
- package/dist/knowledge/adapters/association-store.d.ts +21 -0
- package/dist/knowledge/adapters/association-store.js +111 -0
- package/dist/knowledge/adapters/body-digest.d.ts +5 -0
- package/dist/knowledge/adapters/body-digest.js +20 -0
- package/dist/knowledge/adapters/conversation-source.d.ts +30 -0
- package/dist/knowledge/adapters/conversation-source.js +82 -0
- package/dist/knowledge/adapters/durable-publication.d.ts +6 -0
- package/dist/knowledge/adapters/durable-publication.js +118 -0
- package/dist/knowledge/adapters/entity-link-api-producer.d.ts +31 -0
- package/dist/knowledge/adapters/entity-link-api-producer.js +27 -0
- package/dist/knowledge/adapters/entity-link-executor.d.ts +51 -0
- package/dist/knowledge/adapters/entity-link-executor.js +70 -0
- package/dist/knowledge/adapters/entity-link-store.d.ts +20 -0
- package/dist/knowledge/adapters/entity-link-store.js +131 -0
- package/dist/knowledge/adapters/entity-store.d.ts +14 -0
- package/dist/knowledge/adapters/entity-store.js +94 -0
- package/dist/knowledge/adapters/generation-executor.d.ts +14 -0
- package/dist/knowledge/adapters/generation-executor.js +65 -0
- package/dist/knowledge/adapters/generation-host.d.ts +11 -0
- package/dist/knowledge/adapters/generation-host.js +36 -0
- package/dist/knowledge/adapters/generation-journal-store.d.ts +25 -0
- package/dist/knowledge/adapters/generation-journal-store.js +470 -0
- package/dist/knowledge/adapters/knowledge-migration.d.ts +65 -0
- package/dist/knowledge/adapters/knowledge-migration.js +258 -0
- package/dist/knowledge/adapters/knowledge-store.d.ts +16 -0
- package/dist/knowledge/adapters/knowledge-store.js +88 -0
- package/dist/knowledge/adapters/knowledge-tags.d.ts +13 -0
- package/dist/knowledge/adapters/knowledge-tags.js +70 -0
- package/dist/knowledge/adapters/library-store.d.ts +14 -0
- package/dist/knowledge/adapters/library-store.js +95 -0
- package/dist/knowledge/adapters/project-source-reader.d.ts +36 -0
- package/dist/knowledge/adapters/project-source-reader.js +269 -0
- package/dist/knowledge/adapters/relation-store.d.ts +17 -0
- package/dist/knowledge/adapters/relation-store.js +164 -0
- package/dist/knowledge/adapters/review-store.d.ts +16 -0
- package/dist/knowledge/adapters/review-store.js +89 -0
- package/dist/knowledge/adapters/run-store.d.ts +45 -0
- package/dist/knowledge/adapters/run-store.js +684 -0
- package/dist/knowledge/adapters/source-migration.d.ts +102 -0
- package/dist/knowledge/adapters/source-migration.js +774 -0
- package/dist/knowledge/adapters/source-review-original.d.ts +8 -0
- package/dist/knowledge/adapters/source-review-original.js +24 -0
- package/dist/knowledge/adapters/source-review-store.d.ts +16 -0
- package/dist/knowledge/adapters/source-review-store.js +134 -0
- package/dist/knowledge/adapters/source-store.d.ts +29 -0
- package/dist/knowledge/adapters/source-store.js +348 -0
- package/dist/knowledge/adapters/source-workspace.d.ts +2 -0
- package/dist/knowledge/adapters/source-workspace.js +15 -0
- package/dist/knowledge/adapters/storage-state.d.ts +1 -0
- package/dist/knowledge/adapters/storage-state.js +9 -0
- package/dist/knowledge/adapters/trace-evidence.d.ts +14 -0
- package/dist/knowledge/adapters/trace-evidence.js +174 -0
- package/dist/knowledge/adapters/trace-source-reader.d.ts +55 -0
- package/dist/knowledge/adapters/trace-source-reader.js +252 -0
- package/dist/knowledge/adapters/workflow-migration.d.ts +70 -0
- package/dist/knowledge/adapters/workflow-migration.js +444 -0
- package/dist/knowledge/adapters/workspace-guard.d.ts +44 -0
- package/dist/knowledge/adapters/workspace-guard.js +230 -0
- package/dist/knowledge/application/application.d.ts +10349 -0
- package/dist/knowledge/application/application.js +198 -0
- package/dist/knowledge/application/auto-extraction.d.ts +43 -0
- package/dist/knowledge/application/auto-extraction.js +51 -0
- package/dist/knowledge/application/body-generation.d.ts +5403 -0
- package/dist/knowledge/application/body-generation.js +624 -0
- package/dist/knowledge/application/entity-catalog.d.ts +86 -0
- package/dist/knowledge/application/entity-catalog.js +25 -0
- package/dist/knowledge/application/entity-link-source.d.ts +585 -0
- package/dist/knowledge/application/entity-link-source.js +27 -0
- package/dist/knowledge/application/entity-links.d.ts +3567 -0
- package/dist/knowledge/application/entity-links.js +422 -0
- package/dist/knowledge/application/graph.d.ts +184 -0
- package/dist/knowledge/application/graph.js +364 -0
- package/dist/knowledge/application/library.d.ts +520 -0
- package/dist/knowledge/application/library.js +258 -0
- package/dist/knowledge/application/local-source-host.d.ts +51 -0
- package/dist/knowledge/application/local-source-host.js +99 -0
- package/dist/knowledge/application/local-source-updates.d.ts +4 -0
- package/dist/knowledge/application/local-source-updates.js +197 -0
- package/dist/knowledge/application/local.d.ts +202 -0
- package/dist/knowledge/application/local.js +159 -0
- package/dist/knowledge/application/operations.d.ts +788 -0
- package/dist/knowledge/application/operations.js +157 -0
- package/dist/knowledge/application/read-context.d.ts +2508 -0
- package/dist/knowledge/application/read-context.js +294 -0
- package/dist/knowledge/application/relation-operations.d.ts +702 -0
- package/dist/knowledge/application/relation-operations.js +45 -0
- package/dist/knowledge/application/relations.d.ts +743 -0
- package/dist/knowledge/application/relations.js +142 -0
- package/dist/knowledge/application/retrieval-text.d.ts +5 -0
- package/dist/knowledge/application/retrieval-text.js +45 -0
- package/dist/knowledge/application/retrieval.d.ts +108 -0
- package/dist/knowledge/application/retrieval.js +195 -0
- package/dist/knowledge/application/review-operations.d.ts +650 -0
- package/dist/knowledge/application/review-operations.js +33 -0
- package/dist/knowledge/application/review.d.ts +394 -0
- package/dist/knowledge/application/review.js +114 -0
- package/dist/knowledge/application/source-capture.d.ts +355 -0
- package/dist/knowledge/application/source-capture.js +261 -0
- package/dist/knowledge/application/source-evidence-search.d.ts +37 -0
- package/dist/knowledge/application/source-evidence-search.js +129 -0
- package/dist/knowledge/application/source-review.d.ts +886 -0
- package/dist/knowledge/application/source-review.js +135 -0
- package/dist/knowledge/application/source-summary.d.ts +130 -0
- package/dist/knowledge/application/source-summary.js +11 -0
- package/dist/knowledge/application/source-updates.d.ts +583 -0
- package/dist/knowledge/application/source-updates.js +208 -0
- package/dist/knowledge/artifacts/authoring/application.d.ts +125 -0
- package/dist/knowledge/artifacts/authoring/application.js +83 -0
- package/dist/knowledge/artifacts/authoring/carrier-contracts.d.ts +98 -0
- package/dist/knowledge/artifacts/authoring/carrier-library.d.ts +19 -0
- package/dist/knowledge/artifacts/authoring/carrier-library.js +167 -0
- package/dist/knowledge/artifacts/authoring/core-evolver.d.ts +65 -0
- package/dist/knowledge/artifacts/authoring/core-evolver.js +313 -0
- package/dist/knowledge/artifacts/authoring/knowledge-content.d.ts +17 -0
- package/dist/knowledge/artifacts/authoring/knowledge-content.js +139 -0
- package/dist/knowledge/artifacts/authoring/knowledge-review.d.ts +9 -0
- package/dist/knowledge/artifacts/authoring/knowledge-review.js +39 -0
- package/dist/knowledge/artifacts/authoring/scaffold.js +109 -0
- package/dist/knowledge/artifacts/authoring/text-edits.d.ts +6 -0
- package/dist/knowledge/artifacts/authoring/text-edits.js +31 -0
- package/dist/knowledge/artifacts/doctor/contracts.d.ts +201 -0
- package/dist/knowledge/artifacts/doctor/endpoint-rule.js +382 -0
- package/dist/knowledge/artifacts/doctor/fixer.js +338 -0
- package/dist/knowledge/artifacts/doctor/graph.d.ts +22 -0
- package/dist/knowledge/artifacts/doctor/graph.js +570 -0
- package/dist/knowledge/artifacts/doctor/health/composer.d.ts +18 -0
- package/dist/knowledge/artifacts/doctor/health/composer.js +411 -0
- package/dist/knowledge/artifacts/doctor/index.js +277 -0
- package/dist/knowledge/artifacts/doctor/messages.d.ts +20 -0
- package/dist/knowledge/artifacts/doctor/messages.js +224 -0
- package/dist/knowledge/artifacts/doctor/persistence.js +126 -0
- package/dist/knowledge/artifacts/doctor/renderer.d.ts +17 -0
- package/dist/knowledge/artifacts/doctor/report-parser.js +103 -0
- package/dist/knowledge/artifacts/doctor/rules.d.ts +32 -0
- package/dist/knowledge/artifacts/doctor/rules.js +290 -0
- package/dist/knowledge/artifacts/sources/artifact-resolution.d.ts +180 -0
- package/dist/knowledge/artifacts/sources/artifact-resolution.js +804 -0
- package/dist/knowledge/artifacts/sources/content-hash.js +117 -0
- package/dist/knowledge/artifacts/sources/deploy-artifact.js +65 -0
- package/dist/knowledge/artifacts/sources/install-source.d.ts +27 -0
- package/dist/knowledge/artifacts/sources/install-source.js +116 -0
- package/dist/knowledge/artifacts/sources/materialize-copy.d.ts +37 -0
- package/dist/knowledge/artifacts/sources/materialize-copy.js +193 -0
- package/dist/knowledge/associations.d.ts +350 -0
- package/dist/knowledge/associations.js +160 -0
- package/dist/knowledge/contracts.d.ts +237 -0
- package/dist/knowledge/contracts.js +65 -0
- package/dist/knowledge/entities/association-references.d.ts +5 -0
- package/dist/knowledge/entities/association-references.js +17 -0
- package/dist/knowledge/entities/contracts.d.ts +331 -0
- package/dist/knowledge/entities/contracts.js +50 -0
- package/dist/knowledge/entities/history.d.ts +4 -0
- package/dist/knowledge/entities/history.js +63 -0
- package/dist/knowledge/entities/identity.d.ts +53 -0
- package/dist/knowledge/entities/identity.js +106 -0
- package/dist/knowledge/entities/link-invocation-state.d.ts +375 -0
- package/dist/knowledge/entities/link-invocation-state.js +316 -0
- package/dist/knowledge/entities/link-invocation.d.ts +2320 -0
- package/dist/knowledge/entities/link-invocation.js +113 -0
- package/dist/knowledge/entities/links.d.ts +72 -0
- package/dist/knowledge/entities/links.js +39 -0
- package/dist/knowledge/entities/validation.d.ts +10 -0
- package/dist/knowledge/entities/validation.js +72 -0
- package/dist/knowledge/entity-library/contracts.d.ts +161 -0
- package/dist/knowledge/entity-library/contracts.js +38 -0
- package/dist/knowledge/entity-library/history.d.ts +3 -0
- package/dist/knowledge/entity-library/history.js +51 -0
- package/dist/knowledge/entity-library/write-errors.d.ts +8 -0
- package/dist/knowledge/entity-library/write-errors.js +11 -0
- package/dist/knowledge/entity-linking/entity-link-hash.d.ts +3 -0
- package/dist/knowledge/entity-linking/entity-link-hash.js +4 -0
- package/dist/knowledge/entity-linking/entity-link-prompt.d.ts +21 -0
- package/dist/knowledge/entity-linking/entity-link-prompt.js +35 -0
- package/dist/knowledge/entity-linking/entity-link-quality.d.ts +111 -0
- package/dist/knowledge/entity-linking/entity-link-quality.js +139 -0
- package/dist/knowledge/extraction/association-catalog.d.ts +15 -0
- package/dist/knowledge/extraction/association-catalog.js +53 -0
- package/dist/knowledge/extraction/body-generation-wire.d.ts +177 -0
- package/dist/knowledge/extraction/body-generation-wire.js +250 -0
- package/dist/knowledge/extraction/entities.d.ts +66 -0
- package/dist/knowledge/extraction/entities.js +124 -0
- package/dist/knowledge/extraction/entity-only-prompt.d.ts +9 -0
- package/dist/knowledge/extraction/entity-only-prompt.js +50 -0
- package/dist/knowledge/extraction/evidence.d.ts +61 -0
- package/dist/knowledge/extraction/evidence.js +24 -0
- package/dist/knowledge/extraction/generation-journal.d.ts +1290 -0
- package/dist/knowledge/extraction/generation-journal.js +48 -0
- package/dist/knowledge/extraction/generation-policy.d.ts +108 -0
- package/dist/knowledge/extraction/generation-policy.js +58 -0
- package/dist/knowledge/extraction/generation.d.ts +74 -0
- package/dist/knowledge/extraction/generation.js +211 -0
- package/dist/knowledge/extraction/knowledge-semantic-policy.d.ts +15 -0
- package/dist/knowledge/extraction/knowledge-semantic-policy.js +31 -0
- package/dist/knowledge/extraction/long-body.d.ts +92 -0
- package/dist/knowledge/extraction/long-body.js +210 -0
- package/dist/knowledge/extraction/model-wire.d.ts +69 -0
- package/dist/knowledge/extraction/model-wire.js +248 -0
- package/dist/knowledge/extraction/native-outcome.d.ts +42 -0
- package/dist/knowledge/extraction/native-outcome.js +152 -0
- package/dist/knowledge/extraction/occurrence-guided-prompt.d.ts +9 -0
- package/dist/knowledge/extraction/occurrence-guided-prompt.js +20 -0
- package/dist/knowledge/extraction/prompt.d.ts +2 -0
- package/dist/knowledge/extraction/prompt.js +42 -0
- package/dist/knowledge/extraction/proposals.d.ts +24 -0
- package/dist/knowledge/extraction/proposals.js +24 -0
- package/dist/knowledge/extraction/quote-context.d.ts +11 -0
- package/dist/knowledge/extraction/quote-context.js +33 -0
- package/dist/knowledge/extraction/quote-occurrence.d.ts +9 -0
- package/dist/knowledge/extraction/quote-occurrence.js +31 -0
- package/dist/knowledge/extraction/run-sealing.d.ts +89 -0
- package/dist/knowledge/extraction/run-sealing.js +42 -0
- package/dist/knowledge/extraction/runs.d.ts +695 -0
- package/dist/knowledge/extraction/runs.js +268 -0
- package/dist/knowledge/extraction/source-input.d.ts +524 -0
- package/dist/knowledge/extraction/source-input.js +61 -0
- package/dist/knowledge/extraction/source-passages.d.ts +63 -0
- package/dist/knowledge/extraction/source-passages.js +94 -0
- package/dist/knowledge/extraction/source-review-input.d.ts +57 -0
- package/dist/knowledge/extraction/source-review-input.js +81 -0
- package/dist/knowledge/extraction/source-review-wire.d.ts +137 -0
- package/dist/knowledge/extraction/source-review-wire.js +248 -0
- package/dist/knowledge/extraction/strict-fewshot.d.ts +1032 -0
- package/dist/knowledge/extraction/strict-fewshot.js +1240 -0
- package/dist/knowledge/extraction/strict-prompt.d.ts +3 -0
- package/dist/knowledge/extraction/strict-prompt.js +18 -0
- package/dist/knowledge/extraction/window-proposals.d.ts +342 -0
- package/dist/knowledge/extraction/window-proposals.js +93 -0
- package/dist/knowledge/extraction/writing-draft.d.ts +6 -0
- package/dist/knowledge/extraction/writing-draft.js +37 -0
- package/dist/knowledge/history.d.ts +4 -0
- package/dist/knowledge/history.js +79 -0
- package/dist/knowledge/measurement/typed-contracts.d.ts +477 -0
- package/dist/knowledge/measurement/typed-contracts.js +88 -0
- package/dist/knowledge/measurement/typed-grounding.d.ts +40 -0
- package/dist/knowledge/measurement/typed-grounding.js +14 -0
- package/dist/knowledge/measurement/typed-quote-locator.d.ts +6 -0
- package/dist/knowledge/measurement/typed-quote-locator.js +8 -0
- package/dist/knowledge/measurement/typed-validation.d.ts +19 -0
- package/dist/knowledge/measurement/typed-validation.js +111 -0
- package/dist/knowledge/migration/associations-v1.d.ts +186 -0
- package/dist/knowledge/migration/associations-v1.js +34 -0
- package/dist/knowledge/migration/legacy-v2.d.ts +242 -0
- package/dist/knowledge/migration/legacy-v2.js +282 -0
- package/dist/knowledge/relations/relation-history.d.ts +96 -0
- package/dist/knowledge/relations/relation-history.js +95 -0
- package/dist/knowledge/relations/relations.d.ts +602 -0
- package/dist/knowledge/relations/relations.js +65 -0
- package/dist/knowledge/reviews/review-history.d.ts +8 -0
- package/dist/knowledge/reviews/review-history.js +86 -0
- package/dist/knowledge/reviews/reviews.d.ts +946 -0
- package/dist/knowledge/reviews/reviews.js +121 -0
- package/dist/knowledge/sources/source-review-history.d.ts +59 -0
- package/dist/knowledge/sources/source-review-history.js +283 -0
- package/dist/knowledge/sources/source-review.d.ts +1725 -0
- package/dist/knowledge/sources/source-review.js +94 -0
- package/dist/knowledge/sources/source-store.d.ts +24 -0
- package/dist/knowledge/sources/sources.d.ts +1882 -0
- package/dist/knowledge/sources/sources.js +278 -0
- package/dist/knowledge/store.d.ts +239 -0
- package/dist/knowledge/store.js +34 -0
- package/dist/knowledge/tags.d.ts +12 -0
- package/dist/knowledge/tags.js +6 -0
- package/dist/knowledge/validation.d.ts +19 -0
- package/dist/knowledge/validation.js +46 -0
- package/dist/mcp/capture-store.d.ts +3 -2
- package/dist/mcp/capture-store.js +7 -5
- package/dist/mcp/feedback-store.d.ts +2 -2
- package/dist/mcp/feedback-store.js +3 -3
- package/dist/mcp/http.js +65 -27
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/mcp-server.d.ts +5 -3
- package/dist/mcp/mcp-server.js +12 -28
- package/dist/mcp/review-component.d.ts +2 -1
- package/dist/mcp/review-component.js +39 -16
- package/dist/mcp/tool-copy.d.ts +25 -0
- package/dist/mcp/tool-copy.js +122 -0
- package/dist/observe/agents/collect.d.ts +105 -0
- package/dist/observe/agents/collect.js +686 -0
- package/dist/observe/agents/contracts.d.ts +369 -0
- package/dist/observe/agents/contracts.js +160 -0
- package/dist/observe/agents/detect.d.ts +39 -0
- package/dist/observe/agents/detect.js +144 -0
- package/dist/observe/agents/fs-ports.d.ts +44 -0
- package/dist/observe/agents/fs-ports.js +77 -0
- package/dist/observe/agents/index.d.ts +19 -0
- package/dist/observe/agents/index.js +13 -0
- package/dist/observe/agents/local-catalog.d.ts +40 -0
- package/dist/observe/agents/local-catalog.js +101 -0
- package/dist/observe/agents/registry.d.ts +31 -0
- package/dist/observe/agents/registry.js +187 -0
- package/dist/observe/agents/scan.d.ts +31 -0
- package/dist/observe/agents/scan.js +160 -0
- package/dist/observe/analysis/coverage-analyzer.js +258 -0
- package/dist/observe/analysis/gap-analyzer.d.ts +110 -0
- package/dist/observe/analysis/gap-analyzer.js +455 -0
- package/dist/observe/analysis/hedging-classifier.js +142 -0
- package/dist/observe/application.d.ts +15 -0
- package/dist/observe/application.js +11 -0
- package/dist/observe/contracts/experience-enums.d.ts +228 -0
- package/dist/observe/contracts/experience-enums.js +228 -0
- package/dist/observe/contracts/experience-evidence-schema.d.ts +33532 -0
- package/dist/observe/contracts/experience-evidence-schema.js +707 -0
- package/dist/observe/contracts/experience.d.ts +79 -0
- package/dist/observe/contracts/inbox.d.ts +181 -0
- package/dist/observe/contracts/skill-chain.d.ts +114 -0
- package/dist/observe/conversation/catalog.d.ts +57 -0
- package/dist/observe/conversation/catalog.js +614 -0
- package/dist/observe/conversation/polling-subscription-hub.js +167 -0
- package/dist/observe/conversation/project.d.ts +3 -0
- package/dist/observe/conversation/project.js +47 -0
- package/dist/observe/diagnosis/contracts/parser.js +181 -0
- package/dist/observe/diagnosis/lifecycle.js +31 -0
- package/dist/observe/diagnosis/observe-mapper.js +265 -0
- package/dist/observe/diagnosis/studio-projection.js +90 -0
- package/dist/observe/experience/primitives.d.ts +14 -0
- package/dist/observe/experience/primitives.js +86 -0
- package/dist/observe/experience/report-assembly.d.ts +33 -0
- package/dist/observe/experience/report-assembly.js +808 -0
- package/dist/observe/experience/report-derivations.js +283 -0
- package/dist/observe/experience/report-structure.d.ts +9 -0
- package/dist/observe/experience/session-story-episodes.d.ts +17 -0
- package/dist/observe/experience/session-story-episodes.js +242 -0
- package/dist/observe/experience/session-story-evidence.d.ts +11 -0
- package/dist/observe/experience/session-story-evidence.js +88 -0
- package/dist/observe/experience/session-story-feedback.d.ts +14 -0
- package/dist/observe/experience/session-story-feedback.js +330 -0
- package/dist/observe/experience/session-story-orchestration.d.ts +13 -0
- package/dist/observe/experience/session-story-orchestration.js +266 -0
- package/dist/observe/experience/session-story-segments.d.ts +8 -0
- package/dist/observe/experience/session-story-segments.js +128 -0
- package/dist/observe/experience/session-story.d.ts +11 -0
- package/dist/observe/experience/session-story.js +302 -0
- package/dist/observe/experience/text-signals.d.ts +6 -0
- package/dist/observe/experience/text-signals.js +29 -0
- package/dist/observe/experience/timeline.d.ts +28 -0
- package/dist/observe/experience/timeline.js +513 -0
- package/dist/observe/experience.d.ts +12 -0
- package/dist/observe/experience.js +7 -0
- package/dist/observe/inbox/diagnosis-producer.d.ts +8 -0
- package/dist/observe/inbox/diagnosis-producer.js +132 -0
- package/dist/observe/inbox/explicit-capture.js +223 -0
- package/dist/observe/inbox/feedback-matchers.d.ts +40 -0
- package/dist/observe/inbox/feedback-matchers.js +260 -0
- package/dist/observe/inbox/index.d.ts +14 -0
- package/dist/observe/inbox/index.js +7 -0
- package/dist/observe/inbox/metric-semantics.d.ts +8 -0
- package/dist/observe/inbox/metric-semantics.js +157 -0
- package/dist/observe/inbox/paths.d.ts +30 -0
- package/dist/observe/inbox/paths.js +87 -0
- package/dist/observe/inbox/problem-patterns.js +249 -0
- package/dist/observe/inbox/report-building.d.ts +18 -0
- package/dist/observe/inbox/report-building.js +595 -0
- package/dist/observe/inbox/report-presentation.d.ts +6 -0
- package/dist/observe/inbox/report-presentation.js +83 -0
- package/dist/observe/inbox/report-primitives.d.ts +17 -0
- package/dist/observe/inbox/report-primitives.js +88 -0
- package/dist/observe/inbox/report-store.d.ts +7 -0
- package/dist/observe/inbox/report-store.js +516 -0
- package/dist/observe/inbox/review-semantics.d.ts +46 -0
- package/dist/observe/inbox/review-semantics.js +67 -0
- package/dist/observe/inbox/review-state.d.ts +25 -0
- package/dist/observe/inbox/review-state.js +357 -0
- package/dist/observe/inbox/severity-reason.js +47 -0
- package/dist/observe/inbox/signal-semantics.d.ts +27 -0
- package/dist/observe/inbox/skill-chains.d.ts +20 -0
- package/dist/observe/inbox/skill-chains.js +65 -0
- package/dist/observe/inbox/skill-rollups.d.ts +58 -0
- package/dist/observe/inbox/skill-rollups.js +186 -0
- package/dist/observe/inbox/source-record-archive.d.ts +9 -0
- package/dist/observe/inbox/source-record-archive.js +311 -0
- package/dist/observe/inbox/view-model.d.ts +30 -0
- package/dist/observe/inbox/view-model.js +140 -0
- package/dist/observe/presentation.d.ts +8 -0
- package/dist/observe/presentation.js +5 -0
- package/dist/observe/skill-health/analyzer.d.ts +128 -0
- package/dist/observe/skill-health/analyzer.js +327 -0
- package/dist/observe/skill-health/experience-frontmatter.js +99 -0
- package/dist/observe/skill-health/persistence.d.ts +10 -0
- package/dist/observe/skill-health/persistence.js +21 -0
- package/dist/observe/skill-health/skill-chain.js +530 -0
- package/dist/observe/soft-standards/constants.d.ts +4 -0
- package/dist/observe/soft-standards/constants.js +9 -0
- package/dist/observe/soft-standards/llm-extractor.js +698 -0
- package/dist/observe/soft-standards/runtime-evaluator.js +384 -0
- package/dist/observe/soft-standards/skill-standards-store.d.ts +10 -0
- package/dist/observe/soft-standards/skill-standards-store.js +230 -0
- package/dist/observe/soft-standards/types.d.ts +213 -0
- package/dist/observe/trace/adapters/claude/record-events.d.ts +4 -0
- package/dist/observe/trace/adapters/claude/record-events.js +297 -0
- package/dist/observe/trace/adapters/claude/record-schema.d.ts +60 -0
- package/dist/observe/trace/adapters/claude/record-schema.js +2 -0
- package/dist/observe/trace/adapters/claude/trace.d.ts +13 -0
- package/dist/observe/trace/adapters/claude/trace.js +48 -0
- package/dist/observe/trace/adapters/codex/context-events.d.ts +4 -0
- package/dist/observe/trace/adapters/codex/context-events.js +166 -0
- package/dist/observe/trace/adapters/codex/conversation-events.d.ts +4 -0
- package/dist/observe/trace/adapters/codex/conversation-events.js +143 -0
- package/dist/observe/trace/adapters/codex/conversion-contract.d.ts +66 -0
- package/dist/observe/trace/adapters/codex/conversion-contract.js +10 -0
- package/dist/observe/trace/adapters/codex/item-views.d.ts +81 -0
- package/dist/observe/trace/adapters/codex/item-views.js +303 -0
- package/dist/observe/trace/adapters/codex/pending-tool-events.d.ts +7 -0
- package/dist/observe/trace/adapters/codex/pending-tool-events.js +100 -0
- package/dist/observe/trace/adapters/codex/record-conversion.d.ts +14 -0
- package/dist/observe/trace/adapters/codex/record-conversion.js +167 -0
- package/dist/observe/trace/adapters/codex/record-fields.d.ts +13 -0
- package/dist/observe/trace/adapters/codex/record-fields.js +35 -0
- package/dist/observe/trace/adapters/codex/record-indexes.d.ts +75 -0
- package/dist/observe/trace/adapters/codex/record-indexes.js +309 -0
- package/dist/observe/trace/adapters/codex/record-text.d.ts +8 -0
- package/dist/observe/trace/adapters/codex/record-text.js +52 -0
- package/dist/observe/trace/adapters/codex/tool-event-factory.d.ts +16 -0
- package/dist/observe/trace/adapters/codex/tool-event-factory.js +20 -0
- package/dist/observe/trace/adapters/codex/tool-events.d.ts +4 -0
- package/dist/observe/trace/adapters/codex/tool-events.js +183 -0
- package/dist/observe/trace/adapters/codex/tool-status.js +114 -0
- package/dist/observe/trace/adapters/codex/trace.d.ts +9 -0
- package/dist/observe/trace/adapters/codex/trace.js +123 -0
- package/dist/observe/trace/adapters/codex/turn-events.d.ts +4 -0
- package/dist/observe/trace/adapters/codex/turn-events.js +126 -0
- package/dist/observe/trace/adapters/dsh/trace.d.ts +17 -0
- package/dist/observe/trace/adapters/dsh/trace.js +352 -0
- package/dist/observe/trace/adapters/jsonl-records.d.ts +6 -0
- package/dist/observe/trace/adapters/jsonl-records.js +67 -0
- package/dist/observe/trace/adapters/markdown/trace.d.ts +8 -0
- package/dist/observe/trace/adapters/markdown/trace.js +132 -0
- package/dist/observe/trace/adapters/openclaw/record-events.d.ts +10 -0
- package/dist/observe/trace/adapters/openclaw/record-events.js +192 -0
- package/dist/observe/trace/adapters/openclaw/trace.d.ts +9 -0
- package/dist/observe/trace/adapters/openclaw/trace.js +129 -0
- package/dist/observe/trace/adapters/qoder/trace.d.ts +8 -0
- package/dist/observe/trace/adapters/qoder/trace.js +477 -0
- package/dist/observe/trace/segmentation.js +491 -0
- package/dist/observe/trace/source.d.ts +64 -0
- package/dist/observe/trace/source.js +592 -0
- package/dist/observe/trace/streamed-records.d.ts +16 -0
- package/dist/observe/trace/streamed-records.js +228 -0
- package/dist/observe/trace/tool-search.js +160 -0
- package/dist/observe/trace/trace-ir.d.ts +236 -0
- package/dist/observe/trace/trace-ir.js +147 -0
- package/dist/observe/trace/unknown-disposition.d.ts +36 -0
- package/dist/observe/trace/unknown-disposition.js +233 -0
- package/dist/observe/trace/zstd-frames.d.ts +18 -0
- package/dist/observe/trace/zstd-frames.js +167 -0
- package/dist/observe/view-models/conversation.d.ts +57 -0
- package/dist/observe/view-models/index.d.ts +8 -0
- package/dist/settings/user-settings.d.ts +43 -0
- package/dist/settings/user-settings.js +59 -0
- package/dist/shared/content-hash.d.ts +5 -1
- package/dist/shared/content-hash.js +6 -2
- package/dist/shared/file-lock.d.ts +6 -0
- package/dist/shared/file-lock.js +53 -22
- package/dist/shared/language-preference.d.ts +36 -0
- package/dist/shared/language-preference.js +48 -0
- package/dist/shared/llm-json.d.ts +2 -0
- package/dist/shared/llm-json.js +36 -0
- package/dist/storage/atomic-text.d.ts +4 -0
- package/dist/storage/atomic-text.js +71 -0
- package/dist/storage/default-dirs.d.ts +26 -0
- package/dist/storage/default-dirs.js +27 -0
- package/dist/storage/directories.d.ts +18 -0
- package/dist/storage/directories.js +60 -0
- package/dist/storage/discovery-index.d.ts +86 -0
- package/dist/storage/discovery-index.js +297 -0
- package/dist/storage/file-names.d.ts +13 -0
- package/dist/storage/file-names.js +54 -0
- package/dist/storage/layout.d.ts +39 -0
- package/dist/storage/layout.js +52 -0
- package/dist/storage/report-bundle.js +120 -0
- package/dist/studio/application/agents/agents-view.d.ts +34 -0
- package/dist/studio/application/agents/agents-view.js +36 -0
- package/dist/studio/application/conversations/conversation-activity.d.ts +4 -0
- package/dist/studio/application/conversations/conversation-activity.js +50 -0
- package/dist/studio/application/conversations/conversation-extraction.d.ts +1 -0
- package/dist/studio/application/conversations/conversation-extraction.js +1 -0
- package/dist/studio/application/conversations/conversation-reader.d.ts +7 -0
- package/dist/studio/application/conversations/conversation-reader.js +26 -0
- package/dist/studio/application/conversations/list-states.d.ts +11 -0
- package/dist/studio/application/conversations/list-states.js +9 -0
- package/dist/studio/application/conversations/reader-states.d.ts +14 -0
- package/dist/studio/application/conversations/reader-states.js +17 -0
- package/dist/studio/application/conversations/reader-viewport.d.ts +36 -0
- package/dist/studio/application/conversations/reader-viewport.js +35 -0
- package/dist/studio/application/conversations/replay/format.d.ts +7 -0
- package/dist/studio/application/conversations/replay/format.js +39 -0
- package/dist/studio/application/conversations/replay/inline-markdown.d.ts +1 -0
- package/dist/studio/application/conversations/replay/inline-markdown.js +99 -0
- package/dist/studio/application/conversations/replay/layout.d.ts +15 -0
- package/dist/studio/application/conversations/replay/layout.js +171 -0
- package/dist/studio/application/conversations/replay/projection.d.ts +4 -0
- package/dist/studio/application/conversations/replay/projection.js +292 -0
- package/dist/studio/application/conversations/replay/routing.d.ts +3 -0
- package/dist/studio/application/conversations/replay/routing.js +317 -0
- package/dist/studio/application/conversations/replay/summary.d.ts +25 -0
- package/dist/studio/application/conversations/sidebar-window.d.ts +24 -0
- package/dist/studio/application/conversations/sidebar-window.js +26 -0
- package/dist/studio/application/conversations/trajectory-evidence.d.ts +3 -0
- package/dist/studio/application/conversations/trajectory-evidence.js +9 -0
- package/dist/studio/application/directory-sources.d.ts +47 -0
- package/dist/studio/application/directory-sources.js +44 -0
- package/dist/studio/application/display/conversation-label.d.ts +13 -0
- package/dist/studio/application/display/conversation-label.js +30 -0
- package/dist/studio/application/display/format.d.ts +40 -0
- package/dist/studio/application/display/format.js +101 -0
- package/dist/studio/application/display/tone.d.ts +10 -0
- package/dist/studio/application/display/tone.js +10 -0
- package/dist/studio/application/knowledge/artifact-authoring.d.ts +41 -0
- package/dist/studio/application/knowledge/artifact-authoring.js +16 -0
- package/dist/studio/application/knowledge/auto-extraction.d.ts +4 -0
- package/dist/studio/application/knowledge/auto-extraction.js +23 -0
- package/dist/studio/application/knowledge/candidate-review.d.ts +5 -0
- package/dist/studio/application/knowledge/candidate-review.js +20 -0
- package/dist/studio/application/knowledge/candidate-status.d.ts +9 -0
- package/dist/studio/application/knowledge/candidate-status.js +19 -0
- package/dist/studio/application/knowledge/doctor-format.d.ts +84 -0
- package/dist/studio/application/knowledge/doctor-format.js +115 -0
- package/dist/studio/application/knowledge/entity-links.d.ts +14 -0
- package/dist/studio/application/knowledge/entity-links.js +178 -0
- package/dist/studio/application/knowledge/knowledge-candidates.d.ts +3 -0
- package/dist/studio/application/knowledge/knowledge-candidates.js +226 -0
- package/dist/studio/application/knowledge/knowledge-library.d.ts +424 -0
- package/dist/studio/application/knowledge/knowledge-library.js +24 -0
- package/dist/studio/application/knowledge/knowledge-query.d.ts +30 -0
- package/dist/studio/application/knowledge/knowledge-query.js +30 -0
- package/dist/studio/application/knowledge/knowledge-relations.d.ts +471 -0
- package/dist/studio/application/knowledge/knowledge-relations.js +14 -0
- package/dist/studio/application/knowledge/knowledge-reports.d.ts +17 -0
- package/dist/studio/application/knowledge/knowledge-reports.js +231 -0
- package/dist/studio/application/knowledge/knowledge-reviews.d.ts +356 -0
- package/dist/studio/application/knowledge/knowledge-reviews.js +15 -0
- package/dist/studio/application/knowledge/library-view.d.ts +23 -0
- package/dist/studio/application/knowledge/library-view.js +7 -0
- package/dist/studio/application/knowledge/skill-health.d.ts +11 -0
- package/dist/studio/application/knowledge/skill-health.js +50 -0
- package/dist/studio/application/knowledge/skill-index.d.ts +27 -0
- package/dist/studio/application/knowledge/skill-index.js +359 -0
- package/dist/studio/application/knowledge/skill-insights.d.ts +3 -0
- package/dist/studio/application/knowledge/skill-insights.js +284 -0
- package/dist/studio/application/knowledge/source-picker.d.ts +368 -0
- package/dist/studio/application/knowledge/source-picker.js +54 -0
- package/dist/studio/application/knowledge/source-view.d.ts +4 -0
- package/dist/studio/application/knowledge/source-view.js +8 -0
- package/dist/studio/application/measure/carrier-measurement.d.ts +20 -0
- package/dist/studio/application/measure/carrier-measurement.js +51 -0
- package/dist/studio/application/measure/core-run-catalog.d.ts +3 -0
- package/dist/studio/application/measure/core-run-format.d.ts +33 -0
- package/dist/studio/application/measure/core-run-format.js +164 -0
- package/dist/studio/application/measure/core-run-projection.d.ts +6 -0
- package/dist/studio/application/measure/core-run-projection.js +320 -0
- package/dist/studio/application/observe/health-format.d.ts +158 -0
- package/dist/studio/application/observe/health-format.js +239 -0
- package/dist/studio/application/settings/settings.d.ts +35 -0
- package/dist/studio/application/settings/settings.js +13 -0
- package/dist/studio/http/contracts.d.ts +40 -8
- package/dist/studio/http/errors.d.ts +1 -2
- package/dist/studio/http/errors.js +8 -5
- package/dist/studio/http/language.d.ts +10 -0
- package/dist/studio/http/language.js +18 -0
- package/dist/studio/http/next-context.d.ts +14 -6
- package/dist/studio/http/next-context.js +5 -1
- package/dist/studio/http/next-server.d.ts +1 -1
- package/dist/studio/http/next-server.js +124 -56
- package/dist/studio/http/page-fault.d.ts +3 -0
- package/dist/studio/http/page-fault.js +23 -0
- package/dist/studio/http/page-params.d.ts +32 -0
- package/dist/studio/http/page-params.js +32 -0
- package/dist/studio/http/page-paths.d.ts +36 -0
- package/dist/studio/http/page-paths.js +36 -0
- package/dist/studio/http/pages/agents-page.d.ts +12 -0
- package/dist/studio/http/pages/agents-page.js +13 -0
- package/dist/studio/http/pages/health-page.d.ts +38 -0
- package/dist/studio/http/pages/health-page.js +49 -0
- package/dist/studio/http/pages/inbox-page.d.ts +13 -0
- package/dist/studio/http/pages/inbox-page.js +14 -0
- package/dist/studio/http/pages/knowledge-page.d.ts +39 -0
- package/dist/studio/http/pages/knowledge-page.js +59 -0
- package/dist/studio/http/pages/measure-page.d.ts +18 -0
- package/dist/studio/http/pages/measure-page.js +30 -0
- package/dist/studio/http/pages/observe-page.d.ts +29 -0
- package/dist/studio/http/pages/observe-page.js +45 -0
- package/dist/studio/http/report-server.d.ts +1 -2
- package/dist/studio/http/report-server.js +74 -28
- package/dist/studio/http/request-errors.js +61 -28
- package/dist/studio/http/request-handler.d.ts +3 -4
- package/dist/studio/http/request-handler.js +60 -37
- package/dist/studio/http/routes/artifact-authoring.d.ts +1 -0
- package/dist/studio/http/routes/artifact-authoring.js +35 -0
- package/dist/studio/http/routes/carrier-measurement.d.ts +8 -0
- package/dist/studio/http/routes/carrier-measurement.js +34 -0
- package/dist/studio/http/routes/contracts.d.ts +1 -1
- package/dist/studio/http/routes/conversations.d.ts +1 -1
- package/dist/studio/http/routes/conversations.js +39 -57
- package/dist/studio/http/routes/core-runs.d.ts +10 -10
- package/dist/studio/http/routes/core-runs.js +21 -62
- package/dist/studio/http/routes/entity-links.d.ts +3 -0
- package/dist/studio/http/routes/entity-links.js +39 -0
- package/dist/studio/http/routes/knowledge-candidates.d.ts +6 -0
- package/dist/studio/http/routes/knowledge-candidates.js +47 -0
- package/dist/studio/http/routes/knowledge-relations.d.ts +3 -0
- package/dist/studio/http/routes/knowledge-relations.js +32 -0
- package/dist/studio/http/routes/knowledge-reviews.d.ts +3 -0
- package/dist/studio/http/routes/knowledge-reviews.js +30 -0
- package/dist/studio/http/routes/knowledge.d.ts +4 -6
- package/dist/studio/http/routes/knowledge.js +5 -222
- package/dist/studio/http/routes/observations.d.ts +3 -9
- package/dist/studio/http/routes/observations.js +3 -109
- package/dist/studio/http/routes/router.d.ts +2 -1
- package/dist/studio/http/routes/router.js +2 -8
- package/dist/studio/http/routes/settings.d.ts +1 -0
- package/dist/studio/http/routes/settings.js +36 -0
- package/dist/studio/http/server-addresses.d.ts +5 -0
- package/dist/studio/http/server-addresses.js +16 -0
- package/dist/studio/view-models/conversations/conversation-reader.d.ts +15 -0
- package/dist/studio/view-models/conversations/replay.d.ts +85 -0
- package/dist/studio/view-models/display/tone.d.ts +7 -0
- package/dist/studio/view-models/display/tone.js +1 -0
- package/dist/studio/view-models/knowledge/artifact-authoring.d.ts +2 -0
- package/dist/studio/view-models/knowledge/artifact-authoring.js +1 -0
- package/dist/studio/view-models/knowledge/entity-links.d.ts +17 -0
- package/dist/studio/view-models/knowledge/entity-links.js +1 -0
- package/dist/studio/view-models/knowledge/health-assessment.d.ts +16 -0
- package/dist/studio/view-models/knowledge/health-assessment.js +1 -0
- package/dist/studio/view-models/knowledge/insight.d.ts +75 -0
- package/dist/studio/view-models/knowledge/insight.js +1 -0
- package/dist/studio/view-models/knowledge/knowledge-candidates.d.ts +135 -0
- package/dist/studio/view-models/knowledge/knowledge-candidates.js +1 -0
- package/dist/studio/view-models/knowledge/knowledge-library.d.ts +4 -0
- package/dist/studio/view-models/knowledge/knowledge-library.js +1 -0
- package/dist/studio/view-models/knowledge/knowledge-relations.d.ts +2 -0
- package/dist/studio/view-models/knowledge/knowledge-relations.js +1 -0
- package/dist/studio/view-models/knowledge/knowledge-reports.js +1 -0
- package/dist/studio/view-models/knowledge/knowledge-reviews.d.ts +2 -0
- package/dist/studio/view-models/knowledge/knowledge-reviews.js +1 -0
- package/dist/studio/view-models/knowledge/skill-index.d.ts +113 -0
- package/dist/studio/view-models/knowledge/skill-index.js +1 -0
- package/dist/studio/view-models/measure/carrier-measurement.d.ts +1 -0
- package/dist/studio/view-models/measure/carrier-measurement.js +1 -0
- package/dist/studio/view-models/measure/core-runs.d.ts +263 -0
- package/dist/studio/view-models/measure/core-runs.js +1 -0
- package/dist/studio/view-models/page-fault.d.ts +9 -0
- package/dist/studio/view-models/page-fault.js +1 -0
- package/dist/studio/view-models/settings/settings.d.ts +12 -0
- package/dist/studio/view-models/settings/settings.js +1 -0
- package/dist/studio/web/.next/BUILD_ID +1 -1
- package/dist/studio/web/.next/app-path-routes-manifest.json +13 -4
- package/dist/studio/web/.next/build-manifest.json +6 -6
- package/dist/studio/web/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/studio/web/.next/next-server.js.nft.json +1 -1
- package/dist/studio/web/.next/prerender-manifest.json +4 -4
- package/dist/studio/web/.next/required-server-files.js +35 -2
- package/dist/studio/web/.next/required-server-files.json +35 -2
- package/dist/studio/web/.next/routes-manifest.json +73 -11
- package/dist/studio/web/.next/server/app/_global-error/page.js +2 -2
- package/dist/studio/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/_global-error.html +1 -1
- package/dist/studio/web/.next/server/app/_global-error.meta +8 -0
- package/dist/studio/web/.next/server/app/_global-error.rsc +30 -20
- package/dist/studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +30 -20
- package/dist/studio/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +36 -24
- package/dist/studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +3 -1
- package/dist/studio/web/.next/server/app/_not-found/page.js +1 -1
- package/dist/studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/agents/page.js +1 -0
- package/dist/studio/web/.next/server/app/agents/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/agents/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/knowledge/candidates/page.js +1 -0
- package/dist/studio/web/.next/server/app/knowledge/candidates/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/knowledge/candidates/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/knowledge/entities/page.js +1 -0
- package/dist/studio/web/.next/server/app/knowledge/entities/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/knowledge/entities/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/knowledge/library/page.js +55 -0
- package/dist/studio/web/.next/server/app/knowledge/library/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/knowledge/library/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/knowledge/page.js +1 -1
- package/dist/studio/web/.next/server/app/knowledge/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/knowledge/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page.js +1 -1
- package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/measure/[runId]/page.js +1 -1
- package/dist/studio/web/.next/server/app/measure/[runId]/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/measure/[runId]/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/measure/page.js +1 -1
- package/dist/studio/web/.next/server/app/measure/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/measure/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page.js +1 -1
- package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page.js +1 -1
- package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/observe/health/[analysisId]/page.js +1 -0
- package/dist/studio/web/.next/server/app/observe/health/[analysisId]/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/observe/health/[analysisId]/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/observe/health/page.js +1 -0
- package/dist/studio/web/.next/server/app/observe/health/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/observe/health/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/observe/health-diff/page.js +1 -0
- package/dist/studio/web/.next/server/app/observe/health-diff/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/observe/health-diff/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/observe/inbox/page.js +2 -5
- package/dist/studio/web/.next/server/app/observe/inbox/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/observe/inbox/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/observe/page.js +1 -1
- package/dist/studio/web/.next/server/app/observe/page.js.nft.json +1 -1
- package/dist/studio/web/.next/server/app/observe/page_client-reference-manifest.js +1 -1
- package/dist/studio/web/.next/server/app/observe/skill-trend/[skillName]/page.js +1 -0
- package/dist/studio/web/.next/server/app/observe/skill-trend/[skillName]/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/observe/skill-trend/[skillName]/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app/studio-fault/page.js +1 -0
- package/dist/studio/web/.next/server/app/studio-fault/page.js.nft.json +1 -0
- package/dist/studio/web/.next/server/app/studio-fault/page_client-reference-manifest.js +1 -0
- package/dist/studio/web/.next/server/app-paths-manifest.json +13 -4
- package/dist/studio/web/.next/server/chunks/158.js +4 -0
- package/dist/studio/web/.next/server/chunks/173.js +23 -0
- package/dist/studio/web/.next/server/chunks/197.js +1 -0
- package/dist/studio/web/.next/server/chunks/241.js +1 -0
- package/dist/studio/web/.next/server/chunks/276.js +55 -0
- package/dist/studio/web/.next/server/chunks/278.js +4 -0
- package/dist/studio/web/.next/server/chunks/285.js +16 -0
- package/dist/studio/web/.next/server/chunks/3.js +1 -0
- package/dist/studio/web/.next/server/chunks/464.js +9 -0
- package/dist/studio/web/.next/server/chunks/475.js +1 -0
- package/dist/studio/web/.next/server/chunks/499.js +1 -0
- package/dist/studio/web/.next/server/chunks/5.js +1 -0
- package/dist/studio/web/.next/server/chunks/520.js +1 -0
- package/dist/studio/web/.next/server/chunks/644.js +16 -0
- package/dist/studio/web/.next/server/chunks/647.js +41 -0
- package/dist/studio/web/.next/server/chunks/704.js +1 -0
- package/dist/studio/web/.next/server/chunks/757.js +4 -0
- package/dist/studio/web/.next/server/chunks/758.js +1 -0
- package/dist/studio/web/.next/server/chunks/772.js +4 -4
- package/dist/studio/web/.next/server/chunks/777.js +1 -0
- package/dist/studio/web/.next/server/chunks/78.js +1 -0
- package/dist/studio/web/.next/server/chunks/845.js +6 -0
- package/dist/studio/web/.next/server/chunks/907.js +471 -0
- package/dist/studio/web/.next/server/chunks/952.js +10 -0
- package/dist/studio/web/.next/server/chunks/996.js +1 -0
- package/dist/studio/web/.next/server/middleware-build-manifest.js +1 -1
- package/dist/studio/web/.next/server/pages/500.html +1 -1
- package/dist/studio/web/.next/server/preview-props.json +5 -0
- package/dist/studio/web/.next/server/server-reference-manifest.json +1 -1
- package/dist/studio/web/.next/server/webpack-runtime.js +1 -1
- package/dist/studio/web/.next/static/chunks/0937d497-cb7a9ff884a082ab.js +1 -0
- package/dist/studio/web/.next/static/chunks/1046-d6406775bf6e4e56.js +10 -0
- package/dist/studio/web/.next/static/chunks/130-893cf722c2625b17.js +126 -0
- package/dist/studio/web/.next/static/chunks/1492-bad4ed42c0e250f4.js +1 -0
- package/dist/studio/web/.next/static/chunks/1858-c1e4347ec29d9975.js +52 -0
- package/dist/studio/web/.next/static/chunks/2038-6693f44ecf63822c.js +1 -0
- package/dist/studio/web/.next/static/chunks/2192-3018e652a8614c1a.js +16 -0
- package/dist/studio/web/.next/static/chunks/2519-4e2ef8a5f4329f8f.js +1 -0
- package/dist/studio/web/.next/static/chunks/2974-4e69b5f46cfb7dcf.js +41 -0
- package/dist/studio/web/.next/static/chunks/3596-edc23b1335d9e066.js +16 -0
- package/dist/studio/web/.next/static/chunks/3958-a0c0cdf3f949cce5.js +1 -0
- package/dist/studio/web/.next/static/chunks/3978-7aa1fe441f992fbc.js +1 -0
- package/dist/studio/web/.next/static/chunks/4994-f4341c8b63e0b273.js +23 -0
- package/dist/studio/web/.next/static/chunks/5014-5f3f743dbdca752b.js +1 -0
- package/dist/studio/web/.next/static/chunks/5382-1b919cde624bb761.js +1 -0
- package/dist/studio/web/.next/static/chunks/5669-9c97987efcbb436b.js +4 -0
- package/dist/studio/web/.next/static/chunks/5686-ca88fb679f990180.js +7 -0
- package/dist/studio/web/.next/static/chunks/5810-175f6442bf41f93f.js +8 -0
- package/dist/studio/web/.next/static/chunks/5834-a15c5aca742e8dfe.js +1 -0
- package/dist/studio/web/.next/static/chunks/5888-7fcdb8113bad0a83.js +55 -0
- package/dist/studio/web/.next/static/chunks/6238-d5503cb2b71c7dac.js +1 -0
- package/dist/studio/web/.next/static/chunks/6722-e64d7dff19ba05f4.js +4 -0
- package/dist/studio/web/.next/static/chunks/7754-35adc2934225f819.js +4 -0
- package/dist/studio/web/.next/static/chunks/7936-e4a0d3ac28eb54cc.js +164 -0
- package/dist/studio/web/.next/static/chunks/7956-5d0381b62a26fe4d.js +6 -0
- package/dist/studio/web/.next/static/chunks/8093-42784c8dd11cb2f7.js +1 -0
- package/dist/studio/web/.next/static/chunks/8284-7f5a979f042ab2fa.js +1 -0
- package/dist/studio/web/.next/static/chunks/8791-c05283fd8a8fdb82.js +1 -0
- package/dist/studio/web/.next/static/chunks/9688-4bdad39f3387b49a.js +1 -0
- package/dist/studio/web/.next/static/chunks/9978-5c07c696f9455dda.js +9 -0
- package/dist/studio/web/.next/static/chunks/app/_global-error/page-e609dd5f58d4d1da.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/_not-found/page-e609dd5f58d4d1da.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/agents/page-d4eaa6a8179b7b19.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/error-edb0db1072d1d73f.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/knowledge/candidates/page-9526538d0b68d6f4.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/knowledge/entities/page-aff10fb4087e2ead.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/knowledge/library/page-94bff0d5847f1372.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/knowledge/page-a0f3756f1167905f.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/knowledge/skills/[skillName]/page-6dba56e2cc7bf391.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/layout-238de1f5bd3b0186.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/loading-bafa7dd71ac593fb.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/measure/[runId]/page-18d8cdad7fbd3103.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/measure/page-ef11f68b9809a459.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/not-found-2ea031c66ca97f78.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/page-bcc0e0e84f975fe2.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/tasks/[turnId]/page-f0f71def8fed4edb.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/health/[analysisId]/page-b9ee172f2f50b703.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/health/page-4786159a2715cfc0.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/health-diff/page-82c559a9f9f00e46.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/inbox/page-1aeba2d85fcdb064.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/page-85aa6e5ef7030a53.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/observe/skill-trend/[skillName]/page-81db0784463726ef.js +1 -0
- package/dist/studio/web/.next/static/chunks/app/studio-fault/page-c1a55437331aa91a.js +1 -0
- package/dist/studio/web/.next/static/chunks/framework-c65554ff3488f9ae.js +1 -0
- package/dist/studio/web/.next/static/chunks/main-6fb9fe9da7afc450.js +5 -0
- package/dist/studio/web/.next/static/chunks/main-app-679042091c356b7b.js +1 -0
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/app-error-e609dd5f58d4d1da.js +1 -0
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-e609dd5f58d4d1da.js +1 -0
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/global-error-fb3b4a28100823de.js +1 -0
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e609dd5f58d4d1da.js +1 -0
- package/dist/studio/web/.next/static/chunks/webpack-ac24233801701b11.js +1 -0
- package/dist/studio/web/.next/static/css/9037c4f39a77549b.css +1 -0
- package/dist/studio/web/.next/static/scyR1oH1_xcujwAsrOo96/_buildManifest.js +1 -0
- package/dist/studio/web/.next/trace +108 -3
- package/dist/studio/web/.next/trace-build +1 -1
- package/dist/studio/web/next.config.mjs +7 -0
- package/package.json +36 -64
- package/dist/cli/commands/list.d.ts +0 -26
- package/dist/cli/commands/list.js +0 -121
- package/dist/cli/commands/promote.d.ts +0 -24
- package/dist/cli/commands/promote.js +0 -141
- package/dist/cli/commands/rollback.d.ts +0 -20
- package/dist/cli/commands/rollback.js +0 -87
- package/dist/cli/lib/actor.d.ts +0 -2
- package/dist/cli/lib/actor.js +0 -13
- package/dist/cli/lib/evaluation-composition.d.ts +0 -3
- package/dist/cli/lib/evaluation-composition.js +0 -96
- package/dist/cli/lib/i18n-dict/list.d.ts +0 -3
- package/dist/cli/lib/i18n-dict/list.js +0 -40
- package/dist/cli/lib/i18n-dict/promote.d.ts +0 -3
- package/dist/cli/lib/i18n-dict/promote.js +0 -46
- package/dist/cli/lib/i18n-dict/rollback.d.ts +0 -3
- package/dist/cli/lib/i18n-dict/rollback.js +0 -22
- package/dist/diagnosis/contracts/parser.js +0 -181
- package/dist/diagnosis/lifecycle.js +0 -31
- package/dist/diagnosis/observe-mapper.js +0 -265
- package/dist/diagnosis/observe-producer.d.ts +0 -8
- package/dist/diagnosis/observe-producer.js +0 -200
- package/dist/diagnosis/studio-projection.js +0 -90
- package/dist/eval-runtime/advanced.d.ts +0 -38
- package/dist/eval-runtime/advanced.js +0 -18
- package/dist/eval-runtime/clock.d.ts +0 -3
- package/dist/eval-runtime/contracts.d.ts +0 -4
- package/dist/eval-runtime/contracts.js +0 -2
- package/dist/eval-runtime/evaluation/ordering.d.ts +0 -1
- package/dist/eval-runtime/evaluation/ordering.js +0 -3
- package/dist/eval-runtime/executed-store.d.ts +0 -48
- package/dist/eval-runtime/executed-store.js +0 -256
- package/dist/eval-runtime/execution-controls.d.ts +0 -6
- package/dist/eval-runtime/execution-controls.js +0 -57
- package/dist/eval-runtime/execution.d.ts +0 -60
- package/dist/eval-runtime/execution.js +0 -183
- package/dist/eval-runtime/infrastructure.d.ts +0 -51
- package/dist/eval-runtime/infrastructure.js +0 -89
- package/dist/eval-runtime/mcp-config.d.ts +0 -48
- package/dist/eval-runtime/mcp-config.js +0 -90
- package/dist/eval-runtime/mock-interception.d.ts +0 -65
- package/dist/eval-runtime/mock-interception.js +0 -109
- package/dist/eval-runtime/provider.d.ts +0 -38
- package/dist/eval-runtime/provider.js +0 -13
- package/dist/eval-runtime/result-store.d.ts +0 -45
- package/dist/eval-runtime/result-store.js +0 -247
- package/dist/eval-runtime/runner.d.ts +0 -47
- package/dist/eval-runtime/runner.js +0 -116
- package/dist/eval-runtime/runtime.d.ts +0 -35
- package/dist/eval-runtime/runtime.js +0 -111
- package/dist/eval-runtime/tool-policy.js +0 -69
- package/dist/eval-runtime/workspace.d.ts +0 -49
- package/dist/eval-runtime/workspace.js +0 -84
- package/dist/eval-workflows/analysis/bootstrap.d.ts +0 -150
- package/dist/eval-workflows/analysis/bootstrap.js +0 -307
- package/dist/eval-workflows/hosts/adapters/anthropic/api.d.ts +0 -31
- package/dist/eval-workflows/hosts/adapters/anthropic/api.js +0 -286
- package/dist/eval-workflows/hosts/adapters/anthropic/protocol.d.ts +0 -67
- package/dist/eval-workflows/hosts/adapters/anthropic/protocol.js +0 -192
- package/dist/eval-workflows/hosts/adapters/claude/cli-protocol.d.ts +0 -19
- package/dist/eval-workflows/hosts/adapters/claude/cli-protocol.js +0 -274
- package/dist/eval-workflows/hosts/adapters/claude/cli.d.ts +0 -48
- package/dist/eval-workflows/hosts/adapters/claude/cli.js +0 -607
- package/dist/eval-workflows/hosts/adapters/claude/core-protocol-contract.d.ts +0 -5
- package/dist/eval-workflows/hosts/adapters/claude/core-protocol-contract.js +0 -57
- package/dist/eval-workflows/hosts/adapters/claude/resources.d.ts +0 -125
- package/dist/eval-workflows/hosts/adapters/claude/resources.js +0 -713
- package/dist/eval-workflows/hosts/adapters/claude/sdk-protocol.d.ts +0 -7
- package/dist/eval-workflows/hosts/adapters/claude/sdk-protocol.js +0 -36
- package/dist/eval-workflows/hosts/adapters/claude/sdk-runtime.d.ts +0 -40
- package/dist/eval-workflows/hosts/adapters/claude/sdk-runtime.js +0 -163
- package/dist/eval-workflows/hosts/adapters/claude/sdk.d.ts +0 -29
- package/dist/eval-workflows/hosts/adapters/claude/sdk.js +0 -507
- package/dist/eval-workflows/hosts/adapters/custom/command.d.ts +0 -240
- package/dist/eval-workflows/hosts/adapters/custom/command.js +0 -838
- package/dist/eval-workflows/inputs/contracts/schemas/v2/eval-sample-set.schema.json +0 -639
- package/dist/eval-workflows/projections/managed.d.ts +0 -8
- package/dist/eval-workflows/projections/managed.js +0 -105
- package/dist/eval-workflows/resume-admission/admit.d.ts +0 -8
- package/dist/eval-workflows/resume-admission/admit.js +0 -180
- package/dist/eval-workflows/resume-admission/contracts.d.ts +0 -81
- package/dist/eval-workflows/resume-admission/contracts.js +0 -22
- package/dist/eval-workflows/resume-admission/index.d.ts +0 -2
- package/dist/eval-workflows/resume-admission/index.js +0 -2
- package/dist/evidence/graph/doctor.d.ts +0 -22
- package/dist/evidence/graph/doctor.js +0 -572
- package/dist/evidence/storage/default-dirs.d.ts +0 -32
- package/dist/evidence/storage/default-dirs.js +0 -33
- package/dist/evidence/storage/directories.d.ts +0 -18
- package/dist/evidence/storage/directories.js +0 -60
- package/dist/evidence/storage/discovery-index.d.ts +0 -86
- package/dist/evidence/storage/discovery-index.js +0 -303
- package/dist/evidence/storage/file-names.d.ts +0 -12
- package/dist/evidence/storage/file-names.js +0 -51
- package/dist/evidence/storage/layout.d.ts +0 -35
- package/dist/evidence/storage/layout.js +0 -50
- package/dist/evidence/storage/report-bundle.js +0 -122
- package/dist/evidence/storage/run-id.js +0 -19
- package/dist/executors/anthropic/api.d.ts +0 -3
- package/dist/executors/anthropic/api.js +0 -102
- package/dist/executors/anthropic/claude/cli.d.ts +0 -3
- package/dist/executors/anthropic/claude/cli.js +0 -119
- package/dist/executors/anthropic/claude/protocol.d.ts +0 -87
- package/dist/executors/anthropic/claude/protocol.js +0 -180
- package/dist/executors/anthropic/claude/sdk.d.ts +0 -20
- package/dist/executors/anthropic/claude/sdk.js +0 -159
- package/dist/executors/anthropic/claude/trace.d.ts +0 -9
- package/dist/executors/anthropic/claude/trace.js +0 -133
- package/dist/executors/core/tool-identity.d.ts +0 -29
- package/dist/executors/core/trace-source-kind.d.ts +0 -4
- package/dist/executors/core/trace-source-kind.js +0 -5
- package/dist/executors/mock-runtime/mock-hook.cjs +0 -271
- package/dist/executors/tool-call-status.d.ts +0 -8
- package/dist/executors/tool-call-status.js +0 -71
- package/dist/knowledge-artifacts/authoring/core-evolver.d.ts +0 -66
- package/dist/knowledge-artifacts/authoring/core-evolver.js +0 -283
- package/dist/knowledge-artifacts/authoring/scaffold.js +0 -109
- package/dist/knowledge-artifacts/doctor/contracts.d.ts +0 -201
- package/dist/knowledge-artifacts/doctor/endpoint-rule.js +0 -382
- package/dist/knowledge-artifacts/doctor/fixer.js +0 -345
- package/dist/knowledge-artifacts/doctor/health/composer.d.ts +0 -18
- package/dist/knowledge-artifacts/doctor/health/composer.js +0 -411
- package/dist/knowledge-artifacts/doctor/index.js +0 -277
- package/dist/knowledge-artifacts/doctor/messages.d.ts +0 -20
- package/dist/knowledge-artifacts/doctor/messages.js +0 -224
- package/dist/knowledge-artifacts/doctor/persistence.js +0 -126
- package/dist/knowledge-artifacts/doctor/renderer.d.ts +0 -17
- package/dist/knowledge-artifacts/doctor/report-parser.js +0 -103
- package/dist/knowledge-artifacts/doctor/rules.d.ts +0 -32
- package/dist/knowledge-artifacts/doctor/rules.js +0 -290
- package/dist/knowledge-artifacts/governance/contracts.d.ts +0 -158
- package/dist/knowledge-artifacts/governance/evidence.d.ts +0 -25
- package/dist/knowledge-artifacts/governance/evidence.js +0 -111
- package/dist/knowledge-artifacts/governance/evolve-outcome.d.ts +0 -16
- package/dist/knowledge-artifacts/governance/evolve-outcome.js +0 -41
- package/dist/knowledge-artifacts/governance/index.d.ts +0 -11
- package/dist/knowledge-artifacts/governance/index.js +0 -11
- package/dist/knowledge-artifacts/governance/install.d.ts +0 -29
- package/dist/knowledge-artifacts/governance/install.js +0 -63
- package/dist/knowledge-artifacts/governance/list-query.d.ts +0 -7
- package/dist/knowledge-artifacts/governance/list-query.js +0 -11
- package/dist/knowledge-artifacts/governance/list-view.d.ts +0 -67
- package/dist/knowledge-artifacts/governance/list-view.js +0 -77
- package/dist/knowledge-artifacts/governance/observe-feedback.d.ts +0 -73
- package/dist/knowledge-artifacts/governance/observe-feedback.js +0 -59
- package/dist/knowledge-artifacts/governance/promote-gate.d.ts +0 -34
- package/dist/knowledge-artifacts/governance/promote-gate.js +0 -32
- package/dist/knowledge-artifacts/governance/source-probe.d.ts +0 -15
- package/dist/knowledge-artifacts/governance/source-probe.js +0 -129
- package/dist/knowledge-artifacts/governance/store.d.ts +0 -145
- package/dist/knowledge-artifacts/governance/store.js +0 -594
- package/dist/knowledge-artifacts/sources/artifact-resolution.d.ts +0 -184
- package/dist/knowledge-artifacts/sources/artifact-resolution.js +0 -806
- package/dist/knowledge-artifacts/sources/content-hash.js +0 -117
- package/dist/knowledge-artifacts/sources/deploy-artifact.js +0 -65
- package/dist/knowledge-artifacts/sources/install-source.d.ts +0 -37
- package/dist/knowledge-artifacts/sources/install-source.js +0 -124
- package/dist/knowledge-artifacts/sources/materialize-copy.d.ts +0 -37
- package/dist/knowledge-artifacts/sources/materialize-copy.js +0 -193
- package/dist/observability/analysis/coverage-analyzer.js +0 -258
- package/dist/observability/analysis/gap-analyzer.d.ts +0 -110
- package/dist/observability/analysis/gap-analyzer.js +0 -455
- package/dist/observability/analysis/hedging-classifier.js +0 -142
- package/dist/observability/contracts/experience-enums.d.ts +0 -227
- package/dist/observability/contracts/experience-enums.js +0 -227
- package/dist/observability/contracts/experience-evidence-schema.d.ts +0 -33130
- package/dist/observability/contracts/experience-evidence-schema.js +0 -704
- package/dist/observability/contracts/experience.d.ts +0 -80
- package/dist/observability/contracts/inbox.d.ts +0 -181
- package/dist/observability/contracts/skill-chain.d.ts +0 -114
- package/dist/observability/conversation/catalog.d.ts +0 -41
- package/dist/observability/conversation/catalog.js +0 -572
- package/dist/observability/conversation/polling-subscription-hub.js +0 -149
- package/dist/observability/experience/primitives.d.ts +0 -11
- package/dist/observability/experience/primitives.js +0 -75
- package/dist/observability/experience/report-derivations.js +0 -283
- package/dist/observability/experience/report-structure.d.ts +0 -9
- package/dist/observability/experience/session-story.d.ts +0 -93
- package/dist/observability/experience/session-story.js +0 -1349
- package/dist/observability/experience/text-signals.d.ts +0 -7
- package/dist/observability/experience/text-signals.js +0 -30
- package/dist/observability/experience/timeline.d.ts +0 -29
- package/dist/observability/experience/timeline.js +0 -495
- package/dist/observability/experience.d.ts +0 -41
- package/dist/observability/experience.js +0 -812
- package/dist/observability/inbox/explicit-capture.js +0 -223
- package/dist/observability/inbox/feedback-matchers.d.ts +0 -41
- package/dist/observability/inbox/feedback-matchers.js +0 -261
- package/dist/observability/inbox/feedback-projection.d.ts +0 -20
- package/dist/observability/inbox/feedback-projection.js +0 -19
- package/dist/observability/inbox/index.d.ts +0 -34
- package/dist/observability/inbox/index.js +0 -1260
- package/dist/observability/inbox/metric-semantics.d.ts +0 -9
- package/dist/observability/inbox/metric-semantics.js +0 -158
- package/dist/observability/inbox/paths.d.ts +0 -10
- package/dist/observability/inbox/paths.js +0 -64
- package/dist/observability/inbox/problem-patterns.js +0 -246
- package/dist/observability/inbox/review-semantics.d.ts +0 -27
- package/dist/observability/inbox/review-semantics.js +0 -52
- package/dist/observability/inbox/review-state.d.ts +0 -25
- package/dist/observability/inbox/review-state.js +0 -352
- package/dist/observability/inbox/severity-reason.js +0 -48
- package/dist/observability/inbox/signal-semantics.d.ts +0 -28
- package/dist/observability/inbox/skill-rollups.d.ts +0 -59
- package/dist/observability/inbox/skill-rollups.js +0 -186
- package/dist/observability/inbox/source-record-archive.d.ts +0 -14
- package/dist/observability/inbox/source-record-archive.js +0 -328
- package/dist/observability/inbox/view-model.d.ts +0 -55
- package/dist/observability/inbox/view-model.js +0 -174
- package/dist/observability/skill-health/analyzer.d.ts +0 -129
- package/dist/observability/skill-health/analyzer.js +0 -328
- package/dist/observability/skill-health/experience-frontmatter.js +0 -99
- package/dist/observability/skill-health/persistence.d.ts +0 -18
- package/dist/observability/skill-health/persistence.js +0 -43
- package/dist/observability/skill-health/skill-chain.js +0 -486
- package/dist/observability/soft-standards/constants.d.ts +0 -3
- package/dist/observability/soft-standards/constants.js +0 -8
- package/dist/observability/soft-standards/llm-extractor.js +0 -692
- package/dist/observability/soft-standards/runtime-evaluator.js +0 -384
- package/dist/observability/soft-standards/skill-standards-store.d.ts +0 -11
- package/dist/observability/soft-standards/skill-standards-store.js +0 -240
- package/dist/observability/soft-standards/types.d.ts +0 -212
- package/dist/observability/trace/adapters/codex/tool-status.js +0 -114
- package/dist/observability/trace/adapters/codex/trace.d.ts +0 -5
- package/dist/observability/trace/adapters/codex/trace.js +0 -1091
- package/dist/observability/trace/segmentation.js +0 -491
- package/dist/observability/trace/source.d.ts +0 -69
- package/dist/observability/trace/source.js +0 -1199
- package/dist/observability/trace/tool-search.js +0 -160
- package/dist/observability/trace/trace-ir.d.ts +0 -185
- package/dist/observability/trace/trace-ir.js +0 -81
- package/dist/observability/view-models/conversation.d.ts +0 -51
- package/dist/observability/view-models/index.d.ts +0 -3
- package/dist/studio/application/conversation-activity.d.ts +0 -5
- package/dist/studio/application/conversation-activity.js +0 -50
- package/dist/studio/application/core-run-catalog.d.ts +0 -3
- package/dist/studio/application/core-run-projection.d.ts +0 -6
- package/dist/studio/application/core-run-projection.js +0 -308
- package/dist/studio/application/index.d.ts +0 -2
- package/dist/studio/application/index.js +0 -2
- package/dist/studio/application/inline-markdown.d.ts +0 -4
- package/dist/studio/application/inline-markdown.js +0 -99
- package/dist/studio/application/knowledge-query.d.ts +0 -24
- package/dist/studio/application/knowledge-query.js +0 -30
- package/dist/studio/application/knowledge-reports.d.ts +0 -22
- package/dist/studio/application/knowledge-reports.js +0 -279
- package/dist/studio/application/replay/format.d.ts +0 -9
- package/dist/studio/application/replay/format.js +0 -52
- package/dist/studio/application/replay/layout.d.ts +0 -15
- package/dist/studio/application/replay/layout.js +0 -171
- package/dist/studio/application/replay/projection.d.ts +0 -4
- package/dist/studio/application/replay/projection.js +0 -291
- package/dist/studio/application/replay/routing.d.ts +0 -20
- package/dist/studio/application/replay/routing.js +0 -333
- package/dist/studio/application/replay/summary.d.ts +0 -25
- package/dist/studio/application/skill-health.d.ts +0 -8
- package/dist/studio/application/skill-health.js +0 -86
- package/dist/studio/application/skill-index.d.ts +0 -24
- package/dist/studio/application/skill-index.js +0 -360
- package/dist/studio/application/skill-insights.d.ts +0 -5
- package/dist/studio/application/skill-insights.js +0 -218
- package/dist/studio/application/trajectory-evidence.d.ts +0 -4
- package/dist/studio/application/trajectory-evidence.js +0 -12
- package/dist/studio/http/chart-asset.d.ts +0 -1
- package/dist/studio/http/chart-asset.js +0 -21
- package/dist/studio/http/inbox-page.d.ts +0 -11
- package/dist/studio/http/inbox-page.js +0 -9
- package/dist/studio/http/knowledge-page.d.ts +0 -23
- package/dist/studio/http/knowledge-page.js +0 -27
- package/dist/studio/http/observe-page.d.ts +0 -26
- package/dist/studio/http/observe-page.js +0 -36
- package/dist/studio/index.d.ts +0 -5
- package/dist/studio/index.js +0 -5
- package/dist/studio/presentation/conversation-renderer.d.ts +0 -4
- package/dist/studio/presentation/conversation-renderer.js +0 -467
- package/dist/studio/presentation/core-run-renderer.d.ts +0 -12
- package/dist/studio/presentation/core-run-renderer.js +0 -428
- package/dist/studio/presentation/doctor-detail-renderer.d.ts +0 -4
- package/dist/studio/presentation/doctor-detail-renderer.js +0 -142
- package/dist/studio/presentation/icons.d.ts +0 -29
- package/dist/studio/presentation/icons.js +0 -71
- package/dist/studio/presentation/inline-markdown.d.ts +0 -5
- package/dist/studio/presentation/inline-markdown.js +0 -60
- package/dist/studio/presentation/knowledge-debugger-renderer.d.ts +0 -9
- package/dist/studio/presentation/knowledge-debugger-renderer.js +0 -1390
- package/dist/studio/presentation/knowledge-reports-renderer.d.ts +0 -5
- package/dist/studio/presentation/knowledge-reports-renderer.js +0 -196
- package/dist/studio/presentation/layout.d.ts +0 -20
- package/dist/studio/presentation/layout.js +0 -789
- package/dist/studio/presentation/managed-history-renderer.d.ts +0 -5
- package/dist/studio/presentation/managed-history-renderer.js +0 -333
- package/dist/studio/presentation/observation-inbox/client-script.d.ts +0 -2
- package/dist/studio/presentation/observation-inbox/client-script.js +0 -1805
- package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.d.ts +0 -35
- package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.js +0 -1721
- package/dist/studio/presentation/observation-inbox/helpers.d.ts +0 -13
- package/dist/studio/presentation/observation-inbox/helpers.js +0 -74
- package/dist/studio/presentation/observation-inbox/metric-renderer.d.ts +0 -164
- package/dist/studio/presentation/observation-inbox/metric-renderer.js +0 -325
- package/dist/studio/presentation/observation-inbox/page-renderer.d.ts +0 -12
- package/dist/studio/presentation/observation-inbox/page-renderer.js +0 -275
- package/dist/studio/presentation/observation-inbox/process-workspace-renderer.d.ts +0 -63
- package/dist/studio/presentation/observation-inbox/process-workspace-renderer.js +0 -323
- package/dist/studio/presentation/observation-inbox/review-renderer.d.ts +0 -28
- package/dist/studio/presentation/observation-inbox/review-renderer.js +0 -292
- package/dist/studio/presentation/observation-inbox/reviewer-report.d.ts +0 -8
- package/dist/studio/presentation/observation-inbox/reviewer-report.js +0 -451
- package/dist/studio/presentation/observation-inbox/signal-renderer.d.ts +0 -20
- package/dist/studio/presentation/observation-inbox/signal-renderer.js +0 -93
- package/dist/studio/presentation/observation-inbox/skill-chain-renderer.d.ts +0 -17
- package/dist/studio/presentation/observation-inbox/skill-chain-renderer.js +0 -740
- package/dist/studio/presentation/observation-inbox/styles/experience.d.ts +0 -1
- package/dist/studio/presentation/observation-inbox/styles/experience.js +0 -943
- package/dist/studio/presentation/observation-inbox/styles/metrics.d.ts +0 -1
- package/dist/studio/presentation/observation-inbox/styles/metrics.js +0 -679
- package/dist/studio/presentation/observation-inbox/styles/review.d.ts +0 -1
- package/dist/studio/presentation/observation-inbox/styles/review.js +0 -1422
- package/dist/studio/presentation/observation-inbox/styles/shell.d.ts +0 -1
- package/dist/studio/presentation/observation-inbox/styles/shell.js +0 -844
- package/dist/studio/presentation/observation-inbox/styles/trajectory.d.ts +0 -1
- package/dist/studio/presentation/observation-inbox/styles/trajectory.js +0 -1299
- package/dist/studio/presentation/observation-inbox/styles.d.ts +0 -2
- package/dist/studio/presentation/observation-inbox/styles.js +0 -11
- package/dist/studio/presentation/observation-inbox/timeline.d.ts +0 -18
- package/dist/studio/presentation/observation-inbox/timeline.js +0 -773
- package/dist/studio/presentation/observation-inbox-renderer.d.ts +0 -4
- package/dist/studio/presentation/observation-inbox-renderer.js +0 -130
- package/dist/studio/presentation/report-shell.d.ts +0 -45
- package/dist/studio/presentation/report-shell.js +0 -230
- package/dist/studio/presentation/skill-detail-renderer.d.ts +0 -3
- package/dist/studio/presentation/skill-detail-renderer.js +0 -33
- package/dist/studio/presentation/skill-health-renderer.d.ts +0 -19
- package/dist/studio/presentation/skill-health-renderer.js +0 -315
- package/dist/studio/presentation/skill-list-renderer.d.ts +0 -3
- package/dist/studio/presentation/skill-list-renderer.js +0 -36
- package/dist/studio/presentation/trajectory-live.d.ts +0 -43
- package/dist/studio/presentation/trajectory-live.js +0 -273
- package/dist/studio/presentation/trajectory-routing.d.ts +0 -1
- package/dist/studio/presentation/trajectory-routing.js +0 -19
- package/dist/studio/view-models/core-runs.d.ts +0 -225
- package/dist/studio/view-models/health-assessment.d.ts +0 -8
- package/dist/studio/view-models/index.d.ts +0 -2
- package/dist/studio/view-models/insight.d.ts +0 -68
- package/dist/studio/view-models/replay.d.ts +0 -85
- package/dist/studio/view-models/report-context.d.ts +0 -33
- package/dist/studio/view-models/skill-index.d.ts +0 -112
- package/dist/studio/web/.next/server/chunks/106.js +0 -168
- package/dist/studio/web/.next/server/chunks/150.js +0 -1
- package/dist/studio/web/.next/server/chunks/304.js +0 -1
- package/dist/studio/web/.next/server/chunks/380.js +0 -1
- package/dist/studio/web/.next/server/chunks/564.js +0 -24
- package/dist/studio/web/.next/server/chunks/747.js +0 -6
- package/dist/studio/web/.next/server/chunks/892.js +0 -1
- package/dist/studio/web/.next/server/chunks/944.js +0 -478
- package/dist/studio/web/.next/static/chunks/0937d497-4bac4f7c73c04ac9.js +0 -1
- package/dist/studio/web/.next/static/chunks/111-d4b1e0d6247794ae.js +0 -57
- package/dist/studio/web/.next/static/chunks/230-7633e724f4432c34.js +0 -9
- package/dist/studio/web/.next/static/chunks/250-ca16280838cdcfb2.js +0 -1
- package/dist/studio/web/.next/static/chunks/318-168841393bdaa8dd.js +0 -1
- package/dist/studio/web/.next/static/chunks/321-518bc727ce5b7333.js +0 -1
- package/dist/studio/web/.next/static/chunks/613-caa316c474dc3d66.js +0 -1
- package/dist/studio/web/.next/static/chunks/658-b29b1018111cdce8.js +0 -66
- package/dist/studio/web/.next/static/chunks/75-765230248b2aa7c3.js +0 -10
- package/dist/studio/web/.next/static/chunks/79-8fde571ae151dc77.js +0 -168
- package/dist/studio/web/.next/static/chunks/794-7f0ee86c0dc20482.js +0 -1
- package/dist/studio/web/.next/static/chunks/805-72d1d862ddb0aaf7.js +0 -13
- package/dist/studio/web/.next/static/chunks/810-bc57185c5bbe49f0.js +0 -8
- package/dist/studio/web/.next/static/chunks/858-0ff0c6a27bd5ed08.js +0 -52
- package/dist/studio/web/.next/static/chunks/868-2f9d5e42b712e805.js +0 -6
- package/dist/studio/web/.next/static/chunks/913-3b71b0d79bab222a.js +0 -4
- package/dist/studio/web/.next/static/chunks/app/_global-error/page-29993d7ce06ded15.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/_not-found/page-29993d7ce06ded15.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/error-54c470c75b81c772.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/knowledge/page-4a23fe29d9a452d6.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/knowledge/skills/[skillName]/page-4a23fe29d9a452d6.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/layout-c8c1ba3381b66bea.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/loading-d10eee48a75f2b12.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/measure/[runId]/page-efd2fe3cf9a1fcc4.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/measure/page-7c1a2923758fc2bb.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/not-found-18281623b9a3c198.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/page-83d2777a89f631e7.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/tasks/[turnId]/page-d5900e1c74c0dce6.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/observe/inbox/page-c159d5573caddac1.js +0 -1
- package/dist/studio/web/.next/static/chunks/app/observe/page-f5be9a9b66d7697e.js +0 -1
- package/dist/studio/web/.next/static/chunks/framework-a728c95a64c9352d.js +0 -1
- package/dist/studio/web/.next/static/chunks/main-12dcc6d4dacdbcea.js +0 -5
- package/dist/studio/web/.next/static/chunks/main-app-2cb213cabc9d7ea8.js +0 -1
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/app-error-29993d7ce06ded15.js +0 -1
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-29993d7ce06ded15.js +0 -1
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/global-error-916165c397dfccfe.js +0 -1
- package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-29993d7ce06ded15.js +0 -1
- package/dist/studio/web/.next/static/chunks/webpack-2895e3ce1a584f68.js +0 -1
- package/dist/studio/web/.next/static/cnCcATSim0kBaeNDgIhxj/_buildManifest.js +0 -1
- package/dist/studio/web/.next/static/css/763e4c18d841d615.css +0 -1
- /package/dist/{diagnosis/contracts.js → eval-core/evaluation/runtime-state.js} +0 -0
- /package/dist/{evidence/graph/contracts.js → eval-core/execution/runtime-state.js} +0 -0
- /package/dist/eval-runtime/{clock.js → execution/clock.js} +0 -0
- /package/dist/eval-runtime/{tool-policy.d.ts → resources/tool-policy.d.ts} +0 -0
- /package/dist/{evidence/storage → eval-workflows/artifact-store}/run-id.d.ts +0 -0
- /package/dist/{knowledge-artifacts/contracts.js → eval-workflows/inputs/contracts/sample-input.js} +0 -0
- /package/dist/{knowledge-artifacts/doctor/contracts.js → eval-workflows/projections/carrier-measurement.js} +0 -0
- /package/dist/{knowledge-artifacts/governance/contracts.js → executors/contracts/archive.js} +0 -0
- /package/dist/executors/{core → contracts}/token-usage.d.ts +0 -0
- /package/dist/executors/{core → contracts}/token-usage.js +0 -0
- /package/dist/executors/{core → contracts}/tool-identity.js +0 -0
- /package/dist/{knowledge-artifacts/skills/contracts.js → knowledge/artifacts/authoring/carrier-contracts.js} +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/authoring/improvement.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/authoring/improvement.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/authoring/scaffold.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/contracts.d.ts +0 -0
- /package/dist/{observability/analysis → knowledge/artifacts}/contracts.js +0 -0
- /package/dist/{observability/contracts/experience.js → knowledge/artifacts/doctor/contracts.js} +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/endpoint-rule.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/fixer.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/builtin-dimensions.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/builtin-dimensions.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/consensus.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/consensus.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/dimension-registry.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/dimension-registry.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/dimension-spec.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/dimension-spec.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/load-custom-dimensions.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/load-custom-dimensions.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/merge-prompt.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/merge-prompt.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/parser.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/parser.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/prompt-builder.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/prompt-builder.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/register.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/health/register.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/index.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/persistence.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/renderer.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/report-parser.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/report-schema.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/report-schema.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/rule-kind.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/doctor/rule-kind.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/skills/contracts.d.ts +0 -0
- /package/dist/{observability/contracts/inbox.js → knowledge/artifacts/skills/contracts.js} +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/skills/hard-rules.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/skills/hard-rules.js +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/sources/content-hash.d.ts +0 -0
- /package/dist/{knowledge-artifacts → knowledge/artifacts}/sources/deploy-artifact.d.ts +0 -0
- /package/dist/{observability/contracts/problem-patterns.js → knowledge/sources/source-store.js} +0 -0
- /package/dist/{observability → observe}/analysis/contracts.d.ts +0 -0
- /package/dist/{observability/contracts/review.js → observe/analysis/contracts.js} +0 -0
- /package/dist/{observability → observe}/analysis/coverage-analyzer.d.ts +0 -0
- /package/dist/{observability → observe}/analysis/hedging-classifier.d.ts +0 -0
- /package/dist/{observability/contracts/skill-chain-advisories.js → observe/contracts/experience.js} +0 -0
- /package/dist/{observability/contracts/skill-chain.js → observe/contracts/inbox.js} +0 -0
- /package/dist/{observability → observe}/contracts/problem-patterns.d.ts +0 -0
- /package/dist/{observability/contracts/trace.js → observe/contracts/problem-patterns.js} +0 -0
- /package/dist/{observability → observe}/contracts/review.d.ts +0 -0
- /package/dist/{observability/conversation/index-process.d.ts → observe/contracts/review.js} +0 -0
- /package/dist/{observability → observe}/contracts/skill-chain-advisories.d.ts +0 -0
- /package/dist/{observability/soft-standards/types.js → observe/contracts/skill-chain-advisories.js} +0 -0
- /package/dist/{observability/view-models/conversation.js → observe/contracts/skill-chain.js} +0 -0
- /package/dist/{observability → observe}/contracts/trace-metadata-schema.d.ts +0 -0
- /package/dist/{observability → observe}/contracts/trace-metadata-schema.js +0 -0
- /package/dist/{observability → observe}/contracts/trace.d.ts +0 -0
- /package/dist/{observability/view-models/index.js → observe/contracts/trace.js} +0 -0
- /package/dist/{observability/view-models/knowledge-debugger.js → observe/conversation/index-process.d.ts} +0 -0
- /package/dist/{observability → observe}/conversation/index-process.js +0 -0
- /package/dist/{observability → observe}/conversation/knowledge-debugger.d.ts +0 -0
- /package/dist/{observability → observe}/conversation/knowledge-debugger.js +0 -0
- /package/dist/{observability → observe}/conversation/polling-subscription-hub.d.ts +0 -0
- /package/dist/{observability → observe}/conversation/task-semantic-projection.d.ts +0 -0
- /package/dist/{observability → observe}/conversation/task-semantic-projection.js +0 -0
- /package/dist/{observability → observe}/conversation/task-window.d.ts +0 -0
- /package/dist/{observability → observe}/conversation/task-window.js +0 -0
- /package/dist/{observability → observe}/conversation/turn-index.d.ts +0 -0
- /package/dist/{observability → observe}/conversation/turn-index.js +0 -0
- /package/dist/{diagnosis → observe/diagnosis}/contracts/parser.d.ts +0 -0
- /package/dist/{diagnosis → observe/diagnosis}/contracts.d.ts +0 -0
- /package/dist/{studio/view-models/conversation-activity.js → observe/diagnosis/contracts.js} +0 -0
- /package/dist/{diagnosis → observe/diagnosis}/lifecycle.d.ts +0 -0
- /package/dist/{diagnosis → observe/diagnosis}/observe-mapper.d.ts +0 -0
- /package/dist/{diagnosis → observe/diagnosis}/studio-projection.d.ts +0 -0
- /package/dist/{observability → observe}/experience/report-codec.d.ts +0 -0
- /package/dist/{observability → observe}/experience/report-codec.js +0 -0
- /package/dist/{observability → observe}/experience/report-derivations.d.ts +0 -0
- /package/dist/{observability → observe}/experience/report-reference-validator.d.ts +0 -0
- /package/dist/{observability → observe}/experience/report-reference-validator.js +0 -0
- /package/dist/{observability → observe}/experience/report-structure.js +0 -0
- /package/dist/{observability → observe}/experience/report-value-guards.d.ts +0 -0
- /package/dist/{observability → observe}/experience/report-value-guards.js +0 -0
- /package/dist/{observability → observe}/experience/review-checklist.d.ts +0 -0
- /package/dist/{observability → observe}/experience/review-checklist.js +0 -0
- /package/dist/{observability → observe}/experience/reviewer-report.d.ts +0 -0
- /package/dist/{observability → observe}/experience/reviewer-report.js +0 -0
- /package/dist/{observability → observe}/inbox/capture-coverage.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/capture-coverage.js +0 -0
- /package/dist/{observability → observe}/inbox/effective-review.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/effective-review.js +0 -0
- /package/dist/{observability → observe}/inbox/explicit-capture.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/identity.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/identity.js +0 -0
- /package/dist/{observability → observe}/inbox/problem-patterns.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/report-filter.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/report-filter.js +0 -0
- /package/dist/{observability → observe}/inbox/resolved-review.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/resolved-review.js +0 -0
- /package/dist/{observability → observe}/inbox/session-time-range.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/session-time-range.js +0 -0
- /package/dist/{observability → observe}/inbox/severity-reason.d.ts +0 -0
- /package/dist/{observability → observe}/inbox/signal-semantics.js +0 -0
- /package/dist/{observability → observe}/prompts/document.d.ts +0 -0
- /package/dist/{observability → observe}/prompts/document.js +0 -0
- /package/dist/{observability → observe}/prompts/llm-enhanced-review.prompt.md +0 -0
- /package/dist/{observability → observe}/skill-health/advisories.d.ts +0 -0
- /package/dist/{observability → observe}/skill-health/advisories.js +0 -0
- /package/dist/{observability → observe}/skill-health/experience-frontmatter.d.ts +0 -0
- /package/dist/{observability → observe}/skill-health/report.d.ts +0 -0
- /package/dist/{observability → observe}/skill-health/report.js +0 -0
- /package/dist/{observability → observe}/skill-health/skill-chain.d.ts +0 -0
- /package/dist/{observability → observe}/soft-standards/index.d.ts +0 -0
- /package/dist/{observability → observe}/soft-standards/index.js +0 -0
- /package/dist/{observability → observe}/soft-standards/llm-extractor.d.ts +0 -0
- /package/dist/{observability → observe}/soft-standards/runtime-evaluator.d.ts +0 -0
- /package/dist/{observability → observe}/soft-standards/runtime-evidence.d.ts +0 -0
- /package/dist/{observability → observe}/soft-standards/runtime-evidence.js +0 -0
- /package/dist/{studio/view-models/core-runs.js → observe/soft-standards/types.js} +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/conversation-index.d.ts +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/conversation-index.js +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/exec-command.d.ts +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/exec-command.js +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/protocol.d.ts +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/protocol.js +0 -0
- /package/dist/{observability → observe}/trace/adapters/codex/tool-status.d.ts +0 -0
- /package/dist/{observability → observe}/trace/attribution.d.ts +0 -0
- /package/dist/{observability → observe}/trace/attribution.js +0 -0
- /package/dist/{observability → observe}/trace/index.d.ts +0 -0
- /package/dist/{observability → observe}/trace/index.js +0 -0
- /package/dist/{observability → observe}/trace/ingestion.d.ts +0 -0
- /package/dist/{observability → observe}/trace/ingestion.js +0 -0
- /package/dist/{observability → observe}/trace/message-classification.d.ts +0 -0
- /package/dist/{observability → observe}/trace/message-classification.js +0 -0
- /package/dist/{observability → observe}/trace/projection.d.ts +0 -0
- /package/dist/{observability → observe}/trace/projection.js +0 -0
- /package/dist/{observability → observe}/trace/segmentation.d.ts +0 -0
- /package/dist/{observability → observe}/trace/session-index.d.ts +0 -0
- /package/dist/{observability → observe}/trace/session-index.js +0 -0
- /package/dist/{observability → observe}/trace/tool-search.d.ts +0 -0
- /package/dist/{studio/view-models/health-assessment.js → observe/view-models/conversation.js} +0 -0
- /package/dist/{studio → observe}/view-models/index.js +0 -0
- /package/dist/{observability → observe}/view-models/knowledge-debugger.d.ts +0 -0
- /package/dist/{studio/view-models/inline-markdown.js → observe/view-models/knowledge-debugger.js} +0 -0
- /package/dist/{evidence/graph → storage/artifact-graph}/contracts.d.ts +0 -0
- /package/dist/{studio/view-models/insight.js → storage/artifact-graph/contracts.js} +0 -0
- /package/dist/{evidence/graph → storage/artifact-graph}/schema.d.ts +0 -0
- /package/dist/{evidence/graph → storage/artifact-graph}/schema.js +0 -0
- /package/dist/{evidence/storage → storage}/directory-selection.d.ts +0 -0
- /package/dist/{evidence/storage → storage}/directory-selection.js +0 -0
- /package/dist/{evidence/storage → storage}/report-bundle.d.ts +0 -0
- /package/dist/studio/application/{replay → conversations/replay}/summary.js +0 -0
- /package/dist/studio/application/{core-run-catalog.js → measure/core-run-catalog.js} +0 -0
- /package/dist/studio/view-models/{conversation-activity.d.ts → conversations/conversation-activity.d.ts} +0 -0
- /package/dist/studio/view-models/{knowledge-reports.js → conversations/conversation-activity.js} +0 -0
- /package/dist/studio/view-models/{replay.js → conversations/conversation-reader.js} +0 -0
- /package/dist/studio/view-models/{inline-markdown.d.ts → conversations/inline-markdown.d.ts} +0 -0
- /package/dist/studio/view-models/{report-context.js → conversations/inline-markdown.js} +0 -0
- /package/dist/studio/view-models/{skill-index.js → conversations/replay.js} +0 -0
- /package/dist/studio/view-models/{trajectory-evidence.d.ts → conversations/trajectory-evidence.d.ts} +0 -0
- /package/dist/studio/view-models/{trajectory-evidence.js → conversations/trajectory-evidence.js} +0 -0
- /package/dist/studio/view-models/{trajectory-routing.d.ts → conversations/trajectory-routing.d.ts} +0 -0
- /package/dist/studio/view-models/{trajectory-routing.js → conversations/trajectory-routing.js} +0 -0
- /package/dist/studio/view-models/{knowledge-reports.d.ts → knowledge/knowledge-reports.d.ts} +0 -0
- /package/dist/studio/web/.next/static/{cnCcATSim0kBaeNDgIhxj → scyR1oH1_xcujwAsrOo96}/_ssgManifest.js +0 -0
|
@@ -1,1805 +0,0 @@
|
|
|
1
|
-
export function observationInboxClientScript(lang) {
|
|
2
|
-
return `
|
|
3
|
-
function inboxElementsByAttribute(name, value, root) {
|
|
4
|
-
return Array.from((root || document).querySelectorAll('[' + name + ']')).filter(function(el) {
|
|
5
|
-
return el.getAttribute(name) === value;
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
function inboxElementByAttribute(name, value) {
|
|
9
|
-
return inboxElementsByAttribute(name, value)[0] || null;
|
|
10
|
-
}
|
|
11
|
-
var observeSeverityFilter = 'all';
|
|
12
|
-
var inboxCurrentFilter = 'all';
|
|
13
|
-
function selectInboxCard(id, el) {
|
|
14
|
-
if (window.closeInboxSessionFlowPopover) window.closeInboxSessionFlowPopover();
|
|
15
|
-
var cards = document.querySelectorAll('[data-inbox-card]');
|
|
16
|
-
for (var i = 0; i < cards.length; i++) cards[i].classList.remove('is-active');
|
|
17
|
-
if (el) el.classList.add('is-active');
|
|
18
|
-
var panes = document.querySelectorAll('[data-inbox-detail]');
|
|
19
|
-
var activePane = null;
|
|
20
|
-
for (var j = 0; j < panes.length; j++) {
|
|
21
|
-
var pane = panes[j];
|
|
22
|
-
if (pane.getAttribute('data-inbox-detail') === id) {
|
|
23
|
-
pane.classList.add('is-active');
|
|
24
|
-
activePane = pane;
|
|
25
|
-
} else {
|
|
26
|
-
pane.classList.remove('is-active');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (activePane) applyInboxSessionSearchForPane(activePane);
|
|
30
|
-
var right = document.querySelector('.inbox-right');
|
|
31
|
-
if (right) right.scrollTop = 0;
|
|
32
|
-
}
|
|
33
|
-
function selectInboxCardById(id, sessionId) {
|
|
34
|
-
var card = inboxElementByAttribute('data-inbox-card', id);
|
|
35
|
-
if (card) {
|
|
36
|
-
selectInboxCard(id, card);
|
|
37
|
-
if (sessionId) selectInboxSessionTab(id, sessionId);
|
|
38
|
-
if (card.scrollIntoView) card.scrollIntoView({ block: 'nearest' });
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
window.selectInboxCardById = selectInboxCardById;
|
|
42
|
-
function closeInboxSessionFlowPopover() {
|
|
43
|
-
var old = document.querySelector('.inbox-flow-popover');
|
|
44
|
-
if (old) old.remove();
|
|
45
|
-
}
|
|
46
|
-
function openInboxSessionFlowPopover(templateId, btn, event) {
|
|
47
|
-
if (event) {
|
|
48
|
-
event.preventDefault();
|
|
49
|
-
event.stopPropagation();
|
|
50
|
-
}
|
|
51
|
-
closeInboxSessionFlowPopover();
|
|
52
|
-
var template = document.getElementById(templateId);
|
|
53
|
-
if (!template) return;
|
|
54
|
-
var popover = document.createElement('div');
|
|
55
|
-
popover.className = 'inbox-flow-popover';
|
|
56
|
-
popover.setAttribute('role', 'dialog');
|
|
57
|
-
popover.innerHTML = '<button type="button" class="inbox-flow-popover-close" onclick="closeInboxSessionFlowPopover()">关闭</button>' + template.innerHTML;
|
|
58
|
-
document.body.appendChild(popover);
|
|
59
|
-
var rect = btn && btn.getBoundingClientRect ? btn.getBoundingClientRect() : { left: 16, bottom: 48, right: 16 };
|
|
60
|
-
var width = Math.min(560, window.innerWidth - 32);
|
|
61
|
-
var left = Math.min(Math.max(16, rect.right - width), window.innerWidth - width - 16);
|
|
62
|
-
var top = Math.min(rect.bottom + 8, window.innerHeight - Math.min(popover.offsetHeight || 620, 620) - 16);
|
|
63
|
-
popover.style.left = left + 'px';
|
|
64
|
-
popover.style.top = Math.max(16, top) + 'px';
|
|
65
|
-
}
|
|
66
|
-
window.closeInboxSessionFlowPopover = closeInboxSessionFlowPopover;
|
|
67
|
-
window.openInboxSessionFlowPopover = openInboxSessionFlowPopover;
|
|
68
|
-
function toggleInboxSection(btn) {
|
|
69
|
-
var sec = btn.closest('.inbox-section');
|
|
70
|
-
if (!sec) return;
|
|
71
|
-
var collapsed = sec.classList.toggle('is-collapsed');
|
|
72
|
-
var label = sec.querySelector('.inbox-section-toggle');
|
|
73
|
-
if (label) label.textContent = collapsed ? '展开' : '收起';
|
|
74
|
-
}
|
|
75
|
-
function toggleInboxSectionHead(head) {
|
|
76
|
-
var sec = head && head.closest ? head.closest('.inbox-section') : null;
|
|
77
|
-
if (!sec) return;
|
|
78
|
-
var collapsed = sec.classList.toggle('is-collapsed');
|
|
79
|
-
var label = sec.querySelector('.inbox-section-toggle');
|
|
80
|
-
if (label) label.textContent = collapsed ? '展开' : '收起';
|
|
81
|
-
}
|
|
82
|
-
function findInboxSectionById(id) {
|
|
83
|
-
var activePane = document.querySelector('.inbox-detail-pane.is-active .inbox-session-pane.is-active');
|
|
84
|
-
if (activePane) {
|
|
85
|
-
var nodes = activePane.querySelectorAll('[id]');
|
|
86
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
87
|
-
if (nodes[i].getAttribute('id') === id) return nodes[i];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return document.getElementById(id);
|
|
91
|
-
}
|
|
92
|
-
function scrollInboxSectionIntoView(id, event) {
|
|
93
|
-
if (event) event.preventDefault();
|
|
94
|
-
var sec = findInboxSectionById(id);
|
|
95
|
-
if (!sec) return;
|
|
96
|
-
if (sec.tagName === 'DETAILS' && !sec.open) sec.open = true;
|
|
97
|
-
var parentSection = sec.classList && sec.classList.contains('inbox-section') ? sec : (sec.closest ? sec.closest('.inbox-section') : null);
|
|
98
|
-
if (parentSection && parentSection.classList.contains('is-collapsed')) {
|
|
99
|
-
parentSection.classList.remove('is-collapsed');
|
|
100
|
-
var toggle = parentSection.querySelector('.inbox-section-toggle');
|
|
101
|
-
if (toggle) toggle.textContent = '收起';
|
|
102
|
-
}
|
|
103
|
-
var parentDetails = sec.closest ? sec.closest('details') : null;
|
|
104
|
-
if (parentDetails && !parentDetails.open) parentDetails.open = true;
|
|
105
|
-
var right = sec.closest ? sec.closest('.inbox-right') : document.querySelector('.inbox-right');
|
|
106
|
-
var canScrollRight = right && right.scrollHeight > right.clientHeight + 8 && window.getComputedStyle(right).overflowY !== 'visible';
|
|
107
|
-
if (canScrollRight) {
|
|
108
|
-
var rect = sec.getBoundingClientRect();
|
|
109
|
-
var rightRect = right.getBoundingClientRect();
|
|
110
|
-
right.scrollTop += rect.top - rightRect.top - 8;
|
|
111
|
-
} else {
|
|
112
|
-
var top = sec.getBoundingClientRect().top + (window.pageYOffset || document.documentElement.scrollTop || 0) - 88;
|
|
113
|
-
window.scrollTo({ top: Math.max(0, top), behavior: 'smooth' });
|
|
114
|
-
}
|
|
115
|
-
var activeDetail = sec.closest ? sec.closest('.inbox-detail-pane') : null;
|
|
116
|
-
var navs = activeDetail ? activeDetail.querySelectorAll('[data-inbox-nav]') : document.querySelectorAll('[data-inbox-nav]');
|
|
117
|
-
for (var i = 0; i < navs.length; i++) {
|
|
118
|
-
var match = navs[i].getAttribute('href') === '#' + id;
|
|
119
|
-
if (match) navs[i].classList.add('is-active');
|
|
120
|
-
else navs[i].classList.remove('is-active');
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function inboxJumpToEvidence(btn) {
|
|
124
|
-
var pane = btn && btn.closest ? btn.closest('.inbox-detail-pane') : null;
|
|
125
|
-
if (!pane) return;
|
|
126
|
-
var sessionPane = btn.closest ? btn.closest('[data-session-pane]') : null;
|
|
127
|
-
var sid = sessionPane ? sessionPane.getAttribute('data-session-pane') : pane.getAttribute('data-inbox-detail');
|
|
128
|
-
if (sid) scrollInboxSectionIntoView('inbox-sec-evidence-' + sid);
|
|
129
|
-
var messageUuid = btn.getAttribute('data-jump-message-uuid') || '';
|
|
130
|
-
var messageIndex = btn.getAttribute('data-jump-message-index') || '';
|
|
131
|
-
if (!messageUuid && !messageIndex) return;
|
|
132
|
-
window.setTimeout(function () {
|
|
133
|
-
var rows = pane.querySelectorAll('[data-message-uuid]');
|
|
134
|
-
for (var i = 0; i < rows.length; i++) {
|
|
135
|
-
var row = rows[i];
|
|
136
|
-
if (messageUuid && row.getAttribute('data-message-uuid') === messageUuid) {
|
|
137
|
-
row.scrollIntoView({ block: 'center' });
|
|
138
|
-
row.classList.add('is-flash');
|
|
139
|
-
window.setTimeout(function () { row.classList.remove('is-flash'); }, 1600);
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
if (!messageUuid && messageIndex && row.getAttribute('data-message-index') === messageIndex) {
|
|
143
|
-
row.scrollIntoView({ block: 'center' });
|
|
144
|
-
row.classList.add('is-flash');
|
|
145
|
-
window.setTimeout(function () { row.classList.remove('is-flash'); }, 1600);
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}, 240);
|
|
150
|
-
}
|
|
151
|
-
window.toggleInboxSection = toggleInboxSection;
|
|
152
|
-
window.toggleInboxSectionHead = toggleInboxSectionHead;
|
|
153
|
-
window.scrollInboxSectionIntoView = scrollInboxSectionIntoView;
|
|
154
|
-
window.inboxJumpToEvidence = inboxJumpToEvidence;
|
|
155
|
-
function selectInboxSessionTab(skillName, sessionId, btn) {
|
|
156
|
-
if (window.closeInboxSessionFlowPopover) window.closeInboxSessionFlowPopover();
|
|
157
|
-
var pane = inboxElementByAttribute('data-inbox-detail', skillName);
|
|
158
|
-
if (!pane) return;
|
|
159
|
-
var tabs = pane.querySelectorAll('[data-session-tab]');
|
|
160
|
-
for (var i = 0; i < tabs.length; i++) {
|
|
161
|
-
if (tabs[i].getAttribute('data-session-tab') === sessionId) tabs[i].classList.add('is-active');
|
|
162
|
-
else tabs[i].classList.remove('is-active');
|
|
163
|
-
}
|
|
164
|
-
var panes = pane.querySelectorAll('[data-session-pane]');
|
|
165
|
-
for (var j = 0; j < panes.length; j++) {
|
|
166
|
-
if (panes[j].getAttribute('data-session-pane') === sessionId) panes[j].classList.add('is-active');
|
|
167
|
-
else panes[j].classList.remove('is-active');
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
window.selectInboxSessionTab = selectInboxSessionTab;
|
|
171
|
-
function openInboxMetricPopover(card) {
|
|
172
|
-
var popover = document.getElementById('inbox-metric-popover');
|
|
173
|
-
if (!popover) return;
|
|
174
|
-
var label = card.getAttribute('data-metric-label') || '';
|
|
175
|
-
var value = card.getAttribute('data-metric-value') || '0';
|
|
176
|
-
var note = card.getAttribute('data-metric-note') || '';
|
|
177
|
-
var anomaly = card.getAttribute('data-metric-anomaly') === '1';
|
|
178
|
-
var jumpId = card.getAttribute('data-metric-jump') || '';
|
|
179
|
-
var detail = [];
|
|
180
|
-
try { detail = JSON.parse(card.getAttribute('data-metric-detail') || '[]'); } catch (err) { detail = []; }
|
|
181
|
-
var html = '<header class="inbox-metric-popover-head"><strong></strong><button type="button" class="inbox-metric-popover-close" aria-label="关闭">关闭</button></header>';
|
|
182
|
-
html += '<div class="inbox-metric-popover-body">';
|
|
183
|
-
html += '<div class="inbox-metric-popover-value' + (anomaly ? ' is-anomaly' : '') + '"></div>';
|
|
184
|
-
html += '<p class="inbox-metric-popover-note"></p>';
|
|
185
|
-
if (detail && detail.length > 0) {
|
|
186
|
-
html += '<ul class="inbox-metric-popover-list"></ul>';
|
|
187
|
-
}
|
|
188
|
-
if (anomaly && jumpId) {
|
|
189
|
-
html += '<button type="button" class="inbox-metric-popover-jump" data-jump-target>跳转原文回溯</button>';
|
|
190
|
-
}
|
|
191
|
-
html += '</div>';
|
|
192
|
-
popover.innerHTML = html;
|
|
193
|
-
var jumpButton = popover.querySelector('[data-jump-target]');
|
|
194
|
-
if (jumpButton) jumpButton.setAttribute('data-jump-target', jumpId);
|
|
195
|
-
popover.querySelector('.inbox-metric-popover-head strong').textContent = label;
|
|
196
|
-
popover.querySelector('.inbox-metric-popover-value').textContent = value;
|
|
197
|
-
popover.querySelector('.inbox-metric-popover-note').textContent = note;
|
|
198
|
-
var list = popover.querySelector('.inbox-metric-popover-list');
|
|
199
|
-
if (list && detail.length > 0) {
|
|
200
|
-
for (var i = 0; i < detail.length; i++) {
|
|
201
|
-
var li = document.createElement('li');
|
|
202
|
-
var n = document.createElement('span');
|
|
203
|
-
n.textContent = detail[i].name;
|
|
204
|
-
var c = document.createElement('span');
|
|
205
|
-
c.textContent = detail[i].count;
|
|
206
|
-
li.appendChild(n);
|
|
207
|
-
li.appendChild(c);
|
|
208
|
-
list.appendChild(li);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
popover.classList.add('is-open');
|
|
212
|
-
popover.setAttribute('aria-hidden', 'false');
|
|
213
|
-
var closeBtn = popover.querySelector('.inbox-metric-popover-close');
|
|
214
|
-
if (closeBtn) closeBtn.addEventListener('click', closeInboxMetricPopover);
|
|
215
|
-
var jumpBtn = popover.querySelector('.inbox-metric-popover-jump');
|
|
216
|
-
if (jumpBtn) jumpBtn.addEventListener('click', function () {
|
|
217
|
-
var id = jumpBtn.getAttribute('data-jump-target');
|
|
218
|
-
if (id) scrollInboxSectionIntoView(id);
|
|
219
|
-
closeInboxMetricPopover();
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
function closeInboxMetricPopover() {
|
|
223
|
-
var popover = document.getElementById('inbox-metric-popover');
|
|
224
|
-
if (!popover) return;
|
|
225
|
-
popover.classList.remove('is-open');
|
|
226
|
-
popover.setAttribute('aria-hidden', 'true');
|
|
227
|
-
popover.innerHTML = '';
|
|
228
|
-
}
|
|
229
|
-
document.addEventListener('click', function (event) {
|
|
230
|
-
var target = event.target;
|
|
231
|
-
if (target && target.closest && (target.closest('.inbox-metric-card') || target.closest('#inbox-metric-popover'))) return;
|
|
232
|
-
var popover = document.getElementById('inbox-metric-popover');
|
|
233
|
-
if (popover && popover.classList.contains('is-open')) closeInboxMetricPopover();
|
|
234
|
-
});
|
|
235
|
-
document.addEventListener('keydown', function (event) {
|
|
236
|
-
if (event.key === 'Escape') closeInboxMetricPopover();
|
|
237
|
-
});
|
|
238
|
-
window.openInboxMetricPopover = openInboxMetricPopover;
|
|
239
|
-
window.closeInboxMetricPopover = closeInboxMetricPopover;
|
|
240
|
-
function inboxNormalizeSearch(value) {
|
|
241
|
-
return String(value || '').trim().toLowerCase();
|
|
242
|
-
}
|
|
243
|
-
function inboxSearchInput(selector) {
|
|
244
|
-
var input = document.querySelector(selector);
|
|
245
|
-
return input ? inboxNormalizeSearch(input.value) : '';
|
|
246
|
-
}
|
|
247
|
-
function inboxTextMatches(text, query) {
|
|
248
|
-
if (!query) return true;
|
|
249
|
-
return inboxNormalizeSearch(text).indexOf(query) >= 0;
|
|
250
|
-
}
|
|
251
|
-
function activeInboxSearch() {
|
|
252
|
-
return {
|
|
253
|
-
skill: inboxSearchInput('[data-inbox-skill-search-input]'),
|
|
254
|
-
session: inboxSearchInput('[data-inbox-session-search-input]')
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function inboxCardMatchesCurrentSearch(card, search) {
|
|
258
|
-
var filters = (card.getAttribute('data-inbox-filters') || '').split(/\\s+/);
|
|
259
|
-
var filterMatch = filters.indexOf(inboxCurrentFilter) >= 0;
|
|
260
|
-
var skillMatch = inboxTextMatches(card.getAttribute('data-inbox-skill-search') || card.getAttribute('data-inbox-card') || '', search.skill);
|
|
261
|
-
var sessionMatch = inboxTextMatches(card.getAttribute('data-inbox-session-search') || '', search.session);
|
|
262
|
-
return filterMatch && skillMatch && sessionMatch;
|
|
263
|
-
}
|
|
264
|
-
function setInboxNoResultVisible(visible) {
|
|
265
|
-
var empty = document.querySelector('[data-inbox-no-results]');
|
|
266
|
-
if (empty) empty.style.display = visible ? '' : 'none';
|
|
267
|
-
}
|
|
268
|
-
function updateInboxSearchCount(visibleCount, totalCount) {
|
|
269
|
-
var el = document.querySelector('[data-inbox-search-count]');
|
|
270
|
-
if (!el) return;
|
|
271
|
-
var search = activeInboxSearch();
|
|
272
|
-
var searching = Boolean(search.skill || search.session || inboxCurrentFilter !== 'all');
|
|
273
|
-
el.textContent = searching ? visibleCount + ' / ' + totalCount + ' 条复盘' : totalCount + ' 条复盘';
|
|
274
|
-
}
|
|
275
|
-
function clearInboxActiveSelection() {
|
|
276
|
-
var cards = document.querySelectorAll('[data-inbox-card]');
|
|
277
|
-
for (var i = 0; i < cards.length; i++) cards[i].classList.remove('is-active');
|
|
278
|
-
var panes = document.querySelectorAll('[data-inbox-detail]');
|
|
279
|
-
for (var j = 0; j < panes.length; j++) panes[j].classList.remove('is-active');
|
|
280
|
-
}
|
|
281
|
-
function applyInboxSessionSearchForPane(pane) {
|
|
282
|
-
if (!pane) return;
|
|
283
|
-
var query = inboxSearchInput('[data-inbox-session-search-input]');
|
|
284
|
-
var tabItems = pane.querySelectorAll('[data-session-tab-item]');
|
|
285
|
-
var sessionPanes = pane.querySelectorAll('[data-session-pane]');
|
|
286
|
-
var firstVisibleTab = null;
|
|
287
|
-
var activeVisible = null;
|
|
288
|
-
for (var i = 0; i < tabItems.length; i++) {
|
|
289
|
-
var item = tabItems[i];
|
|
290
|
-
var text = item.getAttribute('data-session-search') || '';
|
|
291
|
-
var visible = inboxTextMatches(text, query);
|
|
292
|
-
item.style.display = visible ? '' : 'none';
|
|
293
|
-
var tab = item.querySelector('[data-session-tab]');
|
|
294
|
-
if (visible && !firstVisibleTab) firstVisibleTab = tab;
|
|
295
|
-
if (visible && tab && tab.classList.contains('is-active')) activeVisible = tab;
|
|
296
|
-
}
|
|
297
|
-
for (var j = 0; j < sessionPanes.length; j++) {
|
|
298
|
-
var sessionPane = sessionPanes[j];
|
|
299
|
-
var paneText = sessionPane.getAttribute('data-session-search') || '';
|
|
300
|
-
var paneVisible = inboxTextMatches(paneText, query);
|
|
301
|
-
sessionPane.style.display = paneVisible ? '' : 'none';
|
|
302
|
-
if (!paneVisible) sessionPane.classList.remove('is-active');
|
|
303
|
-
}
|
|
304
|
-
var nextTab = activeVisible || firstVisibleTab;
|
|
305
|
-
if (nextTab) {
|
|
306
|
-
selectInboxSessionTab(pane.getAttribute('data-inbox-detail') || '', nextTab.getAttribute('data-session-tab'), nextTab);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
function applyInboxFilters() {
|
|
310
|
-
var cards = document.querySelectorAll('[data-inbox-card]');
|
|
311
|
-
var search = activeInboxSearch();
|
|
312
|
-
var firstVisible = null;
|
|
313
|
-
var activeVisible = null;
|
|
314
|
-
var visibleCount = 0;
|
|
315
|
-
for (var i = 0; i < cards.length; i++) {
|
|
316
|
-
var card = cards[i];
|
|
317
|
-
var visible = inboxCardMatchesCurrentSearch(card, search);
|
|
318
|
-
card.style.display = visible ? '' : 'none';
|
|
319
|
-
if (visible) {
|
|
320
|
-
visibleCount += 1;
|
|
321
|
-
if (!firstVisible) firstVisible = card;
|
|
322
|
-
if (card.classList.contains('is-active')) activeVisible = card;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
updateInboxSearchCount(visibleCount, cards.length);
|
|
326
|
-
setInboxNoResultVisible(visibleCount === 0);
|
|
327
|
-
if (visibleCount === 0) {
|
|
328
|
-
clearInboxActiveSelection();
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
selectInboxCard((activeVisible || firstVisible).getAttribute('data-inbox-card'), activeVisible || firstVisible);
|
|
332
|
-
}
|
|
333
|
-
function clearInboxSearch() {
|
|
334
|
-
var skill = document.querySelector('[data-inbox-skill-search-input]');
|
|
335
|
-
var session = document.querySelector('[data-inbox-session-search-input]');
|
|
336
|
-
if (skill) skill.value = '';
|
|
337
|
-
if (session) session.value = '';
|
|
338
|
-
applyInboxFilters();
|
|
339
|
-
}
|
|
340
|
-
function setInboxFilter(filter, btn) {
|
|
341
|
-
inboxCurrentFilter = filter;
|
|
342
|
-
var chips = document.querySelectorAll('[data-inbox-filter]');
|
|
343
|
-
for (var i = 0; i < chips.length; i++) {
|
|
344
|
-
var active = chips[i].getAttribute('data-inbox-filter') === filter;
|
|
345
|
-
if (active) chips[i].classList.add('is-active');
|
|
346
|
-
else chips[i].classList.remove('is-active');
|
|
347
|
-
}
|
|
348
|
-
applyInboxFilters();
|
|
349
|
-
}
|
|
350
|
-
window.applyInboxFilters = applyInboxFilters;
|
|
351
|
-
window.clearInboxSearch = clearInboxSearch;
|
|
352
|
-
async function setInboxSessionReview(sessionId, verdict, btn) {
|
|
353
|
-
var actionBlock = inboxElementsByAttribute('data-inbox-session-id', sessionId).find(function(el) { return el.hasAttribute('data-inbox-detail-actions'); });
|
|
354
|
-
var note = '';
|
|
355
|
-
if (verdict === 'needs_more_context') {
|
|
356
|
-
var input = inboxElementByAttribute('data-inbox-note-input', sessionId);
|
|
357
|
-
note = input ? input.value : '';
|
|
358
|
-
}
|
|
359
|
-
try {
|
|
360
|
-
var payload = { targetType: 'experience_session', targetId: sessionId, verdict: verdict };
|
|
361
|
-
if (note) payload.reason = note;
|
|
362
|
-
var resp = await fetch('/api/observe-inbox/review-state', {
|
|
363
|
-
method: 'POST',
|
|
364
|
-
headers: { 'Content-Type': 'application/json' },
|
|
365
|
-
body: JSON.stringify(payload),
|
|
366
|
-
});
|
|
367
|
-
if (!resp.ok) throw new Error('failed');
|
|
368
|
-
if (actionBlock) {
|
|
369
|
-
var buttons = actionBlock.querySelectorAll('.inbox-action-button');
|
|
370
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
371
|
-
if (buttons[i].getAttribute('data-inbox-verdict') === verdict) buttons[i].classList.add('is-active');
|
|
372
|
-
else buttons[i].classList.remove('is-active');
|
|
373
|
-
}
|
|
374
|
-
var summary = actionBlock.querySelector('.inbox-section-review-button');
|
|
375
|
-
if (summary) summary.textContent = '人工标注(1)';
|
|
376
|
-
}
|
|
377
|
-
var currentPane = actionBlock && actionBlock.closest ? actionBlock.closest('[data-inbox-detail]') : null;
|
|
378
|
-
var cardId = currentPane ? currentPane.getAttribute('data-inbox-detail') : sessionId;
|
|
379
|
-
var card = inboxElementByAttribute('data-inbox-card', cardId);
|
|
380
|
-
if (card) {
|
|
381
|
-
var filters = (card.getAttribute('data-inbox-filters') || '').split(/\\s+/);
|
|
382
|
-
if (filters.indexOf('reviewed') < 0) filters.push('reviewed');
|
|
383
|
-
card.setAttribute('data-inbox-filters', filters.join(' '));
|
|
384
|
-
var existing = card.querySelector('.inbox-card-state');
|
|
385
|
-
if (existing) existing.remove();
|
|
386
|
-
var labels = { real_issue: { label: '已同意', cls: 'is-agree' }, not_issue: { label: '已否决', cls: 'is-reject' }, needs_more_context: { label: '留意见', cls: 'is-note' } };
|
|
387
|
-
var meta = labels[verdict];
|
|
388
|
-
if (meta) {
|
|
389
|
-
var span = document.createElement('span');
|
|
390
|
-
span.className = 'inbox-card-state ' + meta.cls;
|
|
391
|
-
span.textContent = meta.label;
|
|
392
|
-
var titleRow = card.querySelector('.inbox-card-row-title');
|
|
393
|
-
if (titleRow) titleRow.appendChild(span);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
} catch (err) {
|
|
397
|
-
if (window.console) console.error('inbox review failed', err);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function toggleInboxNoteEditor(sessionId, btn) {
|
|
401
|
-
var editor = inboxElementByAttribute('data-inbox-note-editor', sessionId);
|
|
402
|
-
if (!editor) return;
|
|
403
|
-
editor.style.display = 'block';
|
|
404
|
-
var input = editor.querySelector('textarea');
|
|
405
|
-
if (input) input.focus();
|
|
406
|
-
}
|
|
407
|
-
function closeInboxNoteEditor(sessionId) {
|
|
408
|
-
var editor = inboxElementByAttribute('data-inbox-note-editor', sessionId);
|
|
409
|
-
if (editor) editor.style.display = 'none';
|
|
410
|
-
}
|
|
411
|
-
function saveInboxSessionNote(sessionId, btn) {
|
|
412
|
-
setInboxSessionReview(sessionId, 'needs_more_context', btn);
|
|
413
|
-
}
|
|
414
|
-
window.selectInboxCard = selectInboxCard;
|
|
415
|
-
window.setInboxFilter = setInboxFilter;
|
|
416
|
-
window.setInboxSessionReview = setInboxSessionReview;
|
|
417
|
-
window.toggleInboxNoteEditor = toggleInboxNoteEditor;
|
|
418
|
-
window.closeInboxNoteEditor = closeInboxNoteEditor;
|
|
419
|
-
window.saveInboxSessionNote = saveInboxSessionNote;
|
|
420
|
-
function showObservationTab(name) {
|
|
421
|
-
var review = document.getElementById('observe-tab-review');
|
|
422
|
-
var raw = document.getElementById('observe-tab-raw');
|
|
423
|
-
if (review) review.style.display = name === 'review' ? '' : 'none';
|
|
424
|
-
if (raw) raw.style.display = name === 'raw' ? '' : 'none';
|
|
425
|
-
var buttons = document.querySelectorAll('[data-observe-tab-button]');
|
|
426
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
427
|
-
var active = buttons[i].getAttribute('data-observe-tab-button') === name;
|
|
428
|
-
buttons[i].style.background = active ? 'var(--bg-surface)' : 'var(--bg)';
|
|
429
|
-
buttons[i].style.fontWeight = active ? '600' : '400';
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
function toggleObservationDetail(id, btn) {
|
|
433
|
-
var row = document.getElementById(id);
|
|
434
|
-
if (!row) return;
|
|
435
|
-
var open = row.style.display !== 'none';
|
|
436
|
-
row.style.display = open ? 'none' : 'table-row';
|
|
437
|
-
if (btn) btn.textContent = open ? '${lang === 'zh' ? '展开' : 'Details'}' : '${lang === 'zh' ? '收起' : 'Hide'}';
|
|
438
|
-
}
|
|
439
|
-
function closeExperienceDetailModal() {
|
|
440
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
441
|
-
if (!modal) return;
|
|
442
|
-
if (window.closeGoalSliceCorrectionPopovers) window.closeGoalSliceCorrectionPopovers();
|
|
443
|
-
modal.classList.remove('is-open');
|
|
444
|
-
modal.setAttribute('aria-hidden', 'true');
|
|
445
|
-
modal.innerHTML = '';
|
|
446
|
-
}
|
|
447
|
-
function openExperienceDetailModal(id, btn, initialTab) {
|
|
448
|
-
var row = document.getElementById(id);
|
|
449
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
450
|
-
if (!row || !modal) return;
|
|
451
|
-
var cell = row.querySelector('td');
|
|
452
|
-
if (!cell) return;
|
|
453
|
-
var title = 'Session 回溯详情';
|
|
454
|
-
var sessionRow = btn && btn.closest ? btn.closest('tr') : null;
|
|
455
|
-
var sessionCell = sessionRow ? sessionRow.children[1] : null;
|
|
456
|
-
if (sessionCell) title = 'Session 回溯详情 · ' + (sessionCell.textContent || '').trim().replace(/\\s+/g, ' ').slice(0, 96);
|
|
457
|
-
modal.innerHTML = '<div class="experience-detail-dialog" role="document"><div class="experience-detail-modal-header"><div class="experience-detail-modal-title"></div><button type="button" class="experience-detail-modal-close" data-experience-detail-close>关闭</button></div><div class="experience-detail-modal-body"></div></div>';
|
|
458
|
-
modal.querySelector('.experience-detail-modal-title').textContent = title;
|
|
459
|
-
modal.querySelector('.experience-detail-modal-body').innerHTML = cell.innerHTML;
|
|
460
|
-
var close = modal.querySelector('[data-experience-detail-close]');
|
|
461
|
-
if (close) close.addEventListener('click', function (event) {
|
|
462
|
-
event.stopPropagation();
|
|
463
|
-
closeExperienceDetailModal();
|
|
464
|
-
});
|
|
465
|
-
modal.classList.add('is-open');
|
|
466
|
-
modal.setAttribute('aria-hidden', 'false');
|
|
467
|
-
if (close && close.focus) close.focus();
|
|
468
|
-
window.requestAnimationFrame(function () {
|
|
469
|
-
if (initialTab) switchExperienceDetailTab(initialTab);
|
|
470
|
-
var tabs = modal.querySelectorAll('[data-timeline-tabs]');
|
|
471
|
-
for (var i = 0; i < tabs.length; i++) {
|
|
472
|
-
var base = tabs[i].getAttribute('data-timeline-tabs');
|
|
473
|
-
if (base) switchTimelineGoalTab(base, 0);
|
|
474
|
-
}
|
|
475
|
-
if (window.refreshTimelineFullTextState) window.refreshTimelineFullTextState();
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
function openContextChainModal(id, btn) {
|
|
479
|
-
var row = document.getElementById(id);
|
|
480
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
481
|
-
if (!row || !modal) return;
|
|
482
|
-
var cell = row.querySelector('td');
|
|
483
|
-
if (!cell) return;
|
|
484
|
-
var title = 'Context Chain';
|
|
485
|
-
var skillRow = btn && btn.closest ? btn.closest('tr') : null;
|
|
486
|
-
var skillCell = skillRow ? skillRow.children[0] : null;
|
|
487
|
-
if (skillCell) title = 'Context Chain · ' + (skillCell.textContent || '').trim().replace(/\\s+/g, ' ').slice(0, 96);
|
|
488
|
-
modal.innerHTML = '<div class="experience-detail-dialog" role="document"><div class="experience-detail-modal-header"><div class="experience-detail-modal-title"></div><button type="button" class="experience-detail-modal-close" data-experience-detail-close>关闭</button></div><div class="experience-detail-modal-body"></div></div>';
|
|
489
|
-
modal.querySelector('.experience-detail-modal-title').textContent = title;
|
|
490
|
-
modal.querySelector('.experience-detail-modal-body').innerHTML = cell.innerHTML;
|
|
491
|
-
var close = modal.querySelector('[data-experience-detail-close]');
|
|
492
|
-
if (close) close.addEventListener('click', function (event) {
|
|
493
|
-
event.stopPropagation();
|
|
494
|
-
closeExperienceDetailModal();
|
|
495
|
-
});
|
|
496
|
-
modal.classList.add('is-open');
|
|
497
|
-
modal.setAttribute('aria-hidden', 'false');
|
|
498
|
-
if (close && close.focus) close.focus();
|
|
499
|
-
}
|
|
500
|
-
function switchExperienceDetailTab(name) {
|
|
501
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
502
|
-
if (!modal) return;
|
|
503
|
-
var buttons = modal.querySelectorAll('[data-experience-detail-tab]');
|
|
504
|
-
var panels = modal.querySelectorAll('[data-experience-detail-panel]');
|
|
505
|
-
if (!buttons.length || !panels.length) return;
|
|
506
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
507
|
-
var activeButton = buttons[i].getAttribute('data-experience-detail-tab') === name;
|
|
508
|
-
buttons[i].classList.toggle('is-active', activeButton);
|
|
509
|
-
buttons[i].setAttribute('aria-selected', activeButton ? 'true' : 'false');
|
|
510
|
-
}
|
|
511
|
-
for (var j = 0; j < panels.length; j++) {
|
|
512
|
-
panels[j].classList.toggle('is-active', panels[j].getAttribute('data-experience-detail-panel') === name);
|
|
513
|
-
}
|
|
514
|
-
if (name === 'evidence') {
|
|
515
|
-
window.requestAnimationFrame(function () {
|
|
516
|
-
if (window.refreshTimelineFullTextState) window.refreshTimelineFullTextState();
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
function switchTimelineGoalTab(tabBaseId, index) {
|
|
521
|
-
var selector = '[data-timeline-tabs="' + tabBaseId.replace(/"/g, '\\"') + '"]';
|
|
522
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
523
|
-
var root = modal && modal.classList.contains('is-open') ? modal.querySelector(selector) : null;
|
|
524
|
-
if (!root) root = document.querySelector(selector);
|
|
525
|
-
if (!root) return;
|
|
526
|
-
var buttons = root.querySelectorAll('[data-timeline-tab]');
|
|
527
|
-
var panels = root.querySelectorAll('[data-timeline-panel]');
|
|
528
|
-
var target = tabBaseId + '-' + index;
|
|
529
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
530
|
-
var active = buttons[i].getAttribute('data-timeline-tab') === target;
|
|
531
|
-
buttons[i].classList.toggle('is-active', active);
|
|
532
|
-
buttons[i].setAttribute('aria-selected', active ? 'true' : 'false');
|
|
533
|
-
}
|
|
534
|
-
for (var j = 0; j < panels.length; j++) {
|
|
535
|
-
panels[j].classList.toggle('is-active', panels[j].getAttribute('data-timeline-panel') === target);
|
|
536
|
-
}
|
|
537
|
-
var toolbar = root.closest ? root.closest('.experience-detail-right') : null;
|
|
538
|
-
var select = toolbar ? toolbar.querySelector('[data-timeline-tag-filter]') : null;
|
|
539
|
-
if (select) filterTimelineByTag(select);
|
|
540
|
-
}
|
|
541
|
-
function toggleFullSessionTimeline(btn) {
|
|
542
|
-
var root = btn && btn.closest ? btn.closest('.experience-detail-right') : null;
|
|
543
|
-
if (!root) return;
|
|
544
|
-
var segment = root.querySelector('[data-timeline-view="segment"]');
|
|
545
|
-
var full = root.querySelector('[data-timeline-view="full-session"]');
|
|
546
|
-
if (!segment || !full) return;
|
|
547
|
-
var showFull = full.style.display === 'none';
|
|
548
|
-
full.style.display = showFull ? '' : 'none';
|
|
549
|
-
segment.style.display = showFull ? 'none' : '';
|
|
550
|
-
btn.textContent = showFull ? '返回 skill 窗口时间线' : '查看完整 session 时间线';
|
|
551
|
-
window.requestAnimationFrame(function () {
|
|
552
|
-
var tabs = root.querySelectorAll('[data-timeline-tabs]');
|
|
553
|
-
for (var i = 0; i < tabs.length; i++) {
|
|
554
|
-
var base = tabs[i].getAttribute('data-timeline-tabs');
|
|
555
|
-
if (base) switchTimelineGoalTab(base, 0);
|
|
556
|
-
}
|
|
557
|
-
var select = root.querySelector('[data-timeline-tag-filter]');
|
|
558
|
-
if (select) filterTimelineByTag(select);
|
|
559
|
-
if (window.refreshTimelineFullTextState) window.refreshTimelineFullTextState();
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
function filterTimelineByTag(select) {
|
|
563
|
-
var root = select && select.closest ? select.closest('.experience-detail-right') : null;
|
|
564
|
-
if (!root) root = document;
|
|
565
|
-
var value = select ? String(select.value || '') : '';
|
|
566
|
-
var rows = root.querySelectorAll('.timeline-row');
|
|
567
|
-
var markers = root.querySelectorAll('.timeline-window-marker');
|
|
568
|
-
var count = 0;
|
|
569
|
-
for (var i = 0; i < rows.length; i++) {
|
|
570
|
-
var tags = String(rows[i].getAttribute('data-timeline-tags') || '').split(/\\s+/);
|
|
571
|
-
var match = !value || tags.indexOf(value) !== -1;
|
|
572
|
-
rows[i].classList.toggle('is-filter-hidden', !match);
|
|
573
|
-
rows[i].classList.toggle('is-filter-match', Boolean(value && match));
|
|
574
|
-
if (match && value) count += 1;
|
|
575
|
-
}
|
|
576
|
-
for (var j = 0; j < markers.length; j++) {
|
|
577
|
-
markers[j].style.display = value ? 'none' : '';
|
|
578
|
-
}
|
|
579
|
-
var text = root.querySelector('[data-timeline-filter-count]');
|
|
580
|
-
if (text) text.textContent = value ? ('命中 ' + count + ' 条;只统计当前 skill 相关标签。') : '选择标签后,只显示当前回溯里的命中事件。';
|
|
581
|
-
}
|
|
582
|
-
function findExperienceTimelineRow(root, messageIndex, messageUuid) {
|
|
583
|
-
if (!root) return null;
|
|
584
|
-
var rows = root.querySelectorAll('.timeline-row');
|
|
585
|
-
if (messageUuid) {
|
|
586
|
-
for (var i = 0; i < rows.length; i++) {
|
|
587
|
-
if (rows[i].getAttribute('data-message-uuid') === messageUuid) return rows[i];
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
if (messageIndex !== '') {
|
|
591
|
-
for (var j = 0; j < rows.length; j++) {
|
|
592
|
-
if (rows[j].getAttribute('data-message-index') === String(messageIndex)) return rows[j];
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
return null;
|
|
596
|
-
}
|
|
597
|
-
function focusExperienceTimelineRow(row) {
|
|
598
|
-
if (!row) return;
|
|
599
|
-
var fullView = row.closest ? row.closest('[data-timeline-view="full-session"]') : null;
|
|
600
|
-
if (fullView && fullView.style.display === 'none') {
|
|
601
|
-
var right = fullView.closest ? fullView.closest('.experience-detail-right') : null;
|
|
602
|
-
var toggle = right ? right.querySelector('[data-full-session-toggle]') : null;
|
|
603
|
-
if (toggle) toggleFullSessionTimeline(toggle);
|
|
604
|
-
}
|
|
605
|
-
var panel = row.closest ? row.closest('.timeline-tab-panel') : null;
|
|
606
|
-
if (panel && !panel.classList.contains('is-active')) {
|
|
607
|
-
var tabsRoot = panel.closest('[data-timeline-tabs]');
|
|
608
|
-
var base = tabsRoot ? tabsRoot.getAttribute('data-timeline-tabs') : '';
|
|
609
|
-
var panelId = panel.getAttribute('data-timeline-panel') || '';
|
|
610
|
-
if (base && panelId.indexOf(base + '-') === 0) {
|
|
611
|
-
var index = Number(panelId.slice(base.length + 1));
|
|
612
|
-
if (!Number.isNaN(index)) switchTimelineGoalTab(base, index);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
window.requestAnimationFrame(function () {
|
|
616
|
-
row.classList.add('is-cta-focus');
|
|
617
|
-
if (row.scrollIntoView) row.scrollIntoView({ block: 'center', inline: 'nearest' });
|
|
618
|
-
var scrollPanel = row.closest ? (row.closest('.timeline-tab-panel') || row.closest('.session-timeline-tree') || row.closest('.experience-detail-tab-panel')) : null;
|
|
619
|
-
if (scrollPanel && typeof row.offsetTop === 'number') {
|
|
620
|
-
scrollPanel.scrollTop = Math.max(0, row.offsetTop - 80);
|
|
621
|
-
}
|
|
622
|
-
window.setTimeout(function () { row.classList.remove('is-cta-focus'); }, 1800);
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
function jumpToExperienceMessage(btn) {
|
|
626
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
627
|
-
if (!modal || !btn) return;
|
|
628
|
-
switchExperienceDetailTab('evidence');
|
|
629
|
-
window.requestAnimationFrame(function () {
|
|
630
|
-
var evidencePanel = modal.querySelector('[data-experience-detail-panel="evidence"]') || modal;
|
|
631
|
-
var messageIndex = btn.getAttribute('data-jump-message-index') || '';
|
|
632
|
-
var messageUuid = btn.getAttribute('data-jump-message-uuid') || '';
|
|
633
|
-
var segmentView = evidencePanel.querySelector('[data-timeline-view="segment"]');
|
|
634
|
-
var row = findExperienceTimelineRow(segmentView, messageIndex, messageUuid) || findExperienceTimelineRow(evidencePanel, messageIndex, messageUuid);
|
|
635
|
-
focusExperienceTimelineRow(row);
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
function openExperienceSessionById(sessionId, tag) {
|
|
639
|
-
if (!sessionId) return;
|
|
640
|
-
var rows = document.querySelectorAll('[data-observe-experience-session]');
|
|
641
|
-
var row = null;
|
|
642
|
-
for (var i = 0; i < rows.length; i++) {
|
|
643
|
-
if (rows[i].getAttribute('data-experience-session-id') === sessionId) {
|
|
644
|
-
row = rows[i];
|
|
645
|
-
break;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
if (!row) return;
|
|
649
|
-
var details = row.closest ? row.closest('details') : null;
|
|
650
|
-
if (details) details.open = true;
|
|
651
|
-
var top = row.getBoundingClientRect().top + window.pageYOffset - 90;
|
|
652
|
-
window.scrollTo({ top: Math.max(0, top), behavior: 'smooth' });
|
|
653
|
-
var button = row.querySelector('[data-open-experience-detail]');
|
|
654
|
-
if (button) button.click();
|
|
655
|
-
window.setTimeout(function () {
|
|
656
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
657
|
-
if (!modal || !modal.classList.contains('is-open')) return;
|
|
658
|
-
if (tag) switchExperienceDetailTab('evidence');
|
|
659
|
-
var evidencePanel = modal.querySelector('[data-experience-detail-panel="evidence"]') || modal;
|
|
660
|
-
var select = evidencePanel.querySelector('[data-timeline-tag-filter]');
|
|
661
|
-
if (select && tag) {
|
|
662
|
-
select.value = tag;
|
|
663
|
-
filterTimelineByTag(select);
|
|
664
|
-
}
|
|
665
|
-
var target = tag ? evidencePanel.querySelector('.timeline-row.is-filter-match') : evidencePanel.querySelector('.timeline-row');
|
|
666
|
-
if (!target) return;
|
|
667
|
-
focusExperienceTimelineRow(target);
|
|
668
|
-
}, 160);
|
|
669
|
-
}
|
|
670
|
-
window.openExperienceDetailModal = openExperienceDetailModal;
|
|
671
|
-
window.openContextChainModal = openContextChainModal;
|
|
672
|
-
window.closeExperienceDetailModal = closeExperienceDetailModal;
|
|
673
|
-
window.switchExperienceDetailTab = switchExperienceDetailTab;
|
|
674
|
-
window.setReviewerJudgmentReview = setReviewerJudgmentReview;
|
|
675
|
-
window.openReviewerJudgmentNote = openReviewerJudgmentNote;
|
|
676
|
-
window.setSoftStandardStatus = setSoftStandardStatus;
|
|
677
|
-
window.switchTimelineGoalTab = switchTimelineGoalTab;
|
|
678
|
-
window.toggleFullSessionTimeline = toggleFullSessionTimeline;
|
|
679
|
-
window.filterTimelineByTag = filterTimelineByTag;
|
|
680
|
-
window.jumpToExperienceMessage = jumpToExperienceMessage;
|
|
681
|
-
window.openExperienceSessionById = openExperienceSessionById;
|
|
682
|
-
(function setupExperienceDetailModal() {
|
|
683
|
-
var modal = document.getElementById('experience-detail-modal');
|
|
684
|
-
if (!modal) return;
|
|
685
|
-
modal.addEventListener('click', function (event) {
|
|
686
|
-
if (event.target === modal) closeExperienceDetailModal();
|
|
687
|
-
});
|
|
688
|
-
document.addEventListener('keydown', function (event) {
|
|
689
|
-
if (event.key === 'Escape' && modal.classList.contains('is-open')) closeExperienceDetailModal();
|
|
690
|
-
});
|
|
691
|
-
})();
|
|
692
|
-
document.addEventListener('click', function (event) {
|
|
693
|
-
var target = event.target;
|
|
694
|
-
var trigger = target && target.closest ? target.closest('[data-open-experience-session]') : null;
|
|
695
|
-
if (!trigger) return;
|
|
696
|
-
event.preventDefault();
|
|
697
|
-
event.stopPropagation();
|
|
698
|
-
openExperienceSessionById(trigger.getAttribute('data-open-experience-session'), trigger.getAttribute('data-open-timeline-tag') || '');
|
|
699
|
-
});
|
|
700
|
-
// 复制 advisory 命令到剪贴板:data-copy-source 上挂命令文本。
|
|
701
|
-
document.addEventListener('click', function (event) {
|
|
702
|
-
var target = event.target;
|
|
703
|
-
var btn = target && target.closest ? target.closest('[data-copy-source]') : null;
|
|
704
|
-
if (!btn) return;
|
|
705
|
-
event.preventDefault();
|
|
706
|
-
event.stopPropagation();
|
|
707
|
-
var cmd = btn.getAttribute('data-copy-source') || '';
|
|
708
|
-
var done = function () {
|
|
709
|
-
var prev = btn.textContent;
|
|
710
|
-
btn.classList.add('is-copied');
|
|
711
|
-
btn.textContent = '已复制';
|
|
712
|
-
setTimeout(function () {
|
|
713
|
-
btn.classList.remove('is-copied');
|
|
714
|
-
btn.textContent = prev;
|
|
715
|
-
}, 1500);
|
|
716
|
-
};
|
|
717
|
-
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
718
|
-
navigator.clipboard.writeText(cmd).then(done).catch(function () {
|
|
719
|
-
fallbackCopy(cmd); done();
|
|
720
|
-
});
|
|
721
|
-
} else {
|
|
722
|
-
fallbackCopy(cmd); done();
|
|
723
|
-
}
|
|
724
|
-
});
|
|
725
|
-
function fallbackCopy(text) {
|
|
726
|
-
try {
|
|
727
|
-
var ta = document.createElement('textarea');
|
|
728
|
-
ta.value = text;
|
|
729
|
-
ta.style.position = 'fixed';
|
|
730
|
-
ta.style.opacity = '0';
|
|
731
|
-
document.body.appendChild(ta);
|
|
732
|
-
ta.select();
|
|
733
|
-
document.execCommand('copy');
|
|
734
|
-
document.body.removeChild(ta);
|
|
735
|
-
} catch (err) {}
|
|
736
|
-
}
|
|
737
|
-
function toggleScoringGuide(btn) {
|
|
738
|
-
var guide = document.getElementById('observe-scoring-guide');
|
|
739
|
-
if (!guide) return;
|
|
740
|
-
var open = guide.style.display !== 'none';
|
|
741
|
-
guide.style.display = open ? 'none' : 'block';
|
|
742
|
-
if (btn) btn.textContent = open ? '查看判断标准' : '收起判断标准';
|
|
743
|
-
}
|
|
744
|
-
window.toggleMetricGuide = function toggleMetricGuide() {
|
|
745
|
-
var panel = document.getElementById('metric-guide-panel');
|
|
746
|
-
if (!panel) return;
|
|
747
|
-
panel.style.display = panel.style.display === 'block' ? 'none' : 'block';
|
|
748
|
-
};
|
|
749
|
-
window.closeMetricGuide = function closeMetricGuide() {
|
|
750
|
-
var panel = document.getElementById('metric-guide-panel');
|
|
751
|
-
if (panel) panel.style.display = 'none';
|
|
752
|
-
};
|
|
753
|
-
window.openMetricGuide = function openMetricGuide(key) {
|
|
754
|
-
var panel = document.getElementById('metric-guide-panel');
|
|
755
|
-
if (!panel) return;
|
|
756
|
-
panel.style.display = 'block';
|
|
757
|
-
var items = panel.querySelectorAll('[data-metric-guide-key]');
|
|
758
|
-
var target = null;
|
|
759
|
-
for (var i = 0; i < items.length; i++) {
|
|
760
|
-
var active = items[i].getAttribute('data-metric-guide-key') === key;
|
|
761
|
-
items[i].classList.toggle('is-active', active);
|
|
762
|
-
if (active) target = items[i];
|
|
763
|
-
}
|
|
764
|
-
if (target && target.scrollIntoView) target.scrollIntoView({ block: 'nearest' });
|
|
765
|
-
};
|
|
766
|
-
async function openObservationTrace(id, btn) {
|
|
767
|
-
var target = document.getElementById('trace-' + id);
|
|
768
|
-
if (!target) return;
|
|
769
|
-
var open = target.style.display !== 'none';
|
|
770
|
-
if (open) {
|
|
771
|
-
target.style.display = 'none';
|
|
772
|
-
if (btn) btn.textContent = 'Open in trace';
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
target.style.display = 'block';
|
|
776
|
-
target.textContent = 'Loading...';
|
|
777
|
-
if (btn) btn.textContent = 'Hide trace';
|
|
778
|
-
try {
|
|
779
|
-
var res = await fetch('/api/observe-inbox/show?id=' + encodeURIComponent(id));
|
|
780
|
-
var data = await res.json();
|
|
781
|
-
target.textContent = data.text || data.error || '';
|
|
782
|
-
} catch (err) {
|
|
783
|
-
target.textContent = String(err && err.message ? err.message : err);
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
function reviewVerdictClass(verdict) {
|
|
787
|
-
if (verdict === 'real_issue') return 'review-real-issue';
|
|
788
|
-
if (verdict === 'not_issue') return 'review-not-issue';
|
|
789
|
-
if (verdict === 'needs_more_context') return 'review-needs-context';
|
|
790
|
-
if (verdict === 'reviewed') return 'review-reviewed';
|
|
791
|
-
return '';
|
|
792
|
-
}
|
|
793
|
-
async function setObservationReviewState(targetType, targetId, verdict, btn) {
|
|
794
|
-
if (btn) btn.disabled = true;
|
|
795
|
-
var current = btn && btn.closest('[data-review-state-key]')
|
|
796
|
-
? btn.closest('[data-review-state-key]').getAttribute('data-review-state-current')
|
|
797
|
-
: '';
|
|
798
|
-
var shouldDelete = current === verdict;
|
|
799
|
-
try {
|
|
800
|
-
var res = shouldDelete
|
|
801
|
-
? await fetch('/api/observe-inbox/review-state?targetType=' + encodeURIComponent(targetType) + '&targetId=' + encodeURIComponent(targetId), { method: 'DELETE' })
|
|
802
|
-
: await fetch('/api/observe-inbox/review-state', {
|
|
803
|
-
method: 'POST',
|
|
804
|
-
headers: { 'Content-Type': 'application/json' },
|
|
805
|
-
body: JSON.stringify({ targetType: targetType, targetId: targetId, verdict: verdict })
|
|
806
|
-
});
|
|
807
|
-
if (!res.ok) throw new Error('review state update failed: ' + res.status);
|
|
808
|
-
await res.json();
|
|
809
|
-
var key = targetType + ':' + targetId;
|
|
810
|
-
var nextVerdict = shouldDelete ? '' : verdict;
|
|
811
|
-
var controls = inboxElementsByAttribute('data-review-state-key', key);
|
|
812
|
-
for (var i = 0; i < controls.length; i++) {
|
|
813
|
-
controls[i].setAttribute('data-review-state-current', nextVerdict);
|
|
814
|
-
var buttons = controls[i].querySelectorAll('[data-review-verdict]');
|
|
815
|
-
for (var j = 0; j < buttons.length; j++) {
|
|
816
|
-
var buttonVerdict = buttons[j].getAttribute('data-review-verdict');
|
|
817
|
-
var active = buttonVerdict === nextVerdict;
|
|
818
|
-
buttons[j].className = 'review-state-button' + (active ? ' is-active ' + reviewVerdictClass(buttonVerdict) : '');
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
} catch (err) {
|
|
822
|
-
alert(String(err && err.message ? err.message : err));
|
|
823
|
-
} finally {
|
|
824
|
-
if (btn) btn.disabled = false;
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
function reviewerJudgmentLabel(verdict) {
|
|
828
|
-
if (verdict === 'real_issue') return '已同意';
|
|
829
|
-
if (verdict === 'not_issue') return '已否决';
|
|
830
|
-
if (verdict === 'needs_more_context') return '已留意见';
|
|
831
|
-
if (verdict === 'reviewed') return '已看过';
|
|
832
|
-
return '未标注';
|
|
833
|
-
}
|
|
834
|
-
function updateReviewerJudgmentUi(targetId, verdict, reason) {
|
|
835
|
-
var cards = inboxElementsByAttribute('data-reviewer-judgment-id', targetId);
|
|
836
|
-
for (var i = 0; i < cards.length; i++) {
|
|
837
|
-
var review = cards[i].querySelector('[data-reviewer-judgment-current]');
|
|
838
|
-
if (!review) continue;
|
|
839
|
-
review.setAttribute('data-reviewer-judgment-current', verdict || '');
|
|
840
|
-
var label = review.querySelector('[data-reviewer-judgment-label]');
|
|
841
|
-
if (label) label.textContent = reviewerJudgmentLabel(verdict);
|
|
842
|
-
var buttons = review.querySelectorAll('[data-reviewer-judgment-verdict]');
|
|
843
|
-
for (var j = 0; j < buttons.length; j++) {
|
|
844
|
-
var buttonVerdict = buttons[j].getAttribute('data-reviewer-judgment-verdict');
|
|
845
|
-
buttons[j].classList.toggle('is-active', Boolean(verdict && buttonVerdict === verdict));
|
|
846
|
-
}
|
|
847
|
-
var note = review.querySelector('small');
|
|
848
|
-
if (reason) {
|
|
849
|
-
if (!note) {
|
|
850
|
-
note = document.createElement('small');
|
|
851
|
-
review.appendChild(note);
|
|
852
|
-
}
|
|
853
|
-
note.textContent = reason;
|
|
854
|
-
} else if (note) {
|
|
855
|
-
note.remove();
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
async function setReviewerJudgmentReview(targetId, verdict, btn, reason) {
|
|
860
|
-
if (btn) btn.disabled = true;
|
|
861
|
-
var review = btn && btn.closest ? btn.closest('[data-reviewer-judgment-current]') : null;
|
|
862
|
-
var current = review ? review.getAttribute('data-reviewer-judgment-current') || '' : '';
|
|
863
|
-
var shouldDelete = current === verdict && !reason;
|
|
864
|
-
try {
|
|
865
|
-
var res = shouldDelete
|
|
866
|
-
? await fetch('/api/observe-inbox/review-state?targetType=reviewer_judgment&targetId=' + encodeURIComponent(targetId), { method: 'DELETE' })
|
|
867
|
-
: await fetch('/api/observe-inbox/review-state', {
|
|
868
|
-
method: 'POST',
|
|
869
|
-
headers: { 'Content-Type': 'application/json' },
|
|
870
|
-
body: JSON.stringify({
|
|
871
|
-
targetType: 'reviewer_judgment',
|
|
872
|
-
targetId: targetId,
|
|
873
|
-
verdict: verdict,
|
|
874
|
-
reason: reason || undefined
|
|
875
|
-
})
|
|
876
|
-
});
|
|
877
|
-
if (!res.ok) throw new Error('判断标注写入失败: ' + res.status);
|
|
878
|
-
await res.json();
|
|
879
|
-
updateReviewerJudgmentUi(targetId, shouldDelete ? '' : verdict, shouldDelete ? '' : reason);
|
|
880
|
-
} catch (err) {
|
|
881
|
-
alert(String(err && err.message ? err.message : err));
|
|
882
|
-
} finally {
|
|
883
|
-
if (btn) btn.disabled = false;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
function openReviewerJudgmentNote(targetId, btn) {
|
|
887
|
-
var previous = btn && btn.closest ? btn.closest('[data-reviewer-judgment-current]') : null;
|
|
888
|
-
var oldNote = previous && previous.querySelector('small') ? previous.querySelector('small').textContent || '' : '';
|
|
889
|
-
closeManualCorrectionPopovers();
|
|
890
|
-
if (btn) btn.classList.add('is-editing');
|
|
891
|
-
var popover = document.createElement('div');
|
|
892
|
-
popover.className = 'manual-correction-popover';
|
|
893
|
-
var title = document.createElement('div');
|
|
894
|
-
title.className = 'manual-correction-popover-title';
|
|
895
|
-
title.textContent = '补充判断意见';
|
|
896
|
-
var hint = document.createElement('div');
|
|
897
|
-
hint.className = 'manual-correction-popover-hint';
|
|
898
|
-
hint.textContent = '意见会写入 review-state.json,不修改原始 trace。';
|
|
899
|
-
var input = document.createElement('textarea');
|
|
900
|
-
input.className = 'metric-reason-input';
|
|
901
|
-
input.value = oldNote;
|
|
902
|
-
input.placeholder = '写下需要补充的判断依据';
|
|
903
|
-
var footer = document.createElement('div');
|
|
904
|
-
footer.className = 'manual-correction-popover-actions';
|
|
905
|
-
var save = document.createElement('button');
|
|
906
|
-
save.type = 'button';
|
|
907
|
-
save.textContent = '保存';
|
|
908
|
-
var cancel = document.createElement('button');
|
|
909
|
-
cancel.type = 'button';
|
|
910
|
-
cancel.textContent = '取消';
|
|
911
|
-
footer.appendChild(save);
|
|
912
|
-
footer.appendChild(cancel);
|
|
913
|
-
popover.appendChild(title);
|
|
914
|
-
popover.appendChild(hint);
|
|
915
|
-
popover.appendChild(input);
|
|
916
|
-
popover.appendChild(footer);
|
|
917
|
-
positionManualCorrectionPopover(popover, btn);
|
|
918
|
-
input.focus();
|
|
919
|
-
input.select();
|
|
920
|
-
var close = function () {
|
|
921
|
-
popover.remove();
|
|
922
|
-
if (btn) btn.classList.remove('is-editing');
|
|
923
|
-
};
|
|
924
|
-
save.addEventListener('click', function () {
|
|
925
|
-
setReviewerJudgmentReview(targetId, 'needs_more_context', btn, input.value.trim());
|
|
926
|
-
close();
|
|
927
|
-
});
|
|
928
|
-
cancel.addEventListener('click', close);
|
|
929
|
-
setTimeout(function () {
|
|
930
|
-
document.addEventListener('click', function closeOnOutsideClick(event) {
|
|
931
|
-
if (popover.contains(event.target) || (btn && btn.contains(event.target))) return;
|
|
932
|
-
close();
|
|
933
|
-
document.removeEventListener('click', closeOnOutsideClick);
|
|
934
|
-
});
|
|
935
|
-
}, 0);
|
|
936
|
-
}
|
|
937
|
-
function softStandardStatusLabel(status) {
|
|
938
|
-
if (status === 'author_confirmed') return '作者已确认';
|
|
939
|
-
if (status === 'rejected') return '已否决';
|
|
940
|
-
if (status === 'stale') return '已过期';
|
|
941
|
-
return '待作者确认';
|
|
942
|
-
}
|
|
943
|
-
function softStandardStatusIcon(status) {
|
|
944
|
-
if (status === 'author_confirmed') return '✅';
|
|
945
|
-
if (status === 'rejected') return '❌';
|
|
946
|
-
return '';
|
|
947
|
-
}
|
|
948
|
-
function softStandardReviewVerdict(status) {
|
|
949
|
-
if (status === 'author_confirmed') return 'real_issue';
|
|
950
|
-
if (status === 'rejected') return 'not_issue';
|
|
951
|
-
return 'needs_more_context';
|
|
952
|
-
}
|
|
953
|
-
async function setSoftStandardStatus(skillName, standardId, status, btn) {
|
|
954
|
-
if (btn) btn.disabled = true;
|
|
955
|
-
try {
|
|
956
|
-
var res = await fetch('/api/observe-inbox/review-state', {
|
|
957
|
-
method: 'POST',
|
|
958
|
-
headers: { 'Content-Type': 'application/json' },
|
|
959
|
-
body: JSON.stringify({
|
|
960
|
-
targetType: 'soft_standard',
|
|
961
|
-
targetId: skillName + ':' + standardId,
|
|
962
|
-
verdict: softStandardReviewVerdict(status)
|
|
963
|
-
})
|
|
964
|
-
});
|
|
965
|
-
if (!res.ok) throw new Error('标准候选人工判断写入失败: ' + res.status);
|
|
966
|
-
await res.json();
|
|
967
|
-
var cards = inboxElementsByAttribute('data-soft-standard-id', standardId).filter(function(el) { return el.getAttribute('data-soft-standard-skill') === skillName; });
|
|
968
|
-
for (var i = 0; i < cards.length; i++) {
|
|
969
|
-
var label = cards[i].querySelector('[data-soft-standard-status]');
|
|
970
|
-
if (label) {
|
|
971
|
-
label.setAttribute('data-soft-standard-status', status);
|
|
972
|
-
label.textContent = softStandardStatusLabel(status);
|
|
973
|
-
}
|
|
974
|
-
cards[i].classList.toggle('is-confirmed', status === 'author_confirmed');
|
|
975
|
-
cards[i].classList.toggle('is-rejected', status === 'rejected');
|
|
976
|
-
var icon = cards[i].querySelector('[data-soft-standard-icon]');
|
|
977
|
-
if (icon) {
|
|
978
|
-
icon.setAttribute('data-soft-standard-icon', status);
|
|
979
|
-
icon.textContent = softStandardStatusIcon(status);
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
} catch (err) {
|
|
983
|
-
alert(String(err && err.message ? err.message : err));
|
|
984
|
-
} finally {
|
|
985
|
-
if (btn) btn.disabled = false;
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
function closeManualCorrectionPopovers() {
|
|
989
|
-
var popovers = document.querySelectorAll('.manual-correction-popover');
|
|
990
|
-
for (var i = 0; i < popovers.length; i++) popovers[i].remove();
|
|
991
|
-
var buttons = document.querySelectorAll('.manual-correction-button.is-editing');
|
|
992
|
-
for (var j = 0; j < buttons.length; j++) buttons[j].classList.remove('is-editing');
|
|
993
|
-
}
|
|
994
|
-
function manualCorrectionNote(value, label) {
|
|
995
|
-
return JSON.stringify({ value: value, label: label });
|
|
996
|
-
}
|
|
997
|
-
function updateManualCorrectionButtons(targetType, targetId, label) {
|
|
998
|
-
var key = targetType + ':' + targetId;
|
|
999
|
-
var buttons = inboxElementsByAttribute('data-manual-correction-key', key);
|
|
1000
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
1001
|
-
var baseLabel = buttons[i].getAttribute('data-manual-correction-label') || '人工纠正';
|
|
1002
|
-
buttons[i].setAttribute('data-manual-correction-current', label || '');
|
|
1003
|
-
buttons[i].classList.toggle('is-marked', Boolean(label));
|
|
1004
|
-
buttons[i].textContent = label ? baseLabel + ':' + label : baseLabel;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
async function submitManualCorrection(targetType, targetId, value, label, btn) {
|
|
1008
|
-
if (btn) btn.disabled = true;
|
|
1009
|
-
try {
|
|
1010
|
-
var res = value === ''
|
|
1011
|
-
? await fetch('/api/observe-inbox/review-state?targetType=' + encodeURIComponent(targetType) + '&targetId=' + encodeURIComponent(targetId), { method: 'DELETE' })
|
|
1012
|
-
: await fetch('/api/observe-inbox/review-state', {
|
|
1013
|
-
method: 'POST',
|
|
1014
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1015
|
-
body: JSON.stringify({
|
|
1016
|
-
targetType: targetType,
|
|
1017
|
-
targetId: targetId,
|
|
1018
|
-
verdict: 'reviewed',
|
|
1019
|
-
note: manualCorrectionNote(value, label)
|
|
1020
|
-
})
|
|
1021
|
-
});
|
|
1022
|
-
if (!res.ok) throw new Error('人工纠正写入失败: ' + res.status);
|
|
1023
|
-
await res.json();
|
|
1024
|
-
updateManualCorrectionButtons(targetType, targetId, value === '' ? '' : label);
|
|
1025
|
-
closeManualCorrectionPopovers();
|
|
1026
|
-
} catch (err) {
|
|
1027
|
-
alert(String(err && err.message ? err.message : err));
|
|
1028
|
-
} finally {
|
|
1029
|
-
if (btn) btn.disabled = false;
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
function positionManualCorrectionPopover(popover, btn) {
|
|
1033
|
-
var rect = btn.getBoundingClientRect();
|
|
1034
|
-
var width = Math.min(320, Math.max(220, window.innerWidth - 24));
|
|
1035
|
-
popover.style.width = width + 'px';
|
|
1036
|
-
document.body.appendChild(popover);
|
|
1037
|
-
var left = Math.min(window.innerWidth - width - 12, Math.max(12, rect.right - width));
|
|
1038
|
-
var top = rect.bottom + 8;
|
|
1039
|
-
var popRect = popover.getBoundingClientRect();
|
|
1040
|
-
if (top + popRect.height > window.innerHeight - 12) {
|
|
1041
|
-
top = Math.max(12, rect.top - popRect.height - 8);
|
|
1042
|
-
}
|
|
1043
|
-
popover.style.left = left + 'px';
|
|
1044
|
-
popover.style.top = top + 'px';
|
|
1045
|
-
}
|
|
1046
|
-
function openManualCorrection(btn) {
|
|
1047
|
-
closeManualCorrectionPopovers();
|
|
1048
|
-
if (!btn) return;
|
|
1049
|
-
var targetType = btn.getAttribute('data-manual-correction-target-type') || '';
|
|
1050
|
-
var targetId = btn.getAttribute('data-manual-correction-target-id') || '';
|
|
1051
|
-
var label = btn.getAttribute('data-manual-correction-label') || '人工纠正';
|
|
1052
|
-
var kind = btn.getAttribute('data-manual-correction-kind') || 'choice';
|
|
1053
|
-
if (kind === 'text') {
|
|
1054
|
-
var current = btn.getAttribute('data-manual-correction-current') || '';
|
|
1055
|
-
btn.classList.add('is-editing');
|
|
1056
|
-
var textPopover = document.createElement('div');
|
|
1057
|
-
textPopover.className = 'manual-correction-popover';
|
|
1058
|
-
var textTitle = document.createElement('div');
|
|
1059
|
-
textTitle.className = 'manual-correction-popover-title';
|
|
1060
|
-
textTitle.textContent = label;
|
|
1061
|
-
var textHint = document.createElement('div');
|
|
1062
|
-
textHint.className = 'manual-correction-popover-hint';
|
|
1063
|
-
textHint.textContent = '填写人工纠正后的内容。结果写入 review-state.json,不修改原始 trace。';
|
|
1064
|
-
var input = document.createElement('textarea');
|
|
1065
|
-
input.className = 'metric-reason-input';
|
|
1066
|
-
input.value = current;
|
|
1067
|
-
input.placeholder = '例如:生成 Demo / PRD 评审 / 修复脚本';
|
|
1068
|
-
var footer = document.createElement('div');
|
|
1069
|
-
footer.className = 'manual-correction-popover-actions';
|
|
1070
|
-
var save = document.createElement('button');
|
|
1071
|
-
save.type = 'button';
|
|
1072
|
-
save.textContent = '保存';
|
|
1073
|
-
var clearText = document.createElement('button');
|
|
1074
|
-
clearText.type = 'button';
|
|
1075
|
-
clearText.textContent = '清除标注';
|
|
1076
|
-
var cancelText = document.createElement('button');
|
|
1077
|
-
cancelText.type = 'button';
|
|
1078
|
-
cancelText.textContent = '取消';
|
|
1079
|
-
footer.appendChild(save);
|
|
1080
|
-
footer.appendChild(clearText);
|
|
1081
|
-
footer.appendChild(cancelText);
|
|
1082
|
-
textPopover.appendChild(textTitle);
|
|
1083
|
-
textPopover.appendChild(textHint);
|
|
1084
|
-
textPopover.appendChild(input);
|
|
1085
|
-
textPopover.appendChild(footer);
|
|
1086
|
-
positionManualCorrectionPopover(textPopover, btn);
|
|
1087
|
-
input.focus();
|
|
1088
|
-
save.addEventListener('click', function () {
|
|
1089
|
-
var trimmed = input.value.trim();
|
|
1090
|
-
submitManualCorrection(targetType, targetId, trimmed, trimmed, btn);
|
|
1091
|
-
});
|
|
1092
|
-
clearText.addEventListener('click', function () { submitManualCorrection(targetType, targetId, '', '', btn); });
|
|
1093
|
-
cancelText.addEventListener('click', closeManualCorrectionPopovers);
|
|
1094
|
-
return;
|
|
1095
|
-
}
|
|
1096
|
-
btn.classList.add('is-editing');
|
|
1097
|
-
var options = [];
|
|
1098
|
-
try { options = JSON.parse(btn.getAttribute('data-manual-correction-options') || '[]'); } catch { options = []; }
|
|
1099
|
-
var popover = document.createElement('div');
|
|
1100
|
-
popover.className = 'manual-correction-popover';
|
|
1101
|
-
var title = document.createElement('div');
|
|
1102
|
-
title.className = 'manual-correction-popover-title';
|
|
1103
|
-
title.textContent = label;
|
|
1104
|
-
var hint = document.createElement('div');
|
|
1105
|
-
hint.className = 'manual-correction-popover-hint';
|
|
1106
|
-
hint.textContent = '选择人工判断。结果写入 review-state.json,不修改原始 trace。';
|
|
1107
|
-
var actions = document.createElement('div');
|
|
1108
|
-
actions.className = 'manual-correction-popover-actions';
|
|
1109
|
-
for (var i = 0; i < options.length; i++) {
|
|
1110
|
-
(function (option) {
|
|
1111
|
-
var choice = document.createElement('button');
|
|
1112
|
-
choice.type = 'button';
|
|
1113
|
-
choice.textContent = option.label || option.value;
|
|
1114
|
-
choice.addEventListener('click', function () {
|
|
1115
|
-
submitManualCorrection(targetType, targetId, option.value || '', option.label || option.value || '', btn);
|
|
1116
|
-
});
|
|
1117
|
-
actions.appendChild(choice);
|
|
1118
|
-
})(options[i]);
|
|
1119
|
-
}
|
|
1120
|
-
var clear = document.createElement('button');
|
|
1121
|
-
clear.type = 'button';
|
|
1122
|
-
clear.textContent = '清除标注';
|
|
1123
|
-
clear.addEventListener('click', function () { submitManualCorrection(targetType, targetId, '', '', btn); });
|
|
1124
|
-
actions.appendChild(clear);
|
|
1125
|
-
popover.appendChild(title);
|
|
1126
|
-
popover.appendChild(hint);
|
|
1127
|
-
popover.appendChild(actions);
|
|
1128
|
-
positionManualCorrectionPopover(popover, btn);
|
|
1129
|
-
setTimeout(function () {
|
|
1130
|
-
document.addEventListener('click', function closeOnOutsideClick(event) {
|
|
1131
|
-
if (popover.contains(event.target) || btn.contains(event.target)) return;
|
|
1132
|
-
closeManualCorrectionPopovers();
|
|
1133
|
-
document.removeEventListener('click', closeOnOutsideClick);
|
|
1134
|
-
});
|
|
1135
|
-
}, 0);
|
|
1136
|
-
}
|
|
1137
|
-
window.openManualCorrection = openManualCorrection;
|
|
1138
|
-
window.closeManualCorrectionPopovers = closeManualCorrectionPopovers;
|
|
1139
|
-
function closeGoalSliceCorrectionPopovers() {
|
|
1140
|
-
var popovers = document.querySelectorAll('.goal-slice-popover');
|
|
1141
|
-
for (var i = 0; i < popovers.length; i++) popovers[i].remove();
|
|
1142
|
-
var buttons = document.querySelectorAll('.goal-slice-correction-button.is-editing');
|
|
1143
|
-
for (var j = 0; j < buttons.length; j++) buttons[j].classList.remove('is-editing');
|
|
1144
|
-
}
|
|
1145
|
-
function updateGoalSliceCorrectionButtons(targetId, action) {
|
|
1146
|
-
var key = 'goal_slice_correction:' + targetId;
|
|
1147
|
-
var buttons = inboxElementsByAttribute('data-goal-slice-correction-key', key);
|
|
1148
|
-
var label = action === 'split_goal_slice'
|
|
1149
|
-
? '已标记:拆分'
|
|
1150
|
-
: action === 'add_to_current_skill_window'
|
|
1151
|
-
? '已标记:加入窗口'
|
|
1152
|
-
: '人工标记';
|
|
1153
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
1154
|
-
buttons[i].textContent = label;
|
|
1155
|
-
buttons[i].setAttribute('data-goal-slice-correction-action', action || '');
|
|
1156
|
-
buttons[i].classList.toggle('is-marked', Boolean(action));
|
|
1157
|
-
}
|
|
1158
|
-
var manualButtons = inboxElementsByAttribute('data-manual-mark-goal-target', targetId);
|
|
1159
|
-
for (var j = 0; j < manualButtons.length; j++) {
|
|
1160
|
-
manualButtons[j].setAttribute('data-manual-mark-goal-action', action || '');
|
|
1161
|
-
var metrics = [];
|
|
1162
|
-
try { metrics = JSON.parse(manualButtons[j].getAttribute('data-manual-mark-metrics') || '[]'); } catch { metrics = []; }
|
|
1163
|
-
var activeCount = (action ? 1 : 0) + metrics.filter(function (item) {
|
|
1164
|
-
return item.verdict === 'confirmed' || item.verdict === 'rejected';
|
|
1165
|
-
}).length;
|
|
1166
|
-
manualButtons[j].classList.toggle('is-marked', activeCount > 0);
|
|
1167
|
-
var mode = manualButtons[j].getAttribute('data-manual-mark-mode') || 'metrics';
|
|
1168
|
-
if (mode === 'window_only') {
|
|
1169
|
-
manualButtons[j].textContent = action === 'add_to_current_skill_window' ? '已加入窗口' : '加入窗口';
|
|
1170
|
-
} else {
|
|
1171
|
-
manualButtons[j].textContent = '人工标记' + (activeCount > 0 ? '(' + activeCount + ')' : '');
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
async function submitGoalSliceCorrection(targetId, action, btn) {
|
|
1176
|
-
if (btn) btn.disabled = true;
|
|
1177
|
-
try {
|
|
1178
|
-
var res;
|
|
1179
|
-
if (!action) {
|
|
1180
|
-
res = await fetch('/api/observe-inbox/review-state?targetType=goal_slice_correction&targetId=' + encodeURIComponent(targetId), { method: 'DELETE' });
|
|
1181
|
-
} else {
|
|
1182
|
-
res = await fetch('/api/observe-inbox/review-state', {
|
|
1183
|
-
method: 'POST',
|
|
1184
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1185
|
-
body: JSON.stringify({
|
|
1186
|
-
targetType: 'goal_slice_correction',
|
|
1187
|
-
targetId: targetId,
|
|
1188
|
-
verdict: 'reviewed',
|
|
1189
|
-
note: action,
|
|
1190
|
-
traceId: btn ? btn.getAttribute('data-trace-id') || undefined : undefined,
|
|
1191
|
-
sourceTrace: btn ? btn.getAttribute('data-source-trace') || undefined : undefined,
|
|
1192
|
-
sessionId: btn ? btn.getAttribute('data-session-id') || undefined : undefined,
|
|
1193
|
-
messageIndex: btn && btn.getAttribute('data-message-index') ? Number(btn.getAttribute('data-message-index')) : undefined,
|
|
1194
|
-
messageUuid: btn ? btn.getAttribute('data-message-uuid') || undefined : undefined,
|
|
1195
|
-
callInstanceId: btn ? btn.getAttribute('data-call-instance-id') || undefined : undefined,
|
|
1196
|
-
toolUseId: btn ? btn.getAttribute('data-tool-use-id') || undefined : undefined,
|
|
1197
|
-
snippet: btn ? btn.getAttribute('data-snippet') || undefined : undefined
|
|
1198
|
-
})
|
|
1199
|
-
});
|
|
1200
|
-
}
|
|
1201
|
-
if (!res.ok) throw new Error('goal slice correction update failed: ' + res.status);
|
|
1202
|
-
await res.json();
|
|
1203
|
-
updateGoalSliceCorrectionButtons(targetId, action);
|
|
1204
|
-
closeGoalSliceCorrectionPopovers();
|
|
1205
|
-
} catch (err) {
|
|
1206
|
-
alert(String(err && err.message ? err.message : err));
|
|
1207
|
-
} finally {
|
|
1208
|
-
if (btn) btn.disabled = false;
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
function positionGoalSlicePopover(popover, btn) {
|
|
1212
|
-
var rect = btn.getBoundingClientRect();
|
|
1213
|
-
var isTimelineManual = popover.classList && popover.classList.contains('timeline-manual-popover');
|
|
1214
|
-
var preferredWidth = isTimelineManual ? 380 : 320;
|
|
1215
|
-
var width = Math.min(preferredWidth, Math.max(220, window.innerWidth - 32));
|
|
1216
|
-
popover.style.width = width + 'px';
|
|
1217
|
-
var left = Math.min(window.innerWidth - width - 12, Math.max(12, rect.right - width));
|
|
1218
|
-
var top = rect.bottom + 8;
|
|
1219
|
-
document.body.appendChild(popover);
|
|
1220
|
-
if (isTimelineManual) {
|
|
1221
|
-
popover.style.maxHeight = Math.max(180, window.innerHeight - 24) + 'px';
|
|
1222
|
-
popover.style.overflowY = 'auto';
|
|
1223
|
-
}
|
|
1224
|
-
var popRect = popover.getBoundingClientRect();
|
|
1225
|
-
if (top + popRect.height > window.innerHeight - 12) {
|
|
1226
|
-
top = Math.max(12, rect.top - popRect.height - 8);
|
|
1227
|
-
}
|
|
1228
|
-
if (isTimelineManual && top + popRect.height > window.innerHeight - 12) {
|
|
1229
|
-
top = 12;
|
|
1230
|
-
popover.style.maxHeight = Math.max(180, window.innerHeight - 24) + 'px';
|
|
1231
|
-
}
|
|
1232
|
-
popover.style.left = left + 'px';
|
|
1233
|
-
popover.style.top = top + 'px';
|
|
1234
|
-
}
|
|
1235
|
-
function openGoalSliceCorrectionPopover(targetId, btn) {
|
|
1236
|
-
closeGoalSliceCorrectionPopovers();
|
|
1237
|
-
if (!btn) return;
|
|
1238
|
-
btn.classList.add('is-editing');
|
|
1239
|
-
var popover = document.createElement('div');
|
|
1240
|
-
popover.className = 'goal-slice-popover';
|
|
1241
|
-
var title = document.createElement('div');
|
|
1242
|
-
title.className = 'goal-slice-popover-title';
|
|
1243
|
-
title.textContent = '人工标记';
|
|
1244
|
-
var hint = document.createElement('div');
|
|
1245
|
-
hint.className = 'goal-slice-popover-hint';
|
|
1246
|
-
hint.textContent = '这个标记会写入 review-state.json。修改后需要重新执行脚本,报告才会按新切片或新窗口重算。';
|
|
1247
|
-
var actions = document.createElement('div');
|
|
1248
|
-
actions.className = 'goal-slice-popover-actions';
|
|
1249
|
-
var split = document.createElement('button');
|
|
1250
|
-
split.type = 'button';
|
|
1251
|
-
split.textContent = '拆分目标切片';
|
|
1252
|
-
split.title = '把这条 message 作为新的目标片段起点候选。';
|
|
1253
|
-
var clear = document.createElement('button');
|
|
1254
|
-
clear.type = 'button';
|
|
1255
|
-
clear.textContent = '取消打标';
|
|
1256
|
-
clear.title = '删除这条 message 的人工切片/窗口标记。';
|
|
1257
|
-
var add = document.createElement('button');
|
|
1258
|
-
add.type = 'button';
|
|
1259
|
-
add.textContent = '添加至当前 skill 窗口';
|
|
1260
|
-
add.title = '把这条 message 作为当前 skill 的上下文候选。';
|
|
1261
|
-
actions.appendChild(split);
|
|
1262
|
-
actions.appendChild(clear);
|
|
1263
|
-
actions.appendChild(add);
|
|
1264
|
-
popover.appendChild(title);
|
|
1265
|
-
popover.appendChild(hint);
|
|
1266
|
-
popover.appendChild(actions);
|
|
1267
|
-
positionGoalSlicePopover(popover, btn);
|
|
1268
|
-
setTimeout(function () {
|
|
1269
|
-
document.addEventListener('click', function closeOnOutsideClick(event) {
|
|
1270
|
-
if (popover.contains(event.target) || btn.contains(event.target)) return;
|
|
1271
|
-
closeGoalSliceCorrectionPopovers();
|
|
1272
|
-
document.removeEventListener('click', closeOnOutsideClick);
|
|
1273
|
-
});
|
|
1274
|
-
}, 0);
|
|
1275
|
-
split.addEventListener('click', function () { submitGoalSliceCorrection(targetId, 'split_goal_slice', btn); });
|
|
1276
|
-
clear.addEventListener('click', function () { submitGoalSliceCorrection(targetId, '', btn); });
|
|
1277
|
-
add.addEventListener('click', function () { submitGoalSliceCorrection(targetId, 'add_to_current_skill_window', btn); });
|
|
1278
|
-
}
|
|
1279
|
-
window.closeGoalSliceCorrectionPopovers = closeGoalSliceCorrectionPopovers;
|
|
1280
|
-
window.openGoalSliceCorrectionPopover = openGoalSliceCorrectionPopover;
|
|
1281
|
-
function closeTimelineManualMarkPopovers() {
|
|
1282
|
-
var popovers = document.querySelectorAll('.timeline-manual-popover');
|
|
1283
|
-
for (var i = 0; i < popovers.length; i++) popovers[i].remove();
|
|
1284
|
-
var buttons = document.querySelectorAll('.timeline-manual-mark-button.is-editing');
|
|
1285
|
-
for (var j = 0; j < buttons.length; j++) buttons[j].classList.remove('is-editing');
|
|
1286
|
-
}
|
|
1287
|
-
function metricStateLabel(verdict, ruleDetected) {
|
|
1288
|
-
if (verdict === 'confirmed') return '人工同意';
|
|
1289
|
-
if (verdict === 'rejected') return '人工反对';
|
|
1290
|
-
return ruleDetected ? '规则命中' : '未命中';
|
|
1291
|
-
}
|
|
1292
|
-
function updateTimelineManualMarkButton(btn, metric, next) {
|
|
1293
|
-
var metrics = [];
|
|
1294
|
-
try { metrics = JSON.parse(btn.getAttribute('data-manual-mark-metrics') || '[]'); } catch { metrics = []; }
|
|
1295
|
-
for (var i = 0; i < metrics.length; i++) {
|
|
1296
|
-
if (metrics[i].targetId === metric.targetId) {
|
|
1297
|
-
metrics[i].verdict = next;
|
|
1298
|
-
break;
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
btn.setAttribute('data-manual-mark-metrics', JSON.stringify(metrics));
|
|
1302
|
-
var goalAction = btn.getAttribute('data-manual-mark-goal-action') || '';
|
|
1303
|
-
var activeCount = (goalAction ? 1 : 0) + metrics.filter(function (item) {
|
|
1304
|
-
return item.verdict === 'confirmed' || item.verdict === 'rejected';
|
|
1305
|
-
}).length;
|
|
1306
|
-
btn.classList.toggle('is-marked', activeCount > 0);
|
|
1307
|
-
var mode = btn.getAttribute('data-manual-mark-mode') || 'metrics';
|
|
1308
|
-
if (mode === 'window_only') {
|
|
1309
|
-
btn.textContent = goalAction === 'add_to_current_skill_window' ? '已加入窗口' : '加入窗口';
|
|
1310
|
-
} else {
|
|
1311
|
-
btn.textContent = '人工标记' + (activeCount > 0 ? '(' + activeCount + ')' : '');
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
async function submitTimelineMetricAnnotation(metric, next, btn) {
|
|
1315
|
-
var source = {};
|
|
1316
|
-
try { source = JSON.parse(btn.getAttribute('data-manual-mark-source') || '{}'); } catch { source = {}; }
|
|
1317
|
-
var res = next === ''
|
|
1318
|
-
? await fetch('/api/observe-inbox/review-state?targetType=evidence_metric&targetId=' + encodeURIComponent(metric.targetId), { method: 'DELETE' })
|
|
1319
|
-
: await fetch('/api/observe-inbox/review-state', {
|
|
1320
|
-
method: 'POST',
|
|
1321
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1322
|
-
body: JSON.stringify({
|
|
1323
|
-
targetType: 'evidence_metric',
|
|
1324
|
-
targetId: metric.targetId,
|
|
1325
|
-
verdict: next,
|
|
1326
|
-
metricKey: metric.metricKey,
|
|
1327
|
-
metricScopeId: metric.metricScopeId || undefined,
|
|
1328
|
-
traceId: source.traceId || undefined,
|
|
1329
|
-
sourceTrace: source.sourceTrace || undefined,
|
|
1330
|
-
sessionId: source.sessionId || undefined,
|
|
1331
|
-
messageIndex: source.messageIndex === undefined ? undefined : Number(source.messageIndex),
|
|
1332
|
-
messageUuid: source.messageUuid || undefined,
|
|
1333
|
-
callInstanceId: source.callInstanceId || undefined,
|
|
1334
|
-
toolUseId: source.toolUseId || undefined,
|
|
1335
|
-
snippet: source.snippet || undefined
|
|
1336
|
-
})
|
|
1337
|
-
});
|
|
1338
|
-
if (!res.ok) throw new Error('人工标记写入失败: ' + res.status);
|
|
1339
|
-
await res.json();
|
|
1340
|
-
metric.verdict = next;
|
|
1341
|
-
updateTimelineManualMarkButton(btn, metric, next);
|
|
1342
|
-
}
|
|
1343
|
-
function addTimelineMetricButton(actions, metric, value, text, btn, labelEl) {
|
|
1344
|
-
var button = document.createElement('button');
|
|
1345
|
-
button.type = 'button';
|
|
1346
|
-
button.textContent = text;
|
|
1347
|
-
button.className = value && metric.verdict === value ? 'is-active' : '';
|
|
1348
|
-
button.addEventListener('click', function () {
|
|
1349
|
-
submitTimelineMetricAnnotation(metric, value, btn).then(function () {
|
|
1350
|
-
var rowButtons = actions.querySelectorAll('button');
|
|
1351
|
-
for (var i = 0; i < rowButtons.length; i++) rowButtons[i].classList.remove('is-active');
|
|
1352
|
-
if (value) button.classList.add('is-active');
|
|
1353
|
-
if (labelEl) labelEl.textContent = metricStateLabel(value, metric.ruleDetected) + ' · ' + metric.label;
|
|
1354
|
-
}).catch(function (err) {
|
|
1355
|
-
alert(String(err && err.message ? err.message : err));
|
|
1356
|
-
});
|
|
1357
|
-
});
|
|
1358
|
-
actions.appendChild(button);
|
|
1359
|
-
}
|
|
1360
|
-
function openTimelineManualMark(btn) {
|
|
1361
|
-
closeTimelineManualMarkPopovers();
|
|
1362
|
-
closeGoalSliceCorrectionPopovers();
|
|
1363
|
-
if (!btn) return;
|
|
1364
|
-
btn.classList.add('is-editing');
|
|
1365
|
-
var metrics = [];
|
|
1366
|
-
try { metrics = JSON.parse(btn.getAttribute('data-manual-mark-metrics') || '[]'); } catch { metrics = []; }
|
|
1367
|
-
var mode = btn.getAttribute('data-manual-mark-mode') || 'metrics';
|
|
1368
|
-
var isWindowOnly = mode === 'window_only';
|
|
1369
|
-
var goalTargetId = btn.getAttribute('data-manual-mark-goal-target') || '';
|
|
1370
|
-
var goalAction = btn.getAttribute('data-manual-mark-goal-action') || '';
|
|
1371
|
-
var popover = document.createElement('div');
|
|
1372
|
-
popover.className = 'timeline-manual-popover';
|
|
1373
|
-
var title = document.createElement('div');
|
|
1374
|
-
title.className = 'goal-slice-popover-title';
|
|
1375
|
-
title.textContent = isWindowOnly ? '加入当前 skill 窗口' : '人工标记这条消息';
|
|
1376
|
-
var hint = document.createElement('div');
|
|
1377
|
-
hint.className = 'goal-slice-popover-hint';
|
|
1378
|
-
hint.textContent = isWindowOnly
|
|
1379
|
-
? '这条消息不在当前 skill 窗口内,不能直接打指标标签。需要先加入当前 skill 窗口,重新执行脚本后再标注。'
|
|
1380
|
-
: '这里可以修正消息标签,也可以把这条消息标成目标切片点或加入当前 skill 窗口。消息标签包括纠正、中断、追问、正负反馈、硬性要求、目标切换、有结果、有产物、过程进展、自我纠正和重复执行。';
|
|
1381
|
-
var actions = document.createElement('div');
|
|
1382
|
-
actions.className = 'timeline-manual-actions';
|
|
1383
|
-
var goalSplit = document.createElement('button');
|
|
1384
|
-
goalSplit.type = 'button';
|
|
1385
|
-
goalSplit.textContent = goalAction === 'split_goal_slice' ? '已标:拆分目标' : '拆分目标切片';
|
|
1386
|
-
goalSplit.addEventListener('click', function () { submitGoalSliceCorrection(goalTargetId, 'split_goal_slice', btn); });
|
|
1387
|
-
var goalAdd = document.createElement('button');
|
|
1388
|
-
goalAdd.type = 'button';
|
|
1389
|
-
goalAdd.textContent = goalAction === 'add_to_current_skill_window' ? '已标:加入窗口' : '加入当前 skill 窗口';
|
|
1390
|
-
goalAdd.addEventListener('click', function () { submitGoalSliceCorrection(goalTargetId, 'add_to_current_skill_window', btn); });
|
|
1391
|
-
var goalClear = document.createElement('button');
|
|
1392
|
-
goalClear.type = 'button';
|
|
1393
|
-
goalClear.textContent = '清除切片/窗口';
|
|
1394
|
-
goalClear.addEventListener('click', function () { submitGoalSliceCorrection(goalTargetId, '', btn); });
|
|
1395
|
-
if (!isWindowOnly) actions.appendChild(goalSplit);
|
|
1396
|
-
actions.appendChild(goalAdd);
|
|
1397
|
-
if (!isWindowOnly || goalAction) actions.appendChild(goalClear);
|
|
1398
|
-
for (var i = 0; i < metrics.length; i++) {
|
|
1399
|
-
(function (metric) {
|
|
1400
|
-
var group = document.createElement('div');
|
|
1401
|
-
group.className = 'timeline-manual-metric-row';
|
|
1402
|
-
var label = document.createElement('span');
|
|
1403
|
-
label.textContent = metricStateLabel(metric.verdict, metric.ruleDetected) + ' · ' + metric.label;
|
|
1404
|
-
group.appendChild(label);
|
|
1405
|
-
addTimelineMetricButton(group, metric, 'confirmed', '同意', btn, label);
|
|
1406
|
-
addTimelineMetricButton(group, metric, 'rejected', '反对', btn, label);
|
|
1407
|
-
addTimelineMetricButton(group, metric, '', '清除', btn, label);
|
|
1408
|
-
actions.appendChild(group);
|
|
1409
|
-
})(metrics[i]);
|
|
1410
|
-
}
|
|
1411
|
-
popover.appendChild(title);
|
|
1412
|
-
popover.appendChild(hint);
|
|
1413
|
-
popover.appendChild(actions);
|
|
1414
|
-
positionGoalSlicePopover(popover, btn);
|
|
1415
|
-
setTimeout(function () {
|
|
1416
|
-
document.addEventListener('click', function closeOnOutsideClick(event) {
|
|
1417
|
-
if (popover.contains(event.target) || btn.contains(event.target)) return;
|
|
1418
|
-
closeTimelineManualMarkPopovers();
|
|
1419
|
-
document.removeEventListener('click', closeOnOutsideClick);
|
|
1420
|
-
});
|
|
1421
|
-
}, 0);
|
|
1422
|
-
}
|
|
1423
|
-
window.openTimelineManualMark = openTimelineManualMark;
|
|
1424
|
-
window.closeTimelineManualMarkPopovers = closeTimelineManualMarkPopovers;
|
|
1425
|
-
function evidenceMetricText(label, annotation, ruleDetected) {
|
|
1426
|
-
if (annotation === 'confirmed') return '人工同意 · ' + label;
|
|
1427
|
-
if (annotation === 'rejected') return '人工反对 · ' + label;
|
|
1428
|
-
return (ruleDetected ? '规则命中 · ' : '未命中 · ') + label;
|
|
1429
|
-
}
|
|
1430
|
-
function evidenceMetricClass(annotation, ruleDetected) {
|
|
1431
|
-
if (annotation === 'confirmed') return 'metric-calibration-button is-confirmed';
|
|
1432
|
-
if (annotation === 'rejected') return 'metric-calibration-button is-rejected';
|
|
1433
|
-
return 'metric-calibration-button' + (ruleDetected ? ' is-rule-hit' : '');
|
|
1434
|
-
}
|
|
1435
|
-
function findEvidenceMetricButtons(targetId) {
|
|
1436
|
-
var all = document.querySelectorAll('[data-evidence-metric-target]');
|
|
1437
|
-
var buttons = [];
|
|
1438
|
-
for (var i = 0; i < all.length; i++) {
|
|
1439
|
-
if (all[i].getAttribute('data-evidence-metric-target') === targetId) buttons.push(all[i]);
|
|
1440
|
-
}
|
|
1441
|
-
return buttons;
|
|
1442
|
-
}
|
|
1443
|
-
function closeMetricReasonPopover() {
|
|
1444
|
-
var popovers = document.querySelectorAll('.metric-reason-popover');
|
|
1445
|
-
for (var i = 0; i < popovers.length; i++) popovers[i].remove();
|
|
1446
|
-
var buttons = document.querySelectorAll('.metric-calibration-button.is-editing-reason');
|
|
1447
|
-
for (var j = 0; j < buttons.length; j++) buttons[j].classList.remove('is-editing-reason');
|
|
1448
|
-
}
|
|
1449
|
-
async function submitEvidenceMetricAnnotation(targetId, metricKey, btn, next, reason) {
|
|
1450
|
-
var res = next === ''
|
|
1451
|
-
? await fetch('/api/observe-inbox/review-state?targetType=evidence_metric&targetId=' + encodeURIComponent(targetId), { method: 'DELETE' })
|
|
1452
|
-
: await fetch('/api/observe-inbox/review-state', {
|
|
1453
|
-
method: 'POST',
|
|
1454
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1455
|
-
body: JSON.stringify({
|
|
1456
|
-
targetType: 'evidence_metric',
|
|
1457
|
-
targetId: targetId,
|
|
1458
|
-
verdict: next,
|
|
1459
|
-
metricKey: metricKey,
|
|
1460
|
-
traceId: btn.getAttribute('data-trace-id') || undefined,
|
|
1461
|
-
sourceTrace: btn.getAttribute('data-source-trace') || undefined,
|
|
1462
|
-
sessionId: btn.getAttribute('data-session-id') || undefined,
|
|
1463
|
-
messageIndex: btn.getAttribute('data-message-index') ? Number(btn.getAttribute('data-message-index')) : undefined,
|
|
1464
|
-
messageUuid: btn.getAttribute('data-message-uuid') || undefined,
|
|
1465
|
-
callInstanceId: btn.getAttribute('data-call-instance-id') || undefined,
|
|
1466
|
-
toolUseId: btn.getAttribute('data-tool-use-id') || undefined,
|
|
1467
|
-
snippet: btn.getAttribute('data-snippet') || undefined,
|
|
1468
|
-
reason: reason || undefined
|
|
1469
|
-
})
|
|
1470
|
-
});
|
|
1471
|
-
if (!res.ok) throw new Error('metric annotation update failed: ' + res.status);
|
|
1472
|
-
await res.json();
|
|
1473
|
-
var buttons = findEvidenceMetricButtons(targetId);
|
|
1474
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
1475
|
-
var label = buttons[i].getAttribute('data-metric-label') || '';
|
|
1476
|
-
var ruleDetected = buttons[i].getAttribute('data-rule-detected') === '1';
|
|
1477
|
-
buttons[i].setAttribute('data-metric-annotation', next);
|
|
1478
|
-
buttons[i].setAttribute('data-metric-reason', reason || '');
|
|
1479
|
-
buttons[i].textContent = evidenceMetricText(label, next, ruleDetected);
|
|
1480
|
-
buttons[i].className = evidenceMetricClass(next, ruleDetected);
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
function openMetricReasonPopover(targetId, metricKey, btn) {
|
|
1484
|
-
closeMetricReasonPopover();
|
|
1485
|
-
var actions = btn && btn.closest ? btn.closest('.metric-calibration-actions') : null;
|
|
1486
|
-
if (!actions) return;
|
|
1487
|
-
var label = btn.getAttribute('data-metric-label') || metricKey;
|
|
1488
|
-
var selected = btn.getAttribute('data-metric-annotation') || '';
|
|
1489
|
-
var previousReason = btn.getAttribute('data-metric-reason') || '';
|
|
1490
|
-
var popover = document.createElement('div');
|
|
1491
|
-
popover.className = 'metric-reason-popover';
|
|
1492
|
-
var panel = document.createElement('div');
|
|
1493
|
-
panel.className = 'metric-reason-panel';
|
|
1494
|
-
var title = document.createElement('div');
|
|
1495
|
-
title.className = 'metric-reason-title';
|
|
1496
|
-
title.textContent = '人工校准:' + label;
|
|
1497
|
-
var hint = document.createElement('div');
|
|
1498
|
-
hint.className = 'metric-reason-hint';
|
|
1499
|
-
hint.textContent = '先选择同意或反对,再填写原因。原因选填,会写入 review-state.json。';
|
|
1500
|
-
var choices = document.createElement('div');
|
|
1501
|
-
choices.className = 'metric-reason-choice-row';
|
|
1502
|
-
var choiceLabel = document.createElement('span');
|
|
1503
|
-
choiceLabel.className = 'metric-reason-choice-label';
|
|
1504
|
-
choiceLabel.textContent = '判断';
|
|
1505
|
-
var agree = document.createElement('button');
|
|
1506
|
-
agree.type = 'button';
|
|
1507
|
-
agree.className = 'metric-reason-choice';
|
|
1508
|
-
agree.textContent = '同意';
|
|
1509
|
-
var disagree = document.createElement('button');
|
|
1510
|
-
disagree.type = 'button';
|
|
1511
|
-
disagree.className = 'metric-reason-choice';
|
|
1512
|
-
disagree.textContent = '反对';
|
|
1513
|
-
choices.appendChild(choiceLabel);
|
|
1514
|
-
choices.appendChild(agree);
|
|
1515
|
-
choices.appendChild(disagree);
|
|
1516
|
-
var input = document.createElement('textarea');
|
|
1517
|
-
input.className = 'metric-reason-input';
|
|
1518
|
-
input.value = previousReason;
|
|
1519
|
-
input.placeholder = '选填:为什么这次要同意或反对这个判断';
|
|
1520
|
-
var footer = document.createElement('div');
|
|
1521
|
-
footer.className = 'metric-reason-actions';
|
|
1522
|
-
var clear = document.createElement('button');
|
|
1523
|
-
clear.type = 'button';
|
|
1524
|
-
clear.className = 'metric-reason-action';
|
|
1525
|
-
clear.textContent = '清除标注';
|
|
1526
|
-
var cancel = document.createElement('button');
|
|
1527
|
-
cancel.type = 'button';
|
|
1528
|
-
cancel.className = 'metric-reason-action';
|
|
1529
|
-
cancel.textContent = '取消';
|
|
1530
|
-
var save = document.createElement('button');
|
|
1531
|
-
save.type = 'button';
|
|
1532
|
-
save.className = 'metric-reason-action is-primary';
|
|
1533
|
-
save.textContent = '保存';
|
|
1534
|
-
footer.appendChild(clear);
|
|
1535
|
-
footer.appendChild(cancel);
|
|
1536
|
-
footer.appendChild(save);
|
|
1537
|
-
function syncChoiceButtons() {
|
|
1538
|
-
agree.classList.toggle('is-confirmed', selected === 'confirmed');
|
|
1539
|
-
disagree.classList.toggle('is-rejected', selected === 'rejected');
|
|
1540
|
-
}
|
|
1541
|
-
agree.addEventListener('click', function () {
|
|
1542
|
-
selected = 'confirmed';
|
|
1543
|
-
syncChoiceButtons();
|
|
1544
|
-
input.focus();
|
|
1545
|
-
});
|
|
1546
|
-
disagree.addEventListener('click', function () {
|
|
1547
|
-
selected = 'rejected';
|
|
1548
|
-
syncChoiceButtons();
|
|
1549
|
-
input.focus();
|
|
1550
|
-
});
|
|
1551
|
-
syncChoiceButtons();
|
|
1552
|
-
panel.appendChild(title);
|
|
1553
|
-
panel.appendChild(hint);
|
|
1554
|
-
panel.appendChild(choices);
|
|
1555
|
-
panel.appendChild(input);
|
|
1556
|
-
panel.appendChild(footer);
|
|
1557
|
-
popover.appendChild(panel);
|
|
1558
|
-
actions.appendChild(popover);
|
|
1559
|
-
btn.classList.add('is-editing-reason');
|
|
1560
|
-
cancel.addEventListener('click', closeMetricReasonPopover);
|
|
1561
|
-
clear.addEventListener('click', async function () {
|
|
1562
|
-
clear.disabled = true;
|
|
1563
|
-
save.disabled = true;
|
|
1564
|
-
cancel.disabled = true;
|
|
1565
|
-
btn.disabled = true;
|
|
1566
|
-
try {
|
|
1567
|
-
await submitEvidenceMetricAnnotation(targetId, metricKey, btn, '', '');
|
|
1568
|
-
closeMetricReasonPopover();
|
|
1569
|
-
} catch (err) {
|
|
1570
|
-
alert(String(err && err.message ? err.message : err));
|
|
1571
|
-
} finally {
|
|
1572
|
-
clear.disabled = false;
|
|
1573
|
-
save.disabled = false;
|
|
1574
|
-
cancel.disabled = false;
|
|
1575
|
-
btn.disabled = false;
|
|
1576
|
-
}
|
|
1577
|
-
});
|
|
1578
|
-
save.addEventListener('click', async function () {
|
|
1579
|
-
if (selected !== 'confirmed' && selected !== 'rejected') {
|
|
1580
|
-
alert('请先选择同意或反对。');
|
|
1581
|
-
return;
|
|
1582
|
-
}
|
|
1583
|
-
save.disabled = true;
|
|
1584
|
-
clear.disabled = true;
|
|
1585
|
-
cancel.disabled = true;
|
|
1586
|
-
btn.disabled = true;
|
|
1587
|
-
try {
|
|
1588
|
-
await submitEvidenceMetricAnnotation(targetId, metricKey, btn, selected, input.value.trim());
|
|
1589
|
-
closeMetricReasonPopover();
|
|
1590
|
-
} catch (err) {
|
|
1591
|
-
alert(String(err && err.message ? err.message : err));
|
|
1592
|
-
} finally {
|
|
1593
|
-
save.disabled = false;
|
|
1594
|
-
clear.disabled = false;
|
|
1595
|
-
cancel.disabled = false;
|
|
1596
|
-
btn.disabled = false;
|
|
1597
|
-
}
|
|
1598
|
-
});
|
|
1599
|
-
input.addEventListener('keydown', function (event) {
|
|
1600
|
-
if (event.key === 'Escape') closeMetricReasonPopover();
|
|
1601
|
-
if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') save.click();
|
|
1602
|
-
});
|
|
1603
|
-
setTimeout(function () { input.focus(); }, 0);
|
|
1604
|
-
}
|
|
1605
|
-
function openEvidenceMetricAnnotation(targetId, metricKey, btn) {
|
|
1606
|
-
openMetricReasonPopover(targetId, metricKey, btn);
|
|
1607
|
-
}
|
|
1608
|
-
function setObserveSeverityFilter(value) {
|
|
1609
|
-
observeSeverityFilter = value;
|
|
1610
|
-
var buttons = document.querySelectorAll('[data-severity-filter]');
|
|
1611
|
-
for (var i = 0; i < buttons.length; i++) {
|
|
1612
|
-
var active = buttons[i].getAttribute('data-severity-filter') === value;
|
|
1613
|
-
buttons[i].style.background = active ? 'var(--bg-surface)' : 'var(--bg)';
|
|
1614
|
-
buttons[i].style.fontWeight = active ? '650' : '400';
|
|
1615
|
-
}
|
|
1616
|
-
applyObserveFilters();
|
|
1617
|
-
}
|
|
1618
|
-
function applyObserveFilters() {
|
|
1619
|
-
var input = document.getElementById('observe-filter-input');
|
|
1620
|
-
var query = input ? String(input.value || '').toLowerCase().trim() : '';
|
|
1621
|
-
var rows = document.querySelectorAll('[data-observe-row="review"]');
|
|
1622
|
-
for (var i = 0; i < rows.length; i++) {
|
|
1623
|
-
var row = rows[i];
|
|
1624
|
-
var severity = row.getAttribute('data-severity') || '';
|
|
1625
|
-
var search = row.getAttribute('data-search') || '';
|
|
1626
|
-
var detailId = row.getAttribute('data-detail-id');
|
|
1627
|
-
var detail = detailId ? inboxElementByAttribute('data-observe-detail-for', detailId) : null;
|
|
1628
|
-
var visible = (observeSeverityFilter === 'all' || severity === observeSeverityFilter) && (!query || search.indexOf(query) >= 0);
|
|
1629
|
-
row.style.display = visible ? '' : 'none';
|
|
1630
|
-
if (!visible && detail) detail.style.display = 'none';
|
|
1631
|
-
}
|
|
1632
|
-
var groups = document.querySelectorAll('[data-observe-skill-group]');
|
|
1633
|
-
for (var g = 0; g < groups.length; g++) {
|
|
1634
|
-
var group = groups[g];
|
|
1635
|
-
var groupRows = group.querySelectorAll('[data-observe-row="review"]');
|
|
1636
|
-
var anyVisible = false;
|
|
1637
|
-
for (var r = 0; r < groupRows.length; r++) {
|
|
1638
|
-
if (groupRows[r].style.display !== 'none') {
|
|
1639
|
-
anyVisible = true;
|
|
1640
|
-
break;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
group.style.display = anyVisible ? '' : 'none';
|
|
1644
|
-
if (query && anyVisible) group.open = true;
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
(function setupObserveFilters() {
|
|
1648
|
-
var input = document.getElementById('observe-filter-input');
|
|
1649
|
-
if (input) input.addEventListener('input', applyObserveFilters);
|
|
1650
|
-
})();
|
|
1651
|
-
(function setupSkillRollupRows() {
|
|
1652
|
-
var rows = document.querySelectorAll('[data-observe-rollup-row]');
|
|
1653
|
-
for (var i = 0; i < rows.length; i++) {
|
|
1654
|
-
rows[i].addEventListener('click', function (event) {
|
|
1655
|
-
var targetEl = event.target;
|
|
1656
|
-
if (targetEl && targetEl.closest && targetEl.closest('[data-no-rollup-click]')) return;
|
|
1657
|
-
var id = this.getAttribute('data-skill-anchor');
|
|
1658
|
-
if (!id) return;
|
|
1659
|
-
var target = document.getElementById(id);
|
|
1660
|
-
if (!target) return;
|
|
1661
|
-
target.open = true;
|
|
1662
|
-
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
})();
|
|
1666
|
-
(function syncActionPanelHeight() {
|
|
1667
|
-
var action = document.getElementById('observe-action-panel');
|
|
1668
|
-
var funnel = document.getElementById('observe-funnel-panel');
|
|
1669
|
-
if (!action || !funnel) return;
|
|
1670
|
-
function sync() {
|
|
1671
|
-
action.style.height = '';
|
|
1672
|
-
var h = Math.max(funnel.scrollHeight, funnel.offsetHeight);
|
|
1673
|
-
if (h > 0) action.style.height = h + 'px';
|
|
1674
|
-
}
|
|
1675
|
-
sync();
|
|
1676
|
-
window.addEventListener('resize', sync);
|
|
1677
|
-
if (document.fonts && document.fonts.ready) document.fonts.ready.then(sync).catch(function () {});
|
|
1678
|
-
})();
|
|
1679
|
-
(function setupTimelineFullTextTooltips() {
|
|
1680
|
-
var tooltip = document.getElementById('timeline-fulltext-tooltip');
|
|
1681
|
-
if (!tooltip) return;
|
|
1682
|
-
var activeEl = null;
|
|
1683
|
-
function hasMoreFullText(el) {
|
|
1684
|
-
return el.getAttribute('data-timeline-has-more') === '1';
|
|
1685
|
-
}
|
|
1686
|
-
function isOverflowing(el) {
|
|
1687
|
-
if (!el || (el.clientHeight === 0 && el.clientWidth === 0)) return false;
|
|
1688
|
-
return hasMoreFullText(el) || el.scrollHeight > el.clientHeight + 2 || el.scrollWidth > el.clientWidth + 2;
|
|
1689
|
-
}
|
|
1690
|
-
function updateOverflowState(el) {
|
|
1691
|
-
var overflowing = isOverflowing(el);
|
|
1692
|
-
el.classList.toggle('is-overflowing', overflowing);
|
|
1693
|
-
el.tabIndex = overflowing ? 0 : -1;
|
|
1694
|
-
return overflowing;
|
|
1695
|
-
}
|
|
1696
|
-
function refreshOverflowStates() {
|
|
1697
|
-
var nodes = document.querySelectorAll('[data-timeline-fulltext]');
|
|
1698
|
-
for (var i = 0; i < nodes.length; i++) updateOverflowState(nodes[i]);
|
|
1699
|
-
}
|
|
1700
|
-
window.refreshTimelineFullTextState = refreshOverflowStates;
|
|
1701
|
-
function hide() {
|
|
1702
|
-
if (activeEl) activeEl.classList.remove('is-detail-open');
|
|
1703
|
-
activeEl = null;
|
|
1704
|
-
tooltip.classList.remove('is-open');
|
|
1705
|
-
tooltip.setAttribute('aria-hidden', 'true');
|
|
1706
|
-
tooltip.innerHTML = '';
|
|
1707
|
-
}
|
|
1708
|
-
function show(el) {
|
|
1709
|
-
if (!updateOverflowState(el)) {
|
|
1710
|
-
hide();
|
|
1711
|
-
return;
|
|
1712
|
-
}
|
|
1713
|
-
var text = el.getAttribute('data-timeline-fulltext') || '';
|
|
1714
|
-
if (!text) return;
|
|
1715
|
-
if (activeEl && activeEl !== el) activeEl.classList.remove('is-detail-open');
|
|
1716
|
-
activeEl = el;
|
|
1717
|
-
activeEl.classList.add('is-detail-open');
|
|
1718
|
-
var title = el.getAttribute('data-timeline-fulltext-title') || '完整内容';
|
|
1719
|
-
tooltip.innerHTML = '<div class="timeline-fulltext-dialog" role="document"><div class="timeline-fulltext-header"><strong></strong><button type="button" class="timeline-fulltext-close" data-timeline-fulltext-close>关闭</button></div><div class="timeline-fulltext-body"></div></div>';
|
|
1720
|
-
tooltip.querySelector('strong').textContent = title;
|
|
1721
|
-
tooltip.querySelector('.timeline-fulltext-body').textContent = text;
|
|
1722
|
-
var close = tooltip.querySelector('[data-timeline-fulltext-close]');
|
|
1723
|
-
if (close) close.addEventListener('click', function (event) {
|
|
1724
|
-
event.stopPropagation();
|
|
1725
|
-
hide();
|
|
1726
|
-
});
|
|
1727
|
-
tooltip.classList.add('is-open');
|
|
1728
|
-
tooltip.setAttribute('aria-hidden', 'false');
|
|
1729
|
-
if (close && close.focus) close.focus();
|
|
1730
|
-
}
|
|
1731
|
-
tooltip.addEventListener('click', function (event) {
|
|
1732
|
-
if (event.target === tooltip) hide();
|
|
1733
|
-
});
|
|
1734
|
-
document.addEventListener('click', function (event) {
|
|
1735
|
-
var target = event.target;
|
|
1736
|
-
var fulltext = target && target.closest ? target.closest('.timeline-snippet[data-timeline-fulltext]') : null;
|
|
1737
|
-
if (!fulltext) return;
|
|
1738
|
-
if (!updateOverflowState(fulltext)) return;
|
|
1739
|
-
event.stopPropagation();
|
|
1740
|
-
show(fulltext);
|
|
1741
|
-
});
|
|
1742
|
-
document.addEventListener('keydown', function (event) {
|
|
1743
|
-
var target = event.target;
|
|
1744
|
-
var fulltext = target && target.closest ? target.closest('.timeline-snippet[data-timeline-fulltext]') : null;
|
|
1745
|
-
if (!fulltext) return;
|
|
1746
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
1747
|
-
if (!updateOverflowState(fulltext)) return;
|
|
1748
|
-
event.preventDefault();
|
|
1749
|
-
event.stopPropagation();
|
|
1750
|
-
show(fulltext);
|
|
1751
|
-
}
|
|
1752
|
-
if (event.key === 'Escape') hide();
|
|
1753
|
-
});
|
|
1754
|
-
window.requestAnimationFrame(refreshOverflowStates);
|
|
1755
|
-
window.addEventListener('resize', refreshOverflowStates);
|
|
1756
|
-
document.addEventListener('click', function (event) {
|
|
1757
|
-
var target = event.target;
|
|
1758
|
-
if (target && target.closest && target.closest('.timeline-tab-button')) {
|
|
1759
|
-
window.setTimeout(refreshOverflowStates, 0);
|
|
1760
|
-
hide();
|
|
1761
|
-
return;
|
|
1762
|
-
}
|
|
1763
|
-
if (target && target.closest && (target.closest('#timeline-fulltext-tooltip .timeline-fulltext-dialog') || target.closest('.timeline-snippet[data-timeline-fulltext]'))) return;
|
|
1764
|
-
hide();
|
|
1765
|
-
});
|
|
1766
|
-
document.addEventListener('keydown', function (event) {
|
|
1767
|
-
if (event.key === 'Escape') hide();
|
|
1768
|
-
});
|
|
1769
|
-
})();
|
|
1770
|
-
(function setupSignalTooltips() {
|
|
1771
|
-
var tooltip = document.getElementById('signal-global-tooltip');
|
|
1772
|
-
if (!tooltip) return;
|
|
1773
|
-
function show(el) {
|
|
1774
|
-
var title = el.getAttribute('data-signal-title') || '';
|
|
1775
|
-
var description = el.getAttribute('data-signal-description') || '';
|
|
1776
|
-
tooltip.innerHTML = '<strong style="display:block;margin-bottom:4px"></strong><div></div>';
|
|
1777
|
-
tooltip.querySelector('strong').textContent = title;
|
|
1778
|
-
tooltip.querySelector('div').textContent = description;
|
|
1779
|
-
tooltip.style.display = 'block';
|
|
1780
|
-
var rect = el.getBoundingClientRect();
|
|
1781
|
-
var top = rect.bottom + 8;
|
|
1782
|
-
var left = rect.left;
|
|
1783
|
-
var width = Math.min(360, window.innerWidth - 32);
|
|
1784
|
-
if (left + width > window.innerWidth - 16) left = window.innerWidth - width - 16;
|
|
1785
|
-
if (left < 16) left = 16;
|
|
1786
|
-
tooltip.style.left = left + 'px';
|
|
1787
|
-
tooltip.style.top = top + 'px';
|
|
1788
|
-
var tipRect = tooltip.getBoundingClientRect();
|
|
1789
|
-
if (tipRect.bottom > window.innerHeight - 16) {
|
|
1790
|
-
tooltip.style.top = Math.max(16, rect.top - tipRect.height - 8) + 'px';
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
function hide() {
|
|
1794
|
-
tooltip.style.display = 'none';
|
|
1795
|
-
}
|
|
1796
|
-
var helps = document.querySelectorAll('.signal-help');
|
|
1797
|
-
for (var i = 0; i < helps.length; i++) {
|
|
1798
|
-
helps[i].addEventListener('mouseenter', function () { show(this); });
|
|
1799
|
-
helps[i].addEventListener('focus', function () { show(this); });
|
|
1800
|
-
helps[i].addEventListener('mouseleave', hide);
|
|
1801
|
-
helps[i].addEventListener('blur', hide);
|
|
1802
|
-
}
|
|
1803
|
-
})();
|
|
1804
|
-
`;
|
|
1805
|
-
}
|