@codelia/runtime 0.1.83 → 0.1.85

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/sdk.d.cts CHANGED
@@ -1,9 +1,24 @@
1
+ import { TaskResult, TaskState, TaskRecord, TaskKind, TaskWorkspaceMode, TaskRegistryStore, AttachmentStore } from '@codelia/storage';
2
+ export { AttachmentStore, StoredAttachment } from '@codelia/storage';
1
3
  import * as _codelia_config from '@codelia/config';
2
4
  import { PermissionsConfig, SubagentConfig, PermissionRule } from '@codelia/config';
3
5
  import { SessionStateStore, RunEventStoreFactory, ToolOutputCacheStore, Tool } from '@codelia/core';
4
6
  import { RpcNotification } from '@codelia/protocol';
5
- import { ModelFastMode, SubagentLineage, ApprovalMode, AgentMessage, ModelReasoningLevel } from '@codelia/shared-types';
6
- import { TaskResult, TaskState, TaskRecord, TaskKind, TaskWorkspaceMode, TaskRegistryStore } from '@codelia/storage';
7
+ import { ModelFastMode, TaskProgress, SubagentLineage, ApprovalMode, AgentMessage, ModelReasoningLevel } from '@codelia/shared-types';
8
+
9
+ declare const DEFAULT_LIMITS: {
10
+ max_file_bytes: number;
11
+ max_message_bytes: number;
12
+ max_attachments: number;
13
+ max_chunk_bytes: number;
14
+ max_concurrent_uploads: number;
15
+ max_image_bytes: number;
16
+ max_images: number;
17
+ max_staged_bytes: number;
18
+ max_staged_uploads: number;
19
+ lease_ms: number;
20
+ };
21
+ type AttachmentUploadPolicy = typeof DEFAULT_LIMITS;
7
22
 
