@crewx/sdk 0.9.0-rc.107 → 0.9.0-rc.108

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.
@@ -232,6 +232,12 @@ export declare class TaskRepository extends BaseSqliteRepository {
232
232
  runEpoch: number;
233
233
  ownership: 'runner' | 'caller';
234
234
  providerPid?: number | null;
235
+ runtime?: {
236
+ model?: string | null;
237
+ renderedPrompt?: string | null;
238
+ codingAgentCommand?: string | null;
239
+ metadata?: Record<string, unknown>;
240
+ };
235
241
  }): boolean;
236
242
  adoptPendingTask(id: string): boolean;
237
243
  failPendingTask(id: string, error: string, completedAt?: string): boolean;
@@ -4,6 +4,10 @@ import { threads } from '../schema/index.js';
4
4
  import type { TaskRow, TaskListRow } from './task.repository.js';
5
5
  export type ThreadRow = typeof threads.$inferSelect;
6
6
  export type NewThread = typeof threads.$inferInsert;
7
+ export interface ThreadOriginRow {
8
+ origin: 'direct' | 'delegated';
9
+ delegatedByAgentId: string | null;
10
+ }
7
11
  export interface ThreadTitleMetadataPatch {
8
12
  priority?: string | null;
9
13
  state?: string | null;
@@ -48,7 +52,10 @@ export declare class ThreadRepository extends BaseSqliteRepository {
48
52
  } | undefined;
49
53
  private batchFetchTasksQuery;
50
54
  batchFetchTasks(threadIds: string[], workspaceId?: string): Map<string, TaskListRow[]>;
55
+ private findThreadOriginsQuery;
56
+ findThreadOrigins(threadIds: string[], workspaceId?: string): Map<string, ThreadOriginRow>;
51
57
  explainBatchFetchTasksPlan(threadIds: string[], workspaceId?: string): string[];
58
+ explainFindThreadOriginsPlan(threadIds: string[], workspaceId?: string): string[];
52
59
  updateThreadTitle(threadId: string, title: string, workspaceId?: string): void;
53
60
  upsertThread(threadId: string, opts: {
54
61
  platform: string;
@@ -2826,6 +2826,24 @@ export interface CrewxOptions {
2826
2826
  globalSettings?: import('../config/global-settings').GlobalSettingsStore;
2827
2827
  }
2828
2828
  export type ContextMode = 'full' | 'instruction-only';
2829
+ export type CanResumeSessionReason = 'RESUME_SESSION_REQUIRED' | 'AGENT_NOT_FOUND' | 'PROVIDER_UNSUPPORTED';
2830
+ export interface CanResumeSessionParams {
2831
+ mode: 'query' | 'execute';
2832
+ resumeSessionId: string;
2833
+ resumeSessionProvider?: string;
2834
+ provider?: string;
2835
+ model?: string;
2836
+ contextMode?: ContextMode;
2837
+ overdrive?: boolean | {
2838
+ mode?: 'count' | 'latch';
2839
+ };
2840
+ }
2841
+ export interface CanResumeSessionResult {
2842
+ ok: boolean;
2843
+ reason?: CanResumeSessionReason;
2844
+ effectiveProvider: string;
2845
+ resumeSessionOwner: string;
2846
+ }
2829
2847
  export interface QueryOptions {
2830
2848
  model?: string;
2831
2849
  provider?: string;
@@ -2846,6 +2864,7 @@ export interface QueryOptions {
2846
2864
  vars?: Record<string, unknown>;
2847
2865
  cwd?: string;
2848
2866
  resumeSessionId?: string;
2867
+ resumeSessionProvider?: string;
2849
2868
  trace?: TraceContext;
2850
2869
  callerIdentity?: CollaborationWorkspaceContext;
2851
2870
  }
@@ -2893,6 +2912,7 @@ export interface ExecuteOptions {
2893
2912
  vars?: Record<string, unknown>;
2894
2913
  cwd?: string;
2895
2914
  resumeSessionId?: string;
2915
+ resumeSessionProvider?: string;
2896
2916
  trace?: TraceContext;
2897
2917
  callerIdentity?: CollaborationWorkspaceContext;
2898
2918
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/sdk",
3
- "version": "0.9.0-rc.107",
3
+ "version": "0.9.0-rc.108",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"