@sixb/core 0.2.1 → 0.2.2
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 +29 -29
- package/dist/agents/cancel.d.ts.map +1 -1
- package/dist/agents/index.d.ts +5 -3
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +38 -32
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/run-plan.d.ts +15 -1
- package/dist/agents/run-plan.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session.d.ts +14 -2
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/skills.d.ts +3 -0
- package/dist/agents/skills.d.ts.map +1 -1
- package/dist/agents/step-limits.d.ts +6 -0
- package/dist/agents/step-limits.d.ts.map +1 -1
- package/dist/agents/streams/index.js +1 -1
- package/dist/agents/streams/internal.js +1 -1
- package/dist/agents/streams/protocol.d.ts +8 -2
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +3 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/agents/web.d.ts +47 -0
- package/dist/agents/web.d.ts.map +1 -0
- package/dist/artifacts/publish/index.js +16 -16
- package/dist/auth/index.js +3 -3
- package/dist/authorization/index.js +2 -2
- package/dist/authorization/resolve.d.ts +4 -3
- package/dist/authorization/resolve.d.ts.map +1 -1
- package/dist/authorization/types.d.ts +5 -5
- package/dist/authorization/types.d.ts.map +1 -1
- package/dist/bootstrap/index.js +34 -34
- package/dist/{chunk-neftrg0n.js → chunk-0j3crh1w.js} +2 -2
- package/dist/{chunk-tvbmh7tj.js → chunk-2ajw5rz0.js} +14 -10
- package/dist/chunk-2ajw5rz0.js.map +18 -0
- package/dist/{chunk-23s66j86.js → chunk-31kcqmhf.js} +1 -1
- package/dist/{chunk-nghc7eq0.js → chunk-3723kgba.js} +1 -1
- package/dist/{chunk-rjeeyssy.js → chunk-3sqqhpr7.js} +4 -4
- package/dist/{chunk-m3qe54bb.js → chunk-4bm0caep.js} +1 -1
- package/dist/{chunk-h05rg3bx.js → chunk-4s753g3k.js} +3 -3
- package/dist/{chunk-8wsjr52f.js → chunk-5wtnmpze.js} +1 -1
- package/dist/{chunk-edx8xcsm.js → chunk-7z5rkf0m.js} +29 -6
- package/dist/chunk-7z5rkf0m.js.map +13 -0
- package/dist/{chunk-2pk5hjj9.js → chunk-80gym75n.js} +1 -1
- package/dist/{chunk-qbrmpgvv.js → chunk-9whfmsfk.js} +1 -1
- package/dist/{chunk-z3evap21.js → chunk-a5v4gjdx.js} +27 -26
- package/dist/{chunk-z3evap21.js.map → chunk-a5v4gjdx.js.map} +3 -3
- package/dist/{chunk-w53trr0c.js → chunk-a7aa0nzj.js} +5 -5
- package/dist/{chunk-tvefbgvw.js → chunk-az95tsh3.js} +4 -2
- package/dist/chunk-az95tsh3.js.map +11 -0
- package/dist/{chunk-7hd2ez3q.js → chunk-c4nrycdy.js} +1 -1
- package/dist/{chunk-epyfm23v.js → chunk-c706qvyc.js} +3 -3
- package/dist/{chunk-t5daew4g.js → chunk-c7cfe31p.js} +6 -6
- package/dist/{chunk-qsg8rw04.js → chunk-d04g36fw.js} +1 -1
- package/dist/{chunk-ratj7t3t.js → chunk-dsv783c3.js} +305 -32
- package/dist/{chunk-ratj7t3t.js.map → chunk-dsv783c3.js.map} +12 -10
- package/dist/{chunk-cb21tx14.js → chunk-eqgr6nsa.js} +81 -25
- package/dist/{chunk-cb21tx14.js.map → chunk-eqgr6nsa.js.map} +8 -7
- package/dist/{chunk-ax10ft8d.js → chunk-f1h34y3r.js} +5 -5
- package/dist/{chunk-9rh8ncs5.js → chunk-fwsvshr5.js} +1 -1
- package/dist/{chunk-b7a97n8b.js → chunk-ga63a3dz.js} +6 -6
- package/dist/{chunk-b7a97n8b.js.map → chunk-ga63a3dz.js.map} +2 -2
- package/dist/{chunk-cgznz22f.js → chunk-gkv8r794.js} +2 -2
- package/dist/{chunk-t9xyr7y9.js → chunk-j8thxj7w.js} +3 -3
- package/dist/{chunk-31khg3g0.js → chunk-kkjfve0t.js} +73 -2
- package/dist/{chunk-31khg3g0.js.map → chunk-kkjfve0t.js.map} +3 -3
- package/dist/{chunk-8yzhjawq.js → chunk-m2vh8gh0.js} +8 -14
- package/dist/{chunk-8yzhjawq.js.map → chunk-m2vh8gh0.js.map} +3 -3
- package/dist/{chunk-nqnfz3jg.js → chunk-mbc5hvnj.js} +2 -2
- package/dist/{chunk-jk97v21j.js → chunk-n4zzaf6q.js} +3 -2
- package/dist/chunk-n4zzaf6q.js.map +10 -0
- package/dist/{chunk-y2x2935j.js → chunk-nh26e7c5.js} +2 -2
- package/dist/{chunk-jhbk10wf.js → chunk-q9nkpr8k.js} +1 -1
- package/dist/{chunk-47e09r7z.js → chunk-qttqe1ah.js} +86 -6
- package/dist/{chunk-47e09r7z.js.map → chunk-qttqe1ah.js.map} +5 -4
- package/dist/{chunk-3x3bebz7.js → chunk-s7j8ewqv.js} +161 -62
- package/dist/{chunk-3x3bebz7.js.map → chunk-s7j8ewqv.js.map} +7 -6
- package/dist/{chunk-dz7a4t3a.js → chunk-twfreyxr.js} +5 -10
- package/dist/{chunk-dz7a4t3a.js.map → chunk-twfreyxr.js.map} +4 -4
- package/dist/{chunk-ks87m383.js → chunk-w1btn96n.js} +49 -24
- package/dist/{chunk-ks87m383.js.map → chunk-w1btn96n.js.map} +6 -6
- package/dist/{chunk-fg1db9xx.js → chunk-wkq3kvzd.js} +5 -5
- package/dist/chunk-wkq3kvzd.js.map +10 -0
- package/dist/{chunk-aqyjb86c.js → chunk-wrjx1fqz.js} +6 -6
- package/dist/{chunk-agn8d8ys.js → chunk-xtztwpkh.js} +1 -1
- package/dist/{chunk-0g5nyx0k.js → chunk-zeykm8my.js} +2 -2
- package/dist/connectors/connections/runs.d.ts +7 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/execution/agent.js +29 -29
- package/dist/execution/object-reader-security.d.ts.map +1 -1
- package/dist/execution/primitive.js +29 -29
- package/dist/execution/request.js +30 -30
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -37
- package/dist/materializer/index.js +15 -15
- package/dist/models/catalog.d.ts +16 -0
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/definitions.d.ts +1 -1
- package/dist/models/definitions.d.ts.map +1 -1
- package/dist/models/execution/index.js +17 -17
- package/dist/models/execution/model-call-recorder.d.ts +1 -1
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution/web-search.d.ts +7 -0
- package/dist/models/execution/web-search.d.ts.map +1 -0
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +5 -3
- package/dist/models/index.js.map +1 -1
- package/dist/models/language-model.d.ts +12 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/web-search-model.d.ts +66 -0
- package/dist/models/web-search-model.d.ts.map +1 -0
- package/dist/objects/index.js +29 -29
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +1 -0
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +18 -15
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/sort-ties.d.ts +11 -0
- package/dist/objects/query/sort-ties.d.ts.map +1 -0
- package/dist/pipelines/index.js +15 -15
- package/dist/projections/internal.js +15 -15
- package/dist/runtime/create.d.ts +1 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/internal.js +21 -21
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/registry.d.ts +2 -0
- package/dist/security/registry.d.ts.map +1 -1
- package/dist/security/view-conditions.d.ts.map +1 -1
- package/dist/security/visibility-keys.d.ts +19 -0
- package/dist/security/visibility-keys.d.ts.map +1 -0
- package/dist/shares/internal.js +15 -15
- package/dist/storage/agents/in-memory.d.ts +8 -2
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +1 -1
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts +8 -2
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +12 -6
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +42 -2
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +4 -4
- package/dist/storage/ai-limits/enforcement.js +3 -3
- package/dist/storage/ai-limits/provider.js +2 -2
- package/dist/storage/connector-connections/provider.js +3 -3
- package/dist/storage/connector-connections/provider.js.map +3 -3
- package/dist/storage/file-upload-sessions/provider.js +4 -4
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +14 -14
- package/dist/storage/internal.js +2 -2
- package/dist/storage/migrations/types.d.ts +6 -0
- package/dist/storage/migrations/types.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/objects/index.d.ts +1 -1
- package/dist/storage/objects/index.d.ts.map +1 -1
- package/dist/storage/objects/query-preparation.d.ts +13 -0
- package/dist/storage/objects/query-preparation.d.ts.map +1 -1
- package/dist/storage/objects/read-scope.d.ts.map +1 -1
- package/dist/storage/objects/types.d.ts +52 -0
- package/dist/storage/objects/types.d.ts.map +1 -1
- package/dist/storage/share-grants/provider.js +2 -2
- package/dist/storage/workflow-runs/provider.js +4 -4
- package/dist/syncs/index.js +17 -17
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-limit-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.js +399 -45
- package/dist/testing/index.js.map +8 -8
- package/dist/testing/object-conditional-read-scope-contract.d.ts.map +1 -1
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +15 -15
- package/dist/workflows/index.js +31 -31
- package/package.json +1 -1
- package/src/agents/README.md +2 -1
- package/src/agents/cancel.ts +7 -1
- package/src/agents/index.ts +9 -1
- package/src/agents/run-plan.ts +31 -0
- package/src/agents/run-session-http.ts +15 -12
- package/src/agents/run-session-serve.ts +8 -2
- package/src/agents/run-session.ts +31 -11
- package/src/agents/skills.ts +3 -0
- package/src/agents/step-limits.ts +6 -0
- package/src/agents/streams/protocol.ts +9 -4
- package/src/agents/tool-files.ts +11 -3
- package/src/agents/validation.ts +9 -0
- package/src/agents/web.ts +218 -0
- package/src/authorization/resolve.ts +9 -11
- package/src/authorization/types.ts +5 -5
- package/src/connectors/connections/runs.ts +42 -5
- package/src/execution/object-reader-security.ts +4 -9
- package/src/index.ts +2 -0
- package/src/models/catalog.ts +52 -3
- package/src/models/definitions.ts +2 -0
- package/src/models/execution/README.md +22 -2
- package/src/models/execution/model-call-recorder.ts +1 -1
- package/src/models/execution/web-search.ts +186 -0
- package/src/models/index.ts +12 -0
- package/src/models/language-model.ts +12 -0
- package/src/models/web-search-model.ts +152 -0
- package/src/objects/query/executor.ts +7 -3
- package/src/objects/query/index.ts +1 -0
- package/src/objects/query/sort-ties.ts +16 -0
- package/src/runtime/create.ts +3 -2
- package/src/runtime/resolve-definitions.ts +4 -0
- package/src/security/index.ts +1 -0
- package/src/security/registry.ts +2 -0
- package/src/security/view-conditions.ts +4 -3
- package/src/security/visibility-keys.ts +144 -0
- package/src/storage/agents/in-memory.ts +29 -2
- package/src/storage/agents/index.ts +2 -0
- package/src/storage/agents/provider.ts +57 -1
- package/src/storage/agents/types.ts +45 -2
- package/src/storage/connector-connections/in-memory.ts +2 -2
- package/src/storage/connector-connections/provider/connections.ts +2 -2
- package/src/storage/index.ts +4 -0
- package/src/storage/migrations/types.ts +6 -0
- package/src/storage/objects/in-memory/query.ts +5 -2
- package/src/storage/objects/index.ts +2 -0
- package/src/storage/objects/query-preparation.ts +59 -1
- package/src/storage/objects/read-scope.ts +108 -2
- package/src/storage/objects/types.ts +43 -0
- package/src/testing/agent-storage-contract.ts +70 -0
- package/src/testing/ai-limit-storage-contract.ts +11 -1
- package/src/testing/ai-usage-storage-contract.ts +15 -2
- package/src/testing/connector-connection-storage-contract.ts +23 -0
- package/src/testing/object-conditional-read-scope-contract.ts +267 -5
- package/src/testing/object-query-contract.ts +75 -0
- package/dist/chunk-edx8xcsm.js.map +0 -13
- package/dist/chunk-fg1db9xx.js.map +0 -10
- package/dist/chunk-jk97v21j.js.map +0 -10
- package/dist/chunk-tvbmh7tj.js.map +0 -18
- package/dist/chunk-tvefbgvw.js.map +0 -11
- /package/dist/{chunk-neftrg0n.js.map → chunk-0j3crh1w.js.map} +0 -0
- /package/dist/{chunk-23s66j86.js.map → chunk-31kcqmhf.js.map} +0 -0
- /package/dist/{chunk-nghc7eq0.js.map → chunk-3723kgba.js.map} +0 -0
- /package/dist/{chunk-rjeeyssy.js.map → chunk-3sqqhpr7.js.map} +0 -0
- /package/dist/{chunk-m3qe54bb.js.map → chunk-4bm0caep.js.map} +0 -0
- /package/dist/{chunk-h05rg3bx.js.map → chunk-4s753g3k.js.map} +0 -0
- /package/dist/{chunk-8wsjr52f.js.map → chunk-5wtnmpze.js.map} +0 -0
- /package/dist/{chunk-2pk5hjj9.js.map → chunk-80gym75n.js.map} +0 -0
- /package/dist/{chunk-qbrmpgvv.js.map → chunk-9whfmsfk.js.map} +0 -0
- /package/dist/{chunk-w53trr0c.js.map → chunk-a7aa0nzj.js.map} +0 -0
- /package/dist/{chunk-7hd2ez3q.js.map → chunk-c4nrycdy.js.map} +0 -0
- /package/dist/{chunk-epyfm23v.js.map → chunk-c706qvyc.js.map} +0 -0
- /package/dist/{chunk-t5daew4g.js.map → chunk-c7cfe31p.js.map} +0 -0
- /package/dist/{chunk-qsg8rw04.js.map → chunk-d04g36fw.js.map} +0 -0
- /package/dist/{chunk-ax10ft8d.js.map → chunk-f1h34y3r.js.map} +0 -0
- /package/dist/{chunk-9rh8ncs5.js.map → chunk-fwsvshr5.js.map} +0 -0
- /package/dist/{chunk-cgznz22f.js.map → chunk-gkv8r794.js.map} +0 -0
- /package/dist/{chunk-t9xyr7y9.js.map → chunk-j8thxj7w.js.map} +0 -0
- /package/dist/{chunk-nqnfz3jg.js.map → chunk-mbc5hvnj.js.map} +0 -0
- /package/dist/{chunk-y2x2935j.js.map → chunk-nh26e7c5.js.map} +0 -0
- /package/dist/{chunk-jhbk10wf.js.map → chunk-q9nkpr8k.js.map} +0 -0
- /package/dist/{chunk-aqyjb86c.js.map → chunk-wrjx1fqz.js.map} +0 -0
- /package/dist/{chunk-agn8d8ys.js.map → chunk-xtztwpkh.js.map} +0 -0
- /package/dist/{chunk-0g5nyx0k.js.map → chunk-zeykm8my.js.map} +0 -0
|
@@ -12,19 +12,20 @@ import {
|
|
|
12
12
|
hasVectorProfile2,
|
|
13
13
|
linkTargetObjectTypeIds,
|
|
14
14
|
linkEndpointObjectTypeIds2,
|
|
15
|
+
viewConditionKeys,
|
|
15
16
|
paginate,
|
|
16
17
|
InMemoryAuthStorage2,
|
|
17
18
|
principalsEqual2
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-s7j8ewqv.js";
|
|
19
20
|
import {
|
|
20
21
|
ObjectReadLimitExceededError2,
|
|
21
22
|
snapshotObjectReadExecutionLimits2,
|
|
22
23
|
assertObjectReadFacetCount2,
|
|
23
24
|
assertObjectReadOutputWithinLimit2
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-twfreyxr.js";
|
|
25
26
|
import {
|
|
26
27
|
assertObjectReaderProject2
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-kkjfve0t.js";
|
|
28
29
|
import {
|
|
29
30
|
UNIQUE_VALUE_KEY_VERSION,
|
|
30
31
|
uniquePropertiesOf,
|
|
@@ -49,6 +50,8 @@ import {
|
|
|
49
50
|
assertAgentThreadComputer2,
|
|
50
51
|
assertComputerPlace2,
|
|
51
52
|
assertAgentComputerSession2,
|
|
53
|
+
assertAgentBackgroundCommandRef2,
|
|
54
|
+
withStopRequest2,
|
|
52
55
|
assertAssignableComputer2,
|
|
53
56
|
assertMovableToCloud2,
|
|
54
57
|
assertTurnInThreadPlace2,
|
|
@@ -85,7 +88,7 @@ import {
|
|
|
85
88
|
assertAgentApprovalCaller2,
|
|
86
89
|
newAgentApprovalRecord2,
|
|
87
90
|
agentApprovalMatches2
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-7z5rkf0m.js";
|
|
89
92
|
import {
|
|
90
93
|
InMemoryAiUsageStorage2,
|
|
91
94
|
buildAiAccountingOverview,
|
|
@@ -94,7 +97,7 @@ import {
|
|
|
94
97
|
buildAiModelCallGroups,
|
|
95
98
|
normalizeAiModelCallCostRecord2,
|
|
96
99
|
aiModelCallCostMatchesUsage2
|
|
97
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-zeykm8my.js";
|
|
98
101
|
import {
|
|
99
102
|
AiLimitStorageError2,
|
|
100
103
|
aiLimitCalendarMonth2,
|
|
@@ -120,14 +123,14 @@ import {
|
|
|
120
123
|
cloneAiLimitPolicy2,
|
|
121
124
|
assertNonBlank2,
|
|
122
125
|
cloneValidDate2
|
|
123
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-c4nrycdy.js";
|
|
124
127
|
import {
|
|
125
128
|
isAbandonedFileUploadSession,
|
|
126
129
|
shouldDeleteFileUploadSession
|
|
127
130
|
} from "./chunk-h89wz928.js";
|
|
128
131
|
import {
|
|
129
132
|
DurableFileUploadSessions2
|
|
130
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-31kcqmhf.js";
|
|
131
134
|
import {
|
|
132
135
|
actionSubjectsEqual,
|
|
133
136
|
normalizeRecordActionRunInput2,
|
|
@@ -267,7 +270,7 @@ import {
|
|
|
267
270
|
WorkflowRunError2,
|
|
268
271
|
assertWorkflowRunExecution2,
|
|
269
272
|
assertWorkflowAgentNodeRunExecution2
|
|
270
|
-
} from "./chunk-
|
|
273
|
+
} from "./chunk-0j3crh1w.js";
|
|
271
274
|
import {
|
|
272
275
|
ShareGrantStorageError2,
|
|
273
276
|
normalizeShareGrantCreate2,
|
|
@@ -276,7 +279,7 @@ import {
|
|
|
276
279
|
normalizeListShareGrantsInput2,
|
|
277
280
|
normalizeRevokeShareGrantInput2,
|
|
278
281
|
cloneShareGrantRecord2
|
|
279
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-80gym75n.js";
|
|
280
283
|
import {
|
|
281
284
|
ShareSessionStorageError2,
|
|
282
285
|
normalizeShareSessionCreate2,
|
|
@@ -307,10 +310,11 @@ import {
|
|
|
307
310
|
import {
|
|
308
311
|
AGENT_RUN_FAILURE_CODES2,
|
|
309
312
|
AGENT_TOKEN_RATE_SAMPLES2
|
|
310
|
-
} from "./chunk-
|
|
313
|
+
} from "./chunk-n4zzaf6q.js";
|
|
311
314
|
import {
|
|
312
315
|
cloneJsonValue2,
|
|
313
|
-
stableJsonStringify2
|
|
316
|
+
stableJsonStringify2,
|
|
317
|
+
compareStrings
|
|
314
318
|
} from "./chunk-wy0qdqfm.js";
|
|
315
319
|
// src/storage/action-runs/in-memory.ts
|
|
316
320
|
var runDirectly = async (run) => run();
|
|
@@ -1318,7 +1322,22 @@ class InMemoryAgentComputerSessionStore {
|
|
|
1318
1322
|
sessions = new Map;
|
|
1319
1323
|
async hold(input) {
|
|
1320
1324
|
assertAgentComputerSession2(input);
|
|
1321
|
-
|
|
1325
|
+
const { backgroundCommands, ...session } = input;
|
|
1326
|
+
const stopRequests = this.sessions.get(sessionKey(input))?.stopRequests;
|
|
1327
|
+
this.sessions.set(sessionKey(input), clone({
|
|
1328
|
+
...session,
|
|
1329
|
+
...backgroundCommands?.length ? { backgroundCommands } : {},
|
|
1330
|
+
...stopRequests?.length ? { stopRequests } : {}
|
|
1331
|
+
}));
|
|
1332
|
+
}
|
|
1333
|
+
async requestStop(input) {
|
|
1334
|
+
assertAgentBackgroundCommandRef2(input.command);
|
|
1335
|
+
const held = this.sessions.get(sessionKey(input));
|
|
1336
|
+
if (!held)
|
|
1337
|
+
return null;
|
|
1338
|
+
const next = { ...held, stopRequests: withStopRequest2(held.stopRequests ?? [], input.command) };
|
|
1339
|
+
this.sessions.set(sessionKey(input), clone(next));
|
|
1340
|
+
return clone(next);
|
|
1322
1341
|
}
|
|
1323
1342
|
async release(input) {
|
|
1324
1343
|
const held = this.sessions.get(sessionKey(input)) ?? null;
|
|
@@ -2588,7 +2607,7 @@ class InMemoryConnectorConnectionStorage2 {
|
|
|
2588
2607
|
}
|
|
2589
2608
|
const existing = this.findConnectionRecord(input);
|
|
2590
2609
|
const sameAccount = existing?.account.id === account.id;
|
|
2591
|
-
if (existing && !sameAccount && !input.replace) {
|
|
2610
|
+
if (existing?.status === "connected" && !sameAccount && !input.replace) {
|
|
2592
2611
|
throw new ConnectorConnectionStorageError2("connection_conflict", `[Sixb] Connector slot '${input.slot}' is already connected to another account; explicit replacement is required.`);
|
|
2593
2612
|
}
|
|
2594
2613
|
if (!existing && this.connections.has(input.id)) {
|
|
@@ -2647,7 +2666,7 @@ class InMemoryConnectorConnectionStorage2 {
|
|
|
2647
2666
|
authorization: structuredClone(updatedAuthorization),
|
|
2648
2667
|
...revocationPendingAuthorizationId === undefined ? {} : { revocationPendingAuthorizationId },
|
|
2649
2668
|
created: existing === undefined,
|
|
2650
|
-
replaced: existing
|
|
2669
|
+
replaced: existing?.status === "connected" && !sameAccount
|
|
2651
2670
|
};
|
|
2652
2671
|
}
|
|
2653
2672
|
async getConnection(input) {
|
|
@@ -3602,7 +3621,7 @@ function compareQueryScalarValues(left, right, scalarKind) {
|
|
|
3602
3621
|
switch (scalarKind) {
|
|
3603
3622
|
case "string":
|
|
3604
3623
|
case "uuid":
|
|
3605
|
-
return typeof left === "string" && typeof right === "string" ?
|
|
3624
|
+
return typeof left === "string" && typeof right === "string" ? compareStrings2(left, right) : Number.NaN;
|
|
3606
3625
|
case "boolean":
|
|
3607
3626
|
return typeof left === "boolean" && typeof right === "boolean" ? Number(left) - Number(right) : Number.NaN;
|
|
3608
3627
|
case "integer":
|
|
@@ -3644,7 +3663,7 @@ function compareRuntimeValues(left, right) {
|
|
|
3644
3663
|
if (typeof left === "number" && typeof right === "number")
|
|
3645
3664
|
return left - right;
|
|
3646
3665
|
if (typeof left === "string" && typeof right === "string")
|
|
3647
|
-
return
|
|
3666
|
+
return compareStrings2(left, right);
|
|
3648
3667
|
if (typeof left === "boolean" && typeof right === "boolean") {
|
|
3649
3668
|
return Number(left) - Number(right);
|
|
3650
3669
|
}
|
|
@@ -3677,7 +3696,7 @@ function dateTime(value) {
|
|
|
3677
3696
|
}
|
|
3678
3697
|
return null;
|
|
3679
3698
|
}
|
|
3680
|
-
function
|
|
3699
|
+
function compareStrings2(left, right) {
|
|
3681
3700
|
if (left === right)
|
|
3682
3701
|
return 0;
|
|
3683
3702
|
const length = Math.min(left.length, right.length);
|
|
@@ -3752,7 +3771,7 @@ function objectRowKey(projectId, objectTypeId) {
|
|
|
3752
3771
|
function objectRowProjectPrefix(projectId) {
|
|
3753
3772
|
return `[${JSON.stringify(projectId)},`;
|
|
3754
3773
|
}
|
|
3755
|
-
function
|
|
3774
|
+
function compareStrings3(left, right) {
|
|
3756
3775
|
if (left < right)
|
|
3757
3776
|
return -1;
|
|
3758
3777
|
if (left > right)
|
|
@@ -3781,6 +3800,12 @@ function rowIdentityKeyParts(objectTypeId, primaryId) {
|
|
|
3781
3800
|
return objectBatchKey2(objectTypeId, primaryId);
|
|
3782
3801
|
}
|
|
3783
3802
|
|
|
3803
|
+
// src/objects/query/sort-ties.ts
|
|
3804
|
+
function sortTieDirection2(fields) {
|
|
3805
|
+
const last = fields.filter((field) => field.kind === "property").at(-1);
|
|
3806
|
+
return last?.direction === "desc" ? "desc" : "asc";
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3784
3809
|
// src/storage/objects/in-memory/query.ts
|
|
3785
3810
|
var IN_MEMORY_OBJECT_QUERY_CAPABILITIES = {
|
|
3786
3811
|
queryObjects: true,
|
|
@@ -3963,7 +3988,7 @@ function evaluateRefs(refs, source) {
|
|
|
3963
3988
|
seen.add(key);
|
|
3964
3989
|
const row = source.getObject(ref.objectTypeId, ref.primaryId);
|
|
3965
3990
|
return row ? [row] : [];
|
|
3966
|
-
}).sort((left, right) =>
|
|
3991
|
+
}).sort((left, right) => compareStrings3(left.objectTypeId, right.objectTypeId) || compareStrings3(left.primaryId, right.primaryId)).map((row, order) => ({ row, score: 0, order }));
|
|
3967
3992
|
return completeEvaluation(entries);
|
|
3968
3993
|
}
|
|
3969
3994
|
function evaluateSet(op, inputs, source) {
|
|
@@ -4096,13 +4121,15 @@ function vectorSimilarity(actual, expected) {
|
|
|
4096
4121
|
return dot / (Math.sqrt(actualNorm) * Math.sqrt(expectedNorm));
|
|
4097
4122
|
}
|
|
4098
4123
|
function sortEntries(entries, fields) {
|
|
4124
|
+
const ties = sortTieDirection2(fields);
|
|
4099
4125
|
return [...entries].sort((left, right) => {
|
|
4100
4126
|
for (const field of fields) {
|
|
4101
4127
|
const comparison = compareSortField(left, right, field);
|
|
4102
4128
|
if (comparison !== 0)
|
|
4103
4129
|
return comparison;
|
|
4104
4130
|
}
|
|
4105
|
-
|
|
4131
|
+
const tie = left.order - right.order || rowIdentityKey(left.row).localeCompare(rowIdentityKey(right.row));
|
|
4132
|
+
return ties === "desc" ? -tie : tie;
|
|
4106
4133
|
});
|
|
4107
4134
|
}
|
|
4108
4135
|
function compareSortField(left, right, field) {
|
|
@@ -4932,7 +4959,7 @@ class InMemoryObjectStorage {
|
|
|
4932
4959
|
async listByPrimaryIdPage(params) {
|
|
4933
4960
|
assertReconciliationPageLimit(params.limit);
|
|
4934
4961
|
const bucket = this.rows.get(objectRowKey(params.projectId, params.objectTypeId));
|
|
4935
|
-
const rows = [...bucket?.values() ?? []].filter((row) => !params.afterPrimaryId ||
|
|
4962
|
+
const rows = [...bucket?.values() ?? []].filter((row) => !params.afterPrimaryId || compareStrings3(row.primaryId, params.afterPrimaryId) > 0).sort((left, right) => compareStrings3(left.primaryId, right.primaryId)).slice(0, params.limit + 1);
|
|
4936
4963
|
const hasMore = rows.length > params.limit;
|
|
4937
4964
|
const objects = rows.slice(0, params.limit).map((row) => structuredClone(row));
|
|
4938
4965
|
const last = objects.at(-1);
|
|
@@ -9884,6 +9911,7 @@ async function prepareObjectQueries2(input) {
|
|
|
9884
9911
|
throw new Error("[Sixb] This storage provider does not support object query preparation");
|
|
9885
9912
|
}
|
|
9886
9913
|
const values = input.ontology.getValueTypesById();
|
|
9914
|
+
const visibility = viewConditionKeysByType(input.security, input.ontology);
|
|
9887
9915
|
const objectTypes = input.ontology.listObjectTypes().map((type) => ({
|
|
9888
9916
|
objectTypeId: type.id,
|
|
9889
9917
|
properties: type.properties.filter((property) => property.mode !== "telemetry" && !property.primary).map((property) => {
|
|
@@ -9901,9 +9929,37 @@ async function prepareObjectQueries2(input) {
|
|
|
9901
9929
|
links: type.links.map((link) => ({
|
|
9902
9930
|
linkId: link.id,
|
|
9903
9931
|
targetObjectTypeIds: linkTargetObjectTypeIds(link.targetObjectTypeId, input.ontology)
|
|
9904
|
-
}))
|
|
9932
|
+
})),
|
|
9933
|
+
...visibility ? { visibility: visibility.get(type.id) ?? [] } : {}
|
|
9905
9934
|
}));
|
|
9906
|
-
|
|
9935
|
+
const result = await input.storage.prepareObjectQueries({
|
|
9936
|
+
projectId: input.projectId,
|
|
9937
|
+
objectTypes
|
|
9938
|
+
});
|
|
9939
|
+
const unindexed = (input.security?.listViewConditions() ?? []).filter((condition) => !viewConditionKeys(condition.predicate)).map((condition) => `Role '${condition.roleId}': can.view(${condition.objectTypeId}).where(...) negates currentUser() or needs it twice at once, so members' reads check every object.`);
|
|
9940
|
+
return unindexed.length > 0 ? { ...result, warnings: [...result.warnings, ...unindexed] } : result;
|
|
9941
|
+
}
|
|
9942
|
+
function viewConditionKeysByType(security, ontology) {
|
|
9943
|
+
if (!security)
|
|
9944
|
+
return;
|
|
9945
|
+
const keysByType = new Map;
|
|
9946
|
+
for (const condition of security.listViewConditions()) {
|
|
9947
|
+
const keys = viewConditionKeys(condition.predicate);
|
|
9948
|
+
if (!keys)
|
|
9949
|
+
continue;
|
|
9950
|
+
for (const objectTypeId of [
|
|
9951
|
+
condition.objectTypeId,
|
|
9952
|
+
...ontology.listSubTypes(condition.objectTypeId)
|
|
9953
|
+
]) {
|
|
9954
|
+
const typeKeys = keysByType.get(objectTypeId) ?? new Map;
|
|
9955
|
+
typeKeys.set(JSON.stringify(keys), keys);
|
|
9956
|
+
keysByType.set(objectTypeId, typeKeys);
|
|
9957
|
+
}
|
|
9958
|
+
}
|
|
9959
|
+
return new Map([...keysByType].map(([objectTypeId, keys]) => [
|
|
9960
|
+
objectTypeId,
|
|
9961
|
+
[...keys].sort(([left], [right]) => compareStrings(left, right)).map(([, value]) => value)
|
|
9962
|
+
]));
|
|
9907
9963
|
}
|
|
9908
9964
|
|
|
9909
9965
|
// src/storage/migrations/prepare-unique-properties.ts
|
|
@@ -10226,6 +10282,6 @@ var VECTOR_INDEXING_FAILURE_CODES2 = [
|
|
|
10226
10282
|
"vector.outcome_unknown",
|
|
10227
10283
|
"internal.unexpected"
|
|
10228
10284
|
];
|
|
10229
|
-
export { InMemoryActionRunStorage2, AGENT_MESSAGE_CONTENT_VERSION2, InMemoryAgentStorage2, AiCostStorageError2, InMemoryAiCostStorage2, InMemoryAiLimitStorage2, InMemoryConnectorConnectionStorage2, InMemoryFileUploadSessions2, objectBatchKey2, linkBatchKey2, objectLinkCursor2, compareQueryScalarValues, matchesPredicate, PIPELINE_RUN_FAILURE_CODES2, InMemoryPipelineRunStorage2, InMemoryProjectionRunStorage2, InMemoryRulesStorage2, InMemoryShareGrantStorage2, InMemoryShareSessionStorage2, SYNC_RUN_FAILURE_CODES2, InMemorySyncRunStorage2, WEBHOOK_RUN_FAILURE_CODES2, canRetryWebhookRun2, InMemoryWebhookRunStorage2, WorkflowInterventionError2, InMemoryWorkflowInterventionStorage2, WORKFLOW_RUN_FAILURE_CODES2, InMemoryWorkflowRunStorage2, InMemoryWorkflowNodeRunStorage2, InMemoryWorkflowAgentNodeRunStorage2, InMemoryStorage2, prepareObjectQueries2, isMigrationCapableStorage2, migrateStorage2, checkStorageSchema2, step2, defineMigrations2, runMigrationSet2, describeMigrationHistory2, VECTOR_INDEXING_FAILURE_CODES2 };
|
|
10285
|
+
export { InMemoryActionRunStorage2, AGENT_MESSAGE_CONTENT_VERSION2, InMemoryAgentStorage2, AiCostStorageError2, InMemoryAiCostStorage2, InMemoryAiLimitStorage2, InMemoryConnectorConnectionStorage2, InMemoryFileUploadSessions2, objectBatchKey2, linkBatchKey2, objectLinkCursor2, compareQueryScalarValues, matchesPredicate, sortTieDirection2, PIPELINE_RUN_FAILURE_CODES2, InMemoryPipelineRunStorage2, InMemoryProjectionRunStorage2, InMemoryRulesStorage2, InMemoryShareGrantStorage2, InMemoryShareSessionStorage2, SYNC_RUN_FAILURE_CODES2, InMemorySyncRunStorage2, WEBHOOK_RUN_FAILURE_CODES2, canRetryWebhookRun2, InMemoryWebhookRunStorage2, WorkflowInterventionError2, InMemoryWorkflowInterventionStorage2, WORKFLOW_RUN_FAILURE_CODES2, InMemoryWorkflowRunStorage2, InMemoryWorkflowNodeRunStorage2, InMemoryWorkflowAgentNodeRunStorage2, InMemoryStorage2, prepareObjectQueries2, isMigrationCapableStorage2, migrateStorage2, checkStorageSchema2, step2, defineMigrations2, runMigrationSet2, describeMigrationHistory2, VECTOR_INDEXING_FAILURE_CODES2 };
|
|
10230
10286
|
|
|
10231
|
-
//# debugId=
|
|
10287
|
+
//# debugId=8D117265D5FCBCEA64756E2164756E21
|