@ouro.bot/cli 0.1.0-alpha.1469 → 0.1.0-alpha.1470
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 +1 -1
- package/changelog.json +6 -2
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/desk.lock.json +8 -0
- package/dist/heart/identity.js +27 -1
- package/dist/mind/desk-section.js +33 -43
- package/dist/repertoire/desk-mcp.js +140 -0
- package/dist/repertoire/mcp-manager.js +22 -0
- package/dist/repertoire/mcp-tools.js +11 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -1
- package/vendor/desk/.claude-plugin/plugin.json +35 -0
- package/vendor/desk/.mcp.claude-codex.json +28 -0
- package/vendor/desk/.mcp.copilot.json +16 -0
- package/vendor/desk/.ouro-desk.json +6 -0
- package/vendor/desk/CHANGELOG.md +7004 -0
- package/vendor/desk/README.md +195 -0
- package/vendor/desk/activation/README.md +98 -0
- package/vendor/desk/activation/copilot-root.flattened-bundle.json +38 -0
- package/vendor/desk/activation/desk.activation.json +251 -0
- package/vendor/desk/activation/host-capability-evidence.md +46 -0
- package/vendor/desk/activation/support-matrix.json +84 -0
- package/vendor/desk/agency.json +20 -0
- package/vendor/desk/agents/observer.agent.md +26 -0
- package/vendor/desk/agents/observer.md +29 -0
- package/vendor/desk/agents/worker.agent.md +32 -0
- package/vendor/desk/agents/worker.md +40 -0
- package/vendor/desk/artifacts/tombstones/tombstone.schema.json +53 -0
- package/vendor/desk/artifacts/tombstones/tombstones.jsonl +1 -0
- package/vendor/desk/changelog.d/README.md +12 -0
- package/vendor/desk/docs/agent-files.md +104 -0
- package/vendor/desk/docs/agentic-engineering-v2-rfc.md +206 -0
- package/vendor/desk/docs/agentic-engineering-v3-rfc.md +109 -0
- package/vendor/desk/docs/browser-remote-desktops.md +69 -0
- package/vendor/desk/docs/dependency-activation-stories-and-criteria.md +500 -0
- package/vendor/desk/docs/evaluation-packet.md +363 -0
- package/vendor/desk/docs/factory-local-capture.md +651 -0
- package/vendor/desk/docs/factory-store-playbook.md +927 -0
- package/vendor/desk/docs/images/factory-site.png +0 -0
- package/vendor/desk/docs/issue-drains.md +79 -0
- package/vendor/desk/docs/lfs-inspection.md +55 -0
- package/vendor/desk/docs/preview-diagnostics.md +11 -0
- package/vendor/desk/docs/relays.md +88 -0
- package/vendor/desk/docs/schedules.md +69 -0
- package/vendor/desk/docs/search-recovery.md +22 -0
- package/vendor/desk/docs/session-labels.md +157 -0
- package/vendor/desk/docs/session-retention.md +125 -0
- package/vendor/desk/docs/sessions.md +17 -0
- package/vendor/desk/docs/stalled-nudges.md +54 -0
- package/vendor/desk/docs/webhooks.md +80 -0
- package/vendor/desk/docs/workspace-tidy.md +74 -0
- package/vendor/desk/hooks/boot-checks.cjs +7 -0
- package/vendor/desk/hooks/claude-session-start.cjs +123 -0
- package/vendor/desk/hooks/compatible-node.cjs +97 -0
- package/vendor/desk/hooks/copilot-boot-prompt.cjs +69 -0
- package/vendor/desk/hooks/copilot-durable-files.cjs +8 -0
- package/vendor/desk/hooks/copilot-hooks.json +61 -0
- package/vendor/desk/hooks/copilot-intake-context.cjs +5 -0
- package/vendor/desk/hooks/copilot-lane-model.cjs +8 -0
- package/vendor/desk/hooks/copilot-session-start.cjs +264 -0
- package/vendor/desk/hooks/copilot-skill-current.cjs +28 -0
- package/vendor/desk/hooks/factory-end.cjs +5 -0
- package/vendor/desk/hooks/factory-start.cjs +27 -0
- package/vendor/desk/hooks/hooks.json +40 -0
- package/vendor/desk/hooks/lib/boot-checks.cjs +643 -0
- package/vendor/desk/hooks/lib/child-agent.cjs +14 -0
- package/vendor/desk/hooks/lib/copilot-intake-context.cjs +73 -0
- package/vendor/desk/hooks/lib/current-release.cjs +162 -0
- package/vendor/desk/hooks/lib/delivery-stop.cjs +326 -0
- package/vendor/desk/hooks/lib/detach-worker.cjs +43 -0
- package/vendor/desk/hooks/lib/durable-files.cjs +102 -0
- package/vendor/desk/hooks/lib/factory-end.cjs +327 -0
- package/vendor/desk/hooks/lib/lane-model.cjs +82 -0
- package/vendor/desk/hooks/lib/node-required.cjs +56 -0
- package/vendor/desk/hooks/lib/orca-session-title.cjs +60 -0
- package/vendor/desk/hooks/lib/session-end.cjs +30 -0
- package/vendor/desk/hooks/lib/sync-end.cjs +89 -0
- package/vendor/desk/hooks/loop-start.cjs +105 -0
- package/vendor/desk/hooks/node-missing.sh +78 -0
- package/vendor/desk/hooks/orca-session-title.cjs +8 -0
- package/vendor/desk/hooks/session-end.cjs +8 -0
- package/vendor/desk/mcp/README.md +269 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/support-matrix.json +72 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/README.md +25 -0
- package/vendor/desk/mcp/bootstrap.cjs +761 -0
- package/vendor/desk/mcp/docs/private-feedback.md +13 -0
- package/vendor/desk/mcp/idle-proxy.cjs +423 -0
- package/vendor/desk/mcp/index.js +813 -0
- package/vendor/desk/mcp/package-lock.json +3717 -0
- package/vendor/desk/mcp/package.json +44 -0
- package/vendor/desk/mcp/scripts/agency-desk-channel.js +7 -0
- package/vendor/desk/mcp/scripts/build-runtime-deps-pack.js +5 -0
- package/vendor/desk/mcp/scripts/crew.js +89 -0
- package/vendor/desk/mcp/scripts/drains-launcher.mjs +329 -0
- package/vendor/desk/mcp/scripts/drains.js +5 -0
- package/vendor/desk/mcp/scripts/factory.js +657 -0
- package/vendor/desk/mcp/scripts/file-desk-problem.js +9 -0
- package/vendor/desk/mcp/scripts/finish-commit.js +7 -0
- package/vendor/desk/mcp/scripts/lfs.js +37 -0
- package/vendor/desk/mcp/scripts/local-recovery.js +363 -0
- package/vendor/desk/mcp/scripts/migrations.js +11 -0
- package/vendor/desk/mcp/scripts/private-view.js +177 -0
- package/vendor/desk/mcp/scripts/resolve-desk-root.js +106 -0
- package/vendor/desk/mcp/scripts/session-boot.js +22 -0
- package/vendor/desk/mcp/scripts/session-retention.js +5 -0
- package/vendor/desk/mcp/scripts/session-sync.js +10 -0
- package/vendor/desk/mcp/scripts/sessions.js +5 -0
- package/vendor/desk/mcp/scripts/sync-push.js +13 -0
- package/vendor/desk/mcp/scripts/tidy-status.js +8 -0
- package/vendor/desk/mcp/scripts/verify-runtime-deps-pack.js +5 -0
- package/vendor/desk/mcp/src/actions/desk-read.actions.mts +73 -0
- package/vendor/desk/mcp/src/actions/desk-session.actions.mts +42 -0
- package/vendor/desk/mcp/src/actions/desk-web.actions.mts +52 -0
- package/vendor/desk/mcp/src/actions/desk.actions.mts +5 -0
- package/vendor/desk/mcp/src/actions/generated/desk/OuroActions.swift +649 -0
- package/vendor/desk/mcp/src/actions/generated/desk/OuroActionsReins.swift +61 -0
- package/vendor/desk/mcp/src/actions/generated/desk/actions.json +280 -0
- package/vendor/desk/mcp/src/actions/generated/desk/commands.json +145 -0
- package/vendor/desk/mcp/src/actions/generated/desk/mcp.json +256 -0
- package/vendor/desk/mcp/src/actions/generated/desk/web.ts +59 -0
- package/vendor/desk/mcp/src/actions/generated/desk/webmcp.json +250 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActions.swift +241 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActionsReins.swift +25 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/actions.json +73 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/commands.json +53 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/mcp.json +83 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/web.ts +47 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/webmcp.json +81 -0
- package/vendor/desk/mcp/src/actions/served.js +5 -0
- package/vendor/desk/mcp/src/activation/admit.js +77 -0
- package/vendor/desk/mcp/src/activation/failures.js +65 -0
- package/vendor/desk/mcp/src/activation/readiness-policy.js +102 -0
- package/vendor/desk/mcp/src/activation/schema.js +17 -0
- package/vendor/desk/mcp/src/activation/superpowers-context.js +265 -0
- package/vendor/desk/mcp/src/activation/validate.js +540 -0
- package/vendor/desk/mcp/src/artifacts/tombstones.js +61 -0
- package/vendor/desk/mcp/src/crew/initiative.js +287 -0
- package/vendor/desk/mcp/src/crew/workspace.js +1259 -0
- package/vendor/desk/mcp/src/db/init.js +75 -0
- package/vendor/desk/mcp/src/db/schema.sql +83 -0
- package/vendor/desk/mcp/src/desk/active-tasks.js +408 -0
- package/vendor/desk/mcp/src/desk/card-commit-guard.js +281 -0
- package/vendor/desk/mcp/src/desk/cleanup-index.js +53 -0
- package/vendor/desk/mcp/src/desk/content-home.js +246 -0
- package/vendor/desk/mcp/src/desk/crew-config.js +102 -0
- package/vendor/desk/mcp/src/desk/crew-member.js +196 -0
- package/vendor/desk/mcp/src/desk/crew-roster.js +151 -0
- package/vendor/desk/mcp/src/desk/frontmatter-lite.js +228 -0
- package/vendor/desk/mcp/src/desk/gh-logins.js +109 -0
- package/vendor/desk/mcp/src/desk/handles.js +123 -0
- package/vendor/desk/mcp/src/desk/handoff-reference.js +35 -0
- package/vendor/desk/mcp/src/desk/improvement-authority.js +3 -0
- package/vendor/desk/mcp/src/desk/improvement-cards.js +704 -0
- package/vendor/desk/mcp/src/desk/improvement-person.js +51 -0
- package/vendor/desk/mcp/src/desk/lifecycle.js +16 -0
- package/vendor/desk/mcp/src/desk/machine-desks.js +119 -0
- package/vendor/desk/mcp/src/desk/naming.js +333 -0
- package/vendor/desk/mcp/src/desk/organization.js +592 -0
- package/vendor/desk/mcp/src/desk/resources.js +274 -0
- package/vendor/desk/mcp/src/desk/runtime-resolver.js +30 -0
- package/vendor/desk/mcp/src/desk/scratch-paths.js +44 -0
- package/vendor/desk/mcp/src/desk/step-delivery.js +140 -0
- package/vendor/desk/mcp/src/desk/steps.js +263 -0
- package/vendor/desk/mcp/src/desk/tidy.js +930 -0
- package/vendor/desk/mcp/src/desk/unsigned-deliveries.js +359 -0
- package/vendor/desk/mcp/src/factory/agent-types.js +45 -0
- package/vendor/desk/mcp/src/factory/andon-watch.js +109 -0
- package/vendor/desk/mcp/src/factory/binding.js +612 -0
- package/vendor/desk/mcp/src/factory/boot-check.js +645 -0
- package/vendor/desk/mcp/src/factory/capture-classify.js +158 -0
- package/vendor/desk/mcp/src/factory/capture-count.js +183 -0
- package/vendor/desk/mcp/src/factory/capture-flush.js +268 -0
- package/vendor/desk/mcp/src/factory/capture-publish.js +141 -0
- package/vendor/desk/mcp/src/factory/capture-schema.js +193 -0
- package/vendor/desk/mcp/src/factory/capture-sweep.js +239 -0
- package/vendor/desk/mcp/src/factory/catch-point.js +60 -0
- package/vendor/desk/mcp/src/factory/commit-resolve.js +94 -0
- package/vendor/desk/mcp/src/factory/consent-answer.js +37 -0
- package/vendor/desk/mcp/src/factory/context-capability.js +15 -0
- package/vendor/desk/mcp/src/factory/context-outbox.js +885 -0
- package/vendor/desk/mcp/src/factory/context-run.js +386 -0
- package/vendor/desk/mcp/src/factory/context-schema.js +249 -0
- package/vendor/desk/mcp/src/factory/copilot-turn-index.js +93 -0
- package/vendor/desk/mcp/src/factory/copilot-usage.js +148 -0
- package/vendor/desk/mcp/src/factory/credential.js +45 -0
- package/vendor/desk/mcp/src/factory/derive-claude.js +960 -0
- package/vendor/desk/mcp/src/factory/derive-codex.js +734 -0
- package/vendor/desk/mcp/src/factory/derive-common.js +279 -0
- package/vendor/desk/mcp/src/factory/derive-copilot.js +1057 -0
- package/vendor/desk/mcp/src/factory/derive-run.js +807 -0
- package/vendor/desk/mcp/src/factory/desk-problem-file.js +310 -0
- package/vendor/desk/mcp/src/factory/desk-problem-fingerprint.js +70 -0
- package/vendor/desk/mcp/src/factory/desk-problem-known.js +246 -0
- package/vendor/desk/mcp/src/factory/desk-problem-template.js +107 -0
- package/vendor/desk/mcp/src/factory/desk-repo.js +1223 -0
- package/vendor/desk/mcp/src/factory/desk-task-line.js +28 -0
- package/vendor/desk/mcp/src/factory/desk-visibility.js +48 -0
- package/vendor/desk/mcp/src/factory/end-hook.js +14 -0
- package/vendor/desk/mcp/src/factory/evaluate-kick.js +164 -0
- package/vendor/desk/mcp/src/factory/evaluate-run.js +678 -0
- package/vendor/desk/mcp/src/factory/evaluator-step.js +484 -0
- package/vendor/desk/mcp/src/factory/filer-launch.js +79 -0
- package/vendor/desk/mcp/src/factory/flush-health.js +26 -0
- package/vendor/desk/mcp/src/factory/flush.js +1758 -0
- package/vendor/desk/mcp/src/factory/focus.js +326 -0
- package/vendor/desk/mcp/src/factory/headless-flag.cjs +32 -0
- package/vendor/desk/mcp/src/factory/headless-flag.js +25 -0
- package/vendor/desk/mcp/src/factory/headless-ledger.js +743 -0
- package/vendor/desk/mcp/src/factory/headless.js +567 -0
- package/vendor/desk/mcp/src/factory/held-route.js +93 -0
- package/vendor/desk/mcp/src/factory/host-flags.js +36 -0
- package/vendor/desk/mcp/src/factory/improvement-verify.js +429 -0
- package/vendor/desk/mcp/src/factory/kaizen-file.js +231 -0
- package/vendor/desk/mcp/src/factory/label-binding.js +90 -0
- package/vendor/desk/mcp/src/factory/label-schema.js +426 -0
- package/vendor/desk/mcp/src/factory/local-status.js +368 -0
- package/vendor/desk/mcp/src/factory/loop-conditions.js +121 -0
- package/vendor/desk/mcp/src/factory/loop-health.js +500 -0
- package/vendor/desk/mcp/src/factory/loop-slot.js +90 -0
- package/vendor/desk/mcp/src/factory/loop-status.js +100 -0
- package/vendor/desk/mcp/src/factory/loop-switch.cjs +14 -0
- package/vendor/desk/mcp/src/factory/loop-worker-state.js +96 -0
- package/vendor/desk/mcp/src/factory/loop-worker.js +290 -0
- package/vendor/desk/mcp/src/factory/marker.js +61 -0
- package/vendor/desk/mcp/src/factory/mirror-step.js +145 -0
- package/vendor/desk/mcp/src/factory/os-protect.js +243 -0
- package/vendor/desk/mcp/src/factory/outbox.js +2231 -0
- package/vendor/desk/mcp/src/factory/outcome.js +431 -0
- package/vendor/desk/mcp/src/factory/pipeline/andon.js +319 -0
- package/vendor/desk/mcp/src/factory/pipeline/attention-rollup.js +158 -0
- package/vendor/desk/mcp/src/factory/pipeline/attention.js +146 -0
- package/vendor/desk/mcp/src/factory/pipeline/build.js +299 -0
- package/vendor/desk/mcp/src/factory/pipeline/compare.js +148 -0
- package/vendor/desk/mcp/src/factory/pipeline/formulas.js +652 -0
- package/vendor/desk/mcp/src/factory/pipeline/kaizen.js +387 -0
- package/vendor/desk/mcp/src/factory/pipeline/lifecycle-clocks.js +345 -0
- package/vendor/desk/mcp/src/factory/pipeline/normalize.js +73 -0
- package/vendor/desk/mcp/src/factory/pipeline/number-states.js +154 -0
- package/vendor/desk/mcp/src/factory/pipeline/outcomes.js +268 -0
- package/vendor/desk/mcp/src/factory/pipeline/report.js +737 -0
- package/vendor/desk/mcp/src/factory/pipeline/rollups.js +883 -0
- package/vendor/desk/mcp/src/factory/pipeline/stretches.js +523 -0
- package/vendor/desk/mcp/src/factory/pipeline/timeline.js +199 -0
- package/vendor/desk/mcp/src/factory/pipeline/validate-pr.js +238 -0
- package/vendor/desk/mcp/src/factory/pipeline/versions.js +42 -0
- package/vendor/desk/mcp/src/factory/pipeline/walk.js +1177 -0
- package/vendor/desk/mcp/src/factory/plugin-registry.js +72 -0
- package/vendor/desk/mcp/src/factory/plugin-sources.cjs +249 -0
- package/vendor/desk/mcp/src/factory/pr-green.js +77 -0
- package/vendor/desk/mcp/src/factory/process-lock.js +142 -0
- package/vendor/desk/mcp/src/factory/proof-session.js +75 -0
- package/vendor/desk/mcp/src/factory/publish.js +637 -0
- package/vendor/desk/mcp/src/factory/published-schema.js +648 -0
- package/vendor/desk/mcp/src/factory/reconcile-reasons.js +22 -0
- package/vendor/desk/mcp/src/factory/reconcile-step.js +251 -0
- package/vendor/desk/mcp/src/factory/reconcile.js +808 -0
- package/vendor/desk/mcp/src/factory/release-version.js +134 -0
- package/vendor/desk/mcp/src/factory/repo-name.js +13 -0
- package/vendor/desk/mcp/src/factory/retention.js +60 -0
- package/vendor/desk/mcp/src/factory/route-desk.js +40 -0
- package/vendor/desk/mcp/src/factory/route-issues.js +251 -0
- package/vendor/desk/mcp/src/factory/route-local.js +264 -0
- package/vendor/desk/mcp/src/factory/schema.js +957 -0
- package/vendor/desk/mcp/src/factory/session-kind.js +16 -0
- package/vendor/desk/mcp/src/factory/session-lifetime.js +56 -0
- package/vendor/desk/mcp/src/factory/session-route.js +183 -0
- package/vendor/desk/mcp/src/factory/shell-git.js +500 -0
- package/vendor/desk/mcp/src/factory/store-issues.js +143 -0
- package/vendor/desk/mcp/src/factory/store-route.js +208 -0
- package/vendor/desk/mcp/src/factory/test-state-guard.js +103 -0
- package/vendor/desk/mcp/src/factory/time.js +36 -0
- package/vendor/desk/mcp/src/factory/tool-issue-file.js +84 -0
- package/vendor/desk/mcp/src/factory/tool-kinds.js +87 -0
- package/vendor/desk/mcp/src/factory/triage-schema.js +233 -0
- package/vendor/desk/mcp/src/factory/windows-acl.js +679 -0
- package/vendor/desk/mcp/src/indexer/chunk.js +232 -0
- package/vendor/desk/mcp/src/indexer/discover.js +434 -0
- package/vendor/desk/mcp/src/indexer/exclusions.js +247 -0
- package/vendor/desk/mcp/src/indexer/index.js +167 -0
- package/vendor/desk/mcp/src/indexer/refs.js +0 -0
- package/vendor/desk/mcp/src/indexer/text-hash.js +18 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/actions.claims.json +75 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/dist-manifest.json +70 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/ouro-actions.mts +1416 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/LICENSE +21 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-claims.ts +190 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-command.ts +1020 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/checks.ts +343 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/cli.ts +240 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/component.ts +430 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/dev-commands.ts +204 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/doctor.ts +126 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/effects.ts +68 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/exit-codes.ts +75 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/help.ts +220 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/mcp.ts +268 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/outcome.ts +265 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/output.ts +67 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/precise-copy.ts +235 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/problem.ts +124 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.kit.mts +8 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.ts +568 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/terminal.ts +245 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/voice.ts +136 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/wait.ts +226 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/work-event.ts +181 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.kit.mts +18 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.ts +2072 -0
- package/vendor/desk/mcp/src/package-metadata.js +20 -0
- package/vendor/desk/mcp/src/protected/legacy-ledger.js +55 -0
- package/vendor/desk/mcp/src/readiness/leftovers.js +75 -0
- package/vendor/desk/mcp/src/readiness/process-start.js +149 -0
- package/vendor/desk/mcp/src/runtime/admission-worker.js +194 -0
- package/vendor/desk/mcp/src/runtime/admission.js +177 -0
- package/vendor/desk/mcp/src/runtime/agency-desk-channel.js +342 -0
- package/vendor/desk/mcp/src/runtime/agents-md.js +62 -0
- package/vendor/desk/mcp/src/runtime/append-lane.js +68 -0
- package/vendor/desk/mcp/src/runtime/argv-safe-reason.js +55 -0
- package/vendor/desk/mcp/src/runtime/boot-dependencies.js +75 -0
- package/vendor/desk/mcp/src/runtime/boot-text.js +504 -0
- package/vendor/desk/mcp/src/runtime/boot.js +1677 -0
- package/vendor/desk/mcp/src/runtime/bootstrap.js +1455 -0
- package/vendor/desk/mcp/src/runtime/chunked-import.js +102 -0
- package/vendor/desk/mcp/src/runtime/copilot-commit-trailer.js +133 -0
- package/vendor/desk/mcp/src/runtime/copilot-session.js +155 -0
- package/vendor/desk/mcp/src/runtime/deliver.js +469 -0
- package/vendor/desk/mcp/src/runtime/desk-channel.js +86 -0
- package/vendor/desk/mcp/src/runtime/desk-failure.js +26 -0
- package/vendor/desk/mcp/src/runtime/desk-health.js +168 -0
- package/vendor/desk/mcp/src/runtime/desk-session.js +1451 -0
- package/vendor/desk/mcp/src/runtime/diagnostic-server.js +72 -0
- package/vendor/desk/mcp/src/runtime/diagnostics.js +241 -0
- package/vendor/desk/mcp/src/runtime/drains-cli.js +187 -0
- package/vendor/desk/mcp/src/runtime/drains.js +781 -0
- package/vendor/desk/mcp/src/runtime/elsewhere-note.js +9 -0
- package/vendor/desk/mcp/src/runtime/failure-evidence.js +21 -0
- package/vendor/desk/mcp/src/runtime/fast-refs.js +209 -0
- package/vendor/desk/mcp/src/runtime/filer-throttle.js +66 -0
- package/vendor/desk/mcp/src/runtime/focused-card.js +147 -0
- package/vendor/desk/mcp/src/runtime/front-door.js +204 -0
- package/vendor/desk/mcp/src/runtime/gate-wait.js +2 -0
- package/vendor/desk/mcp/src/runtime/git-inspection.js +201 -0
- package/vendor/desk/mcp/src/runtime/git-read-worker.js +157 -0
- package/vendor/desk/mcp/src/runtime/health.js +50 -0
- package/vendor/desk/mcp/src/runtime/hooks.js +353 -0
- package/vendor/desk/mcp/src/runtime/hosted.js +163 -0
- package/vendor/desk/mcp/src/runtime/inbox.js +102 -0
- package/vendor/desk/mcp/src/runtime/index-drift.js +118 -0
- package/vendor/desk/mcp/src/runtime/last-start.js +133 -0
- package/vendor/desk/mcp/src/runtime/lesson-section.js +92 -0
- package/vendor/desk/mcp/src/runtime/lessons-shelf.js +100 -0
- package/vendor/desk/mcp/src/runtime/lfs.js +319 -0
- package/vendor/desk/mcp/src/runtime/native-path.js +12 -0
- package/vendor/desk/mcp/src/runtime/newest-release.js +197 -0
- package/vendor/desk/mcp/src/runtime/node-selection.js +233 -0
- package/vendor/desk/mcp/src/runtime/orca-session-title.js +225 -0
- package/vendor/desk/mcp/src/runtime/other-sessions.js +183 -0
- package/vendor/desk/mcp/src/runtime/pending-migrations.js +653 -0
- package/vendor/desk/mcp/src/runtime/plugin-update.js +215 -0
- package/vendor/desk/mcp/src/runtime/pluginless-runtimes.js +34 -0
- package/vendor/desk/mcp/src/runtime/pr-publication.js +226 -0
- package/vendor/desk/mcp/src/runtime/preview-snapshot.js +23 -0
- package/vendor/desk/mcp/src/runtime/publication-mode.js +19 -0
- package/vendor/desk/mcp/src/runtime/relays.js +974 -0
- package/vendor/desk/mcp/src/runtime/release-alert.js +148 -0
- package/vendor/desk/mcp/src/runtime/remote-identity.js +140 -0
- package/vendor/desk/mcp/src/runtime/resolve-here.js +4 -0
- package/vendor/desk/mcp/src/runtime/runtime-deps-cli.js +65 -0
- package/vendor/desk/mcp/src/runtime/runtime-deps.js +1109 -0
- package/vendor/desk/mcp/src/runtime/runtime-identity.js +22 -0
- package/vendor/desk/mcp/src/runtime/runtime-swap.js +101 -0
- package/vendor/desk/mcp/src/runtime/schedules.js +235 -0
- package/vendor/desk/mcp/src/runtime/session-activity.js +190 -0
- package/vendor/desk/mcp/src/runtime/session-label.js +30 -0
- package/vendor/desk/mcp/src/runtime/session-retention.js +662 -0
- package/vendor/desk/mcp/src/runtime/session-sync.js +333 -0
- package/vendor/desk/mcp/src/runtime/session-trailer.js +126 -0
- package/vendor/desk/mcp/src/runtime/sessions-cli.js +301 -0
- package/vendor/desk/mcp/src/runtime/signoff-listed.js +81 -0
- package/vendor/desk/mcp/src/runtime/skills.js +76 -0
- package/vendor/desk/mcp/src/runtime/stale-card-lead.js +52 -0
- package/vendor/desk/mcp/src/runtime/stale-desk-refresh.js +198 -0
- package/vendor/desk/mcp/src/runtime/stale-desk.js +219 -0
- package/vendor/desk/mcp/src/runtime/stalled.js +255 -0
- package/vendor/desk/mcp/src/runtime/standing-authority.js +79 -0
- package/vendor/desk/mcp/src/runtime/startup-boot.js +341 -0
- package/vendor/desk/mcp/src/runtime/startup-resolve.js +140 -0
- package/vendor/desk/mcp/src/runtime/state-branch.js +203 -0
- package/vendor/desk/mcp/src/runtime/status-compact.js +165 -0
- package/vendor/desk/mcp/src/runtime/status-inspection-child.js +26 -0
- package/vendor/desk/mcp/src/runtime/status-inspection.js +147 -0
- package/vendor/desk/mcp/src/runtime/status-root.js +39 -0
- package/vendor/desk/mcp/src/runtime/sync-worker.js +911 -0
- package/vendor/desk/mcp/src/runtime/test-state-guard.js +107 -0
- package/vendor/desk/mcp/src/runtime/unmerged-saves.js +247 -0
- package/vendor/desk/mcp/src/runtime/workspace-claim.js +53 -0
- package/vendor/desk/mcp/src/runtime/workspace-evidence.js +96 -0
- package/vendor/desk/mcp/src/runtime/workspace-tidy.js +509 -0
- package/vendor/desk/mcp/src/search/direct-lexical.js +54 -0
- package/vendor/desk/mcp/src/search/embedder.js +108 -0
- package/vendor/desk/mcp/src/search/engine.js +406 -0
- package/vendor/desk/mcp/src/search/files-router.js +22 -0
- package/vendor/desk/mcp/src/search/old-index.js +46 -0
- package/vendor/desk/mcp/src/search/vectors.js +60 -0
- package/vendor/desk/mcp/src/server.js +389 -0
- package/vendor/desk/mcp/src/tool-names.js +73 -0
- package/vendor/desk/mcp/src/tool-refusal.cjs +35 -0
- package/vendor/desk/mcp/src/tool-schema-parts.js +12 -0
- package/vendor/desk/mcp/src/tool-schemas.js +325 -0
- package/vendor/desk/mcp/src/tools/_card-commit.js +148 -0
- package/vendor/desk/mcp/src/tools/archive-links.js +185 -0
- package/vendor/desk/mcp/src/tools/archive-move.js +18 -0
- package/vendor/desk/mcp/src/tools/archive-native-session.js +728 -0
- package/vendor/desk/mcp/src/tools/archive-state.js +513 -0
- package/vendor/desk/mcp/src/tools/delivery-gate.js +251 -0
- package/vendor/desk/mcp/src/tools/desk-save.js +444 -0
- package/vendor/desk/mcp/src/tools/doctor.js +122 -0
- package/vendor/desk/mcp/src/tools/done-evidence.js +260 -0
- package/vendor/desk/mcp/src/tools/factory-context.js +204 -0
- package/vendor/desk/mcp/src/tools/friction.js +332 -0
- package/vendor/desk/mcp/src/tools/improvement.js +156 -0
- package/vendor/desk/mcp/src/tools/lesson-lines.js +22 -0
- package/vendor/desk/mcp/src/tools/lesson-owners.js +137 -0
- package/vendor/desk/mcp/src/tools/lesson-team.js +169 -0
- package/vendor/desk/mcp/src/tools/lesson.js +254 -0
- package/vendor/desk/mcp/src/tools/local-only.js +151 -0
- package/vendor/desk/mcp/src/tools/move.js +794 -0
- package/vendor/desk/mcp/src/tools/native-stage-context.js +32 -0
- package/vendor/desk/mcp/src/tools/note.js +267 -0
- package/vendor/desk/mcp/src/tools/search.js +634 -0
- package/vendor/desk/mcp/src/tools/shared-write.js +196 -0
- package/vendor/desk/mcp/src/tools/sibling-desk.js +37 -0
- package/vendor/desk/mcp/src/tools/status.js +233 -0
- package/vendor/desk/mcp/src/tools/task-archive-due.js +9 -0
- package/vendor/desk/mcp/src/tools/task-archived-resource.js +53 -0
- package/vendor/desk/mcp/src/tools/task-body.js +141 -0
- package/vendor/desk/mcp/src/tools/task-focus.js +164 -0
- package/vendor/desk/mcp/src/tools/task-log.js +76 -0
- package/vendor/desk/mcp/src/tools/task-signoff.js +155 -0
- package/vendor/desk/mcp/src/tools/task.js +1768 -0
- package/vendor/desk/mcp/src/tools/track-row.js +89 -0
- package/vendor/desk/mcp/src/tools/track.js +240 -0
- package/vendor/desk/mcp/src/util/agency-session.cjs +29 -0
- package/vendor/desk/mcp/src/util/archive-links.js +105 -0
- package/vendor/desk/mcp/src/util/bash.js +36 -0
- package/vendor/desk/mcp/src/util/capture-record.js +73 -0
- package/vendor/desk/mcp/src/util/cas-commit.js +252 -0
- package/vendor/desk/mcp/src/util/created-dirs.js +71 -0
- package/vendor/desk/mcp/src/util/deferred-tools.js +51 -0
- package/vendor/desk/mcp/src/util/desk-owner.js +99 -0
- package/vendor/desk/mcp/src/util/env-value.js +13 -0
- package/vendor/desk/mcp/src/util/file-identity.js +40 -0
- package/vendor/desk/mcp/src/util/finish-commit.js +145 -0
- package/vendor/desk/mcp/src/util/fm.js +410 -0
- package/vendor/desk/mcp/src/util/git-config-file.js +85 -0
- package/vendor/desk/mcp/src/util/git-stage.js +440 -0
- package/vendor/desk/mcp/src/util/main-publish.js +240 -0
- package/vendor/desk/mcp/src/util/markdown-links.cjs +555 -0
- package/vendor/desk/mcp/src/util/object-input.js +59 -0
- package/vendor/desk/mcp/src/util/paths.js +647 -0
- package/vendor/desk/mcp/src/util/rank.js +189 -0
- package/vendor/desk/mcp/src/util/redact.js +92 -0
- package/vendor/desk/mcp/src/util/remove-retry.js +35 -0
- package/vendor/desk/mcp/src/util/rename-retry.js +73 -0
- package/vendor/desk/mcp/src/util/route-around.js +265 -0
- package/vendor/desk/mcp/src/util/shell-quote.js +18 -0
- package/vendor/desk/mcp/src/util/startup-direction.js +124 -0
- package/vendor/desk/mcp/src/util/state-ignore.js +33 -0
- package/vendor/desk/mcp/src/util/tool-commits.js +64 -0
- package/vendor/desk/mcp/src/util/unicode-16/LICENSE-MIT.txt +7 -0
- package/vendor/desk/mcp/src/util/unicode-16/README.md +9 -0
- package/vendor/desk/mcp/src/util/unicode-16/letter.cjs +1 -0
- package/vendor/desk/mcp/src/util/unicode-16/mark.cjs +1 -0
- package/vendor/desk/mcp/src/util/unicode-16/number.cjs +1 -0
- package/vendor/desk/mcp/web-auth.cjs +1897 -0
- package/vendor/desk/mcp/web-browser-discovery.cjs +53 -0
- package/vendor/desk/mcp/web-catalog.json +34 -0
- package/vendor/desk/mcp/web-launch.cjs +101 -0
- package/vendor/desk/mcp/web.cjs +1239 -0
- package/vendor/desk/migrations/01-move-to-ourostack-desk.md +188 -0
- package/vendor/desk/migrations/02-tidy-desk.md +87 -0
- package/vendor/desk/migrations/03-desk-release-channel.md +38 -0
- package/vendor/desk/optional/session-label/consumer.mjs +237 -0
- package/vendor/desk/optional/session-label/extension.mjs +32 -0
- package/vendor/desk/plugin.json +54 -0
- package/vendor/desk/settings.json +3 -0
- package/vendor/desk/skills/add-workspace-mcp/SKILL.md +180 -0
- package/vendor/desk/skills/adopt-inflight-work/SKILL.md +212 -0
- package/vendor/desk/skills/archive-workflow/SKILL.md +132 -0
- package/vendor/desk/skills/content-routing/SKILL.md +95 -0
- package/vendor/desk/skills/core-meeting-capture/SKILL.md +47 -0
- package/vendor/desk/skills/core-meeting-capture/references/capture-contract.md +175 -0
- package/vendor/desk/skills/curator/SKILL.md +103 -0
- package/vendor/desk/skills/delightful-decks/SKILL.md +67 -0
- package/vendor/desk/skills/desk-problem/SKILL.md +87 -0
- package/vendor/desk/skills/directory-structure/SKILL.md +169 -0
- package/vendor/desk/skills/doc-review-rigor/SKILL.md +63 -0
- package/vendor/desk/skills/draining-issues/SKILL.md +62 -0
- package/vendor/desk/skills/evaluate-release/SKILL.md +96 -0
- package/vendor/desk/skills/evidence-discipline/SKILL.md +150 -0
- package/vendor/desk/skills/factory-evaluator/SKILL.md +122 -0
- package/vendor/desk/skills/factory-task-context/SKILL.md +116 -0
- package/vendor/desk/skills/factory-work/SKILL.md +16 -0
- package/vendor/desk/skills/fast-honest-ci/SKILL.md +70 -0
- package/vendor/desk/skills/fast-honest-ci/examples.md +49 -0
- package/vendor/desk/skills/first-run-bootstrap/SKILL.md +95 -0
- package/vendor/desk/skills/friction-management/SKILL.md +98 -0
- package/vendor/desk/skills/git-hygiene/SKILL.md +253 -0
- package/vendor/desk/skills/independent-review/SKILL.md +34 -0
- package/vendor/desk/skills/interaction-style/SKILL.md +239 -0
- package/vendor/desk/skills/lesson-capture/SKILL.md +85 -0
- package/vendor/desk/skills/lesson-capture/agents-md-budget.mjs +61 -0
- package/vendor/desk/skills/online-evaluation/SKILL.md +81 -0
- package/vendor/desk/skills/operator-voice-comments/LICENSE-humanize +21 -0
- package/vendor/desk/skills/operator-voice-comments/SKILL.md +90 -0
- package/vendor/desk/skills/operator-voice-comments/human-voice.md +43 -0
- package/vendor/desk/skills/peer-pr-review/SKILL.md +104 -0
- package/vendor/desk/skills/pr-feedback-on-own-pr/SKILL.md +145 -0
- package/vendor/desk/skills/pr-review-interrogation/SKILL.md +121 -0
- package/vendor/desk/skills/pr-reviewer-audit/SKILL.md +68 -0
- package/vendor/desk/skills/pr-reviewer-audit/helpers/audit.py +335 -0
- package/vendor/desk/skills/pr-reviewer-audit/helpers/test_audit.py +486 -0
- package/vendor/desk/skills/pr-self-review/SKILL.md +86 -0
- package/vendor/desk/skills/pr-surface-hygiene/SKILL.md +105 -0
- package/vendor/desk/skills/pr-surface-hygiene/check-visual-proof.cjs +99 -0
- package/vendor/desk/skills/pr-surface-hygiene/repository-setup.md +19 -0
- package/vendor/desk/skills/pr-surface-hygiene/resources/pr-visual-proof.yml +29 -0
- package/vendor/desk/skills/pr-surface-hygiene/resources/pull-request-template.md +5 -0
- package/vendor/desk/skills/preflight-actions/SKILL.md +60 -0
- package/vendor/desk/skills/preview-feedback/SKILL.md +70 -0
- package/vendor/desk/skills/repo-handling/SKILL.md +67 -0
- package/vendor/desk/skills/rnd-lab/SKILL.md +52 -0
- package/vendor/desk/skills/runtime-symptom-investigation/SKILL.md +106 -0
- package/vendor/desk/skills/session-resumption/SKILL.md +126 -0
- package/vendor/desk/skills/session-start/SKILL.md +54 -0
- package/vendor/desk/skills/session-start/details.md +150 -0
- package/vendor/desk/skills/session-start-migrations/README.md +71 -0
- package/vendor/desk/skills/session-start-migrations/SKILL.md +108 -0
- package/vendor/desk/skills/start-task/SKILL.md +88 -0
- package/vendor/desk/skills/task-card-format/SKILL.md +198 -0
- package/vendor/desk/skills/task-lifecycle/SKILL.md +217 -0
- package/vendor/desk/skills/track-card-format/SKILL.md +90 -0
- package/vendor/desk/skills/using-desk/SKILL.md +58 -0
- package/vendor/desk/skills/using-superpowers-with-desk/SKILL.md +156 -0
- package/vendor/desk/skills/work-orchestration/SKILL.md +162 -0
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
import { firstPassFormula, reworkFormula, signoffFormula } from "./outcomes.js"
|
|
2
|
+
import { attentionFormula } from "./attention.js"
|
|
3
|
+
import { ACTIVE_KINDS, bindingsOverlap, duration, overlappingBindings, union } from "./timeline.js"
|
|
4
|
+
import { ONLY_PART_REASONS, fieldsFeeding, reasonsOf, withState } from "./number-states.js"
|
|
5
|
+
|
|
6
|
+
const WAIT_KINDS = Object.freeze(["human_wait", "permission_wait", "api_retry", "compaction"])
|
|
7
|
+
// Reasons that leave a field incomplete, never missing (`ONLY_PART_REASONS`).
|
|
8
|
+
const ONLY_PART = new Set(ONLY_PART_REASONS)
|
|
9
|
+
const TERMINAL_STATUSES = new Set(["done", "cancelled"])
|
|
10
|
+
const CONTRIBUTOR_ORDER = Object.freeze([
|
|
11
|
+
"active_in_lead_ms",
|
|
12
|
+
"queue_before_start_ms",
|
|
13
|
+
"human_wait_ms",
|
|
14
|
+
"permission_wait_ms",
|
|
15
|
+
"api_retry_ms",
|
|
16
|
+
"compaction_ms",
|
|
17
|
+
])
|
|
18
|
+
|
|
19
|
+
const measured = (value, extra = {}) => ({ class: "measured", value, ...extra })
|
|
20
|
+
const inferred = (value, extra = {}) => ({ class: "inferred", value, ...extra })
|
|
21
|
+
const declared = (value, extra = {}) => ({ class: "declared", value, ...extra })
|
|
22
|
+
const unavailable = (reason, extra = {}) => ({ class: "unavailable", value: null, reason, ...extra })
|
|
23
|
+
|
|
24
|
+
function compareText(left, right) {
|
|
25
|
+
return Number(left > right) - Number(left < right)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// The parts of merged intervals that fall inside [start, end).
|
|
29
|
+
function clip(intervals, start, end) {
|
|
30
|
+
return intervals.flatMap(([left, right]) => {
|
|
31
|
+
const clippedStart = Math.max(left, start)
|
|
32
|
+
const clippedEnd = Math.min(right, end)
|
|
33
|
+
return clippedStart < clippedEnd ? [[clippedStart, clippedEnd]] : []
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function concurrency(activeUnion, groupedIntervals) {
|
|
38
|
+
const groups = [...groupedIntervals.values()].map(union)
|
|
39
|
+
const boundaries = new Set(activeUnion.flat())
|
|
40
|
+
for (const intervals of groups) {
|
|
41
|
+
for (const interval of intervals) {
|
|
42
|
+
boundaries.add(interval[0])
|
|
43
|
+
boundaries.add(interval[1])
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const points = [...boundaries].sort((left, right) => left - right)
|
|
47
|
+
let weighted = 0
|
|
48
|
+
let maximum = 0
|
|
49
|
+
for (let index = 0; index < points.length - 1; index += 1) {
|
|
50
|
+
const start = points[index]
|
|
51
|
+
const end = points[index + 1]
|
|
52
|
+
const midpoint = start + (end - start) / 2
|
|
53
|
+
if (!activeUnion.some(([left, right]) => midpoint >= left && midpoint < right)) continue
|
|
54
|
+
const count = groups.filter((intervals) => intervals.some(([left, right]) => midpoint >= left && midpoint < right)).length
|
|
55
|
+
maximum = Math.max(maximum, count)
|
|
56
|
+
weighted += count * (end - start)
|
|
57
|
+
}
|
|
58
|
+
const active = duration(activeUnion)
|
|
59
|
+
return { maximum, average: weighted / active }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function sumMap(sessions, field) {
|
|
63
|
+
const totals = {}
|
|
64
|
+
for (const session of sessions) {
|
|
65
|
+
for (const [key, value] of Object.entries(session.counts[field])) totals[key] = (totals[key] ?? 0) + value
|
|
66
|
+
}
|
|
67
|
+
return Object.fromEntries(Object.entries(totals).sort(([left], [right]) => compareText(left, right)))
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function sumField(sessions, field) {
|
|
71
|
+
return sessions.reduce((total, session) => total + session.counts[field], 0)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function unavailableGroups(sessions) {
|
|
75
|
+
const counts = new Map()
|
|
76
|
+
for (const session of sessions) {
|
|
77
|
+
for (const entry of session.unavailable) {
|
|
78
|
+
const key = `${entry.field}\n${entry.reason}`
|
|
79
|
+
counts.set(key, (counts.get(key) ?? 0) + 1)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return [...counts.entries()]
|
|
83
|
+
.map(([key, count]) => {
|
|
84
|
+
const [field, reason] = key.split("\n")
|
|
85
|
+
return { field, reason, count }
|
|
86
|
+
})
|
|
87
|
+
.sort((left, right) => compareText(left.field, right.field) || compareText(left.reason, right.reason))
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// How many of `sessions` declare any of `fields` (or `partialFields`)
|
|
91
|
+
// unavailable, and why. Only `fields` can make a value wholly unavailable;
|
|
92
|
+
// `partialFields` gaps leave it partial.
|
|
93
|
+
//
|
|
94
|
+
// `split` holds the sessions whose counts belong to several jobs. Each is
|
|
95
|
+
// uncovered once, and the coverage says how many were cut for that reason.
|
|
96
|
+
// `shared` holds the sessions whose workers also belong to another job, so
|
|
97
|
+
// their time is counted for each of those jobs; it is reported the same way.
|
|
98
|
+
function fieldCoverage(sessions, fields, partialFields, split = new Set(), shared = new Set()) {
|
|
99
|
+
const reasons = new Set()
|
|
100
|
+
const flagReasons = new Set()
|
|
101
|
+
let uncovered = 0
|
|
102
|
+
let lacking = 0
|
|
103
|
+
let splitCount = 0
|
|
104
|
+
let sharedCount = 0
|
|
105
|
+
for (const session of sessions) {
|
|
106
|
+
// A host that records a number only in part, or a few intervals dropped outside the session clock, leaves it incomplete, never missing.
|
|
107
|
+
const missing = session.unavailable.filter((entry) => fields.includes(entry.field) && !ONLY_PART.has(entry.reason))
|
|
108
|
+
const incomplete = session.unavailable.filter((entry) => partialFields.includes(entry.field) || (fields.includes(entry.field) && ONLY_PART.has(entry.reason)))
|
|
109
|
+
const divided = split.has(session)
|
|
110
|
+
if (divided) splitCount += 1
|
|
111
|
+
const overlapping = shared.has(session)
|
|
112
|
+
if (overlapping) sharedCount += 1
|
|
113
|
+
if (missing.length > 0 || incomplete.length > 0 || divided || overlapping) uncovered += 1
|
|
114
|
+
for (const entry of [...missing, ...incomplete]) flagReasons.add(entry.reason)
|
|
115
|
+
if (missing.length === 0) continue
|
|
116
|
+
lacking += 1
|
|
117
|
+
for (const entry of missing) reasons.add(entry.reason)
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
uncovered,
|
|
121
|
+
none: lacking === sessions.length,
|
|
122
|
+
reasons: [...reasons].sort(compareText),
|
|
123
|
+
partialReasons: [...flagReasons].sort(compareText),
|
|
124
|
+
split: splitCount,
|
|
125
|
+
shared: sharedCount,
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// The coverage of one formula, with the fields that feed it read from the table.
|
|
130
|
+
const coverageOf = (formulaId, sessions, split, shared) => fieldCoverage(sessions, fieldsFeeding(formulaId, "unavailable"), fieldsFeeding(formulaId, "partial"), split, shared)
|
|
131
|
+
|
|
132
|
+
// Retries have no worker, so a split session cannot say which of them were the
|
|
133
|
+
// job's. A job whose sessions are all split therefore has none to report: that
|
|
134
|
+
// is unavailable, never a measured zero. With some whole sessions the sum
|
|
135
|
+
// covers those only, and the measure stays partial (`worker_split`).
|
|
136
|
+
export function retryCoverage(sessions, fields, split, shared, partialFields = []) {
|
|
137
|
+
const coverage = fieldCoverage(sessions, fields, partialFields, split, shared)
|
|
138
|
+
if (sessions.length === 0 || split.size < sessions.length) return coverage
|
|
139
|
+
return { ...coverage, none: true, reasons: [...new Set([...coverage.reasons, "worker_split"])].sort(compareText) }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function missingValue(coverage) {
|
|
143
|
+
return coverage.reasons.length === 1 ? unavailable(coverage.reasons[0]) : unavailable("mixed", { reasons: coverage.reasons })
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function withCoverage(value, coverage) {
|
|
147
|
+
if (value.class === "unavailable" || coverage.uncovered === 0) return value
|
|
148
|
+
const marked = { ...value, partial: true, uncovered_sessions: coverage.uncovered }
|
|
149
|
+
const reasons = [...new Set([...(coverage.split > 0 ? ["worker_split"] : []), ...(coverage.shared > 0 ? ["worker_shared"] : []), ...coverage.partialReasons])]
|
|
150
|
+
return { ...marked, partial_reasons: reasons }
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Missing data is never a measured zero: a value no covering session could
|
|
154
|
+
// supply is unavailable, and one only some sessions supply is partial.
|
|
155
|
+
export function covered(coverage, compute) {
|
|
156
|
+
return coverage.none ? missingValue(coverage) : withCoverage(compute(), coverage)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const TOKEN_TYPES = Object.freeze(["input", "output", "cache_read", "cache_write", "reasoning"])
|
|
160
|
+
|
|
161
|
+
// The job's token totals. Tokens are counted per model for the whole session, so a
|
|
162
|
+
// session in which the job owns only some workers is not counted and no share of it
|
|
163
|
+
// is guessed (`worker_split`). A counter that is null, or a session with no model at
|
|
164
|
+
// all, is unknown rather than 0: that session is left out of the type and the type
|
|
165
|
+
// is partial (`field_absent`), or unavailable when no session could supply it.
|
|
166
|
+
function tokenTotalFor(type, sessions, split) {
|
|
167
|
+
const formulaId = `tokens_total.${type}`
|
|
168
|
+
const fields = fieldsFeeding(formulaId, "unavailable")
|
|
169
|
+
const partialFields = fieldsFeeding(formulaId, "partial")
|
|
170
|
+
const checked = new Map(sessions.map((session) => {
|
|
171
|
+
const flagged = session.unavailable.some((entry) => fields.includes(entry.field) && !ONLY_PART.has(entry.reason))
|
|
172
|
+
const absent = session.models.length === 0 || session.models.some((model) => model.tokens[type] === null || model.tokens[type] === undefined)
|
|
173
|
+
return [session, { unavailable: flagged || !absent ? session.unavailable : [...session.unavailable, { field: "tokens", reason: "field_absent" }], counts: session.models.reduce((total, model) => total + model.tokens[type], 0) }]
|
|
174
|
+
}))
|
|
175
|
+
const entries = [...checked.values()]
|
|
176
|
+
const splitEntries = new Set(sessions.filter((session) => split.has(session)).map((session) => checked.get(session)))
|
|
177
|
+
if (entries.length === 0) return { result: unavailable("job_offsets_unavailable"), uncovered: new Set() }
|
|
178
|
+
const whole = entries.filter((entry) => !splitEntries.has(entry))
|
|
179
|
+
const own = fieldCoverage(whole, fields, partialFields)
|
|
180
|
+
const reasons = [...new Set([...own.reasons, ...(splitEntries.size > 0 ? ["worker_split"] : [])])].sort(compareText)
|
|
181
|
+
const coverage = { ...fieldCoverage(entries, fields, partialFields, splitEntries), none: own.none, reasons }
|
|
182
|
+
const lacking = (entry) => fieldCoverage([entry], fields, partialFields).none
|
|
183
|
+
// Which sessions this type leaves uncovered, so the total can count each once (`tokenSum`).
|
|
184
|
+
const uncovered = new Set(sessions.filter((session) => fieldCoverage([checked.get(session)], fields, partialFields, splitEntries).uncovered > 0))
|
|
185
|
+
return { result: covered(coverage, () => measured(whole.filter((entry) => !lacking(entry)).reduce((total, entry) => total + entry.counts, 0))), uncovered }
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Input plus output. A session either part leaves uncovered is uncovered in the total, counted once: the union of the two parts' sessions,
|
|
189
|
+
// never the larger of their counts, which would understate it when the parts lack different sessions.
|
|
190
|
+
function tokenSum(input, output) {
|
|
191
|
+
const parts = [input.result, output.result]
|
|
192
|
+
const gone = parts.filter((part) => part.class === "unavailable")
|
|
193
|
+
if (gone.length > 0) return missingValue({ reasons: [...new Set(gone.flatMap(reasonsOf))].sort(compareText) })
|
|
194
|
+
const partial = parts.filter((part) => part.partial === true)
|
|
195
|
+
const result = measured(input.result.value + output.result.value)
|
|
196
|
+
if (partial.length === 0) return result
|
|
197
|
+
return { ...result, partial: true, uncovered_sessions: new Set([...input.uncovered, ...output.uncovered]).size, partial_reasons: [...new Set(partial.flatMap((part) => part.partial_reasons))].sort(compareText) }
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function tokenTotals(sessions, split) {
|
|
201
|
+
const types = Object.fromEntries(TOKEN_TYPES.map((type) => [type, tokenTotalFor(type, sessions, split)]))
|
|
202
|
+
return { total: tokenSum(types.input, types.output), ...Object.fromEntries(Object.entries(types).map(([type, { result }]) => [type, result])) }
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function currentStatus(timeline) {
|
|
206
|
+
// The latest transition on the job clock decides once any terminal one
|
|
207
|
+
// exists, so a reopened and later finished job reports its current state.
|
|
208
|
+
const timed = timeline.transitions.filter((entry) => entry.offset_ms !== null)
|
|
209
|
+
if (timed.some((entry) => TERMINAL_STATUSES.has(entry.to))) return measured(timed.at(-1).to)
|
|
210
|
+
const cancelledTransition = timeline.transitions.find((entry) => entry.to === "cancelled")
|
|
211
|
+
const cancelledObservation = timeline.observations.find((entry) => entry.status === "cancelled")
|
|
212
|
+
if (cancelledTransition) return measured("cancelled")
|
|
213
|
+
if (cancelledObservation) return declared("cancelled")
|
|
214
|
+
const doneTransition = timeline.transitions.find((entry) => entry.to === "done")
|
|
215
|
+
if (doneTransition) return measured("done")
|
|
216
|
+
const observed = timeline.observations.at(-1)
|
|
217
|
+
if (observed) return declared(observed.status)
|
|
218
|
+
const transition = timeline.transitions.at(-1)
|
|
219
|
+
return transition ? measured(transition.to) : unavailable("status_unavailable")
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// The reason a done job's lead time runs only to the end of its recorded work: no record gives the time it finished.
|
|
223
|
+
const FINISH_TIME_NOT_KNOWN = "finish_time_not_known"
|
|
224
|
+
|
|
225
|
+
function leadTime(timeline, status) {
|
|
226
|
+
if (status.value === "cancelled") return unavailable("cancelled")
|
|
227
|
+
if (status.value === "done") {
|
|
228
|
+
// Lead time ends at the `done` that begins the job's final terminal
|
|
229
|
+
// stretch: the first `done` after the last reopen. A job closed once is
|
|
230
|
+
// unaffected; a job reopened and closed again ends at its reclosing.
|
|
231
|
+
const timed = timeline.transitions.filter((entry) => entry.offset_ms !== null)
|
|
232
|
+
let finalStretch = timed.length
|
|
233
|
+
while (finalStretch > 0 && TERMINAL_STATUSES.has(timed[finalStretch - 1].to)) finalStretch -= 1
|
|
234
|
+
const done = timed.slice(finalStretch).find((entry) => entry.to === "done")
|
|
235
|
+
if (done) return measured(Math.max(0, done.offset_ms), { censored: false, basis: "first_done_transition" })
|
|
236
|
+
const observedDone = timeline.observations.find((entry) => entry.status === "done" && entry.offset_ms !== null)
|
|
237
|
+
if (observedDone) return declared(Math.max(0, observedDone.offset_ms), { censored: false, basis: "terminal_observation" })
|
|
238
|
+
// Seen done, but no record gives when (a card edited by hand, whose `updated` is no finish time, so binding gives the observation no
|
|
239
|
+
// time) and no session moved it: the lead window still runs from the card's creation to the end of the job's recorded work, which
|
|
240
|
+
// the task lasted at least. A done move whose time was lost stays unavailable: its clock could not be read.
|
|
241
|
+
const untimedObservation = timeline.observations.some((entry) => entry.status === "done" && entry.offset_ms === null)
|
|
242
|
+
const ends = recordedSpans(timeline).map(([, end]) => end).filter(Number.isFinite)
|
|
243
|
+
if (!untimedObservation || timeline.transitions.some((entry) => entry.to === "done") || ends.length === 0) return unavailable("job_offsets_unavailable")
|
|
244
|
+
return inferred(Math.max(0, ...ends), { censored: false, basis: "recorded_work_end", partial: true, partial_reasons: [FINISH_TIME_NOT_KNOWN] })
|
|
245
|
+
}
|
|
246
|
+
// Every other status is open, including a job reopened after an earlier
|
|
247
|
+
// `done` (which stays in the transition history): its lead time is censored.
|
|
248
|
+
const ends = timeline.sessions.flatMap((session) => session.end_ms === null ? [] : [session.end_ms])
|
|
249
|
+
if (ends.length === 0) return unavailable("job_offsets_unavailable")
|
|
250
|
+
return measured(Math.max(0, Math.max(...ends)), { censored: true, basis: "latest_session_end" })
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// The job's own recorded work on the job clock, as [start, end] pairs: the spans of
|
|
254
|
+
// each session that belong to the job (its binding's segments) and its recorded intervals. A
|
|
255
|
+
// session whose share or offset is unknown adds nothing, so unknown data never moves a figure.
|
|
256
|
+
export function recordedSpans(timeline) {
|
|
257
|
+
const spans = timeline.intervals.map((interval) => [interval.start_ms, interval.end_ms])
|
|
258
|
+
timeline.source_sessions.forEach((source, index) => {
|
|
259
|
+
const offset = timeline.sessions[index].offset_ms
|
|
260
|
+
const binding = bindingOf(source, timeline.job)
|
|
261
|
+
if (offset === null) return
|
|
262
|
+
if (Array.isArray(binding.segments)) for (const segment of binding.segments) spans.push([offset + segment.start_ms, offset + segment.end_ms])
|
|
263
|
+
})
|
|
264
|
+
return spans
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// A lead time never reads shorter than the work the job's own sessions recorded. The
|
|
268
|
+
// card's dates can be: an adopted card is created and closed at nearly the same moment,
|
|
269
|
+
// and a job can keep working after its first `done`. The floor is the wall-clock span of
|
|
270
|
+
// the job's recorded spans (not summed agent time, which parallel workers push above wall
|
|
271
|
+
// time). A longer span raises the figure to the span and marks it partial: at least that.
|
|
272
|
+
// A span that cannot be read (or none) keeps the figure as it is.
|
|
273
|
+
function floorLead(lead, timeline) {
|
|
274
|
+
if (lead.class === "unavailable") return lead
|
|
275
|
+
const spans = recordedSpans(timeline).flat()
|
|
276
|
+
if (spans.length === 0 || !spans.every(Number.isFinite)) return lead
|
|
277
|
+
const span = Math.max(...spans.filter((_, index) => index % 2 === 1)) - Math.min(...spans.filter((_, index) => index % 2 === 0))
|
|
278
|
+
if (!(span > lead.value)) return lead
|
|
279
|
+
return { ...lead, class: "inferred", value: span, partial: true, partial_reasons: [...new Set(["card_dates_shorter_than_work", ...(lead.partial_reasons ?? [])])].sort(compareText), basis: "recorded_segment_span" }
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function longestWait(intervals) {
|
|
283
|
+
const waits = intervals.filter((interval) => WAIT_KINDS.includes(interval.kind))
|
|
284
|
+
if (waits.length === 0) return unavailable("no_wait_intervals")
|
|
285
|
+
waits.sort((left, right) => {
|
|
286
|
+
const durationDifference = (right.end_ms - right.start_ms) - (left.end_ms - left.start_ms)
|
|
287
|
+
if (durationDifference !== 0) return durationDifference
|
|
288
|
+
const kindDifference = WAIT_KINDS.indexOf(left.kind) - WAIT_KINDS.indexOf(right.kind)
|
|
289
|
+
if (kindDifference !== 0) return kindDifference
|
|
290
|
+
return left.start_ms - right.start_ms
|
|
291
|
+
})
|
|
292
|
+
const first = waits[0]
|
|
293
|
+
return measured({ kind: first.kind, duration_ms: first.end_ms - first.start_ms, start_ms: first.start_ms, end_ms: first.end_ms })
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function contributor(key, valueMs, lead, source) {
|
|
297
|
+
const entry = { key, value_ms: valueMs, share: valueMs / lead }
|
|
298
|
+
return source.partial ? { ...entry, partial: true, uncovered_sessions: source.uncovered_sessions } : entry
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Lead-time contributors, each clipped to the job clock's [0, lead] window so
|
|
302
|
+
// no share can exceed the lead time it explains.
|
|
303
|
+
function leadContributors({ lead, timingUnavailable, activeInLead, queue, waits, waitUnions }) {
|
|
304
|
+
if (lead.class === "unavailable") return unavailable(lead.reason)
|
|
305
|
+
if (timingUnavailable) return unavailable("job_offsets_unavailable")
|
|
306
|
+
if (lead.value === 0) return unavailable("zero_lead_time")
|
|
307
|
+
const entries = []
|
|
308
|
+
const sources = []
|
|
309
|
+
// A kind that is not measured is left out, never listed as zero, and the list says why it is incomplete.
|
|
310
|
+
const missing = []
|
|
311
|
+
if (activeInLead.class === "unavailable") missing.push(...reasonsOf(activeInLead))
|
|
312
|
+
else {
|
|
313
|
+
entries.push(contributor("active_in_lead_ms", activeInLead.value, lead.value, activeInLead))
|
|
314
|
+
sources.push(activeInLead)
|
|
315
|
+
}
|
|
316
|
+
if (queue.class === "unavailable") missing.push(...reasonsOf(queue))
|
|
317
|
+
else {
|
|
318
|
+
entries.push(contributor("queue_before_start_ms", Math.min(queue.value, lead.value), lead.value, queue))
|
|
319
|
+
sources.push(queue)
|
|
320
|
+
}
|
|
321
|
+
for (const kind of WAIT_KINDS) {
|
|
322
|
+
const wait = waits[`${kind}_ms`]
|
|
323
|
+
if (wait.class === "unavailable") {
|
|
324
|
+
missing.push(...reasonsOf(wait))
|
|
325
|
+
continue
|
|
326
|
+
}
|
|
327
|
+
entries.push(contributor(`${kind}_ms`, duration(clip(waitUnions[kind], 0, lead.value)), lead.value, wait))
|
|
328
|
+
sources.push(wait)
|
|
329
|
+
}
|
|
330
|
+
// With no entry left there is no breakdown to show: that is unavailable, never an empty partial list.
|
|
331
|
+
if (entries.length === 0) {
|
|
332
|
+
const gone = [...new Set(missing)].sort(compareText)
|
|
333
|
+
return gone.length === 1 ? unavailable(gone[0]) : unavailable("mixed", { reasons: gone })
|
|
334
|
+
}
|
|
335
|
+
entries.sort((left, right) => right.value_ms - left.value_ms || CONTRIBUTOR_ORDER.indexOf(left.key) - CONTRIBUTOR_ORDER.indexOf(right.key))
|
|
336
|
+
const reasons = [...new Set([...missing, ...sources.flatMap((source) => source.partial_reasons ?? []), ...(lead.partial_reasons ?? [])])].sort(compareText)
|
|
337
|
+
const result = inferred(entries, { censored: lead.censored, method: "clipped_to_lead_window" })
|
|
338
|
+
return reasons.length === 0 ? result : { ...result, partial: true, partial_reasons: reasons }
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// A figure read over the card's lead window carries that lead time's own partial reasons (a lead time that runs only to the end of the
|
|
342
|
+
// recorded work, `finish_time_not_known`), so it is never read as whole when the window it divides by is not.
|
|
343
|
+
function withLeadReasons(value, lead) {
|
|
344
|
+
if (lead.partial !== true) return value
|
|
345
|
+
return { ...value, partial: true, partial_reasons: [...new Set([...(value.partial_reasons ?? []), ...lead.partial_reasons])].sort(compareText) }
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function bindingOf(session, job) {
|
|
349
|
+
return session.jobs.find((binding) => binding.job === job)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// A binding without `agents` is the legacy session-level binding: every
|
|
353
|
+
// worker counts. One listing every worker of the session is the same thing.
|
|
354
|
+
function ownsWholeSession(session, binding) {
|
|
355
|
+
return !Object.hasOwn(binding, "agents") || session.agents.every((agent) => binding.agents.includes(agent.n))
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Whether the job's binding splits the controller's (worker 0's) time by segments.
|
|
359
|
+
// Segments on a binding that does not list worker 0 (which the validators refuse) are ignored.
|
|
360
|
+
function segmented(binding) {
|
|
361
|
+
return Object.hasOwn(binding, "segments") && Object.hasOwn(binding, "agents") && binding.agents.includes(0)
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// The source sessions in which the job owns only some of the workers, or only
|
|
365
|
+
// some of the controller's time, so the session-wide counts are not the job's own.
|
|
366
|
+
export function splitSessions(timeline) {
|
|
367
|
+
return new Set(timeline.source_sessions.filter((session) => {
|
|
368
|
+
const binding = bindingOf(session, timeline.job)
|
|
369
|
+
return segmented(binding) || !ownsWholeSession(session, binding)
|
|
370
|
+
}))
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// The segmented source sessions in which the job holds a shared span of the controller's time.
|
|
374
|
+
function sharedSegmentSessions(timeline) {
|
|
375
|
+
return new Set(timeline.source_sessions.filter((session) => {
|
|
376
|
+
const binding = bindingOf(session, timeline.job)
|
|
377
|
+
return segmented(binding) && binding.segments.some((segment) => segment.shared === true)
|
|
378
|
+
}))
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// The source sessions in which one of the job's workers also belongs to
|
|
382
|
+
// another job. That worker's time is counted for each job that owns it, so
|
|
383
|
+
// the job's time is partial. A legacy binding lists no workers and never
|
|
384
|
+
// counts as sharing. A job with `segments` holds only its own spans of the
|
|
385
|
+
// controller's (worker 0's) time, so the controller makes it shared only
|
|
386
|
+
// through a span marked `shared`; its other workers count as before.
|
|
387
|
+
export function sharedSessions(timeline) {
|
|
388
|
+
return new Set(timeline.source_sessions.filter((session) => {
|
|
389
|
+
const own = bindingOf(session, timeline.job)
|
|
390
|
+
if (!Object.hasOwn(own, "agents")) return false
|
|
391
|
+
const split = segmented(own)
|
|
392
|
+
if (split && own.segments.some((segment) => segment.shared === true)) return true
|
|
393
|
+
const workers = split ? own.agents.filter((agent) => agent !== 0) : own.agents
|
|
394
|
+
if (split && session.jobs.some((other) => other !== own && Object.hasOwn(other, "agents") && other.agents.includes(0) && bindingsOverlap(own, other))) return true
|
|
395
|
+
return session.jobs.some((other) => other !== own && Object.hasOwn(other, "agents") && other.agents.some((agent) => workers.includes(agent)))
|
|
396
|
+
}))
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// The counts of a split session that belong to the job: tool calls and
|
|
400
|
+
// failures from the job's own tool intervals (a subagent interval is an
|
|
401
|
+
// `agent` call, and carries no outcome). A segmented job counts a controller
|
|
402
|
+
// (worker 0) interval only when one of its segments holds the interval's
|
|
403
|
+
// start, so the controller's calls are split with its time; one starting in a
|
|
404
|
+
// shared span counts for each job sharing it. Retries and compactions have no
|
|
405
|
+
// worker, so they are left out and the measure is marked partial.
|
|
406
|
+
function ownCounts(session, binding) {
|
|
407
|
+
const calls = {}
|
|
408
|
+
const failures = {}
|
|
409
|
+
const durationMs = session.session.duration_ms
|
|
410
|
+
for (const interval of session.intervals) {
|
|
411
|
+
if (!binding.agents.includes(interval.agent)) continue
|
|
412
|
+
if (interval.agent === 0 && segmented(binding) && !binding.segments.some((segment) => holds(segment, interval.start_ms, durationMs))) continue
|
|
413
|
+
if (interval.kind === "subagent") calls.agent = (calls.agent ?? 0) + 1
|
|
414
|
+
if (interval.kind !== "tool") continue
|
|
415
|
+
calls[interval.tool] = (calls[interval.tool] ?? 0) + 1
|
|
416
|
+
if (interval.outcome !== "ok") failures[interval.tool] = (failures[interval.tool] ?? 0) + 1
|
|
417
|
+
}
|
|
418
|
+
return { tool_calls: calls, tool_failures: failures, tool_retries: 0, api_retries: 0, compactions: 0 }
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function jobCounted(timeline, split) {
|
|
422
|
+
return timeline.source_sessions.map((session) => split.has(session)
|
|
423
|
+
? { counts: ownCounts(session, bindingOf(session, timeline.job)) }
|
|
424
|
+
: session)
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// Whether a segment holds the instant `at` (milliseconds from session start).
|
|
428
|
+
// Segments are half-open, so a boundary belongs to the later segment; the
|
|
429
|
+
// session's own last instant belongs to the segment that ends there.
|
|
430
|
+
function holds(segment, at, durationMs) {
|
|
431
|
+
return (segment.start_ms <= at && at < segment.end_ms) || (at === durationMs && segment.end_ms === durationMs)
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// The job binding a controller (worker 0) PR's time decides: the one job
|
|
435
|
+
// whose unshared segment holds the PR's `at_ms`. `undefined` when the time
|
|
436
|
+
// decides nothing: the PR is another worker's or has no time, or the instant
|
|
437
|
+
// falls in a shared span or in no job's segment.
|
|
438
|
+
function segmentOwner(session, pr) {
|
|
439
|
+
if (pr.agent !== 0 || !Object.hasOwn(pr, "at_ms")) return undefined
|
|
440
|
+
const holders = session.jobs.filter((binding) => segmented(binding)
|
|
441
|
+
&& binding.segments.some((segment) => holds(segment, pr.at_ms, session.session.duration_ms)))
|
|
442
|
+
if (holders.length !== 1) return undefined
|
|
443
|
+
const shared = holders[0].segments.some((segment) => segment.shared === true && holds(segment, pr.at_ms, session.session.duration_ms))
|
|
444
|
+
return shared ? undefined : holders[0]
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// A binding without `agents` is the legacy session-level binding and keeps
|
|
448
|
+
// every reference of the session. A controller PR whose time falls in one
|
|
449
|
+
// job's own segment goes to that job (`segmentOwner`). Otherwise a pull
|
|
450
|
+
// request is credited to the worker that opened it, and only when no other
|
|
451
|
+
// job of the session lists that worker. A pull request with no worker, or
|
|
452
|
+
// one whose worker several jobs share, goes to the job only when the session
|
|
453
|
+
// binds no other job.
|
|
454
|
+
function ownsPullRequest(session, binding, pr) {
|
|
455
|
+
if (!Object.hasOwn(binding, "agents")) return true
|
|
456
|
+
if (!Object.hasOwn(pr, "agent")) return session.jobs.length === 1
|
|
457
|
+
return binding.agents.includes(pr.agent)
|
|
458
|
+
&& !session.jobs.some((other) => other !== binding && Object.hasOwn(other, "agents") && other.agents.includes(pr.agent))
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// The binding a controller PR's time gives it to, only for a binding that lists its workers; `undefined` when the time decides nothing.
|
|
462
|
+
function prOwnerByTime(session, binding, pr) {
|
|
463
|
+
return Object.hasOwn(binding, "agents") ? segmentOwner(session, pr) : undefined
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/** Whether `binding`'s job owns `pr` of `session`: its controller time decides when it can (`segmentOwner`), otherwise the worker that opened it does (`ownsPullRequest`). */
|
|
467
|
+
export function jobOwnsPullRequest(session, binding, pr) {
|
|
468
|
+
const owner = prOwnerByTime(session, binding, pr)
|
|
469
|
+
return owner === undefined ? ownsPullRequest(session, binding, pr) : owner === binding
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Public commits carry no worker, so a per-worker session credits them only
|
|
473
|
+
// to the one job it binds.
|
|
474
|
+
function ownsCommits(session, binding) {
|
|
475
|
+
return !Object.hasOwn(binding, "agents") || session.jobs.length === 1
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function uniqueReferences(timeline) {
|
|
479
|
+
const prs = new Map()
|
|
480
|
+
const commits = new Map()
|
|
481
|
+
const withheld = new Set()
|
|
482
|
+
for (const session of timeline.source_sessions) {
|
|
483
|
+
const binding = bindingOf(session, timeline.job)
|
|
484
|
+
let held = false
|
|
485
|
+
for (const pr of session.refs.prs) {
|
|
486
|
+
// A PR its time gives to another job is that job's, not one held back from this one.
|
|
487
|
+
if (jobOwnsPullRequest(session, binding, pr)) prs.set(`${pr.repo}#${pr.number}`, { repo: pr.repo, number: pr.number })
|
|
488
|
+
else if (prOwnerByTime(session, binding, pr) === undefined) held = true
|
|
489
|
+
}
|
|
490
|
+
if (ownsCommits(session, binding)) {
|
|
491
|
+
for (const commit of session.refs.commits) commits.set(`${commit.repo}@${commit.sha}`, commit)
|
|
492
|
+
} else if (session.refs.commits.length > 0) held = true
|
|
493
|
+
// Withholding only means the job's list is incomplete when another job of the session may hold the rest.
|
|
494
|
+
if (held && session.jobs.length > 1) withheld.add(session)
|
|
495
|
+
}
|
|
496
|
+
const pullRequests = [...prs.values()].sort((left, right) => compareText(left.repo, right.repo) || left.number - right.number)
|
|
497
|
+
return { pullRequests, commits: commits.size, withheld }
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// Every result, at the top or inside `waits` and `rework_signals`, gains its
|
|
501
|
+
// state and reasons from the one place that derives them (`withState`).
|
|
502
|
+
function decorate(results) {
|
|
503
|
+
return Object.fromEntries(Object.entries(results).map(([name, result]) => [name, Object.hasOwn(result, "class") ? withState(result) : decorate(result)]))
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// The composite keeps its value object as readers know it, except that a count
|
|
507
|
+
// whose part is unavailable is null, never 0. It is unavailable only when every
|
|
508
|
+
// part is; otherwise any part that is not measured makes it partial. Either way
|
|
509
|
+
// its reasons are the union of the parts' reasons.
|
|
510
|
+
function referencesResult(references, parts, privateCounts) {
|
|
511
|
+
const count = (name, number) => parts[name].result.class === "unavailable" ? null : number
|
|
512
|
+
const value = measured({
|
|
513
|
+
public_pull_requests: references.pullRequests,
|
|
514
|
+
public_prs: count("public_prs", references.pullRequests.length),
|
|
515
|
+
public_commits: count("public_commits", references.commits),
|
|
516
|
+
private_prs: count("private_prs", privateCounts.privatePrs),
|
|
517
|
+
private_commits: count("private_commits", privateCounts.privateCommits),
|
|
518
|
+
})
|
|
519
|
+
const entries = Object.values(parts)
|
|
520
|
+
const reasons = [...new Set(entries.flatMap((entry) => entry.result.reasons))].sort(compareText)
|
|
521
|
+
const uncovered = Math.max(...entries.map((entry) => entry.coverage.uncovered))
|
|
522
|
+
const allMissing = entries.every((entry) => entry.result.class === "unavailable")
|
|
523
|
+
// Public pull requests have no field that can make them unavailable, so every part is unavailable only for a job with no sessions, and then all four share the one reason the job clock gives.
|
|
524
|
+
const result = allMissing ? { ...value, class: "unavailable", reason: reasons[0] } : reasons.length === 0 ? value : { ...value, partial: true, uncovered_sessions: uncovered, partial_reasons: reasons }
|
|
525
|
+
return { ...result, parts: Object.fromEntries(Object.entries(parts).map(([name, entry]) => [name, entry.result])) }
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export function calculateFormulas(timeline) {
|
|
529
|
+
const sourceSessions = timeline.source_sessions
|
|
530
|
+
const timedSessions = timeline.sessions.filter((session) => session.offset_ms !== null)
|
|
531
|
+
// A session that says its job offsets were lost puts none of its time on the job clock, but its time exists, so it still counts in the coverage of every clock-fed number.
|
|
532
|
+
const clockSources = sourceSessions.filter((session, index) => timeline.sessions[index].offset_ms !== null || session.unavailable.some((entry) => entry.field === "job_offsets"))
|
|
533
|
+
// Only jobs whose time really overlaps this job's in a session count as sharing with it.
|
|
534
|
+
const otherJobs = new Set(sourceSessions.flatMap((session) => overlappingBindings(session, bindingOf(session, timeline.job)).map((binding) => binding.job)).filter((job) => job !== timeline.job))
|
|
535
|
+
const sessions = measured({
|
|
536
|
+
bound: sourceSessions.length,
|
|
537
|
+
timeline: timedSessions.length,
|
|
538
|
+
shared: timeline.sessions.filter((session) => session.shared_with > 0).length,
|
|
539
|
+
shared_with_jobs: otherJobs.size,
|
|
540
|
+
}, { basis: "captured_sessions" })
|
|
541
|
+
const status = currentStatus(timeline)
|
|
542
|
+
const timingUnavailable = timedSessions.length === 0
|
|
543
|
+
const timed = (compute) => timingUnavailable ? unavailable("job_offsets_unavailable") : compute()
|
|
544
|
+
// The card's own figure feeds the window-based numbers (active in lead, contributors, flow); only the published lead time is floored.
|
|
545
|
+
const cardLead = leadTime(timeline, status)
|
|
546
|
+
const lead = floorLead(cardLead, timeline)
|
|
547
|
+
// A raised lead time has no window the card's clock can measure over, so what reads that window says so instead of answering over the wrong one.
|
|
548
|
+
const windowLead = lead === cardLead ? cardLead : unavailable("card_dates_shorter_than_work")
|
|
549
|
+
|
|
550
|
+
const activeIntervals = timeline.intervals.filter((interval) => ACTIVE_KINDS.has(interval.kind))
|
|
551
|
+
const activeUnion = union(activeIntervals)
|
|
552
|
+
const activeMs = duration(activeUnion)
|
|
553
|
+
const busyMs = activeIntervals.reduce((total, interval) => total + interval.end_ms - interval.start_ms, 0)
|
|
554
|
+
const bySession = new Map()
|
|
555
|
+
const byAgent = new Map()
|
|
556
|
+
for (const interval of activeIntervals) {
|
|
557
|
+
const sessionKey = `${interval.host}/${interval.session_id}`
|
|
558
|
+
const agentKey = `${sessionKey}/${interval.agent}`
|
|
559
|
+
if (!bySession.has(sessionKey)) bySession.set(sessionKey, [])
|
|
560
|
+
if (!byAgent.has(agentKey)) byAgent.set(agentKey, [])
|
|
561
|
+
bySession.get(sessionKey).push(interval)
|
|
562
|
+
byAgent.get(agentKey).push(interval)
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
const sharedTime = sharedSessions(timeline)
|
|
566
|
+
const activeCoverage = (formulaId) => coverageOf(formulaId, clockSources, new Set(), sharedTime)
|
|
567
|
+
const activeValue = (formulaId, compute) => timed(() => covered(activeCoverage(formulaId), compute))
|
|
568
|
+
const whenActive = (formulaId, compute) => activeValue(formulaId, () => activeMs === 0 ? unavailable("no_active_intervals") : compute())
|
|
569
|
+
const active = activeValue("active_time_ms", () => measured(activeMs))
|
|
570
|
+
const busy = activeValue("busy_time_ms", () => measured(busyMs))
|
|
571
|
+
const activeBeforeCard = activeValue("active_before_card_ms", () => measured(duration(clip(activeUnion, -Infinity, 0))))
|
|
572
|
+
const activeInLead = cardLead.class === "unavailable"
|
|
573
|
+
? unavailable(cardLead.reason)
|
|
574
|
+
: activeValue("active_in_lead_ms", () => measured(duration(clip(activeUnion, 0, cardLead.value))))
|
|
575
|
+
const parallelism = whenActive("parallelism", () => inferred(busyMs / activeMs, { method: "busy_time_ms/active_time_ms" }))
|
|
576
|
+
const concurrentSessions = whenActive("concurrent_sessions", () => inferred(concurrency(activeUnion, bySession), { method: "active_session_interval_concurrency" }))
|
|
577
|
+
const concurrentAgents = whenActive("concurrent_agents", () => inferred(concurrency(activeUnion, byAgent), { method: "active_agent_interval_concurrency" }))
|
|
578
|
+
|
|
579
|
+
const waits = {}
|
|
580
|
+
const waitUnions = {}
|
|
581
|
+
for (const kind of WAIT_KINDS) {
|
|
582
|
+
waitUnions[kind] = union(timeline.intervals.filter((interval) => interval.kind === kind))
|
|
583
|
+
waits[`${kind}_ms`] = timed(() => covered(coverageOf(`waits.${kind}_ms`, clockSources), () => measured(duration(waitUnions[kind]))))
|
|
584
|
+
}
|
|
585
|
+
const visibleWaitKinds = WAIT_KINDS.filter((kind) => waits[`${kind}_ms`].class !== "unavailable")
|
|
586
|
+
const longest = timed(() => visibleWaitKinds.length === 0
|
|
587
|
+
? unavailable("wait_fields_unavailable")
|
|
588
|
+
: withCoverage(longestWait(timeline.intervals.filter((interval) => visibleWaitKinds.includes(interval.kind))), coverageOf("longest_wait", clockSources)))
|
|
589
|
+
const queue = timed(() => covered(coverageOf("queue_before_start_ms", clockSources, new Set(), new Set()), () => measured(Math.max(0, Math.min(...timedSessions.map((session) => session.offset_ms))), { basis: "first_captured_session" })))
|
|
590
|
+
|
|
591
|
+
let flowEfficiency
|
|
592
|
+
if (windowLead.class === "unavailable") flowEfficiency = unavailable(windowLead.reason)
|
|
593
|
+
else if (cardLead.value === 0) flowEfficiency = unavailable("zero_lead_time")
|
|
594
|
+
else if (activeInLead.class === "unavailable") flowEfficiency = activeInLead
|
|
595
|
+
else flowEfficiency = withLeadReasons(withCoverage(inferred(activeInLead.value / cardLead.value, { censored: cardLead.censored, method: "active_in_lead_ms/lead_time_ms" }), activeCoverage("flow_efficiency")), cardLead)
|
|
596
|
+
|
|
597
|
+
const hosts = {}
|
|
598
|
+
for (const session of sourceSessions) hosts[session.session.host] = (hosts[session.session.host] ?? 0) + 1
|
|
599
|
+
const references = uniqueReferences(timeline)
|
|
600
|
+
const split = splitSessions(timeline)
|
|
601
|
+
const counted = jobCounted(timeline, split)
|
|
602
|
+
const sharedSegments = sharedSegmentSessions(timeline)
|
|
603
|
+
const countCoverage = (formulaId) => fieldCoverage(sourceSessions, fieldsFeeding(formulaId, "unavailable"), fieldsFeeding(formulaId, "partial"), split, sharedSegments)
|
|
604
|
+
const privatePrs = sourceSessions.reduce((total, session) => total + session.refs.private.prs, 0)
|
|
605
|
+
const privateCommits = sourceSessions.reduce((total, session) => total + session.refs.private.commits, 0)
|
|
606
|
+
// Public counts keep the withheld sessions (a worker shared with another job) as uncovered; private counts are summed over every session.
|
|
607
|
+
// A job with no source sessions has nothing to count: every part is unavailable for the same cause the job clock gives.
|
|
608
|
+
const part = (formulaId, shared, count) => {
|
|
609
|
+
if (sourceSessions.length === 0) return { coverage: coverageOf(formulaId, sourceSessions, new Set(), shared), result: withState(unavailable("job_offsets_unavailable")) }
|
|
610
|
+
const coverage = coverageOf(formulaId, sourceSessions, new Set(), shared)
|
|
611
|
+
return { coverage, result: withState(covered(coverage, () => measured(count))) }
|
|
612
|
+
}
|
|
613
|
+
const parts = {
|
|
614
|
+
public_prs: part("references.public_prs", references.withheld, references.pullRequests.length),
|
|
615
|
+
public_commits: part("references.public_commits", references.withheld, references.commits),
|
|
616
|
+
private_prs: part("references.private_prs", new Set(), privatePrs),
|
|
617
|
+
private_commits: part("references.private_commits", new Set(), privateCommits),
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return decorate({
|
|
621
|
+
status,
|
|
622
|
+
sessions,
|
|
623
|
+
sessions_by_host: measured(Object.fromEntries(Object.entries(hosts).sort(([left], [right]) => compareText(left, right)))),
|
|
624
|
+
lead_time_ms: lead,
|
|
625
|
+
queue_before_start_ms: queue,
|
|
626
|
+
active_time_ms: active,
|
|
627
|
+
active_in_lead_ms: activeInLead,
|
|
628
|
+
active_before_card_ms: activeBeforeCard,
|
|
629
|
+
busy_time_ms: busy,
|
|
630
|
+
parallelism,
|
|
631
|
+
concurrent_sessions: concurrentSessions,
|
|
632
|
+
concurrent_agents: concurrentAgents,
|
|
633
|
+
waits,
|
|
634
|
+
longest_wait: longest,
|
|
635
|
+
lead_contributors: leadContributors({ lead: windowLead, timingUnavailable, activeInLead, queue, waits, waitUnions }),
|
|
636
|
+
flow_efficiency: flowEfficiency,
|
|
637
|
+
tool_calls_by_kind: withCoverage(measured(sumMap(counted, "tool_calls")), countCoverage("tool_calls_by_kind")),
|
|
638
|
+
references: referencesResult(references, parts, { privatePrs, privateCommits }),
|
|
639
|
+
rework_signals: {
|
|
640
|
+
tool_failures: withCoverage(inferred(Object.values(sumMap(counted, "tool_failures")).reduce((total, value) => total + value, 0)), countCoverage("rework_signals.tool_failures")),
|
|
641
|
+
tool_retries: covered(retryCoverage(sourceSessions, fieldsFeeding("rework_signals.tool_retries", "unavailable"), split, sharedSegments, fieldsFeeding("rework_signals.tool_retries", "partial")), () => inferred(sumField(counted, "tool_retries"))),
|
|
642
|
+
api_retries: covered(retryCoverage(sourceSessions, fieldsFeeding("rework_signals.api_retries", "unavailable"), split, sharedSegments), () => inferred(sumField(counted, "api_retries"))),
|
|
643
|
+
session_retouches: inferred(Math.max(0, sourceSessions.length - 1), { basis: "captured_sessions" }),
|
|
644
|
+
},
|
|
645
|
+
tokens_total: tokenTotals(sourceSessions, split),
|
|
646
|
+
unavailable: measured(unavailableGroups(sourceSessions)),
|
|
647
|
+
first_pass_yield: firstPassFormula(timeline.outcome),
|
|
648
|
+
signoff: signoffFormula(timeline.outcome),
|
|
649
|
+
rework: reworkFormula(timeline.outcome),
|
|
650
|
+
attention: attentionFormula(timeline.source_sessions, timeline.job),
|
|
651
|
+
})
|
|
652
|
+
}
|