@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Database } from "@opengeni/db";
|
|
2
|
-
import { type CompactionItem, type CompactionProviderRejection } from "@opengeni/runtime";
|
|
2
|
+
import { type AnthropicRequestSize, prepareCompactionPromptInput, type CompactionItem, type CompactionProviderRejection } from "@opengeni/runtime";
|
|
3
3
|
import { type Settings } from "@opengeni/config";
|
|
4
4
|
import type { SessionEvent } from "@opengeni/contracts";
|
|
5
5
|
export type MaybeCompactResult = {
|
|
@@ -28,7 +28,12 @@ export type MaybeCompactResult = {
|
|
|
28
28
|
* Codex, call Codex `/codex/responses` with `compaction_trigger` and persist the
|
|
29
29
|
* opaque compaction item. Fail closed — never silently fall back to portable.
|
|
30
30
|
*/
|
|
31
|
-
export type CompactionSummarizer = (settings: Settings, input: CompactionItem[]) => Promise<string
|
|
31
|
+
export type CompactionSummarizer = ((settings: Settings, input: CompactionItem[]) => Promise<string>) & {
|
|
32
|
+
/** Model-visible instructions and tool schemas outside the history estimate. */
|
|
33
|
+
estimatePrefixTokens?: () => number;
|
|
34
|
+
/** Exact provider wire size, with the same projection as the checkpoint call. */
|
|
35
|
+
measureInputBytes?: (settings: Settings, input: CompactionItem[]) => Promise<number>;
|
|
36
|
+
};
|
|
32
37
|
/** Returns the opaque Codex remote compaction v2 item. */
|
|
33
38
|
export type RemoteCompactionV2Requester = (settings: Settings, input: CompactionItem[]) => Promise<CompactionItem>;
|
|
34
39
|
export declare function maybeCompactContext(db: Database, settings: Settings, scope: {
|
|
@@ -60,6 +65,11 @@ export declare function maybeCompactContext(db: Database, settings: Settings, sc
|
|
|
60
65
|
materializeHistory?: (items: CompactionItem[]) => Promise<CompactionItem[]>;
|
|
61
66
|
/** Turn-scoped attachment/modality view; canonical persisted rows stay untouched. */
|
|
62
67
|
projectModelInput?: (items: CompactionItem[]) => Promise<CompactionItem[]>;
|
|
68
|
+
/** A typed pre-dispatch size rejection parks the newest complete work unit. */
|
|
69
|
+
requestSizeRecovery?: {
|
|
70
|
+
maxBytes: number;
|
|
71
|
+
size: AnthropicRequestSize;
|
|
72
|
+
};
|
|
63
73
|
}): Promise<MaybeCompactResult>;
|
|
64
74
|
/**
|
|
65
75
|
* After `compaction.started`, record a visible skip so the timeline cannot
|
|
@@ -86,5 +96,34 @@ export declare function settleFailedContextCompactionLandmark(db: Database, scop
|
|
|
86
96
|
}): Promise<Extract<MaybeCompactResult, {
|
|
87
97
|
compacted: false;
|
|
88
98
|
}>>;
|
|
99
|
+
/**
|
|
100
|
+
* After `compaction.started`, record that the checkpoint request was cut short
|
|
101
|
+
* by the attempt's own cancellation (graceful worker shutdown, or any other
|
|
102
|
+
* activity cancellation) rather than by a provider or summarizer failure.
|
|
103
|
+
*
|
|
104
|
+
* Unlike {@link settleFailedContextCompactionLandmark}, this never consumes an
|
|
105
|
+
* operator `/compact` request: the recovered attempt of the same turn
|
|
106
|
+
* re-evaluates, exactly as when a Pause has already fenced the attempt. A
|
|
107
|
+
* fence rejection is not an error here: the control that closed the attempt
|
|
108
|
+
* owns the outcome, so the caller's cancellation must keep propagating.
|
|
109
|
+
*/
|
|
110
|
+
export declare function settleInterruptedContextCompactionLandmark(db: Database, scope: {
|
|
111
|
+
accountId: string;
|
|
112
|
+
workspaceId: string;
|
|
113
|
+
sessionId: string;
|
|
114
|
+
turnId: string;
|
|
115
|
+
executionGeneration: number;
|
|
116
|
+
attemptId: string;
|
|
117
|
+
}, options?: {
|
|
118
|
+
publishLiveEvents?: (events: SessionEvent[]) => Promise<void>;
|
|
119
|
+
}): Promise<{
|
|
120
|
+
recorded: boolean;
|
|
121
|
+
events: SessionEvent[];
|
|
122
|
+
}>;
|
|
123
|
+
export declare function summarizeWithCodexOverflowTrimming(summarize: CompactionSummarizer, settings: Settings, activeHistory: CompactionItem[]): Promise<{
|
|
124
|
+
summaryBody: string;
|
|
125
|
+
preparation: ReturnType<typeof prepareCompactionPromptInput>;
|
|
126
|
+
providerCalls: number;
|
|
127
|
+
}>;
|
|
89
128
|
export declare function isContextWindowExceeded(error: unknown, seen?: WeakSet<object>): boolean;
|
|
90
129
|
export declare function isExactContextLengthExceeded(error: unknown, seen?: WeakSet<object>): boolean;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { type Settings } from "@opengeni/config";
|
|
2
2
|
import { type ConnectionCredentialsPort, type GitCredentialProvider, type GitCredentialRepositoryRef, type GitCredentialTransport, type ResourceRef, type SessionTurn, type TurnInitiator, type TurnInitiatorContext } from "@opengeni/contracts";
|
|
3
3
|
import { type SandboxCodemodeAuthority } from "@opengeni/runtime/sandbox";
|
|
4
|
-
import { loadVariableSetForRun as loadWorkspaceEnvironmentForRunFromDb, type Database, type VariableSetForRun as WorkspaceEnvironmentForRun } from "@opengeni/db";
|
|
5
|
-
export { loadWorkspaceEnvironmentForRunFromDb as loadWorkspaceEnvironmentForRun, type WorkspaceEnvironmentForRun, };
|
|
6
4
|
export type ConnectionScope = {
|
|
7
5
|
accountId: string;
|
|
8
6
|
workspaceId: string;
|
|
9
7
|
};
|
|
10
|
-
export type VariableSetCredentialAuthority = {
|
|
11
|
-
sessionId: string;
|
|
12
|
-
turnId: string;
|
|
13
|
-
attemptId: string;
|
|
14
|
-
executionGeneration: number;
|
|
15
|
-
initiator: TurnInitiator;
|
|
16
|
-
initiatingHumanSubjectId: string | null;
|
|
17
|
-
};
|
|
18
8
|
export type GitTokenSeeds = Partial<Record<GitCredentialProvider, string>>;
|
|
19
9
|
export type GitTokenExpiries = Partial<Record<GitCredentialProvider, string>>;
|
|
20
10
|
export type GitCredentialBindingSeed = {
|
|
@@ -60,15 +50,7 @@ type RunGitCredentialOptions = {
|
|
|
60
50
|
personalGitHubCredentials?: ConnectionCredentialsPort["gitCredentials"];
|
|
61
51
|
authorizeGitHubTokenMint?: GitHubTokenMintAuthorization;
|
|
62
52
|
};
|
|
63
|
-
export declare function
|
|
64
|
-
/**
|
|
65
|
-
* Exact accepted scheduled-occurrence generation for this Variable Set,
|
|
66
|
-
* resolved by the caller from the immutable run snapshot; null/omitted for
|
|
67
|
-
* ordinary live turns.
|
|
68
|
-
*/
|
|
69
|
-
expectedGeneration?: number | null;
|
|
70
|
-
}): Promise<WorkspaceEnvironmentForRun | null>;
|
|
71
|
-
export declare function sandboxEnvironmentForRun(settings: Settings, resources: ResourceRef[], workspaceEnvironment?: Record<string, string>, options?: RunGitCredentialOptions & {
|
|
53
|
+
export declare function sandboxEnvironmentForRun(settings: Settings, resources: ResourceRef[], options?: RunGitCredentialOptions & {
|
|
72
54
|
skipGitHubToken?: boolean;
|
|
73
55
|
/**
|
|
74
56
|
* Codemode credential delivery for this attempt. Managed sandboxes receive
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ObjectStorage } from "@opengeni/storage";
|
|
2
|
+
import type { GmailFileMaterializationRequest } from "@opengeni/runtime/gmail-rest-mcp";
|
|
3
|
+
import type { ConnectorAttachmentMaterializer, ConnectorFileMaterializationRequest } from "@opengeni/runtime";
|
|
4
|
+
import type { SandboxChannelAService } from "@opengeni/runtime/sandbox";
|
|
5
|
+
/** Use the selected filesystem namespace, retaining descriptor confinement and
|
|
6
|
+
* one extra byte to distinguish a complete exact-limit input from truncation. */
|
|
7
|
+
export declare function readGmailFileFromChannel(channel: Pick<SandboxChannelAService, "fsRead">, request: {
|
|
8
|
+
path: string;
|
|
9
|
+
maxBytes: number;
|
|
10
|
+
}): Promise<Uint8Array>;
|
|
11
|
+
type ConnectorFileMaterializationOptions = {
|
|
12
|
+
workspaceId: string;
|
|
13
|
+
storage: ObjectStorage;
|
|
14
|
+
downloadStorage: ObjectStorage;
|
|
15
|
+
materialize: ConnectorAttachmentMaterializer;
|
|
16
|
+
onCleanupFailure?: (key: string) => void;
|
|
17
|
+
};
|
|
18
|
+
/** Gmail returns base64url JSON, while the exact filesystem importer consumes
|
|
19
|
+
* byte streams. Stage only inside the worker; no URL or bytes reach a tool result. */
|
|
20
|
+
export declare function materializeGmailFile(request: GmailFileMaterializationRequest, options: ConnectorFileMaterializationOptions): Promise<{
|
|
21
|
+
attachments: {
|
|
22
|
+
providerAttachmentId: {
|
|
23
|
+
provider: string;
|
|
24
|
+
kind: "attachment";
|
|
25
|
+
value: string;
|
|
26
|
+
};
|
|
27
|
+
fileName: string;
|
|
28
|
+
mediaType: string;
|
|
29
|
+
byteSize: number;
|
|
30
|
+
contentSha256: string;
|
|
31
|
+
sandboxPath: string;
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
34
|
+
/** Connectors that buffer provider bytes stage them privately in object
|
|
35
|
+
* storage, then import them as exact connector attachments in the sandbox. */
|
|
36
|
+
export declare function materializeConnectorFile(request: ConnectorFileMaterializationRequest, options: ConnectorFileMaterializationOptions): Promise<{
|
|
37
|
+
attachments: {
|
|
38
|
+
providerAttachmentId: {
|
|
39
|
+
provider: string;
|
|
40
|
+
kind: "attachment";
|
|
41
|
+
value: string;
|
|
42
|
+
};
|
|
43
|
+
fileName: string;
|
|
44
|
+
mediaType: string;
|
|
45
|
+
byteSize: number;
|
|
46
|
+
contentSha256: string;
|
|
47
|
+
sandboxPath: string;
|
|
48
|
+
}[];
|
|
49
|
+
}>;
|
|
50
|
+
export {};
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { type Settings } from "@opengeni/config";
|
|
2
2
|
import { type SessionGoal, type ToolRef } from "@opengeni/contracts";
|
|
3
|
-
import { getWorkspaceModelPolicy } from "@opengeni/db";
|
|
4
3
|
import type { ControlActivityServices, MaybeContinueGoalInput, MaybeContinueGoalResult } from "./types.js";
|
|
4
|
+
export { goalContinuationModelDecision, goalRunBudgetBlocked } from "@opengeni/core";
|
|
5
5
|
export declare function createGoalActivities(services: () => Promise<ControlActivityServices>): {
|
|
6
6
|
enqueueGoalRetryWake: (input: MaybeContinueGoalInput) => Promise<void>;
|
|
7
7
|
maybeContinueGoal: (input: MaybeContinueGoalInput) => Promise<MaybeContinueGoalResult>;
|
|
8
8
|
};
|
|
9
|
-
export declare function goalContinuationModelDecision(input: {
|
|
10
|
-
settings: Settings;
|
|
11
|
-
workspaceModelPolicy: Awaited<ReturnType<typeof getWorkspaceModelPolicy>>;
|
|
12
|
-
inheritedModel: string;
|
|
13
|
-
}): {
|
|
14
|
-
model: string;
|
|
15
|
-
blocked: string | null;
|
|
16
|
-
};
|
|
17
9
|
export declare function goalContinuationFundedWithoutCredits(settings: Settings, model: string, codexBilled: boolean): boolean;
|
|
18
10
|
export declare function goalContinuationPrompt(_goal: SessionGoal, _autoContinuation: number, _cap: number | null, options?: {
|
|
19
11
|
inputWaitAvailable?: boolean;
|
|
@@ -10,12 +10,15 @@ export declare function resolveIncidentTelemetryResponderMetadata(input: {
|
|
|
10
10
|
session: Session | null;
|
|
11
11
|
personalConnectionDelegations: readonly McpPersonalConnectionDelegation[];
|
|
12
12
|
personalResourceAuthoritySubjectId?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* The tools a run that has no session yet will start with; a schedule that
|
|
15
|
+
* follows the workspace defaults resolves them per run.
|
|
16
|
+
*/
|
|
17
|
+
plannedTools?: Session["tools"];
|
|
13
18
|
executionPolicy?: {
|
|
14
19
|
tools: ScheduledTaskRunAcceptedExecution["resolvedTools"];
|
|
15
20
|
firstPartyMcpTools: ScheduledTaskRunAcceptedExecution["resolvedFirstPartyMcpTools"];
|
|
16
21
|
firstPartyMcpPermissions: ScheduledTaskRunAcceptedExecution["resolvedFirstPartyMcpPermissions"] | null;
|
|
17
|
-
variableSetIds?: readonly string[];
|
|
18
|
-
variableSetId: string | null;
|
|
19
22
|
rigId: string | null;
|
|
20
23
|
rigVersionId: string | null;
|
|
21
24
|
toolPolicy: Session["toolPolicy"];
|
|
@@ -13,9 +13,10 @@ export type IncidentTelemetryRigMetadata = {
|
|
|
13
13
|
credentialHooks: readonly string[];
|
|
14
14
|
checkHealth: "passing" | "failing" | "unknown";
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
/** A vault the responder can reach, with its item names (never values). */
|
|
17
|
+
export type IncidentTelemetryVaultMetadata = {
|
|
17
18
|
name: string;
|
|
18
|
-
|
|
19
|
+
items: readonly {
|
|
19
20
|
name: string;
|
|
20
21
|
}[];
|
|
21
22
|
};
|
|
@@ -27,7 +28,13 @@ export type IncidentTelemetryResponderMetadata = {
|
|
|
27
28
|
firstPartyMcpTools: readonly FirstPartyMcpToolName[];
|
|
28
29
|
firstPartyMcpPermissions: readonly Permission[];
|
|
29
30
|
rig: IncidentTelemetryRigMetadata | null;
|
|
30
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Vaults the responder reaches under the task's vault policy. The preflight
|
|
33
|
+
* contract still says "variable set" (`requiredVariableSetNames`,
|
|
34
|
+
* `requiredVariableNames`, route kind `variable_set`): those now name vaults
|
|
35
|
+
* and items, matched case-insensitively.
|
|
36
|
+
*/
|
|
37
|
+
vaults: readonly IncidentTelemetryVaultMetadata[];
|
|
31
38
|
/** Exact durable session policy version, or null for a not-yet-created session. */
|
|
32
39
|
toolPolicyVersion: number | null;
|
|
33
40
|
};
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import type { DocumentServices } from "@opengeni/documents";
|
|
2
2
|
import type { ControlActivityServices } from "./types.js";
|
|
3
|
+
/** The configured monthly indexed-chunk limit, not a provider failure. */
|
|
4
|
+
export declare class KnowledgeIndexUsageLimitError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export type KnowledgeIndexFailureStage = "embedding" | "processing";
|
|
8
|
+
/**
|
|
9
|
+
* Content-free classification for a deferred Knowledge index batch. Only
|
|
10
|
+
* protocol constants, an HTTP status, and a PostgreSQL SQLSTATE are retained;
|
|
11
|
+
* provider messages, bodies, SQL, and identifiers never leave the process.
|
|
12
|
+
* Outside the embedding call, only a PostgreSQL error in the cause chain is
|
|
13
|
+
* attributed to the database; any other failure stays a worker failure.
|
|
14
|
+
*/
|
|
15
|
+
export declare function knowledgeIndexFailureDiagnostic(stage: KnowledgeIndexFailureStage, error: unknown): {
|
|
16
|
+
errorClass: "KnowledgeIndexOperationError";
|
|
17
|
+
errorCode: "knowledge_index_usage_limit_reached" | "knowledge_index_embedding_failed" | "knowledge_index_persistence_failed" | "knowledge_index_failed";
|
|
18
|
+
origin: "worker" | "db";
|
|
19
|
+
status?: number;
|
|
20
|
+
sqlState?: string;
|
|
21
|
+
};
|
|
3
22
|
export declare function createKnowledgeIndexingActivities(services: () => Promise<ControlActivityServices>, resolveDocumentServices?: () => Promise<DocumentServices>): {
|
|
4
23
|
indexKnowledge: () => Promise<{
|
|
5
24
|
completed: number;
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { McpConnectionAccountBinding, ToolRef, ToolAuthNeededPayload } from "@opengeni/contracts";
|
|
3
|
-
import type { ApiIntegrationRuntime } from "@opengeni/db";
|
|
1
|
+
import type { McpConnectionAccountBinding, ToolAuthNeededPayload } from "@opengeni/contracts";
|
|
4
2
|
export declare function accountRouteAuthNeededPayload(payload: ToolAuthNeededPayload, bindings: readonly McpConnectionAccountBinding[] | null | undefined): ToolAuthNeededPayload;
|
|
5
|
-
|
|
6
|
-
* identities, never an alternate way to gain admission to a connector. */
|
|
7
|
-
export declare function expandMcpAccountRoutes(input: {
|
|
8
|
-
settings: Settings;
|
|
9
|
-
tools: ToolRef[];
|
|
10
|
-
bindings: readonly McpConnectionAccountBinding[] | null | undefined;
|
|
11
|
-
}): {
|
|
12
|
-
settings: Settings;
|
|
13
|
-
tools: ToolRef[];
|
|
14
|
-
accountLabels: ReadonlyMap<string, string>;
|
|
15
|
-
};
|
|
16
|
-
/** Each adapter closes over its own immutable credential ref and authority
|
|
17
|
-
* generation. Sharing a provider transport never shares a credential resolver. */
|
|
18
|
-
export declare function expandApiIntegrationAccountRoutes(input: {
|
|
19
|
-
integrations: readonly ApiIntegrationRuntime[];
|
|
20
|
-
bindings: readonly McpConnectionAccountBinding[] | null | undefined;
|
|
21
|
-
tools: readonly ToolRef[];
|
|
22
|
-
}): ApiIntegrationRuntime[];
|
|
3
|
+
export { expandMcpAccountRoutes, expandApiIntegrationAccountRoutes } from "@opengeni/core";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { listWorkspaceIdsAfter, reconcileModelCallFacts } from "@opengeni/db";
|
|
2
|
+
import type { ControlActivityServices } from "./types.js";
|
|
3
|
+
/** Recent charged calls are rechecked on every run; older gaps use the backfill script. */
|
|
4
|
+
export declare const MODEL_CALL_FACT_RECONCILE_LOOKBACK_MS: number;
|
|
5
|
+
/** Skip the newest calls so a live fact write is not raced by its own repair. */
|
|
6
|
+
export declare const MODEL_CALL_FACT_RECONCILE_SETTLE_MS: number;
|
|
7
|
+
export declare const MODEL_CALL_FACT_RECONCILE_WORKSPACE_LIMIT = 500;
|
|
8
|
+
export declare const MODEL_CALL_FACT_RECONCILE_RUN_BUDGET_MS: number;
|
|
9
|
+
export type ReconcileRecentModelCallFactsResult = {
|
|
10
|
+
workspaces: number;
|
|
11
|
+
missing: number;
|
|
12
|
+
repaired: number;
|
|
13
|
+
unrepaired: number;
|
|
14
|
+
/** Workspaces with more missing facts than one bounded pass examines. */
|
|
15
|
+
truncatedWorkspaces: number;
|
|
16
|
+
failedWorkspaces: number;
|
|
17
|
+
budgetExhausted: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type ModelCallFactReconcilerOptions = {
|
|
20
|
+
now?: () => number;
|
|
21
|
+
runBudgetMs?: number;
|
|
22
|
+
startAfterWorkspaceId?: () => string;
|
|
23
|
+
reconcile?: typeof reconcileModelCallFacts;
|
|
24
|
+
listWorkspaces?: typeof listWorkspaceIdsAfter;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Rebuild missing Insights call facts for recently charged model calls. Each
|
|
28
|
+
* workspace pass is bounded and idempotent, one failure never stops the rest,
|
|
29
|
+
* and each run starts at a random workspace so a run that exhausts its budget
|
|
30
|
+
* does not starve the same tail of workspaces every time.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createModelCallFactReconcilerActivities(services: () => Promise<ControlActivityServices>, options?: ModelCallFactReconcilerOptions): {
|
|
33
|
+
reconcileRecentModelCallFacts: () => Promise<ReconcileRecentModelCallFactsResult>;
|
|
34
|
+
};
|
|
@@ -40,7 +40,22 @@ export declare function matchingOpenSuffixCallId(input: {
|
|
|
40
40
|
export declare function resolveOpenSuffixResumeTarget(rows: readonly OpenSuffixPendingToolCall[], callId: string | null): OpenSuffixPendingToolCall | null;
|
|
41
41
|
/** True when the paired call and result already exist in durable history. */
|
|
42
42
|
export declare function openSuffixPairPresentInHistory(items: readonly Record<string, unknown>[], callId: string): boolean;
|
|
43
|
+
export declare function resultItemForOpenSuffixMember(input: {
|
|
44
|
+
agent: Agent<any, any>;
|
|
45
|
+
row: OpenSuffixPendingToolCall;
|
|
46
|
+
trigger: Pick<SessionEvent, "type" | "payload">;
|
|
47
|
+
humanInputResume: {
|
|
48
|
+
requestId: string;
|
|
49
|
+
toolCallId: string;
|
|
50
|
+
response: HumanInputResponse;
|
|
51
|
+
} | null;
|
|
52
|
+
}): Promise<{
|
|
53
|
+
resultItem: Record<string, unknown>;
|
|
54
|
+
eventOutput: unknown;
|
|
55
|
+
}>;
|
|
43
56
|
export declare function settleOpenSuffixResumeIfNeeded(input: {
|
|
57
|
+
additionalApprovals?: unknown[];
|
|
58
|
+
programmaticApprovalAcknowledged?: boolean;
|
|
44
59
|
db: Database;
|
|
45
60
|
agent: Agent<any, any>;
|
|
46
61
|
accountId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Settings } from "@opengeni/config";
|
|
2
2
|
import type { Session, SessionGoal } from "@opengeni/contracts";
|
|
3
|
-
import { claimPendingSessionSystemUpdateOutbox, claimPendingSessionWorkflowWakes, claimAutomaticSessionTitleFanout, markAutomaticSessionTitleFanoutDelivered, markAutomaticSessionTitleFanoutFailed, type Database } from "@opengeni/db";
|
|
3
|
+
import { claimPendingSessionSystemUpdateOutbox, claimPendingSessionWorkflowWakes, repairPendingChildTerminalResultWakes, repairMissingQuiescenceReceiptWakes, claimAutomaticSessionTitleFanout, markAutomaticSessionTitleFanoutDelivered, markAutomaticSessionTitleFanoutFailed, type Database } from "@opengeni/db";
|
|
4
4
|
import { type EventBus } from "@opengeni/events";
|
|
5
5
|
import type { ActivityServices, WakeSessionWorkflowSignal } from "./types.js";
|
|
6
6
|
export type NotifyServices = {
|
|
@@ -15,6 +15,8 @@ export type ReconcileParentSystemUpdateOverrides = Partial<{
|
|
|
15
15
|
}>;
|
|
16
16
|
export type ReconcileSessionWorkflowWakeOverrides = Partial<{
|
|
17
17
|
claimPendingSessionWorkflowWakes: typeof claimPendingSessionWorkflowWakes;
|
|
18
|
+
repairPendingChildTerminalResultWakes: typeof repairPendingChildTerminalResultWakes;
|
|
19
|
+
repairMissingQuiescenceReceiptWakes: typeof repairMissingQuiescenceReceiptWakes;
|
|
18
20
|
}>;
|
|
19
21
|
export type ReconcileAutomaticSessionTitleFanoutOverrides = Partial<{
|
|
20
22
|
claimAutomaticSessionTitleFanout: typeof claimAutomaticSessionTitleFanout;
|
|
@@ -89,18 +91,21 @@ export type WorkflowWakeReconciliationResult = {
|
|
|
89
91
|
action: "pending_admission";
|
|
90
92
|
}>["blocker"], number>>;
|
|
91
93
|
};
|
|
92
|
-
export declare function reconcilePendingSessionWorkflowWakes(svc: NotifyServices, limit?: number, overrides?: ReconcileSessionWorkflowWakeOverrides): Promise<WorkflowWakeReconciliationResult>;
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
95
|
+
* Register durable wakes that a producer committed work for but never woke:
|
|
96
|
+
* pending child results on an idle parent, and recovering sessions still
|
|
97
|
+
* owed a physical-quiescence receipt. Registration is idempotent and lock
|
|
98
|
+
* fenced, writes only when it finds a real repair, and never delivers. The
|
|
99
|
+
* dispatcher activity runs it before claiming, and the worker's maintenance
|
|
100
|
+
* cadence runs it before checking for due wakes, so an idle tick needs no
|
|
101
|
+
* workflow execution to keep this repair cadence.
|
|
99
102
|
*/
|
|
100
|
-
export declare function
|
|
103
|
+
export declare function repairMissedSessionWorkflowWakes(svc: Pick<NotifyServices, "db" | "observability">, limit?: number, overrides?: Pick<ReconcileSessionWorkflowWakeOverrides, "repairPendingChildTerminalResultWakes" | "repairMissingQuiescenceReceiptWakes">): Promise<void>;
|
|
104
|
+
export declare function reconcilePendingSessionWorkflowWakes(svc: NotifyServices, limit?: number, overrides?: ReconcileSessionWorkflowWakeOverrides): Promise<WorkflowWakeReconciliationResult>;
|
|
101
105
|
/**
|
|
102
|
-
* The
|
|
103
|
-
*
|
|
104
|
-
*
|
|
106
|
+
* The short status line for one child (what happened + its goal). It is also
|
|
107
|
+
* the timeline preview, so it carries no instructions: the parent reads the
|
|
108
|
+
* child's answer from the typed payload, and the operational contract says how
|
|
109
|
+
* to use it. N completions coalesce into one internal-update inference.
|
|
105
110
|
*/
|
|
106
|
-
export declare function
|
|
111
|
+
export declare function childCompletionSummary(child: Session, goal: SessionGoal | null, terminalStatus: "idle" | "failed"): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CodemodeOperation } from "@opengeni/contracts";
|
|
2
|
+
/** Programmatic receipts are not open SDK calls. Exact arguments stay in protected storage. */
|
|
3
|
+
export declare function programmaticApproval(operation: CodemodeOperation): {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
source: "codemode";
|
|
7
|
+
operationId: string;
|
|
8
|
+
requestId: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function programmaticContinuationNote(operations: readonly CodemodeOperation[]): string | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Neutral model-facing text for history media the current requester's file
|
|
3
|
+
* authority excludes, for example another participant's private file in a
|
|
4
|
+
* shared session. Authority exclusion and real unavailability stay
|
|
5
|
+
* indistinguishable, and there is no fetch instruction that would fail and
|
|
6
|
+
* lead the model to report the file as deleted.
|
|
7
|
+
*/
|
|
8
|
+
export declare function requesterUnavailableReceiptText(subject: string, noun: "file" | "image"): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RetainedArtifactMetadata, type RetainedOutputUnavailableReason } from "@opengeni/contracts";
|
|
1
|
+
import { type RetainedArtifactMetadata, type RetainedOutputUnavailableReason, type RetainedSessionScreenshotKind } from "@opengeni/contracts";
|
|
2
2
|
import { type Database } from "@opengeni/db";
|
|
3
3
|
import { type ObjectStorage } from "@opengeni/storage";
|
|
4
4
|
export type TypedScreenshotToolOutput = {
|
|
@@ -68,6 +68,7 @@ export declare function retainedScreenshotIdentity(input: {
|
|
|
68
68
|
attemptId: string;
|
|
69
69
|
toolCallId: string;
|
|
70
70
|
toolOutputId: string;
|
|
71
|
+
kind?: RetainedSessionScreenshotKind | undefined;
|
|
71
72
|
}): {
|
|
72
73
|
artifactId: string;
|
|
73
74
|
settlementKey: string;
|
|
@@ -80,8 +81,9 @@ export declare function unavailableRetainedSessionImage(input: {
|
|
|
80
81
|
toolCallId: string;
|
|
81
82
|
toolOutputId: string;
|
|
82
83
|
reason: RetainedOutputUnavailableReason;
|
|
84
|
+
kind?: RetainedSessionScreenshotKind | undefined;
|
|
83
85
|
}): RetainedArtifactMetadata;
|
|
84
|
-
export declare function
|
|
86
|
+
export declare function retainSessionScreenshot(input: {
|
|
85
87
|
db: Database;
|
|
86
88
|
objectStorage: ObjectStorage | null;
|
|
87
89
|
accountId: string;
|
|
@@ -90,10 +92,13 @@ export declare function retainComputerScreenshot(input: {
|
|
|
90
92
|
turnId: string;
|
|
91
93
|
attemptId: string;
|
|
92
94
|
output: TypedScreenshotToolOutput;
|
|
95
|
+
kind?: RetainedSessionScreenshotKind | undefined;
|
|
93
96
|
now?: Date;
|
|
94
97
|
retentionMs?: number;
|
|
95
98
|
workspaceQuotaBytes?: number;
|
|
96
99
|
}): Promise<RetainedArtifactMetadata>;
|
|
100
|
+
/** Existing computer callers keep their stable entry point. */
|
|
101
|
+
export declare const retainComputerScreenshot: typeof retainSessionScreenshot;
|
|
97
102
|
/** Replace only new screenshot bytes with a compact receipt before first persistence. */
|
|
98
103
|
export declare function compactRetainedScreenshotHistory(history: Array<Record<string, unknown>>, receiptsByCallId: ReadonlyMap<string, RetainedArtifactMetadata>): Array<Record<string, unknown>>;
|
|
99
104
|
/** Collect durable screenshot receipts before their provider-only expansion. */
|
|
@@ -22,6 +22,7 @@ export type RunCredentialRenewalOptions = {
|
|
|
22
22
|
errorClass: "RunCredentialRenewalOperationError";
|
|
23
23
|
}) => void;
|
|
24
24
|
};
|
|
25
|
+
export declare function runCredentialRenewalExpiry(material: NormalizedRunCredentialMaterial | null): Date | null;
|
|
25
26
|
export declare function nextRunCredentialRenewalDelay(expiresAt: Date | null, nowMs?: number): number;
|
|
26
27
|
/** Single-flight renewal; late resolves cannot mutate a stopped attempt. */
|
|
27
28
|
export declare function startRunCredentialRenewalLoop(options: RunCredentialRenewalOptions): RunCredentialRenewalController;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ConnectionCredentialsPort, CredentialAuthNeededPayload, SandboxBackend, RunCredentialsRequest, Session, SessionTurn } from "@opengeni/contracts";
|
|
1
|
+
import type { ConnectionCredentialsPort, CredentialAuthNeededPayload, SandboxBackend, RunCredentialsRequest, Session, SessionTurn, ToolRef } from "@opengeni/contracts";
|
|
2
|
+
import type { Settings } from "@opengeni/config";
|
|
2
3
|
import { type Database } from "@opengeni/db";
|
|
3
4
|
import { type NormalizedRunCredentialMaterial } from "@opengeni/runtime";
|
|
4
5
|
export type RunCredentialResolutionContext = {
|
|
@@ -7,13 +8,22 @@ export type RunCredentialResolutionContext = {
|
|
|
7
8
|
accountId: string;
|
|
8
9
|
workspaceId: string;
|
|
9
10
|
session: Session;
|
|
10
|
-
turn: SessionTurn
|
|
11
|
+
turn: SessionTurn & {
|
|
12
|
+
initiatingHumanSubjectId?: string | null;
|
|
13
|
+
};
|
|
11
14
|
attemptId: string;
|
|
12
15
|
effectiveSandboxBackend: SandboxBackend;
|
|
13
16
|
variableSet: {
|
|
14
17
|
id: string;
|
|
15
18
|
name: string;
|
|
16
19
|
} | null;
|
|
20
|
+
/** Enables the workspace's configured HTTP credential provider. */
|
|
21
|
+
settings?: Settings;
|
|
22
|
+
initiatingHumanSubjectId?: string | null;
|
|
23
|
+
/** Installed in-process API routes must never enter a product callback. */
|
|
24
|
+
localMcpServerIds?: readonly string[];
|
|
25
|
+
/** Exact execution selection, resolved once at the turn policy boundary. */
|
|
26
|
+
effectiveTools: readonly ToolRef[];
|
|
17
27
|
};
|
|
18
28
|
export type BoundRunCredentialResolver = {
|
|
19
29
|
resolve(input: {
|
|
@@ -21,7 +31,7 @@ export type BoundRunCredentialResolver = {
|
|
|
21
31
|
forceRefresh: boolean;
|
|
22
32
|
}): Promise<NormalizedRunCredentialMaterial | null>;
|
|
23
33
|
};
|
|
24
|
-
export declare function buildRunCredentialsRequest(input: Omit<RunCredentialResolutionContext, "db" | "connectionCredentials"> & {
|
|
34
|
+
export declare function buildRunCredentialsRequest(input: Omit<RunCredentialResolutionContext, "db" | "connectionCredentials" | "settings" | "initiatingHumanSubjectId" | "effectiveTools"> & {
|
|
25
35
|
rootSessionId: string;
|
|
26
36
|
purpose: "provision" | "renewal";
|
|
27
37
|
forceRefresh: boolean;
|
|
@@ -31,6 +41,8 @@ export declare function runCredentialModelNote(material: NormalizedRunCredential
|
|
|
31
41
|
/**
|
|
32
42
|
* Freeze the provider-neutral host credential request to this exact admitted
|
|
33
43
|
* turn. The host selects connections and material; the worker never infers a
|
|
34
|
-
* provider from repositories, environment names, or an
|
|
44
|
+
* provider from repositories, environment names, or an Opengeni variable set.
|
|
45
|
+
* A workspace that configured its own HTTP credential provider uses it in
|
|
46
|
+
* place of the deployment's injected port.
|
|
35
47
|
*/
|
|
36
48
|
export declare function bindRunCredentialResolver(input: RunCredentialResolutionContext): Promise<BoundRunCredentialResolver | null>;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { FileResourceRef, type FileAsset, type ResourceRef } from "@opengeni/contracts";
|
|
2
2
|
import { getActiveSessionHistoryItemsPaged, getSessionEvent, type Database } from "@opengeni/db";
|
|
3
3
|
import { type HistoryProviderApi, type OpenGeniRuntime } from "@opengeni/runtime";
|
|
4
|
+
/** D-37 request-copy projection. C1 is deliberately not wired into turnInput;
|
|
5
|
+
* C2 must supply scoped turn metadata and the D-43 deployment gate. The API
|
|
6
|
+
* alone cannot establish provenance: different providers may share a wire API.
|
|
7
|
+
*/
|
|
8
|
+
export declare function projectServingProviderArtifacts(rows: ReadonlyArray<{
|
|
9
|
+
item: Record<string, unknown>;
|
|
10
|
+
turnId?: string | null;
|
|
11
|
+
position: number;
|
|
12
|
+
providerArtifactInvalidatedAt?: Date | null;
|
|
13
|
+
}>, options: {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
servingProviderId: string;
|
|
16
|
+
turnMetadata: ReadonlyMap<string, unknown>;
|
|
17
|
+
}): Array<Record<string, unknown>>;
|
|
4
18
|
/** Project only artifacts explicitly rejected by the provider out of its next view. */
|
|
5
19
|
export declare function projectRejectedProviderArtifacts(rows: ReadonlyArray<{
|
|
6
20
|
item: Record<string, unknown>;
|
|
@@ -32,8 +46,11 @@ export type TurnInputOptions = {
|
|
|
32
46
|
unavailableSandboxFilesNote?: string;
|
|
33
47
|
runCredentialsNote?: string;
|
|
34
48
|
mcpAvailabilityNote?: string;
|
|
49
|
+
codemodeContinuationNote?: string;
|
|
50
|
+
programmaticApprovalAcknowledged?: boolean;
|
|
35
51
|
knowledgeSourcePreparationNote?: string;
|
|
36
52
|
providerApi: HistoryProviderApi;
|
|
53
|
+
servingProviderId?: string;
|
|
37
54
|
projectCanonicalHistory?: ModelHistoryAttachmentProjector;
|
|
38
55
|
materializeModelHistory?: ModelHistoryAttachmentProjector;
|
|
39
56
|
projectModelHistory?: ModelHistoryAttachmentProjector;
|