@shapeshift-labs/frontier-swarm 0.5.24 → 0.5.26
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 +73 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +165 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +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
|
+
import { validateSemanticLeaseFence, type FrontierSemanticLeaseFenceTicket, type FrontierSemanticLeaseMutation, type FrontierSemanticLeaseRecord, type FrontierSemanticLeaseScope, type FrontierSemanticLeaseState } from '@shapeshift-labs/frontier-lease';
|
|
4
4
|
export declare const FRONTIER_SWARM_MANIFEST_KIND = "frontier.swarm.manifest";
|
|
5
5
|
export declare const FRONTIER_SWARM_MANIFEST_VERSION = 1;
|
|
6
6
|
export declare const FRONTIER_SWARM_TASK_KIND = "frontier.swarm.task";
|
|
@@ -4007,6 +4007,74 @@ export interface FrontierSwarmCoordinatorSemanticLeaseFenceInput {
|
|
|
4007
4007
|
now?: number;
|
|
4008
4008
|
requiredSemanticLeaseScopes?: readonly FrontierSemanticLeaseScope[];
|
|
4009
4009
|
}
|
|
4010
|
+
export interface FrontierSwarmCoordinatorQueueItemClaimInput {
|
|
4011
|
+
queue: FrontierSwarmHierarchicalMergeQueue;
|
|
4012
|
+
assignment?: FrontierSwarmMergeQueueAssignment;
|
|
4013
|
+
jobId?: string;
|
|
4014
|
+
queueItemId?: string;
|
|
4015
|
+
coordinatorId?: string;
|
|
4016
|
+
now?: number;
|
|
4017
|
+
metadata?: unknown;
|
|
4018
|
+
}
|
|
4019
|
+
export interface FrontierSwarmCoordinatorQueueItemClaim {
|
|
4020
|
+
id: string;
|
|
4021
|
+
queueId: string;
|
|
4022
|
+
mergeIndexId: string;
|
|
4023
|
+
generatedAt: number;
|
|
4024
|
+
coordinatorId: string;
|
|
4025
|
+
claimed: boolean;
|
|
4026
|
+
jobId?: string;
|
|
4027
|
+
taskId?: string;
|
|
4028
|
+
lane?: string;
|
|
4029
|
+
queueItemIds: string[];
|
|
4030
|
+
queueIdForAssignment?: string;
|
|
4031
|
+
assignedAction?: FrontierSwarmMergeQueueAssignmentAction;
|
|
4032
|
+
requiredLeaseScopeIds: string[];
|
|
4033
|
+
requiredLeaseKeys: string[];
|
|
4034
|
+
requiredSemanticLeaseScopes: FrontierSemanticLeaseScope[];
|
|
4035
|
+
reasons: string[];
|
|
4036
|
+
assignment?: FrontierSwarmMergeQueueAssignment;
|
|
4037
|
+
metadata?: JsonObject;
|
|
4038
|
+
}
|
|
4039
|
+
export interface FrontierSwarmCoordinatorQueueLeaseClaimInput extends Omit<FrontierSwarmCoordinatorSemanticLeaseAcquireInput, 'queue' | 'assignment'> {
|
|
4040
|
+
queue: FrontierSwarmHierarchicalMergeQueue;
|
|
4041
|
+
claim: FrontierSwarmCoordinatorQueueItemClaim;
|
|
4042
|
+
state?: FrontierSemanticLeaseState;
|
|
4043
|
+
}
|
|
4044
|
+
export interface FrontierSwarmCoordinatorQueueLeaseClaim {
|
|
4045
|
+
id: string;
|
|
4046
|
+
queueId: string;
|
|
4047
|
+
claimId: string;
|
|
4048
|
+
generatedAt: number;
|
|
4049
|
+
granted: boolean;
|
|
4050
|
+
state: FrontierSemanticLeaseState;
|
|
4051
|
+
mutation: FrontierSemanticLeaseMutation;
|
|
4052
|
+
scopes: FrontierSemanticLeaseScope[];
|
|
4053
|
+
requiredLeaseScopeIds: string[];
|
|
4054
|
+
requiredLeaseKeys: string[];
|
|
4055
|
+
lease?: FrontierSemanticLeaseRecord;
|
|
4056
|
+
fence?: FrontierSemanticLeaseFenceTicket;
|
|
4057
|
+
reasons: string[];
|
|
4058
|
+
}
|
|
4059
|
+
export interface FrontierSwarmCoordinatorClaimDecisionInput {
|
|
4060
|
+
claim: FrontierSwarmCoordinatorQueueItemClaim;
|
|
4061
|
+
leaseClaim?: FrontierSwarmCoordinatorQueueLeaseClaim;
|
|
4062
|
+
decision?: FrontierSwarmCoordinatorAgentDrainDecision | string;
|
|
4063
|
+
outcome?: FrontierSwarmQueueOutcome;
|
|
4064
|
+
category?: FrontierSwarmQueueOutcomeCategory;
|
|
4065
|
+
terminal?: boolean;
|
|
4066
|
+
status?: string;
|
|
4067
|
+
reasons?: readonly string[];
|
|
4068
|
+
conflictingJobIds?: readonly string[];
|
|
4069
|
+
generatedAt?: number;
|
|
4070
|
+
metadata?: unknown;
|
|
4071
|
+
}
|
|
4072
|
+
export interface FrontierSwarmCoordinatorClaimDecision {
|
|
4073
|
+
claim: FrontierSwarmCoordinatorQueueItemClaim;
|
|
4074
|
+
leaseClaim?: FrontierSwarmCoordinatorQueueLeaseClaim;
|
|
4075
|
+
decision: FrontierSwarmQueueOutcomeDecision;
|
|
4076
|
+
runEvents: FrontierRunEvent[];
|
|
4077
|
+
}
|
|
4010
4078
|
export interface FrontierSwarmCoordinatorAgentPromotedWork {
|
|
4011
4079
|
id: string;
|
|
4012
4080
|
jobId: string;
|
|
@@ -4326,6 +4394,10 @@ export declare function createSwarmSemanticLeaseStateForMergeQueue(queue: Fronti
|
|
|
4326
4394
|
}): FrontierSemanticLeaseState;
|
|
4327
4395
|
export declare function acquireSwarmCoordinatorSemanticLease(input: FrontierSwarmCoordinatorSemanticLeaseAcquireInput): FrontierSwarmCoordinatorSemanticLeaseAcquireResult;
|
|
4328
4396
|
export declare function validateSwarmCoordinatorSemanticLeaseFence(input: FrontierSwarmCoordinatorSemanticLeaseFenceInput): ReturnType<typeof validateSemanticLeaseFence>;
|
|
4397
|
+
export declare function claimSwarmCoordinatorQueueItem(input: FrontierSwarmCoordinatorQueueItemClaimInput): FrontierSwarmCoordinatorQueueItemClaim;
|
|
4398
|
+
export declare function claimSwarmCoordinatorQueueLease(input: FrontierSwarmCoordinatorQueueLeaseClaimInput): FrontierSwarmCoordinatorQueueLeaseClaim;
|
|
4399
|
+
export declare function decideSwarmCoordinatorClaim(input: FrontierSwarmCoordinatorClaimDecisionInput): FrontierSwarmCoordinatorClaimDecision;
|
|
4400
|
+
export declare function createRunEventsFromCoordinatorClaimDecision(decision: FrontierSwarmQueueOutcomeDecision | FrontierSwarmQueueOutcomeDecisionInput, options?: FrontierSwarmRunEventAdapterOptions): FrontierRunEvent[];
|
|
4329
4401
|
export declare function summarizeSwarmCoordinatorAgentDrainWork(work: Pick<FrontierSwarmCoordinatorAgentDrainWork, 'leases' | 'assignments' | 'terminalDecisions' | 'promotedWork'>): FrontierSwarmCoordinatorAgentDrainWorkConsumerSummary;
|
|
4330
4402
|
export declare function createSwarmContinuousPoolState(input?: FrontierSwarmContinuousPoolStateInput): FrontierSwarmContinuousPoolState;
|
|
4331
4403
|
export declare function classifySwarmQueueOutcome(input: FrontierSwarmQueueOutcomeDecisionInput): FrontierSwarmQueueOutcomeClassification;
|