@opengeni/worker-bundle 0.20.3 → 0.22.1-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/activities/agent-turn/admission.d.ts +52 -0
  2. package/dist/activities/agent-turn/agent-build.d.ts +89 -0
  3. package/dist/activities/agent-turn/claim.d.ts +67 -0
  4. package/dist/activities/agent-turn/codex-capacity.d.ts +40 -0
  5. package/dist/activities/agent-turn/codex.d.ts +32 -0
  6. package/dist/activities/agent-turn/compaction-prep.d.ts +88 -0
  7. package/dist/activities/agent-turn/credential-leases.d.ts +56 -0
  8. package/dist/activities/agent-turn/errors.d.ts +253 -0
  9. package/dist/activities/agent-turn/failure-settlement.d.ts +33 -0
  10. package/dist/activities/agent-turn/file-resources.d.ts +37 -0
  11. package/dist/activities/agent-turn/finalization.d.ts +42 -0
  12. package/dist/activities/agent-turn/github-repository-bindings.d.ts +105 -0
  13. package/dist/activities/agent-turn/governance-model.d.ts +66 -0
  14. package/dist/activities/agent-turn/history-sink.d.ts +52 -0
  15. package/dist/activities/agent-turn/history.d.ts +63 -0
  16. package/dist/activities/agent-turn/media-artifacts.d.ts +145 -0
  17. package/dist/activities/agent-turn/model-usage.d.ts +218 -0
  18. package/dist/activities/agent-turn/quiescence.d.ts +135 -0
  19. package/dist/activities/agent-turn/run-credentials.d.ts +84 -0
  20. package/dist/activities/agent-turn/run.d.ts +3 -0
  21. package/dist/activities/agent-turn/sandbox-establish.d.ts +93 -0
  22. package/dist/activities/agent-turn/sandbox-provision.d.ts +89 -0
  23. package/dist/activities/agent-turn/sandbox-route.d.ts +151 -0
  24. package/dist/activities/agent-turn/sandbox-runtime.d.ts +44 -0
  25. package/dist/activities/agent-turn/stream-attempt.d.ts +107 -0
  26. package/dist/activities/agent-turn/tool-environment.d.ts +142 -0
  27. package/dist/activities/agent-turn/tool-policy.d.ts +127 -0
  28. package/dist/activities/agent-turn/tool-result-spill.d.ts +59 -0
  29. package/dist/activities/agent-turn/turn-context.d.ts +144 -0
  30. package/dist/activities/agent-turn/xai-capacity.d.ts +2 -0
  31. package/dist/activities/agent-turn.d.ts +12 -954
  32. package/dist/activities/automations.d.ts +16 -0
  33. package/dist/activities/common.d.ts +1 -1
  34. package/dist/activities/connector-attachments.d.ts +13 -0
  35. package/dist/activities/documents.d.ts +1 -0
  36. package/dist/activities/environment.d.ts +26 -15
  37. package/dist/activities/generated-images.d.ts +1 -1
  38. package/dist/activities/git-credential-renewal.d.ts +3 -1
  39. package/dist/activities/goals.d.ts +4 -1
  40. package/dist/activities/google-drive-provider.d.ts +29 -0
  41. package/dist/activities/google-drive-publication.d.ts +17 -4
  42. package/dist/activities/incident-telemetry-authority.d.ts +52 -0
  43. package/dist/activities/incident-telemetry-preflight.d.ts +71 -0
  44. package/dist/activities/knowledge-source-sync.d.ts +4 -0
  45. package/dist/activities/mcp-credentials.d.ts +9 -3
  46. package/dist/activities/open-suffix-resume.d.ts +77 -0
  47. package/dist/activities/packs.d.ts +3 -11
  48. package/dist/activities/parent-wake.d.ts +19 -0
  49. package/dist/activities/retained-screenshot-reaper.d.ts +1 -1
  50. package/dist/activities/retained-screenshots.d.ts +1 -1
  51. package/dist/activities/rig-verification.d.ts +1 -1
  52. package/dist/activities/run-input.d.ts +9 -10
  53. package/dist/activities/sandbox-images.d.ts +1 -14
  54. package/dist/activities/sandbox-lease.d.ts +21 -3
  55. package/dist/activities/scheduled-tasks.d.ts +47 -0
  56. package/dist/activities/types.d.ts +23 -2
  57. package/dist/activities/video-media-validation.d.ts +1 -1
  58. package/dist/activities/video-output-retention.d.ts +1 -2
  59. package/dist/activities/xai-auth.d.ts +3 -0
  60. package/dist/{activities-control-BJSDRSIP.js → activities-control-DKG22ONJ.js} +2646 -551
  61. package/dist/activities-control-DKG22ONJ.js.map +1 -0
  62. package/dist/activities-control.d.ts +6 -2
  63. package/dist/activities-turn-4IMC3MAA.js +21326 -0
  64. package/dist/activities-turn-4IMC3MAA.js.map +1 -0
  65. package/dist/activities.d.ts +7 -3
  66. package/dist/artifact-materializer-entry.js +41 -22
  67. package/dist/artifact-materializer-entry.js.map +1 -1
  68. package/dist/{chunk-N5TJIFCE.js → chunk-CE7TPKBS.js} +468 -1
  69. package/dist/chunk-CE7TPKBS.js.map +1 -0
  70. package/dist/chunk-CNYGVRKF.js +4698 -0
  71. package/dist/chunk-CNYGVRKF.js.map +1 -0
  72. package/dist/connection-provider-use.d.ts +18 -0
  73. package/dist/editable-artifact-materializer.d.ts +4 -3
  74. package/dist/github-rest-mcp.d.ts +26 -0
  75. package/dist/index.d.ts +10 -2
  76. package/dist/index.js +58 -14
  77. package/dist/index.js.map +1 -1
  78. package/dist/knowledge-source-sync-activity-policy.d.ts +2 -0
  79. package/dist/model-context-contributions.d.ts +8 -4
  80. package/dist/observability-metrics.d.ts +63 -4
  81. package/dist/opensandbox-kubernetes-inventory.d.ts +21 -0
  82. package/dist/personal-github-git-credentials.d.ts +9 -0
  83. package/dist/pr-review-credentials.d.ts +6 -0
  84. package/dist/sandbox-archive-storage.d.ts +45 -0
  85. package/dist/sandbox-resume.d.ts +65 -6
  86. package/dist/sandbox-routing.d.ts +38 -2
  87. package/dist/scheduled-alert-occurrence.d.ts +33 -0
  88. package/dist/workflow-bundle.js +87 -28
  89. package/dist/workflows/activities.d.ts +1 -0
  90. package/dist/workflows/automations.d.ts +6 -0
  91. package/dist/workflows/document-index.d.ts +1 -0
  92. package/dist/workflows.d.ts +1 -0
  93. package/package.json +17 -17
  94. package/src/activities/agent-turn/admission.ts +292 -0
  95. package/src/activities/agent-turn/agent-build.ts +802 -0
  96. package/src/activities/agent-turn/claim.ts +590 -0
  97. package/src/activities/agent-turn/codex-capacity.ts +720 -0
  98. package/src/activities/agent-turn/codex.ts +94 -0
  99. package/src/activities/agent-turn/compaction-prep.ts +722 -0
  100. package/src/activities/agent-turn/credential-leases.ts +240 -0
  101. package/src/activities/agent-turn/errors.ts +1068 -0
  102. package/src/activities/agent-turn/failure-settlement.ts +1436 -0
  103. package/src/activities/agent-turn/file-resources.ts +227 -0
  104. package/src/activities/agent-turn/finalization.ts +754 -0
  105. package/src/activities/agent-turn/github-repository-bindings.ts +300 -0
  106. package/src/activities/agent-turn/governance-model.ts +465 -0
  107. package/src/activities/agent-turn/history-sink.ts +139 -0
  108. package/src/activities/agent-turn/history.ts +200 -0
  109. package/src/activities/agent-turn/media-artifacts.ts +359 -0
  110. package/src/activities/agent-turn/model-usage.ts +823 -0
  111. package/src/activities/agent-turn/quiescence.ts +353 -0
  112. package/src/activities/agent-turn/run-credentials.ts +761 -0
  113. package/src/activities/agent-turn/run.ts +1530 -0
  114. package/src/activities/agent-turn/sandbox-establish.ts +1207 -0
  115. package/src/activities/agent-turn/sandbox-provision.ts +569 -0
  116. package/src/activities/agent-turn/sandbox-route.ts +358 -0
  117. package/src/activities/agent-turn/sandbox-runtime.ts +731 -0
  118. package/src/activities/agent-turn/stream-attempt.ts +1670 -0
  119. package/src/activities/agent-turn/tool-environment.ts +729 -0
  120. package/src/activities/agent-turn/tool-policy.ts +216 -0
  121. package/src/activities/agent-turn/tool-result-spill.ts +265 -0
  122. package/src/activities/agent-turn/turn-context.ts +281 -0
  123. package/src/activities/agent-turn/xai-capacity.ts +229 -0
  124. package/src/activities/agent-turn.ts +12 -12701
  125. package/src/activities/api-integrations.ts +3 -0
  126. package/src/activities/automations.ts +214 -0
  127. package/src/activities/codemode-dispatcher.ts +12 -1
  128. package/src/activities/common.ts +1 -5
  129. package/src/activities/connector-attachments.ts +168 -0
  130. package/src/activities/context-compaction.ts +18 -0
  131. package/src/activities/environment.ts +151 -55
  132. package/src/activities/generated-images.ts +26 -11
  133. package/src/activities/git-credential-renewal.ts +13 -3
  134. package/src/activities/goals.ts +85 -19
  135. package/src/activities/google-drive-provider.ts +178 -0
  136. package/src/activities/google-drive-publication.ts +147 -49
  137. package/src/activities/incident-telemetry-authority.ts +327 -0
  138. package/src/activities/incident-telemetry-preflight.ts +317 -0
  139. package/src/activities/knowledge-source-sync.ts +178 -37
  140. package/src/activities/mcp-credentials.ts +191 -17
  141. package/src/activities/open-suffix-resume.ts +422 -0
  142. package/src/activities/packs.ts +12 -60
  143. package/src/activities/parent-wake.ts +64 -14
  144. package/src/activities/retained-screenshot-reaper.ts +6 -3
  145. package/src/activities/retained-screenshots.ts +15 -47
  146. package/src/activities/rig-verification.ts +1 -1
  147. package/src/activities/run-input.ts +102 -142
  148. package/src/activities/sandbox-images.ts +7 -166
  149. package/src/activities/sandbox-lease.ts +406 -15
  150. package/src/activities/scheduled-tasks.ts +2103 -411
  151. package/src/activities/session-state.ts +10 -2
  152. package/src/activities/types.ts +32 -2
  153. package/src/activities/video-media-validation.ts +3 -3
  154. package/src/activities/video-output-retention.ts +2 -57
  155. package/src/activities/xai-auth.ts +8 -0
  156. package/src/activities-control.ts +2 -0
  157. package/src/activities.ts +3 -0
  158. package/src/activity-services.ts +13 -4
  159. package/src/connection-provider-use.ts +36 -0
  160. package/src/editable-artifact-materializer-subprocess.ts +25 -14
  161. package/src/editable-artifact-materializer.ts +29 -18
  162. package/src/github-rest-mcp.ts +713 -0
  163. package/src/http.ts +16 -6
  164. package/src/index.ts +40 -5
  165. package/src/knowledge-source-sync-activity-policy.ts +2 -0
  166. package/src/model-context-contributions.ts +33 -10
  167. package/src/observability-metrics.ts +357 -0
  168. package/src/opensandbox-kubernetes-inventory.ts +292 -0
  169. package/src/personal-github-git-credentials.ts +331 -0
  170. package/src/pr-review-credentials.ts +163 -0
  171. package/src/sandbox-archive-storage.ts +159 -0
  172. package/src/sandbox-resume.ts +449 -63
  173. package/src/sandbox-routing.ts +314 -16
  174. package/src/scheduled-alert-occurrence.ts +176 -0
  175. package/src/workflows/activities.ts +18 -2
  176. package/src/workflows/automations.ts +11 -0
  177. package/src/workflows/session.ts +13 -3
  178. package/src/workflows.ts +1 -0
  179. package/dist/activities-control-BJSDRSIP.js.map +0 -1
  180. package/dist/activities-turn-J5YO7XXX.js +0 -17243
  181. package/dist/activities-turn-J5YO7XXX.js.map +0 -1
  182. package/dist/chunk-N5TJIFCE.js.map +0 -1
  183. package/dist/chunk-P6Z2SLAA.js +0 -3092
  184. package/dist/chunk-P6Z2SLAA.js.map +0 -1
