@skaile/workspaces 3.27.1 → 4.1.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 +482 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-QF7LGRUX.js → asset-feeds-VEPD5ZU7.js} +11 -9
- package/dist/asset-feeds-VEPD5ZU7.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +5 -3
- package/dist/asset-manager/index.js +11 -9
- package/dist/asset-manager/installer.js +8 -6
- package/dist/asset-manager/renderers.js +2 -2
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/codex-app-server.js +15 -1
- package/dist/bridge/drivers/claude-sdk.js +102 -55
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +179 -23
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +199 -7
- package/dist/bridge/drivers/continue.js.map +1 -1
- package/dist/bridge/drivers/echo.js +10 -4
- package/dist/bridge/drivers/echo.js.map +1 -1
- package/dist/bridge/drivers/gemini.js +7 -4
- package/dist/bridge/drivers/goose.js +160 -7
- package/dist/bridge/drivers/goose.js.map +1 -1
- package/dist/bridge/drivers/omp.js +321 -96
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +148 -13
- package/dist/bridge/drivers/opencode.js.map +1 -1
- package/dist/bridge/drivers/qwen.js +41 -11
- package/dist/bridge/drivers/qwen.js.map +1 -1
- package/dist/bridge/index.js +12 -9
- package/dist/bridge/src/cloud.d.ts +62 -71
- package/dist/bridge/src/cloud.d.ts.map +1 -1
- package/dist/bridge/src/codex/config-toml.d.ts +128 -0
- package/dist/bridge/src/codex/config-toml.d.ts.map +1 -0
- package/dist/bridge/src/codex/credentials.d.ts +26 -0
- package/dist/bridge/src/codex/credentials.d.ts.map +1 -1
- package/dist/bridge/src/codex/managed-driver.d.ts.map +1 -1
- package/dist/bridge/src/codex-app-server.d.ts.map +1 -1
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts +9 -4
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/drivers/claude-sdk.d.ts +19 -11
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/codex.d.ts +26 -1
- package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
- package/dist/bridge/src/drivers/continue.d.ts +31 -5
- package/dist/bridge/src/drivers/continue.d.ts.map +1 -1
- package/dist/bridge/src/drivers/echo.d.ts.map +1 -1
- package/dist/bridge/src/drivers/gemini.d.ts +34 -3
- package/dist/bridge/src/drivers/gemini.d.ts.map +1 -1
- package/dist/bridge/src/drivers/goose.d.ts +26 -2
- package/dist/bridge/src/drivers/goose.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp-models-yml.d.ts +216 -0
- package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -0
- package/dist/bridge/src/drivers/omp.d.ts +26 -23
- package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
- package/dist/bridge/src/drivers/opencode.d.ts +28 -3
- package/dist/bridge/src/drivers/opencode.d.ts.map +1 -1
- package/dist/bridge/src/drivers/qwen.d.ts +10 -4
- package/dist/bridge/src/drivers/qwen.d.ts.map +1 -1
- package/dist/bridge/src/index.d.ts +3 -1
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/models.d.ts +118 -19
- package/dist/bridge/src/models.d.ts.map +1 -1
- package/dist/bridge/src/provider-catalog.d.ts +188 -0
- package/dist/bridge/src/provider-catalog.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts +117 -0
- package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/credential-env.d.ts +103 -0
- package/dist/bridge/src/provider-materialize/credential-env.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/env-drivers.d.ts +209 -0
- package/dist/bridge/src/provider-materialize/env-drivers.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/goose-custom-providers.d.ts +127 -0
- package/dist/bridge/src/provider-materialize/goose-custom-providers.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/opencode-config.d.ts +127 -0
- package/dist/bridge/src/provider-materialize/opencode-config.d.ts.map +1 -0
- package/dist/bridge/src/provider-materialize/session-config-home.d.ts +63 -0
- package/dist/bridge/src/provider-materialize/session-config-home.d.ts.map +1 -0
- package/dist/bridge/src/provider-registry-derive.d.ts +59 -0
- package/dist/bridge/src/provider-registry-derive.d.ts.map +1 -0
- package/dist/bridge/src/registry.d.ts +19 -7
- package/dist/bridge/src/registry.d.ts.map +1 -1
- package/dist/bridge/src/runtime.d.ts.map +1 -1
- package/dist/bridge/src/types.d.ts +79 -60
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/bridge/src/validation.d.ts +2 -3
- package/dist/bridge/src/validation.d.ts.map +1 -1
- package/dist/{chunk-ZEXYTJ6Y.js → chunk-2GF42G2J.js} +6 -6
- package/dist/{chunk-ZEXYTJ6Y.js.map → chunk-2GF42G2J.js.map} +1 -1
- package/dist/{chunk-WWGU3REE.js → chunk-2K7NURDN.js} +7 -7
- package/dist/{chunk-WWGU3REE.js.map → chunk-2K7NURDN.js.map} +1 -1
- package/dist/{chunk-TCHEW3T2.js → chunk-2RO6N7DN.js} +6 -6
- package/dist/{chunk-TCHEW3T2.js.map → chunk-2RO6N7DN.js.map} +1 -1
- package/dist/{chunk-HSRHO7SK.js → chunk-3VSRJE3M.js} +155 -143
- package/dist/chunk-3VSRJE3M.js.map +1 -0
- package/dist/{chunk-T3YLZQS4.js → chunk-45LLHKQ2.js} +24 -3
- package/dist/chunk-45LLHKQ2.js.map +1 -0
- package/dist/chunk-5DQWB5TW.js +843 -0
- package/dist/chunk-5DQWB5TW.js.map +1 -0
- package/dist/{chunk-JMYOJ3PA.js → chunk-5HT5M5HX.js} +3 -3
- package/dist/{chunk-JMYOJ3PA.js.map → chunk-5HT5M5HX.js.map} +1 -1
- package/dist/{chunk-VN7DELUT.js → chunk-6AMTSRRO.js} +4 -4
- package/dist/{chunk-VN7DELUT.js.map → chunk-6AMTSRRO.js.map} +1 -1
- package/dist/{chunk-MX6TGDZ7.js → chunk-6DI4NTZN.js} +5 -5
- package/dist/{chunk-MX6TGDZ7.js.map → chunk-6DI4NTZN.js.map} +1 -1
- package/dist/{chunk-FFE7YLYO.js → chunk-AN7E2IL5.js} +7 -7
- package/dist/chunk-AN7E2IL5.js.map +1 -0
- package/dist/{chunk-A3HTL7XV.js → chunk-APDN5LW4.js} +3 -3
- package/dist/{chunk-A3HTL7XV.js.map → chunk-APDN5LW4.js.map} +1 -1
- package/dist/{chunk-FACPWN6P.js → chunk-ASU5IJZS.js} +9 -12
- package/dist/chunk-ASU5IJZS.js.map +1 -0
- package/dist/{chunk-J3IXRPZB.js → chunk-BTMDSMXF.js} +10 -10
- package/dist/{chunk-J3IXRPZB.js.map → chunk-BTMDSMXF.js.map} +1 -1
- package/dist/chunk-CTBUPYOQ.js +500 -0
- package/dist/chunk-CTBUPYOQ.js.map +1 -0
- package/dist/{chunk-K6VZQNTR.js → chunk-DKCFWSVW.js} +3 -3
- package/dist/{chunk-K6VZQNTR.js.map → chunk-DKCFWSVW.js.map} +1 -1
- package/dist/{chunk-MQASB52N.js → chunk-FEFTOV2Y.js} +3 -3
- package/dist/{chunk-MQASB52N.js.map → chunk-FEFTOV2Y.js.map} +1 -1
- package/dist/{chunk-XMULHVKX.js → chunk-FGTYTU6Q.js} +17 -15
- package/dist/chunk-FGTYTU6Q.js.map +1 -0
- package/dist/{chunk-WJVBJAM5.js → chunk-HHC2T7BM.js} +7 -7
- package/dist/{chunk-WJVBJAM5.js.map → chunk-HHC2T7BM.js.map} +1 -1
- package/dist/chunk-ILG4BXYE.js +936 -0
- package/dist/chunk-ILG4BXYE.js.map +1 -0
- package/dist/{chunk-E7HKNQTH.js → chunk-JXCUUZA3.js} +3 -4
- package/dist/chunk-JXCUUZA3.js.map +1 -0
- package/dist/{chunk-MBARHWMZ.js → chunk-K27T47OO.js} +79 -53
- package/dist/chunk-K27T47OO.js.map +1 -0
- package/dist/chunk-KSIRR5PL.js +142 -0
- package/dist/chunk-KSIRR5PL.js.map +1 -0
- package/dist/{chunk-SIREWRZE.js → chunk-KW7YIRYL.js} +3 -3
- package/dist/{chunk-SIREWRZE.js.map → chunk-KW7YIRYL.js.map} +1 -1
- package/dist/{chunk-3U3ZKYR7.js → chunk-LPF24MZA.js} +139 -29
- package/dist/chunk-LPF24MZA.js.map +1 -0
- package/dist/chunk-M2F5UXCX.js +187 -0
- package/dist/chunk-M2F5UXCX.js.map +1 -0
- package/dist/{chunk-DZ4UZOFB.js → chunk-M5H4DWIA.js} +3 -3
- package/dist/{chunk-DZ4UZOFB.js.map → chunk-M5H4DWIA.js.map} +1 -1
- package/dist/{chunk-PHBYB4XT.js → chunk-MLDJHV2U.js} +4 -8
- package/dist/chunk-MLDJHV2U.js.map +1 -0
- package/dist/{chunk-773WLEXL.js → chunk-MVBK4JUK.js} +3 -3
- package/dist/{chunk-773WLEXL.js.map → chunk-MVBK4JUK.js.map} +1 -1
- package/dist/{chunk-AN6NAFRT.js → chunk-N7B3LZ7V.js} +31 -6
- package/dist/chunk-N7B3LZ7V.js.map +1 -0
- package/dist/{chunk-EB72L5ZL.js → chunk-ORZBDXNS.js} +18 -30
- package/dist/chunk-ORZBDXNS.js.map +1 -0
- package/dist/{chunk-6H6HLMWG.js → chunk-OXTPH6HT.js} +3 -3
- package/dist/{chunk-6H6HLMWG.js.map → chunk-OXTPH6HT.js.map} +1 -1
- package/dist/{chunk-QSPCI4W2.js → chunk-PI244HAH.js} +175 -178
- package/dist/chunk-PI244HAH.js.map +1 -0
- package/dist/{chunk-NW65H5EV.js → chunk-PTETBRRC.js} +3 -3
- package/dist/{chunk-NW65H5EV.js.map → chunk-PTETBRRC.js.map} +1 -1
- package/dist/{chunk-UL4LD7KD.js → chunk-QQL3ET3J.js} +3 -3
- package/dist/{chunk-UL4LD7KD.js.map → chunk-QQL3ET3J.js.map} +1 -1
- package/dist/{chunk-GURXUF2J.js → chunk-R2GE2NXM.js} +95 -80
- package/dist/chunk-R2GE2NXM.js.map +1 -0
- package/dist/{chunk-IB4XKQMQ.js → chunk-REILIKVM.js} +3 -3
- package/dist/{chunk-IB4XKQMQ.js.map → chunk-REILIKVM.js.map} +1 -1
- package/dist/{chunk-3NCGSSCU.js → chunk-WLFRA5RM.js} +47 -45
- package/dist/chunk-WLFRA5RM.js.map +1 -0
- package/dist/{chunk-2BK4N3FS.js → chunk-WO65FA7W.js} +2 -7
- package/dist/chunk-WO65FA7W.js.map +1 -0
- package/dist/{chunk-72DG6GSB.js → chunk-YS4XBN7O.js} +4 -4
- package/dist/{chunk-72DG6GSB.js.map → chunk-YS4XBN7O.js.map} +1 -1
- package/dist/chunk-YSJKLJD4.js +32 -0
- package/dist/chunk-YSJKLJD4.js.map +1 -0
- package/dist/cli/index.js +765 -334
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/config.d.ts +17 -6
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-legacy-entry.d.ts +46 -0
- package/dist/cli/src/commands/migrate-legacy-entry.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-providers.d.ts +93 -0
- package/dist/cli/src/commands/migrate-providers.d.ts.map +1 -0
- package/dist/cli/src/commands/providers.d.ts +89 -0
- package/dist/cli/src/commands/providers.d.ts.map +1 -0
- package/dist/cli/src/commands/run.d.ts +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/setup.d.ts +46 -6
- package/dist/cli/src/setup.d.ts.map +1 -1
- package/dist/connectors/config.js +6 -4
- package/dist/connectors/index.js +15 -12
- package/dist/core/index.js +5 -3
- package/dist/core/provider-registry-credentials.d.ts +2 -0
- package/dist/core/provider-registry-credentials.js +5 -0
- package/dist/core/provider-registry-credentials.js.map +1 -0
- package/dist/core/provider-registry.d.ts +2 -0
- package/dist/core/provider-registry.js +4 -0
- package/dist/core/provider-registry.js.map +1 -0
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/index.d.ts +11 -4
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/process-alive.d.ts +28 -0
- package/dist/core/src/process-alive.d.ts.map +1 -0
- package/dist/core/src/provider-registry-credentials.d.ts +50 -0
- package/dist/core/src/provider-registry-credentials.d.ts.map +1 -0
- package/dist/core/src/provider-registry-files.d.ts +97 -0
- package/dist/core/src/provider-registry-files.d.ts.map +1 -0
- package/dist/core/src/provider-registry.d.ts +450 -0
- package/dist/core/src/provider-registry.d.ts.map +1 -0
- package/dist/core/src/settings.d.ts +18 -78
- package/dist/core/src/settings.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +31 -47
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
- package/dist/core/workspace-config.js +1 -1
- package/dist/deploy/index.js +9 -16
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/src/targets/local.d.ts.map +1 -1
- package/dist/deploy/src/targets/nix.d.ts.map +1 -1
- package/dist/deploy/src/targets/process-handle.d.ts +0 -2
- package/dist/deploy/src/targets/process-handle.d.ts.map +1 -1
- package/dist/discovery/index.js +2 -2
- package/dist/{ensure-sources-GEJGBQIP.js → ensure-sources-B3VWHD5M.js} +14 -12
- package/dist/ensure-sources-B3VWHD5M.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +15 -12
- package/dist/factory-assets/connectors/deploy.js +15 -12
- package/dist/factory-assets/connectors/devserver/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/devserver.js +15 -12
- package/dist/factory-assets/connectors/flow/adapter.js +15 -12
- package/dist/factory-assets/connectors/flow/engine.js +6 -4
- package/dist/factory-assets/connectors/flow/index.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.d.ts +0 -3
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +16 -13
- package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts +31 -28
- package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow.js +15 -12
- package/dist/factory-assets/connectors/git.js +15 -12
- package/dist/factory-assets/connectors/gmail.js +15 -12
- package/dist/factory-assets/connectors/googledrive.js +15 -12
- package/dist/factory-assets/connectors/local.js +15 -12
- package/dist/factory-assets/connectors/mattermost.js +15 -12
- package/dist/factory-assets/connectors/memory.js +15 -12
- package/dist/factory-assets/connectors/minio.js +15 -12
- package/dist/factory-assets/connectors/postgres.js +15 -12
- package/dist/factory-assets/connectors/s3.js +15 -12
- package/dist/factory-assets/connectors/sharepoint.js +15 -12
- package/dist/factory-assets/connectors/sqlite.js +15 -12
- package/dist/factory-assets/connectors/static-server.js +15 -12
- package/dist/factory-assets/connectors/tunnel.js +15 -12
- package/dist/factory-assets/connectors/webdav.js +15 -12
- package/dist/factory-assets/connectors/xstate-store.js +15 -12
- package/dist/factory-assets/connectors/xstate.js +15 -12
- package/dist/{flows-MI2VM5JZ.js → flows-KIQH2VGA.js} +9 -7
- package/dist/{flows-MI2VM5JZ.js.map → flows-KIQH2VGA.js.map} +1 -1
- package/dist/{helpers-DXZOHX25.js → helpers-72W3NZ2L.js} +14 -12
- package/dist/{helpers-DXZOHX25.js.map → helpers-72W3NZ2L.js.map} +1 -1
- package/dist/library/index.js +8 -6
- package/dist/library/install.js +5 -3
- package/dist/{library-publish-CUPDG5NI.js → library-publish-YPHKEA6L.js} +18 -16
- package/dist/library-publish-YPHKEA6L.js.map +1 -0
- package/dist/{open-library-32XAI2LH.js → open-library-7OIUAGAH.js} +16 -14
- package/dist/{open-library-32XAI2LH.js.map → open-library-7OIUAGAH.js.map} +1 -1
- package/dist/paths-XLSP5K6C.js +18 -0
- package/dist/{paths-CZEH643M.js.map → paths-XLSP5K6C.js.map} +1 -1
- package/dist/plugin-registry/src/targets.d.ts +16 -2
- package/dist/plugin-registry/src/targets.d.ts.map +1 -1
- package/dist/{plugin-store-QJNBPIQK.js → plugin-store-V5BMOYGS.js} +7 -5
- package/dist/plugin-store-V5BMOYGS.js.map +1 -0
- package/dist/{project-RRHUCVXW.js → project-KNAZV4B3.js} +15 -13
- package/dist/{project-RRHUCVXW.js.map → project-KNAZV4B3.js.map} +1 -1
- package/dist/resolver/index.js +5 -3
- package/dist/runner/index.js +25 -22
- package/dist/runner/src/agent.d.ts +0 -2
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/runner/src/codex-init.d.ts.map +1 -1
- package/dist/runner/src/codex-resource-tools.d.ts.map +1 -1
- package/dist/runner/src/managed-codex-bootstrap.d.ts.map +1 -1
- package/dist/runner/src/resources.d.ts +1 -2
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +31 -35
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/session.d.ts +0 -2
- package/dist/runner/src/session.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +11 -9
- package/dist/sdk/bridge.js +12 -9
- package/dist/sdk/core.js +5 -3
- package/dist/sdk/flow.js +6 -4
- package/dist/sdk/index.js +25 -22
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +5 -3
- package/dist/sdk/runner.js +25 -22
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/session/index.js +2 -2
- package/dist/setup-TG4KECRQ.js +435 -0
- package/dist/setup-TG4KECRQ.js.map +1 -0
- package/dist/{skills-IE3IWWB7.js → skills-KHBYF6AU.js} +7 -5
- package/dist/{skills-IE3IWWB7.js.map → skills-KHBYF6AU.js.map} +1 -1
- package/dist/{source-RHQLCTWA.js → source-7AFRUD3U.js} +17 -15
- package/dist/{source-RHQLCTWA.js.map → source-7AFRUD3U.js.map} +1 -1
- package/dist/{source-manifest-publish-DXMCSKU7.js → source-manifest-publish-JWOT7O3A.js} +19 -17
- package/dist/source-manifest-publish-JWOT7O3A.js.map +1 -0
- package/dist/tui/index.js +25 -23
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/repl.d.ts +0 -2
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/lifecycle.d.ts +35 -10
- package/dist/types/src/lifecycle.d.ts.map +1 -1
- package/dist/types/src/manifests/agent.d.ts +116 -22
- package/dist/types/src/manifests/agent.d.ts.map +1 -1
- package/dist/types/src/manifests/index.d.ts +2 -2
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +5 -5
- package/dist/types/src/runtime.d.ts +51 -5
- package/dist/types/src/runtime.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +18 -2
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/validator-P5ESKTW5.js +5 -0
- package/dist/{validator-RN64BKFW.js.map → validator-P5ESKTW5.js.map} +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +11 -9
- package/dist/workspace-plugin/adapters/omp.js +11 -11
- package/dist/workspace-plugin/adapters/omp.js.map +1 -1
- package/dist/workspace-plugin/index.js +1 -1
- package/dist/workspace-plugin/src/plugin.d.ts +1 -4
- package/dist/workspace-plugin/src/plugin.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/validator.d.ts +4 -4
- package/dist/workspace-plugin/src/tools/validator.d.ts.map +1 -1
- package/package.json +13 -1
- package/dist/asset-feeds-QF7LGRUX.js.map +0 -1
- package/dist/bridge/src/provider-endpoints.d.ts +0 -55
- package/dist/bridge/src/provider-endpoints.d.ts.map +0 -1
- package/dist/chunk-2BK4N3FS.js.map +0 -1
- package/dist/chunk-3NCGSSCU.js.map +0 -1
- package/dist/chunk-3U3ZKYR7.js.map +0 -1
- package/dist/chunk-AN6NAFRT.js.map +0 -1
- package/dist/chunk-AQW4BWNR.js +0 -324
- package/dist/chunk-AQW4BWNR.js.map +0 -1
- package/dist/chunk-E7HKNQTH.js.map +0 -1
- package/dist/chunk-EB72L5ZL.js.map +0 -1
- package/dist/chunk-FACPWN6P.js.map +0 -1
- package/dist/chunk-FFE7YLYO.js.map +0 -1
- package/dist/chunk-FYIHH56K.js +0 -110
- package/dist/chunk-FYIHH56K.js.map +0 -1
- package/dist/chunk-GURXUF2J.js.map +0 -1
- package/dist/chunk-HSRHO7SK.js.map +0 -1
- package/dist/chunk-MBARHWMZ.js.map +0 -1
- package/dist/chunk-PHBYB4XT.js.map +0 -1
- package/dist/chunk-QSPCI4W2.js.map +0 -1
- package/dist/chunk-T3YLZQS4.js.map +0 -1
- package/dist/chunk-XMULHVKX.js.map +0 -1
- package/dist/ensure-sources-GEJGBQIP.js.map +0 -1
- package/dist/library-publish-CUPDG5NI.js.map +0 -1
- package/dist/paths-CZEH643M.js +0 -16
- package/dist/plugin-store-QJNBPIQK.js.map +0 -1
- package/dist/runner/src/cloud-bundle.d.ts +0 -36
- package/dist/runner/src/cloud-bundle.d.ts.map +0 -1
- package/dist/setup-CIRH5BYB.js +0 -517
- package/dist/setup-CIRH5BYB.js.map +0 -1
- package/dist/source-manifest-publish-DXMCSKU7.js.map +0 -1
- package/dist/validator-RN64BKFW.js +0 -5
|
@@ -1,80 +1,293 @@
|
|
|
1
1
|
import { classifyGenericErrorMessage } from '../../chunk-GAH4YRCI.js';
|
|
2
|
-
import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger } from '../../chunk-
|
|
2
|
+
import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger, registryDriverConfig, entryCredentialValue, providerCredentialEnvName } from '../../chunk-5DQWB5TW.js';
|
|
3
3
|
import '../../chunk-6E6PKKAD.js';
|
|
4
4
|
import '../../chunk-FTG7CRFD.js';
|
|
5
|
+
import '../../chunk-KSIRR5PL.js';
|
|
6
|
+
import { AI_PROVIDER_SURFACES, registryEntries, isEntryEnabled, parseModelRef, resolveEntryBaseUrl } from '../../chunk-ILG4BXYE.js';
|
|
5
7
|
import '../../chunk-W4IPN3DD.js';
|
|
6
8
|
import '../../chunk-NSBPE2FW.js';
|
|
7
|
-
import { spawn
|
|
9
|
+
import { spawn } from 'child_process';
|
|
8
10
|
import fs from 'fs/promises';
|
|
9
11
|
import path from 'path';
|
|
10
12
|
import { createInterface } from 'readline';
|
|
11
13
|
import * as z from 'zod';
|
|
14
|
+
import { createHash } from 'crypto';
|
|
15
|
+
import os from 'os';
|
|
16
|
+
import { parse, stringify } from 'yaml';
|
|
12
17
|
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"ANTHROPIC_FOUNDRY_API_KEY",
|
|
22
|
-
"FOUNDRY_BASE_URL",
|
|
23
|
-
"CLAUDE_CODE_USE_FOUNDRY",
|
|
24
|
-
"CLAUDE_CODE_CLIENT_CERT",
|
|
25
|
-
"CLAUDE_CODE_CLIENT_KEY",
|
|
26
|
-
"NODE_EXTRA_CA_CERTS",
|
|
27
|
-
// ── Other first-party model providers ─────────────────────────────────────
|
|
28
|
-
"OPENAI_API_KEY",
|
|
29
|
-
"OPENAI_BASE_URL",
|
|
30
|
-
"GEMINI_API_KEY",
|
|
31
|
-
"COPILOT_GITHUB_TOKEN",
|
|
32
|
-
"AZURE_OPENAI_API_KEY",
|
|
33
|
-
"GROQ_API_KEY",
|
|
34
|
-
"CEREBRAS_API_KEY",
|
|
35
|
-
"XAI_API_KEY",
|
|
36
|
-
"MISTRAL_API_KEY",
|
|
37
|
-
"ZAI_API_KEY",
|
|
38
|
-
"MINIMAX_API_KEY",
|
|
39
|
-
"DEEPSEEK_API_KEY",
|
|
40
|
-
// ── Aggregators / gateways ────────────────────────────────────────────────
|
|
41
|
-
"OPENROUTER_API_KEY",
|
|
42
|
-
"KILO_API_KEY",
|
|
43
|
-
"AI_GATEWAY_API_KEY",
|
|
44
|
-
"OPENCODE_API_KEY",
|
|
45
|
-
"CURSOR_ACCESS_TOKEN",
|
|
46
|
-
"CLINE_API_KEY",
|
|
47
|
-
"WAFER_SERVERLESS_API_KEY",
|
|
48
|
-
"YOLO_AUTO_API_KEY",
|
|
49
|
-
"ABLITERATION_API_KEY",
|
|
50
|
-
"UMANS_AI_CODING_PLAN_API_KEY",
|
|
51
|
-
"UMANS_WEBSEARCH_PROVIDER",
|
|
52
|
-
// ── Cloud model planes ────────────────────────────────────────────────────
|
|
53
|
-
"AWS_PROFILE",
|
|
54
|
-
"AWS_ACCESS_KEY_ID",
|
|
55
|
-
"AWS_SECRET_ACCESS_KEY",
|
|
56
|
-
"AWS_SESSION_TOKEN",
|
|
57
|
-
"AWS_REGION",
|
|
58
|
-
"AWS_DEFAULT_REGION",
|
|
59
|
-
"GOOGLE_CLOUD_PROJECT",
|
|
60
|
-
"GOOGLE_CLOUD_LOCATION",
|
|
61
|
-
"GOOGLE_APPLICATION_CREDENTIALS",
|
|
62
|
-
// ── Search / tool backends ────────────────────────────────────────────────
|
|
63
|
-
"EXA_API_KEY",
|
|
64
|
-
"BRAVE_API_KEY",
|
|
65
|
-
"PERPLEXITY_API_KEY",
|
|
66
|
-
"PERPLEXITY_COOKIES",
|
|
67
|
-
"TAVILY_API_KEY",
|
|
68
|
-
"TINYFISH_API_KEY",
|
|
69
|
-
"FIRECRAWL_API_KEY",
|
|
70
|
-
"ANTHROPIC_SEARCH_API_KEY",
|
|
71
|
-
"ANTHROPIC_SEARCH_BASE_URL",
|
|
72
|
-
// ── omp's own configuration ───────────────────────────────────────────────
|
|
73
|
-
"OMP_PROFILE"
|
|
18
|
+
var OMP_API_VALUES = [...AI_PROVIDER_SURFACES, "google-gemini-cli"];
|
|
19
|
+
var OMP_DISCOVERY_TYPES = [
|
|
20
|
+
"ollama",
|
|
21
|
+
"llama.cpp",
|
|
22
|
+
"lm-studio",
|
|
23
|
+
"openai-models-list",
|
|
24
|
+
"proxy",
|
|
25
|
+
"litellm"
|
|
74
26
|
];
|
|
27
|
+
var OMP_MODELS_FILENAME = "models.yml";
|
|
28
|
+
var OMP_CONFIG_FILENAME = "config.yml";
|
|
29
|
+
var OWNED_AGENT_DIR_FILES = {
|
|
30
|
+
"models.yml": true,
|
|
31
|
+
"models.yaml": true,
|
|
32
|
+
"models.json": true,
|
|
33
|
+
"config.yml": true,
|
|
34
|
+
"config.yaml": true,
|
|
35
|
+
"config.yml.lock": true,
|
|
36
|
+
"config.yaml.lock": true,
|
|
37
|
+
"settings.json": true
|
|
38
|
+
};
|
|
39
|
+
function entryModelIds(entry) {
|
|
40
|
+
const logical = /* @__PURE__ */ new Set([
|
|
41
|
+
...Object.keys(entry.model_map ?? {}),
|
|
42
|
+
...Object.keys(entry.capabilities ?? {})
|
|
43
|
+
]);
|
|
44
|
+
const seen = /* @__PURE__ */ new Set();
|
|
45
|
+
const out = [];
|
|
46
|
+
for (const id of logical) {
|
|
47
|
+
const providerSide = entry.model_map?.[id] ?? id;
|
|
48
|
+
if (seen.has(providerSide)) continue;
|
|
49
|
+
seen.add(providerSide);
|
|
50
|
+
out.push([id, providerSide]);
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function renderProvider(id, entry, warnings) {
|
|
55
|
+
const baseUrl = resolveEntryBaseUrl(entry);
|
|
56
|
+
if (!baseUrl) {
|
|
57
|
+
warnings.push(
|
|
58
|
+
`provider '${id}' has no resolvable base_url (missing transport params?) \u2014 omitted from models.yml`
|
|
59
|
+
);
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
const surface = entry.surface;
|
|
63
|
+
if (surface && !OMP_API_VALUES.includes(surface)) {
|
|
64
|
+
warnings.push(
|
|
65
|
+
`provider '${id}' has surface '${surface}', which omp's api enum does not accept`
|
|
66
|
+
);
|
|
67
|
+
return void 0;
|
|
68
|
+
}
|
|
69
|
+
const block = { baseUrl };
|
|
70
|
+
if (surface) block.api = surface;
|
|
71
|
+
const kind = entry.credential?.kind ?? "none";
|
|
72
|
+
if (kind === "none") {
|
|
73
|
+
block.auth = "none";
|
|
74
|
+
} else if (kind === "sigv4" || kind === "google_adc" || kind === "azure_entra") {
|
|
75
|
+
block.auth = "none";
|
|
76
|
+
} else {
|
|
77
|
+
block.apiKey = providerCredentialEnvName(id);
|
|
78
|
+
if (kind === "bearer" || kind === "oauth") block.authHeader = true;
|
|
79
|
+
}
|
|
80
|
+
const headers = { ...entry.headers };
|
|
81
|
+
if (entry.query_params && Object.keys(entry.query_params).length > 0) {
|
|
82
|
+
if (surface === "bedrock-converse-stream") {
|
|
83
|
+
const search = new URLSearchParams(entry.query_params).toString();
|
|
84
|
+
block.baseUrl = `${baseUrl}${baseUrl.includes("?") ? "&" : "?"}${search}`;
|
|
85
|
+
} else {
|
|
86
|
+
warnings.push(
|
|
87
|
+
`provider '${id}' declares query_params, which omp's models.yml has no slot for on surface '${surface ?? "unset"}' \u2014 they were dropped`
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (Object.keys(headers).length > 0) block.headers = headers;
|
|
92
|
+
const discoveryType = entry.discovery?.type;
|
|
93
|
+
if (discoveryType) {
|
|
94
|
+
if (!OMP_DISCOVERY_TYPES.includes(discoveryType)) {
|
|
95
|
+
warnings.push(
|
|
96
|
+
`provider '${id}' declares discovery '${discoveryType}', which omp does not implement \u2014 models come from model_map only`
|
|
97
|
+
);
|
|
98
|
+
} else if (!surface && discoveryType !== "proxy") {
|
|
99
|
+
warnings.push(
|
|
100
|
+
`provider '${id}' declares discovery '${discoveryType}' but no surface \u2014 omp requires provider-level api for every discovery type but 'proxy'`
|
|
101
|
+
);
|
|
102
|
+
} else {
|
|
103
|
+
block.discovery = { type: discoveryType };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const models = [];
|
|
107
|
+
for (const [logical, providerSide] of entryModelIds(entry)) {
|
|
108
|
+
const model = { id: providerSide };
|
|
109
|
+
if (logical !== providerSide) model.name = logical;
|
|
110
|
+
const caps = entry.capabilities?.[logical];
|
|
111
|
+
if (caps?.context_window !== void 0) model.contextWindow = caps.context_window;
|
|
112
|
+
if (caps?.images !== void 0) model.input = caps.images ? ["text", "image"] : ["text"];
|
|
113
|
+
if (caps?.tools !== void 0) model.supportsTools = caps.tools;
|
|
114
|
+
models.push(model);
|
|
115
|
+
}
|
|
116
|
+
if (models.length > 0) {
|
|
117
|
+
if (!surface) {
|
|
118
|
+
warnings.push(
|
|
119
|
+
`provider '${id}' declares models but no surface \u2014 omp requires api at provider or model level`
|
|
120
|
+
);
|
|
121
|
+
return void 0;
|
|
122
|
+
}
|
|
123
|
+
block.models = models;
|
|
124
|
+
} else if (!block.discovery) {
|
|
125
|
+
warnings.push(
|
|
126
|
+
`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`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
return block;
|
|
130
|
+
}
|
|
131
|
+
function renderModelRoles(registry, roles, modelRef, warnings) {
|
|
132
|
+
const out = {};
|
|
133
|
+
for (const [role, selector] of Object.entries(roles ?? {})) {
|
|
134
|
+
const trimmed = selector.trim();
|
|
135
|
+
if (!trimmed) continue;
|
|
136
|
+
const ref = parseModelRef(trimmed, registry);
|
|
137
|
+
if (!ref?.providerModelId) {
|
|
138
|
+
warnings.push(
|
|
139
|
+
`role '${role}' ('${selector}') resolves to no model in this registry \u2014 dropped`
|
|
140
|
+
);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
out[role] = `${ref.providerId}/${ref.providerModelId}`;
|
|
144
|
+
}
|
|
145
|
+
if (out.default === void 0 && modelRef) {
|
|
146
|
+
const ref = parseModelRef(modelRef, registry, roles);
|
|
147
|
+
if (ref?.providerModelId) out.default = `${ref.providerId}/${ref.providerModelId}`;
|
|
148
|
+
}
|
|
149
|
+
return out;
|
|
150
|
+
}
|
|
151
|
+
function renderOmpRegistry(registry, options = {}) {
|
|
152
|
+
const warnings = [];
|
|
153
|
+
const providers = {};
|
|
154
|
+
const providerIds = [];
|
|
155
|
+
const credentialEnv = {};
|
|
156
|
+
for (const [id, entry] of registryEntries(registry)) {
|
|
157
|
+
if (entry.kind !== "llm" && entry.kind !== "embed") continue;
|
|
158
|
+
if (!isEntryEnabled(entry)) continue;
|
|
159
|
+
const block = renderProvider(id, entry, warnings);
|
|
160
|
+
if (!block) continue;
|
|
161
|
+
providers[id] = block;
|
|
162
|
+
providerIds.push(id);
|
|
163
|
+
const secret = entryCredentialValue(id, entry, options);
|
|
164
|
+
if (secret) credentialEnv[providerCredentialEnvName(id)] = secret;
|
|
165
|
+
}
|
|
166
|
+
const modelRoles = renderModelRoles(registry, options.roles, options.modelRef, warnings);
|
|
167
|
+
const settings = { ...options.baseSettings };
|
|
168
|
+
if (Object.keys(modelRoles).length > 0) settings.modelRoles = modelRoles;
|
|
169
|
+
return {
|
|
170
|
+
modelsYml: stringify({ providers }),
|
|
171
|
+
configYml: stringify(settings),
|
|
172
|
+
credentialEnv,
|
|
173
|
+
providerIds,
|
|
174
|
+
modelRoles,
|
|
175
|
+
warnings
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function registryModelEntries(registry) {
|
|
179
|
+
if (!registry) return [];
|
|
180
|
+
const out = [];
|
|
181
|
+
for (const [id, entry] of registryEntries(registry)) {
|
|
182
|
+
if (entry.kind !== "llm" && entry.kind !== "embed") continue;
|
|
183
|
+
if (!isEntryEnabled(entry)) continue;
|
|
184
|
+
const label = entry.label ?? id;
|
|
185
|
+
for (const [logical, providerSide] of entryModelIds(entry)) {
|
|
186
|
+
out.push({ id: `${id}/${providerSide}`, name: `${label} ${logical}` });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return out;
|
|
190
|
+
}
|
|
191
|
+
async function planOmpAgentDir(input) {
|
|
192
|
+
const options = input.options;
|
|
193
|
+
const key = input.sessionId?.trim() || createHash("sha256").update(path.resolve(input.cwd)).digest("hex").slice(0, 16);
|
|
194
|
+
const agentDir = options?.agentHome ?? path.join(input.tmpDir ?? os.tmpdir(), "skaile-omp-agent", key);
|
|
195
|
+
if (options?.seedUserAgentDir === false) return { agentDir };
|
|
196
|
+
const seedFrom = options?.userAgentDir ?? path.join(input.homeDir ?? os.homedir(), ".omp", "agent");
|
|
197
|
+
if (path.resolve(seedFrom) === path.resolve(agentDir)) return { agentDir };
|
|
198
|
+
try {
|
|
199
|
+
if (!(await fs.stat(seedFrom)).isDirectory()) return { agentDir };
|
|
200
|
+
} catch {
|
|
201
|
+
return { agentDir };
|
|
202
|
+
}
|
|
203
|
+
return { agentDir, seedFrom };
|
|
204
|
+
}
|
|
205
|
+
async function removeEntry(target) {
|
|
206
|
+
let stat;
|
|
207
|
+
try {
|
|
208
|
+
stat = await fs.lstat(target);
|
|
209
|
+
} catch {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (stat.isSymbolicLink() || stat.isFile()) {
|
|
213
|
+
await fs.unlink(target);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
await fs.rm(target, { recursive: true, force: true });
|
|
217
|
+
}
|
|
218
|
+
async function linkInto(dir, sourceDir, skip) {
|
|
219
|
+
let names;
|
|
220
|
+
try {
|
|
221
|
+
names = await fs.readdir(sourceDir);
|
|
222
|
+
} catch {
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
225
|
+
const linked = [];
|
|
226
|
+
for (const name of names) {
|
|
227
|
+
if (skip[name]) continue;
|
|
228
|
+
const target = path.join(dir, name);
|
|
229
|
+
await removeEntry(target);
|
|
230
|
+
await fs.symlink(path.join(sourceDir, name), target);
|
|
231
|
+
linked.push(name);
|
|
232
|
+
}
|
|
233
|
+
return linked;
|
|
234
|
+
}
|
|
235
|
+
async function readSeededSettings(seedFrom) {
|
|
236
|
+
for (const name of ["config.yml", "config.yaml"]) {
|
|
237
|
+
let raw;
|
|
238
|
+
try {
|
|
239
|
+
raw = await fs.readFile(path.join(seedFrom, name), "utf-8");
|
|
240
|
+
} catch {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
const parsed = parse(raw);
|
|
244
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
245
|
+
return parsed;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return {};
|
|
249
|
+
}
|
|
250
|
+
async function materializeOmpAgentDir(agentDir, registry, options = {}) {
|
|
251
|
+
await fs.mkdir(agentDir, { recursive: true });
|
|
252
|
+
const seeded = options.seedFrom ? await linkInto(agentDir, options.seedFrom, OWNED_AGENT_DIR_FILES) : [];
|
|
253
|
+
const identity = options.identityDir ? await linkInto(agentDir, options.identityDir, OWNED_AGENT_DIR_FILES) : [];
|
|
254
|
+
const baseSettings = options.baseSettings ?? (options.seedFrom ? await readSeededSettings(options.seedFrom) : void 0);
|
|
255
|
+
const render = renderOmpRegistry(registry, { ...options, baseSettings });
|
|
256
|
+
await fs.writeFile(path.join(agentDir, OMP_MODELS_FILENAME), render.modelsYml, "utf-8");
|
|
257
|
+
await fs.writeFile(path.join(agentDir, OMP_CONFIG_FILENAME), render.configYml, "utf-8");
|
|
258
|
+
return { ...render, agentDir, seeded, identity };
|
|
259
|
+
}
|
|
260
|
+
async function materializeOmpProviders(config) {
|
|
261
|
+
const registry = config.registry;
|
|
262
|
+
if (!registry) return void 0;
|
|
263
|
+
const selectable = registryEntries(registry).some(
|
|
264
|
+
([, entry]) => (entry.kind === "llm" || entry.kind === "embed") && isEntryEnabled(entry)
|
|
265
|
+
);
|
|
266
|
+
if (!selectable) return void 0;
|
|
267
|
+
const plan = await planOmpAgentDir({
|
|
268
|
+
cwd: config.cwd,
|
|
269
|
+
...config.sessionId ? { sessionId: config.sessionId } : {},
|
|
270
|
+
...config.driverOptions?.omp ? { options: config.driverOptions.omp } : {}
|
|
271
|
+
});
|
|
272
|
+
const rendered = await materializeOmpAgentDir(plan.agentDir, registry, {
|
|
273
|
+
env: { ...process.env, ...config.env },
|
|
274
|
+
...plan.seedFrom ? { seedFrom: plan.seedFrom } : {},
|
|
275
|
+
...config.agentDir ? { identityDir: config.agentDir } : {},
|
|
276
|
+
...config.roles ? { roles: config.roles } : {},
|
|
277
|
+
...config.modelRef ? { modelRef: config.modelRef } : {}
|
|
278
|
+
});
|
|
279
|
+
const selected = config.modelRef ? parseModelRef(config.modelRef, registry, config.roles) : void 0;
|
|
280
|
+
return {
|
|
281
|
+
...rendered,
|
|
282
|
+
...selected?.providerModelId ? { modelArg: `${selected.providerId}/${selected.providerModelId}` } : {}
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// bridge/src/drivers/omp.ts
|
|
287
|
+
var OMP_BASE_ENV_KEYS = ["PATH", "HOME", "USER", "HOSTNAME", "SKAILE_SESSION_ID"];
|
|
75
288
|
function buildOmpChildEnv(parent) {
|
|
76
289
|
const out = {};
|
|
77
|
-
for (const key of
|
|
290
|
+
for (const key of OMP_BASE_ENV_KEYS) {
|
|
78
291
|
const v = parent[key];
|
|
79
292
|
if (typeof v === "string") out[key] = v;
|
|
80
293
|
}
|
|
@@ -205,10 +418,24 @@ var OmpDriver = class extends AgentDriver {
|
|
|
205
418
|
this.log.info("resuming OMP session", { sessionId: this.config.resumeSessionId });
|
|
206
419
|
args.push("--session", this.config.resumeSessionId);
|
|
207
420
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
421
|
+
const providers = await materializeOmpProviders(this.config);
|
|
422
|
+
if (providers) {
|
|
423
|
+
for (const warning of providers.warnings) this.log.warn("registry", { warning });
|
|
424
|
+
if (providers.providerIds.length === 0) {
|
|
425
|
+
this.log.error("registry rendered no omp providers", new Error("empty models.yml"), {
|
|
426
|
+
agentDir: providers.agentDir
|
|
427
|
+
});
|
|
428
|
+
} else {
|
|
429
|
+
this.log.info("rendered omp models.yml", {
|
|
430
|
+
agentDir: providers.agentDir,
|
|
431
|
+
providers: providers.providerIds,
|
|
432
|
+
modelRoles: providers.modelRoles,
|
|
433
|
+
seeded: providers.seeded.length
|
|
434
|
+
});
|
|
435
|
+
}
|
|
211
436
|
}
|
|
437
|
+
const modelArg = providers?.modelArg ?? this.config.model;
|
|
438
|
+
if (modelArg) args.push("--model", modelArg);
|
|
212
439
|
const toolArgs = buildOmpToolArgs(this.config.tools);
|
|
213
440
|
if (toolArgs.length > 0) {
|
|
214
441
|
this.log.info("applying tool restrictions", { args: toolArgs });
|
|
@@ -222,7 +449,10 @@ var OmpDriver = class extends AgentDriver {
|
|
|
222
449
|
args.push("--append-system-prompt", systemFile);
|
|
223
450
|
}
|
|
224
451
|
const env = this.config.env ? { ...this.config.env } : buildOmpChildEnv(process.env);
|
|
225
|
-
if (
|
|
452
|
+
if (providers) {
|
|
453
|
+
env.PI_CODING_AGENT_DIR = providers.agentDir;
|
|
454
|
+
Object.assign(env, providers.credentialEnv);
|
|
455
|
+
} else if (this.config.agentDir) {
|
|
226
456
|
env.PI_CODING_AGENT_DIR = this.config.agentDir;
|
|
227
457
|
}
|
|
228
458
|
if (this.config.sshKeyPath) {
|
|
@@ -543,33 +773,24 @@ var OmpDriver = class extends AgentDriver {
|
|
|
543
773
|
);
|
|
544
774
|
return { message: msg, category: generic.category, retryable: generic.retryable, hint };
|
|
545
775
|
}
|
|
776
|
+
/**
|
|
777
|
+
* The models this session can select.
|
|
778
|
+
*
|
|
779
|
+
* Answered entirely from the registry: the ids are exactly the
|
|
780
|
+
* `<providerId>/<modelId>` selectors rendered into `models.yml`, so a
|
|
781
|
+
* picker offers every enabled endpoint instead of whichever one the
|
|
782
|
+
* ambient binary happens to be authenticated for. A registry whose
|
|
783
|
+
* entries name no models yields no entries here — that gap is closed by
|
|
784
|
+
* giving the entry a `discovery:` block (`PROVIDER-CONFIG-PLAN.md` §1.1),
|
|
785
|
+
* not by asking the omp binary what it happens to know. omp's own catalog
|
|
786
|
+
* (`omp models --json`) answers a different question — every model omp
|
|
787
|
+
* knows across every provider, regardless of what this session's registry
|
|
788
|
+
* enables or has credentials for — and shelling out to an ambient binary
|
|
789
|
+
* from this code path is itself a liability: it can block indefinitely
|
|
790
|
+
* reading a prompt from stdin when run inside another interactive session.
|
|
791
|
+
*/
|
|
546
792
|
async listModels() {
|
|
547
|
-
return
|
|
548
|
-
execFile("omp", ["--list-models"], { timeout: 1e4 }, (err, stdout, stderr) => {
|
|
549
|
-
if (err) {
|
|
550
|
-
reject(new Error(`omp --list-models failed: ${stderr || err.message}`));
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
const models = [];
|
|
554
|
-
let inCanonical = false;
|
|
555
|
-
let headerSkipped = false;
|
|
556
|
-
for (const raw of stdout.split("\n")) {
|
|
557
|
-
const line = raw.trimEnd();
|
|
558
|
-
if (!inCanonical) {
|
|
559
|
-
if (line.startsWith("Canonical models")) inCanonical = true;
|
|
560
|
-
continue;
|
|
561
|
-
}
|
|
562
|
-
if (!headerSkipped) {
|
|
563
|
-
headerSkipped = true;
|
|
564
|
-
continue;
|
|
565
|
-
}
|
|
566
|
-
if (line === "" || !line.startsWith(" ") && line.endsWith("models")) break;
|
|
567
|
-
const canonical = line.split(/\s{2,}/)[0]?.trim();
|
|
568
|
-
if (canonical) models.push({ id: canonical, name: canonical });
|
|
569
|
-
}
|
|
570
|
-
resolve(models);
|
|
571
|
-
});
|
|
572
|
-
});
|
|
793
|
+
return registryModelEntries(this.config.registry);
|
|
573
794
|
}
|
|
574
795
|
cleanup() {
|
|
575
796
|
this.rl?.close();
|
|
@@ -587,9 +808,13 @@ var ompDriverTarget = {
|
|
|
587
808
|
// Drivers take AgentConfig; passthrough — full schema validation is out of scope.
|
|
588
809
|
configSchema: z.custom(() => true),
|
|
589
810
|
create: async (config, _ctx) => new OmpDriver(config),
|
|
590
|
-
listModels: async (
|
|
811
|
+
listModels: async (registry, options) => new OmpDriver({
|
|
812
|
+
cwd: process.cwd(),
|
|
813
|
+
sessionId: "model-list",
|
|
814
|
+
...registryDriverConfig(registry, options)
|
|
815
|
+
}).listModels()
|
|
591
816
|
};
|
|
592
817
|
|
|
593
|
-
export { OMP_BUILTIN_TOOLS, OMP_DEFAULT_TOOLS,
|
|
818
|
+
export { OMP_BUILTIN_TOOLS, OMP_DEFAULT_TOOLS, OmpDriver, buildOmpChildEnv, buildOmpToolArgs, ompDriverTarget };
|
|
594
819
|
//# sourceMappingURL=omp.js.map
|
|
595
820
|
//# sourceMappingURL=omp.js.map
|