8
23
  type ResolvedModelConfig = {
9
24
  providers?: _codelia_config.CodeliaConfig["providers"];
@@ -143,6 +158,8 @@ type PreparedTaskExecution = TaskExecutionHandle & {
143
158
  start(control: {
144
159
  persistExecutor(metadata: TaskExecutionMetadata): Promise<void>;
145
160
  running(metadata: TaskExecutionMetadata): Promise<void>;
161
+ /** Optional in-memory progress for the parent UI (subagents). */
162
+ progress?(progress: TaskProgress): void;
146
163
  }): Promise<void>;
147
164
  };
148
165
 
@@ -201,8 +218,17 @@ declare class TaskManager {
201
218
  private readonly activeTasks;
202
219
  private mutationQueue;
203
220
  private shuttingDown;
221
+ /** Latest child progress per task; in-memory only (children are session-owned). */
222
+ private readonly progressByTask;
223
+ private readonly updateListeners;
224
+ private readonly terminalTaskIds;
204
225
  constructor(options?: TaskManagerOptions);
205
226
  get ownerRuntimeId(): string;
227
+ /** Subscribe to record writes and progress updates; returns an unsubscribe. */
228
+ onTaskUpdate(listener: (task: TaskRecord) => void): () => void;
229
+ getProgress(taskId: string): TaskProgress | undefined;
230
+ private notifyUpdate;
231
+ private reportProgress;
206
232
  private enqueueMutation;
207
233
  private updateTask;
208
234
  private finalizeTask;
@@ -333,12 +359,14 @@ type ToolProvider = {
333
359
  getTools: () => Promise<Tool[]> | Tool[];
334
360
  };
335
361
  type RuntimeStores = {
362
+ attachmentStore?: AttachmentStore | null;
336
363
  sessionStateStore?: SessionStateStore;
337
364
  runEventStoreFactory?: RunEventStoreFactory;
338
365
  toolOutputCacheStore?: ToolOutputCacheStore | null;
339
366
  taskManager?: TaskManager;
340
367
  };
341
368
  type RuntimeHostAdapters = {
369
+ attachmentUploadLimits?: Partial<AttachmentUploadPolicy>;
342
370
  subagentExecutorFactory?: SubagentExecutorFactory;
343
371
  systemPromptProvider?: SystemPromptProvider;
344
372
  configProvider?: RuntimeConfigProvider;
@@ -356,4 +384,4 @@ type RuntimeOptions = {
356
384
 
357
385
  declare const startRuntime: (options?: RuntimeOptions) => Promise<void>;
358
386
 
359
- export { type CredentialProvider, type PreparedTaskExecution, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolProvider, startRuntime };
387
+ export { type AttachmentUploadPolicy, type CredentialProvider, type PreparedTaskExecution, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolProvider, startRuntime };
package/dist/sdk.d.ts CHANGED
@@ -1,9 +1,24 @@
1
+ import { TaskResult, TaskState, TaskRecord, TaskKind, TaskWorkspaceMode, TaskRegistryStore, AttachmentStore } from '@codelia/storage';
2
+ export { AttachmentStore, StoredAttachment } from '@codelia/storage';
1
3
  import * as _codelia_config from '@codelia/config';
2
4
  import { PermissionsConfig, SubagentConfig, PermissionRule } from '@codelia/config';
3
5
  import { SessionStateStore, RunEventStoreFactory, ToolOutputCacheStore, Tool } from '@codelia/core';
4
6
  import { RpcNotification } from '@codelia/protocol';
5
- import { ModelFastMode, SubagentLineage, ApprovalMode, AgentMessage, ModelReasoningLevel } from '@codelia/shared-types';
6
- import { TaskResult, TaskState, TaskRecord, TaskKind, TaskWorkspaceMode, TaskRegistryStore } from '@codelia/storage';
7
+ import { ModelFastMode, TaskProgress, SubagentLineage, ApprovalMode, AgentMessage, ModelReasoningLevel } from '@codelia/shared-types';
8
+
9
+ declare const DEFAULT_LIMITS: {
10
+ max_file_bytes: number;
11
+ max_message_bytes: number;
12
+ max_attachments: number;
13
+ max_chunk_bytes: number;
14
+ max_concurrent_uploads: number;
15
+ max_image_bytes: number;
16
+ max_images: number;
17
+ max_staged_bytes: number;
18
+ max_staged_uploads: number;
19
+ lease_ms: number;
20
+ };
21
+ type AttachmentUploadPolicy = typeof DEFAULT_LIMITS;
7
22
 
8
23
  type ResolvedModelConfig = {
9
24
  providers?: _codelia_config.CodeliaConfig["providers"];
@@ -143,6 +158,8 @@ type PreparedTaskExecution = TaskExecutionHandle & {
143
158
  start(control: {
144
159
  persistExecutor(metadata: TaskExecutionMetadata): Promise<void>;
145
160
  running(metadata: TaskExecutionMetadata): Promise<void>;
161
+ /** Optional in-memory progress for the parent UI (subagents). */
162
+ progress?(progress: TaskProgress): void;
146
163
  }): Promise<void>;
147
164
  };
148
165
 
@@ -201,8 +218,17 @@ declare class TaskManager {
201
218
  private readonly activeTasks;
202
219
  private mutationQueue;
203
220
  private shuttingDown;
221
+ /** Latest child progress per task; in-memory only (children are session-owned). */
222
+ private readonly progressByTask;
223
+ private readonly updateListeners;
224
+ private readonly terminalTaskIds;
204
225
  constructor(options?: TaskManagerOptions);
205
226
  get ownerRuntimeId(): string;
227
+ /** Subscribe to record writes and progress updates; returns an unsubscribe. */
228
+ onTaskUpdate(listener: (task: TaskRecord) => void): () => void;
229
+ getProgress(taskId: string): TaskProgress | undefined;
230
+ private notifyUpdate;
231
+ private reportProgress;
206
232
  private enqueueMutation;
207
233
  private updateTask;
208
234
  private finalizeTask;
@@ -333,12 +359,14 @@ type ToolProvider = {
333
359
  getTools: () => Promise<Tool[]> | Tool[];
334
360
  };
335
361
  type RuntimeStores = {
362
+ attachmentStore?: AttachmentStore | null;
336
363
  sessionStateStore?: SessionStateStore;
337
364
  runEventStoreFactory?: RunEventStoreFactory;
338
365
  toolOutputCacheStore?: ToolOutputCacheStore | null;
339
366
  taskManager?: TaskManager;
340
367
  };
341
368
  type RuntimeHostAdapters = {
369
+ attachmentUploadLimits?: Partial<AttachmentUploadPolicy>;
342
370
  subagentExecutorFactory?: SubagentExecutorFactory;
343
371
  systemPromptProvider?: SystemPromptProvider;
344
372
  configProvider?: RuntimeConfigProvider;
@@ -356,4 +384,4 @@ type RuntimeOptions = {
356
384
 
357
385
  declare const startRuntime: (options?: RuntimeOptions) => Promise<void>;
358
386
 
359
- export { type CredentialProvider, type PreparedTaskExecution, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolProvider, startRuntime };
387
+ export { type AttachmentUploadPolicy, type CredentialProvider, type PreparedTaskExecution, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolProvider, startRuntime };
package/dist/sdk.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  startRuntime
3
- } from "./chunk-JRAJDBQ3.js";
4
- import "./chunk-A6CO4J5P.js";
3
+ } from "./chunk-IWSVQ465.js";
4
+ import "./chunk-V5WO2QTA.js";
5
5
  export {
6
6
  startRuntime
7
7
  };