@skaile/workspaces 6.12.0 → 6.13.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.
Files changed (161) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/app-sdk/index.js +47 -4
  3. package/dist/app-sdk/index.js.map +1 -1
  4. package/dist/app-sdk/src/app.d.ts.map +1 -1
  5. package/dist/app-sdk/src/define-app-capability.d.ts +48 -1
  6. package/dist/app-sdk/src/define-app-capability.d.ts.map +1 -1
  7. package/dist/app-sdk/src/index.d.ts +2 -2
  8. package/dist/app-sdk/src/index.d.ts.map +1 -1
  9. package/dist/app-sdk/src/transport.d.ts +13 -1
  10. package/dist/app-sdk/src/transport.d.ts.map +1 -1
  11. package/dist/{asset-feeds-PO2WC75V.js → asset-feeds-3USSYLBS.js} +6 -6
  12. package/dist/{asset-feeds-PO2WC75V.js.map → asset-feeds-3USSYLBS.js.map} +1 -1
  13. package/dist/asset-manager/index.js +1 -1
  14. package/dist/bridge/harnesses/claude-sdk.js +5 -5
  15. package/dist/bridge/harnesses/codex.js +3 -3
  16. package/dist/bridge/harnesses/continue.js +4 -4
  17. package/dist/bridge/harnesses/echo.js +4 -4
  18. package/dist/bridge/harnesses/gemini.js +5 -5
  19. package/dist/bridge/harnesses/goose.js +4 -4
  20. package/dist/bridge/harnesses/omp.js +34 -33
  21. package/dist/bridge/harnesses/omp.js.map +1 -1
  22. package/dist/bridge/harnesses/opencode.js +4 -4
  23. package/dist/bridge/harnesses/qwen.js +5 -5
  24. package/dist/bridge/index.js +9 -9
  25. package/dist/bridge/src/harnesses/omp.d.ts +2 -0
  26. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  27. package/dist/{chunk-5M3S6DLV.js → chunk-2LDLQWYI.js} +3 -3
  28. package/dist/{chunk-5M3S6DLV.js.map → chunk-2LDLQWYI.js.map} +1 -1
  29. package/dist/{chunk-RRKJHADP.js → chunk-42CN5YMX.js} +3 -3
  30. package/dist/{chunk-RRKJHADP.js.map → chunk-42CN5YMX.js.map} +1 -1
  31. package/dist/{chunk-DKRD6CZL.js → chunk-4CNJFSCM.js} +3 -3
  32. package/dist/{chunk-DKRD6CZL.js.map → chunk-4CNJFSCM.js.map} +1 -1
  33. package/dist/{chunk-WCHGUS7X.js → chunk-4QIVQAOP.js} +4 -4
  34. package/dist/{chunk-WCHGUS7X.js.map → chunk-4QIVQAOP.js.map} +1 -1
  35. package/dist/{chunk-L74W5TVC.js → chunk-6JAFK4ZU.js} +4 -4
  36. package/dist/{chunk-L74W5TVC.js.map → chunk-6JAFK4ZU.js.map} +1 -1
  37. package/dist/{chunk-CH6UVEM5.js → chunk-6M4BE42A.js} +7 -7
  38. package/dist/{chunk-CH6UVEM5.js.map → chunk-6M4BE42A.js.map} +1 -1
  39. package/dist/{chunk-WPTNYDDS.js → chunk-6OM5QDPA.js} +8 -5
  40. package/dist/chunk-6OM5QDPA.js.map +1 -0
  41. package/dist/{chunk-FVOQPTK2.js → chunk-7MISTEMW.js} +3 -3
  42. package/dist/{chunk-FVOQPTK2.js.map → chunk-7MISTEMW.js.map} +1 -1
  43. package/dist/{chunk-6NNXBXYI.js → chunk-DOG3YBRL.js} +3 -3
  44. package/dist/{chunk-6NNXBXYI.js.map → chunk-DOG3YBRL.js.map} +1 -1
  45. package/dist/{chunk-342UX2MG.js → chunk-DWPQBMCY.js} +2 -2
  46. package/dist/{chunk-342UX2MG.js.map → chunk-DWPQBMCY.js.map} +1 -1
  47. package/dist/{chunk-FO2GU5L7.js → chunk-DY52RNLI.js} +18 -17
  48. package/dist/chunk-DY52RNLI.js.map +1 -0
  49. package/dist/{chunk-YPX7LQSW.js → chunk-ERJOSW4V.js} +6 -6
  50. package/dist/{chunk-YPX7LQSW.js.map → chunk-ERJOSW4V.js.map} +1 -1
  51. package/dist/{chunk-IPCRQWNC.js → chunk-G2ZWIYZR.js} +3 -3
  52. package/dist/{chunk-IPCRQWNC.js.map → chunk-G2ZWIYZR.js.map} +1 -1
  53. package/dist/{chunk-7ZL23M3X.js → chunk-GJT2Q5XD.js} +3 -3
  54. package/dist/{chunk-7ZL23M3X.js.map → chunk-GJT2Q5XD.js.map} +1 -1
  55. package/dist/{chunk-PZS55HOX.js → chunk-GK5H52WR.js} +3 -3
  56. package/dist/{chunk-PZS55HOX.js.map → chunk-GK5H52WR.js.map} +1 -1
  57. package/dist/{chunk-CI4I34F4.js → chunk-GUKIUBMF.js} +4 -4
  58. package/dist/{chunk-CI4I34F4.js.map → chunk-GUKIUBMF.js.map} +1 -1
  59. package/dist/{chunk-RZQCBFIU.js → chunk-JPUKRWWS.js} +2 -2
  60. package/dist/{chunk-RZQCBFIU.js.map → chunk-JPUKRWWS.js.map} +1 -1
  61. package/dist/{chunk-S6NS3I3P.js → chunk-JTJYM3XT.js} +2 -2
  62. package/dist/{chunk-S6NS3I3P.js.map → chunk-JTJYM3XT.js.map} +1 -1
  63. package/dist/{chunk-GQQIMKEP.js → chunk-L4G7AAKM.js} +8 -8
  64. package/dist/{chunk-GQQIMKEP.js.map → chunk-L4G7AAKM.js.map} +1 -1
  65. package/dist/{chunk-IIELRGIZ.js → chunk-MPBLRRPK.js} +2 -2
  66. package/dist/{chunk-IIELRGIZ.js.map → chunk-MPBLRRPK.js.map} +1 -1
  67. package/dist/{chunk-GYRIO6RA.js → chunk-MVUXBWNW.js} +3 -3
  68. package/dist/{chunk-GYRIO6RA.js.map → chunk-MVUXBWNW.js.map} +1 -1
  69. package/dist/{chunk-7O6SCI7B.js → chunk-NGJAB5OS.js} +5 -5
  70. package/dist/{chunk-7O6SCI7B.js.map → chunk-NGJAB5OS.js.map} +1 -1
  71. package/dist/{chunk-5XYZNMMC.js → chunk-NJAE5DOC.js} +3 -3
  72. package/dist/{chunk-5XYZNMMC.js.map → chunk-NJAE5DOC.js.map} +1 -1
  73. package/dist/{chunk-4NJVF3DV.js → chunk-RFYL2HRA.js} +4 -4
  74. package/dist/{chunk-4NJVF3DV.js.map → chunk-RFYL2HRA.js.map} +1 -1
  75. package/dist/{chunk-UHTCOYFJ.js → chunk-RNQ26SKJ.js} +6 -6
  76. package/dist/{chunk-UHTCOYFJ.js.map → chunk-RNQ26SKJ.js.map} +1 -1
  77. package/dist/{chunk-FECB7RI7.js → chunk-SGCSP3GI.js} +5 -5
  78. package/dist/{chunk-FECB7RI7.js.map → chunk-SGCSP3GI.js.map} +1 -1
  79. package/dist/{chunk-MRTOKIEJ.js → chunk-T73IL57H.js} +3 -3
  80. package/dist/{chunk-MRTOKIEJ.js.map → chunk-T73IL57H.js.map} +1 -1
  81. package/dist/{chunk-ZRKU7BRI.js → chunk-U2JQ2EMW.js} +3 -3
  82. package/dist/{chunk-ZRKU7BRI.js.map → chunk-U2JQ2EMW.js.map} +1 -1
  83. package/dist/{chunk-GODUKPGD.js → chunk-UDH4KZ53.js} +3 -3
  84. package/dist/{chunk-GODUKPGD.js.map → chunk-UDH4KZ53.js.map} +1 -1
  85. package/dist/{chunk-SZ3XCZHC.js → chunk-WIZZUJ6R.js} +3 -3
  86. package/dist/{chunk-SZ3XCZHC.js.map → chunk-WIZZUJ6R.js.map} +1 -1
  87. package/dist/{chunk-LXD37LHF.js → chunk-XECD7XZT.js} +4 -4
  88. package/dist/{chunk-LXD37LHF.js.map → chunk-XECD7XZT.js.map} +1 -1
  89. package/dist/{chunk-45XL75RO.js → chunk-ZAU7IXIX.js} +9 -9
  90. package/dist/{chunk-45XL75RO.js.map → chunk-ZAU7IXIX.js.map} +1 -1
  91. package/dist/{chunk-CLMIZ4N6.js → chunk-ZCKZHOOU.js} +3 -3
  92. package/dist/{chunk-CLMIZ4N6.js.map → chunk-ZCKZHOOU.js.map} +1 -1
  93. package/dist/{claude-code-TDMSETH6.js → claude-code-IQHO7PGX.js} +4 -4
  94. package/dist/{claude-code-TDMSETH6.js.map → claude-code-IQHO7PGX.js.map} +1 -1
  95. package/dist/cli/index.js +54 -54
  96. package/dist/connectors/index.js +11 -11
  97. package/dist/{connectors-IUJRBTCW.js → connectors-S4W2HZ2J.js} +14 -14
  98. package/dist/{connectors-IUJRBTCW.js.map → connectors-S4W2HZ2J.js.map} +1 -1
  99. package/dist/connectors-shared/index.js +2 -2
  100. package/dist/{ensure-sources-Q2TTZVLX.js → ensure-sources-Z4PSTQE4.js} +13 -13
  101. package/dist/{ensure-sources-Q2TTZVLX.js.map → ensure-sources-Z4PSTQE4.js.map} +1 -1
  102. package/dist/factory-assets/connectors/box.js +11 -11
  103. package/dist/factory-assets/connectors/deploy.js +11 -11
  104. package/dist/factory-assets/connectors/devserver.js +11 -11
  105. package/dist/factory-assets/connectors/flow/adapter.js +11 -11
  106. package/dist/factory-assets/connectors/flow/run-flow.js +12 -12
  107. package/dist/factory-assets/connectors/flow.js +11 -11
  108. package/dist/factory-assets/connectors/git.js +11 -11
  109. package/dist/factory-assets/connectors/gmail.js +11 -11
  110. package/dist/factory-assets/connectors/googledrive.js +11 -11
  111. package/dist/factory-assets/connectors/local.js +11 -11
  112. package/dist/factory-assets/connectors/mattermost.js +11 -11
  113. package/dist/factory-assets/connectors/memory.js +11 -11
  114. package/dist/factory-assets/connectors/minio.js +11 -11
  115. package/dist/factory-assets/connectors/postgres.js +11 -11
  116. package/dist/factory-assets/connectors/s3.js +11 -11
  117. package/dist/factory-assets/connectors/sharepoint.js +11 -11
  118. package/dist/factory-assets/connectors/sqlite.js +11 -11
  119. package/dist/factory-assets/connectors/static-server.js +11 -11
  120. package/dist/factory-assets/connectors/tunnel.js +11 -11
  121. package/dist/factory-assets/connectors/webdav.js +11 -11
  122. package/dist/factory-assets/connectors/xstate-store.js +11 -11
  123. package/dist/factory-assets/connectors/xstate.js +11 -11
  124. package/dist/{helpers-S6AQGXRH.js → helpers-I537VC5V.js} +13 -13
  125. package/dist/{helpers-S6AQGXRH.js.map → helpers-I537VC5V.js.map} +1 -1
  126. package/dist/{library-publish-7U4TJNQX.js → library-publish-IS56MNSL.js} +26 -26
  127. package/dist/{library-publish-7U4TJNQX.js.map → library-publish-IS56MNSL.js.map} +1 -1
  128. package/dist/model-endpoint/index.js +3 -3
  129. package/dist/{open-library-K6O6OVW5.js → open-library-P7ESNVXK.js} +14 -14
  130. package/dist/{open-library-K6O6OVW5.js.map → open-library-P7ESNVXK.js.map} +1 -1
  131. package/dist/{project-ZWIZZIUT.js → project-XX4ZJ3IS.js} +22 -22
  132. package/dist/{project-ZWIZZIUT.js.map → project-XX4ZJ3IS.js.map} +1 -1
  133. package/dist/runner/index.js +17 -17
  134. package/dist/runner/src/capability-registry.d.ts.map +1 -1
  135. package/dist/sdk/asset-manager.js +1 -1
  136. package/dist/sdk/bridge.js +9 -9
  137. package/dist/sdk/index.js +17 -17
  138. package/dist/sdk/runner.js +17 -17
  139. package/dist/sdk/session.js +2 -2
  140. package/dist/sdk/types.js +1 -1
  141. package/dist/{serve-preflight-E3IEZTTF.js → serve-preflight-SHTST6WR.js} +15 -15
  142. package/dist/{serve-preflight-E3IEZTTF.js.map → serve-preflight-SHTST6WR.js.map} +1 -1
  143. package/dist/session/index.js +2 -2
  144. package/dist/{setup-V4EXOMVQ.js → setup-OBBZYSBG.js} +14 -14
  145. package/dist/{setup-V4EXOMVQ.js.map → setup-OBBZYSBG.js.map} +1 -1
  146. package/dist/{source-O7XXDX55.js → source-3STGEDUY.js} +24 -24
  147. package/dist/{source-O7XXDX55.js.map → source-3STGEDUY.js.map} +1 -1
  148. package/dist/{source-manifest-publish-GUU4LX2S.js → source-manifest-publish-EL5SCBGK.js} +26 -26
  149. package/dist/{source-manifest-publish-GUU4LX2S.js.map → source-manifest-publish-EL5SCBGK.js.map} +1 -1
  150. package/dist/tui/index.js +17 -17
  151. package/dist/types/index.js +1 -1
  152. package/dist/types/src/capabilities.d.ts +26 -0
  153. package/dist/types/src/capabilities.d.ts.map +1 -1
  154. package/dist/types/src/index.d.ts +1 -1
  155. package/dist/types/src/index.d.ts.map +1 -1
  156. package/dist/workspace-plugin/adapters/mcp.js +13 -13
  157. package/dist/workspace-plugin/adapters/omp.js +7 -7
  158. package/dist/workspace-plugin/index.js +1 -1
  159. package/package.json +2 -2
  160. package/dist/chunk-FO2GU5L7.js.map +0 -1
  161. package/dist/chunk-WPTNYDDS.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { storeNotInstallableReason } from './chunk-SZ3XCZHC.js';
