@shapeshift-labs/frontier-swarm 0.5.22 → 0.5.24
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/index.d.ts +76 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +574 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { JsonObject, JsonValue } from '@shapeshift-labs/frontier';
|
|
2
2
|
import { type FrontierRunActorId, type FrontierRunDashboardSnapshot, type FrontierRunEvent, type FrontierRunEventId, type FrontierRunProjection } from '@shapeshift-labs/frontier-run';
|
|
3
|
+
import { validateSemanticLeaseFence, type FrontierSemanticLeaseMutation, type FrontierSemanticLeaseRecord, type FrontierSemanticLeaseScope, type FrontierSemanticLeaseState } from '@shapeshift-labs/frontier-lease';
|
|
3
4
|
export declare const FRONTIER_SWARM_MANIFEST_KIND = "frontier.swarm.manifest";
|
|
4
5
|
export declare const FRONTIER_SWARM_MANIFEST_VERSION = 1;
|
|
5
6
|
export declare const FRONTIER_SWARM_TASK_KIND = "frontier.swarm.task";
|
|
@@ -1764,6 +1765,19 @@ export interface FrontierSwarmRunProjectionOptions {
|
|
|
1764
1765
|
goal?: string;
|
|
1765
1766
|
metadata?: unknown;
|
|
1766
1767
|
}
|
|
1768
|
+
export interface FrontierSwarmRunFromProjectionOptions {
|
|
1769
|
+
plan: FrontierSwarmPlan;
|
|
1770
|
+
id?: string;
|
|
1771
|
+
startedAt?: number;
|
|
1772
|
+
status?: FrontierSwarmJobStatus;
|
|
1773
|
+
metadata?: unknown;
|
|
1774
|
+
}
|
|
1775
|
+
export interface FrontierSwarmQueueOverlayFromProjectionOptions {
|
|
1776
|
+
plan: FrontierSwarmPlan;
|
|
1777
|
+
id?: string;
|
|
1778
|
+
generatedAt?: number;
|
|
1779
|
+
metadata?: unknown;
|
|
1780
|
+
}
|
|
1767
1781
|
export interface FrontierSwarmEventInput {
|
|
1768
1782
|
id?: string;
|
|
1769
1783
|
type: string;
|
|
@@ -3308,6 +3322,7 @@ export interface FrontierSwarmMergeQueueScope {
|
|
|
3308
3322
|
changedRegions: string[];
|
|
3309
3323
|
leaseKey: string;
|
|
3310
3324
|
jobIds: string[];
|
|
3325
|
+
semanticLeaseScope?: FrontierSemanticLeaseScope;
|
|
3311
3326
|
metadata?: JsonObject;
|
|
3312
3327
|
}
|
|
3313
3328
|
export interface FrontierSwarmMergeQueueRetrySlice {
|
|
@@ -3318,6 +3333,8 @@ export interface FrontierSwarmMergeQueueRetrySlice {
|
|
|
3318
3333
|
leaseKey: string;
|
|
3319
3334
|
requiredLeaseScopeIds?: string[];
|
|
3320
3335
|
requiredLeaseKeys?: string[];
|
|
3336
|
+
semanticLeaseScope?: FrontierSemanticLeaseScope;
|
|
3337
|
+
requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
|
|
3321
3338
|
lane?: string;
|
|
3322
3339
|
changedPaths: string[];
|
|
3323
3340
|
changedRegions: string[];
|
|
@@ -3375,6 +3392,7 @@ export interface FrontierSwarmHierarchicalQueueLeaseRecord {
|
|
|
3375
3392
|
lane?: string;
|
|
3376
3393
|
title: string;
|
|
3377
3394
|
leaseKey: string;
|
|
3395
|
+
semanticLeaseScope?: FrontierSemanticLeaseScope;
|
|
3378
3396
|
localLeader?: FrontierSwarmHierarchicalQueueLocalLeader;
|
|
3379
3397
|
promotion: FrontierSwarmHierarchicalQueuePromotionState;
|
|
3380
3398
|
conflictReasons: string[];
|
|
@@ -3426,6 +3444,7 @@ export interface FrontierSwarmHierarchicalMergeQueue {
|
|
|
3426
3444
|
byScope: Record<string, string[]>;
|
|
3427
3445
|
byLeaseKey: Record<string, string[]>;
|
|
3428
3446
|
byAction: Record<string, string[]>;
|
|
3447
|
+
semanticLeaseScopes: FrontierSemanticLeaseScope[];
|
|
3429
3448
|
summary: {
|
|
3430
3449
|
scopeCount: number;
|
|
3431
3450
|
assignmentCount: number;
|
|
@@ -3460,6 +3479,7 @@ export interface FrontierSwarmMergeQueueAssignment {
|
|
|
3460
3479
|
leaseKey: string;
|
|
3461
3480
|
requiredLeaseScopeIds?: string[];
|
|
3462
3481
|
requiredLeaseKeys?: string[];
|
|
3482
|
+
requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
|
|
3463
3483
|
promoteToScopeId?: string;
|
|
3464
3484
|
terminalDecisionId?: string;
|
|
3465
3485
|
terminalDecisionQueueItemIds?: string[];
|
|
@@ -3879,6 +3899,7 @@ export interface FrontierSwarmCoordinatorAgentDrainLease {
|
|
|
3879
3899
|
title: string;
|
|
3880
3900
|
leaseScope: string;
|
|
3881
3901
|
leaseKey: string;
|
|
3902
|
+
semanticLeaseScope?: FrontierSemanticLeaseScope;
|
|
3882
3903
|
parentQueueId?: string;
|
|
3883
3904
|
lane?: string;
|
|
3884
3905
|
changedPaths: string[];
|
|
@@ -3921,6 +3942,7 @@ export interface FrontierSwarmCoordinatorAgentDrainAssignment {
|
|
|
3921
3942
|
semanticSliceLeaseKeys?: string[];
|
|
3922
3943
|
requiredLeaseScopeIds?: string[];
|
|
3923
3944
|
requiredLeaseKeys?: string[];
|
|
3945
|
+
requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
|
|
3924
3946
|
parentDecisionRegions?: string[];
|
|
3925
3947
|
unknownRegions?: string[];
|
|
3926
3948
|
metadata?: JsonObject;
|
|
@@ -3942,10 +3964,49 @@ export interface FrontierSwarmCoordinatorAgentDrainTerminalDecision {
|
|
|
3942
3964
|
semanticSliceLeaseKeys?: string[];
|
|
3943
3965
|
requiredLeaseScopeIds?: string[];
|
|
3944
3966
|
requiredLeaseKeys?: string[];
|
|
3967
|
+
requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
|
|
3945
3968
|
parentDecisionRegions?: string[];
|
|
3946
3969
|
unknownRegions?: string[];
|
|
3947
3970
|
metadata?: JsonObject;
|
|
3948
3971
|
}
|
|
3972
|
+
export interface FrontierSwarmSemanticLeaseScopeOptions {
|
|
3973
|
+
repository?: string;
|
|
3974
|
+
packageId?: string;
|
|
3975
|
+
rootScopeId?: string;
|
|
3976
|
+
metadata?: unknown;
|
|
3977
|
+
}
|
|
3978
|
+
export interface FrontierSwarmCoordinatorSemanticLeaseAcquireInput {
|
|
3979
|
+
queue: FrontierSwarmHierarchicalMergeQueue;
|
|
3980
|
+
assignment: FrontierSwarmMergeQueueAssignment | FrontierSwarmCoordinatorAgentDrainAssignment;
|
|
3981
|
+
state?: FrontierSemanticLeaseState;
|
|
3982
|
+
ownerId: string;
|
|
3983
|
+
holderId?: string;
|
|
3984
|
+
now?: number;
|
|
3985
|
+
ttlMs?: number;
|
|
3986
|
+
purpose?: string;
|
|
3987
|
+
reason?: string;
|
|
3988
|
+
repository?: string;
|
|
3989
|
+
packageId?: string;
|
|
3990
|
+
metadata?: unknown;
|
|
3991
|
+
}
|
|
3992
|
+
export interface FrontierSwarmCoordinatorSemanticLeaseAcquireResult {
|
|
3993
|
+
state: FrontierSemanticLeaseState;
|
|
3994
|
+
mutation: FrontierSemanticLeaseMutation;
|
|
3995
|
+
scopes: FrontierSemanticLeaseScope[];
|
|
3996
|
+
requiredLeaseScopeIds: string[];
|
|
3997
|
+
requiredLeaseKeys: string[];
|
|
3998
|
+
lease?: FrontierSemanticLeaseRecord;
|
|
3999
|
+
}
|
|
4000
|
+
export interface FrontierSwarmCoordinatorSemanticLeaseFenceInput {
|
|
4001
|
+
assignment: FrontierSwarmMergeQueueAssignment | FrontierSwarmCoordinatorAgentDrainAssignment;
|
|
4002
|
+
state: FrontierSemanticLeaseState;
|
|
4003
|
+
lease?: FrontierSemanticLeaseRecord;
|
|
4004
|
+
leaseId?: string;
|
|
4005
|
+
token: string;
|
|
4006
|
+
fencingToken: number;
|
|
4007
|
+
now?: number;
|
|
4008
|
+
requiredSemanticLeaseScopes?: readonly FrontierSemanticLeaseScope[];
|
|
4009
|
+
}
|
|
3949
4010
|
export interface FrontierSwarmCoordinatorAgentPromotedWork {
|
|
3950
4011
|
id: string;
|
|
3951
4012
|
jobId: string;
|
|
@@ -3963,6 +4024,7 @@ export interface FrontierSwarmCoordinatorAgentPromotedWork {
|
|
|
3963
4024
|
reasons: string[];
|
|
3964
4025
|
requiredLeaseScopeIds?: string[];
|
|
3965
4026
|
requiredLeaseKeys?: string[];
|
|
4027
|
+
requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
|
|
3966
4028
|
metadata?: JsonObject;
|
|
3967
4029
|
}
|
|
3968
4030
|
export interface FrontierSwarmContinuousPoolWorkItemInput {
|
|
@@ -4192,6 +4254,8 @@ export declare function createRunEventsFromSwarmResult(resultInput: FrontierSwar
|
|
|
4192
4254
|
export declare function createRunEventsFromMergeBundle(bundle: FrontierSwarmMergeBundle, options?: FrontierSwarmRunEventAdapterOptions): FrontierRunEvent[];
|
|
4193
4255
|
export declare function createRunEventsFromCoordinatorDecision(decision: FrontierSwarmQueueOutcomeDecision | FrontierSwarmQueueOutcomeDecisionInput, options?: FrontierSwarmRunEventAdapterOptions): FrontierRunEvent[];
|
|
4194
4256
|
export declare function createRunProjectionFromSwarmRunEvents(events: readonly FrontierRunEvent[], options?: FrontierSwarmRunProjectionOptions): FrontierRunProjection;
|
|
4257
|
+
export declare function createSwarmRunFromRunProjection(projection: FrontierRunProjection, options: FrontierSwarmRunFromProjectionOptions): FrontierSwarmRun;
|
|
4258
|
+
export declare function createSwarmQueueOverlayFromRunProjection(projection: FrontierRunProjection, options: FrontierSwarmQueueOverlayFromProjectionOptions): FrontierSwarmQueueOverlay;
|
|
4195
4259
|
export declare function createRunDashboardFromSwarmRun(input: FrontierSwarmRun | readonly FrontierRunEvent[], options?: FrontierSwarmRunProjectionOptions): FrontierRunDashboardSnapshot;
|
|
4196
4260
|
export declare function createRunEventsFromSwarmRun(run: FrontierSwarmRun, options?: FrontierSwarmRunEventAdapterOptions): FrontierRunEvent[];
|
|
4197
4261
|
export declare function recordSwarmEvent(runInput: FrontierSwarmRun, eventInput: FrontierSwarmEventInput): FrontierSwarmRun;
|
|
@@ -4250,6 +4314,18 @@ export declare function createSwarmLanePlaybook(input: FrontierSwarmLanePlaybook
|
|
|
4250
4314
|
export declare function createSwarmPatchStackPlan(input: FrontierSwarmPatchStackPlanInput): FrontierSwarmPatchStackPlan;
|
|
4251
4315
|
export declare function createSwarmHierarchicalMergeQueue(input: FrontierSwarmHierarchicalMergeQueueInput): FrontierSwarmHierarchicalMergeQueue;
|
|
4252
4316
|
export declare function createSwarmCoordinatorAgentDrainWork(input: FrontierSwarmCoordinatorAgentDrainWorkInput): FrontierSwarmCoordinatorAgentDrainWork;
|
|
4317
|
+
export declare function createSwarmSemanticLeaseScopeForMergeQueueScope(scope: FrontierSwarmMergeQueueScope, input?: FrontierSwarmSemanticLeaseScopeOptions & {
|
|
4318
|
+
scopes?: readonly FrontierSwarmMergeQueueScope[];
|
|
4319
|
+
}): FrontierSemanticLeaseScope;
|
|
4320
|
+
export declare function createSwarmSemanticLeaseScopesForMergeQueue(queue: FrontierSwarmHierarchicalMergeQueue, input?: FrontierSwarmSemanticLeaseScopeOptions): FrontierSemanticLeaseScope[];
|
|
4321
|
+
export declare function createSwarmSemanticLeaseStateForMergeQueue(queue: FrontierSwarmHierarchicalMergeQueue, input?: FrontierSwarmSemanticLeaseScopeOptions & {
|
|
4322
|
+
id?: string;
|
|
4323
|
+
defaultTtlMs?: number;
|
|
4324
|
+
now?: number;
|
|
4325
|
+
metadata?: unknown;
|
|
4326
|
+
}): FrontierSemanticLeaseState;
|
|
4327
|
+
export declare function acquireSwarmCoordinatorSemanticLease(input: FrontierSwarmCoordinatorSemanticLeaseAcquireInput): FrontierSwarmCoordinatorSemanticLeaseAcquireResult;
|
|
4328
|
+
export declare function validateSwarmCoordinatorSemanticLeaseFence(input: FrontierSwarmCoordinatorSemanticLeaseFenceInput): ReturnType<typeof validateSemanticLeaseFence>;
|
|
4253
4329
|
export declare function summarizeSwarmCoordinatorAgentDrainWork(work: Pick<FrontierSwarmCoordinatorAgentDrainWork, 'leases' | 'assignments' | 'terminalDecisions' | 'promotedWork'>): FrontierSwarmCoordinatorAgentDrainWorkConsumerSummary;
|
|
4254
4330
|
export declare function createSwarmContinuousPoolState(input?: FrontierSwarmContinuousPoolStateInput): FrontierSwarmContinuousPoolState;
|
|
4255
4331
|
export declare function classifySwarmQueueOutcome(input: FrontierSwarmQueueOutcomeDecisionInput): FrontierSwarmQueueOutcomeClassification;
|