@skaile/workspaces 6.8.1 → 6.9.1
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 +54 -0
- package/dist/ai-sdk.js +5 -5
- package/dist/{asset-feeds-R75MH2WW.js → asset-feeds-PANNQPEE.js} +19 -19
- package/dist/{asset-feeds-R75MH2WW.js.map → asset-feeds-PANNQPEE.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +4 -4
- package/dist/asset-manager/history.js +19 -1
- package/dist/asset-manager/index.js +11 -11
- package/dist/asset-manager/installer.js +7 -7
- package/dist/asset-manager/renderers.js +6 -6
- package/dist/asset-manager/src/history.d.ts.map +1 -1
- package/dist/asset-manager/src/index.d.ts +65 -3
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/bridge/harnesses/claude-sdk.js +9 -9
- package/dist/bridge/harnesses/codex.js +29 -12
- package/dist/bridge/harnesses/codex.js.map +1 -1
- package/dist/bridge/harnesses/continue.js +8 -8
- package/dist/bridge/harnesses/echo.js +3 -3
- package/dist/bridge/harnesses/gemini.js +8 -8
- package/dist/bridge/harnesses/goose.js +8 -8
- package/dist/bridge/harnesses/omp.js +191 -24
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +8 -8
- package/dist/bridge/harnesses/qwen.js +8 -8
- package/dist/bridge/index.js +14 -14
- package/dist/bridge/src/codex/friendly-error.d.ts +7 -1
- package/dist/bridge/src/codex/friendly-error.d.ts.map +1 -1
- package/dist/bridge/src/codex/login-fallback.d.ts +5 -0
- package/dist/bridge/src/codex/login-fallback.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/codex.d.ts +2 -0
- package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/omp.d.ts +28 -0
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
- package/dist/{chunk-PKC2AHOB.js → chunk-2UKNI2HJ.js} +2 -2
- package/dist/{chunk-PKC2AHOB.js.map → chunk-2UKNI2HJ.js.map} +1 -1
- package/dist/{chunk-SBNUXJ6E.js → chunk-3AIEJSQR.js} +3 -3
- package/dist/{chunk-SBNUXJ6E.js.map → chunk-3AIEJSQR.js.map} +1 -1
- package/dist/{chunk-TMJBEGS4.js → chunk-4KPQ6ILH.js} +5 -34
- package/dist/chunk-4KPQ6ILH.js.map +1 -0
- package/dist/{chunk-G7NMF5WQ.js → chunk-4ROXSQEG.js} +3 -3
- package/dist/{chunk-G7NMF5WQ.js.map → chunk-4ROXSQEG.js.map} +1 -1
- package/dist/{chunk-WFK4MUBL.js → chunk-5J6JWGY4.js} +3 -3
- package/dist/{chunk-WFK4MUBL.js.map → chunk-5J6JWGY4.js.map} +1 -1
- package/dist/{chunk-ORXV3UB6.js → chunk-5J6N6LHL.js} +3 -3
- package/dist/{chunk-ORXV3UB6.js.map → chunk-5J6N6LHL.js.map} +1 -1
- package/dist/{chunk-O5Y7VMVQ.js → chunk-5KWQMCH7.js} +3 -3
- package/dist/{chunk-O5Y7VMVQ.js.map → chunk-5KWQMCH7.js.map} +1 -1
- package/dist/{chunk-KTBKW2FI.js → chunk-7QYBKUAS.js} +4 -3
- package/dist/chunk-7QYBKUAS.js.map +1 -0
- package/dist/{chunk-SILFO5RY.js → chunk-7TF5MNFK.js} +2 -2
- package/dist/{chunk-SILFO5RY.js.map → chunk-7TF5MNFK.js.map} +1 -1
- package/dist/{chunk-XIIIGLSL.js → chunk-7UCPGQCW.js} +9 -9
- package/dist/{chunk-XIIIGLSL.js.map → chunk-7UCPGQCW.js.map} +1 -1
- package/dist/{chunk-NAEXYRHR.js → chunk-AQTAULXT.js} +10 -10
- package/dist/{chunk-NAEXYRHR.js.map → chunk-AQTAULXT.js.map} +1 -1
- package/dist/{chunk-LL5GMUQG.js → chunk-BDAXHJC5.js} +7 -7
- package/dist/{chunk-LL5GMUQG.js.map → chunk-BDAXHJC5.js.map} +1 -1
- package/dist/{chunk-DXBHGNSI.js → chunk-BLBXOG5Q.js} +6 -6
- package/dist/{chunk-DXBHGNSI.js.map → chunk-BLBXOG5Q.js.map} +1 -1
- package/dist/{chunk-Y6LC5PEZ.js → chunk-C324IAXI.js} +14 -5
- package/dist/chunk-C324IAXI.js.map +1 -0
- package/dist/{chunk-NW7Y5SNK.js → chunk-CPMLMNI5.js} +4 -4
- package/dist/{chunk-NW7Y5SNK.js.map → chunk-CPMLMNI5.js.map} +1 -1
- package/dist/{chunk-DFP476EU.js → chunk-DJSGQW2Q.js} +89 -4
- package/dist/chunk-DJSGQW2Q.js.map +1 -0
- package/dist/{chunk-QCR5AE5E.js → chunk-E675QKFG.js} +5 -5
- package/dist/{chunk-QCR5AE5E.js.map → chunk-E675QKFG.js.map} +1 -1
- package/dist/{chunk-7RBFYW24.js → chunk-EMSU6L7K.js} +5 -5
- package/dist/{chunk-7RBFYW24.js.map → chunk-EMSU6L7K.js.map} +1 -1
- package/dist/{chunk-O7ADRMCR.js → chunk-FZO64PLQ.js} +45 -16
- package/dist/chunk-FZO64PLQ.js.map +1 -0
- package/dist/{chunk-I4DI5DAX.js → chunk-FZTHL6SK.js} +18 -18
- package/dist/chunk-FZTHL6SK.js.map +1 -0
- package/dist/{chunk-CMXDFTA2.js → chunk-GYPPVANR.js} +3 -3
- package/dist/{chunk-CMXDFTA2.js.map → chunk-GYPPVANR.js.map} +1 -1
- package/dist/{chunk-G44FFUMA.js → chunk-GZL6RN4Z.js} +92 -14
- package/dist/chunk-GZL6RN4Z.js.map +1 -0
- package/dist/{chunk-N65H7YYI.js → chunk-IISEBVMA.js} +5 -5
- package/dist/{chunk-N65H7YYI.js.map → chunk-IISEBVMA.js.map} +1 -1
- package/dist/{chunk-BGATDUYX.js → chunk-J45JCYS4.js} +4 -4
- package/dist/{chunk-BGATDUYX.js.map → chunk-J45JCYS4.js.map} +1 -1
- package/dist/{chunk-6ZM5X2XW.js → chunk-KVTV4LT2.js} +3 -3
- package/dist/{chunk-6ZM5X2XW.js.map → chunk-KVTV4LT2.js.map} +1 -1
- package/dist/{chunk-SAL72A7T.js → chunk-LMADWO4Q.js} +9 -6
- package/dist/chunk-LMADWO4Q.js.map +1 -0
- package/dist/{chunk-3HSLJAMJ.js → chunk-LYVLDGML.js} +3 -3
- package/dist/{chunk-3HSLJAMJ.js.map → chunk-LYVLDGML.js.map} +1 -1
- package/dist/{chunk-SGI5MRKP.js → chunk-MDCI4RSG.js} +40 -5
- package/dist/chunk-MDCI4RSG.js.map +1 -0
- package/dist/{chunk-QGA2OBUJ.js → chunk-MPO5CQUZ.js} +3 -3
- package/dist/{chunk-QGA2OBUJ.js.map → chunk-MPO5CQUZ.js.map} +1 -1
- package/dist/{chunk-KO3VSZQP.js → chunk-NDBHEOIA.js} +6 -6
- package/dist/{chunk-KO3VSZQP.js.map → chunk-NDBHEOIA.js.map} +1 -1
- package/dist/{chunk-OLZE4IHX.js → chunk-PBEDRYHP.js} +4093 -3886
- package/dist/chunk-PBEDRYHP.js.map +1 -0
- package/dist/{chunk-YMO4ZDLC.js → chunk-PLVM6OIV.js} +45 -13
- package/dist/chunk-PLVM6OIV.js.map +1 -0
- package/dist/{chunk-LZ3E6TML.js → chunk-Q5SSRVD5.js} +18 -9
- package/dist/chunk-Q5SSRVD5.js.map +1 -0
- package/dist/{chunk-4CD2R4MJ.js → chunk-QBUJTVMY.js} +4 -4
- package/dist/{chunk-4CD2R4MJ.js.map → chunk-QBUJTVMY.js.map} +1 -1
- package/dist/{chunk-REAF7ZFA.js → chunk-QIV7H3GJ.js} +398 -36
- package/dist/chunk-QIV7H3GJ.js.map +1 -0
- package/dist/{chunk-I6XH46Q6.js → chunk-RP3ML3QD.js} +3 -3
- package/dist/{chunk-I6XH46Q6.js.map → chunk-RP3ML3QD.js.map} +1 -1
- package/dist/{chunk-SVMIUCTT.js → chunk-RZRJTCP2.js} +4 -4
- package/dist/{chunk-SVMIUCTT.js.map → chunk-RZRJTCP2.js.map} +1 -1
- package/dist/{chunk-N2W7OJC6.js → chunk-S47KU4YB.js} +3 -3
- package/dist/{chunk-N2W7OJC6.js.map → chunk-S47KU4YB.js.map} +1 -1
- package/dist/{chunk-EDKTS44C.js → chunk-SME3PK4L.js} +6 -6
- package/dist/{chunk-EDKTS44C.js.map → chunk-SME3PK4L.js.map} +1 -1
- package/dist/{chunk-QW5B3TEO.js → chunk-TMQFOJ6F.js} +3 -3
- package/dist/{chunk-QW5B3TEO.js.map → chunk-TMQFOJ6F.js.map} +1 -1
- package/dist/{chunk-BB5EJLKZ.js → chunk-TUOHA6BM.js} +2 -2
- package/dist/{chunk-BB5EJLKZ.js.map → chunk-TUOHA6BM.js.map} +1 -1
- package/dist/{chunk-HLAEYFUN.js → chunk-U3FI4DVT.js} +3 -3
- package/dist/{chunk-HLAEYFUN.js.map → chunk-U3FI4DVT.js.map} +1 -1
- package/dist/{chunk-237BMOZW.js → chunk-UWD7YBDR.js} +4 -4
- package/dist/{chunk-237BMOZW.js.map → chunk-UWD7YBDR.js.map} +1 -1
- package/dist/{chunk-56PIAGD6.js → chunk-VEIWFS7Z.js} +331 -59
- package/dist/chunk-VEIWFS7Z.js.map +1 -0
- package/dist/{chunk-7O2CR5SZ.js → chunk-WEPTGUR4.js} +41 -35
- package/dist/chunk-WEPTGUR4.js.map +1 -0
- package/dist/{chunk-VT6G5AJV.js → chunk-WS3BOCAT.js} +4 -3
- package/dist/chunk-WS3BOCAT.js.map +1 -0
- package/dist/{chunk-JAGBPHXB.js → chunk-X5SGUBUV.js} +3 -3
- package/dist/{chunk-JAGBPHXB.js.map → chunk-X5SGUBUV.js.map} +1 -1
- package/dist/{chunk-62NNP7LU.js → chunk-XB4XHGIE.js} +3 -3
- package/dist/{chunk-62NNP7LU.js.map → chunk-XB4XHGIE.js.map} +1 -1
- package/dist/{chunk-VQFA5DR7.js → chunk-YPTDPN2B.js} +3 -3
- package/dist/{chunk-VQFA5DR7.js.map → chunk-YPTDPN2B.js.map} +1 -1
- package/dist/{chunk-Z5EPCIB6.js → chunk-ZUROGXJM.js} +93 -14
- package/dist/chunk-ZUROGXJM.js.map +1 -0
- package/dist/{claude-code-DS26HI3K.js → claude-code-ILZ46SLO.js} +5 -5
- package/dist/{claude-code-DS26HI3K.js.map → claude-code-ILZ46SLO.js.map} +1 -1
- package/dist/cli/index.js +277 -143
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-pins.d.ts +8 -0
- package/dist/cli/src/agent-pins.d.ts.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +4 -4
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/connector.d.ts.map +1 -1
- package/dist/cli/src/commands/deploy.d.ts.map +1 -1
- package/dist/cli/src/commands/flow.d.ts.map +1 -1
- package/dist/cli/src/commands/harness.d.ts.map +1 -1
- package/dist/cli/src/commands/integration.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +42 -0
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/patch.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/serve-preflight.d.ts +10 -0
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts +5 -3
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/session.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/store.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/config-checks.d.ts +13 -0
- package/dist/cli/src/config-checks.d.ts.map +1 -1
- package/dist/cli/src/group-help.d.ts +11 -0
- package/dist/cli/src/group-help.d.ts.map +1 -0
- package/dist/connectors/config.js +2 -2
- package/dist/connectors/index.js +17 -17
- package/dist/connectors/src/config.d.ts.map +1 -1
- package/dist/{connectors-3ST6PGWP.js → connectors-KTRUUKWG.js} +20 -20
- package/dist/{connectors-3ST6PGWP.js.map → connectors-KTRUUKWG.js.map} +1 -1
- package/dist/core/index.js +4 -4
- package/dist/core/logging.js +1 -1
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/logging/config.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +6 -0
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/run-state-ignore.d.ts +6 -4
- package/dist/core/src/run-state-ignore.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +6 -0
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +1 -1
- package/dist/deploy/index.js +4 -4
- package/dist/discovery/index.js +2 -2
- package/dist/{ensure-sources-VELKRM6X.js → ensure-sources-5QWKUIUD.js} +23 -23
- package/dist/{ensure-sources-VELKRM6X.js.map → ensure-sources-5QWKUIUD.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +17 -17
- package/dist/factory-assets/connectors/deploy.js +17 -17
- package/dist/factory-assets/connectors/devserver.js +17 -17
- package/dist/factory-assets/connectors/flow/adapter.js +17 -17
- package/dist/factory-assets/connectors/flow/engine.js +5 -5
- package/dist/factory-assets/connectors/flow/run-flow.js +18 -18
- package/dist/factory-assets/connectors/flow.js +17 -17
- package/dist/factory-assets/connectors/git.js +17 -17
- package/dist/factory-assets/connectors/gmail.js +17 -17
- package/dist/factory-assets/connectors/googledrive.js +17 -17
- package/dist/factory-assets/connectors/local.js +17 -17
- package/dist/factory-assets/connectors/mattermost.js +17 -17
- package/dist/factory-assets/connectors/memory.js +17 -17
- package/dist/factory-assets/connectors/minio.js +17 -17
- package/dist/factory-assets/connectors/postgres.js +17 -17
- package/dist/factory-assets/connectors/s3.js +17 -17
- package/dist/factory-assets/connectors/sharepoint.js +17 -17
- package/dist/factory-assets/connectors/sqlite.js +17 -17
- package/dist/factory-assets/connectors/static-server.js +17 -17
- package/dist/factory-assets/connectors/tunnel.js +17 -17
- package/dist/factory-assets/connectors/webdav.js +17 -17
- package/dist/factory-assets/connectors/xstate-store.js +17 -17
- package/dist/factory-assets/connectors/xstate.js +17 -17
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +4 -4
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +10 -10
- package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +15 -15
- package/dist/factory-assets/skills/manifest-compliance/SKILL.md +1 -1
- package/dist/{flows-I6ODIPZZ.js → flows-UCP6ZUYS.js} +7 -7
- package/dist/{flows-I6ODIPZZ.js.map → flows-UCP6ZUYS.js.map} +1 -1
- package/dist/{helpers-LWNKX56Y.js → helpers-INS4B7OQ.js} +23 -23
- package/dist/{helpers-LWNKX56Y.js.map → helpers-INS4B7OQ.js.map} +1 -1
- package/dist/library/index.js +7 -7
- package/dist/library/src/index.d.ts +1 -1
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/remote/index.d.ts +1 -1
- package/dist/library/src/remote/index.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +33 -2
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/{library-publish-WJVCT2IK.js → library-publish-AZTYRASL.js} +61 -47
- package/dist/library-publish-AZTYRASL.js.map +1 -0
- package/dist/model-endpoint/index.js +7 -7
- package/dist/model-endpoint/src/index.d.ts +1 -1
- package/dist/model-endpoint/src/index.d.ts.map +1 -1
- package/dist/model-endpoint/src/openai-agent.d.ts +60 -0
- package/dist/model-endpoint/src/openai-agent.d.ts.map +1 -0
- package/dist/model-endpoint/src/resolve.d.ts +12 -3
- package/dist/model-endpoint/src/resolve.d.ts.map +1 -1
- package/dist/model-endpoint/src/server.d.ts.map +1 -1
- package/dist/model-endpoint/src/types.d.ts +33 -0
- package/dist/model-endpoint/src/types.d.ts.map +1 -1
- package/dist/model-endpoint/src/upstream-models.d.ts +20 -0
- package/dist/model-endpoint/src/upstream-models.d.ts.map +1 -0
- package/dist/{open-library-Q7QZJY5D.js → open-library-3HMXYGUF.js} +26 -26
- package/dist/{open-library-Q7QZJY5D.js.map → open-library-3HMXYGUF.js.map} +1 -1
- package/dist/{open-registry-RZW2AFD6.js → open-registry-BHBHQMBA.js} +11 -11
- package/dist/{open-registry-RZW2AFD6.js.map → open-registry-BHBHQMBA.js.map} +1 -1
- package/dist/{paths-RPK5PNZQ.js → paths-77PXOXZY.js} +7 -7
- package/dist/{paths-RPK5PNZQ.js.map → paths-77PXOXZY.js.map} +1 -1
- package/dist/{plugin-store-OJTERUEZ.js → plugin-store-XQP2CRYH.js} +7 -7
- package/dist/{plugin-store-OJTERUEZ.js.map → plugin-store-XQP2CRYH.js.map} +1 -1
- package/dist/{project-WVPRL7CP.js → project-HVNPK2ZF.js} +39 -40
- package/dist/{project-WVPRL7CP.js.map → project-HVNPK2ZF.js.map} +1 -1
- package/dist/resolver/index.js +4 -4
- package/dist/runner/index.js +28 -28
- package/dist/runner/src/agent-loop.d.ts +42 -0
- package/dist/runner/src/agent-loop.d.ts.map +1 -0
- package/dist/runner/src/agents/in-process-host.d.ts +9 -6
- package/dist/runner/src/agents/in-process-host.d.ts.map +1 -1
- package/dist/runner/src/model-endpoint-discovery.d.ts +3 -0
- package/dist/runner/src/model-endpoint-discovery.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +6 -4
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/turn-end-contract.d.ts.map +1 -1
- package/dist/runner/src/turn-scheduler.d.ts +37 -2
- package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +11 -11
- package/dist/sdk/bridge.js +14 -14
- package/dist/sdk/core.js +4 -4
- package/dist/sdk/flow.js +5 -5
- package/dist/sdk/index.js +28 -28
- package/dist/sdk/resolver.js +4 -4
- package/dist/sdk/runner.js +28 -28
- package/dist/sdk/transport/ws/server.js +5 -5
- package/dist/sdk/transport/ws.js +5 -5
- package/dist/sdk/transport.js +5 -5
- package/dist/{serve-preflight-24YWWYUG.js → serve-preflight-NHZOKHIC.js} +27 -26
- package/dist/{serve-preflight-24YWWYUG.js.map → serve-preflight-NHZOKHIC.js.map} +1 -1
- package/dist/{setup-F5JX64UP.js → setup-EX7Z7XRN.js} +24 -24
- package/dist/{setup-F5JX64UP.js.map → setup-EX7Z7XRN.js.map} +1 -1
- package/dist/{skills-KHHW3RZ3.js → skills-DE2BDQ6G.js} +6 -6
- package/dist/{skills-KHHW3RZ3.js.map → skills-DE2BDQ6G.js.map} +1 -1
- package/dist/{source-DG5IAAGZ.js → source-URRPRGMZ.js} +39 -39
- package/dist/{source-DG5IAAGZ.js.map → source-URRPRGMZ.js.map} +1 -1
- package/dist/{source-manifest-publish-76S2JD3O.js → source-manifest-publish-ZWRYRJ2U.js} +41 -41
- package/dist/{source-manifest-publish-76S2JD3O.js.map → source-manifest-publish-ZWRYRJ2U.js.map} +1 -1
- package/dist/transport/index.js +5 -5
- package/dist/transport/ws/server.js +5 -5
- package/dist/transport/ws.js +5 -5
- package/dist/tui/index.js +29 -29
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/manifests/scaffold-body.d.ts +1 -1
- package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +20 -20
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-56PIAGD6.js.map +0 -1
- package/dist/chunk-7O2CR5SZ.js.map +0 -1
- package/dist/chunk-DFP476EU.js.map +0 -1
- package/dist/chunk-E5AZA2FL.js +0 -83
- package/dist/chunk-E5AZA2FL.js.map +0 -1
- package/dist/chunk-G44FFUMA.js.map +0 -1
- package/dist/chunk-I4DI5DAX.js.map +0 -1
- package/dist/chunk-KTBKW2FI.js.map +0 -1
- package/dist/chunk-LZ3E6TML.js.map +0 -1
- package/dist/chunk-O7ADRMCR.js.map +0 -1
- package/dist/chunk-OLZE4IHX.js.map +0 -1
- package/dist/chunk-REAF7ZFA.js.map +0 -1
- package/dist/chunk-SAL72A7T.js.map +0 -1
- package/dist/chunk-SGI5MRKP.js.map +0 -1
- package/dist/chunk-TMJBEGS4.js.map +0 -1
- package/dist/chunk-VT6G5AJV.js.map +0 -1
- package/dist/chunk-Y6LC5PEZ.js.map +0 -1
- package/dist/chunk-YMO4ZDLC.js.map +0 -1
- package/dist/chunk-Z5EPCIB6.js.map +0 -1
- package/dist/library-publish-WJVCT2IK.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { harnessSessionConfigHome, removeSessionConfigFile, writeSessionConfigFile } from '../../chunk-NBAGV6L2.js';
|
|
2
|
-
import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-
|
|
2
|
+
import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-MPO5CQUZ.js';
|
|
3
3
|
import { HARNESS_BINARIES } from '../../chunk-WWSRIT3J.js';
|
|
4
|
-
import { resolveEnvHarnessSession, continueRoleBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, entrySurface, harnessProviderName, entryBaseUrl, versionedAnthropicBaseUrl } from '../../chunk-
|
|
4
|
+
import { resolveEnvHarnessSession, continueRoleBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, entrySurface, harnessProviderName, entryBaseUrl, versionedAnthropicBaseUrl } from '../../chunk-RP3ML3QD.js';
|
|
5
5
|
import '../../chunk-5DE3DGVR.js';
|
|
6
6
|
import '../../chunk-7DN6JKP2.js';
|
|
7
|
-
import { getBridgeLogger, registryHarnessConfig } from '../../chunk-
|
|
8
|
-
import { BUILTIN_HARNESS_CATALOG, entryCredentialValue, providerCredentialEnvName } from '../../chunk-
|
|
7
|
+
import { getBridgeLogger, registryHarnessConfig } from '../../chunk-5J6N6LHL.js';
|
|
8
|
+
import { BUILTIN_HARNESS_CATALOG, entryCredentialValue, providerCredentialEnvName } from '../../chunk-7TF5MNFK.js';
|
|
9
9
|
import '../../chunk-G5SUWZEU.js';
|
|
10
10
|
import '../../chunk-6UP2EDFN.js';
|
|
11
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-4KPQ6ILH.js';
|
|
12
12
|
import '../../chunk-4GY63JU6.js';
|
|
13
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-4ROXSQEG.js';
|
|
14
14
|
import '../../chunk-5KRMNUL4.js';
|
|
15
15
|
import '../../chunk-C5HFK34M.js';
|
|
16
16
|
import '../../chunk-MWXYN6NY.js';
|
|
17
|
-
import '../../chunk-
|
|
17
|
+
import '../../chunk-FZO64PLQ.js';
|
|
18
18
|
import '../../chunk-L5VSIPQD.js';
|
|
19
19
|
import '../../chunk-VTETQCR6.js';
|
|
20
20
|
import '../../chunk-QC5BYUED.js';
|
|
@@ -23,7 +23,7 @@ import '../../chunk-RVRB27AN.js';
|
|
|
23
23
|
import '../../chunk-V5KG6CCV.js';
|
|
24
24
|
import '../../chunk-VSX2G7LA.js';
|
|
25
25
|
import { parseModelRef } from '../../chunk-RXGPFAMN.js';
|
|
26
|
-
import '../../chunk-
|
|
26
|
+
import '../../chunk-MDCI4RSG.js';
|
|
27
27
|
import '../../chunk-C3CAXQMA.js';
|
|
28
28
|
import '../../chunk-BOFL7GIF.js';
|
|
29
29
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { dispatchCapability } from '../../chunk-YEOG7CWQ.js';
|
|
2
|
-
import { AgentHarness, getBridgeLogger, registryHarnessConfig } from '../../chunk-
|
|
3
|
-
import { BUILTIN_HARNESS_CATALOG } from '../../chunk-
|
|
2
|
+
import { AgentHarness, getBridgeLogger, registryHarnessConfig } from '../../chunk-5J6N6LHL.js';
|
|
3
|
+
import { BUILTIN_HARNESS_CATALOG } from '../../chunk-7TF5MNFK.js';
|
|
4
4
|
import '../../chunk-G5SUWZEU.js';
|
|
5
5
|
import '../../chunk-6UP2EDFN.js';
|
|
6
6
|
import '../../chunk-7NN3P6VF.js';
|
|
7
7
|
import '../../chunk-VSX2G7LA.js';
|
|
8
8
|
import '../../chunk-RXGPFAMN.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-MDCI4RSG.js';
|
|
10
10
|
import '../../chunk-C3CAXQMA.js';
|
|
11
11
|
import '../../chunk-BOFL7GIF.js';
|
|
12
12
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { GeminiFamilyHarness, GeminiHarness, geminiHarnessTarget } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { GeminiFamilyHarness, GeminiHarness, geminiHarnessTarget } from '../../chunk-BDAXHJC5.js';
|
|
2
|
+
import '../../chunk-MPO5CQUZ.js';
|
|
3
|
+
import '../../chunk-3AIEJSQR.js';
|
|
4
4
|
import '../../chunk-WWSRIT3J.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-RP3ML3QD.js';
|
|
6
6
|
import '../../chunk-5DE3DGVR.js';
|
|
7
7
|
import '../../chunk-7DN6JKP2.js';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-5J6N6LHL.js';
|
|
9
|
+
import '../../chunk-7TF5MNFK.js';
|
|
10
10
|
import '../../chunk-G5SUWZEU.js';
|
|
11
11
|
import '../../chunk-6UP2EDFN.js';
|
|
12
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-WS3BOCAT.js';
|
|
13
13
|
import '../../chunk-VSX2G7LA.js';
|
|
14
14
|
import '../../chunk-RXGPFAMN.js';
|
|
15
|
-
import '../../chunk-
|
|
15
|
+
import '../../chunk-MDCI4RSG.js';
|
|
16
16
|
import '../../chunk-C3CAXQMA.js';
|
|
17
17
|
import '../../chunk-BOFL7GIF.js';
|
|
18
18
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { harnessSessionConfigHome, pruneSessionConfigDir, writeSessionConfigFile } from '../../chunk-NBAGV6L2.js';
|
|
2
|
-
import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-
|
|
2
|
+
import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-MPO5CQUZ.js';
|
|
3
3
|
import { HARNESS_BINARIES } from '../../chunk-WWSRIT3J.js';
|
|
4
|
-
import { resolveEnvHarnessSession, resolveRegistryBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds } from '../../chunk-
|
|
4
|
+
import { resolveEnvHarnessSession, resolveRegistryBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds } from '../../chunk-RP3ML3QD.js';
|
|
5
5
|
import '../../chunk-5DE3DGVR.js';
|
|
6
6
|
import '../../chunk-7DN6JKP2.js';
|
|
7
|
-
import { getBridgeLogger, registryHarnessConfig } from '../../chunk-
|
|
8
|
-
import { BUILTIN_HARNESS_CATALOG, providerCredentialEnvName } from '../../chunk-
|
|
7
|
+
import { getBridgeLogger, registryHarnessConfig } from '../../chunk-5J6N6LHL.js';
|
|
8
|
+
import { BUILTIN_HARNESS_CATALOG, providerCredentialEnvName } from '../../chunk-7TF5MNFK.js';
|
|
9
9
|
import '../../chunk-G5SUWZEU.js';
|
|
10
10
|
import '../../chunk-6UP2EDFN.js';
|
|
11
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-4KPQ6ILH.js';
|
|
12
12
|
import '../../chunk-4GY63JU6.js';
|
|
13
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-4ROXSQEG.js';
|
|
14
14
|
import '../../chunk-5KRMNUL4.js';
|
|
15
15
|
import '../../chunk-C5HFK34M.js';
|
|
16
16
|
import '../../chunk-MWXYN6NY.js';
|
|
17
|
-
import '../../chunk-
|
|
17
|
+
import '../../chunk-FZO64PLQ.js';
|
|
18
18
|
import '../../chunk-L5VSIPQD.js';
|
|
19
19
|
import '../../chunk-VTETQCR6.js';
|
|
20
20
|
import '../../chunk-QC5BYUED.js';
|
|
@@ -23,7 +23,7 @@ import '../../chunk-RVRB27AN.js';
|
|
|
23
23
|
import '../../chunk-V5KG6CCV.js';
|
|
24
24
|
import '../../chunk-VSX2G7LA.js';
|
|
25
25
|
import '../../chunk-RXGPFAMN.js';
|
|
26
|
-
import '../../chunk-
|
|
26
|
+
import '../../chunk-MDCI4RSG.js';
|
|
27
27
|
import '../../chunk-C3CAXQMA.js';
|
|
28
28
|
import '../../chunk-BOFL7GIF.js';
|
|
29
29
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { checkToolInputSchema } from '../../chunk-3X7VTCPG.js';
|
|
2
|
-
import { materializeOmpProviders, isCredentialOmissionWarning, materializeOmpIdentityDir, registryModelEntries } from '../../chunk-
|
|
2
|
+
import { materializeOmpProviders, isCredentialOmissionWarning, materializeOmpIdentityDir, registryModelEntries } from '../../chunk-CPMLMNI5.js';
|
|
3
3
|
import { dispatchCapability } from '../../chunk-YEOG7CWQ.js';
|
|
4
4
|
import { HARNESS_BINARIES } from '../../chunk-WWSRIT3J.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-RP3ML3QD.js';
|
|
6
6
|
import { RUNNER_AGENT_ENV_KEYS, ReconfigureLedger, stripRunnerPrivateEnv, classifyGenericErrorMessage } from '../../chunk-5DE3DGVR.js';
|
|
7
7
|
import { wrapAgentCommand, resolveAgentExec } from '../../chunk-7DN6JKP2.js';
|
|
8
|
-
import { AgentHarness, getBridgeLogger, TOOL_ALLOWLIST_UNSUPPORTED, registryHarnessConfig } from '../../chunk-
|
|
9
|
-
import { BUILTIN_HARNESS_CATALOG } from '../../chunk-
|
|
8
|
+
import { AgentHarness, getBridgeLogger, TOOL_ALLOWLIST_UNSUPPORTED, registryHarnessConfig } from '../../chunk-5J6N6LHL.js';
|
|
9
|
+
import { BUILTIN_HARNESS_CATALOG } from '../../chunk-7TF5MNFK.js';
|
|
10
10
|
import '../../chunk-G5SUWZEU.js';
|
|
11
11
|
import '../../chunk-6UP2EDFN.js';
|
|
12
12
|
import { withActivityLabelJsonSchema } from '../../chunk-7NN3P6VF.js';
|
|
13
13
|
import '../../chunk-VSX2G7LA.js';
|
|
14
14
|
import '../../chunk-RXGPFAMN.js';
|
|
15
|
-
import '../../chunk-
|
|
15
|
+
import '../../chunk-MDCI4RSG.js';
|
|
16
16
|
import '../../chunk-C3CAXQMA.js';
|
|
17
17
|
import '../../chunk-BOFL7GIF.js';
|
|
18
18
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -184,6 +184,35 @@ function ompStartFailureCause(lines) {
|
|
|
184
184
|
}
|
|
185
185
|
return clean.at(-1) ?? "";
|
|
186
186
|
}
|
|
187
|
+
var KILLED_EXIT_WAIT_MS = 5e3;
|
|
188
|
+
var EarlyOmpExit = class extends Error {
|
|
189
|
+
constructor(code, signal) {
|
|
190
|
+
super(`omp process crashed (exit code ${code})`);
|
|
191
|
+
this.code = code;
|
|
192
|
+
this.signal = signal;
|
|
193
|
+
}
|
|
194
|
+
code;
|
|
195
|
+
signal;
|
|
196
|
+
};
|
|
197
|
+
function removeHomeAfterExit(proc, home) {
|
|
198
|
+
let resolve;
|
|
199
|
+
const promise = new Promise((r) => {
|
|
200
|
+
resolve = r;
|
|
201
|
+
});
|
|
202
|
+
const timer = setTimeout(remove, KILLED_EXIT_WAIT_MS);
|
|
203
|
+
timer.unref?.();
|
|
204
|
+
function remove() {
|
|
205
|
+
clearTimeout(timer);
|
|
206
|
+
try {
|
|
207
|
+
rmSync(home, { recursive: true, force: true });
|
|
208
|
+
} catch {
|
|
209
|
+
}
|
|
210
|
+
resolve();
|
|
211
|
+
}
|
|
212
|
+
if (proc.exitCode !== null || proc.signalCode !== null) remove();
|
|
213
|
+
else proc.once("exit", remove);
|
|
214
|
+
return promise;
|
|
215
|
+
}
|
|
187
216
|
var OmpHarness = class extends AgentHarness {
|
|
188
217
|
harnessInfo = {
|
|
189
218
|
id: "omp",
|
|
@@ -203,6 +232,11 @@ var OmpHarness = class extends AgentHarness {
|
|
|
203
232
|
prevText = "";
|
|
204
233
|
/** OMP session ID captured via `get_state` after each turn. */
|
|
205
234
|
_ompSessionId;
|
|
235
|
+
/**
|
|
236
|
+
* The omp session the last unexpected exit left behind, set as `config.resumeSessionId` for
|
|
237
|
+
* the respawn; cleared once a respawn on it fails (the next one starts empty).
|
|
238
|
+
*/
|
|
239
|
+
exitResumeSessionId;
|
|
206
240
|
/**
|
|
207
241
|
* Usage of the most recent turn, summed over every model call in it (a tool
|
|
208
242
|
* loop is one prompt but many assistant messages). Cleared when a turn
|
|
@@ -215,12 +249,18 @@ var OmpHarness = class extends AgentHarness {
|
|
|
215
249
|
* `get_state.contextUsage.tokens` replaces it once that reply lands.
|
|
216
250
|
*/
|
|
217
251
|
_lastContextTokens = null;
|
|
252
|
+
/** USD cost of the most recent turn, summed like {@link _lastTokens}. */
|
|
253
|
+
_lastTurnCostUsd = 0;
|
|
254
|
+
/** The current turn's request failed (`message_end` with `stopReason: "error"`). */
|
|
255
|
+
turnFailed = false;
|
|
218
256
|
/** Context window of the active model, from `get_state.contextUsage`. */
|
|
219
257
|
_contextWindow = null;
|
|
220
258
|
/** Per-spawn file holding the system prompt omp was started with; removed with the process. */
|
|
221
259
|
systemPromptFile = null;
|
|
222
260
|
/** The private omp home of the running process, when it is the harness's own temporary one. */
|
|
223
261
|
privateHome = null;
|
|
262
|
+
/** Settles when the process last killed has exited and its private home is deleted. */
|
|
263
|
+
homeGone = Promise.resolve();
|
|
224
264
|
getTokenUsage() {
|
|
225
265
|
return this._lastTokens;
|
|
226
266
|
}
|
|
@@ -271,6 +311,14 @@ var OmpHarness = class extends AgentHarness {
|
|
|
271
311
|
promptTail = Promise.resolve();
|
|
272
312
|
/** `true` while `agent_end` is being delivered to listeners. */
|
|
273
313
|
turnEnded = false;
|
|
314
|
+
/** `true` once the current turn showed model output (text, a thinking delta or a tool run). */
|
|
315
|
+
turnOutputSeen = false;
|
|
316
|
+
/** `true` once `runPrompt` sent the current prompt a second time after an early exit. */
|
|
317
|
+
promptRetried = false;
|
|
318
|
+
/** `true` once omp recorded the current prompt as a user message in its session. */
|
|
319
|
+
turnUserMessageSeen = false;
|
|
320
|
+
/** Counts `kill()` calls, so a prompt that restarts omp itself can tell it was killed meanwhile. */
|
|
321
|
+
killEpoch = 0;
|
|
274
322
|
get runtimeSessionId() {
|
|
275
323
|
return this._ompSessionId;
|
|
276
324
|
}
|
|
@@ -377,9 +425,26 @@ var OmpHarness = class extends AgentHarness {
|
|
|
377
425
|
async start() {
|
|
378
426
|
if (this.startPromise) return this.startPromise;
|
|
379
427
|
if (this.proc) return;
|
|
380
|
-
this.startPromise = this._start().
|
|
428
|
+
this.startPromise = this._start().then(() => {
|
|
429
|
+
this.exitResumeSessionId = void 0;
|
|
430
|
+
}).catch(async (err) => {
|
|
381
431
|
this.removeSystemPromptFile();
|
|
382
432
|
this.removePrivateHome();
|
|
433
|
+
const resumeId = this.exitResumeSessionId;
|
|
434
|
+
if (resumeId !== void 0 && this.config.resumeSessionId === resumeId) {
|
|
435
|
+
this.log.warn("omp did not restart on its previous session; starting a new one", {
|
|
436
|
+
sessionId: resumeId,
|
|
437
|
+
error: err instanceof Error ? err.message : String(err)
|
|
438
|
+
});
|
|
439
|
+
this.exitResumeSessionId = void 0;
|
|
440
|
+
this._ompSessionId = void 0;
|
|
441
|
+
this.config = { ...this.config, resumeSessionId: void 0 };
|
|
442
|
+
return this._start().catch((retryErr) => {
|
|
443
|
+
this.removeSystemPromptFile();
|
|
444
|
+
this.removePrivateHome();
|
|
445
|
+
throw retryErr;
|
|
446
|
+
});
|
|
447
|
+
}
|
|
383
448
|
throw err;
|
|
384
449
|
});
|
|
385
450
|
return this.startPromise;
|
|
@@ -497,13 +562,50 @@ var OmpHarness = class extends AgentHarness {
|
|
|
497
562
|
}
|
|
498
563
|
const lastStderr = this.stderrBuffer.slice(-10).join("\n");
|
|
499
564
|
const crashed = code !== null && code !== 0;
|
|
500
|
-
|
|
565
|
+
const wasReady = this.ready;
|
|
566
|
+
const betweenTurns = wasReady && this.turnReject === null;
|
|
567
|
+
if (wasReady) {
|
|
568
|
+
const sessionId = this._ompSessionId;
|
|
569
|
+
if (sessionId) {
|
|
570
|
+
this.config = { ...this.config, resumeSessionId: sessionId };
|
|
571
|
+
this.exitResumeSessionId = sessionId;
|
|
572
|
+
}
|
|
573
|
+
if (betweenTurns) {
|
|
574
|
+
this.log.warn("omp exited between turns; it restarts on the next prompt", {
|
|
575
|
+
code,
|
|
576
|
+
signal,
|
|
577
|
+
resumeSessionId: sessionId ?? null,
|
|
578
|
+
stderr: lastStderr || null
|
|
579
|
+
});
|
|
580
|
+
} else if (lastStderr) {
|
|
581
|
+
this.log.warn("omp exited during a turn", { code, signal, stderr: lastStderr });
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
const resumeAttempt = !wasReady && this.exitResumeSessionId !== void 0 && this.config.resumeSessionId === this.exitResumeSessionId;
|
|
585
|
+
const wouldDuplicate = this.turnUserMessageSeen && this.config.resumeSessionId !== void 0;
|
|
586
|
+
const retryEarly = (crashed || signal !== null) && wasReady && !betweenTurns && !this.turnOutputSeen && !wouldDuplicate && !this.promptRetried && !resumeAttempt;
|
|
587
|
+
if (retryEarly) {
|
|
588
|
+
this.log.warn("omp exited in a turn before its first output", {
|
|
589
|
+
code,
|
|
590
|
+
signal,
|
|
591
|
+
stderr: lastStderr || null
|
|
592
|
+
});
|
|
593
|
+
} else if (crashed && !betweenTurns && !resumeAttempt) {
|
|
594
|
+
const sessionDir2 = path.join(this.config.cwd, ".omp", "sessions");
|
|
501
595
|
const detail = {
|
|
502
596
|
message: `omp process crashed (exit code ${code})${lastStderr ? `: ${lastStderr}` : ""}`,
|
|
503
597
|
category: "process",
|
|
504
598
|
retryable: true,
|
|
505
|
-
hint: lastStderr || "
|
|
599
|
+
hint: lastStderr || `omp exited with code ${code}${signal ? ` (signal ${signal})` : ""} and wrote nothing to stderr; its session files are in ${sessionDir2}. Try sending your prompt again.`
|
|
506
600
|
};
|
|
601
|
+
if (!lastStderr) {
|
|
602
|
+
this.log.warn("omp exited with no stderr", {
|
|
603
|
+
code,
|
|
604
|
+
signal,
|
|
605
|
+
sessionDir: sessionDir2,
|
|
606
|
+
sessionId: this._ompSessionId ?? null
|
|
607
|
+
});
|
|
608
|
+
}
|
|
507
609
|
this.emit("agent-event", { type: "error", error: detail.message, detail });
|
|
508
610
|
}
|
|
509
611
|
if (!this.ready) {
|
|
@@ -521,7 +623,7 @@ var OmpHarness = class extends AgentHarness {
|
|
|
521
623
|
}
|
|
522
624
|
this.cleanup();
|
|
523
625
|
this.rejectTurn(
|
|
524
|
-
new Error(
|
|
626
|
+
retryEarly ? new EarlyOmpExit(code, signal) : new Error(
|
|
525
627
|
crashed ? `omp process crashed (exit code ${code})` : `omp process exited before the turn completed${signal ? ` (signal ${signal})` : ""}`
|
|
526
628
|
)
|
|
527
629
|
);
|
|
@@ -942,6 +1044,12 @@ var OmpHarness = class extends AgentHarness {
|
|
|
942
1044
|
this.emit(`response:${event.id}`, event);
|
|
943
1045
|
return;
|
|
944
1046
|
}
|
|
1047
|
+
if (event.type === "message_start" && event.message?.role === "assistant" || event.type === "message_update" || event.type === "host_tool_call" || event.type === "extension_ui_request" || event.type.startsWith("tool_execution")) {
|
|
1048
|
+
this.turnOutputSeen = true;
|
|
1049
|
+
}
|
|
1050
|
+
if (event.type === "message_end" && event.message?.role === "user") {
|
|
1051
|
+
this.turnUserMessageSeen = true;
|
|
1052
|
+
}
|
|
945
1053
|
if (event.type === "host_tool_call") {
|
|
946
1054
|
this.handleHostToolCall(event);
|
|
947
1055
|
return;
|
|
@@ -1003,13 +1111,22 @@ var OmpHarness = class extends AgentHarness {
|
|
|
1003
1111
|
this.prevText = "";
|
|
1004
1112
|
}
|
|
1005
1113
|
if (event.type === "message_end") this.recordMessageUsage(event.message);
|
|
1114
|
+
if (event.type === "tool_execution_start") this.announceToolExecution(event);
|
|
1006
1115
|
if (event.type === "message_end" && event.message?.role === "assistant" && event.message.stopReason === "error") {
|
|
1007
1116
|
const error = event.message.errorMessage || "omp request failed";
|
|
1008
1117
|
const detail = this.classifyErrorMessage(error);
|
|
1009
1118
|
this.log.error("omp request failed", new Error(error), { detail });
|
|
1010
1119
|
this.emit("agent-event", { type: "error", error: detail.message, detail });
|
|
1120
|
+
this.turnFailed = true;
|
|
1011
1121
|
}
|
|
1012
1122
|
if (event.type === "agent_end") {
|
|
1123
|
+
this.emit("agent-event", {
|
|
1124
|
+
type: "result",
|
|
1125
|
+
subtype: "success",
|
|
1126
|
+
summary: this.turnFailed ? "Turn failed" : "Turn completed",
|
|
1127
|
+
costUsd: this._lastTurnCostUsd,
|
|
1128
|
+
...this._lastTokens ? { tokens: { ...this._lastTokens } } : {}
|
|
1129
|
+
});
|
|
1013
1130
|
void this.captureState();
|
|
1014
1131
|
}
|
|
1015
1132
|
const turnEnded = event.type === "agent_end";
|
|
@@ -1089,6 +1206,25 @@ var OmpHarness = class extends AgentHarness {
|
|
|
1089
1206
|
beginUsageTurn() {
|
|
1090
1207
|
this._lastTokens = null;
|
|
1091
1208
|
this._lastContextTokens = null;
|
|
1209
|
+
this._lastTurnCostUsd = 0;
|
|
1210
|
+
this.turnFailed = false;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* omp announces a tool run as `tool_execution_start`; its assistant message names the
|
|
1214
|
+
* call only in `message_end`, after the run. Publish it as `tool_call` here, like a host
|
|
1215
|
+
* tool call. Host tools already got theirs from `host_tool_call`, and `ask` becomes a
|
|
1216
|
+
* `question` through its dialog.
|
|
1217
|
+
*/
|
|
1218
|
+
announceToolExecution(event) {
|
|
1219
|
+
const name = typeof event.toolName === "string" ? event.toolName : "";
|
|
1220
|
+
if (!name || name === "ask" || this.hostToolCapabilities.has(name)) return;
|
|
1221
|
+
this.emit("agent-event", {
|
|
1222
|
+
type: "tool_call",
|
|
1223
|
+
name,
|
|
1224
|
+
tool: { name },
|
|
1225
|
+
...typeof event.toolCallId === "string" ? { toolCallId: event.toolCallId } : {},
|
|
1226
|
+
input: event.args ?? {}
|
|
1227
|
+
});
|
|
1092
1228
|
}
|
|
1093
1229
|
/**
|
|
1094
1230
|
* Fold one finished assistant message into the turn's usage. Only the
|
|
@@ -1118,6 +1254,8 @@ var OmpHarness = class extends AgentHarness {
|
|
|
1118
1254
|
add("reasoningTokens", reasoning);
|
|
1119
1255
|
add("totalTokens", total);
|
|
1120
1256
|
this._lastTokens = turn;
|
|
1257
|
+
const cost = count(message.usage.cost?.total);
|
|
1258
|
+
if (cost !== void 0) this._lastTurnCostUsd += cost;
|
|
1121
1259
|
if (callContext > 0) this._lastContextTokens = callContext;
|
|
1122
1260
|
}
|
|
1123
1261
|
nextId() {
|
|
@@ -1273,22 +1411,42 @@ ${input.text}` : input.text;
|
|
|
1273
1411
|
* Rejects if the child dies first.
|
|
1274
1412
|
*/
|
|
1275
1413
|
async runPrompt(payload) {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
this.
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1414
|
+
this.promptRetried = false;
|
|
1415
|
+
const epoch = this.killEpoch;
|
|
1416
|
+
for (; ; ) {
|
|
1417
|
+
await this.start();
|
|
1418
|
+
if (this.killEpoch !== epoch) {
|
|
1419
|
+
this.kill();
|
|
1420
|
+
throw new Error("omp process killed");
|
|
1421
|
+
}
|
|
1422
|
+
await this.reconfig.flushBeforeTurn();
|
|
1423
|
+
const id = this.nextId();
|
|
1424
|
+
const turnPromise = new Promise((resolve, reject) => {
|
|
1425
|
+
this.turnResolve = resolve;
|
|
1426
|
+
this.turnReject = reject;
|
|
1427
|
+
});
|
|
1428
|
+
this.turnOutputSeen = false;
|
|
1429
|
+
this.turnUserMessageSeen = false;
|
|
1430
|
+
this.beginUsageTurn();
|
|
1431
|
+
try {
|
|
1432
|
+
this.send({ id, type: "prompt", ...payload });
|
|
1433
|
+
} catch (err) {
|
|
1434
|
+
this.turnResolve = null;
|
|
1435
|
+
this.turnReject = null;
|
|
1436
|
+
throw err;
|
|
1437
|
+
}
|
|
1438
|
+
try {
|
|
1439
|
+
await turnPromise;
|
|
1440
|
+
return;
|
|
1441
|
+
} catch (err) {
|
|
1442
|
+
if (!(err instanceof EarlyOmpExit)) throw err;
|
|
1443
|
+
this.promptRetried = true;
|
|
1444
|
+
this.log.warn("omp exited before its first output; sending the prompt again", {
|
|
1445
|
+
code: err.code,
|
|
1446
|
+
signal: err.signal
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1290
1449
|
}
|
|
1291
|
-
await turnPromise;
|
|
1292
1450
|
}
|
|
1293
1451
|
/**
|
|
1294
1452
|
* Sends an in-band abort RPC to the omp process, requesting it to stop the
|
|
@@ -1314,18 +1472,27 @@ ${input.text}` : input.text;
|
|
|
1314
1472
|
* `OmpHarness` to start a fresh session.
|
|
1315
1473
|
*/
|
|
1316
1474
|
kill() {
|
|
1475
|
+
this.killEpoch++;
|
|
1317
1476
|
const proc = this.proc;
|
|
1318
1477
|
if (!proc) return;
|
|
1319
1478
|
if (this.turnEnded) this.resolveTurn();
|
|
1320
1479
|
else this.rejectTurn(new Error("omp process killed"));
|
|
1321
1480
|
proc.kill("SIGTERM");
|
|
1481
|
+
const home = this.privateHome;
|
|
1482
|
+
this.homeGone = home ? removeHomeAfterExit(proc, home) : Promise.resolve();
|
|
1322
1483
|
this.cleanup();
|
|
1323
1484
|
}
|
|
1485
|
+
/** Stop omp and wait until the process has exited and its private home is deleted. */
|
|
1486
|
+
async dispose() {
|
|
1487
|
+
this.kill();
|
|
1488
|
+
await this.homeGone;
|
|
1489
|
+
}
|
|
1324
1490
|
async resetSession() {
|
|
1325
1491
|
this.kill();
|
|
1326
1492
|
this.config = { ...this.config, resumeSessionId: void 0 };
|
|
1327
1493
|
this._lastTokens = null;
|
|
1328
1494
|
this._lastContextTokens = null;
|
|
1495
|
+
this._lastTurnCostUsd = 0;
|
|
1329
1496
|
this._contextWindow = null;
|
|
1330
1497
|
await this.start();
|
|
1331
1498
|
}
|