@crewx/sdk 0.9.0-rc.100 → 0.9.0-rc.101
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/agent/agent-list-view.d.ts +19 -0
- package/dist/esm/index.js +121 -118
- package/dist/esm/plugins/index.js +46 -46
- package/dist/esm/repository/index.js +51 -51
- package/dist/facade/Crewx.d.ts +10 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +123 -120
- package/dist/lifecycle/task-stop.d.ts +20 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +44 -44
- package/dist/plugins/sqlite-tracing.d.ts +11 -0
- package/dist/repository/index.js +51 -51
- package/dist/repository/task.repository.d.ts +9 -0
- package/dist/template/helpers/exec.browser.d.ts +1 -1
- package/dist/template/helpers/exec.d.ts +1 -1
- package/dist/template/types.d.ts +7 -0
- package/package.json +1 -1
|
@@ -17,6 +17,12 @@ export interface SqliteTracingRunnerIdentity {
|
|
|
17
17
|
detachedRunner: boolean;
|
|
18
18
|
assignedTaskId?: string;
|
|
19
19
|
}
|
|
20
|
+
export interface OwnedTaskRun {
|
|
21
|
+
taskId: string;
|
|
22
|
+
runEpoch: number;
|
|
23
|
+
workspaceId: string | null;
|
|
24
|
+
ownership: 'runner' | 'caller';
|
|
25
|
+
}
|
|
20
26
|
export interface SqliteTracingPluginOptions {
|
|
21
27
|
dbRoot?: string;
|
|
22
28
|
version?: string;
|
|
@@ -30,14 +36,19 @@ export declare class SqliteTracingPlugin extends CrewxPlugin {
|
|
|
30
36
|
private readonly runnerIdentity;
|
|
31
37
|
private taskRepo?;
|
|
32
38
|
private readonly heartbeatTaskIds;
|
|
39
|
+
private readonly ownedTaskRuns;
|
|
33
40
|
private readonly ignoredDetachedTaskIds;
|
|
34
41
|
private readonly queues;
|
|
35
42
|
private metrics;
|
|
36
43
|
constructor(opts?: SqliteTracingPluginOptions);
|
|
37
44
|
attach(crewx: Crewx): void;
|
|
38
45
|
detach(_crewx: Crewx): void;
|
|
46
|
+
listOwnedRunningTasks(): OwnedTaskRun[];
|
|
47
|
+
stopOwnedRunningTasksForHostShutdown(): Promise<void>;
|
|
39
48
|
getMetrics(): SqliteTracingMetrics;
|
|
40
49
|
private resolveTaskId;
|
|
50
|
+
private recordOwnedTaskRun;
|
|
51
|
+
private removeOwnedTaskRun;
|
|
41
52
|
private enqueueLog;
|
|
42
53
|
private recoverPartialResult;
|
|
43
54
|
private handleStopRequested;
|