@sixb/core 0.2.0 → 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 +30 -30
- 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 +39 -33
- 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 +17 -17
- 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 +38 -38
- package/dist/{chunk-neftrg0n.js → chunk-0j3crh1w.js} +2 -2
- package/dist/{chunk-8dcfj58k.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-fdkpkkpw.js → chunk-3sqqhpr7.js} +5 -5
- package/dist/{chunk-m3qe54bb.js → chunk-4bm0caep.js} +1 -1
- package/dist/{chunk-ztf5vtmp.js → chunk-4s753g3k.js} +41 -10
- package/dist/chunk-4s753g3k.js.map +12 -0
- package/dist/{chunk-fntqb7qy.js → chunk-57g0215c.js} +1 -1
- 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-qya541bk.js → chunk-a5v4gjdx.js} +31 -28
- package/dist/{chunk-qya541bk.js.map → chunk-a5v4gjdx.js.map} +4 -4
- package/dist/{chunk-he7g39e5.js → chunk-a7aa0nzj.js} +7 -7
- 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-ekkpzcka.js → chunk-c706qvyc.js} +36 -9
- package/dist/chunk-c706qvyc.js.map +11 -0
- package/dist/{chunk-n54k068r.js → chunk-c7cfe31p.js} +7 -7
- package/dist/{chunk-qsg8rw04.js → chunk-d04g36fw.js} +1 -1
- package/dist/{chunk-hjy3dsws.js → chunk-dsv783c3.js} +305 -32
- package/dist/{chunk-hjy3dsws.js.map → chunk-dsv783c3.js.map} +12 -10
- package/dist/{chunk-peggaard.js → chunk-e6xgz4h4.js} +20 -2
- package/dist/{chunk-peggaard.js.map → chunk-e6xgz4h4.js.map} +5 -3
- package/dist/{chunk-e99kp9jh.js → chunk-eqgr6nsa.js} +86 -30
- package/dist/{chunk-e99kp9jh.js.map → chunk-eqgr6nsa.js.map} +10 -9
- package/dist/{chunk-f2w6328x.js → chunk-f1h34y3r.js} +6 -6
- package/dist/{chunk-9rh8ncs5.js → chunk-fwsvshr5.js} +1 -1
- package/dist/{chunk-c78jjzhy.js → chunk-ga63a3dz.js} +6 -6
- package/dist/{chunk-c78jjzhy.js.map → chunk-ga63a3dz.js.map} +2 -2
- package/dist/{chunk-cgznz22f.js → chunk-gkv8r794.js} +2 -2
- package/dist/{chunk-d3t26vah.js → chunk-j1ny5fwh.js} +35 -11
- package/dist/chunk-j1ny5fwh.js.map +15 -0
- package/dist/{chunk-8hvfs0fr.js → chunk-j8thxj7w.js} +4 -4
- package/dist/{chunk-855n80en.js → chunk-jjmggm9a.js} +1 -1
- 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-fb3m4sa1.js → chunk-m2vh8gh0.js} +8 -14
- package/dist/{chunk-fb3m4sa1.js.map → chunk-m2vh8gh0.js.map} +3 -3
- package/dist/{chunk-vkweppkw.js → chunk-mbc5hvnj.js} +3 -3
- 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-9mab3dvg.js → chunk-s038wa5v.js} +9 -1
- package/dist/{chunk-9mab3dvg.js.map → chunk-s038wa5v.js.map} +3 -3
- 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-semf1yqn.js → chunk-w1btn96n.js} +51 -26
- package/dist/{chunk-semf1yqn.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-xj97s5js.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/datasets/execution.d.ts.map +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/selectors/index.js +1 -1
- package/dist/events/selectors/predicate.d.ts.map +1 -1
- package/dist/events/types/datasets.d.ts +6 -0
- package/dist/events/types/datasets.d.ts.map +1 -1
- package/dist/execution/agent.js +30 -30
- package/dist/execution/object-reader-security.d.ts.map +1 -1
- package/dist/execution/primitive.js +30 -30
- package/dist/execution/request.js +31 -31
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -42
- package/dist/lake-storage/in-memory.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +2 -2
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +6 -2
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/source-ordering.d.ts +7 -0
- package/dist/lake-storage/source-ordering.d.ts.map +1 -1
- package/dist/lake-storage/types.d.ts +18 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/lake-storage/version-inputs.d.ts +11 -3
- package/dist/lake-storage/version-inputs.d.ts.map +1 -1
- package/dist/materializer/index.js +16 -16
- 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 +18 -18
- 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 +30 -30
- 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 +19 -16
- 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 +19 -19
- package/dist/pipelines/run-dispatch.d.ts +2 -0
- package/dist/pipelines/run-dispatch.d.ts.map +1 -1
- package/dist/projections/internal.js +16 -16
- package/dist/runtime/create.d.ts +1 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/internal.js +22 -22
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/schedules/index.js +2 -2
- 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 +16 -16
- 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 +15 -15
- package/dist/storage/internal.d.ts +2 -0
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +8 -4
- package/dist/storage/internal.js.map +1 -1
- 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/pipeline-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/transitions.d.ts +7 -0
- package/dist/storage/pipeline-runs/transitions.d.ts.map +1 -0
- package/dist/storage/share-grants/provider.js +2 -2
- package/dist/storage/sync-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/sync-runs/transitions.d.ts +7 -0
- package/dist/storage/sync-runs/transitions.d.ts.map +1 -0
- package/dist/storage/workflow-runs/provider.js +4 -4
- package/dist/syncs/index.js +20 -20
- package/dist/syncs/run-dispatch.d.ts +2 -0
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- 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/dataset-sequence-contract.d.ts.map +1 -1
- package/dist/testing/index.js +552 -61
- package/dist/testing/index.js.map +11 -11
- package/dist/testing/lake-changes-contract.d.ts.map +1 -1
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- 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 +16 -16
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.d.ts.map +1 -1
- package/dist/workers/index.js +12 -2
- package/dist/workers/index.js.map +5 -4
- package/dist/workers/unstarted-run.d.ts +10 -0
- package/dist/workers/unstarted-run.d.ts.map +1 -0
- package/dist/workflows/index.js +34 -34
- 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/datasets/execution.ts +2 -0
- package/src/events/selectors/predicate.ts +15 -0
- package/src/events/types/datasets.ts +6 -0
- package/src/execution/object-reader-security.ts +4 -9
- package/src/index.ts +2 -0
- package/src/lake-storage/in-memory.ts +30 -20
- package/src/lake-storage/index.ts +2 -1
- package/src/lake-storage/source-ordering.ts +31 -4
- package/src/lake-storage/types.ts +18 -0
- package/src/lake-storage/version-inputs.ts +21 -5
- 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/pipelines/run-dispatch.ts +53 -6
- 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/internal.ts +2 -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/storage/pipeline-runs/in-memory.ts +2 -5
- package/src/storage/pipeline-runs/transitions.ts +14 -0
- package/src/storage/sync-runs/in-memory.ts +2 -5
- package/src/storage/sync-runs/transitions.ts +11 -0
- package/src/syncs/run-dispatch.ts +68 -13
- 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/dataset-sequence-contract.ts +81 -0
- package/src/testing/lake-changes-contract.ts +2 -1
- package/src/testing/lake-storage-contract.ts +112 -0
- package/src/testing/object-conditional-read-scope-contract.ts +267 -5
- package/src/testing/object-query-contract.ts +75 -0
- package/src/workers/index.ts +1 -0
- package/src/workers/unstarted-run.ts +18 -0
- package/dist/chunk-8dcfj58k.js.map +0 -18
- package/dist/chunk-d3t26vah.js.map +0 -15
- package/dist/chunk-edx8xcsm.js.map +0 -13
- package/dist/chunk-ekkpzcka.js.map +0 -11
- package/dist/chunk-fg1db9xx.js.map +0 -10
- package/dist/chunk-jk97v21j.js.map +0 -10
- package/dist/chunk-tvefbgvw.js.map +0 -11
- package/dist/chunk-ztf5vtmp.js.map +0 -12
- /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-fdkpkkpw.js.map → chunk-3sqqhpr7.js.map} +0 -0
- /package/dist/{chunk-m3qe54bb.js.map → chunk-4bm0caep.js.map} +0 -0
- /package/dist/{chunk-fntqb7qy.js.map → chunk-57g0215c.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-he7g39e5.js.map → chunk-a7aa0nzj.js.map} +0 -0
- /package/dist/{chunk-7hd2ez3q.js.map → chunk-c4nrycdy.js.map} +0 -0
- /package/dist/{chunk-n54k068r.js.map → chunk-c7cfe31p.js.map} +0 -0
- /package/dist/{chunk-qsg8rw04.js.map → chunk-d04g36fw.js.map} +0 -0
- /package/dist/{chunk-f2w6328x.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-8hvfs0fr.js.map → chunk-j8thxj7w.js.map} +0 -0
- /package/dist/{chunk-855n80en.js.map → chunk-jjmggm9a.js.map} +0 -0
- /package/dist/{chunk-vkweppkw.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-xj97s5js.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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
isProjectionDefinition2
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-twfreyxr.js";
|
|
5
5
|
import {
|
|
6
6
|
isActionDefinition2,
|
|
7
7
|
ShareDefinitionError2,
|
|
8
8
|
isShareDefinition,
|
|
9
9
|
snapshotShareDefinition
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-s7j8ewqv.js";
|
|
11
11
|
import {
|
|
12
12
|
isWorkflowDefinition2
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-a5v4gjdx.js";
|
|
14
14
|
import {
|
|
15
15
|
isMarkingDefinition,
|
|
16
16
|
isGroupDefinition,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-wx7smkn2.js";
|
|
23
23
|
import {
|
|
24
24
|
isPipelineDefinition2
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-jjmggm9a.js";
|
|
26
26
|
import {
|
|
27
27
|
assertPredicateShape,
|
|
28
28
|
createPropertyPredicateBuilder,
|
|
@@ -31,13 +31,13 @@ import {
|
|
|
31
31
|
anyPredicates,
|
|
32
32
|
notPredicate,
|
|
33
33
|
isScheduleDefinition2
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-57g0215c.js";
|
|
35
35
|
import {
|
|
36
36
|
isSyncDefinition2
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-mbc5hvnj.js";
|
|
38
38
|
import {
|
|
39
39
|
compileShareAccessPlan
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-gkv8r794.js";
|
|
41
41
|
import {
|
|
42
42
|
isConnectorDefinition
|
|
43
43
|
} from "./chunk-9x8dybsb.js";
|
|
@@ -58,11 +58,13 @@ var MODEL_KINDS = [
|
|
|
58
58
|
"decision",
|
|
59
59
|
"transcription",
|
|
60
60
|
"speech",
|
|
61
|
-
"reranking"
|
|
61
|
+
"reranking",
|
|
62
|
+
"web-search"
|
|
62
63
|
];
|
|
63
64
|
var TOKENLESS_MODEL_KINDS2 = [
|
|
64
65
|
"transcription",
|
|
65
66
|
"reranking",
|
|
67
|
+
"web-search",
|
|
66
68
|
"image",
|
|
67
69
|
"speech"
|
|
68
70
|
];
|
|
@@ -233,4 +235,4 @@ function assertRecord(value, field) {
|
|
|
233
235
|
|
|
234
236
|
export { MODEL_REASONING_EFFORTS2, MODEL_REASONING_LEVELS2, modelCacheLifetimeMs2, isModelReasoning2, modelReasoningSupportIssue2, MODEL_KINDS, TOKENLESS_MODEL_KINDS2, defineLanguageModelLabel2, defineLanguageModel2 };
|
|
235
237
|
|
|
236
|
-
//# debugId=
|
|
238
|
+
//# debugId=9A04D72023BBCD7064756E2164756E21
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/models/language-model.ts", "../src/models/definitions.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { JsonObject, ReadonlyJsonObject } from \"../json\"\nimport type { LanguageModelDefinitionCatalog, ModelDefinitionCatalog } from \"./catalog\"\nimport type { LanguageModelDefinition } from \"./definitions\"\nimport type { LanguageModelStreamEvent } from \"./events\"\nimport type { ModelMessage } from \"./messages\"\nimport type { ModelCostEstimator } from \"./pricing\"\nimport type { ModelRateCard } from \"./rate-card\"\nimport type { WebSearchModel } from \"./web-search-model\"\n\nexport const MODEL_REASONING_EFFORTS = [\"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const\n\nexport type ModelReasoningEffort = (typeof MODEL_REASONING_EFFORTS)[number]\n\nexport const MODEL_REASONING_LEVELS = [\n \"provider-default\",\n \"none\",\n ...MODEL_REASONING_EFFORTS,\n] as const\n\nexport type ModelReasoningLevel = (typeof MODEL_REASONING_LEVELS)[number]\n\n/** Exact provider-native reasoning budget, expressed in tokens. */\nexport interface ModelReasoningBudget extends ReadonlyJsonObject {\n readonly budgetTokens: number\n}\n\n/** Provider-neutral reasoning preference accepted by every language-model runtime. */\nexport type ModelReasoning = ModelReasoningLevel | ModelReasoningBudget\n\nexport interface ModelReasoningBudgetCapabilities {\n readonly min?: number\n readonly max?: number\n}\n\n/** Controls exposed by one concrete model offering through one provider. */\nexport interface ModelReasoningCapabilities {\n readonly canDisable?: boolean\n readonly efforts?: readonly ModelReasoningEffort[]\n readonly budgetTokens?: ModelReasoningBudgetCapabilities\n}\n\nexport interface ModelCapabilities {\n readonly inputMediaTypes?: readonly string[] | \"any\"\n /** `undefined` is unknown, `false` is unsupported, and an object describes supported controls. */\n readonly reasoning?: false | ModelReasoningCapabilities\n readonly localTools?: boolean\n readonly parallelToolCalls?: boolean\n /** `undefined` is unknown, not an assertion that schema-constrained output is unsupported. */\n readonly nativeStructuredOutput?: boolean\n readonly providerExecutedTools?: boolean\n}\n\nexport interface ModelToolSpecification {\n readonly name: string\n readonly description: string\n readonly inputSchema: JsonObject\n}\n\nexport interface ModelResponseFormat {\n readonly type: \"json\"\n readonly name: string\n readonly description?: string\n readonly schema: JsonObject\n}\n\nexport interface LanguageModelRequest {\n readonly callId: string\n readonly messages: readonly ModelMessage[]\n readonly tools: readonly ModelToolSpecification[]\n readonly reasoning?: ModelReasoning\n /** Per-call output ceiling; providers must not exceed a stricter configured model limit. */\n readonly maxOutputTokens?: number\n /**\n * How the provider caches the request's prompt, never over explicit provider configuration.\n * Absent, it caches what it expects to be read again.\n */\n readonly caching?: ModelCaching\n readonly responseFormat?: ModelResponseFormat\n readonly signal: AbortSignal\n}\n\n/**\n * `\"off\"` caches nothing and `\"auto\"` caches the request even when it is read once. An intent\n * caches what an absent choice would, and says how the prompt is read again: each provider\n * translates it, or ignores what it has no equivalent for.\n */\nexport type ModelCaching = \"auto\" | \"off\" | ModelCachingIntent\n\nexport interface ModelCachingIntent {\n /**\n * `\"long\"`: the prompt is read again after a human pause, as by a conversation's next turn, so\n * its cache should outlive the provider's default lifetime. `\"default\"` keeps that lifetime.\n */\n readonly lifetime?: \"default\" | \"long\"\n /**\n * An opaque id the requests that share a prompt prefix share, such as one conversation's, for a\n * provider that routes them to where that prefix is cached. Never personal data.\n */\n readonly key?: string\n}\n\n/**\n * How long a prompt stays cached after the last call that read it, by its intent's lifetime: the\n * hour providers keep a `\"long\"` one for, else the five minutes Anthropic keeps by default, the\n * shortest of theirs.\n */\nexport function modelCacheLifetimeMs(lifetime: ModelCachingIntent[\"lifetime\"]): number {\n return lifetime === \"long\" ? 60 * 60_000 : 5 * 60_000\n}\n\nexport interface LanguageModelStream {\n readonly events: AsyncIterable<LanguageModelStreamEvent>\n}\n\nexport interface LanguageModel {\n readonly providerId: string\n readonly modelId: string\n readonly definition: LanguageModelDefinition\n readonly costEstimator?: ModelCostEstimator\n /**\n * The prices this binding bills by, for people and agents choosing a model. Pricing itself\n * goes through costEstimator; absent when the price is unknown.\n */\n readonly rateCard?: ModelRateCard\n /**\n * Reasoning Sixb applies whenever this model runs without an explicit choice: chat turns, AI\n * workflow steps, subagents, and direct generation. Providers set it from their model options;\n * Sixb checks it against `definition.capabilities` at startup.\n */\n readonly defaultReasoning?: ModelReasoningLevel\n /**\n * Output limit the binding sets for every call, agent calls included. Unlike\n * `definition.maxOutputTokens`, the most the model itself can produce, this is the developer's\n * choice. Providers set it from their model options; Sixb checks it against that maximum at\n * startup.\n */\n readonly maxOutputTokens?: number\n /**\n * The web search its provider offers, under the same credentials. Sixb searches with it when\n * `models.webSearch` names none.\n */\n readonly webSearch?: WebSearchModel\n /**\n * The names of the tools its provider runs itself, which every request declares, such as\n * `web_search` from `providerTools`. Sixb checks at startup that none takes a name it gives the\n * Agent's own tools.\n */\n readonly providerToolNames?: readonly string[]\n /**\n * Return an executable model pinned to operational metadata, preserving model identity.\n * `offline` requires a local snapshot without catalog I/O. Workers retain this model\n * for generation and compaction; later catalog refreshes must not change its capabilities/limits.\n * Throw ModelCatalogUnavailableError for catalog transport/access failures to allow workers to\n * retry with an offline snapshot. Invalid definitions and other resolver errors remain fatal.\n */\n resolve?(options?: { readonly offline?: boolean }): Promise<LanguageModel>\n /** Validate known output constraints without inference. Success does not certify endpoint support. */\n validateResponseFormat?(format: ModelResponseFormat): void | Promise<void>\n stream(request: LanguageModelRequest): Promise<LanguageModelStream>\n}\n\n/** The common callable provider shape. Provider packages may accept additional model options. */\nexport interface ModelProvider<TCatalog extends ModelDefinitionCatalog = ModelDefinitionCatalog> {\n readonly providerId: string\n readonly catalog: TCatalog\n}\n\nexport interface LanguageModelProvider extends ModelProvider<LanguageModelDefinitionCatalog> {\n (modelId: string): LanguageModel\n}\n\nexport function isModelReasoning(value: unknown): value is ModelReasoning {\n if (typeof value === \"string\") {\n return (MODEL_REASONING_LEVELS as readonly string[]).includes(value)\n }\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return false\n if (Object.keys(value).length !== 1) return false\n const budgetTokens = (value as { readonly budgetTokens?: unknown }).budgetTokens\n return typeof budgetTokens === \"number\" && Number.isSafeInteger(budgetTokens) && budgetTokens >= 0\n}\n\n/** Explain why a request cannot be represented by known model capabilities. Unknown is allowed. */\nexport function modelReasoningSupportIssue(\n capabilities: ModelCapabilities[\"reasoning\"],\n reasoning: unknown\n): string | undefined {\n if (reasoning === undefined) return undefined\n if (!isModelReasoning(reasoning)) return \"the reasoning preference is invalid\"\n if (reasoning === \"provider-default\") return undefined\n if (capabilities === undefined) return undefined\n if (capabilities === false) return \"reasoning is not supported\"\n if (reasoning === \"none\") {\n return capabilities.canDisable === true ? undefined : \"reasoning cannot be disabled\"\n }\n if (typeof reasoning === \"string\") {\n return capabilities.efforts?.includes(reasoning) === true\n ? undefined\n : `reasoning effort '${reasoning}' is not supported`\n }\n const budget = capabilities.budgetTokens\n if (budget === undefined) return \"reasoning token budgets are not supported\"\n if (budget.min !== undefined && reasoning.budgetTokens < budget.min) {\n return `reasoning token budget must be at least ${budget.min}`\n }\n if (budget.max !== undefined && reasoning.budgetTokens > budget.max) {\n return `reasoning token budget must not exceed ${budget.max}`\n }\n return undefined\n}\n",
|
|
6
|
+
"import {\n MODEL_REASONING_EFFORTS,\n type ModelCapabilities,\n type ModelReasoningBudgetCapabilities,\n type ModelReasoningCapabilities,\n} from \"./language-model\"\n\n/** @internal Every model kind, for validating stored values. */\nexport const MODEL_KINDS = [\n \"language\",\n \"image\",\n \"video\",\n \"embedding\",\n \"decision\",\n \"transcription\",\n \"speech\",\n \"reranking\",\n \"web-search\",\n] as const\n\nexport type ModelKind = (typeof MODEL_KINDS)[number]\n\n/**\n * @internal Kinds billed per audio second, search, image or character, whose providers mostly\n * report no tokens. Token limits skip them, and a missing token count from one is not a gap.\n */\nexport const TOKENLESS_MODEL_KINDS: readonly ModelKind[] = [\n \"transcription\",\n \"reranking\",\n \"web-search\",\n \"image\",\n \"speech\",\n]\n\n/** Common catalog identity shared by every present and future model runtime. */\nexport interface ModelDefinition {\n readonly kind: ModelKind\n readonly providerId: string\n readonly modelId: string\n readonly name?: string\n readonly description?: string\n /** Model author for display; does not change the provider/model routing identity. */\n readonly publisher?: { readonly id: string; readonly name: string }\n /** Hosting service label, when the model is offered through an intermediary. */\n readonly via?: string\n readonly family?: string\n readonly tags?: readonly string[]\n readonly releaseDate?: string\n}\n\n/** Serializable facts about one concrete model offering from one provider. */\nexport interface LanguageModelDefinition extends ModelDefinition {\n readonly kind: \"language\"\n readonly knowledgeCutoff?: string\n readonly contextWindow?: number\n /** Maximum input tokens, distinct from a shared input/output context window. */\n readonly maxInputTokens?: number\n readonly maxOutputTokens?: number\n readonly capabilities: ModelCapabilities\n}\n\n/** The name and description a project gives a language model, in place of the provider's. */\nexport interface LanguageModelLabel {\n /** Shown in the chat's model picker and to the Agent. */\n readonly name?: string\n /** When the model is useful, for the people choosing it and for the Agent delegating to it. */\n readonly description?: string\n}\n\n/**\n * The label a model binding sets, checked and reported with the provider's error prefix. A provider\n * spreads it over every definition it builds for the binding, its resolved ones included.\n *\n * Stricter than `defineLanguageModel`, which takes a provider's catalog text as it comes: the\n * project types a label by hand, so an empty or padded value is a mistake to report.\n */\nexport function defineLanguageModelLabel(\n label: LanguageModelLabel,\n prefix: string\n): LanguageModelLabel {\n for (const field of [\"name\", \"description\"] as const) {\n const value: unknown = label[field]\n\n if (value !== undefined && (typeof value !== \"string\" || !value || value !== value.trim())) {\n throw new TypeError(`${prefix} ${field} must be a nonempty trimmed string.`)\n }\n }\n\n return {\n ...(label.name === undefined ? {} : { name: label.name }),\n ...(label.description === undefined ? {} : { description: label.description }),\n }\n}\n\nexport function defineLanguageModel(definition: LanguageModelDefinition): LanguageModelDefinition {\n if (definition.kind !== \"language\") {\n throw new TypeError(\"[Sixb] Language model definitions must use kind 'language'.\")\n }\n assertModelId(definition.providerId, \"providerId\")\n assertModelId(definition.modelId, \"modelId\")\n assertOptionalString(definition.name, \"name\")\n assertOptionalString(definition.description, \"description\")\n assertOptionalString(definition.via, \"via\")\n if (definition.via !== undefined && !definition.via.trim())\n throw new TypeError(\"[Sixb] Model via must not be empty.\")\n const publisher = definition.publisher\n if (publisher !== undefined) {\n assertRecord(publisher, \"publisher\")\n for (const [field, value] of Object.entries({ id: publisher.id, name: publisher.name })) {\n if (typeof value !== \"string\" || !value.trim() || value !== value.trim())\n throw new TypeError(`[Sixb] Model publisher.${field} must be a nonempty trimmed string.`)\n }\n }\n assertOptionalString(definition.family, \"family\")\n assertOptionalString(definition.releaseDate, \"releaseDate\")\n assertOptionalString(definition.knowledgeCutoff, \"knowledgeCutoff\")\n const tags = freezeStrings(definition.tags, \"tags\")\n const capabilities = defineModelCapabilities(definition.capabilities)\n assertOptionalPositiveInteger(definition.contextWindow, \"contextWindow\")\n assertOptionalPositiveInteger(definition.maxInputTokens, \"maxInputTokens\")\n assertOptionalPositiveInteger(definition.maxOutputTokens, \"maxOutputTokens\")\n return Object.freeze({\n kind: \"language\",\n providerId: definition.providerId,\n modelId: definition.modelId,\n ...(definition.name === undefined ? {} : { name: definition.name }),\n ...(definition.description === undefined ? {} : { description: definition.description }),\n ...(publisher === undefined\n ? {}\n : { publisher: Object.freeze({ id: publisher.id, name: publisher.name }) }),\n ...(definition.via === undefined ? {} : { via: definition.via }),\n ...(definition.family === undefined ? {} : { family: definition.family }),\n ...(tags === undefined ? {} : { tags }),\n ...(definition.releaseDate === undefined ? {} : { releaseDate: definition.releaseDate }),\n ...(definition.knowledgeCutoff === undefined\n ? {}\n : { knowledgeCutoff: definition.knowledgeCutoff }),\n ...(definition.contextWindow === undefined ? {} : { contextWindow: definition.contextWindow }),\n ...(definition.maxInputTokens === undefined\n ? {}\n : { maxInputTokens: definition.maxInputTokens }),\n ...(definition.maxOutputTokens === undefined\n ? {}\n : { maxOutputTokens: definition.maxOutputTokens }),\n capabilities,\n })\n}\n\nfunction defineModelCapabilities(capabilities: unknown): ModelCapabilities {\n assertRecord(capabilities, \"capabilities\")\n const inputMediaTypes =\n capabilities.inputMediaTypes === \"any\"\n ? \"any\"\n : freezeStrings(capabilities.inputMediaTypes, \"capabilities.inputMediaTypes\")\n for (const [field, value] of Object.entries(capabilities)) {\n if (field === \"inputMediaTypes\" || field === \"reasoning\") continue\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new TypeError(`[Sixb] Model capability '${field}' must be boolean.`)\n }\n }\n const reasoning = freezeReasoningCapabilities(capabilities.reasoning)\n const flags: {\n localTools?: boolean\n parallelToolCalls?: boolean\n nativeStructuredOutput?: boolean\n providerExecutedTools?: boolean\n } = {}\n for (const key of [\n \"localTools\",\n \"parallelToolCalls\",\n \"nativeStructuredOutput\",\n \"providerExecutedTools\",\n ] as const) {\n const value = capabilities[key]\n if (typeof value === \"boolean\") flags[key] = value\n }\n return Object.freeze({\n ...(inputMediaTypes === undefined ? {} : { inputMediaTypes }),\n ...(reasoning === undefined ? {} : { reasoning }),\n ...flags,\n })\n}\n\nfunction freezeReasoningCapabilities(reasoning: unknown): ModelCapabilities[\"reasoning\"] {\n if (reasoning === undefined || reasoning === false) return reasoning\n assertRecord(reasoning, \"reasoning\")\n if (reasoning.canDisable !== undefined && typeof reasoning.canDisable !== \"boolean\") {\n throw new TypeError(\"[Sixb] Model reasoning capability 'canDisable' must be boolean.\")\n }\n const efforts = freezeReasoningEfforts(reasoning.efforts)\n const budgetTokens = freezeReasoningBudgetCapabilities(reasoning.budgetTokens)\n return Object.freeze({\n ...(reasoning.canDisable === undefined ? {} : { canDisable: reasoning.canDisable }),\n ...(efforts === undefined ? {} : { efforts }),\n ...(budgetTokens === undefined ? {} : { budgetTokens }),\n } satisfies ModelReasoningCapabilities)\n}\n\nfunction freezeReasoningEfforts(\n efforts: unknown\n): readonly (typeof MODEL_REASONING_EFFORTS)[number][] | undefined {\n if (efforts === undefined) return undefined\n if (!Array.isArray(efforts)) {\n throw new TypeError(\"[Sixb] Model reasoning capability 'efforts' must be an array.\")\n }\n const seen = new Set<string>()\n return Object.freeze(\n efforts.map((value: unknown) => {\n const effort = MODEL_REASONING_EFFORTS.find((allowed) => allowed === value)\n if (effort === undefined) {\n throw new TypeError(`[Sixb] Model reasoning effort '${String(value)}' is invalid.`)\n }\n if (seen.has(effort)) {\n throw new TypeError(`[Sixb] Model reasoning effort '${effort}' is duplicated.`)\n }\n seen.add(effort)\n return effort\n })\n )\n}\n\nfunction freezeReasoningBudgetCapabilities(\n budget: unknown\n): ModelReasoningBudgetCapabilities | undefined {\n if (budget === undefined) return undefined\n assertRecord(budget, \"reasoning budgetTokens\")\n assertOptionalNonnegativeInteger(budget.min, \"capabilities.reasoning.budgetTokens.min\")\n assertOptionalNonnegativeInteger(budget.max, \"capabilities.reasoning.budgetTokens.max\")\n if (budget.min !== undefined && budget.max !== undefined && budget.max < budget.min) {\n throw new TypeError(\n \"[Sixb] Model reasoning token budget maximum must not be below its minimum.\"\n )\n }\n return Object.freeze({\n ...(budget.min === undefined ? {} : { min: budget.min }),\n ...(budget.max === undefined ? {} : { max: budget.max }),\n })\n}\n\nfunction assertModelId(value: string, field: string): void {\n if (!value.trim()) throw new TypeError(`[Sixb] Model ${field} must not be empty.`)\n}\n\nfunction assertOptionalPositiveInteger(value: number | undefined, field: string): void {\n if (value !== undefined && (!Number.isSafeInteger(value) || value <= 0)) {\n throw new TypeError(`[Sixb] Model ${field} must be a positive safe integer.`)\n }\n}\n\nfunction assertOptionalNonnegativeInteger(\n value: unknown,\n field: string\n): asserts value is number | undefined {\n if (\n value !== undefined &&\n (typeof value !== \"number\" || !Number.isSafeInteger(value) || value < 0)\n ) {\n throw new TypeError(`[Sixb] Model ${field} must be a nonnegative safe integer.`)\n }\n}\n\nfunction assertOptionalString(value: string | undefined, field: string): void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new TypeError(`[Sixb] Model ${field} must be a string.`)\n }\n}\n\nfunction freezeStrings(value: unknown, field: string): readonly string[] | undefined {\n if (value === undefined) return undefined\n if (!Array.isArray(value) || value.some((entry) => typeof entry !== \"string\" || !entry.trim())) {\n throw new TypeError(`[Sixb] Model ${field} must contain nonempty strings.`)\n }\n return Object.freeze([...value])\n}\n\nfunction assertRecord(value: unknown, field: string): asserts value is Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value))\n throw new TypeError(`[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AI,UAAU,gBAAgB,sCAAsC;AAAA,EAC5E;AAAA,EACA,OAAO,OAAO,OAAO,CAAC,GAAG,KAAK,CAAC;AAAA;AAGjC,SAAS,YAAY,CAAC,OAAgB,OAAyD;AAAA,EAC7F,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK;AAAA,IACpE,MAAM,IAAI,UAAU,gBAAgB,0BAA0B;AAAA;",
|
|
9
|
+
"debugId": "9A04D72023BBCD7064756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
resolveExecutionScopeAuthorization,
|
|
8
8
|
assertAuthorized2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-twfreyxr.js";
|
|
10
10
|
import {
|
|
11
11
|
reportRunFailure2
|
|
12
12
|
} from "./chunk-w976a4me.js";
|
|
13
13
|
import {
|
|
14
14
|
PIPELINE_RUN_FAILURE_CODES2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-eqgr6nsa.js";
|
|
16
16
|
import {
|
|
17
17
|
PipelineRunError2
|
|
18
18
|
} from "./chunk-mmagke4x.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
executionRecordInputFromRuntime,
|
|
24
24
|
ensureExecutionRecord2,
|
|
25
25
|
createPrimitiveExecutionRecord
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-9whfmsfk.js";
|
|
27
27
|
|
|
28
28
|
// src/pipelines/run-dispatch.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -46,6 +46,7 @@ class PipelineRunDispatcher2 {
|
|
|
46
46
|
runId: input.runId,
|
|
47
47
|
metadata: input.metadata,
|
|
48
48
|
validateExistingRun: (run, storage) => assertAutomaticExecutionIdentity(storage, this.dependencies.id, input, run),
|
|
49
|
+
joinQueuedRun: true,
|
|
49
50
|
createExecution: async (executionId, runId) => createPrimitiveExecutionRecord({
|
|
50
51
|
id: executionId,
|
|
51
52
|
primitive: { kind: "pipeline", id: pipeline.id, runId },
|
|
@@ -85,6 +86,18 @@ async function persistPipelineRun(input, runId) {
|
|
|
85
86
|
await input.validateExistingRun?.(raced, tx);
|
|
86
87
|
return { publish: false, run: raced };
|
|
87
88
|
}
|
|
89
|
+
if (input.joinQueuedRun) {
|
|
90
|
+
const waiting = await findQueuedPipelineRun(transactionalRuns, input);
|
|
91
|
+
if (waiting) {
|
|
92
|
+
return {
|
|
93
|
+
publish: true,
|
|
94
|
+
run: waiting,
|
|
95
|
+
queuedAt: waiting.queuedAt,
|
|
96
|
+
created: false,
|
|
97
|
+
jobId: joinJobId(waiting, runId)
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
88
101
|
await tx.executions.create(execution);
|
|
89
102
|
const run = await transactionalRuns.queue({
|
|
90
103
|
projectId: input.projectId,
|
|
@@ -93,7 +106,7 @@ async function persistPipelineRun(input, runId) {
|
|
|
93
106
|
pipelineId: input.pipeline.id,
|
|
94
107
|
queuedAt
|
|
95
108
|
});
|
|
96
|
-
return { publish: true, run,
|
|
109
|
+
return { publish: true, run, queuedAt, created: true };
|
|
97
110
|
}, { isolation: "serializable" });
|
|
98
111
|
} catch (error) {
|
|
99
112
|
if (!(error instanceof PipelineRunError2))
|
|
@@ -106,6 +119,19 @@ async function persistPipelineRun(input, runId) {
|
|
|
106
119
|
return { publish: false, run: raced };
|
|
107
120
|
}
|
|
108
121
|
}
|
|
122
|
+
async function findQueuedPipelineRun(pipelineRuns, input) {
|
|
123
|
+
const { runs } = await pipelineRuns.list({
|
|
124
|
+
projectId: input.projectId,
|
|
125
|
+
pipelineId: input.pipeline.id,
|
|
126
|
+
statuses: ["queued"],
|
|
127
|
+
order: "asc",
|
|
128
|
+
limit: 1
|
|
129
|
+
});
|
|
130
|
+
return runs[0];
|
|
131
|
+
}
|
|
132
|
+
function joinJobId(waiting, triggerRunId) {
|
|
133
|
+
return `${waiting.id}:join:${triggerRunId}`;
|
|
134
|
+
}
|
|
109
135
|
async function reusePipelineRun(input, existing) {
|
|
110
136
|
assertExistingRunMatchesRequest(existing, input);
|
|
111
137
|
await input.validateExistingRun?.(existing, input.storage);
|
|
@@ -116,7 +142,7 @@ async function reusePipelineRun(input, existing) {
|
|
|
116
142
|
});
|
|
117
143
|
if (!execution)
|
|
118
144
|
throw new PipelineRunError2(`[Sixb] Execution '${existing.executionId}' was not found.`);
|
|
119
|
-
return { publish: true, run: existing,
|
|
145
|
+
return { publish: true, run: existing, queuedAt: existing.queuedAt, created: false };
|
|
120
146
|
}
|
|
121
147
|
if (existing.status !== "failed" || existing.error?.code !== "queue.enqueue_failed" || !existing.error.retryable) {
|
|
122
148
|
return { publish: false, run: existing };
|
|
@@ -136,22 +162,23 @@ async function reusePipelineRun(input, existing) {
|
|
|
136
162
|
pipelineId: existing.pipelineId,
|
|
137
163
|
queuedAt
|
|
138
164
|
});
|
|
139
|
-
return { publish: true, run,
|
|
165
|
+
return { publish: true, run, queuedAt, created: false };
|
|
140
166
|
}
|
|
141
167
|
async function publishPipelineRun(input, persisted) {
|
|
168
|
+
const jobId = persisted.jobId ?? persisted.run.id;
|
|
142
169
|
try {
|
|
143
170
|
const [job] = await input.queue.enqueue({
|
|
144
171
|
projectId: input.projectId,
|
|
145
172
|
jobs: [
|
|
146
173
|
{
|
|
147
|
-
id:
|
|
174
|
+
id: jobId,
|
|
148
175
|
type: "pipeline.run.requested",
|
|
149
176
|
payload: { runId: persisted.run.id },
|
|
150
177
|
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
151
178
|
}
|
|
152
179
|
]
|
|
153
180
|
});
|
|
154
|
-
if (!job || job.id !==
|
|
181
|
+
if (!job || job.id !== jobId) {
|
|
155
182
|
throw new PipelineRunError2(`[Sixb] Queue did not acknowledge Pipeline run '${persisted.run.id}'.`);
|
|
156
183
|
}
|
|
157
184
|
return {
|
|
@@ -269,4 +296,4 @@ async function requestPipelineRun2(runtime, execution, pipeline, options = {}) {
|
|
|
269
296
|
|
|
270
297
|
export { PipelineRunDispatcher2, requestPipelineRun2 };
|
|
271
298
|
|
|
272
|
-
//# debugId=
|
|
299
|
+
//# debugId=846D768D7A6424AA64756E2164756E21
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/pipelines/run-dispatch.ts", "../src/pipelines/request.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { randomUUID } from \"node:crypto\"\nimport { reportRunFailure } from \"../error-reporting/capability\"\nimport { createSixbError, toSixbFailure } from \"../errors/internal\"\nimport type { SixbFailure } from \"../errors/types\"\nimport type { RunDispatcher } from \"../execution/dispatch\"\nimport { createPrimitiveExecutionRecord } from \"../execution/durable\"\nimport type { Queues } from \"../queues\"\nimport type { SixbDefinitions } from \"../runtime/definitions\"\nimport type {\n CreateExecutionInput,\n PipelineRunFailureCode,\n PipelineRunRecord,\n Storage,\n} from \"../storage\"\nimport { PIPELINE_RUN_FAILURE_CODES, PipelineRunError } from \"../storage\"\nimport { PipelineError } from \"./errors\"\nimport type { PipelineRunRequestOptions, PipelineRunRequestResult } from \"./request\"\nimport type { PipelineDefinition } from \"./types\"\n\nexport type AutomaticPipelineExecutionSource =\n | { readonly type: \"schedule\"; readonly eventId: string }\n | { readonly type: \"event\"; readonly eventId: string }\n\nexport interface AutomaticPipelineRunDispatchInput extends PipelineRunRequestOptions {\n readonly pipelineId: string\n readonly runId: string\n readonly source: AutomaticPipelineExecutionSource\n readonly correlationId: string\n readonly metadata?: Readonly<Record<string, string>>\n}\n\nexport type PipelineRunDispatchPort = RunDispatcher<\n AutomaticPipelineRunDispatchInput,\n PipelineRunRequestResult\n>\n\nexport interface PipelineRunDispatcherDependencies {\n readonly id: string\n readonly definitions: Pick<SixbDefinitions, \"pipelines\">\n readonly storage: Storage\n readonly queues: Pick<Queues, \"pipelines\">\n}\n\ninterface DispatchPipelineRunInput extends PipelineRunRequestOptions {\n readonly errorReporterHost: object\n readonly projectId: string\n readonly pipeline: PipelineDefinition\n readonly storage: Storage\n readonly queue: Queues[\"pipelines\"]\n readonly metadata?: Readonly<Record<string, string>>\n readonly createExecution: (executionId: string, runId: string) => Promise<CreateExecutionInput>\n readonly validateExistingRun?: (run: PipelineRunRecord, storage: Storage) => Promise<void>\n /** Return a run of this Pipeline that has not started yet instead of queueing another one. */\n readonly joinQueuedRun?: boolean\n}\n\ntype PersistedPipelineRun =\n | { readonly publish: false; readonly run: PipelineRunRecord }\n | {\n readonly publish: true\n readonly run: PipelineRunRecord\n readonly queuedAt: Date\n readonly created: boolean\n /** Defaults to the run id. A trigger that joins a run publishes its own job for it. */\n readonly jobId?: string\n }\n\n/** Core-owned durable dispatch boundary used by automatic Pipeline triggers. */\nexport class PipelineRunDispatcher implements PipelineRunDispatchPort {\n constructor(private readonly dependencies: PipelineRunDispatcherDependencies) {}\n\n async dispatch(input: AutomaticPipelineRunDispatchInput): Promise<PipelineRunRequestResult> {\n assertAutomaticDispatchInput(input)\n const pipeline = this.dependencies.definitions.pipelines.getById(input.pipelineId)\n if (!pipeline) throw new PipelineError(`[Sixb] Unknown pipeline '${input.pipelineId}'`)\n\n return dispatchPipelineRun({\n errorReporterHost: this.dependencies,\n projectId: this.dependencies.id,\n pipeline,\n storage: this.dependencies.storage,\n queue: this.dependencies.queues.pipelines,\n runId: input.runId,\n metadata: input.metadata,\n validateExistingRun: (run, storage) =>\n assertAutomaticExecutionIdentity(storage, this.dependencies.id, input, run),\n joinQueuedRun: true,\n createExecution: async (executionId, runId) =>\n createPrimitiveExecutionRecord({\n id: executionId,\n primitive: { kind: \"pipeline\", id: pipeline.id, runId },\n origin: {\n type: \"automatic\",\n projectId: this.dependencies.id,\n source: input.source,\n correlationId: input.correlationId,\n },\n }),\n })\n }\n}\n\n/** Persist a Pipeline execution and queued run before publishing its queue job. */\nexport async function dispatchPipelineRun(\n input: DispatchPipelineRunInput\n): Promise<PipelineRunRequestResult> {\n const runId = createPipelineRunId(input.runId)\n let persisted = await persistPipelineRun(input, runId)\n if (!persisted.publish && input.validateExistingRun && persisted.run.status === \"queued\") {\n persisted = await reusePipelineRun(input, persisted.run)\n }\n if (!persisted.publish) return existingPipelineRunResult(persisted.run)\n return publishPipelineRun(input, persisted)\n}\n\nasync function persistPipelineRun(\n input: DispatchPipelineRunInput,\n runId: string\n): Promise<PersistedPipelineRun> {\n const pipelineRuns = requirePipelineRunStorage(input.storage)\n const existing = await pipelineRuns.getById({ projectId: input.projectId, id: runId })\n if (existing) return reusePipelineRun(input, existing)\n\n const execution = await input.createExecution(`exec_${randomUUID()}`, runId)\n const queuedAt = new Date()\n try {\n return await input.storage.transaction(\n async (tx): Promise<PersistedPipelineRun> => {\n const transactionalRuns = requirePipelineRunStorage(tx)\n const raced = await transactionalRuns.getById({ projectId: input.projectId, id: runId })\n if (raced) {\n assertExistingRunMatchesRequest(raced, input)\n await input.validateExistingRun?.(raced, tx)\n return { publish: false, run: raced }\n }\n\n if (input.joinQueuedRun) {\n const waiting = await findQueuedPipelineRun(transactionalRuns, input)\n if (waiting) {\n return {\n publish: true,\n run: waiting,\n queuedAt: waiting.queuedAt,\n created: false,\n jobId: joinJobId(waiting, runId),\n }\n }\n }\n\n await tx.executions.create(execution)\n const run = await transactionalRuns.queue({\n projectId: input.projectId,\n id: runId,\n executionId: execution.id,\n pipelineId: input.pipeline.id,\n queuedAt,\n })\n return { publish: true, run, queuedAt, created: true }\n },\n { isolation: \"serializable\" }\n )\n } catch (error) {\n if (!(error instanceof PipelineRunError)) throw error\n const raced = await pipelineRuns.getById({ projectId: input.projectId, id: runId })\n if (!raced) throw error\n assertExistingRunMatchesRequest(raced, input)\n await input.validateExistingRun?.(raced, input.storage)\n return { publish: false, run: raced }\n }\n}\n\n/**\n * A run that has not started reads each input's latest version when its steps start, so it already\n * covers a trigger that arrives now. The oldest one starts first.\n */\nasync function findQueuedPipelineRun(\n pipelineRuns: NonNullable<Storage[\"pipelineRuns\"]>,\n input: Pick<DispatchPipelineRunInput, \"projectId\" | \"pipeline\">\n): Promise<PipelineRunRecord | undefined> {\n const { runs } = await pipelineRuns.list({\n projectId: input.projectId,\n pipelineId: input.pipeline.id,\n statuses: [\"queued\"],\n order: \"asc\",\n limit: 1,\n })\n return runs[0]\n}\n\n/**\n * The job a trigger publishes for the run it joins. The run's own job may be gone (a provider\n * keeps a settled job id, and ignores a new job under it), so each joining trigger brings a job\n * that can start the run; once it has started, the others complete without doing anything. The id\n * derives from the trigger's run id, so a redelivered trigger publishes the same job.\n */\nfunction joinJobId(waiting: PipelineRunRecord, triggerRunId: string): string {\n return `${waiting.id}:join:${triggerRunId}`\n}\n\nasync function reusePipelineRun(\n input: DispatchPipelineRunInput,\n existing: PipelineRunRecord\n): Promise<PersistedPipelineRun> {\n assertExistingRunMatchesRequest(existing, input)\n await input.validateExistingRun?.(existing, input.storage)\n if (input.validateExistingRun && existing.status === \"queued\") {\n const execution = await input.storage.executions.getById({\n projectId: input.projectId,\n id: existing.executionId,\n })\n if (!execution)\n throw new PipelineRunError(`[Sixb] Execution '${existing.executionId}' was not found.`)\n return { publish: true, run: existing, queuedAt: existing.queuedAt, created: false }\n }\n if (\n existing.status !== \"failed\" ||\n existing.error?.code !== \"queue.enqueue_failed\" ||\n !existing.error.retryable\n ) {\n return { publish: false, run: existing }\n }\n\n const execution = await input.storage.executions.getById({\n projectId: input.projectId,\n id: existing.executionId,\n })\n if (!execution) {\n throw new PipelineRunError(\n `[Sixb] Execution '${existing.executionId}' for Pipeline run '${existing.id}' was not found.`\n )\n }\n\n const queuedAt = new Date()\n const run = await requirePipelineRunStorage(input.storage).queue({\n projectId: input.projectId,\n id: existing.id,\n executionId: existing.executionId,\n pipelineId: existing.pipelineId,\n queuedAt,\n })\n return { publish: true, run, queuedAt, created: false }\n}\n\nasync function publishPipelineRun(\n input: DispatchPipelineRunInput,\n persisted: Extract<PersistedPipelineRun, { readonly publish: true }>\n): Promise<PipelineRunRequestResult> {\n const jobId = persisted.jobId ?? persisted.run.id\n\n try {\n const [job] = await input.queue.enqueue({\n projectId: input.projectId,\n jobs: [\n {\n id: jobId,\n type: \"pipeline.run.requested\",\n payload: { runId: persisted.run.id },\n ...(input.metadata === undefined ? {} : { metadata: input.metadata }),\n },\n ],\n })\n if (!job || job.id !== jobId) {\n throw new PipelineRunError(\n `[Sixb] Queue did not acknowledge Pipeline run '${persisted.run.id}'.`\n )\n }\n return {\n pipelineId: persisted.run.pipelineId,\n runId: persisted.run.id,\n queuedAt: persisted.queuedAt.toISOString(),\n ...(job?.id ? { jobId: job.id } : {}),\n created: persisted.created,\n }\n } catch (error) {\n // Automatic consumers retain the batch and retry. Keep uncertain delivery queued:\n // a lost reply does not prove that the queue rejected the job.\n if (input.validateExistingRun) throw error\n const failedAt = new Date()\n const failure = toEnqueueFailure(error, persisted.run, failedAt)\n const failed = await requirePipelineRunStorage(input.storage).finish({\n projectId: input.projectId,\n id: persisted.run.id,\n status: \"failed\",\n finishedAt: failedAt,\n error: failure,\n })\n reportRunFailure(input.errorReporterHost, error, {\n projectId: input.projectId,\n runKind: \"pipeline\",\n run: { runId: failed.id, pipelineId: failed.pipelineId },\n failure,\n })\n throw error\n }\n}\n\nfunction assertExistingRunMatchesRequest(\n existing: PipelineRunRecord,\n input: Pick<DispatchPipelineRunInput, \"pipeline\">\n): void {\n if (existing.pipelineId !== input.pipeline.id) {\n throw new PipelineRunError(\n `[Sixb] Pipeline run '${existing.id}' already exists with a different request payload.`\n )\n }\n}\n\nfunction existingPipelineRunResult(existing: PipelineRunRecord): PipelineRunRequestResult {\n return {\n pipelineId: existing.pipelineId,\n runId: existing.id,\n queuedAt: existing.queuedAt.toISOString(),\n created: false,\n }\n}\n\nfunction requirePipelineRunStorage(storage: Storage): NonNullable<Storage[\"pipelineRuns\"]> {\n if (!storage.pipelineRuns) {\n throw new PipelineError(\"[Sixb] Pipeline run storage is not configured.\")\n }\n return storage.pipelineRuns\n}\n\nfunction createPipelineRunId(runId: string | undefined): string {\n if (runId === undefined) return `run_${randomUUID()}`\n if (!runId.trim()) throw new PipelineError(\"[Sixb] Pipeline run id must not be empty\")\n return runId\n}\n\nfunction assertAutomaticDispatchInput(input: AutomaticPipelineRunDispatchInput): void {\n assertNonBlank(input.pipelineId, \"Pipeline id\")\n assertNonBlank(input.runId, \"Pipeline run id\")\n assertNonBlank(input.source.eventId, \"Pipeline source event id\")\n assertNonBlank(input.correlationId, \"Pipeline correlation id\")\n}\n\nasync function assertAutomaticExecutionIdentity(\n storage: Storage,\n projectId: string,\n input: AutomaticPipelineRunDispatchInput,\n run: PipelineRunRecord\n): Promise<void> {\n const execution = await storage.executions.getById({ projectId, id: run.executionId })\n if (\n !execution ||\n execution.source.type !== input.source.type ||\n execution.source.eventId !== input.source.eventId ||\n execution.correlationId !== input.correlationId ||\n execution.requestedBy !== undefined\n ) {\n throw new PipelineError(\n `[Sixb] Pipeline run '${run.id}' already exists with different automatic provenance.`\n )\n }\n}\n\nfunction toEnqueueFailure(\n error: unknown,\n run: PipelineRunRecord,\n at: Date\n): SixbFailure<PipelineRunFailureCode> {\n const enqueueError = createSixbError(\n \"queue.enqueue_failed\",\n `[Sixb] Could not enqueue Pipeline run '${run.id}'.`,\n {\n cause: error,\n details: { pipelineId: run.pipelineId, runId: run.id, phase: \"enqueue\" },\n }\n )\n return toSixbFailure(enqueueError, { allowedCodes: PIPELINE_RUN_FAILURE_CODES, at })\n}\n\nfunction assertNonBlank(value: string, label: string): void {\n if (!value.trim()) throw new PipelineError(`[Sixb] ${label} must not be empty.`)\n}\n",
|
|
6
|
+
"import { assertAuthorized } from \"../authorization\"\nimport { resolveExecutionScopeAuthorization } from \"../execution/authorization\"\nimport {\n createPrimitiveExecutionRecord,\n ensureExecutionRecord,\n executionRecordInputFromRuntime,\n} from \"../execution/durable\"\nimport type { ExecutionContext } from \"../execution/types\"\nimport type { SixbRuntimeContext } from \"../runtime/types\"\nimport { PipelineError } from \"./errors\"\nimport { dispatchPipelineRun } from \"./run-dispatch\"\nimport type { PipelineDefinition } from \"./types\"\n\nexport interface PipelineRunRequestOptions {\n /** Stable identity used to make dispatch idempotent. */\n readonly runId?: string\n}\n\nexport interface RequestPipelineRunInput extends PipelineRunRequestOptions {\n readonly pipelineId: string\n}\n\nexport interface PipelineRunRequestResult {\n readonly pipelineId: string\n readonly runId: string\n /** Durable time at which the run entered the queue. */\n readonly queuedAt: string\n readonly jobId?: string\n readonly created: boolean\n}\n\n/**\n * Authorize and queue a pipeline run request.\n *\n * Operates on an already-resolved definition and the shared runtime context, so the HTTP route and\n * the runtime verb cannot drift apart.\n *\n * The immutable child execution and queued run are persisted before queue publication.\n */\nexport async function requestPipelineRun(\n runtime: SixbRuntimeContext,\n execution: ExecutionContext,\n pipeline: PipelineDefinition,\n options: PipelineRunRequestOptions = {}\n): Promise<PipelineRunRequestResult> {\n resolveExecutionScopeAuthorization(runtime.projectId, {\n execution,\n authorization: runtime.runtimeAuthorization,\n })\n assertAuthorized(runtime, { kind: \"pipeline.run\", pipelineId: pipeline.id })\n if (!runtime.storage.pipelineRuns) {\n throw new PipelineError(\"[Sixb] Pipeline run storage is not configured.\")\n }\n\n const queue = runtime.queues.pipelines\n if (!queue) {\n throw new PipelineError(\"[Sixb] Pipeline run queue is not configured.\")\n }\n\n return dispatchPipelineRun({\n errorReporterHost: runtime,\n projectId: runtime.projectId,\n pipeline,\n storage: runtime.storage,\n queue,\n ...options,\n createExecution: async (executionId, runId) => {\n const caller = await ensureExecutionRecord(\n runtime.storage.executions,\n executionRecordInputFromRuntime({\n execution,\n runtimeAuthorization: runtime.runtimeAuthorization,\n })\n )\n return createPrimitiveExecutionRecord({\n id: executionId,\n primitive: { kind: \"pipeline\", id: pipeline.id, runId },\n origin: { type: \"execution\", parent: caller },\n })\n },\n })\n}\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAoEO,MAAM,uBAAyD;AAAA,EACvC;AAAA,E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YAAY,SAAS,GAAG,CAAC;AAAA,EAC3E,IAAI,CAAC,QAAQ,QAAQ,cAAc;AAAA,IACjC,MAAM,IAAI,eAAc,gDAAgD;AAAA,EAC1E;AAAA,EAEA,MAAM,QAAQ,QAAQ,OAAO;AAAA,EAC7B,IAAI,CAAC,OAAO;AAAA,IACV,MAAM,IAAI,eAAc,8CAA8C;AAAA,EACxE;AAAA,EAEA,OAAO,oBAAoB;AAAA,IACzB,mBAAmB;AAAA,IACnB,WAAW,QAAQ;AAAA,IACnB;AAAA,IACA,SAAS,QAAQ;AAAA,IACjB;AAAA,OACG;AAAA,IACH,iBAAiB,OAAO,aAAa,UAAU;AAAA,MAC7C,MAAM,SAAS,MAAM,uBACnB,QAAQ,QAAQ,YAChB,gCAAgC;AAAA,QAC9B;AAAA,QACA,sBAAsB,QAAQ;AAAA,MAChC,CAAC,CACH;AAAA,MACA,OAAO,+BAA+B;AAAA,QACpC,IAAI;AAAA,QACJ,WAAW,EAAE,MAAM,YAAY,IAAI,SAAS,IAAI,MAAM;AAAA,QACtD,QAAQ,EAAE,MAAM,aAAa,QAAQ,OAAO;AAAA,MAC9C,CAAC;AAAA;AAAA,EAEL,CAAC;AAAA;",
|
|
9
|
+
"debugId": "846D768D7A6424AA64756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-escedwyt.js";
|
|
10
10
|
import {
|
|
11
11
|
isActionDefinition2
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-s7j8ewqv.js";
|
|
13
13
|
import {
|
|
14
14
|
WorkflowDefinitionError2,
|
|
15
15
|
assertNonEmpty,
|
|
@@ -17,26 +17,26 @@ import {
|
|
|
17
17
|
isAgentStepDefinition2,
|
|
18
18
|
isInterventionDefinition2,
|
|
19
19
|
assertAgentStepSandbox
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-a5v4gjdx.js";
|
|
21
21
|
import {
|
|
22
22
|
isGroupDefinition
|
|
23
23
|
} from "./chunk-frsz8wxd.js";
|
|
24
24
|
import {
|
|
25
25
|
isModelReasoning2
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-az95tsh3.js";
|
|
27
27
|
import {
|
|
28
28
|
isLanguageModelTier2,
|
|
29
29
|
formatLanguageModelTiers2
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-qttqe1ah.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_REASONING_LEVELS2
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7z5rkf0m.js";
|
|
34
34
|
import {
|
|
35
35
|
isAgentToolDefinition2
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-dsv783c3.js";
|
|
37
37
|
import {
|
|
38
38
|
isScheduleDefinition2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-57g0215c.js";
|
|
40
40
|
import {
|
|
41
41
|
ModelProviderError2,
|
|
42
42
|
UnsupportedModelFeatureError2,
|