@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.
- package/dist/config/timeout.config.d.ts +1 -0
- package/dist/context-budget/index.d.ts +1 -0
- package/dist/esm/index.js +166 -149
- package/dist/esm/plugins/index.js +73 -56
- package/dist/esm/repository/index.js +81 -64
- package/dist/facade/Crewx.d.ts +2 -2
- package/dist/index.browser.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +169 -152
- package/dist/plugins/index.js +74 -57
- package/dist/provider/bridge.d.ts +2 -1
- package/dist/provider/cli/adapter.types.d.ts +1 -0
- package/dist/provider/errors.d.ts +4 -1
- package/dist/repository/index.js +81 -64
- package/dist/repository/task.repository.d.ts +6 -0
- package/dist/repository/thread.repository.d.ts +7 -0
- package/dist/types/index.d.ts +20 -0
- package/package.json +1 -1
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
}
|