@@ -1,14 +1 @@
1
- import type { Settings } from "@opengeni/config";
2
- import type { CapabilityPack, RigVersion, SandboxBackend } from "@opengeni/contracts";
3
- import { resolveModalCheckpointProviderBinding } from "@opengeni/runtime/sandbox";
4
- export declare function settingsWithPackSandboxImage(settings: Settings, sandboxImage: string | null, sandboxProviderImages?: CapabilityPack["sandboxProviderImages"] | null): Settings;
5
- export declare function settingsWithRigImage(settings: Settings, rigImage: string | null): Settings;
6
- export declare function rigProviderImageSourceImage(settings: Settings, backend: SandboxBackend): string | null;
7
- export type RigProviderImageSelectionReason = "selected" | "missing" | "provider_unsupported" | "not_ready" | "not_cold_boot_validated" | "content_mismatch" | "provider_binding_unavailable" | "provider_binding_mismatch";
8
- export declare function resolveRigProviderImageSelection(settings: Settings, version: RigVersion | null, backend: SandboxBackend, currentProviderBindingKeyHash: string | null): {
9
- settings: Settings;
10
- reason: RigProviderImageSelectionReason;
11
- contentHash: string | null;
12
- imageId: string | null;
13
- };
14
- export declare function settingsWithRigProviderImage(settings: Settings, version: RigVersion | null, backend: SandboxBackend, resolveBinding?: typeof resolveModalCheckpointProviderBinding): Promise<Settings>;
1
+ export { resolveRigProviderImageSelection, rigProviderImageSourceImage, settingsWithPackSandboxImage, settingsWithRigImage, settingsWithRigProviderImage, type RigProviderImageSelectionReason, } from "@opengeni/core";
@@ -1,7 +1,10 @@
1
+ import { type OpStatus } from "@opengeni/agent-proto";
1
2
  import { listLiveModalSandboxLeaseAttributions, readLease, type ReapDrainable, type RetainedProcessProviderProof, type SandboxRetainedProcess, type LeaseSnapshot } from "@opengeni/db";
