@skaile/workspaces 5.18.1 → 5.19.0
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/CHANGELOG.md +82 -0
- package/dist/{asset-feeds-MKB5JUML.js → asset-feeds-QGLI3AXI.js} +16 -16
- package/dist/{asset-feeds-MKB5JUML.js.map → asset-feeds-QGLI3AXI.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +5 -5
- package/dist/asset-manager/index.js +12 -12
- package/dist/asset-manager/installer.js +8 -8
- package/dist/asset-manager/renderers.js +7 -7
- package/dist/asset-manager/src/index.d.ts +91 -2
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/mcp-config.d.ts +29 -3
- package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +22 -20
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +11 -11
- package/dist/bridge/drivers/continue.js +10 -10
- package/dist/bridge/drivers/echo.js +2 -2
- package/dist/bridge/drivers/gemini.js +8 -8
- package/dist/bridge/drivers/goose.js +10 -10
- package/dist/bridge/drivers/omp.js +18 -460
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +10 -10
- package/dist/bridge/drivers/qwen.js +8 -8
- package/dist/bridge/index.js +15 -13
- package/dist/bridge/src/driver-model-check.d.ts +8 -4
- package/dist/bridge/src/driver-model-check.d.ts.map +1 -1
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp-models-yml.d.ts +11 -0
- package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
- package/dist/{chunk-V3D4HQMS.js → chunk-25ZVWL2R.js} +4 -4
- package/dist/{chunk-V3D4HQMS.js.map → chunk-25ZVWL2R.js.map} +1 -1
- package/dist/{chunk-7FHZB2QU.js → chunk-2GXSSZAM.js} +3 -3
- package/dist/{chunk-7FHZB2QU.js.map → chunk-2GXSSZAM.js.map} +1 -1
- package/dist/{chunk-VOBXINUZ.js → chunk-2LSDMJI2.js} +3 -3
- package/dist/{chunk-VOBXINUZ.js.map → chunk-2LSDMJI2.js.map} +1 -1
- package/dist/{chunk-CKBCX3HQ.js → chunk-2PBSAH3Z.js} +4 -4
- package/dist/{chunk-CKBCX3HQ.js.map → chunk-2PBSAH3Z.js.map} +1 -1
- package/dist/{chunk-CKNIYIV2.js → chunk-335ENCCS.js} +5 -5
- package/dist/chunk-335ENCCS.js.map +1 -0
- package/dist/{chunk-PBSN4RTV.js → chunk-7NT4F6SR.js} +151 -27
- package/dist/chunk-7NT4F6SR.js.map +1 -0
- package/dist/{chunk-YARXR3CN.js → chunk-7SCS64BG.js} +13 -7
- package/dist/chunk-7SCS64BG.js.map +1 -0
- package/dist/{chunk-U2FI547Z.js → chunk-7XSAW5OC.js} +3 -3
- package/dist/{chunk-U2FI547Z.js.map → chunk-7XSAW5OC.js.map} +1 -1
- package/dist/{chunk-KSBDLCZI.js → chunk-A6SMCEEE.js} +2 -2
- package/dist/{chunk-KSBDLCZI.js.map → chunk-A6SMCEEE.js.map} +1 -1
- package/dist/{chunk-SRNCN4X2.js → chunk-C7WBGSBV.js} +4 -4
- package/dist/{chunk-SRNCN4X2.js.map → chunk-C7WBGSBV.js.map} +1 -1
- package/dist/chunk-COJIL7G4.js +505 -0
- package/dist/chunk-COJIL7G4.js.map +1 -0
- package/dist/{chunk-KY4UXX7M.js → chunk-CQJH4G2K.js} +2 -2
- package/dist/{chunk-KY4UXX7M.js.map → chunk-CQJH4G2K.js.map} +1 -1
- package/dist/{chunk-WJLYL6RY.js → chunk-F6AA42GW.js} +5 -5
- package/dist/{chunk-WJLYL6RY.js.map → chunk-F6AA42GW.js.map} +1 -1
- package/dist/{chunk-IW6F6R2W.js → chunk-FPHNJE4M.js} +102 -32
- package/dist/chunk-FPHNJE4M.js.map +1 -0
- package/dist/{chunk-ZBMC6IAE.js → chunk-HT35SQZD.js} +15 -14
- package/dist/chunk-HT35SQZD.js.map +1 -0
- package/dist/chunk-HU5HVKY7.js +285 -0
- package/dist/chunk-HU5HVKY7.js.map +1 -0
- package/dist/{chunk-HPVMTX6M.js → chunk-I37INEWE.js} +47 -12
- package/dist/chunk-I37INEWE.js.map +1 -0
- package/dist/{chunk-WJCQFNF6.js → chunk-I7TWVK6N.js} +3 -3
- package/dist/{chunk-WJCQFNF6.js.map → chunk-I7TWVK6N.js.map} +1 -1
- package/dist/{chunk-D6UBEYQH.js → chunk-IF6IA3PZ.js} +6 -6
- package/dist/chunk-IF6IA3PZ.js.map +1 -0
- package/dist/{chunk-AIBAOXDU.js → chunk-IP2IPMEH.js} +7 -7
- package/dist/{chunk-AIBAOXDU.js.map → chunk-IP2IPMEH.js.map} +1 -1
- package/dist/{chunk-X6GUNN7X.js → chunk-J24CY3PF.js} +8 -8
- package/dist/chunk-J24CY3PF.js.map +1 -0
- package/dist/{chunk-YZ3N7IUU.js → chunk-JTOWA6RS.js} +60 -19
- package/dist/{chunk-YZ3N7IUU.js.map → chunk-JTOWA6RS.js.map} +1 -1
- package/dist/{chunk-BBWSGVVE.js → chunk-MKRWN7XP.js} +4 -4
- package/dist/{chunk-BBWSGVVE.js.map → chunk-MKRWN7XP.js.map} +1 -1
- package/dist/{chunk-VM3PH7BB.js → chunk-MRHVPQNO.js} +519 -86
- package/dist/chunk-MRHVPQNO.js.map +1 -0
- package/dist/{chunk-A2ULN3KX.js → chunk-MWXYN6NY.js} +2 -2
- package/dist/{chunk-A2ULN3KX.js.map → chunk-MWXYN6NY.js.map} +1 -1
- package/dist/{chunk-T2TQAH2X.js → chunk-N46LQR46.js} +74 -18
- package/dist/chunk-N46LQR46.js.map +1 -0
- package/dist/{chunk-CD7SVH6W.js → chunk-PYJS5K7V.js} +3 -3
- package/dist/{chunk-CD7SVH6W.js.map → chunk-PYJS5K7V.js.map} +1 -1
- package/dist/{chunk-BO426QWN.js → chunk-QG6GHTRM.js} +4 -4
- package/dist/{chunk-BO426QWN.js.map → chunk-QG6GHTRM.js.map} +1 -1
- package/dist/{chunk-RD6N2D7I.js → chunk-R4I3VBSS.js} +2 -2
- package/dist/{chunk-RD6N2D7I.js.map → chunk-R4I3VBSS.js.map} +1 -1
- package/dist/{chunk-OYIENLJI.js → chunk-RO6VOM6Z.js} +15 -15
- package/dist/{chunk-OYIENLJI.js.map → chunk-RO6VOM6Z.js.map} +1 -1
- package/dist/{chunk-B4X2N7JQ.js → chunk-RPZVHXQ3.js} +12 -12
- package/dist/chunk-RPZVHXQ3.js.map +1 -0
- package/dist/{chunk-KC6HGWXN.js → chunk-TIIXG3PN.js} +3 -3
- package/dist/{chunk-KC6HGWXN.js.map → chunk-TIIXG3PN.js.map} +1 -1
- package/dist/{chunk-CKICWXMU.js → chunk-UQ33Y4DM.js} +139 -10
- package/dist/chunk-UQ33Y4DM.js.map +1 -0
- package/dist/{chunk-2NOLF7B2.js → chunk-V257LUBM.js} +16 -7
- package/dist/chunk-V257LUBM.js.map +1 -0
- package/dist/{chunk-2ABUJYVI.js → chunk-VIM3PWZM.js} +3 -3
- package/dist/{chunk-2ABUJYVI.js.map → chunk-VIM3PWZM.js.map} +1 -1
- package/dist/{chunk-3KMREAR2.js → chunk-VJ7NU7GD.js} +22 -22
- package/dist/{chunk-3KMREAR2.js.map → chunk-VJ7NU7GD.js.map} +1 -1
- package/dist/{chunk-GBYNC5V3.js → chunk-VSZWNUZC.js} +3 -3
- package/dist/{chunk-GBYNC5V3.js.map → chunk-VSZWNUZC.js.map} +1 -1
- package/dist/{chunk-XTO436PV.js → chunk-W4Q6CKJ5.js} +6 -6
- package/dist/chunk-W4Q6CKJ5.js.map +1 -0
- package/dist/{chunk-7ANRSTNR.js → chunk-WG6V4ISA.js} +34 -15
- package/dist/chunk-WG6V4ISA.js.map +1 -0
- package/dist/{chunk-RP3FZ2T6.js → chunk-WOIRYY5L.js} +110 -37
- package/dist/chunk-WOIRYY5L.js.map +1 -0
- package/dist/{chunk-WMF2C5U7.js → chunk-WST6UITC.js} +6 -6
- package/dist/{chunk-WMF2C5U7.js.map → chunk-WST6UITC.js.map} +1 -1
- package/dist/{chunk-X3AUS4RW.js → chunk-X4ZZTHU3.js} +4 -4
- package/dist/{chunk-X3AUS4RW.js.map → chunk-X4ZZTHU3.js.map} +1 -1
- package/dist/{chunk-GOK4QRJR.js → chunk-XJVBUDDJ.js} +5 -5
- package/dist/{chunk-GOK4QRJR.js.map → chunk-XJVBUDDJ.js.map} +1 -1
- package/dist/{chunk-VKPBUPH7.js → chunk-XM6T2AZ2.js} +36 -11
- package/dist/chunk-XM6T2AZ2.js.map +1 -0
- package/dist/{chunk-34C2EKWJ.js → chunk-XWOPZW26.js} +3 -3
- package/dist/{chunk-34C2EKWJ.js.map → chunk-XWOPZW26.js.map} +1 -1
- package/dist/{chunk-LW7ZI6EQ.js → chunk-Y5MBW5EU.js} +3 -3
- package/dist/chunk-Y5MBW5EU.js.map +1 -0
- package/dist/{chunk-U7V5SIFW.js → chunk-ZQSOJH6I.js} +36 -18
- package/dist/chunk-ZQSOJH6I.js.map +1 -0
- package/dist/{chunk-JYWW32JI.js → chunk-ZX4KRWRB.js} +17 -5
- package/dist/chunk-ZX4KRWRB.js.map +1 -0
- package/dist/claude-code-2PU7TITZ.js +10 -0
- package/dist/claude-code-2PU7TITZ.js.map +1 -0
- package/dist/cli/index.js +574 -492
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-checks.d.ts +5 -0
- package/dist/cli/src/agent-checks.d.ts.map +1 -1
- package/dist/cli/src/agent-pins.d.ts +18 -0
- package/dist/cli/src/agent-pins.d.ts.map +1 -0
- package/dist/cli/src/commands/catalog.d.ts +6 -0
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/flow.d.ts +8 -8
- package/dist/cli/src/commands/flow.d.ts.map +1 -1
- package/dist/cli/src/commands/integration.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +17 -5
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +3 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-assets.d.ts +2 -0
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin/claude-code.d.ts +6 -0
- package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin/codex.d.ts +19 -4
- package/dist/cli/src/commands/plugin/codex.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +6 -3
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/providers.d.ts +13 -0
- package/dist/cli/src/commands/providers.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/serve-preflight.d.ts +23 -0
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/driver-error.d.ts +7 -0
- package/dist/cli/src/driver-error.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +69 -53
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/index.d.ts +6 -2
- package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +32 -1
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +3 -3
- package/dist/connectors/index.js +18 -16
- package/dist/{connectors-YNQ3WJGM.js → connectors-RBGZ3M7G.js} +21 -19
- package/dist/{connectors-YNQ3WJGM.js.map → connectors-RBGZ3M7G.js.map} +1 -1
- package/dist/core/discovery.js +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/publish-manifest.js +1 -1
- package/dist/core/runtime-assets.js +3 -3
- package/dist/core/src/asset-roots.d.ts +14 -0
- package/dist/core/src/asset-roots.d.ts.map +1 -1
- package/dist/core/src/bind.d.ts +33 -14
- package/dist/core/src/bind.d.ts.map +1 -1
- package/dist/core/src/discovery.d.ts +1 -1
- package/dist/core/src/index.d.ts +4 -4
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +8 -0
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/publish-manifest.d.ts +45 -10
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +18 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +2 -2
- package/dist/deploy/index.js +5 -5
- package/dist/discovery/index.js +3 -3
- package/dist/discovery/src/discover-manifest.d.ts +1 -1
- package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-UJWEZSR3.js → ensure-sources-GKVLE6L5.js} +15 -15
- package/dist/{ensure-sources-UJWEZSR3.js.map → ensure-sources-GKVLE6L5.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +18 -16
- package/dist/factory-assets/connectors/deploy.js +18 -16
- package/dist/factory-assets/connectors/devserver.js +18 -16
- package/dist/factory-assets/connectors/flow/adapter.js +18 -16
- package/dist/factory-assets/connectors/flow/engine/loader.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts +8 -5
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +6 -6
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +19 -17
- package/dist/factory-assets/connectors/flow.js +18 -16
- package/dist/factory-assets/connectors/git.js +18 -16
- package/dist/factory-assets/connectors/gmail.js +18 -16
- package/dist/factory-assets/connectors/googledrive.js +18 -16
- package/dist/factory-assets/connectors/local.js +18 -16
- package/dist/factory-assets/connectors/mattermost.js +18 -16
- package/dist/factory-assets/connectors/memory.js +18 -16
- package/dist/factory-assets/connectors/minio.js +18 -16
- package/dist/factory-assets/connectors/postgres.js +18 -16
- package/dist/factory-assets/connectors/s3.js +18 -16
- package/dist/factory-assets/connectors/sharepoint.js +18 -16
- package/dist/factory-assets/connectors/sqlite.js +18 -16
- package/dist/factory-assets/connectors/static-server.js +18 -16
- package/dist/factory-assets/connectors/tunnel.js +18 -16
- package/dist/factory-assets/connectors/webdav.js +18 -16
- package/dist/factory-assets/connectors/xstate/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/xstate-store.js +18 -16
- package/dist/factory-assets/connectors/xstate.js +18 -16
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
- package/dist/{flows-BHY73K3O.js → flows-W2FB7WIM.js} +8 -8
- package/dist/{flows-BHY73K3O.js.map → flows-W2FB7WIM.js.map} +1 -1
- package/dist/{helpers-3CG7ZVX4.js → helpers-34QNVIGB.js} +15 -15
- package/dist/{helpers-3CG7ZVX4.js.map → helpers-34QNVIGB.js.map} +1 -1
- package/dist/library/index.js +9 -9
- package/dist/library/install.js +2 -2
- package/dist/library/src/index.d.ts +1 -1
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts +13 -0
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/{library-publish-NWWVYJUK.js → library-publish-RUQTKTJU.js} +125 -48
- package/dist/library-publish-RUQTKTJU.js.map +1 -0
- package/dist/model-endpoint/index.js +8 -8
- package/dist/{open-library-7ZG2FFAX.js → open-library-PVTIUQUF.js} +18 -18
- package/dist/{open-library-7ZG2FFAX.js.map → open-library-PVTIUQUF.js.map} +1 -1
- package/dist/{open-registry-RBELV5YH.js → open-registry-SOIS3TA2.js} +13 -13
- package/dist/{open-registry-RBELV5YH.js.map → open-registry-SOIS3TA2.js.map} +1 -1
- package/dist/{paths-BFM6K2QO.js → paths-JLNX7Y4X.js} +8 -8
- package/dist/{paths-BFM6K2QO.js.map → paths-JLNX7Y4X.js.map} +1 -1
- package/dist/{plugin-store-QOQDM24E.js → plugin-store-G2GWAHSD.js} +8 -8
- package/dist/{plugin-store-QOQDM24E.js.map → plugin-store-G2GWAHSD.js.map} +1 -1
- package/dist/{project-YQM3I25D.js → project-EX47PUBN.js} +38 -37
- package/dist/{project-YQM3I25D.js.map → project-EX47PUBN.js.map} +1 -1
- package/dist/resolver/index.js +5 -5
- package/dist/runner/index.js +30 -29
- package/dist/runner/src/agents/instances.d.ts.map +1 -1
- package/dist/runner/src/composition/compile.d.ts +11 -0
- package/dist/runner/src/composition/compile.d.ts.map +1 -1
- package/dist/runner/src/composition/index.d.ts +1 -1
- package/dist/runner/src/composition/index.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/turn-end-contract.d.ts +55 -0
- package/dist/runner/src/turn-end-contract.d.ts.map +1 -0
- package/dist/runner/src/turn-scheduler.d.ts +5 -0
- package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +12 -12
- package/dist/sdk/bridge.js +15 -13
- package/dist/sdk/core.js +5 -5
- package/dist/sdk/flow.js +6 -6
- package/dist/sdk/index.js +30 -29
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +5 -5
- package/dist/sdk/runner.js +30 -29
- package/dist/sdk/transport/ws/server.js +6 -6
- package/dist/sdk/transport/ws.js +6 -6
- package/dist/sdk/transport.js +6 -6
- package/dist/serve-preflight-QXRKGOI5.js +108 -0
- package/dist/serve-preflight-QXRKGOI5.js.map +1 -0
- package/dist/{setup-AAHVAXRA.js → setup-AFZQNGKA.js} +25 -23
- package/dist/setup-AFZQNGKA.js.map +1 -0
- package/dist/{skills-RSZVUIYZ.js → skills-YYYC6D5X.js} +8 -8
- package/dist/{skills-RSZVUIYZ.js.map → skills-YYYC6D5X.js.map} +1 -1
- package/dist/{source-KWMCMEMB.js → source-DGPCT5IC.js} +40 -39
- package/dist/{source-KWMCMEMB.js.map → source-DGPCT5IC.js.map} +1 -1
- package/dist/{source-manifest-publish-EDYKM4YZ.js → source-manifest-publish-AGJ63JF2.js} +42 -41
- package/dist/source-manifest-publish-AGJ63JF2.js.map +1 -0
- package/dist/transport/index.js +6 -6
- package/dist/transport/src/ws/server.d.ts +1 -1
- package/dist/transport/src/ws/server.d.ts.map +1 -1
- package/dist/transport/ws/server.js +6 -6
- package/dist/transport/ws.js +6 -6
- package/dist/tui/index.js +30 -29
- package/dist/tui/index.js.map +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/manifests/scaffold-body.d.ts +6 -3
- package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +22 -20
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2NOLF7B2.js.map +0 -1
- package/dist/chunk-7ANRSTNR.js.map +0 -1
- package/dist/chunk-B4X2N7JQ.js.map +0 -1
- package/dist/chunk-CKICWXMU.js.map +0 -1
- package/dist/chunk-CKNIYIV2.js.map +0 -1
- package/dist/chunk-D6UBEYQH.js.map +0 -1
- package/dist/chunk-HPVMTX6M.js.map +0 -1
- package/dist/chunk-IW6F6R2W.js.map +0 -1
- package/dist/chunk-JYWW32JI.js.map +0 -1
- package/dist/chunk-LW7ZI6EQ.js.map +0 -1
- package/dist/chunk-PBSN4RTV.js.map +0 -1
- package/dist/chunk-RP3FZ2T6.js.map +0 -1
- package/dist/chunk-T2TQAH2X.js.map +0 -1
- package/dist/chunk-U7V5SIFW.js.map +0 -1
- package/dist/chunk-VKPBUPH7.js.map +0 -1
- package/dist/chunk-VM3PH7BB.js.map +0 -1
- package/dist/chunk-X6GUNN7X.js.map +0 -1
- package/dist/chunk-XTO436PV.js.map +0 -1
- package/dist/chunk-YARXR3CN.js.map +0 -1
- package/dist/chunk-ZBMC6IAE.js.map +0 -1
- package/dist/library-publish-NWWVYJUK.js.map +0 -1
- package/dist/serve-preflight-5QMY7DBC.js +0 -60
- package/dist/serve-preflight-5QMY7DBC.js.map +0 -1
- package/dist/setup-AAHVAXRA.js.map +0 -1
- package/dist/source-manifest-publish-EDYKM4YZ.js.map +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { CodexAppServerClient } from '../../chunk-K4O6L3WH.js';
|
|
2
2
|
import { freshBudget, decide, spend } from '../../chunk-IZCR27MU.js';
|
|
3
3
|
import { managedCodexRegistryViolation, parseCodexCredential, prepareNativePolicy, prepareCodexInstance, codexInstanceEnvironment, isNativeApprovalPolicyActive, activateNativeApprovalPolicy, parseCodexRefreshResult, allowsNativeApprovalPath } from '../../chunk-PHRNUTSG.js';
|
|
4
|
-
import { codexSessionHome, buildCodexConfigDocument, writeCodexConfigToml, codexProviderTableId } from '../../chunk-
|
|
4
|
+
import { codexSessionHome, buildCodexConfigDocument, writeCodexConfigToml, codexProviderTableId } from '../../chunk-VSZWNUZC.js';
|
|
5
5
|
import { CodexNativeStateUnavailable } from '../../chunk-LOO5CB5M.js';
|
|
6
|
-
import { fetchProviderModels } from '../../chunk-
|
|
7
|
-
import { ReconfigureLedger, stripRunnerPrivateEnv, classifyGenericErrorMessage } from '../../chunk-
|
|
6
|
+
import { fetchProviderModels } from '../../chunk-MKRWN7XP.js';
|
|
7
|
+
import { ReconfigureLedger, stripRunnerPrivateEnv, classifyGenericErrorMessage } from '../../chunk-RPZVHXQ3.js';
|
|
8
8
|
import '../../chunk-YROR332M.js';
|
|
9
|
-
import { AgentDriver, TOOL_ALLOWLIST_UNSUPPORTED, getBridgeLogger, registryDriverConfig } from '../../chunk-
|
|
10
|
-
import { BUILTIN_DRIVER_CATALOG, registryCredentialEnv, entryCredentialValue } from '../../chunk-
|
|
9
|
+
import { AgentDriver, TOOL_ALLOWLIST_UNSUPPORTED, getBridgeLogger, registryDriverConfig } from '../../chunk-XWOPZW26.js';
|
|
10
|
+
import { BUILTIN_DRIVER_CATALOG, registryCredentialEnv, entryCredentialValue } from '../../chunk-CQJH4G2K.js';
|
|
11
11
|
import '../../chunk-6E6PKKAD.js';
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import { loadDriverSdk } from '../../chunk-
|
|
12
|
+
import '../../chunk-335ENCCS.js';
|
|
13
|
+
import { loadDriverSdk } from '../../chunk-N46LQR46.js';
|
|
14
14
|
import '../../chunk-4GY63JU6.js';
|
|
15
|
-
import '../../chunk-
|
|
15
|
+
import '../../chunk-TIIXG3PN.js';
|
|
16
16
|
import '../../chunk-5TBFN46Z.js';
|
|
17
17
|
import '../../chunk-5BEFNLOR.js';
|
|
18
|
-
import '../../chunk-
|
|
19
|
-
import '../../chunk-
|
|
18
|
+
import '../../chunk-MWXYN6NY.js';
|
|
19
|
+
import '../../chunk-V257LUBM.js';
|
|
20
20
|
import '../../chunk-L5VSIPQD.js';
|
|
21
21
|
import '../../chunk-IG5LZ3WU.js';
|
|
22
|
-
import '../../chunk-
|
|
22
|
+
import '../../chunk-UQ33Y4DM.js';
|
|
23
23
|
import '../../chunk-RVRB27AN.js';
|
|
24
24
|
import '../../chunk-GOCWM7FN.js';
|
|
25
25
|
import '../../chunk-WDXZA7QW.js';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { driverSessionConfigHome, removeSessionConfigFile, writeSessionConfigFile } from '../../chunk-EAZECHPM.js';
|
|
2
|
-
import { SubprocessCliDriver, extractText, extractCost, extractTokens } from '../../chunk-
|
|
3
|
-
import { resolveEnvDriverSession, continueRoleBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, entrySurface, harnessProviderName, entryBaseUrl, versionedAnthropicBaseUrl } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
2
|
+
import { SubprocessCliDriver, extractText, extractCost, extractTokens } from '../../chunk-W4Q6CKJ5.js';
|
|
3
|
+
import { resolveEnvDriverSession, continueRoleBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, entrySurface, harnessProviderName, entryBaseUrl, versionedAnthropicBaseUrl } from '../../chunk-2GXSSZAM.js';
|
|
4
|
+
import '../../chunk-RPZVHXQ3.js';
|
|
5
5
|
import '../../chunk-YROR332M.js';
|
|
6
|
-
import { getBridgeLogger, registryDriverConfig } from '../../chunk-
|
|
7
|
-
import { BUILTIN_DRIVER_CATALOG, entryCredentialValue, providerCredentialEnvName } from '../../chunk-
|
|
6
|
+
import { getBridgeLogger, registryDriverConfig } from '../../chunk-XWOPZW26.js';
|
|
7
|
+
import { BUILTIN_DRIVER_CATALOG, entryCredentialValue, providerCredentialEnvName } from '../../chunk-CQJH4G2K.js';
|
|
8
8
|
import '../../chunk-6E6PKKAD.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-N46LQR46.js';
|
|
10
10
|
import '../../chunk-4GY63JU6.js';
|
|
11
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-TIIXG3PN.js';
|
|
12
12
|
import '../../chunk-5TBFN46Z.js';
|
|
13
13
|
import '../../chunk-5BEFNLOR.js';
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
14
|
+
import '../../chunk-MWXYN6NY.js';
|
|
15
|
+
import '../../chunk-V257LUBM.js';
|
|
16
16
|
import '../../chunk-L5VSIPQD.js';
|
|
17
17
|
import '../../chunk-IG5LZ3WU.js';
|
|
18
|
-
import '../../chunk-
|
|
18
|
+
import '../../chunk-UQ33Y4DM.js';
|
|
19
19
|
import '../../chunk-RVRB27AN.js';
|
|
20
20
|
import '../../chunk-GOCWM7FN.js';
|
|
21
21
|
import '../../chunk-WDXZA7QW.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dispatchCapability } from '../../chunk-AJ7EGIFR.js';
|
|
2
|
-
import { AgentDriver, getBridgeLogger, registryDriverConfig } from '../../chunk-
|
|
3
|
-
import { BUILTIN_DRIVER_CATALOG } from '../../chunk-
|
|
2
|
+
import { AgentDriver, getBridgeLogger, registryDriverConfig } from '../../chunk-XWOPZW26.js';
|
|
3
|
+
import { BUILTIN_DRIVER_CATALOG } from '../../chunk-CQJH4G2K.js';
|
|
4
4
|
import '../../chunk-6E6PKKAD.js';
|
|
5
5
|
import '../../chunk-Y56YIT6J.js';
|
|
6
6
|
import '../../chunk-ICSCSM5D.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { GeminiDriver, GeminiFamilyDriver, geminiDriverTarget } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { GeminiDriver, GeminiFamilyDriver, geminiDriverTarget } from '../../chunk-IP2IPMEH.js';
|
|
2
|
+
import '../../chunk-W4Q6CKJ5.js';
|
|
3
|
+
import '../../chunk-MKRWN7XP.js';
|
|
4
|
+
import '../../chunk-2GXSSZAM.js';
|
|
5
|
+
import '../../chunk-RPZVHXQ3.js';
|
|
6
6
|
import '../../chunk-YROR332M.js';
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-XWOPZW26.js';
|
|
8
|
+
import '../../chunk-CQJH4G2K.js';
|
|
9
9
|
import '../../chunk-6E6PKKAD.js';
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-335ENCCS.js';
|
|
11
11
|
import '../../chunk-ICSCSM5D.js';
|
|
12
12
|
import '../../chunk-DKXNKFKP.js';
|
|
13
13
|
import '../../chunk-MJHSLODD.js';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { driverSessionConfigHome, pruneSessionConfigDir, writeSessionConfigFile } from '../../chunk-EAZECHPM.js';
|
|
2
|
-
import { SubprocessCliDriver, extractText, extractCost, extractTokens } from '../../chunk-
|
|
3
|
-
import { resolveEnvDriverSession, resolveRegistryBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
2
|
+
import { SubprocessCliDriver, extractText, extractCost, extractTokens } from '../../chunk-W4Q6CKJ5.js';
|
|
3
|
+
import { resolveEnvDriverSession, resolveRegistryBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds } from '../../chunk-2GXSSZAM.js';
|
|
4
|
+
import '../../chunk-RPZVHXQ3.js';
|
|
5
5
|
import '../../chunk-YROR332M.js';
|
|
6
|
-
import { getBridgeLogger, registryDriverConfig } from '../../chunk-
|
|
7
|
-
import { BUILTIN_DRIVER_CATALOG, providerCredentialEnvName } from '../../chunk-
|
|
6
|
+
import { getBridgeLogger, registryDriverConfig } from '../../chunk-XWOPZW26.js';
|
|
7
|
+
import { BUILTIN_DRIVER_CATALOG, providerCredentialEnvName } from '../../chunk-CQJH4G2K.js';
|
|
8
8
|
import '../../chunk-6E6PKKAD.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-N46LQR46.js';
|
|
10
10
|
import '../../chunk-4GY63JU6.js';
|
|
11
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-TIIXG3PN.js';
|
|
12
12
|
import '../../chunk-5TBFN46Z.js';
|
|
13
13
|
import '../../chunk-5BEFNLOR.js';
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
14
|
+
import '../../chunk-MWXYN6NY.js';
|
|
15
|
+
import '../../chunk-V257LUBM.js';
|
|
16
16
|
import '../../chunk-L5VSIPQD.js';
|
|
17
17
|
import '../../chunk-IG5LZ3WU.js';
|
|
18
|
-
import '../../chunk-
|
|
18
|
+
import '../../chunk-UQ33Y4DM.js';
|
|
19
19
|
import '../../chunk-RVRB27AN.js';
|
|
20
20
|
import '../../chunk-GOCWM7FN.js';
|
|
21
21
|
import '../../chunk-WDXZA7QW.js';
|
|
@@ -1,478 +1,27 @@
|
|
|
1
1
|
import { checkToolInputSchema } from '../../chunk-L2AMXONH.js';
|
|
2
|
-
import {
|
|
2
|
+
import { materializeOmpProviders, isCredentialOmissionWarning, materializeOmpIdentityDir, registryModelEntries } from '../../chunk-COJIL7G4.js';
|
|
3
3
|
import { dispatchCapability } from '../../chunk-AJ7EGIFR.js';
|
|
4
|
-
import
|
|
4
|
+
import '../../chunk-2GXSSZAM.js';
|
|
5
|
+
import { ReconfigureLedger, stripRunnerPrivateEnv, classifyGenericErrorMessage } from '../../chunk-RPZVHXQ3.js';
|
|
5
6
|
import { wrapAgentCommand, resolveAgentExec } from '../../chunk-YROR332M.js';
|
|
6
|
-
import { AgentDriver, getBridgeLogger, TOOL_ALLOWLIST_UNSUPPORTED, registryDriverConfig } from '../../chunk-
|
|
7
|
-
import { BUILTIN_DRIVER_CATALOG
|
|
7
|
+
import { AgentDriver, getBridgeLogger, TOOL_ALLOWLIST_UNSUPPORTED, registryDriverConfig } from '../../chunk-XWOPZW26.js';
|
|
8
|
+
import { BUILTIN_DRIVER_CATALOG } from '../../chunk-CQJH4G2K.js';
|
|
8
9
|
import '../../chunk-6E6PKKAD.js';
|
|
9
10
|
import { withActivityLabelJsonSchema } from '../../chunk-Y56YIT6J.js';
|
|
10
11
|
import '../../chunk-ICSCSM5D.js';
|
|
11
12
|
import '../../chunk-DKXNKFKP.js';
|
|
12
|
-
import
|
|
13
|
+
import '../../chunk-MJHSLODD.js';
|
|
13
14
|
import '../../chunk-C3CAXQMA.js';
|
|
14
15
|
import '../../chunk-BOFL7GIF.js';
|
|
15
16
|
import '../../chunk-NSBPE2FW.js';
|
|
16
17
|
import { spawn } from 'child_process';
|
|
17
|
-
import { randomUUID
|
|
18
|
+
import { randomUUID } from 'crypto';
|
|
18
19
|
import { rmSync } from 'fs';
|
|
19
20
|
import fs from 'fs/promises';
|
|
20
21
|
import path from 'path';
|
|
21
22
|
import { createInterface } from 'readline';
|
|
22
23
|
import * as z from 'zod';
|
|
23
|
-
import os from 'os';
|
|
24
|
-
import { stringify, parse } from 'yaml';
|
|
25
24
|
|
|
26
|
-
var OMP_API_VALUES = [...AI_PROVIDER_SURFACES, "google-gemini-cli"];
|
|
27
|
-
var OMP_DISCOVERY_TYPES = [
|
|
28
|
-
"ollama",
|
|
29
|
-
"llama.cpp",
|
|
30
|
-
"lm-studio",
|
|
31
|
-
"openai-models-list",
|
|
32
|
-
"proxy",
|
|
33
|
-
"litellm"
|
|
34
|
-
];
|
|
35
|
-
var OMP_MODELS_FILENAME = "models.yml";
|
|
36
|
-
var OMP_CONFIG_FILENAME = "config.yml";
|
|
37
|
-
var OWNED_AGENT_DIR_FILES = {
|
|
38
|
-
"models.yml": true,
|
|
39
|
-
"models.yaml": true,
|
|
40
|
-
"models.json": true,
|
|
41
|
-
"config.yml": true,
|
|
42
|
-
"config.yaml": true,
|
|
43
|
-
"config.yml.lock": true,
|
|
44
|
-
"config.yaml.lock": true,
|
|
45
|
-
"settings.json": true
|
|
46
|
-
};
|
|
47
|
-
var OMP_RUNTIME_ENTRIES = {
|
|
48
|
-
"agent.db": true,
|
|
49
|
-
"agent.db-shm": true,
|
|
50
|
-
"agent.db-wal": true,
|
|
51
|
-
"models.db": true,
|
|
52
|
-
"models.db-shm": true,
|
|
53
|
-
"models.db-wal": true,
|
|
54
|
-
"skill-descriptions.db": true,
|
|
55
|
-
"skill-descriptions.db-shm": true,
|
|
56
|
-
"skill-descriptions.db-wal": true,
|
|
57
|
-
"custom-session-files": true,
|
|
58
|
-
intercom: true,
|
|
59
|
-
sessions: true
|
|
60
|
-
};
|
|
61
|
-
var OMP_LOGIN_FILES = ["agent.db", "agent.db-shm", "agent.db-wal"];
|
|
62
|
-
function entryModelIds(entry) {
|
|
63
|
-
const logical = /* @__PURE__ */ new Set([
|
|
64
|
-
...Object.keys(entry.model_map ?? {}),
|
|
65
|
-
...Object.keys(entry.capabilities ?? {})
|
|
66
|
-
]);
|
|
67
|
-
const seen = /* @__PURE__ */ new Set();
|
|
68
|
-
const out = [];
|
|
69
|
-
for (const id of logical) {
|
|
70
|
-
const providerSide = entry.model_map?.[id] ?? id;
|
|
71
|
-
if (seen.has(providerSide)) continue;
|
|
72
|
-
seen.add(providerSide);
|
|
73
|
-
out.push([id, providerSide]);
|
|
74
|
-
}
|
|
75
|
-
return out;
|
|
76
|
-
}
|
|
77
|
-
function renderProvider(id, entry, warnings) {
|
|
78
|
-
const baseUrl = normalizeEntryBaseUrl(resolveEntryBaseUrl(entry), entrySurface(entry));
|
|
79
|
-
if (!baseUrl) {
|
|
80
|
-
warnings.push(
|
|
81
|
-
`provider '${id}' has no resolvable base_url (missing transport params?) \u2014 omitted from models.yml`
|
|
82
|
-
);
|
|
83
|
-
return void 0;
|
|
84
|
-
}
|
|
85
|
-
const surface = entry.surface;
|
|
86
|
-
if (surface && !OMP_API_VALUES.includes(surface)) {
|
|
87
|
-
warnings.push(
|
|
88
|
-
`provider '${id}' has surface '${surface}', which omp's api enum does not accept`
|
|
89
|
-
);
|
|
90
|
-
return void 0;
|
|
91
|
-
}
|
|
92
|
-
const block = { baseUrl };
|
|
93
|
-
if (surface) block.api = surface;
|
|
94
|
-
const kind = entry.credential?.kind ?? "none";
|
|
95
|
-
if (kind === "none") {
|
|
96
|
-
block.auth = "none";
|
|
97
|
-
} else if (kind === "sigv4" || kind === "google_adc" || kind === "azure_entra") {
|
|
98
|
-
block.auth = "none";
|
|
99
|
-
} else {
|
|
100
|
-
block.apiKey = providerCredentialEnvName(id);
|
|
101
|
-
if (kind === "bearer" || kind === "oauth") block.authHeader = true;
|
|
102
|
-
}
|
|
103
|
-
const headers = { ...entry.headers };
|
|
104
|
-
if (entry.query_params && Object.keys(entry.query_params).length > 0) {
|
|
105
|
-
if (surface === "bedrock-converse-stream") {
|
|
106
|
-
const search = new URLSearchParams(entry.query_params).toString();
|
|
107
|
-
block.baseUrl = `${baseUrl}${baseUrl.includes("?") ? "&" : "?"}${search}`;
|
|
108
|
-
} else {
|
|
109
|
-
warnings.push(
|
|
110
|
-
`provider '${id}' declares query_params, which omp's models.yml has no slot for on surface '${surface ?? "unset"}' \u2014 they were dropped`
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (Object.keys(headers).length > 0) block.headers = headers;
|
|
115
|
-
const discoveryType = entry.discovery?.type;
|
|
116
|
-
if (discoveryType) {
|
|
117
|
-
if (!OMP_DISCOVERY_TYPES.includes(discoveryType)) {
|
|
118
|
-
warnings.push(
|
|
119
|
-
`provider '${id}' declares discovery '${discoveryType}', which omp does not implement \u2014 models come from model_map only`
|
|
120
|
-
);
|
|
121
|
-
} else if (!surface && discoveryType !== "proxy") {
|
|
122
|
-
warnings.push(
|
|
123
|
-
`provider '${id}' declares discovery '${discoveryType}' but no surface \u2014 omp requires provider-level api for every discovery type but 'proxy'`
|
|
124
|
-
);
|
|
125
|
-
} else {
|
|
126
|
-
block.discovery = { type: discoveryType };
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const models = [];
|
|
130
|
-
for (const [logical, providerSide] of entryModelIds(entry)) {
|
|
131
|
-
const model = { id: providerSide };
|
|
132
|
-
if (logical !== providerSide) model.name = logical;
|
|
133
|
-
const caps = entry.capabilities?.[logical];
|
|
134
|
-
if (caps?.context_window !== void 0) model.contextWindow = caps.context_window;
|
|
135
|
-
if (caps?.images !== void 0) model.input = caps.images ? ["text", "image"] : ["text"];
|
|
136
|
-
if (caps?.tools !== void 0) model.supportsTools = caps.tools;
|
|
137
|
-
models.push(model);
|
|
138
|
-
}
|
|
139
|
-
if (models.length > 0) {
|
|
140
|
-
if (!surface) {
|
|
141
|
-
warnings.push(
|
|
142
|
-
`provider '${id}' declares models but no surface \u2014 omp requires api at provider or model level`
|
|
143
|
-
);
|
|
144
|
-
return void 0;
|
|
145
|
-
}
|
|
146
|
-
block.models = models;
|
|
147
|
-
} else if (!block.discovery) {
|
|
148
|
-
warnings.push(
|
|
149
|
-
`provider '${id}' declares neither model_map/capabilities nor a discovery omp implements \u2014 it will only override an omp built-in provider of the same id`
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
return block;
|
|
153
|
-
}
|
|
154
|
-
function renderModelRoles(registry, roles, modelRef, warnings) {
|
|
155
|
-
const out = {};
|
|
156
|
-
for (const [role, selector] of Object.entries(roles ?? {})) {
|
|
157
|
-
const trimmed = selector.trim();
|
|
158
|
-
if (!trimmed) continue;
|
|
159
|
-
const ref = parseModelRef(trimmed, registry);
|
|
160
|
-
if (!ref?.providerModelId) {
|
|
161
|
-
warnings.push(
|
|
162
|
-
`role '${role}' ('${selector}') resolves to no model in this registry \u2014 dropped`
|
|
163
|
-
);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
out[role] = `${ref.providerId}/${ref.providerModelId}`;
|
|
167
|
-
}
|
|
168
|
-
if (out.default === void 0 && modelRef) {
|
|
169
|
-
const ref = parseModelRef(modelRef, registry, roles);
|
|
170
|
-
if (ref?.providerModelId) out.default = `${ref.providerId}/${ref.providerModelId}`;
|
|
171
|
-
}
|
|
172
|
-
return out;
|
|
173
|
-
}
|
|
174
|
-
function renderOmpRegistry(registry, options = {}) {
|
|
175
|
-
const warnings = [];
|
|
176
|
-
const providers = {};
|
|
177
|
-
const providerIds = [];
|
|
178
|
-
const credentialEnv = {};
|
|
179
|
-
const unresolved = new Map(
|
|
180
|
-
unresolvedProviderCredentials(registry, options).map((u) => [u.providerId, u.reason])
|
|
181
|
-
);
|
|
182
|
-
for (const [id, entry] of registryEntries(registry)) {
|
|
183
|
-
if (entry.kind !== "llm" && entry.kind !== "embed") continue;
|
|
184
|
-
if (!isEntryEnabled(entry)) continue;
|
|
185
|
-
const reason = unresolved.get(id);
|
|
186
|
-
if (reason) {
|
|
187
|
-
warnings.push(`provider '${id}' omitted from models.yml: ${reason}`);
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
const block = renderProvider(id, entry, warnings);
|
|
191
|
-
if (!block) continue;
|
|
192
|
-
providers[id] = block;
|
|
193
|
-
providerIds.push(id);
|
|
194
|
-
const secret = entryCredentialValue(id, entry, options);
|
|
195
|
-
if (secret) credentialEnv[providerCredentialEnvName(id)] = secret;
|
|
196
|
-
}
|
|
197
|
-
const modelRoles = renderModelRoles(registry, options.roles, options.modelRef, warnings);
|
|
198
|
-
const settings = { ...options.baseSettings };
|
|
199
|
-
if (Object.keys(modelRoles).length > 0) settings.modelRoles = modelRoles;
|
|
200
|
-
return {
|
|
201
|
-
modelsYml: stringify({ providers }),
|
|
202
|
-
configYml: stringify(settings),
|
|
203
|
-
credentialEnv,
|
|
204
|
-
providerIds,
|
|
205
|
-
modelRoles,
|
|
206
|
-
warnings
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
function registryModelEntries(registry) {
|
|
210
|
-
if (!registry) return [];
|
|
211
|
-
const out = [];
|
|
212
|
-
for (const [id, entry] of registryEntries(registry)) {
|
|
213
|
-
if (entry.kind !== "llm" && entry.kind !== "embed") continue;
|
|
214
|
-
if (!isEntryEnabled(entry)) continue;
|
|
215
|
-
const label = entry.label ?? id;
|
|
216
|
-
for (const [logical, providerSide] of entryModelIds(entry)) {
|
|
217
|
-
out.push({ id: `${id}/${providerSide}`, name: `${label} ${logical}` });
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return out;
|
|
221
|
-
}
|
|
222
|
-
async function planOmpAgentDir(input) {
|
|
223
|
-
const options = input.options;
|
|
224
|
-
const key = input.sessionId?.trim() || createHash("sha256").update(path.resolve(input.cwd)).digest("hex").slice(0, 16);
|
|
225
|
-
const ephemeral = options?.agentHome === void 0;
|
|
226
|
-
let agentDir = options?.agentHome ?? "";
|
|
227
|
-
if (ephemeral) {
|
|
228
|
-
const root = path.join(input.tmpDir ?? os.tmpdir(), "skaile-omp-agent");
|
|
229
|
-
await fs.mkdir(root, { recursive: true });
|
|
230
|
-
await sweepStaleOmpHomes(root);
|
|
231
|
-
agentDir = await fs.mkdtemp(path.join(root, `${key.replace(/[^A-Za-z0-9._-]/g, "_")}-`));
|
|
232
|
-
await fs.writeFile(path.join(agentDir, OWNER_FILE), String(process.pid));
|
|
233
|
-
}
|
|
234
|
-
if (options?.seedUserAgentDir === false) return { agentDir, ephemeral };
|
|
235
|
-
const seedFrom = options?.userAgentDir ?? path.join(input.homeDir ?? os.homedir(), ".omp", "agent");
|
|
236
|
-
if (path.resolve(seedFrom) === path.resolve(agentDir)) return { agentDir, ephemeral };
|
|
237
|
-
try {
|
|
238
|
-
if (!(await fs.stat(seedFrom)).isDirectory()) return { agentDir, ephemeral };
|
|
239
|
-
} catch {
|
|
240
|
-
return { agentDir, ephemeral };
|
|
241
|
-
}
|
|
242
|
-
return { agentDir, seedFrom, ephemeral };
|
|
243
|
-
}
|
|
244
|
-
var OWNER_FILE = ".skaile-owner-pid";
|
|
245
|
-
var STALE_HOME_MS = 24 * 60 * 60 * 1e3;
|
|
246
|
-
var SKAILE_HOME_NAME = /^[A-Za-z0-9._-]+-(?:[A-Za-z0-9]{6}|[0-9a-f]{12})$/;
|
|
247
|
-
function processAlive(pid) {
|
|
248
|
-
try {
|
|
249
|
-
process.kill(pid, 0);
|
|
250
|
-
return true;
|
|
251
|
-
} catch (err) {
|
|
252
|
-
return err.code === "EPERM";
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
async function sweepStaleOmpHomes(root, now = Date.now()) {
|
|
256
|
-
let names;
|
|
257
|
-
try {
|
|
258
|
-
names = await fs.readdir(root);
|
|
259
|
-
} catch {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
await Promise.all(
|
|
263
|
-
names.map(async (name) => {
|
|
264
|
-
const home = path.join(root, name);
|
|
265
|
-
try {
|
|
266
|
-
const stat = await fs.lstat(home);
|
|
267
|
-
if (!stat.isDirectory() || now - stat.mtimeMs < STALE_HOME_MS) return;
|
|
268
|
-
const owner = Number.parseInt(
|
|
269
|
-
await fs.readFile(path.join(home, OWNER_FILE), "utf8").catch(() => ""),
|
|
270
|
-
10
|
|
271
|
-
);
|
|
272
|
-
if (Number.isInteger(owner) && processAlive(owner)) return;
|
|
273
|
-
if (!Number.isInteger(owner) && !SKAILE_HOME_NAME.test(name)) return;
|
|
274
|
-
await fs.rm(home, { recursive: true, force: true });
|
|
275
|
-
} catch {
|
|
276
|
-
}
|
|
277
|
-
})
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
async function removeHomeOnThrow(plan, fill) {
|
|
281
|
-
try {
|
|
282
|
-
return await fill();
|
|
283
|
-
} catch (err) {
|
|
284
|
-
if (plan.ephemeral) await fs.rm(plan.agentDir, { recursive: true, force: true });
|
|
285
|
-
throw err;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
async function removeEntry(target) {
|
|
289
|
-
let stat;
|
|
290
|
-
try {
|
|
291
|
-
stat = await fs.lstat(target);
|
|
292
|
-
} catch {
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
if (stat.isSymbolicLink() || stat.isFile()) {
|
|
296
|
-
await fs.unlink(target);
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
await fs.rm(target, { recursive: true, force: true });
|
|
300
|
-
}
|
|
301
|
-
async function linkInto(dir, sourceDir, skip) {
|
|
302
|
-
let names;
|
|
303
|
-
try {
|
|
304
|
-
names = await fs.readdir(sourceDir);
|
|
305
|
-
} catch {
|
|
306
|
-
return [];
|
|
307
|
-
}
|
|
308
|
-
const linked = [];
|
|
309
|
-
for (const name of names) {
|
|
310
|
-
if (skip[name]) continue;
|
|
311
|
-
const target = path.join(dir, name);
|
|
312
|
-
await removeEntry(target);
|
|
313
|
-
await fs.symlink(path.join(sourceDir, name), target);
|
|
314
|
-
linked.push(name);
|
|
315
|
-
}
|
|
316
|
-
return linked;
|
|
317
|
-
}
|
|
318
|
-
async function dropStaleSeedLinks(dir, sourceDir) {
|
|
319
|
-
let names;
|
|
320
|
-
try {
|
|
321
|
-
names = await fs.readdir(dir);
|
|
322
|
-
} catch {
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
const root = path.resolve(sourceDir);
|
|
326
|
-
for (const name of names) {
|
|
327
|
-
if (OMP_LOGIN_FILES.includes(name)) continue;
|
|
328
|
-
const entry = path.join(dir, name);
|
|
329
|
-
try {
|
|
330
|
-
if (!(await fs.lstat(entry)).isSymbolicLink()) continue;
|
|
331
|
-
const to = path.resolve(dir, await fs.readlink(entry));
|
|
332
|
-
if (to === root || to.startsWith(root + path.sep)) await fs.unlink(entry);
|
|
333
|
-
} catch {
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
async function linkLoginFiles(dir, sourceDir) {
|
|
338
|
-
await dropStaleSeedLinks(dir, sourceDir);
|
|
339
|
-
const linked = [];
|
|
340
|
-
for (const name of OMP_LOGIN_FILES) {
|
|
341
|
-
const from = path.join(sourceDir, name);
|
|
342
|
-
try {
|
|
343
|
-
if (!(await fs.stat(from)).isFile()) continue;
|
|
344
|
-
} catch {
|
|
345
|
-
continue;
|
|
346
|
-
}
|
|
347
|
-
const target = path.join(dir, name);
|
|
348
|
-
await removeEntry(target);
|
|
349
|
-
await fs.symlink(from, target);
|
|
350
|
-
linked.push(name);
|
|
351
|
-
}
|
|
352
|
-
return linked;
|
|
353
|
-
}
|
|
354
|
-
async function readSeededSettings(seedFrom) {
|
|
355
|
-
for (const name of ["config.yml", "config.yaml"]) {
|
|
356
|
-
let raw;
|
|
357
|
-
try {
|
|
358
|
-
raw = await fs.readFile(path.join(seedFrom, name), "utf-8");
|
|
359
|
-
} catch {
|
|
360
|
-
continue;
|
|
361
|
-
}
|
|
362
|
-
const parsed = parse(raw);
|
|
363
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
364
|
-
return parsed;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
return {};
|
|
368
|
-
}
|
|
369
|
-
async function ownDefaultNeedingOwnModels(seedFrom, rendered) {
|
|
370
|
-
const selector = (await readSeededSettings(seedFrom)).modelRoles;
|
|
371
|
-
const own = selector && typeof selector === "object" && !Array.isArray(selector) ? selector.default : void 0;
|
|
372
|
-
if (typeof own !== "string" || !own.includes("/")) return void 0;
|
|
373
|
-
const providerId = own.slice(0, own.indexOf("/"));
|
|
374
|
-
if (rendered.includes(providerId)) return void 0;
|
|
375
|
-
let raw;
|
|
376
|
-
try {
|
|
377
|
-
raw = await fs.readFile(path.join(seedFrom, OMP_MODELS_FILENAME), "utf-8");
|
|
378
|
-
} catch {
|
|
379
|
-
return void 0;
|
|
380
|
-
}
|
|
381
|
-
const providers = parse(raw)?.providers;
|
|
382
|
-
if (!providers || typeof providers !== "object" || Array.isArray(providers)) return void 0;
|
|
383
|
-
return providerId in providers ? own : void 0;
|
|
384
|
-
}
|
|
385
|
-
async function materializeOmpAgentDir(agentDir, registry, options = {}) {
|
|
386
|
-
await fs.mkdir(agentDir, { recursive: true });
|
|
387
|
-
const seeded = options.seedFrom ? await linkLoginFiles(agentDir, options.seedFrom) : [];
|
|
388
|
-
const identity = options.identityDir ? await linkInto(agentDir, options.identityDir, OWNED_AGENT_DIR_FILES) : [];
|
|
389
|
-
const baseSettings = options.baseSettings ?? (options.seedFrom ? await readSeededSettings(options.seedFrom) : void 0);
|
|
390
|
-
const render = renderOmpRegistry(registry, { ...options, baseSettings });
|
|
391
|
-
await fs.writeFile(path.join(agentDir, OMP_MODELS_FILENAME), render.modelsYml, "utf-8");
|
|
392
|
-
await fs.writeFile(path.join(agentDir, OMP_CONFIG_FILENAME), render.configYml, "utf-8");
|
|
393
|
-
return { ...render, agentDir, seeded, identity };
|
|
394
|
-
}
|
|
395
|
-
async function materializeOmpProviders(config) {
|
|
396
|
-
const registry = config.registry;
|
|
397
|
-
if (!registry) return void 0;
|
|
398
|
-
const selectable = registryEntries(registry).some(
|
|
399
|
-
([, entry]) => (entry.kind === "llm" || entry.kind === "embed") && isEntryEnabled(entry)
|
|
400
|
-
);
|
|
401
|
-
if (!selectable) return void 0;
|
|
402
|
-
const env = { ...process.env, ...config.env };
|
|
403
|
-
const selected = config.modelRef ? parseModelRef(config.modelRef, registry, config.roles) : void 0;
|
|
404
|
-
const usable = renderOmpRegistry(registry, {
|
|
405
|
-
env,
|
|
406
|
-
...config.roles ? { roles: config.roles } : {},
|
|
407
|
-
...config.modelRef ? { modelRef: config.modelRef } : {}
|
|
408
|
-
}).providerIds;
|
|
409
|
-
if (usable.length === 0) return void 0;
|
|
410
|
-
if (selected && !usable.includes(selected.providerId)) return void 0;
|
|
411
|
-
const plan = await planOmpAgentDir({
|
|
412
|
-
cwd: config.cwd,
|
|
413
|
-
...config.sessionId ? { sessionId: config.sessionId } : {},
|
|
414
|
-
...config.driverOptions?.omp ? { options: config.driverOptions.omp } : {}
|
|
415
|
-
});
|
|
416
|
-
if (!selected && !config.model && plan.seedFrom) {
|
|
417
|
-
const named = renderOmpRegistry(registry, {
|
|
418
|
-
env,
|
|
419
|
-
...config.roles ? { roles: config.roles } : {}
|
|
420
|
-
}).modelRoles;
|
|
421
|
-
if (named.default === void 0 && await ownDefaultNeedingOwnModels(plan.seedFrom, usable)) {
|
|
422
|
-
if (plan.ephemeral) await fs.rm(plan.agentDir, { recursive: true, force: true });
|
|
423
|
-
return void 0;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
const rendered = await removeHomeOnThrow(
|
|
427
|
-
plan,
|
|
428
|
-
() => materializeOmpAgentDir(plan.agentDir, registry, {
|
|
429
|
-
env,
|
|
430
|
-
...plan.seedFrom ? { seedFrom: plan.seedFrom } : {},
|
|
431
|
-
...config.agentDir ? { identityDir: config.agentDir } : {},
|
|
432
|
-
...config.roles ? { roles: config.roles } : {},
|
|
433
|
-
...config.modelRef ? { modelRef: config.modelRef } : {}
|
|
434
|
-
})
|
|
435
|
-
);
|
|
436
|
-
return {
|
|
437
|
-
...rendered,
|
|
438
|
-
ephemeral: plan.ephemeral,
|
|
439
|
-
...selected?.providerModelId ? { modelArg: `${selected.providerId}/${selected.providerModelId}` } : {}
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
async function materializeOmpIdentityDir(config) {
|
|
443
|
-
const identityDir = config.agentDir;
|
|
444
|
-
if (!identityDir) return void 0;
|
|
445
|
-
const agentKey = createHash("sha256").update(`${path.resolve(identityDir)}\0${path.resolve(config.cwd)}`).digest("hex").slice(0, 12);
|
|
446
|
-
const plan = await planOmpAgentDir({
|
|
447
|
-
cwd: config.cwd,
|
|
448
|
-
sessionId: `${config.sessionId?.trim() || "agent"}-${agentKey}`,
|
|
449
|
-
...config.driverOptions?.omp ? { options: config.driverOptions.omp } : {}
|
|
450
|
-
});
|
|
451
|
-
return removeHomeOnThrow(plan, async () => {
|
|
452
|
-
await fs.mkdir(plan.agentDir, { recursive: true });
|
|
453
|
-
const seeded = plan.seedFrom ? await linkLoginFiles(plan.agentDir, plan.seedFrom) : [];
|
|
454
|
-
if (plan.seedFrom) {
|
|
455
|
-
for (const name of Object.keys(OWNED_AGENT_DIR_FILES)) {
|
|
456
|
-
const from = path.join(plan.seedFrom, name);
|
|
457
|
-
try {
|
|
458
|
-
if (!(await fs.stat(from)).isFile()) continue;
|
|
459
|
-
} catch {
|
|
460
|
-
continue;
|
|
461
|
-
}
|
|
462
|
-
const to = path.join(plan.agentDir, name);
|
|
463
|
-
await removeEntry(to);
|
|
464
|
-
await fs.copyFile(from, to);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
const identity = await linkInto(plan.agentDir, identityDir, {
|
|
468
|
-
...OWNED_AGENT_DIR_FILES,
|
|
469
|
-
...OMP_RUNTIME_ENTRIES
|
|
470
|
-
});
|
|
471
|
-
return { agentDir: plan.agentDir, ephemeral: plan.ephemeral, seeded, identity };
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
// bridge/src/drivers/omp.ts
|
|
476
25
|
function ompCredentialMessage(msg) {
|
|
477
26
|
const match = /^(?:Error:\s*)?No API key found for ([A-Za-z0-9._-]+?)\.?(?:\s|$)/.exec(msg);
|
|
478
27
|
if (!match) return msg;
|
|
@@ -838,7 +387,10 @@ var OmpDriver = class extends AgentDriver {
|
|
|
838
387
|
const providers = await materializeOmpProviders(this.config);
|
|
839
388
|
if (providers) {
|
|
840
389
|
this.privateHome = providers.ephemeral ? providers.agentDir : null;
|
|
841
|
-
for (const warning of providers.warnings)
|
|
390
|
+
for (const warning of providers.warnings) {
|
|
391
|
+
if (isCredentialOmissionWarning(warning)) this.log.debug(warning);
|
|
392
|
+
else this.log.warn(warning);
|
|
393
|
+
}
|
|
842
394
|
this.log.info("rendered omp models.yml", {
|
|
843
395
|
agentDir: providers.agentDir,
|
|
844
396
|
providers: providers.providerIds,
|
|
@@ -979,10 +531,14 @@ var OmpDriver = class extends AgentDriver {
|
|
|
979
531
|
}
|
|
980
532
|
});
|
|
981
533
|
}
|
|
534
|
+
const replayStartStderr = () => {
|
|
535
|
+
for (const line of startStderr) this.log.warn(`stderr: ${line}`);
|
|
536
|
+
};
|
|
982
537
|
if (proc.stderr) {
|
|
983
538
|
const stderrRl = createInterface({ input: proc.stderr });
|
|
984
539
|
stderrRl.on("line", (line) => {
|
|
985
|
-
this.log.warn(`stderr: ${line}`);
|
|
540
|
+
if (this.ready) this.log.warn(`stderr: ${line}`);
|
|
541
|
+
else this.log.debug(`stderr: ${line}`);
|
|
986
542
|
this.stderrBuffer.push(line);
|
|
987
543
|
if (this.stderrBuffer.length > 20) this.stderrBuffer.shift();
|
|
988
544
|
startStderr.push(line);
|
|
@@ -994,6 +550,7 @@ var OmpDriver = class extends AgentDriver {
|
|
|
994
550
|
if (!this.ready && this.proc === proc) {
|
|
995
551
|
this.log.warn("ready timeout, proceeding", { timeoutMs: 5e3 });
|
|
996
552
|
this.ready = true;
|
|
553
|
+
replayStartStderr();
|
|
997
554
|
resolve(proc);
|
|
998
555
|
}
|
|
999
556
|
}, 5e3);
|
|
@@ -1002,6 +559,7 @@ var OmpDriver = class extends AgentDriver {
|
|
|
1002
559
|
if (!this.ready && this.proc === proc) {
|
|
1003
560
|
this.log.info("process ready", { elapsedMs: Date.now() - startTime });
|
|
1004
561
|
this.ready = true;
|
|
562
|
+
replayStartStderr();
|
|
1005
563
|
resolve(proc);
|
|
1006
564
|
}
|
|
1007
565
|
});
|