@crewx/sdk 0.9.0-rc.159 → 0.9.0-rc.160
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/context-budget/continuity.d.ts +2 -0
- package/dist/context-budget/index.d.ts +2 -1
- package/dist/conversation/types.d.ts +10 -0
- package/dist/esm/index.js +310 -326
- package/dist/esm/plugins/index.js +84 -84
- package/dist/esm/publish/index.js +2 -2
- package/dist/esm/repository/index.js +173 -173
- package/dist/esm/skills/index.js +2 -2
- package/dist/events/types.d.ts +7 -0
- package/dist/facade/Crewx.d.ts +2 -1
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +237 -253
- package/dist/mcp-app/app-handoff.d.ts +109 -0
- package/dist/mcp-app/apps-context.d.ts +13 -1
- package/dist/mcp-app/card-handler.d.ts +7 -0
- package/dist/mcp-app/index.d.ts +5 -1
- package/dist/mcp-app/prompt-cards.d.ts +28 -0
- package/dist/mcp-app/types.d.ts +16 -0
- package/dist/mcp-app/workspace-snapshot.d.ts +1 -0
- package/dist/migrations/0040_task_provider_inputs.sql +53 -0
- package/dist/migrations/meta/0040_snapshot.json +3759 -0
- package/dist/migrations/meta/_journal.json +7 -0
- package/dist/plugins/index.js +84 -84
- package/dist/publish/index.js +2 -2
- package/dist/repository/index.d.ts +2 -1
- package/dist/repository/index.js +130 -130
- package/dist/repository/task.repository.d.ts +26 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/task-provider-inputs.d.ts +100 -0
- package/dist/schema/tasks.d.ts +855 -1
- package/dist/skills/index.js +2 -2
- package/dist/template/helpers/format-conversation.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/templates/agents/default.yaml +8 -1
|
@@ -6,10 +6,22 @@ import type { TaskLogEntry, TaskLogReadResult, TaskLogState } from './task-log.r
|
|
|
6
6
|
import { type TaskStatus, type TaskTerminalReason } from './task-status.js';
|
|
7
7
|
import { type StopTaskOptions, type StopTaskGenerationForInstructionOptions, type StopTaskResult } from '../lifecycle/task-stop.js';
|
|
8
8
|
export { TASK_HEARTBEAT_HARD_STALE_MS, TASK_HEARTBEAT_INTERVAL_MS, TASK_HEARTBEAT_STALE_MS, resolveTaskHeartbeatHardStaleMs, resolveTaskHeartbeatIntervalMs, resolveTaskHeartbeatStaleMs, } from '../lifecycle/task-heartbeat.js';
|
|
9
|
-
type RawTaskRow = typeof tasks.$inferSelect
|
|
9
|
+
type RawTaskRow = Omit<typeof tasks.$inferSelect, 'security_key'>;
|
|
10
10
|
export type TaskRow = Omit<RawTaskRow, 'status'> & {
|
|
11
11
|
status: TaskStatus;
|
|
12
12
|
};
|
|
13
|
+
export interface ProviderInputRecord {
|
|
14
|
+
runEpoch: number;
|
|
15
|
+
input: string;
|
|
16
|
+
keyWrapSkipped: boolean;
|
|
17
|
+
recordedAt: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ProviderInputEpochEntry {
|
|
20
|
+
runEpoch: number;
|
|
21
|
+
available: boolean;
|
|
22
|
+
reason?: 'absent' | 'pruned';
|
|
23
|
+
keyWrapSkipped?: true;
|
|
24
|
+
}
|
|
13
25
|
export type NewTask = typeof tasks.$inferInsert;
|
|
14
26
|
type TaskActorKind = NonNullable<NewTask['actor_kind']>;
|
|
15
27
|
export type TaskKillStatus = 'terminated' | 'not_found' | 'failed' | 'not_running';
|
|
@@ -236,6 +248,7 @@ export declare class TaskRepository extends BaseSqliteRepository {
|
|
|
236
248
|
threadId?: string | null;
|
|
237
249
|
model?: string | null;
|
|
238
250
|
renderedPrompt?: string | null;
|
|
251
|
+
securityKey?: string | null;
|
|
239
252
|
codingAgentCommand?: string | null;
|
|
240
253
|
}): void;
|
|
241
254
|
updateTaskOwnership(opts: {
|
|
@@ -291,6 +304,18 @@ export declare class TaskRepository extends BaseSqliteRepository {
|
|
|
291
304
|
getRunningTasks(): TaskRow[];
|
|
292
305
|
getActiveTasks(): TaskRow[];
|
|
293
306
|
getAllTasks(): TaskRow[];
|
|
307
|
+
readTaskSecurityKey(id: string): string | null;
|
|
308
|
+
recordProviderInput(opts: {
|
|
309
|
+
id: string;
|
|
310
|
+
runEpoch: number;
|
|
311
|
+
input: string;
|
|
312
|
+
keyWrapSkipped: boolean;
|
|
313
|
+
recordedAt?: string;
|
|
314
|
+
}): boolean;
|
|
315
|
+
listProviderInputEpochs(id: string, opts?: {
|
|
316
|
+
archivedRunEpochs?: ReadonlySet<number>;
|
|
317
|
+
}): ProviderInputEpochEntry[];
|
|
318
|
+
readProviderInput(id: string, runEpoch: number): ProviderInputRecord | undefined;
|
|
294
319
|
getTask(id: string): TaskRow | undefined;
|
|
295
320
|
killTask(id: string): Promise<TaskKillResult>;
|
|
296
321
|
reapOrphanedTasks(options?: ReapOrphanedTasksOptions): number;
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export declare const task_provider_inputs: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "task_provider_inputs";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
task_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "task_id";
|
|
7
|
+
tableName: "task_provider_inputs";
|
|
8
|
+
dataType: "string";
|
|
9
|
+
columnType: "SQLiteText";
|
|
10
|
+
data: string;
|
|
11
|
+
driverParam: string;
|
|
12
|
+
notNull: true;
|
|
13
|
+
hasDefault: false;
|
|
14
|
+
isPrimaryKey: false;
|
|
15
|
+
isAutoincrement: false;
|
|
16
|
+
hasRuntimeDefault: false;
|
|
17
|
+
enumValues: [string, ...string[]];
|
|
18
|
+
baseColumn: never;
|
|
19
|
+
identity: undefined;
|
|
20
|
+
generated: undefined;
|
|
21
|
+
}, {}, {
|
|
22
|
+
length: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
run_epoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "run_epoch";
|
|
26
|
+
tableName: "task_provider_inputs";
|
|
27
|
+
dataType: "number";
|
|
28
|
+
columnType: "SQLiteInteger";
|
|
29
|
+
data: number;
|
|
30
|
+
driverParam: number;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: false;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: undefined;
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {}>;
|
|
41
|
+
input: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
42
|
+
name: "input";
|
|
43
|
+
tableName: "task_provider_inputs";
|
|
44
|
+
dataType: "string";
|
|
45
|
+
columnType: "SQLiteText";
|
|
46
|
+
data: string;
|
|
47
|
+
driverParam: string;
|
|
48
|
+
notNull: true;
|
|
49
|
+
hasDefault: false;
|
|
50
|
+
isPrimaryKey: false;
|
|
51
|
+
isAutoincrement: false;
|
|
52
|
+
hasRuntimeDefault: false;
|
|
53
|
+
enumValues: [string, ...string[]];
|
|
54
|
+
baseColumn: never;
|
|
55
|
+
identity: undefined;
|
|
56
|
+
generated: undefined;
|
|
57
|
+
}, {}, {
|
|
58
|
+
length: number | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
key_wrap_skipped: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
61
|
+
name: "key_wrap_skipped";
|
|
62
|
+
tableName: "task_provider_inputs";
|
|
63
|
+
dataType: "number";
|
|
64
|
+
columnType: "SQLiteInteger";
|
|
65
|
+
data: number;
|
|
66
|
+
driverParam: number;
|
|
67
|
+
notNull: true;
|
|
68
|
+
hasDefault: true;
|
|
69
|
+
isPrimaryKey: false;
|
|
70
|
+
isAutoincrement: false;
|
|
71
|
+
hasRuntimeDefault: false;
|
|
72
|
+
enumValues: undefined;
|
|
73
|
+
baseColumn: never;
|
|
74
|
+
identity: undefined;
|
|
75
|
+
generated: undefined;
|
|
76
|
+
}, {}, {}>;
|
|
77
|
+
recorded_at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
78
|
+
name: "recorded_at";
|
|
79
|
+
tableName: "task_provider_inputs";
|
|
80
|
+
dataType: "string";
|
|
81
|
+
columnType: "SQLiteText";
|
|
82
|
+
data: string;
|
|
83
|
+
driverParam: string;
|
|
84
|
+
notNull: true;
|
|
85
|
+
hasDefault: false;
|
|
86
|
+
isPrimaryKey: false;
|
|
87
|
+
isAutoincrement: false;
|
|
88
|
+
hasRuntimeDefault: false;
|
|
89
|
+
enumValues: [string, ...string[]];
|
|
90
|
+
baseColumn: never;
|
|
91
|
+
identity: undefined;
|
|
92
|
+
generated: undefined;
|
|
93
|
+
}, {}, {
|
|
94
|
+
length: number | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
};
|
|
97
|
+
dialect: "sqlite";
|
|
98
|
+
}>;
|
|
99
|
+
export type TaskProviderInput = typeof task_provider_inputs.$inferSelect;
|
|
100
|
+
export type NewTaskProviderInput = typeof task_provider_inputs.$inferInsert;
|