@skaile/workspaces 6.14.0 → 6.15.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 +10 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-DOG5FK7T.js → asset-feeds-PM7FKHJP.js} +6 -6
- package/dist/{asset-feeds-DOG5FK7T.js.map → asset-feeds-PM7FKHJP.js.map} +1 -1
- package/dist/asset-manager/index.js +1 -1
- package/dist/bridge/harnesses/claude-sdk.js +5 -5
- package/dist/bridge/harnesses/codex.js +3 -3
- package/dist/bridge/harnesses/continue.js +4 -4
- package/dist/bridge/harnesses/echo.js +4 -4
- package/dist/bridge/harnesses/gemini.js +5 -5
- package/dist/bridge/harnesses/goose.js +4 -4
- package/dist/bridge/harnesses/omp.js +6 -6
- package/dist/bridge/harnesses/opencode.js +5 -5
- package/dist/bridge/harnesses/qwen.js +5 -5
- package/dist/bridge/index.js +10 -10
- package/dist/{chunk-A7TM4PZZ.js → chunk-2RVEYDQK.js} +5 -5
- package/dist/{chunk-A7TM4PZZ.js.map → chunk-2RVEYDQK.js.map} +1 -1
- package/dist/{chunk-MVUXBWNW.js → chunk-6HTN2UIJ.js} +3 -3
- package/dist/{chunk-MVUXBWNW.js.map → chunk-6HTN2UIJ.js.map} +1 -1
- package/dist/{chunk-RLV3FF4I.js → chunk-6VQW2X2F.js} +6 -6
- package/dist/{chunk-RLV3FF4I.js.map → chunk-6VQW2X2F.js.map} +1 -1
- package/dist/{chunk-OC3AIMZH.js → chunk-6WIZC6GM.js} +5 -5
- package/dist/{chunk-OC3AIMZH.js.map → chunk-6WIZC6GM.js.map} +1 -1
- package/dist/{chunk-WCUT3EQR.js → chunk-72PPC4SC.js} +4 -4
- package/dist/{chunk-WCUT3EQR.js.map → chunk-72PPC4SC.js.map} +1 -1
- package/dist/{chunk-OKPITFE3.js → chunk-A3G3FHGB.js} +2 -2
- package/dist/{chunk-OKPITFE3.js.map → chunk-A3G3FHGB.js.map} +1 -1
- package/dist/{chunk-5FO4U3OL.js → chunk-A4VKIVGB.js} +4 -4
- package/dist/{chunk-5FO4U3OL.js.map → chunk-A4VKIVGB.js.map} +1 -1
- package/dist/{chunk-6ISJMEDX.js → chunk-AEFDFCS2.js} +4 -4
- package/dist/{chunk-6ISJMEDX.js.map → chunk-AEFDFCS2.js.map} +1 -1
- package/dist/{chunk-QBLS7X3Z.js → chunk-C5ZCREBI.js} +3 -3
- package/dist/{chunk-QBLS7X3Z.js.map → chunk-C5ZCREBI.js.map} +1 -1
- package/dist/{chunk-XHLRMUMO.js → chunk-CWUHUL6W.js} +3 -3
- package/dist/{chunk-XHLRMUMO.js.map → chunk-CWUHUL6W.js.map} +1 -1
- package/dist/{chunk-G2ZWIYZR.js → chunk-DFFJKGCW.js} +3 -3
- package/dist/{chunk-G2ZWIYZR.js.map → chunk-DFFJKGCW.js.map} +1 -1
- package/dist/{chunk-F6LDWA2N.js → chunk-EMIOFJQJ.js} +3 -3
- package/dist/{chunk-F6LDWA2N.js.map → chunk-EMIOFJQJ.js.map} +1 -1
- package/dist/{chunk-X66KSHZF.js → chunk-FJJEC6O2.js} +4 -4
- package/dist/{chunk-X66KSHZF.js.map → chunk-FJJEC6O2.js.map} +1 -1
- package/dist/{chunk-J3FJTH3V.js → chunk-HCIXCCUH.js} +3 -3
- package/dist/{chunk-J3FJTH3V.js.map → chunk-HCIXCCUH.js.map} +1 -1
- package/dist/{chunk-GJT2Q5XD.js → chunk-HXST2IYJ.js} +3 -3
- package/dist/{chunk-GJT2Q5XD.js.map → chunk-HXST2IYJ.js.map} +1 -1
- package/dist/{chunk-243Z3BNB.js → chunk-IRIWNKQS.js} +3 -3
- package/dist/{chunk-243Z3BNB.js.map → chunk-IRIWNKQS.js.map} +1 -1
- package/dist/{chunk-LMUNQYJQ.js → chunk-IYXOSBQ4.js} +10 -10
- package/dist/{chunk-LMUNQYJQ.js.map → chunk-IYXOSBQ4.js.map} +1 -1
- package/dist/{chunk-ZQL6HGTW.js → chunk-J7FEWDRQ.js} +4 -4
- package/dist/{chunk-ZQL6HGTW.js.map → chunk-J7FEWDRQ.js.map} +1 -1
- package/dist/{chunk-YJAKSCCN.js → chunk-JIZ35OOU.js} +3 -3
- package/dist/{chunk-YJAKSCCN.js.map → chunk-JIZ35OOU.js.map} +1 -1
- package/dist/{chunk-DWPQBMCY.js → chunk-JPV4WE5L.js} +2 -2
- package/dist/{chunk-DWPQBMCY.js.map → chunk-JPV4WE5L.js.map} +1 -1
- package/dist/{chunk-VKGNMXGZ.js → chunk-KIFAU62K.js} +3 -3
- package/dist/{chunk-VKGNMXGZ.js.map → chunk-KIFAU62K.js.map} +1 -1
- package/dist/{chunk-F7WMHDTV.js → chunk-LBJCOEXH.js} +3 -3
- package/dist/{chunk-F7WMHDTV.js.map → chunk-LBJCOEXH.js.map} +1 -1
- package/dist/{chunk-7UBCUKJO.js → chunk-MUQBP2BK.js} +2 -2
- package/dist/{chunk-7UBCUKJO.js.map → chunk-MUQBP2BK.js.map} +1 -1
- package/dist/{chunk-NAAFRZTA.js → chunk-O74SRQ3W.js} +3 -3
- package/dist/{chunk-NAAFRZTA.js.map → chunk-O74SRQ3W.js.map} +1 -1
- package/dist/{chunk-YNQRVTXH.js → chunk-OIWFXUZB.js} +4 -4
- package/dist/{chunk-YNQRVTXH.js.map → chunk-OIWFXUZB.js.map} +1 -1
- package/dist/{chunk-CFRHYD4C.js → chunk-PFBPESW7.js} +6 -6
- package/dist/{chunk-CFRHYD4C.js.map → chunk-PFBPESW7.js.map} +1 -1
- package/dist/{chunk-DYH3VSPU.js → chunk-R7422XD4.js} +7 -7
- package/dist/{chunk-DYH3VSPU.js.map → chunk-R7422XD4.js.map} +1 -1
- package/dist/{chunk-2URJ7W5X.js → chunk-RKTEHX2S.js} +3 -3
- package/dist/{chunk-2URJ7W5X.js.map → chunk-RKTEHX2S.js.map} +1 -1
- package/dist/{chunk-B6W5DCH5.js → chunk-SXRN27TU.js} +4 -4
- package/dist/{chunk-B6W5DCH5.js.map → chunk-SXRN27TU.js.map} +1 -1
- package/dist/{chunk-QNHW26AT.js → chunk-TYRAEMWE.js} +3 -3
- package/dist/{chunk-QNHW26AT.js.map → chunk-TYRAEMWE.js.map} +1 -1
- package/dist/{chunk-3BRBTQ6M.js → chunk-U7EJB6LY.js} +2 -2
- package/dist/{chunk-3BRBTQ6M.js.map → chunk-U7EJB6LY.js.map} +1 -1
- package/dist/{chunk-RRAXV5LE.js → chunk-XPSZIBPU.js} +8 -8
- package/dist/{chunk-RRAXV5LE.js.map → chunk-XPSZIBPU.js.map} +1 -1
- package/dist/{chunk-4SSTREBO.js → chunk-YDMZWVZN.js} +3 -3
- package/dist/{chunk-4SSTREBO.js.map → chunk-YDMZWVZN.js.map} +1 -1
- package/dist/{chunk-LZCX2TCZ.js → chunk-YLKOCMU7.js} +101 -55
- package/dist/chunk-YLKOCMU7.js.map +1 -0
- package/dist/{claude-code-LFAOJ3UQ.js → claude-code-5QYXWC5H.js} +4 -4
- package/dist/{claude-code-LFAOJ3UQ.js.map → claude-code-5QYXWC5H.js.map} +1 -1
- package/dist/cli/index.js +55 -55
- package/dist/connectors/index.js +12 -12
- package/dist/{connectors-KPF4UUDS.js → connectors-DLXW27NQ.js} +15 -15
- package/dist/{connectors-KPF4UUDS.js.map → connectors-DLXW27NQ.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/{ensure-sources-FOMEGCQ5.js → ensure-sources-I7GCXPXK.js} +14 -14
- package/dist/{ensure-sources-FOMEGCQ5.js.map → ensure-sources-I7GCXPXK.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +12 -12
- package/dist/factory-assets/connectors/deploy.js +12 -12
- package/dist/factory-assets/connectors/devserver.js +12 -12
- package/dist/factory-assets/connectors/flow/adapter.js +12 -12
- package/dist/factory-assets/connectors/flow/run-flow.js +13 -13
- package/dist/factory-assets/connectors/flow.js +12 -12
- package/dist/factory-assets/connectors/git.js +12 -12
- package/dist/factory-assets/connectors/gmail.js +12 -12
- package/dist/factory-assets/connectors/googledrive.js +12 -12
- package/dist/factory-assets/connectors/local.js +12 -12
- package/dist/factory-assets/connectors/mattermost.js +12 -12
- package/dist/factory-assets/connectors/memory.js +12 -12
- package/dist/factory-assets/connectors/minio.js +12 -12
- package/dist/factory-assets/connectors/postgres.js +12 -12
- package/dist/factory-assets/connectors/s3.js +12 -12
- package/dist/factory-assets/connectors/sharepoint.js +12 -12
- package/dist/factory-assets/connectors/sqlite.js +12 -12
- package/dist/factory-assets/connectors/static-server.js +12 -12
- package/dist/factory-assets/connectors/tunnel.js +12 -12
- package/dist/factory-assets/connectors/webdav.js +12 -12
- package/dist/factory-assets/connectors/xstate-store.js +12 -12
- package/dist/factory-assets/connectors/xstate.js +12 -12
- package/dist/{helpers-ZJ67FO3Z.js → helpers-U75UGGH5.js} +14 -14
- package/dist/{helpers-ZJ67FO3Z.js.map → helpers-U75UGGH5.js.map} +1 -1
- package/dist/{library-publish-RGVXGTY4.js → library-publish-57422ULT.js} +27 -27
- package/dist/{library-publish-RGVXGTY4.js.map → library-publish-57422ULT.js.map} +1 -1
- package/dist/model-endpoint/index.js +3 -3
- package/dist/{open-library-I5JHL37T.js → open-library-EVUKLOV7.js} +15 -15
- package/dist/{open-library-I5JHL37T.js.map → open-library-EVUKLOV7.js.map} +1 -1
- package/dist/{project-K5JWPIJ6.js → project-HB7OYPEF.js} +23 -23
- package/dist/{project-K5JWPIJ6.js.map → project-HB7OYPEF.js.map} +1 -1
- package/dist/runner/index.js +18 -18
- package/dist/runner/src/compaction/prompt.d.ts.map +1 -1
- package/dist/runner/src/context-usage/compose.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/work-practices.d.ts +9 -0
- package/dist/runner/src/work-practices.d.ts.map +1 -0
- package/dist/sdk/asset-manager.js +1 -1
- package/dist/sdk/bridge.js +10 -10
- package/dist/sdk/index.js +18 -18
- package/dist/sdk/runner.js +18 -18
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/{serve-preflight-L6VVCDM5.js → serve-preflight-YY3YC6GH.js} +16 -16
- package/dist/{serve-preflight-L6VVCDM5.js.map → serve-preflight-YY3YC6GH.js.map} +1 -1
- package/dist/session/index.js +2 -2
- package/dist/{setup-RXTNGML5.js → setup-2XV6T53V.js} +15 -15
- package/dist/{setup-RXTNGML5.js.map → setup-2XV6T53V.js.map} +1 -1
- package/dist/{source-2LP5W3ST.js → source-VXE3RSSA.js} +25 -25
- package/dist/{source-2LP5W3ST.js.map → source-VXE3RSSA.js.map} +1 -1
- package/dist/{source-manifest-publish-EZNCTSQF.js → source-manifest-publish-IIVQLM67.js} +27 -27
- package/dist/{source-manifest-publish-EZNCTSQF.js.map → source-manifest-publish-IIVQLM67.js.map} +1 -1
- package/dist/tui/index.js +18 -18
- package/dist/types/index.js +1 -1
- package/dist/types/src/context-usage.d.ts +1 -1
- package/dist/types/src/events.d.ts +3 -2
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +14 -14
- package/dist/workspace-plugin/adapters/omp.js +7 -7
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-LZCX2TCZ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mcpNotRunnableReason } from './chunk-
|
|
1
|
+
import { mcpNotRunnableReason } from './chunk-MUQBP2BK.js';
|
|
2
2
|
import { fetchAssetFilesFromGitHub } from './chunk-F3D25RGM.js';
|
|
3
3
|
import { isValidAssetName } from './chunk-7HRZACI4.js';
|
|
4
4
|
import { createHash } from 'crypto';
|
|
@@ -27,5 +27,5 @@ async function mcpNotRunnableHere(manifest, name, fetcher = fetchAssetFilesFromG
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { mcpNotRunnableHere, storeNotInstallableReason };
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
31
|
-
//# sourceMappingURL=chunk-
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EACT;AACF","file":"chunk-HCIXCCUH.js","sourcesContent":["/**\n * Which store entries `skaile add` can take. The store lists only what `add` can install\n * (owner decision, RCV p385): one rule for `search`, `store search`, `store show` and the\n * `manage` store feed, so a listing never offers a ref that then fails.\n *\n * Every store kind is installable (owner decision, RCW p610): `add` stages the pointer's files\n * into the store cache and deploys them (skills, agents, contracts) or composes them at session\n * start (mcp-server). Only a name that is no canonical asset name cannot be added.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { mcpNotRunnableReason } from \"@skaile/workspaces/asset-manager\";\nimport { isValidAssetName } from \"@skaile/workspaces/core\";\nimport { type AssetFetcher, fetchAssetFilesFromGitHub } from \"@skaile/workspaces/library\";\nimport type { CatalogAsset } from \"@skaile/workspaces/plugins\";\nimport type { InstallManifest } from \"@skaile/workspaces/types\";\n\n/**\n * Why `skaile add` cannot take a store row as printed, or `undefined` when it can: a name that\n * is not a canonical asset name (`UI Rendering` copied from a listing is two shell arguments\n * and no ref).\n */\nexport function storeNotInstallableReason(\n a: Pick<CatalogAsset, \"kind\" | \"name\">,\n): string | undefined {\n if (!isValidAssetName(a.name)) {\n return `the name \"${a.name}\" is not a canonical asset name, so no ref names it`;\n }\n return undefined;\n}\n\n/**\n * Why the `mcp-server` of `manifest` gets no `.mcp.json` entry from this CLI (a Nix-recipe\n * server, a placeholder url), read from its pinned `MCP.md`: the catalog row carries no manifest\n * fields. `undefined` when it would get one, or when the file cannot be fetched or does not match\n * the recorded sha256: nothing is claimed then (p1491).\n *\n * @param fetcher - Fetches the file at the pinned commit; GitHub's raw host by default.\n */\nexport async function mcpNotRunnableHere(\n manifest: Pick<InstallManifest, \"files\" | \"source\">,\n name: string,\n fetcher: AssetFetcher = fetchAssetFilesFromGitHub,\n): Promise<string | undefined> {\n const file = manifest.files.find((f) => f.path === \"MCP.md\" || f.path.endsWith(\"/MCP.md\"));\n if (!file) return undefined;\n try {\n const bytes = await fetcher({\n url: manifest.source.url,\n commitSha: manifest.source.commitSha,\n paths: [file.path],\n });\n const buf = bytes[file.path];\n if (!buf || createHash(\"sha256\").update(buf).digest(\"hex\") !== file.sha256) return undefined;\n return mcpNotRunnableReason(buf.toString(\"utf8\"), name);\n } catch {\n return undefined;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { declaresActivityLabel, stripActivityLabel } from './chunk-
|
|
1
|
+
import { declaresActivityLabel, stripActivityLabel } from './chunk-JPV4WE5L.js';
|
|
2
2
|
import { randomUUID } from 'crypto';
|
|
3
3
|
|
|
4
4
|
async function dispatchCapability(hooks, name, input, onBackgroundError = () => {
|
|
@@ -52,5 +52,5 @@ function filterRenderCapabilities(caps) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export { dispatchCapability, filterRenderCapabilities, renderFallback };
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-HXST2IYJ.js.map
|
|
56
|
+
//# sourceMappingURL=chunk-HXST2IYJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../bridge/src/capability-dispatch.ts"],"names":[],"mappings":";;;AAgFA,eAAsB,kBAAA,CACpB,KAAA,EACA,IAAA,EACA,KAAA,EACA,oBAA4D,MAAM;AAAC,CAAA,EACnE,MAAA,EACmC;AACnC,EAAA,MAAA,EAAQ,cAAA,EAAe;AACvB,EAAA,MAAM,SAAS,UAAA,EAAW;AAC1B,EAAA,MAAM,GAAA,GAAM,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA;AAI9B,EAAA,IAAI,CAAC,qBAAA,CAAsB,GAAA,EAAK,WAAW,CAAA,EAAG,KAAA,GAAQ,mBAAmB,KAAK,CAAA;AAK9E,EAAA,IAAI,GAAA,EAAK,MAAA,IAAU,KAAA,CAAM,UAAA,EAAY;AACnC,IAAA,KAAA,CAAM,UAAA,CAAW;AAAA,MACf,IAAA,EAAM,gBAAA;AAAA,MACN,cAAA,EAAg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AAK,CAAA;AAAA,EAClE,CAAC,CAAA;AACH;AAEA,SAAS,QAAA,CAAS,KAA8B,IAAA,EAAuB;AACrE,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA;AAC5B,EAAA,IAAI,OAAA,GAAmB,GAAA;AACvB,EAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACxB,IAAA,IAAI,YAAY,IAAA,IAAQ,OAAA,KAAY,MAAA,IAAa,OAAO,YAAY,QAAA,EAAU;AAC5E,MAAA,OAAO,MAAA;AAAA,IACT;AACA,IAAA,OAAA,GAAW,QAAoC,IAAI,CAAA;AAAA,EACrD;AACA,EAAA,OAAO,OAAA;AACT;AAYO,SAAS,yBAAyB,IAAA,EAAkC;AACzE,EAAA,OAAO,KAAK,MAAA,CAAO,CAAC,CAAA,KAAM,CAAA,CAAE,WAAW,MAAS,CAAA;AAClD","file":"chunk-GJT2Q5XD.js","sourcesContent":["/**\n * Capability dispatch helpers for bridge harnesses.\n *\n * The runner builds a {@link BridgeCapabilityHooks} bundle from its\n * `CapabilityRegistry` and threads it through `AgentConfig.capabilities`.\n * Harnesses consume the bundle via these helpers without taking a runtime\n * dependency on `@skaile/workspaces/runner` (which would create a circular dep).\n *\n * Three behaviours are layered into a single dispatch path:\n *\n * 1. **Standard tool call** — the LLM invokes a capability; the bridge calls\n * `hooks.invoke()`, awaits the result, and returns it to the LLM.\n * 2. **Fire-and-forget** — when the resolved Capability has `fireAndForget`\n * set, the bridge resolves to `{}` immediately and runs the handler in\n * the background. Background errors are logged but never surfaced to the\n * LLM since the call is already settled.\n * 3. **Render capability** — when the resolved Capability has a non-undefined\n * `render`, the bridge emits `RenderInvokedEvent` to the runner via\n * `hooks.emitRender` and (when `render.fallback` is set) a parallel text\n * event via `hooks.emitText` with simple `{{prop}}` substitution. The\n * placeholder convention follows the v2 spec — top-level keys of `props`\n * only, with optional dotted-path traversal (`{{user.name}}`). The legacy\n * AAP `{{props.x}}` form was retired in Phase 6.\n *\n * @category Capabilities\n * @since 2.0.0\n */\nimport { randomUUID } from \"node:crypto\";\nimport {\n type Capability,\n declaresActivityLabel,\n stripActivityLabel,\n} from \"@skaile/workspaces/types\";\nimport type { BridgeCapabilityHooks } from \"./types.js\";\n\n/**\n * Result of a capability dispatch returned by {@link dispatchCapability}.\n *\n * The bridge feeds `{ result }` back to the LLM tool-use response. For\n * fire-and-forget capabilities `result` is always `{}` and `background` is `true`.\n *\n * @docLink packages/bridge/concepts#capability-dispatch-result\n */\nexport interface CapabilityDispatchResult {\n /** Value returned to the LLM. `{}` for fire-and-forget capabilities. */\n result: unknown;\n /** True when the handler is still running in the background (fire-and-forget). */\n background: boolean;\n /** The per-dispatch call id minted for this invocation (see {@link dispatchCapability}). */\n callId: string;\n}\n\n/**\n * Run a capability invocation through the runner-provided hooks, applying\n * render-event emission and fire-and-forget short-circuit.\n *\n * The result is always shaped for direct return to the LLM. For\n * fire-and-forget capabilities the background promise is fired and any error\n * is logged through `onBackgroundError` (defaulting to a no-op). For all\n * other capabilities the handler is awaited; errors propagate as a rejection\n * so the harness can surface them as tool errors.\n *\n * **Dispatch call id.** Every dispatch mints a fresh `randomUUID()` and uses it\n * for `render_invoked.callId`, `hooks.invoke`'s `callId` and — for client\n * capabilities — the outbound `capability_invoked.callId`. It is deliberately\n * NOT the harness's tool-call id: those are only as unique as the model\n * provider makes them (some harnesses emit `call_0` on every turn), and the\n * runner's pending-call map is keyed by this id, so a late `capability_result`\n * for a timed-out call must never be able to resolve a later call that reused\n * the provider's id. Harnesses map results back to their tool calls through the\n * returned value, never through this id.\n *\n * @param hooks - Capability dispatch bundle from `AgentConfig.capabilities`.\n * @param name - Registered capability name.\n * @param input - Raw tool input from the LLM.\n * @param onBackgroundError - Optional error handler for fire-and-forget failures; receives the dispatch call id.\n * @param signal - Optional abort signal forwarded to the handler.\n * @returns Resolved dispatch result with the LLM-facing value, background flag and dispatch call id.\n * @docLink packages/bridge/concepts#dispatch-capability\n */\nexport async function dispatchCapability(\n hooks: BridgeCapabilityHooks,\n name: string,\n input: unknown,\n onBackgroundError: (err: unknown, callId: string) => void = () => {},\n signal?: AbortSignal,\n): Promise<CapabilityDispatchResult> {\n signal?.throwIfAborted();\n const callId = randomUUID();\n const cap = hooks.resolve(name);\n // The advertised `activity_label` is for the UI only. Strip it before render\n // props and the handler: strict inputs would reject it and external MCP\n // passthrough would forward it. Kept when the capability declares it itself.\n if (!declaresActivityLabel(cap?.inputSchema)) input = stripActivityLabel(input);\n\n // Render emission happens before invocation so clients see the props the\n // LLM passed in even if the handler errors. The runner's gateway forwards\n // the event over the transport.\n if (cap?.render && hooks.emitRender) {\n hooks.emitRender({\n type: \"render_invoked\",\n capabilityName: name,\n props: input,\n callId,\n });\n if (cap.render.fallback && hooks.emitText) {\n const fallback = renderFallback(cap.render.fallback, input);\n hooks.emitText(fallback);\n }\n }\n\n if (cap?.fireAndForget) {\n // Resolve immediately; run handler in background.\n void hooks.invoke(name, input, signal, callId).catch((err) => onBackgroundError(err, callId));\n return { result: {}, background: true, callId };\n }\n\n const result = await hooks.invoke(name, input, signal, callId);\n return { result, background: false, callId };\n}\n\n/**\n * Substitute `{{prop}}` placeholders inside a fallback template using the\n * input record. Top-level keys of `props` resolve directly\n * (`{{name}}` → `props.name`); dotted paths traverse nested records\n * (`{{user.name}}` → `props.user.name`). Missing keys collapse to an empty\n * string; non-record inputs collapse all placeholders.\n *\n * The convention is fixed by the v2 spec (§1, `RenderSpec.fallback`). The\n * legacy AAP form `{{props.x}}` is no longer accepted — author fallbacks\n * with bare keys.\n *\n * Intentionally minimal — full template engines belong in the platform's\n * render layer, not the bridge.\n *\n * @param template - Fallback string from `RenderSpec.fallback` with `{{key}}` placeholders.\n * @param input - LLM tool input object; non-object values collapse all placeholders.\n * @returns Template with all resolvable placeholders replaced.\n * @docLink packages/bridge/concepts#render-fallback\n */\nexport function renderFallback(template: string, input: unknown): string {\n if (!input || typeof input !== \"object\") {\n return template.replace(/\\{\\{\\s*[\\w$.]+\\s*\\}\\}/g, \"\");\n }\n const props = input as Record<string, unknown>;\n return template.replace(/\\{\\{\\s*([\\w$.]+)\\s*\\}\\}/g, (_match, path: string) => {\n const value = readPath(props, path);\n return value === undefined || value === null ? \"\" : String(value);\n });\n}\n\nfunction readPath(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split(\".\");\n let current: unknown = obj;\n for (const part of parts) {\n if (current === null || current === undefined || typeof current !== \"object\") {\n return undefined;\n }\n current = (current as Record<string, unknown>)[part];\n }\n return current;\n}\n\n/**\n * Filter a capability list to those marked as render-capable (having a `render` spec).\n *\n * Used by harnesses that emit a separate render manifest at registration time.\n * Currently unused in production harnesses; reserved for future phases.\n *\n * @param caps - Full capability list to filter.\n * @returns Subset of capabilities with a non-undefined `render` property.\n * @docLink packages/bridge/concepts#filter-render-capabilities\n */\nexport function filterRenderCapabilities(caps: Capability[]): Capability[] {\n return caps.filter((c) => c.render !== undefined);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../bridge/src/capability-dispatch.ts"],"names":[],"mappings":";;;AAgFA,eAAsB,kBAAA,CACpB,KAAA,EACA,IAAA,EACA,KAAA,EACA,oBAA4D,MAAM;AAAC,CAAA,EACnE,MAAA,EACmC;AACnC,EAAA,MAAA,EAAQ,cAAA,EAAe;AACvB,EAAA,MAAM,SAAS,UAAA,EAAW;AAC1B,EAAA,MAAM,GAAA,GAAM,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA;AAI9B,EAAA,IAAI,CAAC,qBAAA,CAAsB,GAAA,EAAK,WAAW,CAAA,EAAG,KAAA,GAAQ,mBAAmB,KAAK,CAAA;AAK9E,EAAA,IAAI,GAAA,EAAK,MAAA,IAAU,KAAA,CAAM,UAAA,EAAY;AACnC,IAAA,KAAA,CAAM,UAAA,CAAW;AAAA,MACf,IAAA,EAAM,gBAAA;AAAA,MACN,cAAA,EAAgB,IAAA;AAAA,MAChB,KAAA,EAAO,KAAA;AAAA,MACP;AAAA,KACD,CAAA;AACD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,IAAA,EAAuB;AACrE,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA;AAC5B,EAAA,IAAI,OAAA,GAAmB,GAAA;AACvB,EAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACxB,IAAA,IAAI,YAAY,IAAA,IAAQ,OAAA,KAAY,MAAA,IAAa,OAAO,YAAY,QAAA,EAAU;AAC5E,MAAA,OAAO,MAAA;AAAA,IACT;AACA,IAAA,OAAA,GAAW,QAAoC,IAAI,CAAA;AAAA,EACrD;AACA,EAAA,OAAO,OAAA;AACT;AAYO,SAAS,yBAAyB,IAAA,EAAkC;AACzE,EAAA,OAAO,KAAK,MAAA,CAAO,CAAC,CAAA,KAAM,CAAA,CAAE,WAAW,MAAS,CAAA;AAClD","file":"chunk-HXST2IYJ.js","sourcesContent":["/**\n * Capability dispatch helpers for bridge harnesses.\n *\n * The runner builds a {@link BridgeCapabilityHooks} bundle from its\n * `CapabilityRegistry` and threads it through `AgentConfig.capabilities`.\n * Harnesses consume the bundle via these helpers without taking a runtime\n * dependency on `@skaile/workspaces/runner` (which would create a circular dep).\n *\n * Three behaviours are layered into a single dispatch path:\n *\n * 1. **Standard tool call** — the LLM invokes a capability; the bridge calls\n * `hooks.invoke()`, awaits the result, and returns it to the LLM.\n * 2. **Fire-and-forget** — when the resolved Capability has `fireAndForget`\n * set, the bridge resolves to `{}` immediately and runs the handler in\n * the background. Background errors are logged but never surfaced to the\n * LLM since the call is already settled.\n * 3. **Render capability** — when the resolved Capability has a non-undefined\n * `render`, the bridge emits `RenderInvokedEvent` to the runner via\n * `hooks.emitRender` and (when `render.fallback` is set) a parallel text\n * event via `hooks.emitText` with simple `{{prop}}` substitution. The\n * placeholder convention follows the v2 spec — top-level keys of `props`\n * only, with optional dotted-path traversal (`{{user.name}}`). The legacy\n * AAP `{{props.x}}` form was retired in Phase 6.\n *\n * @category Capabilities\n * @since 2.0.0\n */\nimport { randomUUID } from \"node:crypto\";\nimport {\n type Capability,\n declaresActivityLabel,\n stripActivityLabel,\n} from \"@skaile/workspaces/types\";\nimport type { BridgeCapabilityHooks } from \"./types.js\";\n\n/**\n * Result of a capability dispatch returned by {@link dispatchCapability}.\n *\n * The bridge feeds `{ result }` back to the LLM tool-use response. For\n * fire-and-forget capabilities `result` is always `{}` and `background` is `true`.\n *\n * @docLink packages/bridge/concepts#capability-dispatch-result\n */\nexport interface CapabilityDispatchResult {\n /** Value returned to the LLM. `{}` for fire-and-forget capabilities. */\n result: unknown;\n /** True when the handler is still running in the background (fire-and-forget). */\n background: boolean;\n /** The per-dispatch call id minted for this invocation (see {@link dispatchCapability}). */\n callId: string;\n}\n\n/**\n * Run a capability invocation through the runner-provided hooks, applying\n * render-event emission and fire-and-forget short-circuit.\n *\n * The result is always shaped for direct return to the LLM. For\n * fire-and-forget capabilities the background promise is fired and any error\n * is logged through `onBackgroundError` (defaulting to a no-op). For all\n * other capabilities the handler is awaited; errors propagate as a rejection\n * so the harness can surface them as tool errors.\n *\n * **Dispatch call id.** Every dispatch mints a fresh `randomUUID()` and uses it\n * for `render_invoked.callId`, `hooks.invoke`'s `callId` and — for client\n * capabilities — the outbound `capability_invoked.callId`. It is deliberately\n * NOT the harness's tool-call id: those are only as unique as the model\n * provider makes them (some harnesses emit `call_0` on every turn), and the\n * runner's pending-call map is keyed by this id, so a late `capability_result`\n * for a timed-out call must never be able to resolve a later call that reused\n * the provider's id. Harnesses map results back to their tool calls through the\n * returned value, never through this id.\n *\n * @param hooks - Capability dispatch bundle from `AgentConfig.capabilities`.\n * @param name - Registered capability name.\n * @param input - Raw tool input from the LLM.\n * @param onBackgroundError - Optional error handler for fire-and-forget failures; receives the dispatch call id.\n * @param signal - Optional abort signal forwarded to the handler.\n * @returns Resolved dispatch result with the LLM-facing value, background flag and dispatch call id.\n * @docLink packages/bridge/concepts#dispatch-capability\n */\nexport async function dispatchCapability(\n hooks: BridgeCapabilityHooks,\n name: string,\n input: unknown,\n onBackgroundError: (err: unknown, callId: string) => void = () => {},\n signal?: AbortSignal,\n): Promise<CapabilityDispatchResult> {\n signal?.throwIfAborted();\n const callId = randomUUID();\n const cap = hooks.resolve(name);\n // The advertised `activity_label` is for the UI only. Strip it before render\n // props and the handler: strict inputs would reject it and external MCP\n // passthrough would forward it. Kept when the capability declares it itself.\n if (!declaresActivityLabel(cap?.inputSchema)) input = stripActivityLabel(input);\n\n // Render emission happens before invocation so clients see the props the\n // LLM passed in even if the handler errors. The runner's gateway forwards\n // the event over the transport.\n if (cap?.render && hooks.emitRender) {\n hooks.emitRender({\n type: \"render_invoked\",\n capabilityName: name,\n props: input,\n callId,\n });\n if (cap.render.fallback && hooks.emitText) {\n const fallback = renderFallback(cap.render.fallback, input);\n hooks.emitText(fallback);\n }\n }\n\n if (cap?.fireAndForget) {\n // Resolve immediately; run handler in background.\n void hooks.invoke(name, input, signal, callId).catch((err) => onBackgroundError(err, callId));\n return { result: {}, background: true, callId };\n }\n\n const result = await hooks.invoke(name, input, signal, callId);\n return { result, background: false, callId };\n}\n\n/**\n * Substitute `{{prop}}` placeholders inside a fallback template using the\n * input record. Top-level keys of `props` resolve directly\n * (`{{name}}` → `props.name`); dotted paths traverse nested records\n * (`{{user.name}}` → `props.user.name`). Missing keys collapse to an empty\n * string; non-record inputs collapse all placeholders.\n *\n * The convention is fixed by the v2 spec (§1, `RenderSpec.fallback`). The\n * legacy AAP form `{{props.x}}` is no longer accepted — author fallbacks\n * with bare keys.\n *\n * Intentionally minimal — full template engines belong in the platform's\n * render layer, not the bridge.\n *\n * @param template - Fallback string from `RenderSpec.fallback` with `{{key}}` placeholders.\n * @param input - LLM tool input object; non-object values collapse all placeholders.\n * @returns Template with all resolvable placeholders replaced.\n * @docLink packages/bridge/concepts#render-fallback\n */\nexport function renderFallback(template: string, input: unknown): string {\n if (!input || typeof input !== \"object\") {\n return template.replace(/\\{\\{\\s*[\\w$.]+\\s*\\}\\}/g, \"\");\n }\n const props = input as Record<string, unknown>;\n return template.replace(/\\{\\{\\s*([\\w$.]+)\\s*\\}\\}/g, (_match, path: string) => {\n const value = readPath(props, path);\n return value === undefined || value === null ? \"\" : String(value);\n });\n}\n\nfunction readPath(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split(\".\");\n let current: unknown = obj;\n for (const part of parts) {\n if (current === null || current === undefined || typeof current !== \"object\") {\n return undefined;\n }\n current = (current as Record<string, unknown>)[part];\n }\n return current;\n}\n\n/**\n * Filter a capability list to those marked as render-capable (having a `render` spec).\n *\n * Used by harnesses that emit a separate render manifest at registration time.\n * Currently unused in production harnesses; reserved for future phases.\n *\n * @param caps - Full capability list to filter.\n * @returns Subset of capabilities with a non-undefined `render` property.\n * @docLink packages/bridge/concepts#filter-render-capabilities\n */\nexport function filterRenderCapabilities(caps: Capability[]): Capability[] {\n return caps.filter((c) => c.render !== undefined);\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAccessToken, loadStoreAuthConfig, hasStoredAuth } from './chunk-
|
|
1
|
+
import { getAccessToken, loadStoreAuthConfig, hasStoredAuth } from './chunk-6WIZC6GM.js';
|
|
2
2
|
import { globalSettingsPath, mapLegacyFields } from './chunk-MEU2HHGV.js';
|
|
3
3
|
import { existsSync, readFileSync } from 'fs';
|
|
4
4
|
|
|
@@ -60,5 +60,5 @@ function isStoreAuthenticated() {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export { getStoreConfig, getStoreToken, isStoreAuthenticated, storeFetch };
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-IRIWNKQS.js.map
|
|
64
|
+
//# sourceMappingURL=chunk-IRIWNKQS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/store-client.ts"],"names":[],"mappings":";;;;AAuBO,SAAS,cAAA,GAA8B;AAC5C,EAAA,MAAM,eAAe,kBAAA,EAAmB;AACxC,EAAA,IAAI,WAAgC,E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,MAAM,UAAA,GAAa,IAAI,eAAA,EAAgB;AACvC,EAAA,MAAM,OAAA,GAAU,WAAW,MAAM,UAAA,CAAW,OAAM,EAAG,IAAA,EAAM,aAAa,IAAK,CAAA;AAC7E,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,MAAM,KAAA,CAAM,GAAA,EAAK,EAAE,GAAG,SAAA,EAAW,MAAA,EAAQ,UAAA,CAAW,MAAA,EAAQ,CAAA;AACxE,IAAA,IAAI,CAAC,IAAI,EAAA,EAAI;AACX,MAAA,MAAM,IAAA,GAAO,MAAM,GAAA,CAAI,IAAA,EAAK,CAAE,KAAA,CAAM,OAAO,EAAE,KAAA,EAAO,CAAA,KAAA,EAAQ,GAAA,CAAI,MAAM,IAAG,CAAE,CAAA;AAI3E,MAAA,MAAM,CAAA,GAAI,IAAA;AACV,MAAA,MAAM,IAAI,MAAM,CAAA,CAAE,OAAA,IAAW,EAAE,KAAA,IAAS,CAAA,iBAAA,EAAoB,GAAA,CAAI,MAAM,CAAA,CAAE,CAAA;AAAA,IAC1E;AACA,IAAA,OAAO,IAAI,IAAA,EAAK;AAAA,EAClB,CAAA,SAAE;AACA,IAAA,YAAA,CAAa,OAAO,CAAA;AAAA,EACtB;AACF;AASO,SAAS,oBAAA,GAAgC;AAC9C,EAAA,OAAO,aAAA,CAAc,qBAAqB,CAAA;AAC5C","file":"chunk-IRIWNKQS.js","sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport { globalSettingsPath, mapLegacyFields } from \"@skaile/workspaces/core\";\nimport { type AuthDeps, getAccessToken, hasStoredAuth, loadStoreAuthConfig } from \"./store-auth.ts\";\n\n/**\n * Connection configuration for the AI Asset Store API. `jwt` is normally left\n * null here and filled per-call by the caller from {@link getStoreToken} (the\n * device-flow session); it stays on the type for the `{ ...config, jwt }` spread.\n *\n * @docLink cli/dev-guide#store-client\n */\nexport interface StoreConfig {\n url: string;\n jwt: string | null;\n}\n\n/**\n * Read the store API base URL (settings `storeUrl` → `SKAILE_STORE_URL` →\n * default). Auth is not read here — it lives in the device-flow session; see\n * {@link getStoreToken}.\n *\n * @docLink cli/dev-guide#store-client\n */\nexport function getStoreConfig(): StoreConfig {\n const settingsPath = globalSettingsPath();\n let settings: Record<string, any> = {};\n if (existsSync(settingsPath)) {\n try {\n settings = mapLegacyFields(JSON.parse(readFileSync(settingsPath, \"utf-8\")));\n } catch {\n settings = {};\n }\n }\n return {\n url: settings.storeUrl ?? process.env.SKAILE_STORE_URL ?? \"https://api.skaile.store\",\n jwt: null,\n };\n}\n\n/**\n * Return a valid store access token (Keycloak device-flow session, refreshed if\n * needed). Throws a \"run `skaile store login`\" error when there is no session.\n * This is the auth source for every `/api/v1/*` publisher call.\n */\nexport function getStoreToken(deps?: AuthDeps): Promise<string> {\n return getAccessToken(loadStoreAuthConfig(), deps);\n}\n\n/**\n * Make an authenticated HTTP request to the store REST API.\n *\n * @param config - Store connection config (URL + auth token).\n * @param path - API path (e.g. `/api/assets`).\n * @param opts - Optional method, body, query params, extra headers, and\n * `timeoutMs` (default 1500). Publisher calls pass a longer timeout because\n * they trigger server-side clone/sync work.\n * @returns Parsed JSON response body.\n * @docLink cli/dev-guide#store-client\n */\nexport async function storeFetch<T = any>(\n config: StoreConfig,\n path: string,\n opts?: {\n method?: string;\n body?: unknown;\n params?: Record<string, string>;\n headers?: Record<string, string>;\n timeoutMs?: number;\n },\n): Promise<T> {\n let url = `${config.url}${path}`;\n if (opts?.params) {\n const sp = new URLSearchParams(opts.params);\n url += `?${sp}`;\n }\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n ...(opts?.headers ?? {}),\n };\n if (config.jwt) {\n headers.Authorization = `Bearer ${config.jwt}`;\n }\n\n const fetchOpts: RequestInit = {\n method: opts?.method ?? \"GET\",\n headers,\n };\n if (opts?.body) {\n fetchOpts.body = JSON.stringify(opts.body);\n }\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), opts?.timeoutMs ?? 1_500);\n try {\n const res = await fetch(url, { ...fetchOpts, signal: controller.signal });\n if (!res.ok) {\n const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));\n // Prefer the store's human-readable `message` (e.g. \"Namespace '@x' is\n // reserved … Sign in with GitHub to claim it\") over the bare `error` code\n // (`UNPROCESSABLE_CONTENT`) — the message is the actionable part.\n const b = body as { message?: string; error?: string };\n throw new Error(b.message ?? b.error ?? `Store API error: ${res.status}`);\n }\n return res.json() as Promise<T>;\n } finally {\n clearTimeout(timeout);\n }\n}\n\n/**\n * Return `true` when a store session exists (a Keycloak device-flow token cached\n * at `~/.skaile/auth.json`). Validity/refresh is resolved on use via\n * {@link getStoreToken}.\n *\n * @docLink cli/dev-guide#store-client\n */\nexport function isStoreAuthenticated(): boolean {\n return hasStoredAuth(loadStoreAuthConfig());\n}\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ompRegistryModelRefusal, renderOmpRegistry, materializeOmpProviders } from './chunk-
|
|
2
|
-
import { sessionSurfaceNotice } from './chunk-
|
|
3
|
-
import { buildCodexConfigDocument } from './chunk-
|
|
4
|
-
import { materializeOpenCodeConfig } from './chunk-
|
|
1
|
+
import { ompRegistryModelRefusal, renderOmpRegistry, materializeOmpProviders } from './chunk-J7FEWDRQ.js';
|
|
2
|
+
import { sessionSurfaceNotice } from './chunk-TYRAEMWE.js';
|
|
3
|
+
import { buildCodexConfigDocument } from './chunk-SXRN27TU.js';
|
|
4
|
+
import { materializeOpenCodeConfig } from './chunk-AEFDFCS2.js';
|
|
5
5
|
import { harnessSessionConfigHome } from './chunk-NBAGV6L2.js';
|
|
6
|
-
import { bindSingleProviderEntry, resolveEnvHarnessSession, credentialsForEveryProvider, harnessProviderName } from './chunk-
|
|
6
|
+
import { bindSingleProviderEntry, resolveEnvHarnessSession, credentialsForEveryProvider, harnessProviderName } from './chunk-O74SRQ3W.js';
|
|
7
7
|
import { HARNESS_BINARIES, resolveHarnessBinary, harnessSpawnPath, harnessSearchDirs, SDK_CLI_BINARIES, overrideVar, isExecutableFile } from './chunk-YKD2MYLU.js';
|
|
8
8
|
import { classifyClaudeSdkError, stripRunnerPrivateEnv } from './chunk-5DE3DGVR.js';
|
|
9
|
-
import { registryHarnessConfig, toMergedRegistry } from './chunk-
|
|
10
|
-
import { BUILTIN_HARNESS_CATALOG, listHarnesses, listModelsForHarness, createHarness } from './chunk-
|
|
9
|
+
import { registryHarnessConfig, toMergedRegistry } from './chunk-CWUHUL6W.js';
|
|
10
|
+
import { BUILTIN_HARNESS_CATALOG, listHarnesses, listModelsForHarness, createHarness } from './chunk-U7EJB6LY.js';
|
|
11
11
|
import { getProviderPreset, resolvePresetBaseUrl, expandPreset, resolveProbeUrl, buildCredentialHeaders, AI_PROVIDER_PRESETS } from './chunk-6UP2EDFN.js';
|
|
12
|
-
import { stripActivityLabel, TOOL_ACTIVITY_LABEL_PARAM, TOOL_ACTIVITY_LABEL_MAX_CHARS } from './chunk-
|
|
12
|
+
import { stripActivityLabel, TOOL_ACTIVITY_LABEL_PARAM, TOOL_ACTIVITY_LABEL_MAX_CHARS } from './chunk-JPV4WE5L.js';
|
|
13
13
|
import { loadHarnessSdk, sdkLookupPlaces, installCommandFor } from './chunk-MEU2HHGV.js';
|
|
14
14
|
import { registryEntries, isEntryEnabled, parseModelRef } from './chunk-RXGPFAMN.js';
|
|
15
15
|
import { openSqlite } from './chunk-RZL4TOK3.js';
|
|
@@ -1224,5 +1224,5 @@ async function validateApiKey(provider, key, options = {}) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
|
|
1226
1226
|
export { BridgeRuntime, EventNormalizer, HARNESS_SDKS, checkHarnessModel, checkModelProvider, checkModelSurface, checkOmpListedModel, checkOmpServeModel, createRuntime, detectFileChange, detectFileChanges, detectHarness, detectHarnesses, discoverHarnessModels, isUnlistedModel, labelToolCall, sdkMissingProblem, summarizeToolCall, summarizeToolResult, validateApiKey };
|
|
1227
|
-
//# sourceMappingURL=chunk-
|
|
1228
|
-
//# sourceMappingURL=chunk-
|
|
1227
|
+
//# sourceMappingURL=chunk-IYXOSBQ4.js.map
|
|
1228
|
+
//# sourceMappingURL=chunk-IYXOSBQ4.js.map
|