@shapeshift-labs/frontier-swarm 0.5.22 → 0.5.23

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 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";
@@ -3308,6 +3309,7 @@ export interface FrontierSwarmMergeQueueScope {
3308
3309
  changedRegions: string[];
3309
3310
  leaseKey: string;
3310
3311
  jobIds: string[];
3312
+ semanticLeaseScope?: FrontierSemanticLeaseScope;
3311
3313
  metadata?: JsonObject;
3312
3314
  }
3313
3315
  export interface FrontierSwarmMergeQueueRetrySlice {
@@ -3318,6 +3320,8 @@ export interface FrontierSwarmMergeQueueRetrySlice {
3318
3320
  leaseKey: string;
3319
3321
  requiredLeaseScopeIds?: string[];
3320
3322
  requiredLeaseKeys?: string[];
3323
+ semanticLeaseScope?: FrontierSemanticLeaseScope;
3324
+ requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
3321
3325
  lane?: string;
3322
3326
  changedPaths: string[];
3323
3327
  changedRegions: string[];
@@ -3375,6 +3379,7 @@ export interface FrontierSwarmHierarchicalQueueLeaseRecord {
3375
3379
  lane?: string;
3376
3380
  title: string;
3377
3381
  leaseKey: string;
3382
+ semanticLeaseScope?: FrontierSemanticLeaseScope;
3378
3383
  localLeader?: FrontierSwarmHierarchicalQueueLocalLeader;
3379
3384
  promotion: FrontierSwarmHierarchicalQueuePromotionState;
3380
3385
  conflictReasons: string[];
@@ -3426,6 +3431,7 @@ export interface FrontierSwarmHierarchicalMergeQueue {
3426
3431
  byScope: Record<string, string[]>;
3427
3432
  byLeaseKey: Record<string, string[]>;
3428
3433
  byAction: Record<string, string[]>;
3434
+ semanticLeaseScopes: FrontierSemanticLeaseScope[];
3429
3435
  summary: {
3430
3436
  scopeCount: number;
3431
3437
  assignmentCount: number;
@@ -3460,6 +3466,7 @@ export interface FrontierSwarmMergeQueueAssignment {
3460
3466
  leaseKey: string;
3461
3467
  requiredLeaseScopeIds?: string[];
3462
3468
  requiredLeaseKeys?: string[];
3469
+ requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
3463
3470
  promoteToScopeId?: string;
3464
3471
  terminalDecisionId?: string;
3465
3472
  terminalDecisionQueueItemIds?: string[];
@@ -3879,6 +3886,7 @@ export interface FrontierSwarmCoordinatorAgentDrainLease {
3879
3886
  title: string;
3880
3887
  leaseScope: string;
3881
3888
  leaseKey: string;
3889
+ semanticLeaseScope?: FrontierSemanticLeaseScope;
3882
3890
  parentQueueId?: string;
3883
3891
  lane?: string;
3884
3892
  changedPaths: string[];
@@ -3921,6 +3929,7 @@ export interface FrontierSwarmCoordinatorAgentDrainAssignment {
3921
3929
  semanticSliceLeaseKeys?: string[];
3922
3930
  requiredLeaseScopeIds?: string[];
3923
3931
  requiredLeaseKeys?: string[];
3932
+ requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
3924
3933
  parentDecisionRegions?: string[];
3925
3934
  unknownRegions?: string[];
3926
3935
  metadata?: JsonObject;
@@ -3942,10 +3951,49 @@ export interface FrontierSwarmCoordinatorAgentDrainTerminalDecision {
3942
3951
  semanticSliceLeaseKeys?: string[];
3943
3952
  requiredLeaseScopeIds?: string[];
3944
3953
  requiredLeaseKeys?: string[];
3954
+ requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
3945
3955
  parentDecisionRegions?: string[];
3946
3956
  unknownRegions?: string[];
3947
3957
  metadata?: JsonObject;
3948
3958
  }
3959
+ export interface FrontierSwarmSemanticLeaseScopeOptions {
3960
+ repository?: string;
3961
+ packageId?: string;
3962
+ rootScopeId?: string;
3963
+ metadata?: unknown;
3964
+ }
3965
+ export interface FrontierSwarmCoordinatorSemanticLeaseAcquireInput {
3966
+ queue: FrontierSwarmHierarchicalMergeQueue;
3967
+ assignment: FrontierSwarmMergeQueueAssignment | FrontierSwarmCoordinatorAgentDrainAssignment;
3968
+ state?: FrontierSemanticLeaseState;
3969
+ ownerId: string;
3970
+ holderId?: string;
3971
+ now?: number;
3972
+ ttlMs?: number;
3973
+ purpose?: string;
3974
+ reason?: string;
3975
+ repository?: string;
3976
+ packageId?: string;
3977
+ metadata?: unknown;
3978
+ }
3979
+ export interface FrontierSwarmCoordinatorSemanticLeaseAcquireResult {
3980
+ state: FrontierSemanticLeaseState;
3981
+ mutation: FrontierSemanticLeaseMutation;
3982
+ scopes: FrontierSemanticLeaseScope[];
3983
+ requiredLeaseScopeIds: string[];
3984
+ requiredLeaseKeys: string[];
3985
+ lease?: FrontierSemanticLeaseRecord;
3986
+ }
3987
+ export interface FrontierSwarmCoordinatorSemanticLeaseFenceInput {
3988
+ assignment: FrontierSwarmMergeQueueAssignment | FrontierSwarmCoordinatorAgentDrainAssignment;
3989
+ state: FrontierSemanticLeaseState;
3990
+ lease?: FrontierSemanticLeaseRecord;
3991
+ leaseId?: string;
3992
+ token: string;
3993
+ fencingToken: number;
3994
+ now?: number;
3995
+ requiredSemanticLeaseScopes?: readonly FrontierSemanticLeaseScope[];
3996
+ }
3949
3997
  export interface FrontierSwarmCoordinatorAgentPromotedWork {
3950
3998
  id: string;
3951
3999
  jobId: string;
@@ -3963,6 +4011,7 @@ export interface FrontierSwarmCoordinatorAgentPromotedWork {
3963
4011
  reasons: string[];
3964
4012
  requiredLeaseScopeIds?: string[];
3965
4013
  requiredLeaseKeys?: string[];
4014
+ requiredSemanticLeaseScopes?: FrontierSemanticLeaseScope[];
3966
4015
  metadata?: JsonObject;
3967
4016
  }
3968
4017
  export interface FrontierSwarmContinuousPoolWorkItemInput {
@@ -4250,6 +4299,18 @@ export declare function createSwarmLanePlaybook(input: FrontierSwarmLanePlaybook
4250
4299
  export declare function createSwarmPatchStackPlan(input: FrontierSwarmPatchStackPlanInput): FrontierSwarmPatchStackPlan;
4251
4300
  export declare function createSwarmHierarchicalMergeQueue(input: FrontierSwarmHierarchicalMergeQueueInput): FrontierSwarmHierarchicalMergeQueue;
4252
4301
  export declare function createSwarmCoordinatorAgentDrainWork(input: FrontierSwarmCoordinatorAgentDrainWorkInput): FrontierSwarmCoordinatorAgentDrainWork;
4302
+ export declare function createSwarmSemanticLeaseScopeForMergeQueueScope(scope: FrontierSwarmMergeQueueScope, input?: FrontierSwarmSemanticLeaseScopeOptions & {
4303
+ scopes?: readonly FrontierSwarmMergeQueueScope[];
4304
+ }): FrontierSemanticLeaseScope;
4305
+ export declare function createSwarmSemanticLeaseScopesForMergeQueue(queue: FrontierSwarmHierarchicalMergeQueue, input?: FrontierSwarmSemanticLeaseScopeOptions): FrontierSemanticLeaseScope[];
4306
+ export declare function createSwarmSemanticLeaseStateForMergeQueue(queue: FrontierSwarmHierarchicalMergeQueue, input?: FrontierSwarmSemanticLeaseScopeOptions & {
4307
+ id?: string;
4308
+ defaultTtlMs?: number;
4309
+ now?: number;
4310
+ metadata?: unknown;
4311
+ }): FrontierSemanticLeaseState;
4312
+ export declare function acquireSwarmCoordinatorSemanticLease(input: FrontierSwarmCoordinatorSemanticLeaseAcquireInput): FrontierSwarmCoordinatorSemanticLeaseAcquireResult;
4313
+ export declare function validateSwarmCoordinatorSemanticLeaseFence(input: FrontierSwarmCoordinatorSemanticLeaseFenceInput): ReturnType<typeof validateSemanticLeaseFence>;
4253
4314
  export declare function summarizeSwarmCoordinatorAgentDrainWork(work: Pick<FrontierSwarmCoordinatorAgentDrainWork, 'leases' | 'assignments' | 'terminalDecisions' | 'promotedWork'>): FrontierSwarmCoordinatorAgentDrainWorkConsumerSummary;
4254
4315
  export declare function createSwarmContinuousPoolState(input?: FrontierSwarmContinuousPoolStateInput): FrontierSwarmContinuousPoolState;
4255
4316
  export declare function classifySwarmQueueOutcome(input: FrontierSwarmQueueOutcomeDecisionInput): FrontierSwarmQueueOutcomeClassification;