2
- import { createSandboxClientForBackend, inspectModalSandboxLifecycle, resolveModalCheckpointProviderBindingForSession, terminateModalSandboxById, type ModalOrphanSweepTermination, type ModalCheckpointProviderBinding, type ProviderWorkspaceCapturePolicy, type WorkspaceArchiveDescriptor } from "@opengeni/runtime/sandbox";
3
+ import { type ConnectedMachineBackgroundCommandClaim, type ConnectedMachineBackgroundCommandProof } from "@opengeni/db/session-background-commands";
4
+ import { createSandboxClientForBackend, inspectModalSandboxLifecycle, resolveModalCheckpointProviderBindingForSession, terminateModalSandboxById, type ModalOrphanSweepTermination, type ModalCheckpointProviderBinding, type ProviderWorkspaceCapturePolicy, type WorkspaceArchiveDescriptor, type ControlRpc } from "@opengeni/runtime/sandbox";
3
5
  import { type SandboxDrainActivityInput, type SandboxLeaseSweepMaintenanceInput } from "../sandbox-reaper-contract.js";
4
6
  import type { ControlActivityServices as ActivityServices } from "./types.js";
7
+ import { type OpenSandboxKubernetesInventory } from "../opensandbox-kubernetes-inventory.js";
5
8
  export { sandboxLeaseTelemetryKey } from "@opengeni/observability";
