@opengeni/worker-bundle 2.0.1 → 2.0.2-canary.38789554071001
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/dist/activities/agent-run-admission.d.ts +1 -12
- package/dist/activities/agent-turn/admission.d.ts +88 -10
- package/dist/activities/agent-turn/agent-build.d.ts +14 -3
- package/dist/activities/agent-turn/claim.d.ts +4 -1
- package/dist/activities/agent-turn/claude-core.d.ts +195 -0
- package/dist/activities/agent-turn/code-search.d.ts +60 -0
- package/dist/activities/agent-turn/codex-capacity.d.ts +3 -0
- package/dist/activities/agent-turn/codex-core-capacity.d.ts +37 -0
- package/dist/activities/agent-turn/codex-core-claim.d.ts +40 -0
- package/dist/activities/agent-turn/codex-core-errors.d.ts +102 -0
- package/dist/activities/agent-turn/codex-core-failover.d.ts +15 -0
- package/dist/activities/agent-turn/codex-core-requests.d.ts +28 -0
- package/dist/activities/agent-turn/codex-core-settlement.d.ts +77 -0
- package/dist/activities/agent-turn/codex-credit-policy.d.ts +30 -0
- package/dist/activities/agent-turn/codex-plan-entitlement.d.ts +105 -0
- package/dist/activities/agent-turn/codex-usage-policy.d.ts +2 -0
- package/dist/activities/agent-turn/codex.d.ts +2 -19
- package/dist/activities/agent-turn/compaction-interruption.d.ts +32 -0
- package/dist/activities/agent-turn/compaction-prep.d.ts +30 -1
- package/dist/activities/agent-turn/credential-leases.d.ts +64 -37
- package/dist/activities/agent-turn/credential-restriction.d.ts +3 -0
- package/dist/activities/agent-turn/errors.d.ts +185 -26
- package/dist/activities/agent-turn/failure-settlement.d.ts +10 -43
- package/dist/activities/agent-turn/final-reply.d.ts +18 -0
- package/dist/activities/agent-turn/finalization-monitor.d.ts +7 -2
- package/dist/activities/agent-turn/finalization.d.ts +2 -0
- package/dist/activities/agent-turn/github-repository-bindings.d.ts +2 -0
- package/dist/activities/agent-turn/governance-model.d.ts +13 -1
- package/dist/activities/agent-turn/history-sink.d.ts +4 -1
- package/dist/activities/agent-turn/history.d.ts +2 -0
- package/dist/activities/agent-turn/input-wait-reply.d.ts +76 -0
- package/dist/activities/agent-turn/meaningful-output.d.ts +9 -0
- package/dist/activities/agent-turn/media-artifacts.d.ts +5 -3
- package/dist/activities/agent-turn/model-call-admission.d.ts +15 -0
- package/dist/activities/agent-turn/model-usage.d.ts +56 -14
- package/dist/activities/agent-turn/model-wire-dispatch.d.ts +15 -0
- package/dist/activities/agent-turn/optional-repositories.d.ts +59 -0
- package/dist/activities/agent-turn/prompt-tool-availability.d.ts +17 -0
- package/dist/activities/agent-turn/provider-dispatch-barrier.d.ts +12 -1
- package/dist/activities/agent-turn/provider-recovery-copy.d.ts +24 -0
- package/dist/activities/agent-turn/provider-recovery-metrics.d.ts +18 -0
- package/dist/activities/agent-turn/provider-recovery-policy.d.ts +6 -0
- package/dist/activities/agent-turn/quiescence.d.ts +6 -7
- package/dist/activities/agent-turn/recovery-warning.d.ts +6 -5
- package/dist/activities/agent-turn/refresh-credentials.d.ts +6 -0
- package/dist/activities/agent-turn/run-credentials.d.ts +9 -5
- package/dist/activities/agent-turn/run.d.ts +27 -2
- package/dist/activities/agent-turn/sandbox-establish.d.ts +1 -0
- package/dist/activities/agent-turn/sandbox-provision.d.ts +25 -1
- package/dist/activities/agent-turn/sandbox-route.d.ts +3 -0
- package/dist/activities/agent-turn/sandbox-runtime.d.ts +1 -1
- package/dist/activities/agent-turn/secret-resolver.d.ts +64 -0
- package/dist/activities/agent-turn/session-title.d.ts +60 -3
- package/dist/activities/agent-turn/session-usage-custody.d.ts +66 -0
- package/dist/activities/agent-turn/skill-checkout.d.ts +25 -6
- package/dist/activities/agent-turn/skill-read.d.ts +70 -2
- package/dist/activities/agent-turn/skill-search.d.ts +2 -0
- package/dist/activities/agent-turn/skill-tools.d.ts +41 -4
- package/dist/activities/agent-turn/skill-transfer.d.ts +18 -6
- package/dist/activities/agent-turn/stream-attempt.d.ts +6 -3
- package/dist/activities/agent-turn/subscription-capacity-arming.d.ts +41 -0
- package/dist/activities/agent-turn/subscription-core-capacity.d.ts +86 -0
- package/dist/activities/agent-turn/subscription-core-failover.d.ts +69 -0
- package/dist/activities/agent-turn/subscription-core-placed.d.ts +14 -0
- package/dist/activities/agent-turn/subscription-core-requests.d.ts +109 -0
- package/dist/activities/agent-turn/subscription-core-settlement.d.ts +112 -0
- package/dist/activities/agent-turn/subscription-lease.d.ts +44 -0
- package/dist/activities/agent-turn/subscription-serving-capacity.d.ts +6 -0
- package/dist/activities/agent-turn/subscription-serving-catalog.d.ts +13 -0
- package/dist/activities/agent-turn/subscription-serving-claim.d.ts +30 -0
- package/dist/activities/agent-turn/subscription-serving-providers.d.ts +2 -0
- package/dist/activities/agent-turn/tool-environment.d.ts +31 -6
- package/dist/activities/agent-turn/tool-policy.d.ts +55 -3
- package/dist/activities/agent-turn/turn-context.d.ts +104 -5
- package/dist/activities/agent-turn/web-search.d.ts +57 -0
- package/dist/activities/agent-turn/xai-core.d.ts +96 -0
- package/dist/activities/automations.d.ts +3 -1
- package/dist/activities/browser-deadline-checkpoint.d.ts +34 -0
- package/dist/activities/capabilities.d.ts +8 -20
- package/dist/activities/codemode-dispatcher.d.ts +20 -3
- package/dist/activities/codex-capacity.d.ts +1 -56
- package/dist/activities/codex-image-generation.d.ts +49 -3
- package/dist/activities/common.d.ts +3 -1
- package/dist/activities/context-compaction.d.ts +41 -2
- package/dist/activities/environment.d.ts +1 -19
- package/dist/activities/gmail-files.d.ts +50 -0
- package/dist/activities/goals.d.ts +1 -9
- package/dist/activities/incident-telemetry-authority.d.ts +5 -2
- package/dist/activities/incident-telemetry-preflight.d.ts +10 -3
- package/dist/activities/knowledge-indexing.d.ts +19 -0
- package/dist/activities/mcp-account-routes.d.ts +2 -21
- package/dist/activities/model-call-fact-reconciler.d.ts +34 -0
- package/dist/activities/open-suffix-resume.d.ts +15 -0
- package/dist/activities/parent-wake.d.ts +17 -12
- package/dist/activities/programmatic-approvals.d.ts +10 -0
- package/dist/activities/requester-unavailable-receipt.d.ts +8 -0
- package/dist/activities/retained-screenshots.d.ts +7 -2
- package/dist/activities/run-credential-renewal.d.ts +1 -0
- package/dist/activities/run-credentials.d.ts +16 -4
- package/dist/activities/run-input.d.ts +17 -0
- package/dist/activities/sandbox-lease.d.ts +132 -12
- package/dist/activities/scheduled-tasks.d.ts +4 -35
- package/dist/activities/session-archive.d.ts +58 -0
- package/dist/activities/session-state.d.ts +15 -3
- package/dist/activities/session-storage.d.ts +44 -0
- package/dist/activities/subscription-core-claude-waits.d.ts +2 -0
- package/dist/activities/subscription-core-codex-quota.d.ts +25 -0
- package/dist/activities/subscription-core-codex-waits.d.ts +153 -0
- package/dist/activities/subscription-core-image-operation.d.ts +29 -0
- package/dist/activities/subscription-core-usage-recheck.d.ts +49 -0
- package/dist/activities/subscription-core-wait-bindings.d.ts +3 -0
- package/dist/activities/subscription-core-xai-quota.d.ts +30 -0
- package/dist/activities/subscription-core-xai-waits.d.ts +2 -0
- package/dist/activities/types.d.ts +68 -5
- package/dist/activities/video-generation-admission.d.ts +2 -8
- package/dist/activities/video-generation-credential.d.ts +15 -12
- package/dist/activities/video-generation-subscription-core.d.ts +70 -0
- package/dist/activities/workspace-capture.d.ts +2 -0
- package/dist/activities/workspace-credential-provider.d.ts +47 -0
- package/dist/activities/xai-auth.d.ts +6 -18
- package/dist/activities/xai-image-generation.d.ts +22 -6
- package/dist/{activities-control-QA6OLRQY.js → activities-control-5IIVRXLA.js} +1569 -2883
- package/dist/activities-control-5IIVRXLA.js.map +1 -0
- package/dist/activities-control.d.ts +64 -4
- package/dist/{activities-turn-YVVKCGAK.js → activities-turn-FLYJOM54.js} +9300 -4403
- package/dist/activities-turn-FLYJOM54.js.map +1 -0
- package/dist/activities.d.ts +64 -4
- package/dist/artifact-materializer-entry.js +107 -36
- package/dist/artifact-materializer-entry.js.map +1 -1
- package/dist/artifact-outbox-entry.js +132 -61
- package/dist/artifact-outbox-entry.js.map +1 -1
- package/dist/browser-deadline-checkpoint-contract.d.ts +2 -0
- package/dist/{chunk-GDCLDKSH.js → chunk-24GP3BX5.js} +79 -72
- package/dist/chunk-24GP3BX5.js.map +1 -0
- package/dist/{chunk-RAMNYSAW.js → chunk-4ER3YXOT.js} +22 -4
- package/dist/chunk-4ER3YXOT.js.map +1 -0
- package/dist/{chunk-I7HKKMUJ.js → chunk-5NNS4327.js} +734 -58
- package/dist/chunk-5NNS4327.js.map +1 -0
- package/dist/chunk-MVESOYFC.js +3746 -0
- package/dist/chunk-MVESOYFC.js.map +1 -0
- package/dist/{chunk-M3NVMF2V.js → chunk-N57B3PJ5.js} +2307 -3951
- package/dist/chunk-N57B3PJ5.js.map +1 -0
- package/dist/chunk-NQDVJ6RI.js +2823 -0
- package/dist/chunk-NQDVJ6RI.js.map +1 -0
- package/dist/chunk-O7UPBWXK.js +79 -0
- package/dist/chunk-O7UPBWXK.js.map +1 -0
- package/dist/chunk-W2QSM5HR.js +414 -0
- package/dist/chunk-W2QSM5HR.js.map +1 -0
- package/dist/chunk-ZN3XJR33.js +227 -0
- package/dist/chunk-ZN3XJR33.js.map +1 -0
- package/dist/editable-artifact-outbox-dispatcher.d.ts +12 -1
- package/dist/editable-artifact-outbox-service.d.ts +3 -1
- package/dist/host-export-pump.d.ts +3 -1
- package/dist/host-export.d.ts +2 -2
- package/dist/host-export.js +1 -1
- package/dist/http.d.ts +1 -1
- package/dist/index.d.ts +49 -48
- package/dist/index.js +835 -256
- package/dist/index.js.map +1 -1
- package/dist/internal-maintenance.d.ts +63 -0
- package/dist/maintenance-cadence.d.ts +43 -0
- package/dist/observability-metrics.d.ts +293 -24
- package/dist/onepassword-vault-provider.d.ts +7 -0
- package/dist/parent-wake-PCLH7A3Y.js +24 -0
- package/dist/parent-wake-PCLH7A3Y.js.map +1 -0
- package/dist/personal-github-git-credentials.d.ts +1 -1
- package/dist/readiness-checks.d.ts +39 -0
- package/dist/retained-process-retry.d.ts +7 -0
- package/dist/sandbox-lease-BJYU72N3.js +84 -0
- package/dist/sandbox-lease-BJYU72N3.js.map +1 -0
- package/dist/sandbox-reaper-contract.d.ts +25 -0
- package/dist/sandbox-resume.d.ts +72 -4
- package/dist/sandbox-routing.d.ts +4 -2
- package/dist/session-event-fanout.d.ts +6 -0
- package/dist/site-auth-maintenance-WK3MR2PV.js +12 -0
- package/dist/site-auth-maintenance-WK3MR2PV.js.map +1 -0
- package/dist/telemetry-scheduler.d.ts +14 -0
- package/dist/temporal-runtime-logger.d.ts +22 -0
- package/dist/turn-task-queue-reader.d.ts +18 -0
- package/dist/turn-worker-activity-telemetry.d.ts +47 -0
- package/dist/worker-service-lifecycle.d.ts +12 -0
- package/dist/workflow-bundle.js +468 -71
- package/dist/workflows/activities.d.ts +1 -1
- package/dist/workflows/browser-deadline-checkpoint.d.ts +10 -0
- package/dist/workflows/sandbox-reaper.d.ts +10 -1
- package/dist/workflows/scheduled-tasks.d.ts +4 -0
- package/dist/workflows/session-storage.d.ts +2 -0
- package/dist/workflows/session.d.ts +36 -0
- package/dist/workflows/site-auth-maintenance.d.ts +2 -1
- package/dist/workflows/workflow-wake.d.ts +14 -3
- package/dist/workflows.d.ts +3 -1
- package/package.json +26 -20
- package/src/activities/agent-run-admission.ts +1 -82
- package/src/activities/agent-turn/admission.ts +175 -24
- package/src/activities/agent-turn/agent-build.ts +226 -145
- package/src/activities/agent-turn/claim.ts +363 -64
- package/src/activities/agent-turn/claude-core.ts +587 -0
- package/src/activities/agent-turn/code-search.ts +275 -0
- package/src/activities/agent-turn/codex-capacity.ts +30 -757
- package/src/activities/agent-turn/codex-core-capacity.ts +190 -0
- package/src/activities/agent-turn/codex-core-claim.ts +83 -0
- package/src/activities/agent-turn/codex-core-errors.ts +308 -0
- package/src/activities/agent-turn/codex-core-failover.ts +73 -0
- package/src/activities/agent-turn/codex-core-requests.ts +86 -0
- package/src/activities/agent-turn/codex-core-settlement.ts +263 -0
- package/src/activities/agent-turn/codex-credit-policy.ts +247 -0
- package/src/activities/agent-turn/codex-plan-entitlement.ts +254 -0
- package/src/activities/agent-turn/codex-usage-policy.ts +2 -0
- package/src/activities/agent-turn/codex.ts +8 -76
- package/src/activities/agent-turn/compaction-interruption.ts +56 -0
- package/src/activities/agent-turn/compaction-prep.ts +249 -36
- package/src/activities/agent-turn/credential-leases.ts +269 -214
- package/src/activities/agent-turn/credential-restriction.ts +14 -0
- package/src/activities/agent-turn/errors.ts +1152 -82
- package/src/activities/agent-turn/failure-settlement.ts +879 -886
- package/src/activities/agent-turn/final-reply.ts +46 -0
- package/src/activities/agent-turn/finalization-monitor.ts +17 -5
- package/src/activities/agent-turn/finalization.ts +107 -88
- package/src/activities/agent-turn/github-repository-bindings.ts +3 -1
- package/src/activities/agent-turn/governance-model.ts +90 -22
- package/src/activities/agent-turn/history-sink.ts +42 -12
- package/src/activities/agent-turn/history.ts +25 -5
- package/src/activities/agent-turn/input-wait-reply.ts +139 -0
- package/src/activities/agent-turn/knowledge-source-tools.ts +2 -0
- package/src/activities/agent-turn/meaningful-output.ts +44 -0
- package/src/activities/agent-turn/media-artifacts.ts +3 -1
- package/src/activities/agent-turn/model-call-admission.ts +114 -0
- package/src/activities/agent-turn/model-usage.ts +299 -233
- package/src/activities/agent-turn/model-wire-dispatch.ts +27 -0
- package/src/activities/agent-turn/optional-repositories.ts +224 -0
- package/src/activities/agent-turn/prompt-tool-availability.ts +27 -0
- package/src/activities/agent-turn/provider-dispatch-barrier.ts +22 -0
- package/src/activities/agent-turn/provider-recovery-copy.ts +76 -0
- package/src/activities/agent-turn/provider-recovery-metrics.ts +64 -0
- package/src/activities/agent-turn/provider-recovery-policy.ts +25 -0
- package/src/activities/agent-turn/quiescence.ts +7 -7
- package/src/activities/agent-turn/recovery-warning.ts +6 -8
- package/src/activities/agent-turn/refresh-credentials.ts +44 -0
- package/src/activities/agent-turn/run-credentials.ts +124 -76
- package/src/activities/agent-turn/run.ts +501 -112
- package/src/activities/agent-turn/sandbox-establish.ts +152 -75
- package/src/activities/agent-turn/sandbox-provision.ts +54 -1
- package/src/activities/agent-turn/sandbox-route.ts +4 -1
- package/src/activities/agent-turn/sandbox-runtime.ts +319 -11
- package/src/activities/agent-turn/secret-resolver.ts +155 -0
- package/src/activities/agent-turn/session-title.ts +177 -12
- package/src/activities/agent-turn/session-usage-custody.ts +170 -0
- package/src/activities/agent-turn/skill-checkout.ts +111 -24
- package/src/activities/agent-turn/skill-install.ts +1 -1
- package/src/activities/agent-turn/skill-read.ts +374 -28
- package/src/activities/agent-turn/skill-save.ts +35 -7
- package/src/activities/agent-turn/skill-search.ts +9 -0
- package/src/activities/agent-turn/skill-selection.ts +4 -0
- package/src/activities/agent-turn/skill-tools.ts +208 -21
- package/src/activities/agent-turn/skill-transfer.ts +68 -23
- package/src/activities/agent-turn/stream-attempt.ts +634 -111
- package/src/activities/agent-turn/subscription-capacity-arming.ts +81 -0
- package/src/activities/agent-turn/subscription-core-capacity.ts +439 -0
- package/src/activities/agent-turn/subscription-core-failover.ts +229 -0
- package/src/activities/agent-turn/subscription-core-placed.ts +37 -0
- package/src/activities/agent-turn/subscription-core-requests.ts +271 -0
- package/src/activities/agent-turn/subscription-core-settlement.ts +234 -0
- package/src/activities/agent-turn/subscription-lease.ts +140 -0
- package/src/activities/agent-turn/subscription-serving-capacity.ts +195 -0
- package/src/activities/agent-turn/subscription-serving-catalog.ts +71 -0
- package/src/activities/agent-turn/subscription-serving-claim.ts +178 -0
- package/src/activities/agent-turn/subscription-serving-providers.ts +15 -0
- package/src/activities/agent-turn/tool-environment.ts +384 -292
- package/src/activities/agent-turn/tool-policy.ts +104 -4
- package/src/activities/agent-turn/tool-result-spill.ts +1 -0
- package/src/activities/agent-turn/turn-context.ts +124 -8
- package/src/activities/agent-turn/web-search.ts +431 -0
- package/src/activities/agent-turn/xai-core.ts +301 -0
- package/src/activities/automations.ts +81 -6
- package/src/activities/browser-deadline-checkpoint.ts +297 -0
- package/src/activities/capabilities.ts +53 -213
- package/src/activities/codemode-dispatcher.ts +236 -14
- package/src/activities/codex-capacity.ts +27 -380
- package/src/activities/codex-image-generation.ts +252 -42
- package/src/activities/common.ts +12 -0
- package/src/activities/connector-attachments.ts +3 -1
- package/src/activities/context-compaction.ts +182 -21
- package/src/activities/environment.ts +18 -106
- package/src/activities/gmail-files.ts +108 -0
- package/src/activities/goals.ts +120 -204
- package/src/activities/image-generation-operation.ts +1 -1
- package/src/activities/incident-telemetry-authority.ts +80 -50
- package/src/activities/incident-telemetry-preflight.ts +27 -15
- package/src/activities/knowledge-indexing.ts +287 -17
- package/src/activities/knowledge-source-sync.ts +10 -0
- package/src/activities/mcp-account-routes.ts +2 -124
- package/src/activities/model-call-fact-reconciler.ts +112 -0
- package/src/activities/open-suffix-resume.ts +122 -88
- package/src/activities/parent-wake.ts +89 -21
- package/src/activities/programmatic-approvals.ts +26 -0
- package/src/activities/requester-unavailable-receipt.ts +14 -0
- package/src/activities/retained-screenshots.ts +135 -24
- package/src/activities/run-credential-renewal.ts +13 -1
- package/src/activities/run-credentials.ts +61 -19
- package/src/activities/run-input.ts +124 -9
- package/src/activities/sandbox-lease.ts +1615 -73
- package/src/activities/scheduled-tasks.ts +780 -147
- package/src/activities/session-archive.ts +382 -0
- package/src/activities/session-state.ts +219 -10
- package/src/activities/session-storage.ts +124 -0
- package/src/activities/site-auth-maintenance.ts +5 -2
- package/src/activities/subscription-core-claude-waits.ts +49 -0
- package/src/activities/subscription-core-codex-quota.ts +46 -0
- package/src/activities/subscription-core-codex-waits.ts +488 -0
- package/src/activities/subscription-core-image-operation.ts +126 -0
- package/src/activities/subscription-core-usage-recheck.ts +146 -0
- package/src/activities/subscription-core-wait-bindings.ts +12 -0
- package/src/activities/subscription-core-xai-quota.ts +85 -0
- package/src/activities/subscription-core-xai-waits.ts +48 -0
- package/src/activities/types.ts +85 -9
- package/src/activities/video-generation-admission.ts +1 -36
- package/src/activities/video-generation-credential.ts +38 -56
- package/src/activities/video-generation-reconciliation.ts +150 -131
- package/src/activities/video-generation-subscription-core.ts +180 -0
- package/src/activities/workspace-capture.ts +13 -2
- package/src/activities/workspace-credential-provider.ts +302 -0
- package/src/activities/xai-auth.ts +34 -112
- package/src/activities/xai-image-generation.ts +84 -36
- package/src/activities-control.ts +8 -0
- package/src/activities-turn.ts +5 -0
- package/src/activities.ts +17 -0
- package/src/activity-services.ts +29 -4
- package/src/browser-deadline-checkpoint-contract.ts +5 -0
- package/src/editable-artifact-hint-broker.ts +3 -0
- package/src/editable-artifact-materializer-service.ts +85 -39
- package/src/editable-artifact-materializer-subprocess.ts +47 -2
- package/src/editable-artifact-outbox-dispatcher.ts +107 -46
- package/src/editable-artifact-outbox-service.ts +55 -25
- package/src/github-rest-mcp.ts +1 -1
- package/src/host-export-pump.ts +26 -4
- package/src/host-export.ts +4 -1
- package/src/http.ts +4 -2
- package/src/index.ts +222 -282
- package/src/internal-maintenance.ts +347 -0
- package/src/maintenance-cadence.ts +156 -0
- package/src/observability-metrics.ts +1173 -73
- package/src/onepassword-vault-provider.ts +11 -0
- package/src/personal-github-git-credentials.ts +3 -1
- package/src/pr-review-credentials.ts +1 -1
- package/src/readiness-checks.ts +113 -0
- package/src/retained-process-retry.ts +36 -0
- package/src/sandbox-reaper-contract.ts +33 -0
- package/src/sandbox-resume.ts +444 -73
- package/src/sandbox-routing.ts +230 -75
- package/src/session-event-fanout.ts +23 -0
- package/src/telemetry-scheduler.ts +53 -0
- package/src/temporal-runtime-logger.ts +44 -0
- package/src/turn-task-queue-reader.ts +110 -0
- package/src/turn-worker-activity-telemetry.ts +209 -0
- package/src/worker-service-lifecycle.ts +54 -1
- package/src/workflows/activities.ts +16 -1
- package/src/workflows/browser-deadline-checkpoint.ts +55 -0
- package/src/workflows/file-upload-reaper.ts +2 -0
- package/src/workflows/sandbox-reaper.ts +88 -0
- package/src/workflows/scheduled-tasks.ts +26 -13
- package/src/workflows/session-storage.ts +19 -0
- package/src/workflows/session.ts +238 -33
- package/src/workflows/site-auth-maintenance.ts +2 -1
- package/src/workflows/workflow-wake.ts +26 -4
- package/src/workflows.ts +7 -0
- package/dist/activities/agent-turn/xai-capacity.d.ts +0 -2
- package/dist/activities/codex-fleet-shadow.d.ts +0 -74
- package/dist/activities/codex-rotation.d.ts +0 -200
- package/dist/activities/xai-quota.d.ts +0 -3
- package/dist/activities-control-QA6OLRQY.js.map +0 -1
- package/dist/activities-turn-YVVKCGAK.js.map +0 -1
- package/dist/chunk-GDCLDKSH.js.map +0 -1
- package/dist/chunk-I7HKKMUJ.js.map +0 -1
- package/dist/chunk-M3NVMF2V.js.map +0 -1
- package/dist/chunk-RAMNYSAW.js.map +0 -1
- package/src/activities/agent-turn/xai-capacity.ts +0 -257
- package/src/activities/codex-fleet-shadow.ts +0 -306
- package/src/activities/codex-rotation.ts +0 -685
- package/src/activities/xai-quota.ts +0 -35
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type Settings } from "@opengeni/config";
|
|
2
|
+
import { type Database } from "@opengeni/db";
|
|
3
|
+
import type { DocumentServices } from "@opengeni/documents";
|
|
4
|
+
import type { Observability } from "@opengeni/observability";
|
|
5
|
+
import { Client as TemporalClient } from "@temporalio/client";
|
|
6
|
+
import { type MaintenanceCadence, type MaintenanceCadences, type MaintenanceStartResult } from "./maintenance-cadence.js";
|
|
7
|
+
import type { TelemetryScheduler } from "./telemetry-scheduler.js";
|
|
8
|
+
export declare const KNOWLEDGE_INDEXING_SCHEDULE_ID = "opengeni-knowledge-indexing";
|
|
9
|
+
export declare const KNOWLEDGE_INDEXING_WORKFLOW_ID = "opengeni-knowledge-indexing";
|
|
10
|
+
export declare const KNOWLEDGE_INDEXING_PERIOD_MS = 15000;
|
|
11
|
+
export declare const SITE_AUTH_MAINTENANCE_SCHEDULE_ID = "opengeni-site-auth-maintenance";
|
|
12
|
+
export declare const SITE_AUTH_MAINTENANCE_WORKFLOW_ID = "opengeni-site-auth-maintenance";
|
|
13
|
+
/** Matches the minimum public site-auth health policy interval. */
|
|
14
|
+
export declare const SITE_AUTH_MAINTENANCE_PERIOD_MS: number;
|
|
15
|
+
/** The Schedule earlier releases used to drive the sandbox lease reaper. */
|
|
16
|
+
export declare const SANDBOX_REAPER_SCHEDULE_ID = "opengeni-sandbox-lease-reaper";
|
|
17
|
+
export declare const INTERNAL_MAINTENANCE_JOBS: readonly ["session-workflow-wake-dispatcher", "knowledge-indexing", "site-auth-maintenance", "sandbox-lease-reaper", "sandbox-idle-checkpoint", "browser-deadline-checkpoint"];
|
|
18
|
+
export type InternalMaintenanceJob = (typeof INTERNAL_MAINTENANCE_JOBS)[number];
|
|
19
|
+
type WorkflowStarter = Pick<TemporalClient["workflow"], "start" | "signalWithStart">;
|
|
20
|
+
type ScheduleDeleter = {
|
|
21
|
+
getHandle(id: string): {
|
|
22
|
+
delete(): Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/** Start a fixed-id maintenance workflow unless one is already running; the
|
|
26
|
+
* running sweep's own claims cover whatever this tick saw. */
|
|
27
|
+
export declare function startMaintenanceWorkflowOnce(workflow: WorkflowStarter, input: {
|
|
28
|
+
workflowType: string;
|
|
29
|
+
workflowId: string;
|
|
30
|
+
taskQueue: string;
|
|
31
|
+
}): Promise<MaintenanceStartResult>;
|
|
32
|
+
/** Remove the per-tick Schedules this release replaces. Absent is success. */
|
|
33
|
+
export declare function deleteLegacyMaintenanceSchedules(schedule: ScheduleDeleter, jobs: readonly InternalMaintenanceJob[], observability: Observability): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Build the work-checked cadences for the deployment-wide dispatchers. Each
|
|
36
|
+
* tick runs one cheap read-only check and touches Temporal only when the check
|
|
37
|
+
* may find work, so an idle deployment writes no workflow history at all.
|
|
38
|
+
*/
|
|
39
|
+
export declare function internalMaintenanceCadences(input: {
|
|
40
|
+
settings: Settings;
|
|
41
|
+
observability: Observability;
|
|
42
|
+
db: Database;
|
|
43
|
+
workflow: WorkflowStarter;
|
|
44
|
+
documentServices?: DocumentServices;
|
|
45
|
+
jobs?: readonly InternalMaintenanceJob[];
|
|
46
|
+
}): Promise<MaintenanceCadence[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Run the deployment-wide maintenance dispatchers from this control worker.
|
|
49
|
+
* Several control replicas may each run the cadence: an idle tick is only a
|
|
50
|
+
* read, and a busy one converges on the same fixed workflow id.
|
|
51
|
+
*/
|
|
52
|
+
export declare function startInternalMaintenanceCadences(input: {
|
|
53
|
+
settings: Settings;
|
|
54
|
+
observability: Observability;
|
|
55
|
+
db: Database;
|
|
56
|
+
documentServices?: DocumentServices;
|
|
57
|
+
jobs?: readonly InternalMaintenanceJob[];
|
|
58
|
+
scheduler?: TelemetryScheduler;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
cadences: MaintenanceCadences;
|
|
61
|
+
close: () => Promise<void>;
|
|
62
|
+
}>;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Observability } from "@opengeni/observability";
|
|
2
|
+
import { type TelemetryScheduler } from "./telemetry-scheduler.js";
|
|
3
|
+
export type MaintenanceStartResult = "started" | "already_running";
|
|
4
|
+
export type MaintenanceTickOutcome =
|
|
5
|
+
/** The work check proved there is nothing to do; no workflow was touched. */
|
|
6
|
+
"idle" | "started" | "already_running"
|
|
7
|
+
/** The check failed; the workflow was started anyway (fail open). */
|
|
8
|
+
| "probe_failed" | "start_failed"
|
|
9
|
+
/** This process's previous tick for the job has not finished. */
|
|
10
|
+
| "busy";
|
|
11
|
+
/**
|
|
12
|
+
* One deployment-wide maintenance job driven by a worker-process cadence
|
|
13
|
+
* instead of a Temporal Schedule. A Schedule starts a workflow execution on
|
|
14
|
+
* every tick, so an idle deployment pays a history and visibility write per
|
|
15
|
+
* tick for no work. A cadence instead asks a cheap read-only question first and
|
|
16
|
+
* starts the job's workflow only when the answer may be yes.
|
|
17
|
+
*/
|
|
18
|
+
export type MaintenanceCadence = {
|
|
19
|
+
/** Stable, low-cardinality metric label. */
|
|
20
|
+
job: string;
|
|
21
|
+
periodMs: number;
|
|
22
|
+
/**
|
|
23
|
+
* A superset of the job's claim predicate: `false` must prove that a run
|
|
24
|
+
* would find nothing. It may perform the job's own idempotent repair
|
|
25
|
+
* registration, but never claims or delivers work.
|
|
26
|
+
*/
|
|
27
|
+
hasWork: () => Promise<boolean>;
|
|
28
|
+
/** Start or nudge the job's single dispatcher workflow. */
|
|
29
|
+
start: () => Promise<MaintenanceStartResult>;
|
|
30
|
+
};
|
|
31
|
+
export type MaintenanceCadences = {
|
|
32
|
+
/** Run one tick for a job now; used by tests and by the cadence itself. */
|
|
33
|
+
tick: (job: string) => Promise<MaintenanceTickOutcome>;
|
|
34
|
+
close: () => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
export declare function startMaintenanceCadences(input: {
|
|
37
|
+
cadences: readonly MaintenanceCadence[];
|
|
38
|
+
observability: Observability;
|
|
39
|
+
scheduler?: TelemetryScheduler;
|
|
40
|
+
now?: () => number;
|
|
41
|
+
/** Tests drive ticks explicitly. */
|
|
42
|
+
autoStart?: boolean;
|
|
43
|
+
}): MaintenanceCadences;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type SessionEventType } from "@opengeni/contracts";
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
1
|
+
import { type SessionEventType, type SkillReadKind, type SkillUseSource } from "@opengeni/contracts";
|
|
2
|
+
import { type ActiveUserWindow, type CreditGrantTotals, type IdleInteractionInspection, type SessionEventAppendPhaseObservation } from "@opengeni/db";
|
|
3
|
+
import { type EventBusOptions, type EventLogger } from "@opengeni/events";
|
|
4
4
|
import type { Observability } from "@opengeni/observability";
|
|
5
5
|
import type { CompanyBrainContributionReceipt } from "./model-context-contributions.js";
|
|
6
|
+
import { type TelemetryScheduler } from "./telemetry-scheduler.js";
|
|
6
7
|
import { type OpenSandboxKubernetesInventory } from "./opensandbox-kubernetes-inventory.js";
|
|
7
8
|
import { type RuntimeMetricsHooks, type SelfhostedOpObservation, type SelfhostedOpObserver, type ToolPreparationPhaseMeasurement } from "@opengeni/runtime";
|
|
8
9
|
export type TurnOutcome = "completed" | "failed" | "cancelled" | "recovering";
|
|
@@ -20,9 +21,29 @@ export type TurnTaskQueueStats = {
|
|
|
20
21
|
tasksAddRate: number;
|
|
21
22
|
tasksDispatchRate: number;
|
|
22
23
|
};
|
|
24
|
+
export type TurnTaskQueueIdentity = {
|
|
25
|
+
temporalNamespace: string;
|
|
26
|
+
taskQueue: string;
|
|
27
|
+
};
|
|
28
|
+
export type TurnTaskQueueReadOptions = {
|
|
29
|
+
signal: AbortSignal;
|
|
30
|
+
deadline: number;
|
|
31
|
+
};
|
|
32
|
+
export declare function turnTaskQueueMetricLabels(identity: TurnTaskQueueIdentity): {
|
|
33
|
+
temporal_namespace: string;
|
|
34
|
+
task_queue: string;
|
|
35
|
+
};
|
|
36
|
+
export type SessionRecoveryBacklogStateSummary = {
|
|
37
|
+
/** Every durable recovering session in this state with no active attempt. */
|
|
38
|
+
count: number;
|
|
39
|
+
/** Of those, sessions still inside the backoff their recovery request recorded. */
|
|
40
|
+
scheduled: number;
|
|
41
|
+
/** Seconds the single oldest candidate has been past its recovery due time; 0 when none is. */
|
|
42
|
+
oldestOverdueSeconds: number;
|
|
43
|
+
};
|
|
23
44
|
export type SessionRecoveryBacklog = {
|
|
24
|
-
quiescence_missing:
|
|
25
|
-
projection_stale:
|
|
45
|
+
quiescence_missing: SessionRecoveryBacklogStateSummary;
|
|
46
|
+
projection_stale: SessionRecoveryBacklogStateSummary;
|
|
26
47
|
};
|
|
27
48
|
export type ContextCompactionPendingSummary = {
|
|
28
49
|
pendingCount: number;
|
|
@@ -39,6 +60,8 @@ export type TemporalTurnTaskQueueStats = {
|
|
|
39
60
|
} | null;
|
|
40
61
|
declare const CONTEXT_COMPACTION_TRIGGERS: readonly ["auto", "operator", "proactive", "overflow"];
|
|
41
62
|
export type ContextCompactionTrigger = (typeof CONTEXT_COMPACTION_TRIGGERS)[number];
|
|
63
|
+
/** Logger plus the closed-label subscription-termination counter for NATS connections. */
|
|
64
|
+
export declare function observabilityEventBusOptions(observability: Observability): Pick<EventBusOptions, "logger" | "onSubscriptionTerminated">;
|
|
42
65
|
export declare function observabilityEventLogger(observability: Observability): EventLogger;
|
|
43
66
|
export declare function runtimeMetricsHooksForObservability(observability: Observability): RuntimeMetricsHooks;
|
|
44
67
|
/**
|
|
@@ -138,23 +161,30 @@ export declare class ModelRequestLifecycleMetrics {
|
|
|
138
161
|
}
|
|
139
162
|
export declare function recordTurnsQueuedGauge(observability: Observability, value: number): void;
|
|
140
163
|
/**
|
|
141
|
-
* Record the
|
|
164
|
+
* Record the approximate shared turn-worker activity queue rather than Postgres
|
|
142
165
|
* prompts. A paused human prompt is durable queue truth but is not runnable and
|
|
143
166
|
* never reaches this Temporal task queue. DescribeTaskQueue's approximate
|
|
144
167
|
* backlog count and age are explicitly documented by Temporal as autoscaling
|
|
145
168
|
* signals.
|
|
146
169
|
*/
|
|
147
|
-
export declare function recordTurnTaskQueueStats(observability: Observability, stats: TurnTaskQueueStats): void;
|
|
170
|
+
export declare function recordTurnTaskQueueStats(observability: Observability, stats: TurnTaskQueueStats, identity: TurnTaskQueueIdentity): void;
|
|
148
171
|
export declare function normalizeTurnTaskQueueStats(stats: TemporalTurnTaskQueueStats | undefined): TurnTaskQueueStats;
|
|
172
|
+
/** Requires a fresh metric registry/schema; pre-registered legacy unlabelled
|
|
173
|
+
* queue gauges are not migrated in place. Each collector owns its native read. */
|
|
149
174
|
export declare function startTurnCapacityMonitor(input: {
|
|
150
175
|
observability: Observability;
|
|
151
|
-
|
|
176
|
+
identity: TurnTaskQueueIdentity;
|
|
177
|
+
read: (options: TurnTaskQueueReadOptions) => Promise<TurnTaskQueueStats>;
|
|
152
178
|
intervalMs?: number;
|
|
179
|
+
readTimeoutMs?: number;
|
|
180
|
+
closeTimeoutMs?: number;
|
|
153
181
|
now?: () => number;
|
|
182
|
+
monotonicNow?: () => number;
|
|
183
|
+
scheduler?: TelemetryScheduler;
|
|
154
184
|
}): {
|
|
155
185
|
close: () => Promise<void>;
|
|
156
186
|
};
|
|
157
|
-
export declare function recordSessionRecoveryBacklogGauges(observability: Observability,
|
|
187
|
+
export declare function recordSessionRecoveryBacklogGauges(observability: Observability, backlog: SessionRecoveryBacklog): void;
|
|
158
188
|
export declare function startSessionRecoveryMonitor(input: {
|
|
159
189
|
observability: Observability;
|
|
160
190
|
read: () => Promise<SessionRecoveryBacklog>;
|
|
@@ -174,17 +204,150 @@ export declare function startContextCompactionPendingMonitor(input: {
|
|
|
174
204
|
};
|
|
175
205
|
export declare function recordSandboxLeaseGauges(observability: Observability, counts: Partial<Record<SandboxLeaseLiveness, number>>): void;
|
|
176
206
|
export declare function recordOpenSandboxKubernetesInventoryGauges(observability: Observability, inventory: OpenSandboxKubernetesInventory): void;
|
|
177
|
-
export declare const SANDBOX_INVENTORY_PROJECTION_DOMAINS: readonly ["leases", "checkpoint_artifacts", "rotation_backlog", "retained_processes", "expired_drains", "opensandbox_kubernetes"];
|
|
207
|
+
export declare const SANDBOX_INVENTORY_PROJECTION_DOMAINS: readonly ["leases", "checkpoint_artifacts", "recovery_observations", "rotation_backlog", "retained_processes", "expired_drains", "opensandbox_kubernetes", "modal_provider", "interaction_idle", "checkpoint_staleness"];
|
|
178
208
|
export type SandboxInventoryProjectionDomain = (typeof SANDBOX_INVENTORY_PROJECTION_DOMAINS)[number];
|
|
179
209
|
export declare function recordSandboxInventoryProjectionSuccess(observability: Observability, domain: SandboxInventoryProjectionDomain, timestampSeconds?: number): void;
|
|
180
210
|
export declare function recordSandboxInventoryProjectionFailure(observability: Observability, domain: SandboxInventoryProjectionDomain): void;
|
|
181
211
|
export declare function recordCreditBalanceGauges(observability: Observability, balances: CreditBalanceGauge[]): void;
|
|
212
|
+
/**
|
|
213
|
+
* Distinct managed people with authenticated browser activity in each fixed
|
|
214
|
+
* window (migration 0565 presence). Every control worker publishes the same
|
|
215
|
+
* global value, so dashboards must aggregate with `max()` across pods, never
|
|
216
|
+
* `sum()`. API keys, services and embedded hosts are never counted.
|
|
217
|
+
*/
|
|
218
|
+
export declare function recordActiveUserGauges(observability: Observability, counts: Record<ActiveUserWindow, number>): void;
|
|
219
|
+
/**
|
|
220
|
+
* Positive credit grants observed by the ledger trigger since migration 0565,
|
|
221
|
+
* by closed class. These are cumulative database totals published as gauges by
|
|
222
|
+
* every control worker: aggregate with `max()` across pods, then subtract the
|
|
223
|
+
* same expression `offset` by the window. A per-pod `increase()` sees only one
|
|
224
|
+
* pod's lifetime and undercounts across control-worker restarts.
|
|
225
|
+
* Counting in the database covers the grants no application process writes:
|
|
226
|
+
* the verified-signup trial grant (a setup trigger) and operator grants.
|
|
227
|
+
*/
|
|
228
|
+
export declare function recordCreditGrantGauges(observability: Observability, totals: CreditGrantTotals): void;
|
|
229
|
+
/**
|
|
230
|
+
* The deployment-level runtime switch for the one-time verified signup trial
|
|
231
|
+
* credit (migration 0521): 1 while it allows grants, 0 when an operator has
|
|
232
|
+
* disabled it or no revision exists. A grant also needs the API's
|
|
233
|
+
* OPENGENI_VERIFIED_SIGNUP_TRIAL_CREDITS_ENABLED master opt-in, which
|
|
234
|
+
* {@link recordVerifiedSignupTrialDeploymentFlagGauge} reports separately.
|
|
235
|
+
*/
|
|
236
|
+
export declare function recordVerifiedSignupTrialSwitchGauge(observability: Observability, grantsEnabled: boolean): void;
|
|
237
|
+
/**
|
|
238
|
+
* The deployment-level runtime switch for new managed account sign-ups
|
|
239
|
+
* (migration 0585): 1 while it allows new accounts (also when no revision
|
|
240
|
+
* exists), 0 when an operator has paused them. The API additionally honours
|
|
241
|
+
* its OPENGENI_MANAGED_AUTH_NEW_SIGNUPS_ENABLED ceiling, which this gauge does
|
|
242
|
+
* not see; `GET /v1/config/client` reports the combined decision.
|
|
243
|
+
*/
|
|
244
|
+
export declare function recordManagedAuthNewSignupsSwitchGauge(observability: Observability, signupsEnabled: boolean): void;
|
|
245
|
+
/**
|
|
246
|
+
* The OPENGENI_VERIFIED_SIGNUP_TRIAL_CREDITS_ENABLED master opt-in as this
|
|
247
|
+
* worker's configuration sees it. The API reads the same shared setting; new
|
|
248
|
+
* grants happen only while this gauge and the runtime switch gauge are both 1.
|
|
249
|
+
*/
|
|
250
|
+
export declare function recordVerifiedSignupTrialDeploymentFlagGauge(observability: Observability, enabled: boolean): void;
|
|
251
|
+
/**
|
|
252
|
+
* Provider-side Modal inventory reconciled against live leases by the orphan
|
|
253
|
+
* sweep: `running` = every running box in the app, `unleased` = running boxes
|
|
254
|
+
* no live lease protects (orphans, counted before termination), and
|
|
255
|
+
* `lease_missing_instance` = warm leases whose exact provider instance is no
|
|
256
|
+
* longer running (zombies).
|
|
257
|
+
*/
|
|
258
|
+
export declare function recordModalSandboxInventoryGauges(observability: Observability, inventory: {
|
|
259
|
+
running: number;
|
|
260
|
+
unleased: number;
|
|
261
|
+
liveLeaseInstancesMissing: number;
|
|
262
|
+
}): void;
|
|
263
|
+
/** Warm leases held only by Browser/Computer interaction holders, by time since
|
|
264
|
+
* the newest interaction activity. Such boxes never drain on their own until the
|
|
265
|
+
* interaction session ends or the provider deadline. */
|
|
266
|
+
export declare function recordInteractionOnlyLeaseGauges(observability: Observability, counts: Record<string, number>): void;
|
|
182
267
|
export declare function recordSandboxOrphansTerminated(observability: Observability, count: number): void;
|
|
183
268
|
export type SandboxCheckpointArtifactMetricState = "candidate" | "current" | "previous" | "delete_pending" | "deleting" | "delete_failed" | "deleted";
|
|
184
269
|
export declare function recordSandboxCheckpointArtifactGauges(observability: Observability, counts: Record<SandboxCheckpointArtifactMetricState, number>): void;
|
|
185
270
|
export type SandboxCheckpointArtifactOutcome = "legacy_adopted" | "claimed" | "deleted" | "delete_failed" | "tombstone_pruned";
|
|
186
271
|
export declare function recordSandboxCheckpointArtifactOutcome(observability: Observability, outcome: SandboxCheckpointArtifactOutcome, count?: number): void;
|
|
187
272
|
export declare function recordSandboxDeadlineRotationsRequested(observability: Observability, count: number): void;
|
|
273
|
+
/** Fixed outcomes of legacy retained-command containment: per-candidate
|
|
274
|
+
* enrollment inspection, then the enrolled drain's exact cold commit. */
|
|
275
|
+
export declare const SANDBOX_COMMAND_CONTAINMENT_OUTCOMES: readonly ["idle_enrolled", "deadline_enrolled", "forced_deadline_enrolled", "quiescence_enrolled", "resumed_enrolled", "not_eligible", "inspection_failed", "contained", "provider_missing"];
|
|
276
|
+
export type SandboxCommandContainmentOutcome = (typeof SANDBOX_COMMAND_CONTAINMENT_OUTCOMES)[number];
|
|
277
|
+
/**
|
|
278
|
+
* Shared subscription core shadow (docs/subscription-accounts.md, SUB-COMPAT-03).
|
|
279
|
+
* Every label is a closed set: provider, security parity, placement agreement,
|
|
280
|
+
* contract requirement, skip reason and the legacy decision inputs present.
|
|
281
|
+
*/
|
|
282
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_PROVIDERS: readonly ["codex", "xai", "claude"];
|
|
283
|
+
/** Is the account the legacy selector chose inside the core's eligible set? */
|
|
284
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_PARITY: readonly ["eligible", "not_authorized", "not_servable", "unknown_connection", "no_selection"];
|
|
285
|
+
/** How the core's decision compares with the legacy decision (would-switch). */
|
|
286
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_PLACEMENTS: readonly ["same_account", "different_account", "core_waits", "core_runs_legacy_waits", "both_wait"];
|
|
287
|
+
/** Requirements the reference checker can report, plus checker failure. */
|
|
288
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_REQUIREMENTS: readonly ["SUB-ACCESS-06", "SUB-CREDITS-01", "SUB-ELIG-01", "SUB-ELIG-02", "SUB-ELIG-03", "SUB-ELIG-04", "SUB-ELIG-05", "SUB-FAIL-02", "SUB-FAIL-03", "SUB-FAIL-04", "SUB-OWN-05", "SUB-SEL-02", "SUB-SEL-04", "SUB-SET-06", "SUB-STICK-02", "SUB-WAIT-01", "SUB-WAIT-02", "other", "checker_error"];
|
|
289
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_SKIPS: readonly ["busy", "no_session_actor", "session_not_visible", "timeout", "cancelled", "error"];
|
|
290
|
+
/**
|
|
291
|
+
* Legacy decision inputs the Codex fleet shadow does not record (inventory
|
|
292
|
+
* Part 3, answer (c)), counted when present in a compared decision.
|
|
293
|
+
*/
|
|
294
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_INPUTS: readonly ["manual_pin", "policy_pin", "last_account", "rotation_off", "rotation_on", "organization_pool", "personal_pool", "codex_mode_override", "model_policy", "model_filtered", "plan_excluded", "model_cooldown", "exhausted", "unknown_quota", "compaction_lock", "lease_reused", "truncated"];
|
|
295
|
+
export type SubscriptionCoreShadowProvider = (typeof SUBSCRIPTION_CORE_SHADOW_PROVIDERS)[number];
|
|
296
|
+
export type SubscriptionCoreShadowParity = (typeof SUBSCRIPTION_CORE_SHADOW_PARITY)[number];
|
|
297
|
+
export type SubscriptionCoreShadowPlacement = (typeof SUBSCRIPTION_CORE_SHADOW_PLACEMENTS)[number];
|
|
298
|
+
export type SubscriptionCoreShadowSkip = (typeof SUBSCRIPTION_CORE_SHADOW_SKIPS)[number];
|
|
299
|
+
export type SubscriptionCoreShadowInput = (typeof SUBSCRIPTION_CORE_SHADOW_INPUTS)[number];
|
|
300
|
+
export type SubscriptionCoreShadowObservation = {
|
|
301
|
+
outcome: "skipped";
|
|
302
|
+
reason: SubscriptionCoreShadowSkip;
|
|
303
|
+
} | {
|
|
304
|
+
outcome: "compared";
|
|
305
|
+
parity: SubscriptionCoreShadowParity;
|
|
306
|
+
/** The first reason the legacy account is outside the eligible set. */
|
|
307
|
+
parityReason: string | null;
|
|
308
|
+
placement: SubscriptionCoreShadowPlacement;
|
|
309
|
+
violations: readonly string[];
|
|
310
|
+
inputs: readonly SubscriptionCoreShadowInput[];
|
|
311
|
+
};
|
|
312
|
+
/** First reasons a legacy account is outside the eligible set (policy ineligibility). */
|
|
313
|
+
export declare const SUBSCRIPTION_CORE_SHADOW_PARITY_REASONS: readonly ["provider_disabled", "organization_accounts_off", "out_of_scope", "personal_connections_disabled", "personal_owner_inactive", "personal_not_owners_work", "personal_authority_missing", "unhealthy", "allocator_disabled", "wrong_provider", "model_unknown", "model_not_allowed_by_workspace", "model_not_entitled", "model_not_allowed_by_connection", "model_cooling_down", "exhausted"];
|
|
314
|
+
export declare function recordSubscriptionCoreShadow(observability: Pick<Observability, "incrementCounter" | "observeHistogram">, provider: SubscriptionCoreShadowProvider, observation: SubscriptionCoreShadowObservation, durationSeconds: number): void;
|
|
315
|
+
/** A shadow load that outlived its slot ceiling; its slot was given back. */
|
|
316
|
+
export declare function recordSubscriptionCoreShadowStuckLoad(observability: Pick<Observability, "incrementCounter">, provider: SubscriptionCoreShadowProvider): void;
|
|
317
|
+
/** Idle browser/desktop release inspections by fixed outcome: `checkpointing`
|
|
318
|
+
* (idle browser saves prepared), `released` (holders released without a save). */
|
|
319
|
+
export declare function recordSandboxIdleInteractionRelease(observability: Observability, outcome: IdleInteractionInspection): void;
|
|
320
|
+
export declare function recordSandboxCommandContainment(observability: Observability, outcome: SandboxCommandContainmentOutcome): void;
|
|
321
|
+
/** Only call after the exact draining->cold commit reports wentCold. The
|
|
322
|
+
* backend is validated against the closed contract so provider IDs and other
|
|
323
|
+
* per-sandbox values can never become metric labels. */
|
|
324
|
+
export declare function recordSandboxProviderMissingBeforeCapture(observability: Observability, backend: string): void;
|
|
325
|
+
/** Host workspace directory outcome after a Docker drain's exact-container
|
|
326
|
+
* teardown (`retained` means the directory stays on disk). */
|
|
327
|
+
export declare function recordSandboxDockerWorkspaceRelease(observability: Observability, status: "released" | "already_released" | "retained"): void;
|
|
328
|
+
export declare function recordSandboxRecoveryObservationGauges(observability: Observability, observations: {
|
|
329
|
+
providerLosses: number;
|
|
330
|
+
fallbackSelections: number;
|
|
331
|
+
freshWorkspaceSelections?: number;
|
|
332
|
+
}): void;
|
|
333
|
+
/** Fixed outcomes for a committed automatic continuity decision after
|
|
334
|
+
* definitive managed-provider loss: a singleton checkpoint (`selected`), a
|
|
335
|
+
* shared-group checkpoint (`selected_shared`), or a new empty workspace
|
|
336
|
+
* (`fresh_workspace`). Call only after the durable authorization committed. */
|
|
337
|
+
export declare const SANDBOX_AUTOMATIC_RECOVERY_OUTCOMES: readonly ["selected", "selected_shared", "fresh_workspace"];
|
|
338
|
+
export type SandboxAutomaticRecoveryOutcome = (typeof SANDBOX_AUTOMATIC_RECOVERY_OUTCOMES)[number];
|
|
339
|
+
export declare function sandboxAutomaticRecoveryOutcome(input: {
|
|
340
|
+
lane: "checkpoint" | "fresh_workspace";
|
|
341
|
+
groupSessionCount: number;
|
|
342
|
+
}): SandboxAutomaticRecoveryOutcome;
|
|
343
|
+
export declare function recordSandboxAutomaticRecoverySelected(observability: Observability, backend: string, outcome: SandboxAutomaticRecoveryOutcome): void;
|
|
344
|
+
/** How long live boxes have held changes no checkpoint covers yet. */
|
|
345
|
+
export declare function recordSandboxCheckpointStalenessGauges(observability: Observability, staleness: {
|
|
346
|
+
dirty: number;
|
|
347
|
+
stale4h: number;
|
|
348
|
+
stale12h: number;
|
|
349
|
+
maxAgeSeconds: number;
|
|
350
|
+
}): void;
|
|
188
351
|
export declare function recordSandboxRotationBacklogGauges(observability: Observability, backlog: {
|
|
189
352
|
requested: number;
|
|
190
353
|
overdue: number;
|
|
@@ -205,10 +368,56 @@ export declare function recordExpiredDrainingSandboxLeaseGauges(observability: O
|
|
|
205
368
|
ageBucket: string;
|
|
206
369
|
count: number;
|
|
207
370
|
}>): void;
|
|
208
|
-
export declare const RETAINED_PROCESS_RECONCILIATION_OUTCOMES: readonly ["claim_failed", "proof_exited", "proof_lost", "proof_checkpoint_failed", "settled_exited", "settled_lost", "settlement_failed", "identity_mismatch", "resume_state_missing", "backend_unsupported", "provider_running", "provider_unknown", "provider_timeout", "provider_error", "provider_binding_missing", "provider_binding_mismatch", "provider_binding_adopted", "process_observation_unavailable", "quarantined_process_observation_unavailable", "quarantined_binding_missing", "quarantined_binding_mismatch", "defer_failed"];
|
|
371
|
+
export declare const RETAINED_PROCESS_RECONCILIATION_OUTCOMES: readonly ["claim_failed", "background_recovered", "proof_exited", "proof_lost", "proof_checkpoint_failed", "settled_exited", "settled_lost", "provider_lost_whole_box", "settlement_failed", "identity_mismatch", "resume_state_missing", "backend_unsupported", "provider_running", "provider_unknown", "provider_timeout", "provider_error", "provider_binding_missing", "provider_binding_mismatch", "provider_binding_adopted", "process_observation_unavailable", "quarantined_process_observation_unavailable", "quarantined_binding_missing", "quarantined_binding_mismatch", "defer_failed"];
|
|
209
372
|
export type RetainedProcessReconciliationOutcome = (typeof RETAINED_PROCESS_RECONCILIATION_OUTCOMES)[number];
|
|
210
373
|
export declare function recordRetainedProcessReconciliation(observability: Observability, outcome: RetainedProcessReconciliationOutcome): void;
|
|
211
374
|
export declare function recordCreditMicros(observability: Observability | undefined, kind: CreditMicrosKind, amountMicros: number): void;
|
|
375
|
+
/** Who pays the upstream provider for the call. */
|
|
376
|
+
export type ModelUsagePayer = "deployment" | "external";
|
|
377
|
+
export declare function boundedModelMetricLabel(observability: Observability, model: string): string;
|
|
378
|
+
/**
|
|
379
|
+
* One authoritative model response, by provider and catalog model. Recorded
|
|
380
|
+
* behind the same durable usage-event fence as the provider-only cache metrics,
|
|
381
|
+
* so a duplicate or late response is not counted twice.
|
|
382
|
+
* - `opengeni_model_responses_total{provider,model,priced}` — responses with
|
|
383
|
+
* reported usage; `priced="false"` means no provider cost estimate exists.
|
|
384
|
+
* - `opengeni_model_tokens_total{provider,model,type}` — `input` (all prompt
|
|
385
|
+
* tokens, including cached and cache-write), `cached_input` and
|
|
386
|
+
* `cache_write` (subsets of `input`), `output`, and `reasoning` (a subset
|
|
387
|
+
* of `output`).
|
|
388
|
+
* - `opengeni_model_provider_cost_micros_total{provider,model,payer,pricing_source}`
|
|
389
|
+
* — estimated upstream cost in USD micros: configured list price, or the
|
|
390
|
+
* gateway-reported cost. `payer="external"` is a customer-paid subscription
|
|
391
|
+
* or key, so that cost is a list-price equivalent Opengeni does not pay.
|
|
392
|
+
*/
|
|
393
|
+
export declare function recordModelResponseUsage(observability: Observability, input: {
|
|
394
|
+
provider: string;
|
|
395
|
+
model: string;
|
|
396
|
+
payer: ModelUsagePayer;
|
|
397
|
+
tokens: {
|
|
398
|
+
inputTokens: number | null;
|
|
399
|
+
cachedTokens: number | null;
|
|
400
|
+
cacheWriteTokens: number | null;
|
|
401
|
+
outputTokens: number | null;
|
|
402
|
+
reasoningTokens: number | null;
|
|
403
|
+
};
|
|
404
|
+
estimatedProviderCostMicros: number | null;
|
|
405
|
+
pricingSource: "configured_list_price" | "gateway_reported" | null;
|
|
406
|
+
webSearchRequests?: number;
|
|
407
|
+
}): void;
|
|
408
|
+
/**
|
|
409
|
+
* Credits actually debited for one model response, recorded once when the
|
|
410
|
+
* ledger row is inserted (an idempotent replay debits 0 and records nothing).
|
|
411
|
+
* `funding="promotional"` is the part paid by scoped promotional grants
|
|
412
|
+
* (verified-signup trial, scoped coupon offers); `funding="general"` is the
|
|
413
|
+
* rest, paid from general credit: purchased credits plus any unscoped grant.
|
|
414
|
+
*/
|
|
415
|
+
export declare function recordModelCreditsCharged(observability: Observability | undefined, input: {
|
|
416
|
+
provider: string;
|
|
417
|
+
model: string;
|
|
418
|
+
debitedMicros: number;
|
|
419
|
+
grantDebitedMicros: number;
|
|
420
|
+
}): void;
|
|
212
421
|
/**
|
|
213
422
|
* Record provider lifecycle diagnostics from the synchronous transport observer.
|
|
214
423
|
* Provider ids come from the resolved provider registry; phase/outcome are closed
|
|
@@ -220,7 +429,7 @@ export declare function recordModelRequestPhase(observability: Observability, in
|
|
|
220
429
|
outcome?: "completed" | "failed" | "timed_out";
|
|
221
430
|
durationSeconds: number;
|
|
222
431
|
}): void;
|
|
223
|
-
export type TurnStartupPhase = "claim_and_policy" | "turn_start_settlement" | "credential_selection" | "runtime_preparation" | "sandbox_establish" | "file_resolution" | "tool_context_preparation" | "tool_preparation" | "tool_server_construction" | "tool_required_connect" | "tool_optional_connect" | "tool_attempt_catalog_build" | "tool_attempt_catalog_persist" | "tool_workspace_gateway_catalog_build" | "post_tool_preparation" | "agent_construction" | "post_agent_preparation" | "file_materialization" | "history_preparation" | "history_system_update_load" | "history_current_attachment_resolution" | "history_durable_history_load" | "history_sandbox_envelope_load" | "history_canonical_projection" | "history_provider_projection" | "history_attachment_ref_projection" | "history_screenshot_materialization" | "history_model_attachment_projection" | "history_runtime_input_assembly" | "history_artifact_candidate_scan" | "history_generated_image_materialization" | "history_position_load" | "owned_sandbox_setup" | "runtime_stream_initialization" | "model_request_preparation" | "model_sdk_serialization" | "model_prepare_sandbox_agent_preparation" | "model_prepare_sandbox_agent_manifest_inventory" | "model_prepare_sandbox_session_manifest_inventory" | "model_prepare_sandbox_manifest_apply" | "model_prepare_sandbox_entry_materialization" | "model_prepare_sandbox_running_check" | "model_prepare_sandbox_start" | "model_prepare_sandbox_client_create" | "model_prepare_sandbox_client_resume" | "model_prepare_sandbox_client_delete" | "model_prepare_sandbox_client_state_serialize" | "model_prepare_sandbox_client_reuse_check" | "model_prepare_sandbox_workspace_mutation_admission" | "model_prepare_sandbox_workspace_mutation_provider" | "model_prepare_sandbox_workspace_mutation_settlement" | "model_prepare_sandbox_first_routed_resolution_other" | "model_prepare_sandbox_first_routed_mutation_admission" | "model_prepare_sandbox_first_routed_provider_operation" | "model_prepare_sandbox_first_routed_mutation_settlement" | "model_prepare_sandbox_first_routed_other" | "model_prepare_sandbox_snapshot_wait" | "model_prepare_runner_before_first_sandbox_operation" | "model_prepare_sdk_after_first_sandbox_operation" | "model_prepare_runner_before_mcp_tools" | "model_prepare_mcp_tools_snapshot" | "model_prepare_mcp_tools_before_input_filter" | "model_prepare_mcp_tools_before_repository_skill_discovery" | "model_prepare_repository_skill_discovery" | "model_prepare_repository_skill_discovery_before_input_filter" | "model_prepare_input_filter_base" | "model_prepare_input_filter_genesis" | "model_prepare_input_filter_host" | "model_prepare_input_filter_tool_output" | "model_prepare_input_filter_modality" | "model_prepare_input_filter_context" | "model_prepare_responses_input_conversion" | "model_prepare_responses_request_build" | "model_credential_resolution" | "model_wire_normalization" | "model_request_audit" | "stream_bootstrap";
|
|
432
|
+
export type TurnStartupPhase = "services_initialization" | "claim_catalog_read" | "claim_atomic" | "claim_session_read" | "claim_capability_settings" | "learning_policy_freeze" | "attachment_authority_projection" | "claim_and_policy" | "turn_start_settlement" | "credential_selection" | "runtime_preparation" | "session_mcp_settings" | "sandbox_establish" | "file_resolution" | "tool_context_preparation" | "tool_preparation" | "tool_server_construction" | "tool_required_connect" | "tool_optional_connect" | "tool_attempt_catalog_build" | "tool_attempt_catalog_persist" | "tool_workspace_gateway_catalog_build" | "post_tool_preparation" | "agent_construction" | "post_agent_preparation" | "file_materialization" | "history_preparation" | "history_system_update_load" | "history_current_attachment_resolution" | "history_durable_history_load" | "history_sandbox_envelope_load" | "history_canonical_projection" | "history_provider_projection" | "history_attachment_ref_projection" | "history_screenshot_materialization" | "history_model_attachment_projection" | "history_runtime_input_assembly" | "history_artifact_candidate_scan" | "history_generated_image_materialization" | "history_position_load" | "owned_sandbox_setup" | "runtime_stream_initialization" | "model_request_preparation" | "model_sdk_serialization" | "model_prepare_sandbox_agent_preparation" | "model_prepare_sandbox_agent_manifest_inventory" | "model_prepare_sandbox_session_manifest_inventory" | "model_prepare_sandbox_manifest_apply" | "model_prepare_sandbox_entry_materialization" | "model_prepare_sandbox_running_check" | "model_prepare_sandbox_start" | "model_prepare_sandbox_client_create" | "model_prepare_sandbox_client_resume" | "model_prepare_sandbox_client_delete" | "model_prepare_sandbox_client_state_serialize" | "model_prepare_sandbox_client_reuse_check" | "model_prepare_sandbox_workspace_mutation_admission" | "model_prepare_sandbox_workspace_mutation_provider" | "model_prepare_sandbox_workspace_mutation_settlement" | "model_prepare_sandbox_first_routed_resolution_other" | "model_prepare_sandbox_first_routed_mutation_admission" | "model_prepare_sandbox_first_routed_provider_operation" | "model_prepare_sandbox_first_routed_mutation_settlement" | "model_prepare_sandbox_first_routed_other" | "model_prepare_sandbox_snapshot_wait" | "model_prepare_runner_before_first_sandbox_operation" | "model_prepare_sdk_after_first_sandbox_operation" | "model_prepare_runner_before_mcp_tools" | "model_prepare_mcp_tools_snapshot" | "model_prepare_mcp_tools_before_input_filter" | "model_prepare_mcp_tools_before_repository_skill_discovery" | "model_prepare_repository_skill_discovery" | "model_prepare_repository_skill_discovery_before_input_filter" | "model_prepare_input_filter_base" | "model_prepare_input_filter_genesis" | "model_prepare_input_filter_host" | "model_prepare_input_filter_tool_output" | "model_prepare_input_filter_modality" | "model_prepare_input_filter_context" | "model_prepare_responses_input_conversion" | "model_prepare_responses_request_build" | "model_credential_resolution" | "model_wire_normalization" | "model_request_audit" | "stream_bootstrap";
|
|
224
433
|
export type TurnStartupOutcome = "completed" | "failed";
|
|
225
434
|
export type TurnStartupMilestone = "queue" | "provider_dispatch" | "first_byte";
|
|
226
435
|
export type TurnStartupCache = "hit" | "miss" | "disabled" | "none";
|
|
@@ -249,6 +458,9 @@ export declare function recordTurnStartupPhase(observability: Observability, inp
|
|
|
249
458
|
/** Trace-only lookup for the completed claim while its execution root is still open. */
|
|
250
459
|
executionCorrelationId?: string;
|
|
251
460
|
}): void;
|
|
461
|
+
/** Observe an existing dependency only. Child intervals can overlap and are
|
|
462
|
+
* not additive; observer failure must never change authority or error identity. */
|
|
463
|
+
export declare function measureTurnStartupPhase<T>(observability: Observability, input: Omit<Parameters<typeof recordTurnStartupPhase>[1], "durationSeconds" | "outcome">, work: () => Promise<T>): Promise<T>;
|
|
252
464
|
/** Background MCP preparation must not inflate startup phase distributions. */
|
|
253
465
|
export declare function recordToolPreparationPhase(observability: Observability, input: ToolPreparationPhaseMeasurement & {
|
|
254
466
|
provider: string;
|
|
@@ -308,22 +520,35 @@ export declare function recordTurnStartupMilestone(observability: Observability,
|
|
|
308
520
|
durationSeconds: number;
|
|
309
521
|
}): void;
|
|
310
522
|
export type StreamDeltaClass = "message" | "reasoning";
|
|
523
|
+
/** First streamed content of a provider response. `any` is the first reasoning
|
|
524
|
+
* or answer delta; `text` is the first answer-text delta. They overlap — never
|
|
525
|
+
* sum across `content`. */
|
|
526
|
+
export type ProviderFirstContent = "any" | "text";
|
|
311
527
|
/**
|
|
312
|
-
* Per-
|
|
313
|
-
*
|
|
528
|
+
* Per-stream timing tracker fed every normalized runtime event in push order,
|
|
529
|
+
* plus two producer-side hooks. It separates OUR latency from the PROVIDER's:
|
|
314
530
|
*
|
|
315
|
-
* - `opengeni_stream_ttft_seconds{provider}` —
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
531
|
+
* - `opengeni_stream_ttft_seconds{provider}` — user-perceived (re)start latency:
|
|
532
|
+
* time from a stream start / structural boundary (tool call, tool result,
|
|
533
|
+
* completed message, usage frame) to the first streamed content delta. It
|
|
534
|
+
* mixes our between-call work with provider time; keep it for the absolute
|
|
535
|
+
* dashboard view, not for provider alerting.
|
|
536
|
+
* - `opengeni_model_request_pre_dispatch_seconds{provider}` — OUR per-request
|
|
537
|
+
* latency: SDK model entry (the first admission check) to the literal
|
|
538
|
+
* provider dispatch. Covers admission, the durable history checkpoint,
|
|
539
|
+
* credit revalidation, the durable request audit and request build.
|
|
540
|
+
* - `opengeni_model_provider_ttft_seconds{provider,content}` — the PROVIDER's
|
|
541
|
+
* latency: literal dispatch to the first streamed `any` (reasoning or text)
|
|
542
|
+
* delta and to the first answer `text` delta. Includes network, provider
|
|
543
|
+
* queueing, prompt prefill and reasoning before the first streamed token.
|
|
321
544
|
* - `opengeni_stream_inter_delta_gap_seconds{provider,class}` — gap between
|
|
322
|
-
* consecutive content deltas of the SAME class
|
|
323
|
-
*
|
|
324
|
-
* measures only the choppiness of a live token stream.
|
|
545
|
+
* consecutive content deltas of the SAME class, reset at every structural
|
|
546
|
+
* event so a gap never spans a tool call or a model boundary.
|
|
325
547
|
*
|
|
326
|
-
*
|
|
548
|
+
* Dispatch timing deliberately survives structural events: the consumer may
|
|
549
|
+
* still be persisting the previous response's tool results when the producer
|
|
550
|
+
* dispatches the next request, but the next request's first delta always
|
|
551
|
+
* follows its own dispatch. Purely observational and clock-injectable.
|
|
327
552
|
*/
|
|
328
553
|
export declare class StreamTimingMetrics {
|
|
329
554
|
private readonly observability;
|
|
@@ -332,11 +557,20 @@ export declare class StreamTimingMetrics {
|
|
|
332
557
|
private ttftAnchor;
|
|
333
558
|
private ttftArmed;
|
|
334
559
|
private readonly lastDeltaAt;
|
|
560
|
+
private modelEntryAt;
|
|
561
|
+
private dispatchedAt;
|
|
562
|
+
private readonly providerFirstRecorded;
|
|
335
563
|
constructor(observability: Observability, options: {
|
|
336
564
|
provider: string;
|
|
337
565
|
now?: () => number;
|
|
338
566
|
});
|
|
567
|
+
/** Producer side: the SDK entered a model request (first admission check).
|
|
568
|
+
* Admission can be re-entered for the same request; keep the earliest. */
|
|
569
|
+
onModelRequestEntry(): void;
|
|
570
|
+
/** Producer side: request bytes are about to leave this process. */
|
|
571
|
+
onProviderDispatch(): void;
|
|
339
572
|
onEvent(type: SessionEventType): void;
|
|
573
|
+
private observeProviderFirst;
|
|
340
574
|
}
|
|
341
575
|
/** Flush shape of the streaming batcher: how many events coalesced into one flush
|
|
342
576
|
* (the coalescing win) and how long that flush took (append + publish). */
|
|
@@ -422,4 +656,39 @@ export declare function modelCallAccountContext(input: {
|
|
|
422
656
|
servingAccountHash: string;
|
|
423
657
|
accountChangedFromPrevCall: boolean;
|
|
424
658
|
};
|
|
659
|
+
export type CodeSearchCallOutcome = "completed" | "jev_unavailable" | "jev_rejected" | "workspace_unavailable" | "invalid_arguments" | "breaker_open" | "cancelled" | "failed";
|
|
660
|
+
/** One `code_search` tool call: outcome, wall time and the Jev work it used. */
|
|
661
|
+
export declare function recordCodeSearchCall(observability: Observability, input: {
|
|
662
|
+
outcome: CodeSearchCallOutcome;
|
|
663
|
+
durationSeconds: number;
|
|
664
|
+
jevRequests: number;
|
|
665
|
+
jevCostUsd: number;
|
|
666
|
+
}): void;
|
|
667
|
+
/**
|
|
668
|
+
* One skill_read call. Labels are closed sets: `skill` is a built-in id or
|
|
669
|
+
* `custom` for every other Skill, so tenant Skill ids, names, and requested
|
|
670
|
+
* identifiers never become labels. `source` is `unknown` when the read was
|
|
671
|
+
* refused before a Skill resolved.
|
|
672
|
+
*/
|
|
673
|
+
export declare function recordSkillRead(observability: Observability, read: {
|
|
674
|
+
caller: "model" | "codemode";
|
|
675
|
+
kind: SkillReadKind;
|
|
676
|
+
source: SkillUseSource | null;
|
|
677
|
+
/** The resolved Skill id, or the requested identifier when none resolved. */
|
|
678
|
+
skill: string;
|
|
679
|
+
}): void;
|
|
680
|
+
/**
|
|
681
|
+
* One skill_checkout call. Labels are closed sets and never carry Skill ids,
|
|
682
|
+
* names, or paths. Phases that did not run are not observed.
|
|
683
|
+
*/
|
|
684
|
+
export declare function recordSkillCheckout(observability: Observability, checkout: {
|
|
685
|
+
outcome: "written" | "unchanged" | "refused" | "failed";
|
|
686
|
+
selection: "all" | "paths";
|
|
687
|
+
written: number;
|
|
688
|
+
unchanged: number;
|
|
689
|
+
resolveSeconds: number | null;
|
|
690
|
+
sandboxSeconds: number | null;
|
|
691
|
+
writeSeconds: number | null;
|
|
692
|
+
totalSeconds: number;
|
|
693
|
+
}): void;
|
|
425
694
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OnePasswordVaultProviderFactory } from "@opengeni/core";
|
|
2
|
+
/**
|
|
3
|
+
* Loads the 1Password adapter (and its ~14 MB WASM SDK) only when a turn first
|
|
4
|
+
* touches a 1Password vault. The only allowed import edge, besides apps/api,
|
|
5
|
+
* is this dynamic one (OP-5, packages/vaults-onepassword/test/import-guard.test.ts).
|
|
6
|
+
*/
|
|
7
|
+
export declare const loadOnePasswordVaultProvider: OnePasswordVaultProviderFactory;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
childCompletionSummary,
|
|
3
|
+
deliverChildLifecycleOutboxToParent,
|
|
4
|
+
deliverChildRequiresActionToParent,
|
|
5
|
+
deliverFailedChildTurnToParent,
|
|
6
|
+
notifyParentOfChildIdle,
|
|
7
|
+
reconcileAutomaticSessionTitleFanout,
|
|
8
|
+
reconcilePendingParentSystemUpdates,
|
|
9
|
+
reconcilePendingSessionWorkflowWakes,
|
|
10
|
+
repairMissedSessionWorkflowWakes
|
|
11
|
+
} from "./chunk-W2QSM5HR.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
13
|
+
export {
|
|
14
|
+
childCompletionSummary,
|
|
15
|
+
deliverChildLifecycleOutboxToParent,
|
|
16
|
+
deliverChildRequiresActionToParent,
|
|
17
|
+
deliverFailedChildTurnToParent,
|
|
18
|
+
notifyParentOfChildIdle,
|
|
19
|
+
reconcileAutomaticSessionTitleFanout,
|
|
20
|
+
reconcilePendingParentSystemUpdates,
|
|
21
|
+
reconcilePendingSessionWorkflowWakes,
|
|
22
|
+
repairMissedSessionWorkflowWakes
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=parent-wake-PCLH7A3Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -3,7 +3,7 @@ import { type ConnectionCredentialsPort } from "@opengeni/contracts";
|
|
|
3
3
|
import { type Database } from "@opengeni/db";
|
|
4
4
|
/**
|
|
5
5
|
* Build the standalone personal-GitHub credential consumer. It returns only an
|
|
6
|
-
*
|
|
6
|
+
* Opengeni broker bearer: the broad provider OAuth token remains encrypted in
|
|
7
7
|
* the API/database process and never crosses into a sandbox or worker result.
|
|
8
8
|
*/
|
|
9
9
|
export declare function buildPersonalGitHubGitCredentials(db: Database, settings: Settings): NonNullable<ConnectionCredentialsPort["gitCredentials"]> | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared readiness reporting for the dedicated artifact sidecars. Each probe
|
|
3
|
+
* settles independently so `/readyz` names the dependency that actually failed,
|
|
4
|
+
* and a transition log makes a readiness change visible when it happens.
|
|
5
|
+
*/
|
|
6
|
+
export type ReadinessCheckResult = Readonly<{
|
|
7
|
+
ok: true;
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
reason: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type ReadinessChecks = Readonly<Record<string, ReadinessCheckResult>>;
|
|
13
|
+
/** A dedicated database role that can do more than its narrow capability allows. */
|
|
14
|
+
export declare class UnsafeDatabaseRolePostureError extends Error {
|
|
15
|
+
readonly component: string;
|
|
16
|
+
readonly violations: readonly string[];
|
|
17
|
+
constructor(component: string, violations: readonly string[]);
|
|
18
|
+
}
|
|
19
|
+
export declare function readinessFailureReason(error: unknown): string;
|
|
20
|
+
/** Settle one probe; an aborted signal reports a timeout instead of waiting. */
|
|
21
|
+
export declare function settleReadinessCheck(probe: () => Promise<unknown>, signal?: AbortSignal): Promise<ReadinessCheckResult>;
|
|
22
|
+
export declare function readinessChecksOk(checks: ReadinessChecks): boolean;
|
|
23
|
+
export declare function notCheckedReadiness(names: readonly string[]): ReadinessChecks;
|
|
24
|
+
/** The error a failed startup readiness check raises, naming every failing probe. */
|
|
25
|
+
export declare class ReadinessCheckFailedError extends Error {
|
|
26
|
+
readonly checks: ReadinessChecks;
|
|
27
|
+
constructor(component: string, checks: ReadinessChecks);
|
|
28
|
+
}
|
|
29
|
+
export declare function describeFailingChecks(checks: ReadinessChecks): string;
|
|
30
|
+
export type ReadinessTransitionLogger = Readonly<{
|
|
31
|
+
warn(message: string): void;
|
|
32
|
+
info(message: string): void;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Log a readiness change once when it starts, when the failure changes, and when
|
|
36
|
+
* it recovers. Repeated identical probe results stay quiet so a probe polled
|
|
37
|
+
* every few seconds cannot flood the log.
|
|
38
|
+
*/
|
|
39
|
+
export declare function createReadinessTransitionRecorder(component: string, logger: ReadinessTransitionLogger): (checks: ReadinessChecks) => void;
|