@sixb/core 0.1.4 → 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.d.ts +2 -2
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +8 -8
- package/dist/actions/read-facade.d.ts +10 -2
- package/dist/actions/read-facade.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +45 -2
- package/dist/actions/types/context.d.ts.map +1 -1
- 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/agents/types.d.ts +2 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- 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-tycbzedm.js → chunk-0hc5j867.js} +68 -3
- package/dist/chunk-0hc5j867.js.map +15 -0
- 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-s31d0qmq.js → chunk-5gynx4xn.js} +11 -11
- package/dist/{chunk-s31d0qmq.js.map → chunk-5gynx4xn.js.map} +1 -1
- package/dist/{chunk-pn8n8sba.js → chunk-5sxb1168.js} +7 -11
- package/dist/{chunk-pn8n8sba.js.map → chunk-5sxb1168.js.map} +3 -4
- package/dist/chunk-72q2y8hn.js.map +3 -3
- package/dist/{chunk-cbkm2vam.js → chunk-8gv5z0zm.js} +1 -1
- package/dist/{chunk-tek1qwgm.js → chunk-a44d5zgd.js} +8 -3
- package/dist/{chunk-tek1qwgm.js.map → chunk-a44d5zgd.js.map} +4 -3
- package/dist/{chunk-1yz3x65y.js → chunk-dy311asx.js} +7 -9
- package/dist/{chunk-1yz3x65y.js.map → chunk-dy311asx.js.map} +2 -2
- package/dist/{chunk-rs1wbvy6.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-7gw7mepb.js → chunk-md8k0r54.js} +1 -1
- package/dist/{chunk-hbeh8j9w.js → chunk-n4spznws.js} +2 -2
- package/dist/{chunk-afjpa2hs.js → chunk-nkbfrt0c.js} +1 -1
- package/dist/{chunk-c43qr6s0.js → chunk-nva1xkjz.js} +16 -12
- package/dist/{chunk-c43qr6s0.js.map → chunk-nva1xkjz.js.map} +4 -4
- package/dist/{chunk-1wk20wn3.js → chunk-t624af60.js} +37 -35
- package/dist/{chunk-1wk20wn3.js.map → chunk-t624af60.js.map} +4 -4
- package/dist/{chunk-g13869yf.js → chunk-tg5mee00.js} +1 -1
- package/dist/{chunk-sxwk41qa.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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/materializer/index.js +6 -6
- package/dist/objects/index.js +9 -9
- package/dist/objects/query/index.js +6 -6
- package/dist/ontology/internal.d.ts +1 -1
- package/dist/ontology/internal.d.ts.map +1 -1
- package/dist/ontology/internal.js +14 -6
- package/dist/ontology/internal.js.map +3 -3
- package/dist/ontology/json-schema.d.ts +10 -0
- package/dist/ontology/json-schema.d.ts.map +1 -1
- 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/index.ts +10 -1
- package/src/actions/read-facade.ts +125 -3
- package/src/actions/types/context.ts +69 -2
- package/src/actions/types/definitions.ts +24 -2
- package/src/agents/types.ts +2 -0
- package/src/agents/validation.ts +4 -0
- 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/index.ts +5 -0
- package/src/ontology/internal.ts +1 -1
- package/src/ontology/json-schema.ts +27 -5
- 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/storage/timeseries/store.ts +6 -6
- package/src/testing/materializer-storage-contract.ts +170 -2
- package/dist/chunk-tycbzedm.js.map +0 -15
- /package/dist/{chunk-xdf9yswn.js.map → chunk-1g8negke.js.map} +0 -0
- /package/dist/{chunk-cbkm2vam.js.map → chunk-8gv5z0zm.js.map} +0 -0
- /package/dist/{chunk-rs1wbvy6.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-7gw7mepb.js.map → chunk-md8k0r54.js.map} +0 -0
- /package/dist/{chunk-hbeh8j9w.js.map → chunk-n4spznws.js.map} +0 -0
- /package/dist/{chunk-afjpa2hs.js.map → chunk-nkbfrt0c.js.map} +0 -0
- /package/dist/{chunk-g13869yf.js.map → chunk-tg5mee00.js.map} +0 -0
- /package/dist/{chunk-sxwk41qa.js.map → chunk-znagycq7.js.map} +0 -0
|
@@ -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";
|
|
@@ -3294,23 +3294,19 @@ class InMemoryTimeseriesStorage {
|
|
|
3294
3294
|
return points.map(clonePoint);
|
|
3295
3295
|
}
|
|
3296
3296
|
async getHistoryBatch(input) {
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
})
|
|
3311
|
-
});
|
|
3312
|
-
}
|
|
3313
|
-
return results;
|
|
3297
|
+
return Promise.all(input.series.map(async (series) => ({
|
|
3298
|
+
...series,
|
|
3299
|
+
points: await this.getHistory({
|
|
3300
|
+
projectId: input.projectId,
|
|
3301
|
+
objectTypeId: series.objectTypeId,
|
|
3302
|
+
objectId: series.objectId,
|
|
3303
|
+
propertyId: series.propertyId,
|
|
3304
|
+
from: input.from,
|
|
3305
|
+
to: input.to,
|
|
3306
|
+
limit: input.limitPerSeries,
|
|
3307
|
+
order: input.order
|
|
3308
|
+
})
|
|
3309
|
+
})));
|
|
3314
3310
|
}
|
|
3315
3311
|
async getLatest(params) {
|
|
3316
3312
|
const series = this.pointsByKey.get(pointKey(params.projectId, params.objectTypeId, params.objectId, params.propertyId));
|
|
@@ -3802,11 +3798,11 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3802
3798
|
await this.assertObject(expected, input.commit.projectId);
|
|
3803
3799
|
for (const expected of input.expected.links)
|
|
3804
3800
|
await this.assertLink(expected, input.commit.projectId);
|
|
3805
|
-
const
|
|
3801
|
+
const expectedScopeRevisions = new Map;
|
|
3806
3802
|
for (const expected of input.expected.linkScopes) {
|
|
3807
3803
|
const key2 = linkScopeSortKey(expected.source, expected.linkId);
|
|
3808
|
-
const current =
|
|
3809
|
-
|
|
3804
|
+
const current = expectedScopeRevisions.get(key2) ?? this.computeEffectiveLinkScope(input.commit.projectId, expected.source, expected.linkId);
|
|
3805
|
+
expectedScopeRevisions.set(key2, current);
|
|
3810
3806
|
if (current.fingerprint !== expected.fingerprint) {
|
|
3811
3807
|
throw new MaterializationConflictError("effective-state", `Expected link scope changed for ${expected.source.objectTypeId}:${expected.source.primaryId}.${expected.linkId}.`);
|
|
3812
3808
|
}
|
|
@@ -3835,7 +3831,7 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3835
3831
|
},
|
|
3836
3832
|
workSealed: false,
|
|
3837
3833
|
incidentLinksByObject: null,
|
|
3838
|
-
|
|
3834
|
+
linkSlotStates: new Map,
|
|
3839
3835
|
objectExistence: new Map,
|
|
3840
3836
|
replacement: null
|
|
3841
3837
|
};
|
|
@@ -3861,7 +3857,7 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3861
3857
|
session.appliedPlanItems.length = 0;
|
|
3862
3858
|
session.outboxEnvelopes.clear();
|
|
3863
3859
|
session.incidentLinksByObject = null;
|
|
3864
|
-
session.
|
|
3860
|
+
session.linkSlotStates = null;
|
|
3865
3861
|
session.objectExistence.clear();
|
|
3866
3862
|
session.replacement = null;
|
|
3867
3863
|
this.liveSessions.delete(session);
|
|
@@ -3908,7 +3904,7 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
3908
3904
|
}
|
|
3909
3905
|
for (const scope of uniqueBy(request.linkScopes, (value) => linkScopeSortKey(value.source, value.linkId))) {
|
|
3910
3906
|
this.requireSession(input.session);
|
|
3911
|
-
const value = this.
|
|
3907
|
+
const value = this.linkSlotState(session, scope.source, scope.linkId);
|
|
3912
3908
|
yield { objects: [], links: [], linkScopes: [value], points: [] };
|
|
3913
3909
|
}
|
|
3914
3910
|
const requestedPoints = uniqueSorted(request.points, (point) => telemetryPointKey(point.series, point.at), (point) => telemetryPointSortKey(point.series, point.at));
|
|
@@ -4453,17 +4449,25 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
4453
4449
|
effective: row ? linkSnapshot(row) : null
|
|
4454
4450
|
};
|
|
4455
4451
|
}
|
|
4456
|
-
|
|
4457
|
-
session.
|
|
4452
|
+
linkSlotState(session, source, linkId) {
|
|
4453
|
+
session.linkSlotStates ??= new Map;
|
|
4458
4454
|
const key2 = linkScopeSortKey(source, linkId);
|
|
4459
|
-
const existing = session.
|
|
4455
|
+
const existing = session.linkSlotStates.get(key2);
|
|
4460
4456
|
if (existing)
|
|
4461
4457
|
return structuredClone(existing);
|
|
4462
|
-
const computed = this.
|
|
4463
|
-
session.
|
|
4458
|
+
const computed = this.computeLinkSlotState(session.header.commit.projectId, source, linkId);
|
|
4459
|
+
session.linkSlotStates.set(key2, computed);
|
|
4464
4460
|
return structuredClone(computed);
|
|
4465
4461
|
}
|
|
4466
|
-
|
|
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) {
|
|
4467
4471
|
const rows = [];
|
|
4468
4472
|
getInMemoryObjectMaterializerAdapter(this.objects).visitExactScopeLinks(projectId, source.objectTypeId, source.primaryId, linkId, (row) => rows.push(row));
|
|
4469
4473
|
rows.sort((left, right) => linkRefSortKey(linkRef(left)).localeCompare(linkRefSortKey(linkRef(right))));
|
|
@@ -4478,8 +4482,6 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
4478
4482
|
const effective = rows.length === 1 ? linkSnapshot(rows[0]) : null;
|
|
4479
4483
|
return {
|
|
4480
4484
|
...finishScopeAccumulator(accumulator),
|
|
4481
|
-
sourceAssertion: this.findActiveLinkScopeSource(projectId, source, linkId),
|
|
4482
|
-
override: structuredClone(publicLinkSlotOverride(this.state.linkSlotOverrides.get(projectEntityKey(projectId, linkScopeKey(source, linkId))))),
|
|
4483
4485
|
effective
|
|
4484
4486
|
};
|
|
4485
4487
|
}
|
|
@@ -7257,4 +7259,4 @@ function assertAppliedPrefix(migrations, rows) {
|
|
|
7257
7259
|
}
|
|
7258
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 };
|
|
7259
7261
|
|
|
7260
|
-
//# debugId=
|
|
7262
|
+
//# debugId=9ED097CBB9250C8464756E2164756E21
|