6
9
  export type ReapSandboxLeasesResult = {
7
10
  /** Stale viewer holders + warming-death rows the sweep touched is folded into
@@ -57,6 +60,9 @@ export type DrainCaptureDisposition = "capture_required" | "archive_published";
57
60
  * provider disappearance before capture. */
58
61
  export type TerminateBoxFn = (settings: ActivityServices["settings"], lease: NonNullable<Awaited<ReturnType<typeof readLease>>>, observability: ActivityServices["observability"], persistArchive: PersistArchiveFn, providerCaptureRequestId?: string, captureDisposition?: DrainCaptureDisposition, capturePolicy?: ProviderWorkspaceCapturePolicy | null) => Promise<boolean | ProviderTerminationOutcome>;
59
62
  export type SweepModalOrphansFn = (settings: ActivityServices["settings"], db: ActivityServices["db"], observability: ActivityServices["observability"]) => Promise<number>;
63
+ export type InspectOpenSandboxKubernetesInventoryFn = (input: {
64
+ namespace: string;
65
+ }) => Promise<OpenSandboxKubernetesInventory>;
60
66
  export type SandboxLeaseActivityOptions = {
61
67
  /** Override the provider terminate (tests spy this; defaults to the real
62
68
  * resume-by-id + provider stop()). */
@@ -64,6 +70,8 @@ export type SandboxLeaseActivityOptions = {
64
70
  /** Override the provider-side Modal orphan sweep (tests spy this; defaults to
65
71
  * Modal list+tag comparison when Modal is configured). */
66
72
  sweepModalOrphans?: SweepModalOrphansFn;
73
+ /** Override the read-only bounded OpenSandbox Kubernetes projection. */
74
+ inspectOpenSandboxKubernetesInventory?: InspectOpenSandboxKubernetesInventoryFn;
67
75
  /** Override only the read-only provider process probe. The canonical DB
68
76
  * settlement remains real in tests and production. */
69
77
  probeRetainedProcess?: RetainedProcessProbeFn;
@@ -85,12 +93,14 @@ export type RetainedProcessProbeResult = {
85
93
  status: "deferred";
86
94
  reason: "identity_mismatch" | "resume_state_missing" | "backend_unsupported" | "provider_running" | "provider_unknown" | "provider_timeout" | "provider_error" | "provider_binding_missing" | "provider_binding_mismatch";
87
95
  };
88
- export type RetainedProcessProbeFn = (settings: ActivityServices["settings"], lease: LeaseSnapshot, process: SandboxRetainedProcess) => Promise<RetainedProcessProbeResult>;
96
+ export type RetainedProcessProbeFn = (settings: ActivityServices["settings"], lease: LeaseSnapshot, process: SandboxRetainedProcess, mode?: "observe" | "cancel") => Promise<RetainedProcessProbeResult>;
89
97
  export type HistoricalModalSandboxLifecycleProbeFn = typeof inspectModalSandboxLifecycle;
90
98
  export type DrainableProviderProbeFn = (settings: ActivityServices["settings"], lease: LeaseSnapshot) => Promise<"ready" | "missing">;
91
99
  export declare const RETAINED_PROCESS_RECONCILIATION_LIMIT = 20;
92
100
  export declare const RETAINED_PROCESS_RECONCILIATION_CLAIM_TTL_MS: number;
93
101
  export declare const RETAINED_PROCESS_PROVIDER_PROBE_TIMEOUT_MS = 5000;
102
+ export declare const CONNECTED_COMMAND_RECONCILIATION_LIMIT = 20;
103
+ export declare const CONNECTED_COMMAND_RECONCILIATION_CLAIM_TTL_MS: number;
94
104
  export declare class SandboxProviderCaptureTimeoutError extends Error {
95
105
  readonly sandboxGroupId: string;
96
106
  readonly backend: string;
@@ -128,11 +138,19 @@ export declare function createSandboxLeaseActivities(services: () => Promise<Act
128
138
  maintainSandboxLeaseSweep: (input: SandboxLeaseSweepMaintenanceInput) => Promise<SandboxLeaseSweepMaintenanceResult>;
129
139
  reapSandboxLeases: () => Promise<ReapSandboxLeasesResult>;
130
140
  };
131
- export declare function probeRetainedProcessAtProvider(settings: ActivityServices["settings"], lease: LeaseSnapshot, process: SandboxRetainedProcess): Promise<RetainedProcessProbeResult>;
141
+ export declare function probeConnectedMachineBackgroundCommand(claim: ConnectedMachineBackgroundCommandClaim, controlRpc: ControlRpc, controlTimeoutMs: number, observedAt?: Date): Promise<ConnectedMachineBackgroundCommandProof | null>;
142
+ export declare function connectedCommandProofFromStatus(status: OpStatus, observedAt: Date): ConnectedMachineBackgroundCommandProof | null;
143
+ export declare function probeRetainedProcessAtProvider(settings: ActivityServices["settings"], lease: LeaseSnapshot, process: SandboxRetainedProcess, mode?: "observe" | "cancel"): Promise<RetainedProcessProbeResult>;
132
144
  /** Classify only exact SDK control banners. Arbitrary output, malformed text,
133
145
  * and a running marker are observations to retry; none is physical exit proof. */
134
146
  export declare function classifyRetainedProcessPollResult(result: unknown, providerSessionId: number): RetainedProcessProbeResult;
135
147
  export declare function modalOrphanTerminationStillEligible(latest: Awaited<ReturnType<typeof listLiveModalSandboxLeaseAttributions>>, candidate: ModalOrphanSweepTermination): boolean;
148
+ export type SandboxDrainReason = "idle" | "provider_deadline" | "operator" | "teardown_claim" | "rotation_requested";
149
+ /** The bounded drain reason carried on `sandbox.box.terminated`: the lease's
150
+ * rotation reason when a rotation was requested, otherwise the ordinary idle
151
+ * drain. A requested rotation without a recorded reason (legacy rows) is
152
+ * reported as `rotation_requested` rather than guessed. */
153
+ export declare function sandboxDrainReason(lease: Pick<LeaseSnapshot, "rotationRequestedAt" | "rotationReason">): SandboxDrainReason;
136
154
  /**
137
155
  * Resume/attach the box by id, PERSIST its /workspace, fold the snapshot onto the
138
156
  * lease under the epoch fence, hand the superseded snapshot to durable GC, THEN
@@ -1,4 +1,51 @@
1
1
  import type { ControlActivityServices, DispatchScheduledTaskRunInput, DispatchScheduledTaskRunResult } from "./types.js";
2
+ type ScheduledTemporalActivityIdentity = {
3
+ namespace: string;
4
+ workflowExecution?: {
5
+ workflowId: string;
6
+ runId: string;
7
+ };
8
+ activityId: string;
9
+ };
10
+ export declare function scheduledTaskRunProducerKey(input: DispatchScheduledTaskRunInput, suppliedActivityIdentity?: ScheduledTemporalActivityIdentity): string;
11
+ /**
12
+ * Display title for a session the scheduler generates for a task.
13
+ *
14
+ * A scheduled session's `initialMessage` is the task prompt, byte-identical for
15
+ * every run, so an untitled scheduled session falls back to that prompt in the
16
+ * rail and reads exactly like every other run of the task. The task name is the
17
+ * short human-chosen label that actually identifies it, so that is the title.
18
+ *
19
+ * The title is the task name and NOTHING else. It deliberately does not name the
20
+ * run's fire instant, for two independent reasons:
21
+ *
22
+ * - No run mode guarantees one run per session. `reusable_session` generates
23
+ * its session on the first fire and then reuses it forever, and even under
24
+ * `new_session_per_run` alert-occurrence redelivery converges several runs
25
+ * onto one canonical responder session. `existing_session` never generates a
26
+ * session at all, so the scheduler never titles one. A run-specific fact
27
+ * frozen into the title is therefore right for the generating run and a lie
28
+ * for every run that lands in the same session afterwards.
29
+ * - A title is one stored string shown to every viewer, while every surface
30
+ * that renders a run's fire instant renders it viewer-local: the rail row
31
+ * prints the title beside `relativeTimeLabel(session.updatedAt)`, and the
32
+ * Schedules run list prints `formatTimestamp(run.firedAt)`, which is
33
+ * `toLocaleString()`. A wall clock stored in the title therefore disagrees
34
+ * with the time printed next to it for every viewer outside whichever zone
35
+ * it was rendered in. The task's own `timeZone` is no escape: it labels the
36
+ * schedule rule ("Mon Wed 09:00 Europe/Oslo"), not the rendering of a run,
37
+ * which stays viewer-local. No stored clock can agree with a viewer-local
38
+ * one, so the title carries none and the instant stays on the surfaces that
39
+ * already render it correctly.
40
+ *
41
+ * Dropping the clock settles the determinism constraint outright rather than
42
+ * working around it: the same run titled by the normal dispatch or by a later
43
+ * recovery in a different worker process derives one string from `task.name`
44
+ * alone, with no Intl call and so no host ICU or tzdata build to make the two
45
+ * texts differ.
46
+ */
47
+ export declare function scheduledTaskSessionTitle(taskName: string): string;
2
48
  export declare function createScheduledTaskActivities(services: () => Promise<ControlActivityServices>): {
3
49
  dispatchScheduledTaskRun: (input: DispatchScheduledTaskRunInput) => Promise<DispatchScheduledTaskRunResult>;
4
50
  };
51
+ export {};
@@ -72,6 +72,8 @@ export type SharedActivityServices = {
72
72
  startVideoGenerationWorkflow?: StartVideoGenerationWorkflow | null;
73
73
  entitlements?: EntitlementsPort | null;
74
74
  connectionCredentials?: ConnectionCredentialsPort | null;
75
+ /** Standalone, default-off personal GitHub smart-HTTP broker consumer. */
76
+ personalGitHubCredentials?: ConnectionCredentialsPort["gitCredentials"] | null;
75
77
  };
76
78
  /** Control workers own short database and maintenance activities. Document
77
79
  * parsing is resolved lazily by the indexing activity itself. */
@@ -225,6 +227,8 @@ export type EscapedMcpTimeoutRecoveryDetail = {
225
227
  turnId: string;
226
228
  triggerEventId: string;
227
229
  executionGeneration: number;
230
+ providerRecoveryCount: number;
231
+ continueDelayMs: number;
228
232
  };
229
233
  export type RecoverEscapedMcpTimeoutInput = EscapedMcpTimeoutRecoveryDetail & {
230
234
  accountId: string;
@@ -268,7 +272,7 @@ export type MaybeContinueGoalInput = {
268
272
  workflowId: string;
269
273
  };
270
274
  export type MaybeContinueGoalResult = {
271
- action: "none" | "queue" | "continue" | "paused";
275
+ action: "none" | "queue" | "continue" | "paused" | "held" | "deferred";
272
276
  };
273
277
  export type DispatchScheduledTaskRunInput = {
274
278
  workspaceId: string;
@@ -289,7 +293,7 @@ export type DispatchScheduledTaskRunResult = {
289
293
  action: "deleted";
290
294
  } | {
291
295
  action: "blocked";
292
- reason: "insufficient_credits" | "monthly_model_cost_limit" | "monthly_agent_run_limit" | "malformed_manual_trigger" | "knowledge_source_paused";
296
+ reason: "insufficient_credits" | "monthly_model_cost_limit" | "monthly_agent_run_limit" | "malformed_manual_trigger" | "scheduled_task_paused" | "scheduled_authority_exhausted" | "scheduled_run_terminal" | "scheduled_execution_unrepresentable" | "knowledge_source_paused" | "incident_preflight_metadata_missing" | "incident_responder_under_capable" | "incident_data_source_unsuitable";
293
297
  } | {
294
298
  action: "start" | "signal";
295
299
  accountId: string;
@@ -315,6 +319,23 @@ export type RunKnowledgeSourceSyncBatchInput = {
315
319
  sourceId: string;
316
320
  overlapPolicy: "skip" | "buffer_one";
317
321
  };
322
+ export type DispatchAutomationRunInput = {
323
+ accountId: string;
324
+ workspaceId: string;
325
+ runId: string;
326
+ };
327
+ export type DispatchAutomationRunResult = {
328
+ action: "started";
329
+ sessionId: string;
330
+ } | {
331
+ action: "already_dispatched";
332
+ sessionId: string;
333
+ } | {
334
+ action: "skipped";
335
+ reason: string;
336
+ } | {
337
+ action: "not_found";
338
+ };
318
339
  export type RunKnowledgeSourceSyncBatchResult = {
319
340
  action: "continue";
320
341
  } | {
@@ -1,5 +1,5 @@
1
1
  import type { GeneratedVideoFacts } from "@opengeni/contracts";
2
- import type { ObjectStorage } from "@opengeni/storage";
2
+ import { type ObjectStorage } from "@opengeni/storage";
3
3
  export type VerifiedTempFile = Readonly<{
4
4
  directory: string;
5
5
  path: string;
@@ -26,8 +26,7 @@ export declare function downloadGeneratedVideoToVerifiedTemp(input: {
26
26
  temp: VerifiedTempFile;
27
27
  facts: GeneratedVideoFacts;
28
28
  }>;
29
- /** Stream verified bytes into an immutable content-addressed object and hash
30
- * the stored generation back through version-fenced Range reads. */
29
+ /** Stream verified bytes into an immutable content-addressed object. */
31
30
  export declare function retainVerifiedGeneratedVideo(input: {
32
31
  storage: ObjectStorage;
33
32
  temp: VerifiedTempFile;
@@ -20,4 +20,7 @@ export declare function buildXaiTurnRequestAuthorization(input: {
20
20
  hostedSearch?: XaiSubscriptionRequestContext["hostedSearch"];
21
21
  onFinalContextUsage?: XaiSubscriptionRequestContext["onFinalContextUsage"];
22
22
  nextRequestId?: XaiSubscriptionRequestContext["nextRequestId"];
23
+ streamIdleTimeoutMs?: XaiSubscriptionRequestContext["streamIdleTimeoutMs"];
24
+ onModelRequestDiagnostic?: XaiSubscriptionRequestContext["onModelRequestDiagnostic"];
25
+ onModelRequestEvent?: XaiSubscriptionRequestContext["onModelRequestEvent"];
23
26
  }): Promise<XaiTurnRequestAuthorization>;