@granular-software/sdk 0.4.33 → 0.4.34
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-evals.d.mts +1 -1
- package/dist/agent-evals.d.ts +1 -1
- package/dist/agent-evals.js +84 -9
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +84 -9
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/cli/index.js +84 -9
- package/dist/{client-DTvI5MUG.d.mts → client-iw76FL_8.d.mts} +25 -2
- package/dist/{client-DTvI5MUG.d.ts → client-iw76FL_8.d.ts} +25 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +84 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -19956,6 +19956,50 @@ function computeEffectKey(effect) {
|
|
|
19956
19956
|
}
|
|
19957
19957
|
return effect.static ? `class:${attachedClass}:static:${effect.name}` : `class:${attachedClass}:instance:${effect.name}`;
|
|
19958
19958
|
}
|
|
19959
|
+
function computeEffectVersionSelectorSpecificity(selector) {
|
|
19960
|
+
if (!selector || selector.mode === "all") {
|
|
19961
|
+
return 0;
|
|
19962
|
+
}
|
|
19963
|
+
if (selector.mode === "exact") {
|
|
19964
|
+
return 2;
|
|
19965
|
+
}
|
|
19966
|
+
return 1;
|
|
19967
|
+
}
|
|
19968
|
+
function matchesEffectVersionSelector(selector, buildVersionNumber) {
|
|
19969
|
+
if (!selector || selector.mode === "all") {
|
|
19970
|
+
return true;
|
|
19971
|
+
}
|
|
19972
|
+
if (typeof buildVersionNumber !== "number" || !Number.isFinite(buildVersionNumber)) {
|
|
19973
|
+
return false;
|
|
19974
|
+
}
|
|
19975
|
+
if (selector.mode === "exact") {
|
|
19976
|
+
return buildVersionNumber === selector.versionNumber;
|
|
19977
|
+
}
|
|
19978
|
+
if (selector.mode === "before") {
|
|
19979
|
+
return buildVersionNumber < selector.versionNumber;
|
|
19980
|
+
}
|
|
19981
|
+
return buildVersionNumber > selector.versionNumber;
|
|
19982
|
+
}
|
|
19983
|
+
function selectRegisteredEffect(effectMap, effectKey, buildVersionNumber) {
|
|
19984
|
+
let bestEffect;
|
|
19985
|
+
let bestSpecificity = Number.NEGATIVE_INFINITY;
|
|
19986
|
+
for (const effect of effectMap.values()) {
|
|
19987
|
+
if (computeEffectKey(effect) !== effectKey) {
|
|
19988
|
+
continue;
|
|
19989
|
+
}
|
|
19990
|
+
if (!matchesEffectVersionSelector(effect.versionSelector, buildVersionNumber)) {
|
|
19991
|
+
continue;
|
|
19992
|
+
}
|
|
19993
|
+
const specificity = computeEffectVersionSelectorSpecificity(
|
|
19994
|
+
effect.versionSelector
|
|
19995
|
+
);
|
|
19996
|
+
if (!bestEffect || specificity > bestSpecificity) {
|
|
19997
|
+
bestEffect = effect;
|
|
19998
|
+
bestSpecificity = specificity;
|
|
19999
|
+
}
|
|
20000
|
+
}
|
|
20001
|
+
return bestEffect;
|
|
20002
|
+
}
|
|
19959
20003
|
function normalizeEffectBehaviors(value) {
|
|
19960
20004
|
return normalizeEffectBehaviorSummary(
|
|
19961
20005
|
value
|
|
@@ -19976,9 +20020,17 @@ function resolveReverseEffect(effectMap, currentEffect, request, behaviors) {
|
|
|
19976
20020
|
return void 0;
|
|
19977
20021
|
}
|
|
19978
20022
|
if (reverseHandler.includes(":")) {
|
|
19979
|
-
return
|
|
20023
|
+
return selectRegisteredEffect(
|
|
20024
|
+
effectMap,
|
|
20025
|
+
reverseHandler,
|
|
20026
|
+
request.context?.buildVersionNumber
|
|
20027
|
+
);
|
|
19980
20028
|
}
|
|
19981
|
-
const directMatch =
|
|
20029
|
+
const directMatch = selectRegisteredEffect(
|
|
20030
|
+
effectMap,
|
|
20031
|
+
reverseHandler,
|
|
20032
|
+
request.context?.buildVersionNumber
|
|
20033
|
+
);
|
|
19982
20034
|
if (directMatch) {
|
|
19983
20035
|
return directMatch;
|
|
19984
20036
|
}
|
|
@@ -19993,7 +20045,11 @@ function resolveReverseEffect(effectMap, currentEffect, request, behaviors) {
|
|
|
19993
20045
|
})
|
|
19994
20046
|
];
|
|
19995
20047
|
for (const candidateKey of candidateKeys) {
|
|
19996
|
-
const candidate =
|
|
20048
|
+
const candidate = selectRegisteredEffect(
|
|
20049
|
+
effectMap,
|
|
20050
|
+
candidateKey,
|
|
20051
|
+
request.context?.buildVersionNumber
|
|
20052
|
+
);
|
|
19997
20053
|
if (candidate) {
|
|
19998
20054
|
return candidate;
|
|
19999
20055
|
}
|
|
@@ -20029,7 +20085,11 @@ function resolveHandlerForMode(effectMap, effect, request) {
|
|
|
20029
20085
|
return { effect, mode, handler: effect.handler };
|
|
20030
20086
|
}
|
|
20031
20087
|
async function invokeRegisteredEffect(effectMap, request) {
|
|
20032
|
-
const effect =
|
|
20088
|
+
const effect = selectRegisteredEffect(
|
|
20089
|
+
effectMap,
|
|
20090
|
+
request.effectKey,
|
|
20091
|
+
request.context?.buildVersionNumber
|
|
20092
|
+
);
|
|
20033
20093
|
if (!effect) {
|
|
20034
20094
|
throw new Error(`Effect handler not found: ${request.effectKey}`);
|
|
20035
20095
|
}
|
|
@@ -20150,6 +20210,17 @@ function computeEffectKey2(effect) {
|
|
|
20150
20210
|
}
|
|
20151
20211
|
return effect.static ? `class:${attachedClass}:static:${effect.name}` : `class:${attachedClass}:instance:${effect.name}`;
|
|
20152
20212
|
}
|
|
20213
|
+
function computeEffectVersionSelectorKey(selector) {
|
|
20214
|
+
if (!selector || selector.mode === "all") {
|
|
20215
|
+
return "all";
|
|
20216
|
+
}
|
|
20217
|
+
return `${selector.mode}:${selector.versionNumber}`;
|
|
20218
|
+
}
|
|
20219
|
+
function computeEffectRegistrationKey(effect) {
|
|
20220
|
+
return `${computeEffectKey2(effect)}@${computeEffectVersionSelectorKey(
|
|
20221
|
+
effect.versionSelector
|
|
20222
|
+
)}`;
|
|
20223
|
+
}
|
|
20153
20224
|
function buildEffectHostUrl(apiUrl, sandboxId, effectClientId, clientId) {
|
|
20154
20225
|
const url = new URL(apiUrl);
|
|
20155
20226
|
if (url.pathname.endsWith("/granular/ws/connect")) {
|
|
@@ -21671,7 +21742,7 @@ var Granular = class _Granular {
|
|
|
21671
21742
|
onUnexpectedClose;
|
|
21672
21743
|
onReconnectError;
|
|
21673
21744
|
debugHttp = process.env.GRANULAR_DEBUG_HTTP === "1";
|
|
21674
|
-
/** Sandbox-level effect registry: sandboxId → (effectKey → ToolWithHandler) */
|
|
21745
|
+
/** Sandbox-level effect registry: sandboxId → (effectKey@selector → ToolWithHandler) */
|
|
21675
21746
|
sandboxEffects = /* @__PURE__ */ new Map();
|
|
21676
21747
|
/** Live sandbox-scoped effect hosts keyed by sandboxId */
|
|
21677
21748
|
sandboxEffectHosts = /* @__PURE__ */ new Map();
|
|
@@ -22090,7 +22161,8 @@ var Granular = class _Granular {
|
|
|
22090
22161
|
provenance: effect.provenance || { source: "custom" },
|
|
22091
22162
|
tags: effect.tags,
|
|
22092
22163
|
className: effect.className,
|
|
22093
|
-
static: effect.static
|
|
22164
|
+
static: effect.static,
|
|
22165
|
+
versionSelector: effect.versionSelector
|
|
22094
22166
|
};
|
|
22095
22167
|
}
|
|
22096
22168
|
async publishSandboxEffectCatalog(host) {
|
|
@@ -22278,7 +22350,10 @@ var Granular = class _Granular {
|
|
|
22278
22350
|
async registerEffect(sandboxNameOrId, effect) {
|
|
22279
22351
|
const sandbox = await this.findOrCreateSandbox(sandboxNameOrId);
|
|
22280
22352
|
const sandboxId = sandbox.sandboxId;
|
|
22281
|
-
this.getSandboxEffectMap(sandboxId).set(
|
|
22353
|
+
this.getSandboxEffectMap(sandboxId).set(
|
|
22354
|
+
computeEffectRegistrationKey(effect),
|
|
22355
|
+
effect
|
|
22356
|
+
);
|
|
22282
22357
|
await this.syncSandboxEffectCatalog(sandboxId);
|
|
22283
22358
|
}
|
|
22284
22359
|
/**
|
|
@@ -22291,7 +22366,7 @@ var Granular = class _Granular {
|
|
|
22291
22366
|
const sandboxId = sandbox.sandboxId;
|
|
22292
22367
|
const map = this.getSandboxEffectMap(sandboxId);
|
|
22293
22368
|
for (const effect of effects2) {
|
|
22294
|
-
map.set(
|
|
22369
|
+
map.set(computeEffectRegistrationKey(effect), effect);
|
|
22295
22370
|
}
|
|
22296
22371
|
await this.syncSandboxEffectCatalog(sandboxId);
|
|
22297
22372
|
}
|
|
@@ -22309,7 +22384,7 @@ var Granular = class _Granular {
|
|
|
22309
22384
|
return;
|
|
22310
22385
|
}
|
|
22311
22386
|
const nextEntries = Array.from(currentMap.entries()).filter(
|
|
22312
|
-
([
|
|
22387
|
+
([, effect]) => computeEffectKey2(effect) !== name && effect.name !== name
|
|
22313
22388
|
);
|
|
22314
22389
|
if (nextEntries.length === currentMap.size) {
|
|
22315
22390
|
return;
|
|
@@ -303,6 +303,7 @@ interface EnvironmentData {
|
|
|
303
303
|
sandboxId: string;
|
|
304
304
|
ontologyId?: string;
|
|
305
305
|
buildId: string;
|
|
306
|
+
versionNumber?: number | null;
|
|
306
307
|
versionId: string;
|
|
307
308
|
subjectId: string;
|
|
308
309
|
envName: string;
|
|
@@ -422,6 +423,8 @@ interface EffectHandlerContext {
|
|
|
422
423
|
effectClientId: string;
|
|
423
424
|
sandboxId: string;
|
|
424
425
|
environmentId: string;
|
|
426
|
+
buildId?: string;
|
|
427
|
+
buildVersionNumber?: number;
|
|
425
428
|
sessionId: string;
|
|
426
429
|
tenantId?: string;
|
|
427
430
|
principalId?: string;
|
|
@@ -534,6 +537,12 @@ interface ToolSchema {
|
|
|
534
537
|
* passed as the first argument to the handler).
|
|
535
538
|
*/
|
|
536
539
|
static?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* Optional build-version selector for this live effect binding.
|
|
542
|
+
*
|
|
543
|
+
* When omitted, the binding applies to all build versions for the sandbox.
|
|
544
|
+
*/
|
|
545
|
+
versionSelector?: EffectVersionSelector;
|
|
537
546
|
/** Declarative runtime behaviors attached to the effect. */
|
|
538
547
|
metamodels?: ManifestEffectMetamodelSpec;
|
|
539
548
|
}
|
|
@@ -566,6 +575,18 @@ interface PublishToolsResult {
|
|
|
566
575
|
}>;
|
|
567
576
|
}
|
|
568
577
|
type PublishEffectsResult = PublishToolsResult;
|
|
578
|
+
type EffectVersionSelector = {
|
|
579
|
+
mode: "all";
|
|
580
|
+
} | {
|
|
581
|
+
mode: "exact";
|
|
582
|
+
versionNumber: number;
|
|
583
|
+
} | {
|
|
584
|
+
mode: "before";
|
|
585
|
+
versionNumber: number;
|
|
586
|
+
} | {
|
|
587
|
+
mode: "after";
|
|
588
|
+
versionNumber: number;
|
|
589
|
+
};
|
|
569
590
|
/**
|
|
570
591
|
* Domain state response
|
|
571
592
|
*/
|
|
@@ -603,6 +624,8 @@ interface ToolInfo {
|
|
|
603
624
|
className?: string;
|
|
604
625
|
/** Whether this is a static method */
|
|
605
626
|
static?: boolean;
|
|
627
|
+
/** Optional build-version selector associated with the live binding. */
|
|
628
|
+
versionSelector?: EffectVersionSelector;
|
|
606
629
|
/** Declarative runtime behaviors attached to the effect. */
|
|
607
630
|
metamodels?: ManifestEffectMetamodelSpec;
|
|
608
631
|
}
|
|
@@ -2068,7 +2091,7 @@ declare class Granular {
|
|
|
2068
2091
|
private onUnexpectedClose?;
|
|
2069
2092
|
private onReconnectError?;
|
|
2070
2093
|
private debugHttp;
|
|
2071
|
-
/** Sandbox-level effect registry: sandboxId → (effectKey → ToolWithHandler) */
|
|
2094
|
+
/** Sandbox-level effect registry: sandboxId → (effectKey@selector → ToolWithHandler) */
|
|
2072
2095
|
private sandboxEffects;
|
|
2073
2096
|
/** Live sandbox-scoped effect hosts keyed by sandboxId */
|
|
2074
2097
|
private sandboxEffectHosts;
|
|
@@ -2326,4 +2349,4 @@ declare class Granular {
|
|
|
2326
2349
|
private request;
|
|
2327
2350
|
}
|
|
2328
2351
|
|
|
2329
|
-
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type
|
|
2352
|
+
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type ManifestFilterBySpec as a$, type ResolvedEffectPostCondition as a0, type ResolvedEffectDryRun as a1, type ResolvedEffectReverse as a2, type ResolvedEffectApprovalRequired as a3, type EffectInvocationMode as a4, type EffectInvocationMetadata as a5, type EffectSchema as a6, type EffectWithHandler as a7, type PublishEffectsResult as a8, type EffectVersionSelector as a9, type SessionJobListOptions as aA, type SessionCollectionListResult as aB, type WSDisconnectInfo as aC, type WSReconnectErrorInfo as aD, type WSClientOptions as aE, type RPCRequest as aF, type RPCResponse as aG, type SyncMessage as aH, type RPCRequestFromServer as aI, type ToolInvokeParams as aJ, type ToolResultParams as aK, type ModelRef as aL, type RelationshipInfo as aM, type DefineRelationshipOptions as aN, type RecordObjectOptions as aO, type RecordObjectResult as aP, type RecordObjectsChunkInfo as aQ, type RecordObjectsOptions as aR, type RecordImportStatus as aS, type RecordImportItemStatus as aT, type RecordImportStats as aU, type RecordImportItem as aV, type RecordImport as aW, type EnvironmentRecordImportSummary as aX, type ManifestPropertySpec as aY, type ManifestValidationOperator as aZ, type ManifestEnumRuleSpec as a_, type ToolInfo as aa, type EffectInfo as ab, type ToolsChangedEvent as ac, type EffectsChangedEvent as ad, type EffectHandler as ae, type InstanceEffectHandler as af, type JobStatus as ag, type JobFeedbackSentiment as ah, type JobFeedbackToolCall as ai, type JobFeedbackMetadata as aj, type JobFeedbackInput as ak, type JobFeedbackRecord as al, type EnvironmentFeedbackRecord as am, type JobSubmitResult as an, type Job as ao, type ConversationMessageShowRefs as ap, type ConversationMessageInput as aq, type ConversationAppendResult as ar, type SessionConversationMessage as as, type SessionTimelineEvent as at, type SessionJobRecord as au, type SessionHeapFieldType as av, type SessionHeapFieldValue as aw, type SessionHeapVariable as ax, type SessionDocumentResult as ay, type SessionCollectionListOptions as az, type SessionHeapList as b, type ManifestValidationRuleSpec as b0, type ManifestStateMachineStateSpec as b1, type ManifestStateMachineTransitionSpec as b2, type ManifestStateMachineSpec as b3, type ManifestPostConditionSpec as b4, type ManifestDryRunSpec as b5, type ManifestReverseSpec as b6, type ManifestApprovalRequiredSpec as b7, type ManifestRelationshipDef as b8, type ManifestEffectSchema as b9, type ManifestEffectDeclaration as ba, type ManifestEventTypeDef as bb, type ManifestEventStreamDef as bc, type ManifestOperation as bd, type ManifestImport as be, type ManifestVolume as bf, type ManifestContent as bg, type GraphQLResult as bh, type APIError as bi, type DeleteResponse as bj, type StreamEvent as bk, type StreamSubscription as bl, type StreamStats as bm, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, Environment as e, EnvironmentSession as f, Session as g, type ToolSchema as h, type PublishToolsResult as i, type ToolHandler as j, type GranularOptions as k, type GranularAuth as l, type RecordUserOptions as m, type Subject as n, type OpenEnvironmentOptions as o, type CreateSessionOptions as p, type ConversationSessionInfo as q, type Sandbox as r, type CreateSandboxData as s, type SandboxListResponse as t, type PermissionRules as u, type PermissionProfile as v, type CreatePermissionProfileData as w, type PermissionProfileListResponse as x, type Assignment as y, type AssignmentListResponse as z };
|
|
@@ -303,6 +303,7 @@ interface EnvironmentData {
|
|
|
303
303
|
sandboxId: string;
|
|
304
304
|
ontologyId?: string;
|
|
305
305
|
buildId: string;
|
|
306
|
+
versionNumber?: number | null;
|
|
306
307
|
versionId: string;
|
|
307
308
|
subjectId: string;
|
|
308
309
|
envName: string;
|
|
@@ -422,6 +423,8 @@ interface EffectHandlerContext {
|
|
|
422
423
|
effectClientId: string;
|
|
423
424
|
sandboxId: string;
|
|
424
425
|
environmentId: string;
|
|
426
|
+
buildId?: string;
|
|
427
|
+
buildVersionNumber?: number;
|
|
425
428
|
sessionId: string;
|
|
426
429
|
tenantId?: string;
|
|
427
430
|
principalId?: string;
|
|
@@ -534,6 +537,12 @@ interface ToolSchema {
|
|
|
534
537
|
* passed as the first argument to the handler).
|
|
535
538
|
*/
|
|
536
539
|
static?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* Optional build-version selector for this live effect binding.
|
|
542
|
+
*
|
|
543
|
+
* When omitted, the binding applies to all build versions for the sandbox.
|
|
544
|
+
*/
|
|
545
|
+
versionSelector?: EffectVersionSelector;
|
|
537
546
|
/** Declarative runtime behaviors attached to the effect. */
|
|
538
547
|
metamodels?: ManifestEffectMetamodelSpec;
|
|
539
548
|
}
|
|
@@ -566,6 +575,18 @@ interface PublishToolsResult {
|
|
|
566
575
|
}>;
|
|
567
576
|
}
|
|
568
577
|
type PublishEffectsResult = PublishToolsResult;
|
|
578
|
+
type EffectVersionSelector = {
|
|
579
|
+
mode: "all";
|
|
580
|
+
} | {
|
|
581
|
+
mode: "exact";
|
|
582
|
+
versionNumber: number;
|
|
583
|
+
} | {
|
|
584
|
+
mode: "before";
|
|
585
|
+
versionNumber: number;
|
|
586
|
+
} | {
|
|
587
|
+
mode: "after";
|
|
588
|
+
versionNumber: number;
|
|
589
|
+
};
|
|
569
590
|
/**
|
|
570
591
|
* Domain state response
|
|
571
592
|
*/
|
|
@@ -603,6 +624,8 @@ interface ToolInfo {
|
|
|
603
624
|
className?: string;
|
|
604
625
|
/** Whether this is a static method */
|
|
605
626
|
static?: boolean;
|
|
627
|
+
/** Optional build-version selector associated with the live binding. */
|
|
628
|
+
versionSelector?: EffectVersionSelector;
|
|
606
629
|
/** Declarative runtime behaviors attached to the effect. */
|
|
607
630
|
metamodels?: ManifestEffectMetamodelSpec;
|
|
608
631
|
}
|
|
@@ -2068,7 +2091,7 @@ declare class Granular {
|
|
|
2068
2091
|
private onUnexpectedClose?;
|
|
2069
2092
|
private onReconnectError?;
|
|
2070
2093
|
private debugHttp;
|
|
2071
|
-
/** Sandbox-level effect registry: sandboxId → (effectKey → ToolWithHandler) */
|
|
2094
|
+
/** Sandbox-level effect registry: sandboxId → (effectKey@selector → ToolWithHandler) */
|
|
2072
2095
|
private sandboxEffects;
|
|
2073
2096
|
/** Live sandbox-scoped effect hosts keyed by sandboxId */
|
|
2074
2097
|
private sandboxEffectHosts;
|
|
@@ -2326,4 +2349,4 @@ declare class Granular {
|
|
|
2326
2349
|
private request;
|
|
2327
2350
|
}
|
|
2328
2351
|
|
|
2329
|
-
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type
|
|
2352
|
+
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type ManifestFilterBySpec as a$, type ResolvedEffectPostCondition as a0, type ResolvedEffectDryRun as a1, type ResolvedEffectReverse as a2, type ResolvedEffectApprovalRequired as a3, type EffectInvocationMode as a4, type EffectInvocationMetadata as a5, type EffectSchema as a6, type EffectWithHandler as a7, type PublishEffectsResult as a8, type EffectVersionSelector as a9, type SessionJobListOptions as aA, type SessionCollectionListResult as aB, type WSDisconnectInfo as aC, type WSReconnectErrorInfo as aD, type WSClientOptions as aE, type RPCRequest as aF, type RPCResponse as aG, type SyncMessage as aH, type RPCRequestFromServer as aI, type ToolInvokeParams as aJ, type ToolResultParams as aK, type ModelRef as aL, type RelationshipInfo as aM, type DefineRelationshipOptions as aN, type RecordObjectOptions as aO, type RecordObjectResult as aP, type RecordObjectsChunkInfo as aQ, type RecordObjectsOptions as aR, type RecordImportStatus as aS, type RecordImportItemStatus as aT, type RecordImportStats as aU, type RecordImportItem as aV, type RecordImport as aW, type EnvironmentRecordImportSummary as aX, type ManifestPropertySpec as aY, type ManifestValidationOperator as aZ, type ManifestEnumRuleSpec as a_, type ToolInfo as aa, type EffectInfo as ab, type ToolsChangedEvent as ac, type EffectsChangedEvent as ad, type EffectHandler as ae, type InstanceEffectHandler as af, type JobStatus as ag, type JobFeedbackSentiment as ah, type JobFeedbackToolCall as ai, type JobFeedbackMetadata as aj, type JobFeedbackInput as ak, type JobFeedbackRecord as al, type EnvironmentFeedbackRecord as am, type JobSubmitResult as an, type Job as ao, type ConversationMessageShowRefs as ap, type ConversationMessageInput as aq, type ConversationAppendResult as ar, type SessionConversationMessage as as, type SessionTimelineEvent as at, type SessionJobRecord as au, type SessionHeapFieldType as av, type SessionHeapFieldValue as aw, type SessionHeapVariable as ax, type SessionDocumentResult as ay, type SessionCollectionListOptions as az, type SessionHeapList as b, type ManifestValidationRuleSpec as b0, type ManifestStateMachineStateSpec as b1, type ManifestStateMachineTransitionSpec as b2, type ManifestStateMachineSpec as b3, type ManifestPostConditionSpec as b4, type ManifestDryRunSpec as b5, type ManifestReverseSpec as b6, type ManifestApprovalRequiredSpec as b7, type ManifestRelationshipDef as b8, type ManifestEffectSchema as b9, type ManifestEffectDeclaration as ba, type ManifestEventTypeDef as bb, type ManifestEventStreamDef as bc, type ManifestOperation as bd, type ManifestImport as be, type ManifestVolume as bf, type ManifestContent as bg, type GraphQLResult as bh, type APIError as bi, type DeleteResponse as bj, type StreamEvent as bk, type StreamSubscription as bl, type StreamStats as bm, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, Environment as e, EnvironmentSession as f, Session as g, type ToolSchema as h, type PublishToolsResult as i, type ToolHandler as j, type GranularOptions as k, type GranularAuth as l, type RecordUserOptions as m, type Subject as n, type OpenEnvironmentOptions as o, type CreateSessionOptions as p, type ConversationSessionInfo as q, type Sandbox as r, type CreateSandboxData as s, type SandboxListResponse as t, type PermissionRules as u, type PermissionProfile as v, type CreatePermissionProfileData as w, type PermissionProfileListResponse as x, type Assignment as y, type AssignmentListResponse as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './client-
|
|
2
|
-
export {
|
|
1
|
+
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './client-iw76FL_8.mjs';
|
|
2
|
+
export { bi as APIError, A as AccessTokenProvider, y as Assignment, z as AssignmentListResponse, X as Build, Z as BuildListResponse, B as BuildPolicy, Q as BuildStatus, C as ConnectOptions, ar as ConversationAppendResult, aq as ConversationMessageInput, ap as ConversationMessageShowRefs, q as ConversationSessionInfo, J as CreateEnvironmentData, w as CreatePermissionProfileData, s as CreateSandboxData, p as CreateSessionOptions, aN as DefineRelationshipOptions, bj as DeleteResponse, D as DomainState, ae as EffectHandler, ab as EffectInfo, a5 as EffectInvocationMetadata, a4 as EffectInvocationMode, a6 as EffectSchema, a9 as EffectVersionSelector, a7 as EffectWithHandler, ad as EffectsChangedEvent, e as Environment, H as EnvironmentData, am as EnvironmentFeedbackRecord, K as EnvironmentListResponse, aX as EnvironmentRecordImportSummary, f as EnvironmentSession, G as Granular, l as GranularAuth, k as GranularOptions, bh as GraphQLResult, af as InstanceEffectHandler, I as InstanceToolHandler, ao as Job, ak as JobFeedbackInput, aj as JobFeedbackMetadata, al as JobFeedbackRecord, ah as JobFeedbackSentiment, ai as JobFeedbackToolCall, ag as JobStatus, an as JobSubmitResult, L as Manifest, b7 as ManifestApprovalRequiredSpec, bg as ManifestContent, b5 as ManifestDryRunSpec, ba as ManifestEffectDeclaration, b9 as ManifestEffectSchema, a_ as ManifestEnumRuleSpec, bc as ManifestEventStreamDef, bb as ManifestEventTypeDef, a$ as ManifestFilterBySpec, be as ManifestImport, N as ManifestListResponse, bd as ManifestOperation, b4 as ManifestPostConditionSpec, aY as ManifestPropertySpec, b8 as ManifestRelationshipDef, b6 as ManifestReverseSpec, b3 as ManifestStateMachineSpec, b1 as ManifestStateMachineStateSpec, b2 as ManifestStateMachineTransitionSpec, aZ as ManifestValidationOperator, b0 as ManifestValidationRuleSpec, bf as ManifestVolume, aL as ModelRef, O as OntologyHandle, o as OpenEnvironmentOptions, v as PermissionProfile, x as PermissionProfileListResponse, u as PermissionRules, a8 as PublishEffectsResult, i as PublishToolsResult, aF as RPCRequest, aI as RPCRequestFromServer, aG as RPCResponse, aW as RecordImport, aV as RecordImportItem, aT as RecordImportItemStatus, aU as RecordImportStats, aS as RecordImportStatus, aO as RecordObjectOptions, aP as RecordObjectResult, aQ as RecordObjectsChunkInfo, aR as RecordObjectsOptions, m as RecordUserOptions, aM as RelationshipInfo, a3 as ResolvedEffectApprovalRequired, a1 as ResolvedEffectDryRun, a0 as ResolvedEffectPostCondition, a2 as ResolvedEffectReverse, r as Sandbox, t as SandboxListResponse, $ as SemanticVersionDiff, _ as SemanticVersionDiffEntry, g as Session, az as SessionCollectionListOptions, aB as SessionCollectionListResult, as as SessionConversationMessage, ay as SessionDocumentResult, av as SessionHeapFieldType, aw as SessionHeapFieldValue, ax as SessionHeapVariable, aA as SessionJobListOptions, au as SessionJobRecord, at as SessionTimelineEvent, bk as StreamEvent, bm as StreamStats, bl as StreamSubscription, n as Subject, aH as SyncMessage, j as ToolHandler, aa as ToolInfo, aJ as ToolInvokeParams, aK as ToolResultParams, h as ToolSchema, ac as ToolsChangedEvent, U as User, Y as Version, F as VersionTag, V as VersionTracking, W as WSClient, aE as WSClientOptions, aC as WSDisconnectInfo, aD as WSReconnectErrorInfo } from './client-iw76FL_8.mjs';
|
|
3
3
|
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode } from './agent-harness.mjs';
|
|
4
4
|
import '@automerge/automerge';
|
|
5
5
|
import '@automerge/automerge/slim';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './client-
|
|
2
|
-
export {
|
|
1
|
+
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './client-iw76FL_8.js';
|
|
2
|
+
export { bi as APIError, A as AccessTokenProvider, y as Assignment, z as AssignmentListResponse, X as Build, Z as BuildListResponse, B as BuildPolicy, Q as BuildStatus, C as ConnectOptions, ar as ConversationAppendResult, aq as ConversationMessageInput, ap as ConversationMessageShowRefs, q as ConversationSessionInfo, J as CreateEnvironmentData, w as CreatePermissionProfileData, s as CreateSandboxData, p as CreateSessionOptions, aN as DefineRelationshipOptions, bj as DeleteResponse, D as DomainState, ae as EffectHandler, ab as EffectInfo, a5 as EffectInvocationMetadata, a4 as EffectInvocationMode, a6 as EffectSchema, a9 as EffectVersionSelector, a7 as EffectWithHandler, ad as EffectsChangedEvent, e as Environment, H as EnvironmentData, am as EnvironmentFeedbackRecord, K as EnvironmentListResponse, aX as EnvironmentRecordImportSummary, f as EnvironmentSession, G as Granular, l as GranularAuth, k as GranularOptions, bh as GraphQLResult, af as InstanceEffectHandler, I as InstanceToolHandler, ao as Job, ak as JobFeedbackInput, aj as JobFeedbackMetadata, al as JobFeedbackRecord, ah as JobFeedbackSentiment, ai as JobFeedbackToolCall, ag as JobStatus, an as JobSubmitResult, L as Manifest, b7 as ManifestApprovalRequiredSpec, bg as ManifestContent, b5 as ManifestDryRunSpec, ba as ManifestEffectDeclaration, b9 as ManifestEffectSchema, a_ as ManifestEnumRuleSpec, bc as ManifestEventStreamDef, bb as ManifestEventTypeDef, a$ as ManifestFilterBySpec, be as ManifestImport, N as ManifestListResponse, bd as ManifestOperation, b4 as ManifestPostConditionSpec, aY as ManifestPropertySpec, b8 as ManifestRelationshipDef, b6 as ManifestReverseSpec, b3 as ManifestStateMachineSpec, b1 as ManifestStateMachineStateSpec, b2 as ManifestStateMachineTransitionSpec, aZ as ManifestValidationOperator, b0 as ManifestValidationRuleSpec, bf as ManifestVolume, aL as ModelRef, O as OntologyHandle, o as OpenEnvironmentOptions, v as PermissionProfile, x as PermissionProfileListResponse, u as PermissionRules, a8 as PublishEffectsResult, i as PublishToolsResult, aF as RPCRequest, aI as RPCRequestFromServer, aG as RPCResponse, aW as RecordImport, aV as RecordImportItem, aT as RecordImportItemStatus, aU as RecordImportStats, aS as RecordImportStatus, aO as RecordObjectOptions, aP as RecordObjectResult, aQ as RecordObjectsChunkInfo, aR as RecordObjectsOptions, m as RecordUserOptions, aM as RelationshipInfo, a3 as ResolvedEffectApprovalRequired, a1 as ResolvedEffectDryRun, a0 as ResolvedEffectPostCondition, a2 as ResolvedEffectReverse, r as Sandbox, t as SandboxListResponse, $ as SemanticVersionDiff, _ as SemanticVersionDiffEntry, g as Session, az as SessionCollectionListOptions, aB as SessionCollectionListResult, as as SessionConversationMessage, ay as SessionDocumentResult, av as SessionHeapFieldType, aw as SessionHeapFieldValue, ax as SessionHeapVariable, aA as SessionJobListOptions, au as SessionJobRecord, at as SessionTimelineEvent, bk as StreamEvent, bm as StreamStats, bl as StreamSubscription, n as Subject, aH as SyncMessage, j as ToolHandler, aa as ToolInfo, aJ as ToolInvokeParams, aK as ToolResultParams, h as ToolSchema, ac as ToolsChangedEvent, U as User, Y as Version, F as VersionTag, V as VersionTracking, W as WSClient, aE as WSClientOptions, aC as WSDisconnectInfo, aD as WSReconnectErrorInfo } from './client-iw76FL_8.js';
|
|
3
3
|
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode } from './agent-harness.js';
|
|
4
4
|
import '@automerge/automerge';
|
|
5
5
|
import '@automerge/automerge/slim';
|
package/dist/index.js
CHANGED
|
@@ -10886,6 +10886,50 @@ function computeEffectKey(effect) {
|
|
|
10886
10886
|
}
|
|
10887
10887
|
return effect.static ? `class:${attachedClass}:static:${effect.name}` : `class:${attachedClass}:instance:${effect.name}`;
|
|
10888
10888
|
}
|
|
10889
|
+
function computeEffectVersionSelectorSpecificity(selector) {
|
|
10890
|
+
if (!selector || selector.mode === "all") {
|
|
10891
|
+
return 0;
|
|
10892
|
+
}
|
|
10893
|
+
if (selector.mode === "exact") {
|
|
10894
|
+
return 2;
|
|
10895
|
+
}
|
|
10896
|
+
return 1;
|
|
10897
|
+
}
|
|
10898
|
+
function matchesEffectVersionSelector(selector, buildVersionNumber) {
|
|
10899
|
+
if (!selector || selector.mode === "all") {
|
|
10900
|
+
return true;
|
|
10901
|
+
}
|
|
10902
|
+
if (typeof buildVersionNumber !== "number" || !Number.isFinite(buildVersionNumber)) {
|
|
10903
|
+
return false;
|
|
10904
|
+
}
|
|
10905
|
+
if (selector.mode === "exact") {
|
|
10906
|
+
return buildVersionNumber === selector.versionNumber;
|
|
10907
|
+
}
|
|
10908
|
+
if (selector.mode === "before") {
|
|
10909
|
+
return buildVersionNumber < selector.versionNumber;
|
|
10910
|
+
}
|
|
10911
|
+
return buildVersionNumber > selector.versionNumber;
|
|
10912
|
+
}
|
|
10913
|
+
function selectRegisteredEffect(effectMap, effectKey, buildVersionNumber) {
|
|
10914
|
+
let bestEffect;
|
|
10915
|
+
let bestSpecificity = Number.NEGATIVE_INFINITY;
|
|
10916
|
+
for (const effect of effectMap.values()) {
|
|
10917
|
+
if (computeEffectKey(effect) !== effectKey) {
|
|
10918
|
+
continue;
|
|
10919
|
+
}
|
|
10920
|
+
if (!matchesEffectVersionSelector(effect.versionSelector, buildVersionNumber)) {
|
|
10921
|
+
continue;
|
|
10922
|
+
}
|
|
10923
|
+
const specificity = computeEffectVersionSelectorSpecificity(
|
|
10924
|
+
effect.versionSelector
|
|
10925
|
+
);
|
|
10926
|
+
if (!bestEffect || specificity > bestSpecificity) {
|
|
10927
|
+
bestEffect = effect;
|
|
10928
|
+
bestSpecificity = specificity;
|
|
10929
|
+
}
|
|
10930
|
+
}
|
|
10931
|
+
return bestEffect;
|
|
10932
|
+
}
|
|
10889
10933
|
function normalizeEffectBehaviors(value) {
|
|
10890
10934
|
return normalizeEffectBehaviorSummary(
|
|
10891
10935
|
value
|
|
@@ -10906,9 +10950,17 @@ function resolveReverseEffect(effectMap, currentEffect, request, behaviors) {
|
|
|
10906
10950
|
return void 0;
|
|
10907
10951
|
}
|
|
10908
10952
|
if (reverseHandler.includes(":")) {
|
|
10909
|
-
return
|
|
10953
|
+
return selectRegisteredEffect(
|
|
10954
|
+
effectMap,
|
|
10955
|
+
reverseHandler,
|
|
10956
|
+
request.context?.buildVersionNumber
|
|
10957
|
+
);
|
|
10910
10958
|
}
|
|
10911
|
-
const directMatch =
|
|
10959
|
+
const directMatch = selectRegisteredEffect(
|
|
10960
|
+
effectMap,
|
|
10961
|
+
reverseHandler,
|
|
10962
|
+
request.context?.buildVersionNumber
|
|
10963
|
+
);
|
|
10912
10964
|
if (directMatch) {
|
|
10913
10965
|
return directMatch;
|
|
10914
10966
|
}
|
|
@@ -10923,7 +10975,11 @@ function resolveReverseEffect(effectMap, currentEffect, request, behaviors) {
|
|
|
10923
10975
|
})
|
|
10924
10976
|
];
|
|
10925
10977
|
for (const candidateKey of candidateKeys) {
|
|
10926
|
-
const candidate =
|
|
10978
|
+
const candidate = selectRegisteredEffect(
|
|
10979
|
+
effectMap,
|
|
10980
|
+
candidateKey,
|
|
10981
|
+
request.context?.buildVersionNumber
|
|
10982
|
+
);
|
|
10927
10983
|
if (candidate) {
|
|
10928
10984
|
return candidate;
|
|
10929
10985
|
}
|
|
@@ -10959,7 +11015,11 @@ function resolveHandlerForMode(effectMap, effect, request) {
|
|
|
10959
11015
|
return { effect, mode, handler: effect.handler };
|
|
10960
11016
|
}
|
|
10961
11017
|
async function invokeRegisteredEffect(effectMap, request) {
|
|
10962
|
-
const effect =
|
|
11018
|
+
const effect = selectRegisteredEffect(
|
|
11019
|
+
effectMap,
|
|
11020
|
+
request.effectKey,
|
|
11021
|
+
request.context?.buildVersionNumber
|
|
11022
|
+
);
|
|
10963
11023
|
if (!effect) {
|
|
10964
11024
|
throw new Error(`Effect handler not found: ${request.effectKey}`);
|
|
10965
11025
|
}
|
|
@@ -12218,6 +12278,17 @@ function computeEffectKey2(effect) {
|
|
|
12218
12278
|
}
|
|
12219
12279
|
return effect.static ? `class:${attachedClass}:static:${effect.name}` : `class:${attachedClass}:instance:${effect.name}`;
|
|
12220
12280
|
}
|
|
12281
|
+
function computeEffectVersionSelectorKey(selector) {
|
|
12282
|
+
if (!selector || selector.mode === "all") {
|
|
12283
|
+
return "all";
|
|
12284
|
+
}
|
|
12285
|
+
return `${selector.mode}:${selector.versionNumber}`;
|
|
12286
|
+
}
|
|
12287
|
+
function computeEffectRegistrationKey(effect) {
|
|
12288
|
+
return `${computeEffectKey2(effect)}@${computeEffectVersionSelectorKey(
|
|
12289
|
+
effect.versionSelector
|
|
12290
|
+
)}`;
|
|
12291
|
+
}
|
|
12221
12292
|
function buildEffectHostUrl(apiUrl, sandboxId, effectClientId, clientId) {
|
|
12222
12293
|
const url = new URL(apiUrl);
|
|
12223
12294
|
if (url.pathname.endsWith("/granular/ws/connect")) {
|
|
@@ -13739,7 +13810,7 @@ var Granular = class _Granular {
|
|
|
13739
13810
|
onUnexpectedClose;
|
|
13740
13811
|
onReconnectError;
|
|
13741
13812
|
debugHttp = process.env.GRANULAR_DEBUG_HTTP === "1";
|
|
13742
|
-
/** Sandbox-level effect registry: sandboxId → (effectKey → ToolWithHandler) */
|
|
13813
|
+
/** Sandbox-level effect registry: sandboxId → (effectKey@selector → ToolWithHandler) */
|
|
13743
13814
|
sandboxEffects = /* @__PURE__ */ new Map();
|
|
13744
13815
|
/** Live sandbox-scoped effect hosts keyed by sandboxId */
|
|
13745
13816
|
sandboxEffectHosts = /* @__PURE__ */ new Map();
|
|
@@ -14158,7 +14229,8 @@ var Granular = class _Granular {
|
|
|
14158
14229
|
provenance: effect.provenance || { source: "custom" },
|
|
14159
14230
|
tags: effect.tags,
|
|
14160
14231
|
className: effect.className,
|
|
14161
|
-
static: effect.static
|
|
14232
|
+
static: effect.static,
|
|
14233
|
+
versionSelector: effect.versionSelector
|
|
14162
14234
|
};
|
|
14163
14235
|
}
|
|
14164
14236
|
async publishSandboxEffectCatalog(host) {
|
|
@@ -14346,7 +14418,10 @@ var Granular = class _Granular {
|
|
|
14346
14418
|
async registerEffect(sandboxNameOrId, effect) {
|
|
14347
14419
|
const sandbox = await this.findOrCreateSandbox(sandboxNameOrId);
|
|
14348
14420
|
const sandboxId = sandbox.sandboxId;
|
|
14349
|
-
this.getSandboxEffectMap(sandboxId).set(
|
|
14421
|
+
this.getSandboxEffectMap(sandboxId).set(
|
|
14422
|
+
computeEffectRegistrationKey(effect),
|
|
14423
|
+
effect
|
|
14424
|
+
);
|
|
14350
14425
|
await this.syncSandboxEffectCatalog(sandboxId);
|
|
14351
14426
|
}
|
|
14352
14427
|
/**
|
|
@@ -14359,7 +14434,7 @@ var Granular = class _Granular {
|
|
|
14359
14434
|
const sandboxId = sandbox.sandboxId;
|
|
14360
14435
|
const map = this.getSandboxEffectMap(sandboxId);
|
|
14361
14436
|
for (const effect of effects) {
|
|
14362
|
-
map.set(
|
|
14437
|
+
map.set(computeEffectRegistrationKey(effect), effect);
|
|
14363
14438
|
}
|
|
14364
14439
|
await this.syncSandboxEffectCatalog(sandboxId);
|
|
14365
14440
|
}
|
|
@@ -14377,7 +14452,7 @@ var Granular = class _Granular {
|
|
|
14377
14452
|
return;
|
|
14378
14453
|
}
|
|
14379
14454
|
const nextEntries = Array.from(currentMap.entries()).filter(
|
|
14380
|
-
([
|
|
14455
|
+
([, effect]) => computeEffectKey2(effect) !== name && effect.name !== name
|
|
14381
14456
|
);
|
|
14382
14457
|
if (nextEntries.length === currentMap.size) {
|
|
14383
14458
|
return;
|