@skaile/workspaces 5.15.0 → 5.15.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{asset-feeds-LIDC7547.js → asset-feeds-FVDNQ2FM.js} +4 -4
  3. package/dist/{asset-feeds-LIDC7547.js.map → asset-feeds-FVDNQ2FM.js.map} +1 -1
  4. package/dist/asset-manager/index.js +1 -1
  5. package/dist/{chunk-YL23KWBX.js → chunk-354JIEIE.js} +3 -3
  6. package/dist/{chunk-YL23KWBX.js.map → chunk-354JIEIE.js.map} +1 -1
  7. package/dist/{chunk-JHP6MIW2.js → chunk-55VKZUQY.js} +7 -7
  8. package/dist/{chunk-JHP6MIW2.js.map → chunk-55VKZUQY.js.map} +1 -1
  9. package/dist/{chunk-SCUEPCSJ.js → chunk-7Y7UYNGL.js} +3 -3
  10. package/dist/{chunk-SCUEPCSJ.js.map → chunk-7Y7UYNGL.js.map} +1 -1
  11. package/dist/{chunk-QR7W5JV4.js → chunk-B6I7SF2X.js} +7 -7
  12. package/dist/{chunk-QR7W5JV4.js.map → chunk-B6I7SF2X.js.map} +1 -1
  13. package/dist/{chunk-2LTF2ZHH.js → chunk-GR7TV4XC.js} +3 -3
  14. package/dist/{chunk-2LTF2ZHH.js.map → chunk-GR7TV4XC.js.map} +1 -1
  15. package/dist/{chunk-PIDMOE7R.js → chunk-GV3MFKDV.js} +3 -3
  16. package/dist/{chunk-PIDMOE7R.js.map → chunk-GV3MFKDV.js.map} +1 -1
  17. package/dist/{chunk-SRKU7QUG.js → chunk-JJLH4TX4.js} +6 -6
  18. package/dist/{chunk-SRKU7QUG.js.map → chunk-JJLH4TX4.js.map} +1 -1
  19. package/dist/{chunk-D2MZZ2KB.js → chunk-JUHDED6J.js} +3 -3
  20. package/dist/{chunk-D2MZZ2KB.js.map → chunk-JUHDED6J.js.map} +1 -1
  21. package/dist/{chunk-DP6YRAPZ.js → chunk-MUOSKYI2.js} +49 -5
  22. package/dist/chunk-MUOSKYI2.js.map +1 -0
  23. package/dist/{chunk-KUB4HFGK.js → chunk-NHH3MRSC.js} +3 -3
  24. package/dist/{chunk-KUB4HFGK.js.map → chunk-NHH3MRSC.js.map} +1 -1
  25. package/dist/{chunk-AXNX2SKZ.js → chunk-NVBN3YOH.js} +5 -5
  26. package/dist/{chunk-AXNX2SKZ.js.map → chunk-NVBN3YOH.js.map} +1 -1
  27. package/dist/{chunk-XX4C72CC.js → chunk-R37L4BNR.js} +2 -2
  28. package/dist/{chunk-XX4C72CC.js.map → chunk-R37L4BNR.js.map} +1 -1
  29. package/dist/{chunk-74THIMZV.js → chunk-RNFHJUK7.js} +3 -3
  30. package/dist/{chunk-74THIMZV.js.map → chunk-RNFHJUK7.js.map} +1 -1
  31. package/dist/{chunk-AVUJBSFA.js → chunk-U7YMGW7M.js} +2 -2
  32. package/dist/{chunk-AVUJBSFA.js.map → chunk-U7YMGW7M.js.map} +1 -1
  33. package/dist/{chunk-I3JO3NIZ.js → chunk-VQQCA7BD.js} +3 -3
  34. package/dist/{chunk-I3JO3NIZ.js.map → chunk-VQQCA7BD.js.map} +1 -1
  35. package/dist/cli/index.js +34 -34
  36. package/dist/connectors/index.js +1 -1
  37. package/dist/{connectors-JQR5RAMC.js → connectors-TVFFE5H4.js} +4 -4
  38. package/dist/{connectors-JQR5RAMC.js.map → connectors-TVFFE5H4.js.map} +1 -1
  39. package/dist/{ensure-sources-NAGBSMJE.js → ensure-sources-N4E5EDGC.js} +4 -4
  40. package/dist/{ensure-sources-NAGBSMJE.js.map → ensure-sources-N4E5EDGC.js.map} +1 -1
  41. package/dist/factory-assets/connectors/box.js +1 -1
  42. package/dist/factory-assets/connectors/deploy.js +1 -1
  43. package/dist/factory-assets/connectors/devserver.js +1 -1
  44. package/dist/factory-assets/connectors/flow/adapter.js +1 -1
  45. package/dist/factory-assets/connectors/flow/run-flow.js +2 -2
  46. package/dist/factory-assets/connectors/flow.js +1 -1
  47. package/dist/factory-assets/connectors/git/CONNECTOR.md +1 -0
  48. package/dist/factory-assets/connectors/git/lifecycle.d.ts.map +1 -1
  49. package/dist/factory-assets/connectors/git/repo.d.ts +17 -3
  50. package/dist/factory-assets/connectors/git/repo.d.ts.map +1 -1
  51. package/dist/factory-assets/connectors/git.js +1 -1
  52. package/dist/factory-assets/connectors/gmail.js +1 -1
  53. package/dist/factory-assets/connectors/googledrive.js +1 -1
  54. package/dist/factory-assets/connectors/local.js +1 -1
  55. package/dist/factory-assets/connectors/mattermost.js +1 -1
  56. package/dist/factory-assets/connectors/memory.js +1 -1
  57. package/dist/factory-assets/connectors/minio.js +1 -1
  58. package/dist/factory-assets/connectors/postgres.js +1 -1
  59. package/dist/factory-assets/connectors/s3.js +1 -1
  60. package/dist/factory-assets/connectors/sharepoint.js +1 -1
  61. package/dist/factory-assets/connectors/sqlite.js +1 -1
  62. package/dist/factory-assets/connectors/static-server.js +1 -1
  63. package/dist/factory-assets/connectors/tunnel.js +1 -1
  64. package/dist/factory-assets/connectors/webdav.js +1 -1
  65. package/dist/factory-assets/connectors/xstate-store.js +1 -1
  66. package/dist/factory-assets/connectors/xstate.js +1 -1
  67. package/dist/{helpers-XFHJDJOA.js → helpers-PPVGVYIZ.js} +4 -4
  68. package/dist/{helpers-XFHJDJOA.js.map → helpers-PPVGVYIZ.js.map} +1 -1
  69. package/dist/{library-publish-FC3ZABR2.js → library-publish-EQFYHJ6G.js} +14 -14
  70. package/dist/{library-publish-FC3ZABR2.js.map → library-publish-EQFYHJ6G.js.map} +1 -1
  71. package/dist/{open-library-5ET7SAJC.js → open-library-JJGDEYYT.js} +5 -5
  72. package/dist/{open-library-5ET7SAJC.js.map → open-library-JJGDEYYT.js.map} +1 -1
  73. package/dist/{project-2UXHSVVA.js → project-5HW3XSOE.js} +11 -11
  74. package/dist/{project-2UXHSVVA.js.map → project-5HW3XSOE.js.map} +1 -1
  75. package/dist/runner/index.js +6 -6
  76. package/dist/sdk/asset-manager.js +1 -1
  77. package/dist/sdk/index.js +6 -6
  78. package/dist/sdk/runner.js +6 -6
  79. package/dist/{setup-IKH4R7UN.js → setup-52NDDR7C.js} +5 -5
  80. package/dist/{setup-IKH4R7UN.js.map → setup-52NDDR7C.js.map} +1 -1
  81. package/dist/{source-M6IARYNO.js → source-WKV4QFGS.js} +13 -13
  82. package/dist/{source-M6IARYNO.js.map → source-WKV4QFGS.js.map} +1 -1
  83. package/dist/{source-manifest-publish-UP2IS2QW.js → source-manifest-publish-3HAX6DPN.js} +15 -15
  84. package/dist/{source-manifest-publish-UP2IS2QW.js.map → source-manifest-publish-3HAX6DPN.js.map} +1 -1
  85. package/dist/tui/index.js +6 -6
  86. package/dist/workspace-plugin/adapters/mcp.js +3 -3
  87. package/dist/workspace-plugin/adapters/omp.js +7 -7
  88. package/dist/workspace-plugin/index.js +1 -1
  89. package/package.json +1 -1
  90. package/dist/chunk-DP6YRAPZ.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { getStoreConfig, getStoreToken, storeFetch } from './chunk-I3JO3NIZ.js';