1
+ import { storeNotInstallableReason } from './chunk-WIZZUJ6R.js';
2
2
  import { getKnownKinds } from './chunk-HPQ2WDYC.js';
3
3
  import './chunk-WDG5IVEA.js';
4
4
  import './chunk-7RGTAEG6.js';
5
- import './chunk-IIELRGIZ.js';
5
+ import './chunk-MPBLRRPK.js';
6
6
  import './chunk-7FXOOUOC.js';
7
7
  import './chunk-DRUAQ7IY.js';
8
8
  import './chunk-CVUMZTNO.js';
@@ -60,7 +60,7 @@ function libraryEntryOf(asset) {
60
60
  async function libraryAssets() {
61
61
  const notes = [];
62
62
  try {
63
- const { openLibraryManager } = await import('./open-library-K6O6OVW5.js');
63
+ const { openLibraryManager } = await import('./open-library-P7ESNVXK.js');
64
64
  const { getKindRegistry } = await import('./open-registry-4HNCWOCN.js');
65
65
  const { scanAuthoringLibraries } = await import('./library/index.js');
66
66
  const { library: index, close } = await openLibraryManager();
@@ -94,7 +94,7 @@ async function libraryAssets() {
94
94
  async function storeAssets(projectDir) {
95
95
  const notes = [];
96
96
  try {
97
- const { resolveCatalogSource } = await import('./open-library-K6O6OVW5.js');
97
+ const { resolveCatalogSource } = await import('./open-library-P7ESNVXK.js');
98
98
  const { source, close } = await resolveCatalogSource({ projectDir });
99
99
  try {
100
100
  const assets = (await source.listAssets()).filter(
@@ -175,5 +175,5 @@ async function gatherAssetFeeds(am, projectDir) {
175
175
  }
176
176
 
177
177
  export { gatherAssetFeeds };
178
- //# sourceMappingURL=asset-feeds-PO2WC75V.js.map
179
- //# sourceMappingURL=asset-feeds-PO2WC75V.js.map
178
+ //# sourceMappingURL=asset-feeds-3USSYLBS.js.map
179
+ //# sourceMappingURL=asset-feeds-3USSYLBS.js.map
@@ -1 +1 @@
1
- {"version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EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,EAAc;AACpC,EAAA,MAAM,GAAA,GAAM,MAAM,YAAA,CAAa,EAAE,CAAA;AACjC,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA;AAAA,MACH,GAAG,IAAA,CAAK,OAAA;AAAA,MACR,GAAG,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,OAAO,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-PO2WC75V.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Four feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex`, read through\n * `scanAuthoringLibraries` (`@skaile/workspaces/library`): the same scan\n * `library index` / `search --local` use, so publishers and refs match them\n * (per-asset `publisher_overrides` honoured), `dev_paths` assets are left out,\n * and a library that fails to scan becomes one note while the rest stay listed.\n * - **Factory assets** — the bundled first-party `factory-assets` tree\n * (`factoryAssetRoots()`), scanned from disk. Always present; no network.\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogEntry,\n factoryAssetRoots,\n parseRequires,\n scanRepo,\n} from \"@skaile/workspaces/core\";\nimport { getKnownKinds } from \"./open-registry.ts\";\nimport { storeNotInstallableReason } from \"./store-addable.ts\";\nimport type { DiscoveredAsset } from \"@skaile/workspaces/discovery\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\" | \"factory\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"factory\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n /**\n * Second-level grouping label for the manage tree. Defaults (when unset) to the\n * entry's `publisher`; the source feed sets it to the source's short repo name\n * so the Sources band groups by source — \"which repo did this come from\" — not\n * by the asset-intrinsic publisher.\n */\n group?: string;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Map one discovered library asset to the `CatalogEntry` the manage rows read.\n * `publisher` is the bare per-asset publisher (what `search --local` prints),\n * `source` the manifest path. `repo` is left unset: it only feeds the Sources-tree\n * org grouping. `requires` / `dependencies` come from the manifest the way the\n * scanner fills them — string `requires:` refs parsed to `{kind, name}`, a bundle's\n * string `dependencies:` list verbatim.\n */\nfunction libraryEntryOf(asset: DiscoveredAsset): CatalogEntry {\n const { manifest } = asset;\n const nested = (manifest.metadata as Record<string, unknown> | undefined)?.requires;\n const rawRequires = manifest.requires ?? nested;\n const requireRefs =\n typeof rawRequires === \"string\"\n ? rawRequires\n : Array.isArray(rawRequires)\n ? rawRequires.filter((r): r is string => typeof r === \"string\")\n : undefined;\n const deps = manifest.dependencies;\n return {\n name: asset.name,\n kind: asset.kind as AssetKind,\n description: typeof manifest.description === \"string\" ? manifest.description : \"\",\n source: asset.manifestPath,\n publisher: asset.publisher,\n ...(asset.plugin ? { plugin: asset.plugin } : {}),\n version: asset.version,\n requires: requireRefs === undefined ? [] : parseRequires({ requires: requireRefs }),\n dependencies:\n asset.kind === \"bundle\" && Array.isArray(deps)\n ? deps.filter((d): d is string => typeof d === \"string\" && d.length > 0)\n : [],\n };\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/cache/sources/` cache) through\n * `scanAuthoringLibraries`, grouped under the bare library name\n * (`group: <name>`) so the manage TUI shows a clean `<name>` band — no\n * `library:` prefix (mirrors the source feed). Plugin grouping (`entry.plugin`)\n * comes from `DiscoveredAsset.plugin`. A library whose scan fails becomes one\n * `FeedNote`; the outer `catch` covers only opening the index.\n */\nasync function libraryAssets(): Promise<{\n entries: OriginEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n // Lazy: the library subpath pulls in SQLite, which the other feeds never need.\n const { openLibraryManager } = await import(\"./open-library.ts\");\n const { getKindRegistry } = await import(\"./open-registry.ts\");\n const { scanAuthoringLibraries } = await import(\"@skaile/workspaces/library\");\n const { library: index, close } = await openLibraryManager();\n try {\n const entries: OriginEntry[] = [];\n for (const scan of await scanAuthoringLibraries(index, getKindRegistry())) {\n if (scan.error !== undefined) {\n notes.push({ feed: \"libraries\", message: `${scan.library.name}: ${scan.error}` });\n continue;\n }\n for (const asset of scan.assets) {\n entries.push({\n origin: \"library\",\n entry: libraryEntryOf(asset),\n group: scan.library.name,\n });\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n // The store lists only what `skaile add` can install (see store-addable.ts).\n const assets = (await source.listAssets()).filter(\n (a) => storeNotInstallableReason(a) === undefined,\n );\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n plugin: a.plugin,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/** The slice of `AssetManager` the source feed needs (kept narrow for tests). */\ninterface AssetManagerLike {\n search: () => Promise<CatalogEntry[]>;\n searchRepoRoots: () => { repoName: string; root: string }[];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Plugin grouping\n * (`entry.plugin`) is stamped by the scanner, so entries pass through as-is.\n */\nasync function sourceAssets(am: AssetManagerLike): Promise<OriginEntry[]> {\n // The bundled factory tree is injected into the repositories map as an implicit\n // source, so `am.search()` returns it too. It has its own `factory` origin band,\n // so drop it here — otherwise the same first-party skills list twice under Sources.\n const factoryPrefixes = factoryAssetRoots().map((r) => (r.endsWith(path.sep) ? r : r + path.sep));\n const isFactoryPath = (p: string) =>\n factoryPrefixes.some((fp) => p === fp.slice(0, -1) || p.startsWith(fp));\n\n const all = (await am.search()).filter((e) => !isFactoryPath(e.source));\n const entries: OriginEntry[] = [];\n // Group each source's entries under the source node (its short repo name), not\n // the publisher: under Sources the navigational question is \"which repo did\n // this come from\". Each entry's `source` (absolute manifest path) lives under\n // exactly one declared root, so group by prefix. The cache slug is\n // URL-keyed `github.com/<org>/<repo>` — take the trailing segment.\n for (const { repoName, root } of am.searchRepoRoots()) {\n if (isFactoryPath(root)) continue;\n const prefix = root.endsWith(path.sep) ? root : root + path.sep;\n const owned = all.filter((e) => e.source === root || e.source.startsWith(prefix));\n if (owned.length === 0) continue;\n const sourceName = repoName.split(\"/\").pop() || repoName;\n for (const entry of owned) entries.push({ origin: \"source\", entry, group: sourceName });\n }\n return entries;\n}\n\n/**\n * Factory-asset feed: scan the bundled first-party `factory-assets` tree(s)\n * resolved by `factoryAssetRoots()` (the `SKAILE_FACTORY_ASSETS_DIR` override\n * layer ahead of the bundled tree). Local disk only, no network — the entries are\n * the built-in skills / connectors / bundles that ship with `@skaile/workspaces`.\n * `factoryAssetRoots()` already dedupes, so the env override pointing at the\n * bundled dir collapses to one root.\n */\nasync function factoryAssets(): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n entries.push(...(await scanRepo(root, \"skaile-factory\", { knownKinds: getKnownKinds() })));\n }\n return { entries, notes };\n } catch (err) {\n notes.push({\n feed: \"factory\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk. The factory\n * scan is local disk only, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: AssetManagerLike,\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = await factoryAssets();\n const src = await sourceAssets(am);\n return {\n entries: [\n ...src,\n ...libs.entries,\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,eAAe,KAAA,EAAsC;AAC5D,EAAA,MAAM,EAAE,UAAS,GAAI,KAAA;AACrB,EAAA,MAAM,MAAA,GAAU,SAAS,QAAA,EAAkD,QAAA;AAC3E,EAAA,MAAM,WAAA,GAAc,SAAS,QAAA,IAAY,MAAA;AACzC,EAAA,MAAM,cACJ,OAAO,WAAA,KAAgB,QAAA,GACnB,WAAA,GACA,MAAM,OAAA,CAAQ,WAAW,CAAA,GACvB,WAAA,CAAY,OAAO,CAAC,CAAA,KAAmB,OAAO,CAAA,KAAM,QAAQ,CAAA,GAC5D,MAAA;AACR,EAAA,MAAM,OAAO,QAAA,CAAS,YAAA;AACtB,EAAA,OAAO;AAAA,IACL,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,aAAa,OAAO,QAAA,CAAS,WAAA,KAAgB,QAAA,GAAW,SAAS,WAAA,GAAc,EAAA;AAAA,IAC/E,QAAQ,KAAA,CAAM,YAAA;AAAA,IACd,WAAW,KAAA,CAAM,SAAA;AAAA,IACjB,GAAI,MAAM,MAAA,GAAS,EAAE,QAAQ,KAAA,CAAM,MAAA,KAAW,EAAC;AAAA,IAC/C,SAAS,KAAA,CAAM,OAAA;AAAA,IACf,QAAA,EAAU,gBAAgB,MAAA,GAAY,KAAK,aAAA,CAAc,EAAE,QAAA,EAAU,WAAA,EAAa,CAAA;AAAA,IAClF,cACE,KAAA,CAAM,IAAA,KAAS,YAAY,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,GACzC,IAAA,CAAK,OAAO,CAAC,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AA;AACnD;AASA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,EAAc;AACpC,EAAA,MAAM,GAAA,GAAM,MAAM,YAAA,CAAa,EAAE,CAAA;AACjC,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA;AAAA,MACH,GAAG,IAAA,CAAK,OAAA;AAAA,MACR,GAAG,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,OAAO,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-3USSYLBS.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Four feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex`, read through\n * `scanAuthoringLibraries` (`@skaile/workspaces/library`): the same scan\n * `library index` / `search --local` use, so publishers and refs match them\n * (per-asset `publisher_overrides` honoured), `dev_paths` assets are left out,\n * and a library that fails to scan becomes one note while the rest stay listed.\n * - **Factory assets** — the bundled first-party `factory-assets` tree\n * (`factoryAssetRoots()`), scanned from disk. Always present; no network.\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogEntry,\n factoryAssetRoots,\n parseRequires,\n scanRepo,\n} from \"@skaile/workspaces/core\";\nimport { getKnownKinds } from \"./open-registry.ts\";\nimport { storeNotInstallableReason } from \"./store-addable.ts\";\nimport type { DiscoveredAsset } from \"@skaile/workspaces/discovery\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\" | \"factory\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"factory\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n /**\n * Second-level grouping label for the manage tree. Defaults (when unset) to the\n * entry's `publisher`; the source feed sets it to the source's short repo name\n * so the Sources band groups by source — \"which repo did this come from\" — not\n * by the asset-intrinsic publisher.\n */\n group?: string;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Map one discovered library asset to the `CatalogEntry` the manage rows read.\n * `publisher` is the bare per-asset publisher (what `search --local` prints),\n * `source` the manifest path. `repo` is left unset: it only feeds the Sources-tree\n * org grouping. `requires` / `dependencies` come from the manifest the way the\n * scanner fills them — string `requires:` refs parsed to `{kind, name}`, a bundle's\n * string `dependencies:` list verbatim.\n */\nfunction libraryEntryOf(asset: DiscoveredAsset): CatalogEntry {\n const { manifest } = asset;\n const nested = (manifest.metadata as Record<string, unknown> | undefined)?.requires;\n const rawRequires = manifest.requires ?? nested;\n const requireRefs =\n typeof rawRequires === \"string\"\n ? rawRequires\n : Array.isArray(rawRequires)\n ? rawRequires.filter((r): r is string => typeof r === \"string\")\n : undefined;\n const deps = manifest.dependencies;\n return {\n name: asset.name,\n kind: asset.kind as AssetKind,\n description: typeof manifest.description === \"string\" ? manifest.description : \"\",\n source: asset.manifestPath,\n publisher: asset.publisher,\n ...(asset.plugin ? { plugin: asset.plugin } : {}),\n version: asset.version,\n requires: requireRefs === undefined ? [] : parseRequires({ requires: requireRefs }),\n dependencies:\n asset.kind === \"bundle\" && Array.isArray(deps)\n ? deps.filter((d): d is string => typeof d === \"string\" && d.length > 0)\n : [],\n };\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/cache/sources/` cache) through\n * `scanAuthoringLibraries`, grouped under the bare library name\n * (`group: <name>`) so the manage TUI shows a clean `<name>` band — no\n * `library:` prefix (mirrors the source feed). Plugin grouping (`entry.plugin`)\n * comes from `DiscoveredAsset.plugin`. A library whose scan fails becomes one\n * `FeedNote`; the outer `catch` covers only opening the index.\n */\nasync function libraryAssets(): Promise<{\n entries: OriginEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n // Lazy: the library subpath pulls in SQLite, which the other feeds never need.\n const { openLibraryManager } = await import(\"./open-library.ts\");\n const { getKindRegistry } = await import(\"./open-registry.ts\");\n const { scanAuthoringLibraries } = await import(\"@skaile/workspaces/library\");\n const { library: index, close } = await openLibraryManager();\n try {\n const entries: OriginEntry[] = [];\n for (const scan of await scanAuthoringLibraries(index, getKindRegistry())) {\n if (scan.error !== undefined) {\n notes.push({ feed: \"libraries\", message: `${scan.library.name}: ${scan.error}` });\n continue;\n }\n for (const asset of scan.assets) {\n entries.push({\n origin: \"library\",\n entry: libraryEntryOf(asset),\n group: scan.library.name,\n });\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n // The store lists only what `skaile add` can install (see store-addable.ts).\n const assets = (await source.listAssets()).filter(\n (a) => storeNotInstallableReason(a) === undefined,\n );\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n plugin: a.plugin,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/** The slice of `AssetManager` the source feed needs (kept narrow for tests). */\ninterface AssetManagerLike {\n search: () => Promise<CatalogEntry[]>;\n searchRepoRoots: () => { repoName: string; root: string }[];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Plugin grouping\n * (`entry.plugin`) is stamped by the scanner, so entries pass through as-is.\n */\nasync function sourceAssets(am: AssetManagerLike): Promise<OriginEntry[]> {\n // The bundled factory tree is injected into the repositories map as an implicit\n // source, so `am.search()` returns it too. It has its own `factory` origin band,\n // so drop it here — otherwise the same first-party skills list twice under Sources.\n const factoryPrefixes = factoryAssetRoots().map((r) => (r.endsWith(path.sep) ? r : r + path.sep));\n const isFactoryPath = (p: string) =>\n factoryPrefixes.some((fp) => p === fp.slice(0, -1) || p.startsWith(fp));\n\n const all = (await am.search()).filter((e) => !isFactoryPath(e.source));\n const entries: OriginEntry[] = [];\n // Group each source's entries under the source node (its short repo name), not\n // the publisher: under Sources the navigational question is \"which repo did\n // this come from\". Each entry's `source` (absolute manifest path) lives under\n // exactly one declared root, so group by prefix. The cache slug is\n // URL-keyed `github.com/<org>/<repo>` — take the trailing segment.\n for (const { repoName, root } of am.searchRepoRoots()) {\n if (isFactoryPath(root)) continue;\n const prefix = root.endsWith(path.sep) ? root : root + path.sep;\n const owned = all.filter((e) => e.source === root || e.source.startsWith(prefix));\n if (owned.length === 0) continue;\n const sourceName = repoName.split(\"/\").pop() || repoName;\n for (const entry of owned) entries.push({ origin: \"source\", entry, group: sourceName });\n }\n return entries;\n}\n\n/**\n * Factory-asset feed: scan the bundled first-party `factory-assets` tree(s)\n * resolved by `factoryAssetRoots()` (the `SKAILE_FACTORY_ASSETS_DIR` override\n * layer ahead of the bundled tree). Local disk only, no network — the entries are\n * the built-in skills / connectors / bundles that ship with `@skaile/workspaces`.\n * `factoryAssetRoots()` already dedupes, so the env override pointing at the\n * bundled dir collapses to one root.\n */\nasync function factoryAssets(): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n entries.push(...(await scanRepo(root, \"skaile-factory\", { knownKinds: getKnownKinds() })));\n }\n return { entries, notes };\n } catch (err) {\n notes.push({\n feed: \"factory\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk. The factory\n * scan is local disk only, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: AssetManagerLike,\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = await factoryAssets();\n const src = await sourceAssets(am);\n return {\n entries: [\n ...src,\n ...libs.entries,\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- export { AssetManager, LibraryEntryError, MissingManifestError, harnessSwitchKeptKey, harnessSwitchStateFile, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, readHarnessSwitchState, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName, writeHarnessSwitchState } from '../chunk-IIELRGIZ.js';
1
+ export { AssetManager, LibraryEntryError, MissingManifestError, harnessSwitchKeptKey, harnessSwitchStateFile, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, readHarnessSwitchState, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName, writeHarnessSwitchState } from '../chunk-MPBLRRPK.js';
2
2
  import '../chunk-7FXOOUOC.js';
3
3
  import '../chunk-DRUAQ7IY.js';
4
4
  import '../chunk-CVUMZTNO.js';
@@ -1,16 +1,16 @@
1
1
  import { formatDroppedToolsNotice, filterInProcessMcpServerTools, checkToolPropertyKeys, TOOL_PROPERTY_KEY_PATTERN } from '../../chunk-3X7VTCPG.js';
2
2
  import { AskSlots } from '../../chunk-3TG2NV2F.js';
3
- import { scrubPoisonedTranscript, transcriptStoreForRuntime, resolveClaudeConfigDir, unsupportedSurfaceNotice, claudeEndpointMode, buildClaudeEndpointEnv, APPROVE_ONCE, DENY } from '../../chunk-MRTOKIEJ.js';
3
+ import { scrubPoisonedTranscript, transcriptStoreForRuntime, resolveClaudeConfigDir, unsupportedSurfaceNotice, claudeEndpointMode, buildClaudeEndpointEnv, APPROVE_ONCE, DENY } from '../../chunk-T73IL57H.js';
4
4
  import { freshBudget, isFirstAttempt, spend, isSpent, decide, isAvailable } from '../../chunk-7EKQDY2T.js';
5
- import { dispatchCapability } from '../../chunk-7ZL23M3X.js';
5
+ import { dispatchCapability } from '../../chunk-GJT2Q5XD.js';
6
6
  import { fetchProviderModels } from '../../chunk-ESUF2ZYT.js';
7
7
  import { ReconfigureLedger, AuthError, stripRunnerPrivateEnv, classifyClaudeSdkError, reclassifyAuthAsAccountUnavailable, AccountUnavailableError, isLongContextEntitlementRejection, LONG_CONTEXT_CREDITS_API_ERROR } from '../../chunk-5DE3DGVR.js';
8
8
  import { agentExecRequested, wrapAgentCommand, resolveAgentExec } from '../../chunk-7DN6JKP2.js';
9
- import { AgentHarness, getBridgeLogger, registryHarnessConfig } from '../../chunk-PZS55HOX.js';
10
- import { BUILTIN_HARNESS_CATALOG, entryCredentialValue } from '../../chunk-S6NS3I3P.js';
9
+ import { AgentHarness, getBridgeLogger, registryHarnessConfig } from '../../chunk-GK5H52WR.js';
10
+ import { BUILTIN_HARNESS_CATALOG, entryCredentialValue } from '../../chunk-JTJYM3XT.js';
11
11
  import '../../chunk-G5SUWZEU.js';
12
12
  import '../../chunk-6UP2EDFN.js';
13
- import { withActivityLabelShape } from '../../chunk-342UX2MG.js';
13
+ import { withActivityLabelShape } from '../../chunk-DWPQBMCY.js';
14
14
  import '../../chunk-LCXQ4LVP.js';
15
15
  import { loadHarnessSdk } from '../../chunk-MEU2HHGV.js';
16
16
  import '../../chunk-4GY63JU6.js';
@@ -1,11 +1,11 @@
1
- export { CodexHarness, checkCodexCredential, codexHarnessTarget, isManagedCodexConfig } from '../../chunk-WCHGUS7X.js';
1
+ export { CodexHarness, checkCodexCredential, codexHarnessTarget, isManagedCodexConfig } from '../../chunk-4QIVQAOP.js';
2
2
  import '../../chunk-5KSGZP3E.js';
3
3
  import '../../chunk-7EKQDY2T.js';
4
4
  import '../../chunk-ESUF2ZYT.js';
5
5
  import '../../chunk-5DE3DGVR.js';
6
6
  import '../../chunk-7DN6JKP2.js';
7
- import '../../chunk-PZS55HOX.js';
8
- import '../../chunk-S6NS3I3P.js';
7
+ import '../../chunk-GK5H52WR.js';
8
+ import '../../chunk-JTJYM3XT.js';
9
9
  import '../../chunk-G5SUWZEU.js';
10
10
  import '../../chunk-6UP2EDFN.js';
11
11
  import '../../chunk-LCXQ4LVP.js';
@@ -1,11 +1,11 @@
1
1
  import { harnessSessionConfigHome, removeSessionConfigFile, writeSessionConfigFile } from '../../chunk-NBAGV6L2.js';
2
- import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-GODUKPGD.js';
2
+ import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-UDH4KZ53.js';
3
3
  import { HARNESS_BINARIES } from '../../chunk-WWSRIT3J.js';
4
- import { resolveEnvHarnessSession, continueRoleBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, entrySurface, harnessProviderName, entryBaseUrl, versionedAnthropicBaseUrl } from '../../chunk-CLMIZ4N6.js';
4
+ import { resolveEnvHarnessSession, continueRoleBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, entrySurface, harnessProviderName, entryBaseUrl, versionedAnthropicBaseUrl } from '../../chunk-ZCKZHOOU.js';
5
5
  import '../../chunk-5DE3DGVR.js';
6
6
  import '../../chunk-7DN6JKP2.js';
7
- import { getBridgeLogger, registryHarnessConfig } from '../../chunk-PZS55HOX.js';
8
- import { BUILTIN_HARNESS_CATALOG, entryCredentialValue, providerCredentialEnvName } from '../../chunk-S6NS3I3P.js';
7
+ import { getBridgeLogger, registryHarnessConfig } from '../../chunk-GK5H52WR.js';
8
+ import { BUILTIN_HARNESS_CATALOG, entryCredentialValue, providerCredentialEnvName } from '../../chunk-JTJYM3XT.js';
9
9
  import '../../chunk-G5SUWZEU.js';
10
10
  import '../../chunk-6UP2EDFN.js';
11
11
  import '../../chunk-MEU2HHGV.js';
@@ -1,9 +1,9 @@
1
- import { dispatchCapability } from '../../chunk-7ZL23M3X.js';
2
- import { AgentHarness, getBridgeLogger, registryHarnessConfig } from '../../chunk-PZS55HOX.js';
3
- import { BUILTIN_HARNESS_CATALOG } from '../../chunk-S6NS3I3P.js';
1
+ import { dispatchCapability } from '../../chunk-GJT2Q5XD.js';
2
+ import { AgentHarness, getBridgeLogger, registryHarnessConfig } from '../../chunk-GK5H52WR.js';
3
+ import { BUILTIN_HARNESS_CATALOG } from '../../chunk-JTJYM3XT.js';
4
4
  import '../../chunk-G5SUWZEU.js';
5
5
  import '../../chunk-6UP2EDFN.js';
6
- import '../../chunk-342UX2MG.js';
6
+ import '../../chunk-DWPQBMCY.js';
7
7
  import '../../chunk-VSX2G7LA.js';
8
8
  import '../../chunk-RXGPFAMN.js';
9
9
  import '../../chunk-RZL4TOK3.js';
@@ -1,12 +1,12 @@
1
- export { GeminiFamilyHarness, GeminiHarness, geminiHarnessTarget } from '../../chunk-YPX7LQSW.js';
2
- import '../../chunk-GODUKPGD.js';
1
+ export { GeminiFamilyHarness, GeminiHarness, geminiHarnessTarget } from '../../chunk-ERJOSW4V.js';
2
+ import '../../chunk-UDH4KZ53.js';
3
3
  import '../../chunk-ESUF2ZYT.js';
4
4
  import '../../chunk-WWSRIT3J.js';
5
- import '../../chunk-CLMIZ4N6.js';
5
+ import '../../chunk-ZCKZHOOU.js';
6
6
  import '../../chunk-5DE3DGVR.js';
7
7
  import '../../chunk-7DN6JKP2.js';
8
- import '../../chunk-PZS55HOX.js';
9
- import '../../chunk-S6NS3I3P.js';
8
+ import '../../chunk-GK5H52WR.js';
9
+ import '../../chunk-JTJYM3XT.js';
10
10
  import '../../chunk-G5SUWZEU.js';
11
11
  import '../../chunk-6UP2EDFN.js';
12
12
  import '../../chunk-LCXQ4LVP.js';
@@ -1,11 +1,11 @@
1
1
  import { harnessSessionConfigHome, pruneSessionConfigDir, writeSessionConfigFile } from '../../chunk-NBAGV6L2.js';
2
- import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-GODUKPGD.js';
2
+ import { SubprocessCliHarness, extractText, extractCost, extractTokens } from '../../chunk-UDH4KZ53.js';
3
3
  import { HARNESS_BINARIES } from '../../chunk-WWSRIT3J.js';
4
- import { resolveEnvHarnessSession, resolveRegistryBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds } from '../../chunk-CLMIZ4N6.js';
4
+ import { resolveEnvHarnessSession, resolveRegistryBinding, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds } from '../../chunk-ZCKZHOOU.js';
5
5
  import '../../chunk-5DE3DGVR.js';
6
6
  import '../../chunk-7DN6JKP2.js';
7
- import { getBridgeLogger, registryHarnessConfig } from '../../chunk-PZS55HOX.js';
8
- import { BUILTIN_HARNESS_CATALOG, providerCredentialEnvName } from '../../chunk-S6NS3I3P.js';
7
+ import { getBridgeLogger, registryHarnessConfig } from '../../chunk-GK5H52WR.js';
8
+ import { BUILTIN_HARNESS_CATALOG, providerCredentialEnvName } from '../../chunk-JTJYM3XT.js';
9
9
  import '../../chunk-G5SUWZEU.js';
10
10
  import '../../chunk-6UP2EDFN.js';
11
11
  import '../../chunk-MEU2HHGV.js';
@@ -1,15 +1,15 @@
1
1
  import { checkToolInputSchema } from '../../chunk-3X7VTCPG.js';
2
- import { materializeOmpProviders, isCredentialOmissionWarning, materializeOmpIdentityDir, registryModelEntries } from '../../chunk-4NJVF3DV.js';
3
- import { dispatchCapability } from '../../chunk-7ZL23M3X.js';
2
+ import { materializeOmpProviders, isCredentialOmissionWarning, materializeOmpIdentityDir, registryModelEntries } from '../../chunk-RFYL2HRA.js';
3
+ import { dispatchCapability } from '../../chunk-GJT2Q5XD.js';
4
4
  import { HARNESS_BINARIES } from '../../chunk-WWSRIT3J.js';
5
- import '../../chunk-CLMIZ4N6.js';
5
+ import '../../chunk-ZCKZHOOU.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-PZS55HOX.js';
9
- import { BUILTIN_HARNESS_CATALOG } from '../../chunk-S6NS3I3P.js';
8
+ import { AgentHarness, getBridgeLogger, TOOL_ALLOWLIST_UNSUPPORTED, registryHarnessConfig } from '../../chunk-GK5H52WR.js';
9
+ import { BUILTIN_HARNESS_CATALOG } from '../../chunk-JTJYM3XT.js';
10
10
  import '../../chunk-G5SUWZEU.js';
11
11
  import '../../chunk-6UP2EDFN.js';
12
- import { withActivityLabelJsonSchema } from '../../chunk-342UX2MG.js';
12
+ import { withActivityLabelJsonSchema } from '../../chunk-DWPQBMCY.js';
13
13
  import '../../chunk-VSX2G7LA.js';
14
14
  import '../../chunk-RXGPFAMN.js';
15
15
  import '../../chunk-RZL4TOK3.js';
@@ -122,9 +122,18 @@ function hostAllowedPatternToRegExp(pattern) {
122
122
  const body = pattern.split("*").map((part) => part.replace(/[.+?^${}()|[\]\\/-]/g, "\\$&")).join(".*");
123
123
  return new RegExp(`^${body}$`, "s");
124
124
  }
125
+ var compiledHostAllowed = /* @__PURE__ */ new WeakMap();
126
+ function compileHostAllowed(hostAllowed) {
127
+ let patterns = compiledHostAllowed.get(hostAllowed);
128
+ if (!patterns) {
129
+ patterns = hostAllowed.map(hostAllowedPatternToRegExp);
130
+ compiledHostAllowed.set(hostAllowed, patterns);
131
+ }
132
+ return patterns;
133
+ }
125
134
  function filterHostTools(tools, hostAllowed) {
126
135
  if (hostAllowed === void 0) return [...tools];
127
- const patterns = hostAllowed.map(hostAllowedPatternToRegExp);
136
+ const patterns = compileHostAllowed(hostAllowed);
128
137
  return tools.filter((tool) => patterns.some((re) => re.test(tool.name)));
129
138
  }
130
139
  function buildOmpHostTools(tools) {
@@ -768,22 +777,10 @@ var OmpHarness = class extends AgentHarness {
768
777
  const name = this.hostToolCapabilities.get(hostName);
769
778
  if (name === void 0) {
770
779
  this.log.warn("host tool call rejected: not registered", { tool: hostName });
771
- try {
772
- this.send({
773
- type: "host_tool_result",
774
- id,
775
- result: {
776
- content: [{ type: "text", text: `Error: host tool "${hostName}" is not available` }]
777
- },
778
- isError: true
779
- });
780
- } catch (err) {
781
- this.log.warn("host tool result undeliverable", {
782
- tool: hostName,
783
- callId,
784
- error: String(err)
785
- });
786
- }
780
+ this.sendHostToolResult(id, `Error: host tool "${hostName}" is not available`, true, {
781
+ tool: hostName,
782
+ callId
783
+ });
787
784
  return;
788
785
  }
789
786
  const input = event.arguments ?? {};
@@ -823,18 +820,22 @@ var OmpHarness = class extends AgentHarness {
823
820
  if (this.hostToolCalls.get(id) !== call) return;
824
821
  this.hostToolCalls.delete(id);
825
822
  this.emit("agent-event", { type: "tool_execution_end", toolName: name });
826
- try {
827
- this.send({
828
- type: "host_tool_result",
829
- id,
830
- result: { content: [{ type: "text", text }] },
831
- ...isError ? { isError: true } : {}
832
- });
833
- } catch (err) {
834
- this.log.warn("host tool result undeliverable", { name, callId, error: String(err) });
835
- }
823
+ this.sendHostToolResult(id, text, isError, { name, callId });
836
824
  })();
837
825
  }
826
+ /** Answer an omp `host_tool_call`; a dead pipe is logged, not thrown (nobody awaits the call). */
827
+ sendHostToolResult(id, text, isError, logCtx) {
828
+ try {
829
+ this.send({
830
+ type: "host_tool_result",
831
+ id,
832
+ result: { content: [{ type: "text", text }] },
833
+ ...isError ? { isError: true } : {}
834
+ });
835
+ } catch (err) {
836
+ this.log.warn("host tool result undeliverable", { ...logCtx, error: String(err) });
837
+ }
838
+ }
838
839
  /**
839
840
  * `host_tool_cancel`: omp aborted the call, so abort the capability handler
840
841
  * and close the call's chat activity (the handler's later settlement is