@skaile/workspaces 3.27.0 → 4.0.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 +480 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-AJOUKX55.js → asset-feeds-OPG6SUXU.js} +11 -9
- package/dist/asset-feeds-OPG6SUXU.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/drivers/claude-sdk.js +102 -55
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +178 -22
- 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/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-GURXUF2J.js → chunk-3ZTQY276.js} +95 -80
- package/dist/chunk-3ZTQY276.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-UAEGKCE5.js → chunk-5IIHO2HI.js} +7 -7
- package/dist/{chunk-UAEGKCE5.js.map → chunk-5IIHO2HI.js.map} +1 -1
- package/dist/{chunk-HSRHO7SK.js → chunk-C3QLJTMB.js} +106 -150
- package/dist/chunk-C3QLJTMB.js.map +1 -0
- package/dist/chunk-CUU3AMGE.js +500 -0
- package/dist/chunk-CUU3AMGE.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-AEN2UFDN.js → chunk-DNGAA24M.js} +7 -7
- package/dist/{chunk-AEN2UFDN.js.map → chunk-DNGAA24M.js.map} +1 -1
- package/dist/{chunk-TCHEW3T2.js → chunk-EBHY23RZ.js} +6 -6
- package/dist/{chunk-TCHEW3T2.js.map → chunk-EBHY23RZ.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-FODAC4RE.js} +17 -15
- package/dist/chunk-FODAC4RE.js.map +1 -0
- package/dist/{chunk-6H6HLMWG.js → chunk-G2F3ZCPK.js} +3 -3
- package/dist/{chunk-6H6HLMWG.js.map → chunk-G2F3ZCPK.js.map} +1 -1
- package/dist/{chunk-YLL65VXQ.js → chunk-HO2FQ76C.js} +175 -178
- package/dist/chunk-HO2FQ76C.js.map +1 -0
- 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-K3YR33F6.js +187 -0
- package/dist/chunk-K3YR33F6.js.map +1 -0
- package/dist/{chunk-7P6ASOFL.js → chunk-KIQGTAJ5.js} +3 -3
- package/dist/{chunk-7P6ASOFL.js.map → chunk-KIQGTAJ5.js.map} +1 -1
- 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-LN2BQVRB.js} +139 -29
- package/dist/chunk-LN2BQVRB.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-JMYOJ3PA.js → chunk-MIP4IC3O.js} +3 -3
- package/dist/{chunk-JMYOJ3PA.js.map → chunk-MIP4IC3O.js.map} +1 -1
- package/dist/{chunk-O5JUZIVR.js → chunk-MJY2BO6N.js} +6 -6
- package/dist/{chunk-O5JUZIVR.js.map → chunk-MJY2BO6N.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-MX6TGDZ7.js → chunk-NBPL76HH.js} +5 -5
- package/dist/{chunk-MX6TGDZ7.js.map → chunk-NBPL76HH.js.map} +1 -1
- package/dist/{chunk-DY5GHUTC.js → chunk-NR6BPOW5.js} +2 -7
- package/dist/chunk-NR6BPOW5.js.map +1 -0
- package/dist/{chunk-F2GEM5B3.js → chunk-PCJF3XBH.js} +10 -10
- package/dist/{chunk-F2GEM5B3.js.map → chunk-PCJF3XBH.js.map} +1 -1
- 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-IB4XKQMQ.js → chunk-REILIKVM.js} +3 -3
- package/dist/{chunk-IB4XKQMQ.js.map → chunk-REILIKVM.js.map} +1 -1
- package/dist/{chunk-N27DSFA7.js → chunk-RM4C5AU3.js} +27 -21
- package/dist/chunk-RM4C5AU3.js.map +1 -0
- package/dist/chunk-SG4D2UOK.js +843 -0
- package/dist/chunk-SG4D2UOK.js.map +1 -0
- package/dist/{chunk-AU4TUVHW.js → chunk-T7RHDVSY.js} +4 -4
- package/dist/{chunk-AU4TUVHW.js.map → chunk-T7RHDVSY.js.map} +1 -1
- package/dist/{chunk-773WLEXL.js → chunk-UKWEJPZZ.js} +3 -3
- package/dist/{chunk-773WLEXL.js.map → chunk-UKWEJPZZ.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-FFE7YLYO.js → chunk-XEVWRSLS.js} +7 -7
- package/dist/chunk-XEVWRSLS.js.map +1 -0
- package/dist/{chunk-5UWAOYDN.js → chunk-Y6E62LFB.js} +9 -12
- package/dist/chunk-Y6E62LFB.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 +10 -4
- package/dist/core/src/index.d.ts.map +1 -1
- 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 +5 -3
- package/dist/deploy/index.js.map +1 -1
- package/dist/discovery/index.js +2 -2
- package/dist/{ensure-sources-DYGQNAJM.js → ensure-sources-QZAQ4SY2.js} +14 -12
- package/dist/ensure-sources-QZAQ4SY2.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.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-4EIENFNT.js} +9 -7
- package/dist/{flows-MI2VM5JZ.js.map → flows-4EIENFNT.js.map} +1 -1
- package/dist/{helpers-G6XZPN6L.js → helpers-DISRVGRJ.js} +14 -12
- package/dist/{helpers-G6XZPN6L.js.map → helpers-DISRVGRJ.js.map} +1 -1
- package/dist/library/index.js +8 -6
- package/dist/library/install.js +5 -3
- package/dist/{library-publish-WHGKK7G5.js → library-publish-I2QYQSB4.js} +18 -16
- package/dist/library-publish-I2QYQSB4.js.map +1 -0
- package/dist/{open-library-4JSLGWL6.js → open-library-6LM4W4DR.js} +16 -14
- package/dist/{open-library-4JSLGWL6.js.map → open-library-6LM4W4DR.js.map} +1 -1
- package/dist/paths-P26QGQP5.js +18 -0
- package/dist/{paths-CZEH643M.js.map → paths-P26QGQP5.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-T2DJGKBW.js} +7 -5
- package/dist/plugin-store-T2DJGKBW.js.map +1 -0
- package/dist/{project-LISE6I5O.js → project-HP3IR7RW.js} +15 -13
- package/dist/{project-LISE6I5O.js.map → project-HP3IR7RW.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-HLRSU3MR.js +435 -0
- package/dist/setup-HLRSU3MR.js.map +1 -0
- package/dist/{skills-IE3IWWB7.js → skills-QPYHHZ54.js} +7 -5
- package/dist/{skills-IE3IWWB7.js.map → skills-QPYHHZ54.js.map} +1 -1
- package/dist/{source-FKVEUOBQ.js → source-G2VCWPDU.js} +17 -15
- package/dist/{source-FKVEUOBQ.js.map → source-G2VCWPDU.js.map} +1 -1
- package/dist/{source-manifest-publish-LTRXO2OQ.js → source-manifest-publish-WYKCKJFC.js} +19 -17
- package/dist/source-manifest-publish-WYKCKJFC.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/flow.d.ts +6 -1
- package/dist/types/src/flow.d.ts.map +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-AJOUKX55.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-3NCGSSCU.js.map +0 -1
- package/dist/chunk-3U3ZKYR7.js.map +0 -1
- package/dist/chunk-5UWAOYDN.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-DY5GHUTC.js.map +0 -1
- package/dist/chunk-E7HKNQTH.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-N27DSFA7.js.map +0 -1
- package/dist/chunk-T3YLZQS4.js.map +0 -1
- package/dist/chunk-XMULHVKX.js.map +0 -1
- package/dist/chunk-YLL65VXQ.js.map +0 -1
- package/dist/ensure-sources-DYGQNAJM.js.map +0 -1
- package/dist/library-publish-WHGKK7G5.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-LTRXO2OQ.js.map +0 -1
- package/dist/validator-RN64BKFW.js +0 -5
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorkspacePlugin } from './chunk-NR6BPOW5.js';
|
|
2
|
+
import { buildWorkspaceToolDefs } from './chunk-XEVWRSLS.js';
|
|
2
3
|
import { findAiAssetsRoot } from './chunk-7IRJ4K4F.js';
|
|
3
|
-
import { WorkspacePlugin } from './chunk-DY5GHUTC.js';
|
|
4
|
-
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
5
4
|
import { WebSocketServerTransport } from './chunk-73ZXUUL6.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
6
|
+
import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-45LLHKQ2.js';
|
|
7
|
+
import { resolveFlowPath } from './chunk-Y6E62LFB.js';
|
|
8
8
|
import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-7BUZQVRR.js';
|
|
9
|
-
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, driveOrchestratorTurn, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, buildSdkFlowTools } from './chunk-
|
|
10
|
-
import { loadConnectorDeclarations, SecretProviderChain, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, isKnownSecretRef, deriveSingleMaterializedConnectorDeclaration } from './chunk-
|
|
11
|
-
import { EventNormalizer } from './chunk-
|
|
12
|
-
import {
|
|
9
|
+
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, driveOrchestratorTurn, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, buildSdkFlowTools } from './chunk-RM4C5AU3.js';
|
|
10
|
+
import { loadConnectorDeclarations, SecretProviderChain, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, isKnownSecretRef, deriveSingleMaterializedConnectorDeclaration } from './chunk-KW7YIRYL.js';
|
|
11
|
+
import { EventNormalizer } from './chunk-FODAC4RE.js';
|
|
12
|
+
import { probeResumeTranscript } from './chunk-WLFRA5RM.js';
|
|
13
13
|
import { CodexNativeStateUnavailable } from './chunk-LOO5CB5M.js';
|
|
14
|
-
import { dispatchCapability } from './chunk-
|
|
14
|
+
import { dispatchCapability } from './chunk-QQL3ET3J.js';
|
|
15
15
|
import { classifyClaudeSdkError } from './chunk-GAH4YRCI.js';
|
|
16
|
-
import { createDriver } from './chunk-
|
|
17
|
-
import { loadFlow } from './chunk-
|
|
16
|
+
import { deriveRegistryFromLegacyApiKeys, createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv } from './chunk-SG4D2UOK.js';
|
|
17
|
+
import { loadFlow } from './chunk-MIP4IC3O.js';
|
|
18
18
|
import { parseFlowDefinition } from './chunk-53ORCYPJ.js';
|
|
19
19
|
import { renderStimulusPrompt } from './chunk-2D5BYAL6.js';
|
|
20
|
-
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-
|
|
21
|
-
import { resolveSettings,
|
|
20
|
+
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-YS4XBN7O.js';
|
|
21
|
+
import { resolveSettings, loadProviderRegistry } from './chunk-C3QLJTMB.js';
|
|
22
|
+
import { resolveRuntimeAssets } from './chunk-REILIKVM.js';
|
|
22
23
|
import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
|
|
23
|
-
import {
|
|
24
|
-
import { resolveSkWorkspaceConfig, resolveAgentDir, cloudConfigFromProfile, stageMaterializedSkills, loadMcpServerDeclarations, COMPACTION_DEFAULTS, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration } from './chunk-MBARHWMZ.js';
|
|
24
|
+
import { resolveSkWorkspaceConfig, resolveAgentDir, stageMaterializedSkills, loadMcpServerDeclarations, COMPACTION_DEFAULTS, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration } from './chunk-K27T47OO.js';
|
|
25
25
|
import { withFsDeadline, fsDeadlineMs, FsDeadlineError, tryWithFsDeadline } from './chunk-MKZOK4JU.js';
|
|
26
26
|
import { parseAssetRef } from './chunk-GEEW6SY2.js';
|
|
27
27
|
import { resolveLogStoreConfig, createLogStoreFromConfig, OnLogBridgeSink, WsLogSink } from './chunk-FTG7CRFD.js';
|
|
28
|
+
import { registryEntries, resolveEntryBaseUrl } from './chunk-ILG4BXYE.js';
|
|
28
29
|
import { getLogStore, registerLogStore, resetLogStore, createLogger, isUnwritableStreamError, markStreamBroken, isBrokenPipeError } from './chunk-W4IPN3DD.js';
|
|
29
30
|
import { __require } from './chunk-NSBPE2FW.js';
|
|
30
31
|
import pc from 'picocolors';
|
|
@@ -33,7 +34,7 @@ import { markedTerminal } from 'marked-terminal';
|
|
|
33
34
|
import fs4, { readFile, stat, rm, unlink, mkdir, writeFile, readdir, realpath, lstat, rename, readlink, mkdtemp } from 'fs/promises';
|
|
34
35
|
import { createHash, randomBytes, timingSafeEqual, randomUUID } from 'crypto';
|
|
35
36
|
import path4, { join, resolve, relative, sep, isAbsolute, dirname, basename } from 'path';
|
|
36
|
-
import { existsSync, lstatSync, realpathSync, readFileSync, mkdirSync, writeFileSync, watch, chmodSync, accessSync, constants
|
|
37
|
+
import { existsSync, lstatSync, realpathSync, readFileSync, mkdirSync, writeFileSync, watch, chmodSync, accessSync, constants } from 'fs';
|
|
37
38
|
import { homedir } from 'os';
|
|
38
39
|
import * as z7 from 'zod';
|
|
39
40
|
import { z } from 'zod';
|
|
@@ -250,11 +251,11 @@ async function resolveMixin(ref, defaultKind, agentDir, repos) {
|
|
|
250
251
|
return { content: stripFrontmatter(raw).trim(), source: entry.source };
|
|
251
252
|
}
|
|
252
253
|
async function resolveAgentMixins(manifest, agentDir, repos) {
|
|
253
|
-
const
|
|
254
|
+
const resolve4 = (refs, kind) => Promise.all((refs ?? []).map((r) => resolveMixin(r, kind, agentDir, repos)));
|
|
254
255
|
const [personaResults, rulesResults, knowledgeResults] = await Promise.all([
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
resolve4(manifest.persona, "persona"),
|
|
257
|
+
resolve4(manifest.rules, "ruleset"),
|
|
258
|
+
resolve4(manifest.knowledge, "knowledge")
|
|
258
259
|
]);
|
|
259
260
|
return {
|
|
260
261
|
personas: personaResults.filter((r) => r !== null),
|
|
@@ -892,7 +893,7 @@ async function prepareCodexTools(options) {
|
|
|
892
893
|
options.signal.removeEventListener("abort", abort);
|
|
893
894
|
await Promise.allSettled([...peers].map((peer) => peer.close()));
|
|
894
895
|
http.closeAllConnections();
|
|
895
|
-
if (http.listening) await new Promise((
|
|
896
|
+
if (http.listening) await new Promise((resolve4) => http.close(() => resolve4()));
|
|
896
897
|
})();
|
|
897
898
|
const abort = () => {
|
|
898
899
|
void dispose();
|
|
@@ -900,9 +901,9 @@ async function prepareCodexTools(options) {
|
|
|
900
901
|
options.signal.addEventListener("abort", abort, { once: true });
|
|
901
902
|
try {
|
|
902
903
|
signal.throwIfAborted();
|
|
903
|
-
await new Promise((
|
|
904
|
+
await new Promise((resolve4, reject) => {
|
|
904
905
|
http.once("error", reject);
|
|
905
|
-
http.listen(0, "127.0.0.1",
|
|
906
|
+
http.listen(0, "127.0.0.1", resolve4);
|
|
906
907
|
});
|
|
907
908
|
signal.throwIfAborted();
|
|
908
909
|
const address = http.address();
|
|
@@ -940,7 +941,7 @@ async function prepareCodexTools(options) {
|
|
|
940
941
|
} catch {
|
|
941
942
|
await dispose();
|
|
942
943
|
http.closeAllConnections();
|
|
943
|
-
if (http.listening) await new Promise((
|
|
944
|
+
if (http.listening) await new Promise((resolve4) => http.close(() => resolve4()));
|
|
944
945
|
throw new Error("CODEX_REQUIRED_TOOL_UNAVAILABLE");
|
|
945
946
|
}
|
|
946
947
|
}
|
|
@@ -1012,7 +1013,6 @@ async function registerCodexResourceTools(options) {
|
|
|
1012
1013
|
projectDir: options.projectDir,
|
|
1013
1014
|
connectorManager: options.manager ?? void 0,
|
|
1014
1015
|
driver: "codex",
|
|
1015
|
-
provider: "openai",
|
|
1016
1016
|
model: options.model
|
|
1017
1017
|
});
|
|
1018
1018
|
await plugin.store.load();
|
|
@@ -2105,7 +2105,6 @@ async function buildInProcessMcpServers(resourceManager, projectDir, driverType,
|
|
|
2105
2105
|
projectDir,
|
|
2106
2106
|
connectorManager: resourceManager ?? void 0,
|
|
2107
2107
|
driver: driverType,
|
|
2108
|
-
provider: sessionMeta?.provider,
|
|
2109
2108
|
model: sessionMeta?.model
|
|
2110
2109
|
});
|
|
2111
2110
|
const wsServer = await workspacePlugin.buildWorkspaceMcpServer();
|
|
@@ -2214,7 +2213,7 @@ function toSdkMcpServerConfig(decl, secrets) {
|
|
|
2214
2213
|
// runner/src/session-builder.ts
|
|
2215
2214
|
async function createAgentSession(config) {
|
|
2216
2215
|
const managed = config.managedCodex;
|
|
2217
|
-
if (managed && (config.driver !== "codex" ||
|
|
2216
|
+
if (managed && (config.driver !== "codex" || !config.model || !config.aiProviderConfigId || !config.capabilityRegistry || !config.capabilities))
|
|
2218
2217
|
throw new Error("AI_PROFILE_INVALID");
|
|
2219
2218
|
const {
|
|
2220
2219
|
projectDir,
|
|
@@ -2222,7 +2221,6 @@ async function createAgentSession(config) {
|
|
|
2222
2221
|
agentDir,
|
|
2223
2222
|
driver: driverOverride,
|
|
2224
2223
|
model: modelOverride,
|
|
2225
|
-
provider: providerOverride,
|
|
2226
2224
|
sessionId,
|
|
2227
2225
|
resumeSessionId,
|
|
2228
2226
|
externalPromptFile,
|
|
@@ -2252,15 +2250,20 @@ async function createAgentSession(config) {
|
|
|
2252
2250
|
});
|
|
2253
2251
|
const settings = await resolveSettings(projectDir, {
|
|
2254
2252
|
driver: driverOverride,
|
|
2255
|
-
provider: providerOverride,
|
|
2256
2253
|
model: modelOverride
|
|
2257
2254
|
});
|
|
2258
2255
|
const driverType = managed ? "codex" : settings.driver ?? "omp";
|
|
2259
|
-
const provider = managed ? config.provider : settings.provider;
|
|
2260
2256
|
const model = managed ? config.model : settings.model;
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2263
|
-
const
|
|
2257
|
+
const legacyKeys = managed ? void 0 : deriveRegistryFromLegacyApiKeys(settings.apiKeys, { env: process.env });
|
|
2258
|
+
if (legacyKeys?.deprecation) sessionLog.debug(legacyKeys.deprecation);
|
|
2259
|
+
const registry = loadSessionRegistry(
|
|
2260
|
+
projectDir,
|
|
2261
|
+
config.registry,
|
|
2262
|
+
legacyKeys?.providers,
|
|
2263
|
+
sessionLog
|
|
2264
|
+
);
|
|
2265
|
+
const modelRef = config.modelRef?.trim() || model?.trim() || void 0;
|
|
2266
|
+
const credentialEnv = { ...legacyKeys?.credentialEnv, ...config.credentialEnv };
|
|
2264
2267
|
const manifest = agentDir ? await loadAgentManifest(agentDir) : void 0;
|
|
2265
2268
|
const {
|
|
2266
2269
|
resourceManager,
|
|
@@ -2279,7 +2282,6 @@ async function createAgentSession(config) {
|
|
|
2279
2282
|
watch,
|
|
2280
2283
|
secretProvider,
|
|
2281
2284
|
{
|
|
2282
|
-
provider,
|
|
2283
2285
|
model,
|
|
2284
2286
|
sessionId,
|
|
2285
2287
|
...managed ? { managedCodex: true } : {}
|
|
@@ -2355,20 +2357,19 @@ async function createAgentSession(config) {
|
|
|
2355
2357
|
config,
|
|
2356
2358
|
driverType,
|
|
2357
2359
|
agentCwd,
|
|
2358
|
-
provider,
|
|
2359
2360
|
model,
|
|
2360
|
-
cloud,
|
|
2361
|
-
cloudConfig,
|
|
2362
2361
|
manifest,
|
|
2363
2362
|
maxTurns,
|
|
2364
|
-
apiKey,
|
|
2365
2363
|
systemPrompt,
|
|
2366
2364
|
thinking,
|
|
2367
2365
|
effort,
|
|
2368
2366
|
sessionId,
|
|
2369
2367
|
resumeSessionId,
|
|
2370
2368
|
mcpServers: driverMcpServers,
|
|
2371
|
-
agentDir
|
|
2369
|
+
agentDir,
|
|
2370
|
+
registry,
|
|
2371
|
+
modelRef,
|
|
2372
|
+
credentialEnv
|
|
2372
2373
|
});
|
|
2373
2374
|
} catch (error) {
|
|
2374
2375
|
try {
|
|
@@ -2390,8 +2391,10 @@ async function createAgentSession(config) {
|
|
|
2390
2391
|
composition,
|
|
2391
2392
|
manifest,
|
|
2392
2393
|
driverType,
|
|
2393
|
-
provider,
|
|
2394
2394
|
model,
|
|
2395
|
+
registry,
|
|
2396
|
+
credentialEnv,
|
|
2397
|
+
modelRef,
|
|
2395
2398
|
dispose: disposeSessionResources,
|
|
2396
2399
|
startWatching,
|
|
2397
2400
|
getOrCreateExternalMcpManager,
|
|
@@ -2412,7 +2415,6 @@ function createManagedCodexSubpromptDriver(config, model, cwd, privateDirectory)
|
|
|
2412
2415
|
});
|
|
2413
2416
|
return createDriver("codex", {
|
|
2414
2417
|
cwd,
|
|
2415
|
-
provider: "openai",
|
|
2416
2418
|
model,
|
|
2417
2419
|
sessionId: `${config.sessionId}:subprompt:${randomUUID()}`,
|
|
2418
2420
|
maxTurns: 1,
|
|
@@ -2439,6 +2441,22 @@ function createManagedCodexSubpromptDriver(config, model, cwd, privateDirectory)
|
|
|
2439
2441
|
}
|
|
2440
2442
|
});
|
|
2441
2443
|
}
|
|
2444
|
+
function loadSessionRegistry(projectDir, sessionRegistry, legacyApiKeyProviders, log) {
|
|
2445
|
+
const extraLayers = [];
|
|
2446
|
+
if (legacyApiKeyProviders && Object.keys(legacyApiKeyProviders).length > 0)
|
|
2447
|
+
extraLayers.push({ layer: "user", providers: legacyApiKeyProviders });
|
|
2448
|
+
if (sessionRegistry && Object.keys(sessionRegistry).length > 0)
|
|
2449
|
+
extraLayers.push({ layer: "session", providers: sessionRegistry });
|
|
2450
|
+
const first = loadProviderRegistry({ projectDir, extraLayers });
|
|
2451
|
+
const catalog = catalogLayer(first.patches);
|
|
2452
|
+
const final = Object.keys(catalog.providers).length === 0 ? first : loadProviderRegistry({ projectDir, extraLayers: [...extraLayers, catalog] });
|
|
2453
|
+
for (const diagnostic of final.diagnostics) {
|
|
2454
|
+
const message = diagnostic.path ? `providers registry: ${diagnostic.path}: ${diagnostic.message}` : `providers registry: ${diagnostic.message}`;
|
|
2455
|
+
if (diagnostic.severity === "error") log.error(message, void 0, { code: diagnostic.code });
|
|
2456
|
+
else log.warn(message, { code: diagnostic.code });
|
|
2457
|
+
}
|
|
2458
|
+
return final.registry;
|
|
2459
|
+
}
|
|
2442
2460
|
async function loadPromptExtensions(paths, projectDir, log) {
|
|
2443
2461
|
if (!paths?.length) return [];
|
|
2444
2462
|
const loaded = await Promise.all(
|
|
@@ -2527,20 +2545,19 @@ function createSessionDriver(args) {
|
|
|
2527
2545
|
config,
|
|
2528
2546
|
driverType,
|
|
2529
2547
|
agentCwd,
|
|
2530
|
-
provider,
|
|
2531
2548
|
model,
|
|
2532
|
-
cloud,
|
|
2533
|
-
cloudConfig,
|
|
2534
2549
|
manifest,
|
|
2535
2550
|
maxTurns,
|
|
2536
|
-
apiKey,
|
|
2537
2551
|
systemPrompt,
|
|
2538
2552
|
thinking,
|
|
2539
2553
|
effort,
|
|
2540
2554
|
sessionId,
|
|
2541
2555
|
resumeSessionId,
|
|
2542
2556
|
mcpServers,
|
|
2543
|
-
agentDir
|
|
2557
|
+
agentDir,
|
|
2558
|
+
registry,
|
|
2559
|
+
modelRef,
|
|
2560
|
+
credentialEnv
|
|
2544
2561
|
} = args;
|
|
2545
2562
|
return createDriver(driverType, {
|
|
2546
2563
|
...config.managedCodex ? {
|
|
@@ -2563,17 +2580,17 @@ function createSessionDriver(args) {
|
|
|
2563
2580
|
}
|
|
2564
2581
|
} : {},
|
|
2565
2582
|
cwd: agentCwd,
|
|
2566
|
-
provider,
|
|
2567
2583
|
model: model ?? manifest?.model?.preferred,
|
|
2568
2584
|
maxTurns,
|
|
2569
|
-
apiKeys: apiKey ? { [provider ?? "anthropic"]: apiKey } : void 0,
|
|
2570
2585
|
systemPrompt,
|
|
2571
2586
|
tools: manifest?.tools,
|
|
2572
|
-
//
|
|
2573
|
-
//
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2587
|
+
// The session's only provider surface: every endpoint it may address,
|
|
2588
|
+
// plus the credential values under the `SKAILE_AIP_<ID>_KEY` names the
|
|
2589
|
+
// entries reference. A registry with no entries leaves the driver on its
|
|
2590
|
+
// own native auth.
|
|
2591
|
+
registry,
|
|
2592
|
+
...modelRef ? { modelRef } : {},
|
|
2593
|
+
...Object.keys(credentialEnv).length > 0 ? { env: credentialEnv } : {},
|
|
2577
2594
|
...thinking ? { thinking } : {},
|
|
2578
2595
|
...effort ? { effort } : {},
|
|
2579
2596
|
...sessionId ? { sessionId } : {},
|
|
@@ -2632,14 +2649,14 @@ async function runAgentChat(opts) {
|
|
|
2632
2649
|
${message}`;
|
|
2633
2650
|
}
|
|
2634
2651
|
try {
|
|
2635
|
-
await new Promise((
|
|
2652
|
+
await new Promise((resolve4, reject) => {
|
|
2636
2653
|
const onEvent = (event) => {
|
|
2637
2654
|
if (event.type === "agent_end") {
|
|
2638
2655
|
driver.off("agent-event", onEvent);
|
|
2639
2656
|
mdStream.end();
|
|
2640
2657
|
process.stdout.write("\n");
|
|
2641
2658
|
driver.kill();
|
|
2642
|
-
|
|
2659
|
+
resolve4();
|
|
2643
2660
|
} else if (event.type === "error") {
|
|
2644
2661
|
driver.off("agent-event", onEvent);
|
|
2645
2662
|
const err = Object.assign(new Error(String(event.error)), {
|
|
@@ -2670,7 +2687,6 @@ async function buildDriver(opts) {
|
|
|
2670
2687
|
agentDir,
|
|
2671
2688
|
driver: opts.driver,
|
|
2672
2689
|
model: opts.model,
|
|
2673
|
-
provider: opts.provider,
|
|
2674
2690
|
promptsDir: opts.promptsDir,
|
|
2675
2691
|
onLog: opts.onLog
|
|
2676
2692
|
});
|
|
@@ -3086,7 +3102,7 @@ function buildClientCapabilityHandler(args) {
|
|
|
3086
3102
|
});
|
|
3087
3103
|
return {};
|
|
3088
3104
|
}
|
|
3089
|
-
return new Promise((
|
|
3105
|
+
return new Promise((resolve4, reject) => {
|
|
3090
3106
|
const timer = setTimeout(() => {
|
|
3091
3107
|
args.pending.delete(callId);
|
|
3092
3108
|
reject(
|
|
@@ -3095,7 +3111,7 @@ function buildClientCapabilityHandler(args) {
|
|
|
3095
3111
|
)
|
|
3096
3112
|
);
|
|
3097
3113
|
}, timeoutMs);
|
|
3098
|
-
args.pending.set(callId, { resolve:
|
|
3114
|
+
args.pending.set(callId, { resolve: resolve4, reject, timer });
|
|
3099
3115
|
args.emit({
|
|
3100
3116
|
type: "capability_invoked",
|
|
3101
3117
|
callId,
|
|
@@ -3488,7 +3504,7 @@ function validateCodexInit(cmd, supported, previous) {
|
|
|
3488
3504
|
(key) => previous[key] !== cmd.identity[key]
|
|
3489
3505
|
))
|
|
3490
3506
|
throw new Error("Invalid managed AI session identity");
|
|
3491
|
-
if (!managed ||
|
|
3507
|
+
if (!managed || !["subscription", "api-key"].includes(profile?.authMode ?? ""))
|
|
3492
3508
|
throw new Error("Invalid managed OpenAI profile");
|
|
3493
3509
|
const credential = parseCodexCredential(cmd.credentials.ai);
|
|
3494
3510
|
if (credential.configId !== cmd.resolvedConfig.aiProviderConfigId || profile.authMode === "subscription" !== (credential.kind === "codex-subscription"))
|
|
@@ -3583,7 +3599,7 @@ function loadManagedCodexHostConfig(file, projectDir) {
|
|
|
3583
3599
|
function bindManagedCodexInit(host, cmd, refreshCredential) {
|
|
3584
3600
|
const profile = cmd.resolvedConfig.agentConfig;
|
|
3585
3601
|
const credential = parseCodexCredential(cmd.credentials.ai);
|
|
3586
|
-
if (!profile?.authMode || !["subscription", "api-key"].includes(profile.authMode) || cmd.identity.sessionId !== host.sessionId || profile?.driver !== "codex" ||
|
|
3602
|
+
if (!profile?.authMode || !["subscription", "api-key"].includes(profile.authMode) || cmd.identity.sessionId !== host.sessionId || profile?.driver !== "codex" || !profile.model || !host.subpromptModels.available.includes(profile.model) || credential.configId !== cmd.resolvedConfig.aiProviderConfigId || profile.authMode === "subscription" !== (credential.kind === "codex-subscription"))
|
|
3587
3603
|
throw refused();
|
|
3588
3604
|
const reasoningEffort = profile.effort ?? host.reasoningEffort;
|
|
3589
3605
|
if (!["minimal", "low", "medium", "high", "xhigh"].includes(reasoningEffort)) throw refused();
|
|
@@ -3876,34 +3892,6 @@ function planRuntimeSessionEmit(input) {
|
|
|
3876
3892
|
}
|
|
3877
3893
|
return { type: "runtime_session", driverSessionId, model, capabilitySignature };
|
|
3878
3894
|
}
|
|
3879
|
-
var GCP_SA_JSON_KEY = "GOOGLE_APPLICATION_CREDENTIALS_JSON";
|
|
3880
|
-
var GCP_SA_RELATIVE_PATH = join(".skaile", "gcp-sa.json");
|
|
3881
|
-
function resolveCloudSecretBundle(args) {
|
|
3882
|
-
const { cloud, secrets, projectDir } = args;
|
|
3883
|
-
const cloudSecrets = {};
|
|
3884
|
-
const bundleKeys = CLOUD_SECRET_ENV_KEYS[cloud];
|
|
3885
|
-
if (!secrets || !bundleKeys) return { cloudSecrets };
|
|
3886
|
-
for (const key of bundleKeys) {
|
|
3887
|
-
if (key === GCP_SA_JSON_KEY) continue;
|
|
3888
|
-
const value = secrets[key];
|
|
3889
|
-
if (value) cloudSecrets[key] = value;
|
|
3890
|
-
}
|
|
3891
|
-
const saJson = secrets[GCP_SA_JSON_KEY];
|
|
3892
|
-
if (bundleKeys.includes(GCP_SA_JSON_KEY) && saJson) {
|
|
3893
|
-
const saPath = resolve(projectDir, GCP_SA_RELATIVE_PATH);
|
|
3894
|
-
mkdirSync(dirname(saPath), { recursive: true });
|
|
3895
|
-
rmSync(saPath, { force: true });
|
|
3896
|
-
writeFileSync(saPath, saJson, { mode: 384 });
|
|
3897
|
-
cloudSecrets.GOOGLE_APPLICATION_CREDENTIALS = saPath;
|
|
3898
|
-
}
|
|
3899
|
-
return { cloudSecrets };
|
|
3900
|
-
}
|
|
3901
|
-
function cleanupCloudCredentialFiles(projectDir) {
|
|
3902
|
-
try {
|
|
3903
|
-
rmSync(resolve(projectDir, GCP_SA_RELATIVE_PATH), { force: true });
|
|
3904
|
-
} catch {
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
3895
|
|
|
3908
3896
|
// runner/src/compaction-gate.ts
|
|
3909
3897
|
var CompactionGate = class {
|
|
@@ -3928,8 +3916,8 @@ var CompactionGate = class {
|
|
|
3928
3916
|
begin() {
|
|
3929
3917
|
const hold = /* @__PURE__ */ Symbol("compaction");
|
|
3930
3918
|
if (this.held.size === 0) {
|
|
3931
|
-
this.opened = new Promise((
|
|
3932
|
-
this.release =
|
|
3919
|
+
this.opened = new Promise((resolve4) => {
|
|
3920
|
+
this.release = resolve4;
|
|
3933
3921
|
});
|
|
3934
3922
|
}
|
|
3935
3923
|
this.held.add(hold);
|
|
@@ -3986,8 +3974,8 @@ var CompactionGate = class {
|
|
|
3986
3974
|
};
|
|
3987
3975
|
async function raceDeadline(opened, ms) {
|
|
3988
3976
|
let timer;
|
|
3989
|
-
const expired = new Promise((
|
|
3990
|
-
timer = setTimeout(() =>
|
|
3977
|
+
const expired = new Promise((resolve4) => {
|
|
3978
|
+
timer = setTimeout(() => resolve4("timeout"), ms);
|
|
3991
3979
|
timer.unref?.();
|
|
3992
3980
|
});
|
|
3993
3981
|
try {
|
|
@@ -4025,8 +4013,8 @@ var DriverSwapGate = class {
|
|
|
4025
4013
|
*/
|
|
4026
4014
|
beginTurn() {
|
|
4027
4015
|
let resolveTurn;
|
|
4028
|
-
const turn = new Promise((
|
|
4029
|
-
resolveTurn =
|
|
4016
|
+
const turn = new Promise((resolve4) => {
|
|
4017
|
+
resolveTurn = resolve4;
|
|
4030
4018
|
});
|
|
4031
4019
|
this.turnTail = this.turnTail.then(() => turn);
|
|
4032
4020
|
let ended = false;
|
|
@@ -4119,7 +4107,7 @@ async function dispatchFlowTurn(deps, prompt, timeoutMs) {
|
|
|
4119
4107
|
}
|
|
4120
4108
|
}
|
|
4121
4109
|
function awaitAgentEnd(driver, prompt, timeoutMs) {
|
|
4122
|
-
return new Promise((
|
|
4110
|
+
return new Promise((resolve4, reject) => {
|
|
4123
4111
|
let settled = false;
|
|
4124
4112
|
const onEvent = (raw) => {
|
|
4125
4113
|
const event = raw;
|
|
@@ -4134,7 +4122,7 @@ function awaitAgentEnd(driver, prompt, timeoutMs) {
|
|
|
4134
4122
|
if (driver.off) driver.off("agent-event", onEvent);
|
|
4135
4123
|
else driver.removeListener("agent-event", onEvent);
|
|
4136
4124
|
if (err) reject(err);
|
|
4137
|
-
else
|
|
4125
|
+
else resolve4();
|
|
4138
4126
|
};
|
|
4139
4127
|
const timer = setTimeout(
|
|
4140
4128
|
() => done(new Error(`Flow turn timed out after ${timeoutMs / 1e3}s`)),
|
|
@@ -4588,8 +4576,8 @@ var CompactionOrchestrator = class {
|
|
|
4588
4576
|
try {
|
|
4589
4577
|
this.driver.on("agent-event", captureHandler);
|
|
4590
4578
|
const running = this.driver.prompt(prompt);
|
|
4591
|
-
const expiry = new Promise((
|
|
4592
|
-
timer = setTimeout(() =>
|
|
4579
|
+
const expiry = new Promise((resolve4) => {
|
|
4580
|
+
timer = setTimeout(() => resolve4("expired"), timeoutMs);
|
|
4593
4581
|
});
|
|
4594
4582
|
const outcome = await Promise.race([running.then(() => "settled"), expiry]);
|
|
4595
4583
|
if (outcome === "expired") {
|
|
@@ -4605,8 +4593,8 @@ var CompactionOrchestrator = class {
|
|
|
4605
4593
|
this.opts.onLog?.(`[compaction] abort after timeout failed: ${String(abortErr)}`);
|
|
4606
4594
|
});
|
|
4607
4595
|
let settleTimer;
|
|
4608
|
-
const graceExpired = new Promise((
|
|
4609
|
-
settleTimer = setTimeout(
|
|
4596
|
+
const graceExpired = new Promise((resolve4) => {
|
|
4597
|
+
settleTimer = setTimeout(resolve4, ABORT_SETTLE_GRACE_MS);
|
|
4610
4598
|
settleTimer.unref?.();
|
|
4611
4599
|
});
|
|
4612
4600
|
await Promise.race([Promise.all([aborted, settled]), graceExpired]);
|
|
@@ -5597,9 +5585,9 @@ function createSessionStimulusBus(opts) {
|
|
|
5597
5585
|
connectorId,
|
|
5598
5586
|
fragmentLength: sig.promptFragment.length
|
|
5599
5587
|
});
|
|
5600
|
-
return new Promise((
|
|
5588
|
+
return new Promise((resolve4, reject) => {
|
|
5601
5589
|
const q = getQueue(connectorId);
|
|
5602
|
-
q.pending.push({ signal: sig, resolve:
|
|
5590
|
+
q.pending.push({ signal: sig, resolve: resolve4, reject });
|
|
5603
5591
|
startTimerIfNeeded(connectorId, q, coalesceMs);
|
|
5604
5592
|
});
|
|
5605
5593
|
}
|
|
@@ -5640,6 +5628,12 @@ function emitSystemPromptComposed(agentSession, sendEvent) {
|
|
|
5640
5628
|
composedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
5641
5629
|
});
|
|
5642
5630
|
}
|
|
5631
|
+
var REMOVED_RESOLVED_CONFIG_KEYS = ["provider", "cloud", "cloudConfig"];
|
|
5632
|
+
function legacyResolvedConfigKeys(agentConfig) {
|
|
5633
|
+
if (!agentConfig) return [];
|
|
5634
|
+
const raw = agentConfig;
|
|
5635
|
+
return REMOVED_RESOLVED_CONFIG_KEYS.filter((key) => raw[key] !== void 0);
|
|
5636
|
+
}
|
|
5643
5637
|
var DRIVER_START_ATTEMPTS = 3;
|
|
5644
5638
|
var FRAMEWORK_PACKAGES = [
|
|
5645
5639
|
"@skaile/workspaces/runner",
|
|
@@ -5965,19 +5959,19 @@ function createFlowConnectorReadiness(isReady) {
|
|
|
5965
5959
|
wait(timeoutMs, isSatisfied) {
|
|
5966
5960
|
const satisfied = isSatisfied ?? isReady;
|
|
5967
5961
|
if (satisfied()) return Promise.resolve(true);
|
|
5968
|
-
return new Promise((
|
|
5962
|
+
return new Promise((resolve4) => {
|
|
5969
5963
|
let timer;
|
|
5970
5964
|
const waiter = {
|
|
5971
5965
|
satisfied,
|
|
5972
5966
|
release: () => {
|
|
5973
5967
|
clearTimeout(timer);
|
|
5974
|
-
|
|
5968
|
+
resolve4(true);
|
|
5975
5969
|
}
|
|
5976
5970
|
};
|
|
5977
5971
|
timer = setTimeout(() => {
|
|
5978
5972
|
const idx = waiters.indexOf(waiter);
|
|
5979
5973
|
if (idx >= 0) waiters.splice(idx, 1);
|
|
5980
|
-
|
|
5974
|
+
resolve4(false);
|
|
5981
5975
|
}, timeoutMs);
|
|
5982
5976
|
timer.unref?.();
|
|
5983
5977
|
waiters.push(waiter);
|
|
@@ -6400,7 +6394,7 @@ async function startAgentServer(opts) {
|
|
|
6400
6394
|
const pendingCapabilityCalls = /* @__PURE__ */ new Map();
|
|
6401
6395
|
const remoteCapabilityInvoker = (name, input, timeoutMs, signal) => {
|
|
6402
6396
|
const callId = typeof crypto?.randomUUID === "function" ? crypto.randomUUID() : `rcap-${Date.now()}-${Math.floor(Math.random() * 1e9)}`;
|
|
6403
|
-
return new Promise((
|
|
6397
|
+
return new Promise((resolve4, reject) => {
|
|
6404
6398
|
if (!transport.connected) {
|
|
6405
6399
|
reject(new Error(`Transport disconnected; cannot invoke remote capability ${name}`));
|
|
6406
6400
|
return;
|
|
@@ -6414,7 +6408,7 @@ async function startAgentServer(opts) {
|
|
|
6414
6408
|
signal?.removeEventListener("abort", abort);
|
|
6415
6409
|
pendingCapabilityCalls.delete(callId);
|
|
6416
6410
|
if (error) reject(error);
|
|
6417
|
-
else
|
|
6411
|
+
else resolve4(value);
|
|
6418
6412
|
};
|
|
6419
6413
|
const abort = () => finish(signal?.reason ?? new Error("Remote capability aborted"));
|
|
6420
6414
|
const timer = setTimeout(
|
|
@@ -6435,8 +6429,8 @@ async function startAgentServer(opts) {
|
|
|
6435
6429
|
});
|
|
6436
6430
|
};
|
|
6437
6431
|
let aiProviderConfigId;
|
|
6438
|
-
const sleep = (ms) => new Promise((
|
|
6439
|
-
const t = setTimeout(
|
|
6432
|
+
const sleep = (ms) => new Promise((resolve4) => {
|
|
6433
|
+
const t = setTimeout(resolve4, ms);
|
|
6440
6434
|
t.unref?.();
|
|
6441
6435
|
});
|
|
6442
6436
|
async function mintAndPersistAiCredential(args) {
|
|
@@ -6606,32 +6600,17 @@ async function startAgentServer(opts) {
|
|
|
6606
6600
|
}
|
|
6607
6601
|
const secretsMode = managedHost ? "provisioned" : wsConfig.secrets?.provider ?? "env";
|
|
6608
6602
|
wsConfig.secrets?.timeoutMs ?? 3e4;
|
|
6609
|
-
const
|
|
6610
|
-
|
|
6611
|
-
if (effectiveCloud !== rawCloud) {
|
|
6612
|
-
log(
|
|
6613
|
-
`[serve] WARNING: unknown cloud "${rawCloud}" in agent-config \u2014 falling back to the default transport`
|
|
6614
|
-
);
|
|
6615
|
-
}
|
|
6616
|
-
const effectiveCloudConfig = cloudConfigFromProfile(profile);
|
|
6617
|
-
const diskProfileHasAgentSettings = (p) => !!p && !!(p.driver || p.provider || p.model || p.cloud || p.cloud_config || p.thinking || p.effort);
|
|
6618
|
-
function resolveEffectiveCloudForSession() {
|
|
6619
|
-
if (managedCodex) return { cloud: "default" };
|
|
6620
|
-
if (effectiveCloud !== "default" || !wireAgentConfig) {
|
|
6621
|
-
return { cloud: effectiveCloud, cloudConfig: effectiveCloudConfig };
|
|
6622
|
-
}
|
|
6623
|
-
const raw = wireAgentConfig.cloud ?? "default";
|
|
6624
|
-
const cloud = SUPPORTED_CLOUDS.includes(raw) ? raw : "default";
|
|
6625
|
-
return { cloud, cloudConfig: wireAgentConfig.cloudConfig };
|
|
6626
|
-
}
|
|
6627
|
-
function buildSessionConfig(secretProvider2, apiKey, cloudSecrets, fallbackConnectorDeclarations) {
|
|
6628
|
-
const { cloud: sessionCloud, cloudConfig: sessionCloudConfig } = resolveEffectiveCloudForSession();
|
|
6603
|
+
const diskProfileHasAgentSettings = (p) => !!p && !!(p.driver || p.model || p.thinking || p.effort);
|
|
6604
|
+
function buildSessionConfig(secretProvider2, credentialEnv, fallbackConnectorDeclarations) {
|
|
6629
6605
|
return {
|
|
6630
6606
|
projectDir: opts.projectDir,
|
|
6631
6607
|
agentDir,
|
|
6632
6608
|
driver: managedCodex ? "codex" : opts.driver ?? wireAgentConfig?.driver,
|
|
6633
6609
|
model: managedCodex ? wireAgentConfig?.model : opts.model ?? wireAgentConfig?.model,
|
|
6634
|
-
|
|
6610
|
+
// The control-plane registry layer, normalized to the bare `id → entry`
|
|
6611
|
+
// map the session builder layers `providers.yml` under.
|
|
6612
|
+
...wireAgentConfig?.registry ? { registry: toMergedRegistry(wireAgentConfig.registry).providers } : {},
|
|
6613
|
+
...wireAgentConfig?.modelRef ? { modelRef: wireAgentConfig.modelRef } : {},
|
|
6635
6614
|
promptsDir: opts.promptsDir,
|
|
6636
6615
|
sessionId,
|
|
6637
6616
|
resumeSessionId: managedCodex ? void 0 : resumeSessionId,
|
|
@@ -6643,14 +6622,10 @@ async function startAgentServer(opts) {
|
|
|
6643
6622
|
onAuthError: managedCodex ? void 0 : onAuthError,
|
|
6644
6623
|
onLimitBlocked,
|
|
6645
6624
|
onProviderResponse,
|
|
6646
|
-
|
|
6647
|
-
//
|
|
6648
|
-
//
|
|
6649
|
-
|
|
6650
|
-
// entirely for `default` so the session config stays byte-identical.
|
|
6651
|
-
...sessionCloud !== "default" ? { cloud: sessionCloud } : {},
|
|
6652
|
-
...sessionCloudConfig ? { cloudConfig: sessionCloudConfig } : {},
|
|
6653
|
-
...cloudSecrets ? { cloudSecrets } : {},
|
|
6625
|
+
// Credential values the runner resolved out of the `session_init`
|
|
6626
|
+
// secrets map, keyed by the `SKAILE_AIP_<ID>_KEY` name each registry
|
|
6627
|
+
// entry references. Omitted entirely when nothing resolved.
|
|
6628
|
+
...credentialEnv && Object.keys(credentialEnv).length > 0 ? { credentialEnv } : {},
|
|
6654
6629
|
...wireAgentConfig?.thinking ? { thinking: wireAgentConfig.thinking } : {},
|
|
6655
6630
|
...wireAgentConfig?.effort ? { effort: wireAgentConfig.effort } : {},
|
|
6656
6631
|
// Every claude-sdk driver carries the flow tools, so a run can start mid-turn.
|
|
@@ -6728,10 +6703,10 @@ async function startAgentServer(opts) {
|
|
|
6728
6703
|
let resolveSessionReady;
|
|
6729
6704
|
let rejectSessionReady;
|
|
6730
6705
|
let sessionReadyOutcome = "pending";
|
|
6731
|
-
const sessionReady = new Promise((
|
|
6706
|
+
const sessionReady = new Promise((resolve4, reject) => {
|
|
6732
6707
|
resolveSessionReady = () => {
|
|
6733
6708
|
if (sessionReadyOutcome === "pending") sessionReadyOutcome = "resolved";
|
|
6734
|
-
|
|
6709
|
+
resolve4();
|
|
6735
6710
|
};
|
|
6736
6711
|
rejectSessionReady = (err) => {
|
|
6737
6712
|
if (sessionReadyOutcome === "pending") sessionReadyOutcome = "rejected";
|
|
@@ -6812,12 +6787,28 @@ async function startAgentServer(opts) {
|
|
|
6812
6787
|
bakedMcpServerIds
|
|
6813
6788
|
)
|
|
6814
6789
|
);
|
|
6790
|
+
function logResolvedProviderTargets() {
|
|
6791
|
+
const registry = agentSession?.registry;
|
|
6792
|
+
if (!registry) return;
|
|
6793
|
+
const entries = registryEntries(registry);
|
|
6794
|
+
if (entries.length === 0) return;
|
|
6795
|
+
const described = entries.map(
|
|
6796
|
+
([id, entry]) => `${id} -> ${resolveEntryBaseUrl(entry) ?? "(vendor default)"} [${providerCredentialEnvName(id)}]`
|
|
6797
|
+
);
|
|
6798
|
+
log(
|
|
6799
|
+
`[serve] AI provider registry: ${described.join(", ")} (selector ${agentSession?.modelRef ?? "(driver default)"})`
|
|
6800
|
+
);
|
|
6801
|
+
}
|
|
6815
6802
|
if (secretsMode === "env") {
|
|
6816
|
-
if (
|
|
6803
|
+
if (agentSession.registry.order.length === 0) {
|
|
6817
6804
|
log(
|
|
6818
|
-
|
|
6805
|
+
"[serve] WARNING: no AI provider registry entry for this session \u2014 agent calls fall back to the backend's own login, if it has one"
|
|
6819
6806
|
);
|
|
6820
|
-
log(
|
|
6807
|
+
log(
|
|
6808
|
+
"[serve] Define one with `skaile providers add <id> --preset <preset> --credential env:<VAR>`"
|
|
6809
|
+
);
|
|
6810
|
+
} else {
|
|
6811
|
+
logResolvedProviderTargets();
|
|
6821
6812
|
}
|
|
6822
6813
|
if (resourceManager) {
|
|
6823
6814
|
const watched = resourceManager.watchedResources ?? [];
|
|
@@ -7116,13 +7107,11 @@ async function startAgentServer(opts) {
|
|
|
7116
7107
|
if (sessionConfig.managedCodex && !managedSubprompts) throw new Error("AI_PROFILE_INVALID");
|
|
7117
7108
|
const generativeSubpromptRunner = new SessionSubpromptRunner({
|
|
7118
7109
|
driverType: agentSession.driverType,
|
|
7119
|
-
provider: agentSession.provider,
|
|
7120
7110
|
sessionModel: agentSession.model,
|
|
7121
7111
|
workspaceDir: opts.projectDir,
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
cloudSecrets: sessionConfig.cloudSecrets,
|
|
7112
|
+
registry: agentSession.registry,
|
|
7113
|
+
...agentSession.modelRef ? { modelRef: agentSession.modelRef } : {},
|
|
7114
|
+
credentialEnv: agentSession.credentialEnv,
|
|
7126
7115
|
...managedSubprompts ? {
|
|
7127
7116
|
modelTierOverrides: {
|
|
7128
7117
|
small: managedSubprompts.small,
|
|
@@ -7322,8 +7311,8 @@ async function startAgentServer(opts) {
|
|
|
7322
7311
|
try {
|
|
7323
7312
|
await Promise.race([
|
|
7324
7313
|
sessionReady,
|
|
7325
|
-
new Promise((
|
|
7326
|
-
const t = setTimeout(
|
|
7314
|
+
new Promise((resolve4) => {
|
|
7315
|
+
const t = setTimeout(resolve4, 2e3);
|
|
7327
7316
|
t.unref?.();
|
|
7328
7317
|
})
|
|
7329
7318
|
]);
|
|
@@ -7356,10 +7345,6 @@ async function startAgentServer(opts) {
|
|
|
7356
7345
|
} catch {
|
|
7357
7346
|
}
|
|
7358
7347
|
}
|
|
7359
|
-
try {
|
|
7360
|
-
cleanupCloudCredentialFiles(opts.projectDir);
|
|
7361
|
-
} catch {
|
|
7362
|
-
}
|
|
7363
7348
|
}
|
|
7364
7349
|
async function awaitSessionReadyOrFail() {
|
|
7365
7350
|
try {
|
|
@@ -7421,24 +7406,14 @@ async function startAgentServer(opts) {
|
|
|
7421
7406
|
return initialAiCredentialExpiresAt;
|
|
7422
7407
|
}
|
|
7423
7408
|
async function buildSessionFromInit(secrets, fallbackConnectorDeclarations) {
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
const envKey = providerEnvKey(effectiveProvider);
|
|
7430
|
-
apiKeyFromSecrets = secrets?.[envKey];
|
|
7431
|
-
} else if (!managedCodex) {
|
|
7432
|
-
({ cloudSecrets } = resolveCloudSecretBundle({
|
|
7433
|
-
cloud: initCloud,
|
|
7434
|
-
secrets,
|
|
7435
|
-
projectDir: opts.projectDir
|
|
7436
|
-
}));
|
|
7437
|
-
}
|
|
7409
|
+
const wireRegistry = managedCodex ? void 0 : wireAgentConfig?.registry;
|
|
7410
|
+
const credentialEnv = wireRegistry ? registryCredentialEnv(wireRegistry, {
|
|
7411
|
+
secrets: secrets ?? {},
|
|
7412
|
+
allowCommand: false
|
|
7413
|
+
}) : void 0;
|
|
7438
7414
|
sessionConfig = buildSessionConfig(
|
|
7439
7415
|
secretProvider,
|
|
7440
|
-
|
|
7441
|
-
cloudSecrets,
|
|
7416
|
+
credentialEnv,
|
|
7442
7417
|
fallbackConnectorDeclarations
|
|
7443
7418
|
);
|
|
7444
7419
|
let needsWireFallbackRecreate = false;
|
|
@@ -7495,8 +7470,8 @@ async function startAgentServer(opts) {
|
|
|
7495
7470
|
async function recreateAgentSession(overrides) {
|
|
7496
7471
|
let markSwapDone;
|
|
7497
7472
|
driverSwapGate.beginSwap(
|
|
7498
|
-
new Promise((
|
|
7499
|
-
markSwapDone =
|
|
7473
|
+
new Promise((resolve4) => {
|
|
7474
|
+
markSwapDone = resolve4;
|
|
7500
7475
|
})
|
|
7501
7476
|
);
|
|
7502
7477
|
try {
|
|
@@ -7859,6 +7834,17 @@ async function startAgentServer(opts) {
|
|
|
7859
7834
|
return;
|
|
7860
7835
|
}
|
|
7861
7836
|
runtimeIdentity = cmd.identity;
|
|
7837
|
+
const legacyWireKeys = legacyResolvedConfigKeys(cmd.resolvedConfig.agentConfig);
|
|
7838
|
+
if (legacyWireKeys.length > 0) {
|
|
7839
|
+
const message = `session_init resolvedConfig.agentConfig carries removed field(s) ${legacyWireKeys.join(", ")}: @skaile/workspaces 4.0.0 deleted the provider/cloud axis. Send \`registry\` (an AI provider registry keyed by endpoint id, each entry referencing its credential as \`platform:<configId>\`) plus \`modelRef\` ("<providerId>/<modelId>", a bare model id, or "@role") instead. See MIGRATION.md 4.0.0.`;
|
|
7840
|
+
log(`[serve] ${message}`);
|
|
7841
|
+
sendEvent({ type: "error", fatal: true, category: "config", message });
|
|
7842
|
+
await cleanup();
|
|
7843
|
+
teardownProcessHandlers();
|
|
7844
|
+
disposeLogStore();
|
|
7845
|
+
await transport.close();
|
|
7846
|
+
return;
|
|
7847
|
+
}
|
|
7862
7848
|
registerInitClientCapabilities(cmd.capabilities ?? []);
|
|
7863
7849
|
sendEvent({
|
|
7864
7850
|
type: "protocol_info",
|
|
@@ -7872,7 +7858,8 @@ async function startAgentServer(opts) {
|
|
|
7872
7858
|
aiProviderConfigId = cmd.resolvedConfig.aiProviderConfigId;
|
|
7873
7859
|
log(`[serve] stashed aiProviderConfigId=${aiProviderConfigId}`);
|
|
7874
7860
|
}
|
|
7875
|
-
|
|
7861
|
+
const wireCandidate = cmd.resolvedConfig.agentConfig ?? wireAgentConfig;
|
|
7862
|
+
wireAgentConfig = managedCodex ? cmd.resolvedConfig.agentConfig : diskProfileHasAgentSettings(profile) ? wireCandidate?.registry ? { registry: wireCandidate.registry } : void 0 : wireCandidate;
|
|
7876
7863
|
if (!managedCodex && aiProviderConfigId && initialAiCredentialExpiresAt) {
|
|
7877
7864
|
aiCredentialRefreshScheduler.schedule(initialAiCredentialExpiresAt);
|
|
7878
7865
|
}
|
|
@@ -7935,6 +7922,17 @@ async function startAgentServer(opts) {
|
|
|
7935
7922
|
resuming: !!pendingResumeSessionId
|
|
7936
7923
|
});
|
|
7937
7924
|
}
|
|
7925
|
+
const deliveredRegistry = cmd.resolvedConfig.agentConfig?.registry;
|
|
7926
|
+
if (deliveredRegistry) {
|
|
7927
|
+
const delivered = Object.keys(toMergedRegistry(deliveredRegistry).providers);
|
|
7928
|
+
const resolved = Object.keys(agentSession?.registry.providers ?? {});
|
|
7929
|
+
if (delivered.length > 0 && !delivered.some((id) => resolved.includes(id))) {
|
|
7930
|
+
throw new Error(
|
|
7931
|
+
`session_init: AI provider registry ${delivered.length === 1 ? "entry" : "entries"} ${delivered.join(", ")} delivered by the control plane did not reach the session (resolved: ${resolved.join(", ") || "none"}) \u2014 it has no endpoint and no credential for its configured provider`
|
|
7932
|
+
);
|
|
7933
|
+
}
|
|
7934
|
+
}
|
|
7935
|
+
logResolvedProviderTargets();
|
|
7938
7936
|
if (cfg.sharedState) {
|
|
7939
7937
|
const handled = await applyInitSharedState(cfg.sharedState);
|
|
7940
7938
|
if (!handled) throw new Error("session_init: shared-state setup failed");
|
|
@@ -8211,7 +8209,6 @@ async function startAgentServer(opts) {
|
|
|
8211
8209
|
return {
|
|
8212
8210
|
driver: agentSession?.driverType,
|
|
8213
8211
|
model: liveModel,
|
|
8214
|
-
provider: agentSession?.provider,
|
|
8215
8212
|
maxTurns,
|
|
8216
8213
|
secretsMode,
|
|
8217
8214
|
driverStarted,
|
|
@@ -8467,7 +8464,7 @@ async function startAgentServer(opts) {
|
|
|
8467
8464
|
});
|
|
8468
8465
|
if (secretsMode === "env") {
|
|
8469
8466
|
log(
|
|
8470
|
-
`[serve] driver=${agentSession.driverType} model=${agentSession.model ?? "(default)"}
|
|
8467
|
+
`[serve] driver=${agentSession.driverType} model=${agentSession.model ?? "(default)"} maxTurns=${maxTurns ?? "(default)"}`
|
|
8471
8468
|
);
|
|
8472
8469
|
} else {
|
|
8473
8470
|
log(`[serve] secrets=provisioned \u2014 session will initialize after provision_secrets`);
|
|
@@ -8632,5 +8629,5 @@ function touchSession(state) {
|
|
|
8632
8629
|
}
|
|
8633
8630
|
|
|
8634
8631
|
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile };
|
|
8635
|
-
//# sourceMappingURL=chunk-
|
|
8636
|
-
//# sourceMappingURL=chunk-
|
|
8632
|
+
//# sourceMappingURL=chunk-HO2FQ76C.js.map
|
|
8633
|
+
//# sourceMappingURL=chunk-HO2FQ76C.js.map
|