@sixb/core 0.1.5 → 0.1.6
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/actions/index.js +8 -8
- package/dist/actions/types/definitions.d.ts +8 -2
- package/dist/actions/types/definitions.d.ts.map +1 -1
- package/dist/agents/index.js +13 -13
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/strategy.d.ts +1 -1
- package/dist/auth/strategy.d.ts.map +1 -1
- package/dist/auth/types.d.ts +13 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/bootstrap/index.js +17 -17
- package/dist/{chunk-78c6xvyr.js → chunk-0hc5j867.js} +2 -2
- package/dist/{chunk-tkdscva6.js → chunk-1e8m6yn3.js} +6 -1
- package/dist/{chunk-tkdscva6.js.map → chunk-1e8m6yn3.js.map} +4 -4
- package/dist/{chunk-xdf9yswn.js → chunk-1g8negke.js} +1 -1
- package/dist/{chunk-am6eczah.js → chunk-5gynx4xn.js} +8 -8
- package/dist/{chunk-z3ga9q5m.js → chunk-5sxb1168.js} +4 -4
- package/dist/chunk-72q2y8hn.js.map +3 -3
- package/dist/{chunk-r0rry8dn.js → chunk-8gv5z0zm.js} +1 -1
- package/dist/{chunk-1q02e95s.js → chunk-a44d5zgd.js} +1 -1
- package/dist/{chunk-h6h91mfy.js → chunk-dy311asx.js} +5 -5
- package/dist/{chunk-ea73pzk7.js → chunk-e42bc6m3.js} +1 -1
- package/dist/{chunk-a09jx26t.js → chunk-fe5ev6mr.js} +1 -1
- package/dist/{chunk-nzw7sm3b.js → chunk-hceck7dq.js} +1 -1
- package/dist/{chunk-6d5xdj1q.js → chunk-md8k0r54.js} +1 -1
- package/dist/{chunk-gadsm794.js → chunk-n4spznws.js} +2 -2
- package/dist/{chunk-tbv03sx2.js → chunk-nkbfrt0c.js} +1 -1
- package/dist/{chunk-84h6qhmp.js → chunk-nva1xkjz.js} +10 -10
- package/dist/{chunk-v0egge8b.js → chunk-t624af60.js} +24 -18
- package/dist/{chunk-v0egge8b.js.map → chunk-t624af60.js.map} +3 -3
- package/dist/{chunk-zp2v2rv6.js → chunk-tg5mee00.js} +1 -1
- package/dist/{chunk-4h947jd8.js → chunk-znagycq7.js} +1 -1
- package/dist/execution/agent.js +13 -13
- package/dist/execution/primitive.js +13 -13
- package/dist/execution/request.js +13 -13
- package/dist/index.js +18 -18
- package/dist/materializer/index.js +6 -6
- package/dist/objects/index.js +9 -9
- package/dist/objects/query/index.js +6 -6
- package/dist/pipelines/index.js +7 -7
- package/dist/projections/internal.js +5 -5
- package/dist/storage/agents/provider.js +3 -3
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +5 -5
- package/dist/storage/ontology/in-memory/materializations.d.ts +4 -3
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +1 -1
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/materializations.d.ts +7 -3
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +2 -2
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +3 -3
- package/dist/syncs/index.js +7 -7
- package/dist/testing/index.js +159 -21
- package/dist/testing/index.js.map +3 -3
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +5 -5
- package/dist/workflows/index.js +14 -14
- package/package.json +1 -1
- package/src/actions/types/definitions.ts +24 -2
- package/src/auth/index.ts +1 -0
- package/src/auth/runtime.ts +8 -0
- package/src/auth/strategy.ts +1 -0
- package/src/auth/types.ts +14 -0
- package/src/storage/index.ts +1 -0
- package/src/storage/ontology/in-memory/materializations.ts +34 -22
- package/src/storage/ontology/index.ts +1 -0
- package/src/storage/ontology/materializations.ts +8 -3
- package/src/storage/ontology/provider.ts +2 -2
- package/src/testing/materializer-storage-contract.ts +170 -2
- /package/dist/{chunk-78c6xvyr.js.map → chunk-0hc5j867.js.map} +0 -0
- /package/dist/{chunk-xdf9yswn.js.map → chunk-1g8negke.js.map} +0 -0
- /package/dist/{chunk-am6eczah.js.map → chunk-5gynx4xn.js.map} +0 -0
- /package/dist/{chunk-z3ga9q5m.js.map → chunk-5sxb1168.js.map} +0 -0
- /package/dist/{chunk-r0rry8dn.js.map → chunk-8gv5z0zm.js.map} +0 -0
- /package/dist/{chunk-1q02e95s.js.map → chunk-a44d5zgd.js.map} +0 -0
- /package/dist/{chunk-h6h91mfy.js.map → chunk-dy311asx.js.map} +0 -0
- /package/dist/{chunk-ea73pzk7.js.map → chunk-e42bc6m3.js.map} +0 -0
- /package/dist/{chunk-a09jx26t.js.map → chunk-fe5ev6mr.js.map} +0 -0
- /package/dist/{chunk-nzw7sm3b.js.map → chunk-hceck7dq.js.map} +0 -0
- /package/dist/{chunk-6d5xdj1q.js.map → chunk-md8k0r54.js.map} +0 -0
- /package/dist/{chunk-gadsm794.js.map → chunk-n4spznws.js.map} +0 -0
- /package/dist/{chunk-tbv03sx2.js.map → chunk-nkbfrt0c.js.map} +0 -0
- /package/dist/{chunk-84h6qhmp.js.map → chunk-nva1xkjz.js.map} +0 -0
- /package/dist/{chunk-zp2v2rv6.js.map → chunk-tg5mee00.js.map} +0 -0
- /package/dist/{chunk-4h947jd8.js.map → chunk-znagycq7.js.map} +0 -0
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
isAgentStepDefinition,
|
|
10
10
|
isInterventionDefinition,
|
|
11
11
|
isStepDefinition
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-nva1xkjz.js";
|
|
13
13
|
import {
|
|
14
14
|
isActionDefinition
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-a44d5zgd.js";
|
|
16
16
|
import {
|
|
17
17
|
createSixbError,
|
|
18
18
|
isSixbError,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
SyncValidationError,
|
|
4
4
|
createConnectorRuntime,
|
|
5
5
|
requestSyncRun
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-tg5mee00.js";
|
|
7
7
|
import {
|
|
8
8
|
PipelineError,
|
|
9
9
|
requestPipelineRun
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-8gv5z0zm.js";
|
|
11
11
|
import {
|
|
12
12
|
appendTelemetry,
|
|
13
13
|
createObjectSet,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
upsertLinkBatch1 as upsertLinkBatch,
|
|
19
19
|
upsertObject1 as upsertObject,
|
|
20
20
|
upsertObjectBatch1 as upsertObjectBatch
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5sxb1168.js";
|
|
22
22
|
import {
|
|
23
23
|
shareOntologyMutationRuntime
|
|
24
24
|
} from "./chunk-xhy826cz.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
executeObjectQueryLinks,
|
|
29
29
|
existsObjects,
|
|
30
30
|
facetObjects
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-md8k0r54.js";
|
|
32
32
|
import {
|
|
33
33
|
SIXB_API_ROUTES,
|
|
34
34
|
matchesPathPattern,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
isActionDefinition,
|
|
42
42
|
requestAction,
|
|
43
43
|
requestActionAndWait
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-a44d5zgd.js";
|
|
45
45
|
import {
|
|
46
46
|
createPrimitiveExecutionRecord,
|
|
47
47
|
ensureExecutionRecord,
|
|
@@ -49,18 +49,18 @@ import {
|
|
|
49
49
|
} from "./chunk-f6erf2vv.js";
|
|
50
50
|
import {
|
|
51
51
|
WORKFLOW_RUN_FAILURE_CODES
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-t624af60.js";
|
|
53
53
|
import {
|
|
54
54
|
WorkflowRunError
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-fe5ev6mr.js";
|
|
56
56
|
import {
|
|
57
57
|
AgentStorageError
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-1g8negke.js";
|
|
59
59
|
import {
|
|
60
60
|
agentServiceAccountId,
|
|
61
61
|
ensureAgentExecutionIdentity,
|
|
62
62
|
resolveAgentExecutionAuthorization
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-hceck7dq.js";
|
|
64
64
|
import {
|
|
65
65
|
ExecutionStorageError
|
|
66
66
|
} from "./chunk-h9kxd41f.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
import {
|
|
85
85
|
SYSTEM_PRINCIPAL,
|
|
86
86
|
principalsEqual
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-1e8m6yn3.js";
|
|
88
88
|
import {
|
|
89
89
|
snapshotRequesterGroupIds
|
|
90
90
|
} from "./chunk-rhrbz7d4.js";
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
WorkflowRunError,
|
|
80
80
|
assertWorkflowAgentNodeRunExecution,
|
|
81
81
|
assertWorkflowRunExecution
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-fe5ev6mr.js";
|
|
83
83
|
import {
|
|
84
84
|
parseActionRunFailure
|
|
85
85
|
} from "./chunk-htq0qh7z.js";
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
assertAgentContextCheckpointReplayState,
|
|
96
96
|
assertAgentRunExecution,
|
|
97
97
|
assertCreateAgentContextCheckpointInput
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-1g8negke.js";
|
|
99
99
|
import {
|
|
100
100
|
InMemoryAiUsageStorage,
|
|
101
101
|
aiModelCallCostMatchesUsage,
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
InMemoryAuthStorage,
|
|
139
139
|
paginate,
|
|
140
140
|
principalsEqual
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-1e8m6yn3.js";
|
|
142
142
|
import {
|
|
143
143
|
normalizeRequesterGroupIds
|
|
144
144
|
} from "./chunk-rhrbz7d4.js";
|
|
@@ -3798,11 +3798,11 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3798
3798
|
await this.assertObject(expected, input.commit.projectId);
|
|
3799
3799
|
for (const expected of input.expected.links)
|
|
3800
3800
|
await this.assertLink(expected, input.commit.projectId);
|
|
3801
|
-
const
|
|
3801
|
+
const expectedScopeRevisions = new Map;
|
|
3802
3802
|
for (const expected of input.expected.linkScopes) {
|
|
3803
3803
|
const key2 = linkScopeSortKey(expected.source, expected.linkId);
|
|
3804
|
-
const current =
|
|
3805
|
-
|
|
3804
|
+
const current = expectedScopeRevisions.get(key2) ?? this.computeEffectiveLinkScope(input.commit.projectId, expected.source, expected.linkId);
|
|
3805
|
+
expectedScopeRevisions.set(key2, current);
|
|
3806
3806
|
if (current.fingerprint !== expected.fingerprint) {
|
|
3807
3807
|
throw new MaterializationConflictError("effective-state", `Expected link scope changed for ${expected.source.objectTypeId}:${expected.source.primaryId}.${expected.linkId}.`);
|
|
3808
3808
|
}
|
|
@@ -3831,7 +3831,7 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3831
3831
|
},
|
|
3832
3832
|
workSealed: false,
|
|
3833
3833
|
incidentLinksByObject: null,
|
|
3834
|
-
|
|
3834
|
+
linkSlotStates: new Map,
|
|
3835
3835
|
objectExistence: new Map,
|
|
3836
3836
|
replacement: null
|
|
3837
3837
|
};
|
|
@@ -3857,7 +3857,7 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3857
3857
|
session.appliedPlanItems.length = 0;
|
|
3858
3858
|
session.outboxEnvelopes.clear();
|
|
3859
3859
|
session.incidentLinksByObject = null;
|
|
3860
|
-
session.
|
|
3860
|
+
session.linkSlotStates = null;
|
|
3861
3861
|
session.objectExistence.clear();
|
|
3862
3862
|
session.replacement = null;
|
|
3863
3863
|
this.liveSessions.delete(session);
|
|
@@ -3904,7 +3904,7 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
for (const scope of uniqueBy(request.linkScopes, (value) => linkScopeSortKey(value.source, value.linkId))) {
|
|
3906
3906
|
this.requireSession(input.session);
|
|
3907
|
-
const value = this.
|
|
3907
|
+
const value = this.linkSlotState(session, scope.source, scope.linkId);
|
|
3908
3908
|
yield { objects: [], links: [], linkScopes: [value], points: [] };
|
|
3909
3909
|
}
|
|
3910
3910
|
const requestedPoints = uniqueSorted(request.points, (point) => telemetryPointKey(point.series, point.at), (point) => telemetryPointSortKey(point.series, point.at));
|
|
@@ -4449,17 +4449,25 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
4449
4449
|
effective: row ? linkSnapshot(row) : null
|
|
4450
4450
|
};
|
|
4451
4451
|
}
|
|
4452
|
-
|
|
4453
|
-
session.
|
|
4452
|
+
linkSlotState(session, source, linkId) {
|
|
4453
|
+
session.linkSlotStates ??= new Map;
|
|
4454
4454
|
const key2 = linkScopeSortKey(source, linkId);
|
|
4455
|
-
const existing = session.
|
|
4455
|
+
const existing = session.linkSlotStates.get(key2);
|
|
4456
4456
|
if (existing)
|
|
4457
4457
|
return structuredClone(existing);
|
|
4458
|
-
const computed = this.
|
|
4459
|
-
session.
|
|
4458
|
+
const computed = this.computeLinkSlotState(session.header.commit.projectId, source, linkId);
|
|
4459
|
+
session.linkSlotStates.set(key2, computed);
|
|
4460
4460
|
return structuredClone(computed);
|
|
4461
4461
|
}
|
|
4462
|
-
|
|
4462
|
+
computeLinkSlotState(projectId, source, linkId) {
|
|
4463
|
+
const value = this.computeEffectiveLinkScope(projectId, source, linkId);
|
|
4464
|
+
return {
|
|
4465
|
+
...value,
|
|
4466
|
+
sourceAssertion: this.findActiveLinkScopeSource(projectId, source, linkId),
|
|
4467
|
+
override: structuredClone(publicLinkSlotOverride(this.state.linkSlotOverrides.get(projectEntityKey(projectId, linkScopeKey(source, linkId)))))
|
|
4468
|
+
};
|
|
4469
|
+
}
|
|
4470
|
+
computeEffectiveLinkScope(projectId, source, linkId) {
|
|
4463
4471
|
const rows = [];
|
|
4464
4472
|
getInMemoryObjectMaterializerAdapter(this.objects).visitExactScopeLinks(projectId, source.objectTypeId, source.primaryId, linkId, (row) => rows.push(row));
|
|
4465
4473
|
rows.sort((left, right) => linkRefSortKey(linkRef(left)).localeCompare(linkRefSortKey(linkRef(right))));
|
|
@@ -4474,8 +4482,6 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
4474
4482
|
const effective = rows.length === 1 ? linkSnapshot(rows[0]) : null;
|
|
4475
4483
|
return {
|
|
4476
4484
|
...finishScopeAccumulator(accumulator),
|
|
4477
|
-
sourceAssertion: this.findActiveLinkScopeSource(projectId, source, linkId),
|
|
4478
|
-
override: structuredClone(publicLinkSlotOverride(this.state.linkSlotOverrides.get(projectEntityKey(projectId, linkScopeKey(source, linkId))))),
|
|
4479
4485
|
effective
|
|
4480
4486
|
};
|
|
4481
4487
|
}
|
|
@@ -7253,4 +7259,4 @@ function assertAppliedPrefix(migrations, rows) {
|
|
|
7253
7259
|
}
|
|
7254
7260
|
export { actionSubjectsEqual, actionRunParamsEqual, actionRunPhaseRecordsEqual, finishActionRunPhase, canRequeueActionRunAfterEnqueueFailure, isTerminalActionRun, InMemoryActionRunStorage, AGENT_MESSAGE_CONTENT_VERSION, InMemoryAgentStorage, AiCostStorageError, InMemoryAiCostStorage, InMemoryConnectorConnectionStorage, ObjectNotFoundError, ObjectStorageError, StorageTransactionError, isStorageSerializationFailure, FileUploadSessionError, DEFAULT_FILE_UPLOAD_SESSION_TTL_MS, DEFAULT_FILE_UPLOAD_TERMINAL_SESSION_TTL_MS, createUploadExpiresAt, createFileUploadId, InMemoryFileUploadSessions, compareQueryScalarValues, queryScalarValuesEqual, objectBatchKey, linkBatchKey, objectLinkCursor, canRequeuePipelineRunAfterEnqueueFailure, PIPELINE_RUN_FAILURE_CODES, InMemoryPipelineRunStorage, InMemoryProjectionRunStorage, InMemoryRulesStorage, canRequeueSyncRunAfterEnqueueFailure, SYNC_RUN_FAILURE_CODES, InMemorySyncRunStorage, createTransactionStorageProxy, assertTransactionActive, throwNestedStorageTransaction, WEBHOOK_RUN_FAILURE_CODES, canRetryWebhookRun, InMemoryWebhookRunStorage, WorkflowInterventionError, InMemoryWorkflowInterventionStorage, WORKFLOW_RUN_FAILURE_CODES, InMemoryWorkflowRunStorage, InMemoryWorkflowNodeRunStorage, InMemoryWorkflowAgentNodeRunStorage, InMemoryStorage, isMigrationCapableStorage, migrateStorage, checkStorageSchema, step, defineMigrations, runMigrationSet, describeMigrationHistory };
|
|
7255
7261
|
|
|
7256
|
-
//# debugId=
|
|
7262
|
+
//# debugId=9ED097CBB9250C8464756E2164756E21
|