@sift-wiki/conductor 0.2.0-beta.1 → 0.2.0-beta.2
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/adapters/claudeAgent.js +1 -0
- package/dist/adapters/claudeAgent.js.map +1 -1
- package/dist/adapters/codexAgent.js +1 -0
- package/dist/adapters/codexAgent.js.map +1 -1
- package/dist/adapters/fakeAgent.js +1 -0
- package/dist/adapters/fakeAgent.js.map +1 -1
- package/dist/adapters/httpAgent.js +1 -0
- package/dist/adapters/httpAgent.js.map +1 -1
- package/dist/adapters/processAgent.js +4 -0
- package/dist/adapters/processAgent.js.map +1 -1
- package/dist/adapters/provider/runProvider.js +4 -0
- package/dist/adapters/provider/runProvider.js.map +1 -1
- package/dist/adapters/provider/store.js +3 -4
- package/dist/adapters/provider/store.js.map +1 -1
- package/dist/adapters/types.d.ts +9 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +16 -4
- package/dist/cli.js.map +1 -1
- package/dist/conductorClient.d.ts +56 -19
- package/dist/conductorClient.js +91 -40
- package/dist/conductorClient.js.map +1 -1
- package/dist/config.js +4 -5
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +19 -6
- package/dist/daemon.js +160 -122
- package/dist/daemon.js.map +1 -1
- package/dist/desktop/app/controller.d.ts +1 -1
- package/dist/desktop/app/runtimeController.d.ts +7 -0
- package/dist/desktop/app/runtimeController.js +12 -1
- package/dist/desktop/app/runtimeController.js.map +1 -1
- package/dist/localApi/contracts.d.ts +15 -4
- package/dist/localApi/contracts.js +19 -1
- package/dist/localApi/contracts.js.map +1 -1
- package/dist/localApi/recovery.d.ts +66 -0
- package/dist/localApi/recovery.js +115 -0
- package/dist/localApi/recovery.js.map +1 -0
- package/dist/localApi/server.js +3 -1
- package/dist/localApi/server.js.map +1 -1
- package/dist/localApp/service.js +16 -4
- package/dist/localApp/service.js.map +1 -1
- package/dist/protocol/fenced.d.ts +135 -0
- package/dist/protocol/fenced.js +142 -0
- package/dist/protocol/fenced.js.map +1 -0
- package/dist/redaction.js +2 -0
- package/dist/redaction.js.map +1 -1
- package/dist/runtime/atomicFile.d.ts +6 -0
- package/dist/runtime/atomicFile.js +78 -0
- package/dist/runtime/atomicFile.js.map +1 -0
- package/dist/runtime/daemonCapabilities.d.ts +7 -0
- package/dist/runtime/daemonCapabilities.js +24 -0
- package/dist/runtime/daemonCapabilities.js.map +1 -0
- package/dist/runtime/eventOutbox.d.ts +100 -0
- package/dist/runtime/eventOutbox.js +206 -0
- package/dist/runtime/eventOutbox.js.map +1 -0
- package/dist/runtime/executionJournal.d.ts +102 -0
- package/dist/runtime/executionJournal.js +209 -0
- package/dist/runtime/executionJournal.js.map +1 -0
- package/dist/runtime/executionSafety.d.ts +76 -0
- package/dist/runtime/executionSafety.js +207 -0
- package/dist/runtime/executionSafety.js.map +1 -0
- package/dist/runtime/fencedExecutionState.d.ts +43 -0
- package/dist/runtime/fencedExecutionState.js +158 -0
- package/dist/runtime/fencedExecutionState.js.map +1 -0
- package/dist/runtime/leaseManager.d.ts +38 -0
- package/dist/runtime/leaseManager.js +102 -0
- package/dist/runtime/leaseManager.js.map +1 -0
- package/dist/runtime/localRunQueue.d.ts +1 -1
- package/dist/runtime/localRunQueue.js +8 -0
- package/dist/runtime/localRunQueue.js.map +1 -1
- package/dist/runtime/localSessionCache.d.ts +1 -1
- package/dist/runtime/localSessionCache.js.map +1 -1
- package/dist/runtime/process.d.ts +13 -1
- package/dist/runtime/process.js +39 -9
- package/dist/runtime/process.js.map +1 -1
- package/dist/runtime/recoveryCoordinator.d.ts +19 -0
- package/dist/runtime/recoveryCoordinator.js +183 -0
- package/dist/runtime/recoveryCoordinator.js.map +1 -0
- package/dist/runtime/runtimeLock.d.ts +33 -0
- package/dist/runtime/runtimeLock.js +140 -0
- package/dist/runtime/runtimeLock.js.map +1 -0
- package/dist/runtime/runtimeService.d.ts +6 -1
- package/dist/runtime/runtimeService.js +54 -20
- package/dist/runtime/runtimeService.js.map +1 -1
- package/dist/runtime/taskExecution.d.ts +2 -0
- package/dist/runtime/taskExecution.js +18 -12
- package/dist/runtime/taskExecution.js.map +1 -1
- package/dist/types.d.ts +28 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workTypes.d.ts +5 -5
- package/dist-web/assets/index-CWAdDb9V.js +72 -0
- package/dist-web/index.html +2 -2
- package/package.json +1 -1
- package/dist-web/assets/index-D5X9InfE.js +0 -72
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SiftWakeEnvelope } from "./runtime/wakeEnvelope.js";
|
|
2
|
+
import type { AttemptAuthority, AttemptAuthorityFence, AttemptMutationOptions, ClientEventIdentity, EventAcknowledgement, LateResultRequest, LateResultResponse, ReconcileAttemptRequest, ReconcileAttemptResponse } from "./protocol/fenced.js";
|
|
2
3
|
import type { WorkApproval, WorkArtifact, WorkArtifactInput, WorkChildTaskInput, WorkDisposition, WorkDispositionResponse, WorkTask, WorkTaskComment, WorkUsageDecision } from "./workTypes.js";
|
|
3
4
|
export type JsonObject = Record<string, unknown>;
|
|
4
5
|
export type ConductorConfig = {
|
|
@@ -59,8 +60,11 @@ export type ClaimedJob = {
|
|
|
59
60
|
limits: JsonObject;
|
|
60
61
|
status: string;
|
|
61
62
|
attempts: number;
|
|
63
|
+
maxAttempts?: number | undefined;
|
|
62
64
|
leaseExpiresAt?: string | undefined;
|
|
63
65
|
wakeEnvelope?: SiftWakeEnvelope | undefined;
|
|
66
|
+
authorityMode?: "legacy-v1" | "fenced-attempts-v1" | undefined;
|
|
67
|
+
authority?: AttemptAuthority | undefined;
|
|
64
68
|
};
|
|
65
69
|
export type LeaseRefresh = {
|
|
66
70
|
job: {
|
|
@@ -70,6 +74,7 @@ export type LeaseRefresh = {
|
|
|
70
74
|
leaseExpiresAt?: string | undefined;
|
|
71
75
|
};
|
|
72
76
|
cancelRequested: boolean;
|
|
77
|
+
authority?: AttemptAuthority | undefined;
|
|
73
78
|
};
|
|
74
79
|
export type RunEventType = "health" | "progress" | "log" | "artifact" | "approval_requested" | "completed" | "failed" | "cancelled";
|
|
75
80
|
export type RunEventInput = {
|
|
@@ -77,6 +82,9 @@ export type RunEventInput = {
|
|
|
77
82
|
payload?: JsonObject;
|
|
78
83
|
occurredAt?: string;
|
|
79
84
|
};
|
|
85
|
+
export type RunEventDeliveryInput = RunEventInput & Partial<ClientEventIdentity> & {
|
|
86
|
+
authority?: AttemptAuthorityFence | undefined;
|
|
87
|
+
};
|
|
80
88
|
export type RunEvent = {
|
|
81
89
|
id: string;
|
|
82
90
|
runId: string;
|
|
@@ -84,7 +92,12 @@ export type RunEvent = {
|
|
|
84
92
|
eventType: RunEventType;
|
|
85
93
|
payload: JsonObject;
|
|
86
94
|
occurredAt: string;
|
|
95
|
+
attemptId?: string | undefined;
|
|
96
|
+
clientEventId?: string | undefined;
|
|
97
|
+
clientSequence?: number | undefined;
|
|
98
|
+
acknowledgedClientSequence?: number | undefined;
|
|
87
99
|
};
|
|
100
|
+
export type RunEventAppendResult = RunEvent | EventAcknowledgement;
|
|
88
101
|
export type ConductorClient = PairConductorClient & {
|
|
89
102
|
heartbeat(credential: string, request: {
|
|
90
103
|
version?: string;
|
|
@@ -93,29 +106,31 @@ export type ConductorClient = PairConductorClient & {
|
|
|
93
106
|
}): Promise<unknown>;
|
|
94
107
|
advertiseAgents(credential: string, agents: ConductorAgentAdvertisement[]): Promise<ConductorAgent[]>;
|
|
95
108
|
claimJob(credential: string): Promise<ClaimedJob | undefined>;
|
|
96
|
-
refreshLease(credential: string, jobId: string): Promise<LeaseRefresh>;
|
|
97
|
-
appendRunEvent(credential: string, runId: string, event:
|
|
98
|
-
completeRun(credential: string, runId: string, resultSummary: JsonObject): Promise<unknown>;
|
|
99
|
-
failRun(credential: string, runId: string, errorSummary: JsonObject): Promise<unknown>;
|
|
100
|
-
acknowledgeCancellation(credential: string, runId: string, resultSummary: JsonObject): Promise<unknown>;
|
|
109
|
+
refreshLease(credential: string, jobId: string, authority?: AttemptAuthorityFence): Promise<LeaseRefresh>;
|
|
110
|
+
appendRunEvent(credential: string, runId: string, event: RunEventDeliveryInput): Promise<RunEventAppendResult>;
|
|
111
|
+
completeRun(credential: string, runId: string, resultSummary: JsonObject, options?: AttemptMutationOptions): Promise<unknown>;
|
|
112
|
+
failRun(credential: string, runId: string, errorSummary: JsonObject, options?: AttemptMutationOptions): Promise<unknown>;
|
|
113
|
+
acknowledgeCancellation(credential: string, runId: string, resultSummary: JsonObject, options?: AttemptMutationOptions): Promise<unknown>;
|
|
114
|
+
reconcileAttempt?(credential: string, request: ReconcileAttemptRequest): Promise<ReconcileAttemptResponse>;
|
|
115
|
+
registerLateResult?(credential: string, attemptId: string, request: LateResultRequest): Promise<LateResultResponse>;
|
|
101
116
|
};
|
|
102
117
|
export type ConductorWorkClient = {
|
|
103
|
-
readWorkContext(credential: string, runId: string, taskId: string): Promise<SiftWakeEnvelope>;
|
|
104
|
-
checkoutTask(credential: string, runId: string, taskId: string): Promise<WorkTask>;
|
|
105
|
-
createChildTasks(credential: string, runId: string, taskId: string, children: WorkChildTaskInput[]): Promise<WorkTask[]>;
|
|
106
|
-
addTaskComment(credential: string, runId: string, taskId: string, bodyMarkdown: string): Promise<WorkTaskComment>;
|
|
107
|
-
registerArtifact(credential: string, runId: string, taskId: string, artifact: WorkArtifactInput): Promise<WorkArtifact>;
|
|
118
|
+
readWorkContext(credential: string, runId: string, taskId: string, options?: AttemptMutationOptions): Promise<SiftWakeEnvelope>;
|
|
119
|
+
checkoutTask(credential: string, runId: string, taskId: string, options?: AttemptMutationOptions): Promise<WorkTask>;
|
|
120
|
+
createChildTasks(credential: string, runId: string, taskId: string, children: WorkChildTaskInput[], options?: AttemptMutationOptions): Promise<WorkTask[]>;
|
|
121
|
+
addTaskComment(credential: string, runId: string, taskId: string, bodyMarkdown: string, options?: AttemptMutationOptions): Promise<WorkTaskComment>;
|
|
122
|
+
registerArtifact(credential: string, runId: string, taskId: string, artifact: WorkArtifactInput, options?: AttemptMutationOptions): Promise<WorkArtifact>;
|
|
108
123
|
requestApproval(credential: string, runId: string, taskId: string, request: {
|
|
109
124
|
type: string;
|
|
110
125
|
payload?: JsonObject;
|
|
111
126
|
idempotencyKey?: string;
|
|
112
|
-
}): Promise<WorkApproval>;
|
|
127
|
+
}, options?: AttemptMutationOptions): Promise<WorkApproval>;
|
|
113
128
|
reportUsage(credential: string, runId: string, taskId: string, usage: {
|
|
114
129
|
eventKey: string;
|
|
115
130
|
costMicros: number;
|
|
116
131
|
durationMs: number;
|
|
117
|
-
}): Promise<WorkUsageDecision>;
|
|
118
|
-
setTaskDisposition(credential: string, runId: string, taskId: string, disposition: WorkDisposition, resultSummary?: JsonObject): Promise<WorkDispositionResponse>;
|
|
132
|
+
}, options?: AttemptMutationOptions): Promise<WorkUsageDecision>;
|
|
133
|
+
setTaskDisposition(credential: string, runId: string, taskId: string, disposition: WorkDisposition, resultSummary?: JsonObject, options?: AttemptMutationOptions): Promise<WorkDispositionResponse>;
|
|
119
134
|
listTasks(userCredential: string, projectId?: string): Promise<WorkTask[]>;
|
|
120
135
|
listRuns(userCredential: string, taskId?: string): Promise<ClaimedJob[]>;
|
|
121
136
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CONDUCTOR_VERSION = "0.2.0-beta.
|
|
1
|
+
export declare const CONDUCTOR_VERSION = "0.2.0-beta.2";
|
|
2
2
|
export declare const PROTOCOL_VERSION = "v1";
|
package/dist/version.js
CHANGED
package/dist/workTypes.d.ts
CHANGED
|
@@ -56,10 +56,10 @@ export declare const workArtifactSchema: z.ZodObject<{
|
|
|
56
56
|
url: z.ZodOptional<z.ZodString>;
|
|
57
57
|
brainRecordId: z.ZodOptional<z.ZodString>;
|
|
58
58
|
status: z.ZodEnum<{
|
|
59
|
+
superseded: "superseded";
|
|
60
|
+
failed: "failed";
|
|
59
61
|
pending: "pending";
|
|
60
62
|
ready: "ready";
|
|
61
|
-
failed: "failed";
|
|
62
|
-
superseded: "superseded";
|
|
63
63
|
}>;
|
|
64
64
|
reviewState: z.ZodEnum<{
|
|
65
65
|
pending: "pending";
|
|
@@ -106,9 +106,9 @@ export declare const workProjectSchema: z.ZodObject<{
|
|
|
106
106
|
description: z.ZodOptional<z.ZodString>;
|
|
107
107
|
status: z.ZodEnum<{
|
|
108
108
|
cancelled: "cancelled";
|
|
109
|
+
completed: "completed";
|
|
109
110
|
planned: "planned";
|
|
110
111
|
active: "active";
|
|
111
|
-
completed: "completed";
|
|
112
112
|
}>;
|
|
113
113
|
leadPrincipalId: z.ZodOptional<z.ZodString>;
|
|
114
114
|
contextRefs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -181,10 +181,10 @@ export declare const workTaskDetailSchema: z.ZodObject<{
|
|
|
181
181
|
url: z.ZodOptional<z.ZodString>;
|
|
182
182
|
brainRecordId: z.ZodOptional<z.ZodString>;
|
|
183
183
|
status: z.ZodEnum<{
|
|
184
|
+
superseded: "superseded";
|
|
185
|
+
failed: "failed";
|
|
184
186
|
pending: "pending";
|
|
185
187
|
ready: "ready";
|
|
186
|
-
failed: "failed";
|
|
187
|
-
superseded: "superseded";
|
|
188
188
|
}>;
|
|
189
189
|
reviewState: z.ZodEnum<{
|
|
190
190
|
pending: "pending";
|