1
+ import { getStoreConfig, getStoreToken, storeFetch } from './chunk-VQQCA7BD.js';
2
2
 
3
3
  // cli/src/store-publisher.ts
4
4
  function makeHttpPublisherClient(config = getStoreConfig(), timeoutMs = 2e4) {
@@ -25,5 +25,5 @@ function makeHttpPublisherClient(config = getStoreConfig(), timeoutMs = 2e4) {
25
25
  }
26
26
 
27
27
  export { makeHttpPublisherClient };
28
- //# sourceMappingURL=chunk-D2MZZ2KB.js.map
29
- //# sourceMappingURL=chunk-D2MZZ2KB.js.map
28
+ //# sourceMappingURL=chunk-JUHDED6J.js.map
29
+ //# sourceMappingURL=chunk-JUHDED6J.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/store-publisher.ts"],"names":[],"mappings":";;;AA+FO,SAAS,uBAAA,CACd,MAAA,GAAsB,cAAA,EAAe,EACrC,YAAY,GAAA,EACK;AAGjB,EAAA,MAAM,IAAA,GAAO,OACX,IAAA,EACA,IAAA,KACe;AACf,IAAA,MAAM,GAAA,GAAM,MAAM,aAAA,EAAc;AAChC,IAAA,OAAO,UAAA,CAAc,EAAE,GAAG,MAAA,EAAQ,GAAA,EAAI,EAAG,IAAA,EAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAM,CAAA;AAAA,EACvE,CAAA;AACA,EAAA,OAAO;AAAA,IACL,EAAA,EAAI,MAAM,IAAA,CAAK,YAAY,CAAA;AAAA,IAC3B,UAAA,EAAY,CAAC,IAAA,KAAS,IAAA,CAAK,mBAAmB,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,CAAA;AAAA,IACtE,WAAA,EAAa,MAAM,IAAA,CAAK,iBAAiB,CAAA;AAAA,IACzC,UAAA,EAAY,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,gBAAA,EAAmB,EAAE,CAAA,KAAA,CAAA,EAAS,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,IAAI,CAAA;AAAA,IACnF,QAAQ,CAAC,KAAA,KAAU,IAAA,CAAK,CAAA,aAAA,EAAgB,KAAK,CAAA,CAAE,CAAA;AAAA,IAC/C,kBAAkB,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,gBAAA,EAAmB,EAAE,CAAA,WAAA,CAAa,CAAA;AAAA,IACjE,cAAc,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,QAAA,CAAU,CAAA;AAAA,IACzD,YAAA,EAAc,CAAC,EAAA,EAAI,IAAA,EAAM,WACvB,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,QAAA,CAAA,EAAY;AAAA,MACnC,MAAA,EAAQ,MAAA;AAAA,MACR,IAAA;AAAA,MACA,GAAI,SAAS,EAAE,MAAA,EAAQ,EAAE,MAAA,EAAQ,GAAA,EAAI,EAAE,GAAI;AAAC,KAC7C,CAAA;AAAA,IACH,cAAA,EAAgB,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,UAAA,CAAA,EAAc,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,IAAI,CAAA;AAAA,IAC3F,qBAAA,EAAuB,CAAC,EAAA,KACtB,IAAA,CAAK,sBAAsB,kBAAA,CAAmB,EAAE,CAAC,CAAA,aAAA,CAAe;AAAA,GACpE;AACF","file":"chunk-D2MZZ2KB.js","sourcesContent":["/**\n * Typed REST client for the AI Asset Store **publisher** surface — the\n * curator-publish flow (`skaile source manifest publish` / `yank`). Thin\n * wrappers over {@link storeFetch}; every method maps 1:1 to an `/api/v1/…`\n * endpoint. The {@link PublisherClient} interface is injectable so the\n * orchestration in `commands/source-manifest-publish.ts` can be unit-tested\n * against a fake without a live store.\n *\n * @docLink cli/dev-guide#store-publisher\n */\n\nimport { getStoreConfig, getStoreToken, type StoreConfig, storeFetch } from \"./store-client.ts\";\n\n/**\n * The publisher REST surface used by the curator-publish flow. Kept minimal —\n * only the endpoints `runPublish` / `runYank` actually call. Response shapes\n * are narrowed to the fields the orchestration reads (the server returns more).\n */\nexport interface PublisherClient {\n /**\n * Identity of the caller. `username` is the Keycloak login (personal-tier\n * namespace); `githubLogin` is the verified GitHub handle when connected —\n * the namespace to publish under when it differs from the login.\n */\n me(): Promise<{ username: string; githubLogin?: string | null }>;\n /** Register (or re-register) a source; returns the created/existing row id. */\n sourcesAdd(body: {\n url: string;\n ref: string;\n sidecarUrl?: string;\n sidecarRef?: string;\n /**\n * Target publisher namespace (the manifest's `publisher`). When it differs\n * from the caller's login username, the store resolves the CLAIMED Publisher\n * for it (the store must already have the claim). Omitted → the store\n * defaults to `@<username>` (personal).\n */\n namespace?: string;\n }): Promise<{ id: string }>;\n /** List sources — used to recover an id when `sourcesAdd` rejects a dup url. */\n sourcesList(): Promise<Array<{ id: string; url: string }>>;\n /** Kick off a source sync; returns the async job id to poll. */\n sourceSync(id: string): Promise<{ jobId: string }>;\n /** Poll a job's terminal status + per-item results. */\n jobGet(\n jobId: string,\n ): Promise<{ status: string; items?: Array<{ label: string; status: string; error?: string }> }>;\n /** Discovered publishable candidates for a synced source. */\n sourceCandidates(id: string): Promise<\n Array<{\n id: string;\n name: string;\n version: string;\n kind: string;\n published: boolean;\n assetRoot: string;\n }>\n >;\n /** Per-asset preview — the discovered file set + resolved candidate metadata. */\n assetPreview(id: string): Promise<{\n discoveredFiles: string[];\n candidate: { name: string; version: string; kind: string; publisherNamespace: string };\n }>;\n /**\n * Publish one asset. `dryRun` returns the would-be `{ manifest }` without\n * launching a job; the normal path returns `{ jobId }`.\n */\n assetPublish(\n id: string,\n body: { ref: string; files: string[] },\n dryRun?: boolean,\n ): Promise<{ jobId?: string; manifest?: unknown }>;\n /** Retract a published asset. Response body is ignored. */\n assetUnpublish(id: string): Promise<unknown>;\n /**\n * Read-only \"can I publish under `@<ns>` right now, and if not, what's the\n * path?\" probe. Backs the `publish --dry-run` namespace status line; its\n * `message` is store-authored and meant to be surfaced verbatim.\n */\n namespaceAvailability(ns: string): Promise<{\n namespace: string;\n status: \"owned-by-you\" | \"claimable-by-you\" | \"reserved\" | \"available\";\n claimMethod?: string;\n message: string;\n }>;\n}\n\n/**\n * Construct the real HTTP-backed {@link PublisherClient}. Every call carries a\n * longer timeout than the default store client because publish/sync trigger\n * server-side clone work.\n *\n * @param config - Store connection config; defaults to {@link getStoreConfig}.\n * @param timeoutMs - Per-request abort timeout (default 20s).\n */\nexport function makeHttpPublisherClient(\n config: StoreConfig = getStoreConfig(),\n timeoutMs = 20_000,\n): PublisherClient {\n // Acquire a fresh Keycloak token per call (device-flow session in\n // ~/.skaile/auth.json, refreshed on demand) rather than a static config.jwt.\n const call = async <T>(\n path: string,\n opts?: { method?: string; body?: unknown; params?: Record<string, string> },\n ): Promise<T> => {\n const jwt = await getStoreToken();\n return storeFetch<T>({ ...config, jwt }, path, { timeoutMs, ...opts });\n };\n return {\n me: () => call(\"/api/v1/me\"),\n sourcesAdd: (body) => call(\"/api/v1/sources\", { method: \"POST\", body }),\n sourcesList: () => call(\"/api/v1/sources\"),\n sourceSync: (id) => call(`/api/v1/sources/${id}/sync`, { method: \"POST\", body: {} }),\n jobGet: (jobId) => call(`/api/v1/jobs/${jobId}`),\n sourceCandidates: (id) => call(`/api/v1/sources/${id}/candidates`),\n assetPreview: (id) => call(`/api/v1/assets/${id}/preview`),\n assetPublish: (id, body, dryRun) =>\n call(`/api/v1/assets/${id}/publish`, {\n method: \"POST\",\n body,\n ...(dryRun ? { params: { dryRun: \"1\" } } : {}),\n }),\n assetUnpublish: (id) => call(`/api/v1/assets/${id}/unpublish`, { method: \"POST\", body: {} }),\n namespaceAvailability: (ns) =>\n call(`/api/v1/namespaces/${encodeURIComponent(ns)}/availability`),\n };\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/store-publisher.ts"],"names":[],"mappings":";;;AA+FO,SAAS,uBAAA,CACd,MAAA,GAAsB,cAAA,EAAe,EACrC,YAAY,GAAA,EACK;AAGjB,EAAA,MAAM,IAAA,GAAO,OACX,IAAA,EACA,IAAA,KACe;AACf,IAAA,MAAM,GAAA,GAAM,MAAM,aAAA,EAAc;AAChC,IAAA,OAAO,UAAA,CAAc,EAAE,GAAG,MAAA,EAAQ,GAAA,EAAI,EAAG,IAAA,EAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAM,CAAA;AAAA,EACvE,CAAA;AACA,EAAA,OAAO;AAAA,IACL,EAAA,EAAI,MAAM,IAAA,CAAK,YAAY,CAAA;AAAA,IAC3B,UAAA,EAAY,CAAC,IAAA,KAAS,IAAA,CAAK,mBAAmB,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,CAAA;AAAA,IACtE,WAAA,EAAa,MAAM,IAAA,CAAK,iBAAiB,CAAA;AAAA,IACzC,UAAA,EAAY,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,gBAAA,EAAmB,EAAE,CAAA,KAAA,CAAA,EAAS,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,IAAI,CAAA;AAAA,IACnF,QAAQ,CAAC,KAAA,KAAU,IAAA,CAAK,CAAA,aAAA,EAAgB,KAAK,CAAA,CAAE,CAAA;AAAA,IAC/C,kBAAkB,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,gBAAA,EAAmB,EAAE,CAAA,WAAA,CAAa,CAAA;AAAA,IACjE,cAAc,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,QAAA,CAAU,CAAA;AAAA,IACzD,YAAA,EAAc,CAAC,EAAA,EAAI,IAAA,EAAM,WACvB,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,QAAA,CAAA,EAAY;AAAA,MACnC,MAAA,EAAQ,MAAA;AAAA,MACR,IAAA;AAAA,MACA,GAAI,SAAS,EAAE,MAAA,EAAQ,EAAE,MAAA,EAAQ,GAAA,EAAI,EAAE,GAAI;AAAC,KAC7C,CAAA;AAAA,IACH,cAAA,EAAgB,CAAC,EAAA,KAAO,IAAA,CAAK,CAAA,eAAA,EAAkB,EAAE,CAAA,UAAA,CAAA,EAAc,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,IAAI,CAAA;AAAA,IAC3F,qBAAA,EAAuB,CAAC,EAAA,KACtB,IAAA,CAAK,sBAAsB,kBAAA,CAAmB,EAAE,CAAC,CAAA,aAAA,CAAe;AAAA,GACpE;AACF","file":"chunk-JUHDED6J.js","sourcesContent":["/**\n * Typed REST client for the AI Asset Store **publisher** surface — the\n * curator-publish flow (`skaile source manifest publish` / `yank`). Thin\n * wrappers over {@link storeFetch}; every method maps 1:1 to an `/api/v1/…`\n * endpoint. The {@link PublisherClient} interface is injectable so the\n * orchestration in `commands/source-manifest-publish.ts` can be unit-tested\n * against a fake without a live store.\n *\n * @docLink cli/dev-guide#store-publisher\n */\n\nimport { getStoreConfig, getStoreToken, type StoreConfig, storeFetch } from \"./store-client.ts\";\n\n/**\n * The publisher REST surface used by the curator-publish flow. Kept minimal —\n * only the endpoints `runPublish` / `runYank` actually call. Response shapes\n * are narrowed to the fields the orchestration reads (the server returns more).\n */\nexport interface PublisherClient {\n /**\n * Identity of the caller. `username` is the Keycloak login (personal-tier\n * namespace); `githubLogin` is the verified GitHub handle when connected —\n * the namespace to publish under when it differs from the login.\n */\n me(): Promise<{ username: string; githubLogin?: string | null }>;\n /** Register (or re-register) a source; returns the created/existing row id. */\n sourcesAdd(body: {\n url: string;\n ref: string;\n sidecarUrl?: string;\n sidecarRef?: string;\n /**\n * Target publisher namespace (the manifest's `publisher`). When it differs\n * from the caller's login username, the store resolves the CLAIMED Publisher\n * for it (the store must already have the claim). Omitted → the store\n * defaults to `@<username>` (personal).\n */\n namespace?: string;\n }): Promise<{ id: string }>;\n /** List sources — used to recover an id when `sourcesAdd` rejects a dup url. */\n sourcesList(): Promise<Array<{ id: string; url: string }>>;\n /** Kick off a source sync; returns the async job id to poll. */\n sourceSync(id: string): Promise<{ jobId: string }>;\n /** Poll a job's terminal status + per-item results. */\n jobGet(\n jobId: string,\n ): Promise<{ status: string; items?: Array<{ label: string; status: string; error?: string }> }>;\n /** Discovered publishable candidates for a synced source. */\n sourceCandidates(id: string): Promise<\n Array<{\n id: string;\n name: string;\n version: string;\n kind: string;\n published: boolean;\n assetRoot: string;\n }>\n >;\n /** Per-asset preview — the discovered file set + resolved candidate metadata. */\n assetPreview(id: string): Promise<{\n discoveredFiles: string[];\n candidate: { name: string; version: string; kind: string; publisherNamespace: string };\n }>;\n /**\n * Publish one asset. `dryRun` returns the would-be `{ manifest }` without\n * launching a job; the normal path returns `{ jobId }`.\n */\n assetPublish(\n id: string,\n body: { ref: string; files: string[] },\n dryRun?: boolean,\n ): Promise<{ jobId?: string; manifest?: unknown }>;\n /** Retract a published asset. Response body is ignored. */\n assetUnpublish(id: string): Promise<unknown>;\n /**\n * Read-only \"can I publish under `@<ns>` right now, and if not, what's the\n * path?\" probe. Backs the `publish --dry-run` namespace status line; its\n * `message` is store-authored and meant to be surfaced verbatim.\n */\n namespaceAvailability(ns: string): Promise<{\n namespace: string;\n status: \"owned-by-you\" | \"claimable-by-you\" | \"reserved\" | \"available\";\n claimMethod?: string;\n message: string;\n }>;\n}\n\n/**\n * Construct the real HTTP-backed {@link PublisherClient}. Every call carries a\n * longer timeout than the default store client because publish/sync trigger\n * server-side clone work.\n *\n * @param config - Store connection config; defaults to {@link getStoreConfig}.\n * @param timeoutMs - Per-request abort timeout (default 20s).\n */\nexport function makeHttpPublisherClient(\n config: StoreConfig = getStoreConfig(),\n timeoutMs = 20_000,\n): PublisherClient {\n // Acquire a fresh Keycloak token per call (device-flow session in\n // ~/.skaile/auth.json, refreshed on demand) rather than a static config.jwt.\n const call = async <T>(\n path: string,\n opts?: { method?: string; body?: unknown; params?: Record<string, string> },\n ): Promise<T> => {\n const jwt = await getStoreToken();\n return storeFetch<T>({ ...config, jwt }, path, { timeoutMs, ...opts });\n };\n return {\n me: () => call(\"/api/v1/me\"),\n sourcesAdd: (body) => call(\"/api/v1/sources\", { method: \"POST\", body }),\n sourcesList: () => call(\"/api/v1/sources\"),\n sourceSync: (id) => call(`/api/v1/sources/${id}/sync`, { method: \"POST\", body: {} }),\n jobGet: (jobId) => call(`/api/v1/jobs/${jobId}`),\n sourceCandidates: (id) => call(`/api/v1/sources/${id}/candidates`),\n assetPreview: (id) => call(`/api/v1/assets/${id}/preview`),\n assetPublish: (id, body, dryRun) =>\n call(`/api/v1/assets/${id}/publish`, {\n method: \"POST\",\n body,\n ...(dryRun ? { params: { dryRun: \"1\" } } : {}),\n }),\n assetUnpublish: (id) => call(`/api/v1/assets/${id}/unpublish`, { method: \"POST\", body: {} }),\n namespaceAvailability: (ns) =>\n call(`/api/v1/namespaces/${encodeURIComponent(ns)}/availability`),\n };\n}\n"]}
@@ -2694,6 +2694,9 @@ async function acquireGitCredentials(init) {
2694
2694
 
2695
2695
  // factory-assets/connectors/git/lifecycle.ts
2696
2696
  var READ_ONLY_HOOK_DETAIL = "read-only mount: nothing committed or pushed";
2697
+ function notOnMountBranchDetail(repo) {
2698
+ return `checkout is not on ${repo.activeBranch}: nothing committed, pushed or merged; changes left in the working tree`;
2699
+ }
2697
2700
  var GitLifecycle = class {
2698
2701
  repo;
2699
2702
  sync;
@@ -2779,6 +2782,7 @@ var GitLifecycle = class {
2779
2782
  async hibernateSave() {
2780
2783
  const { repo, config: lc } = this;
2781
2784
  if (!lc.commitOnHibernate) return void 0;
2785
+ if (!await repo.headIsActiveBranch("hibernate save")) return notOnMountBranchDetail(repo);
2782
2786
  const sha = await repo.commit(`skaile: hibernate snapshot`);
2783
2787
  if (sha === null) return this.pushUnpushedOnHibernate();
2784
2788
  if (lc.pushOnHibernate) {
@@ -2820,6 +2824,7 @@ var GitLifecycle = class {
2820
2824
  const details = [];
2821
2825
  return repo.withLock(async () => {
2822
2826
  if (repo.readOnly) return READ_ONLY_HOOK_DETAIL;
2827
+ if (!await repo.headIsActiveBranch("session close")) return notOnMountBranchDetail(repo);
2823
2828
  const sha = await repo.commit(`skaile: session close`);
2824
2829
  if (sha !== null) details.push(`Committed ${sha}`);
2825
2830
  if (lc.pushOnClose || lc.mergeOnClose) {
@@ -2966,6 +2971,8 @@ var GitRepo = class {
2966
2971
  onChange;
2967
2972
  /** Active branch (differs from the base branch when session branching is active). */
2968
2973
  _activeBranch;
2974
+ /** Per skipped step, the HEAD it was last logged for (see {@link headIsActiveBranch}). */
2975
+ loggedHeadSkips = /* @__PURE__ */ new Map();
2969
2976
  /** Outcome of the last connect-time fetch of the session branch. */
2970
2977
  sessionBranchFetch;
2971
2978
  /** True when this connect cut the session branch from the base or `fromRef` (it holds no work yet). */
@@ -3159,8 +3166,17 @@ var GitRepo = class {
3159
3166
  }
3160
3167
  }
3161
3168
  // -- Driver operations -------------------------------------------------------------
3162
- /** `git pull` of the active branch by merge, then align submodule checkouts with the merged pins. */
3169
+ /**
3170
+ * `git pull` of the active branch by merge, then align submodule checkouts with the merged pins.
3171
+ * Throws when HEAD is not on the active branch: the merge would land on the agent's branch.
3172
+ */
3163
3173
  async pull() {
3174
+ const head = await gitOrNull(["symbolic-ref", "--quiet", "--short", "HEAD"], this.dir);
3175
+ if (head !== this.activeBranch) {
3176
+ throw new Error(
3177
+ `sync: the checkout is on ${head === null ? "a detached HEAD" : `"${head}"`}, but this mount pulls only "${this.activeBranch}". Check it out first.`
3178
+ );
3179
+ }
3164
3180
  await pullByMerge(this.activeBranch, this.dir, this.auth, 6e4);
3165
3181
  await syncSubmodules(this.dir, this.log, this.auth);
3166
3182
  }
@@ -3172,16 +3188,41 @@ var GitRepo = class {
3172
3188
  if (!await commitAll(this.dir, message, this.log)) return null;
3173
3189
  return git(["rev-parse", "--short", "HEAD"], this.dir);
3174
3190
  }
3191
+ /**
3192
+ * Whether HEAD is on the branch this mount saves (`activeBranch`). The
3193
+ * driver's own commits, merges and pulls run only then: any other branch,
3194
+ * or a detached HEAD, is one the agent checked out, and its work is the
3195
+ * agent's to commit. Logs `skipped` (the step it left out) when not, once
3196
+ * per step and HEAD: the periodic tick would otherwise log it every interval.
3197
+ */
3198
+ async headIsActiveBranch(skipped) {
3199
+ const head = await gitOrNull(["symbolic-ref", "--quiet", "--short", "HEAD"], this.dir);
3200
+ if (head === this.activeBranch) {
3201
+ this.loggedHeadSkips.delete(skipped);
3202
+ return true;
3203
+ }
3204
+ const shown = head ?? "(detached)";
3205
+ if (this.loggedHeadSkips.get(skipped) !== shown) {
3206
+ this.loggedHeadSkips.set(skipped, shown);
3207
+ this.log.info(`${skipped} skipped: the checkout is not on the mount's branch`, {
3208
+ branch: this.activeBranch,
3209
+ head: shown
3210
+ });
3211
+ }
3212
+ return false;
3213
+ }
3175
3214
  /**
3176
3215
  * One idle auto-commit: commit what changed under a message naming the files,
3177
3216
  * and push it when `push` is set. Best-effort - a failure leaves the work
3178
- * staged and is logged, never thrown. Skips a read-only checkout, an
3179
- * unfinished merge or rebase, and a repo disposed meanwhile.
3217
+ * staged and is logged, never thrown. Skips a read-only checkout, a HEAD
3218
+ * the agent moved off the mount's branch, an unfinished merge or rebase, and
3219
+ * a repo disposed meanwhile.
3180
3220
  */
3181
3221
  async autoCommit(opts) {
3182
3222
  if (this.readOnly) return;
3183
3223
  const mountPath = this.dir;
3184
3224
  try {
3225
+ if (!await this.headIsActiveBranch("auto-commit")) return;
3185
3226
  if (await refuseUnfinishedOperation(mountPath, this.log)) return;
3186
3227
  const message = await this.generateCommitMessage();
3187
3228
  if (this.disposed) return;
@@ -3228,6 +3269,9 @@ var GitRepo = class {
3228
3269
  const mountPath = this.dir;
3229
3270
  await this.fetchOrigin();
3230
3271
  if (this.disposed) return;
3272
+ if ((opts.autoRebase || opts.autoPull) && !await this.headIsActiveBranch("base branch sync")) {
3273
+ return;
3274
+ }
3231
3275
  if (opts.autoRebase && this.activeBranch !== this.branch) {
3232
3276
  const onOrigin = await this.trackSessionBranch(this.activeBranch);
3233
3277
  if (this.disposed) return;
@@ -13564,5 +13608,5 @@ function describeFlowOperations() {
13564
13608
  }
13565
13609
 
13566
13610
  export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, BoxConnector, CONNECT_FAILURE_CARRY_OVER_TTL_MS, ClassifierSubpromptRunner, ConnectFailureCarryOver, ConnectorManager, DeployConnector, DevServerConnector, FlowAdapter, GitConnector, GmailConnector, GoogleDriveConnector, LocalConnector, LogBuffer, ManagedGitconfigCollisionError, MattermostConnector, MemoryConnector, MinIOConnector, NO_ACTIVE_FLOW_ERROR, PortPool, PostgresConnector, S3Connector, S3FetchStoppedError, S3PresignedRequestError, S3_PRESIGN_BATCH, SQLiteConnector, SessionInlineSubFlowRunner, SessionNodeExecutor, SessionSubpromptRunner, SharePointConnector, StaticServerConnector, SubFlowContractError, TunnelConnector, WebDAVConnector, XStateConnector, XStateStoreConnector, atomicReplaceCredential, buildConnectorListPayload, buildConnectorPromptSection, buildConnectorToolDefs, buildFlowPromptEvent, buildFlowToolDefs, buildLazyFlowToolDefs, buildLazySdkFlowTools, buildSdkConnectorTools, buildSdkFlowTools, checkFleetMountLiveness, classifierQuestion, classifyConnectError, createConnector, createConnector10, createConnector11, createConnector12, createConnector13, createConnector14, createConnector15, createConnector16, createConnector17, createConnector18, createConnector19, createConnector2, createConnector20, createConnector3, createConnector4, createConnector5, createConnector6, createConnector7, createConnector8, createConnector9, createFsWatcher, createWorktree, defaultSpawn, describeFlowOperations, driveOrchestratorTurn, ensureDirMode, ensureFleetMounted, ensureRefreshAttemptStamp, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, missingTokenMediatorMessage, normalizeRuntimeFlow, parseListObjectsV2, presignScopePrefix, presignableKey, readGitSyncStatus, registerBuiltinConnectors, removeMountBlock, removeUnavailableMountBlock, renderCredentialHelperScript, resolveAccessPolicy, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock, writeUnavailableMountBlock };
13567
- //# sourceMappingURL=chunk-DP6YRAPZ.js.map
13568
- //# sourceMappingURL=chunk-DP6YRAPZ.js.map
13611
+ //# sourceMappingURL=chunk-MUOSKYI2.js.map
13612
+ //# sourceMappingURL=chunk-MUOSKYI2.js.map