@skaile/workspaces 0.21.0 → 0.22.0-beta.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 (212) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/{asset-feeds-CI76R7FI.js → asset-feeds-PJDJ3QYI.js} +11 -11
  3. package/dist/{asset-feeds-CI76R7FI.js.map → asset-feeds-PJDJ3QYI.js.map} +1 -1
  4. package/dist/asset-manager/index.js +9 -9
  5. package/dist/asset-manager/installer.js +8 -8
  6. package/dist/base-assets/connectors/deploy.js +10 -9
  7. package/dist/base-assets/connectors/devserver.js +10 -9
  8. package/dist/base-assets/connectors/flow/adapter.js +10 -9
  9. package/dist/base-assets/connectors/flow/run-flow.js +11 -10
  10. package/dist/base-assets/connectors/flow.js +10 -9
  11. package/dist/base-assets/connectors/git.js +10 -9
  12. package/dist/base-assets/connectors/gmail.js +10 -9
  13. package/dist/base-assets/connectors/googledrive.js +10 -9
  14. package/dist/base-assets/connectors/local.js +10 -9
  15. package/dist/base-assets/connectors/mattermost.js +10 -9
  16. package/dist/base-assets/connectors/memory.js +10 -9
  17. package/dist/base-assets/connectors/minio.js +10 -9
  18. package/dist/base-assets/connectors/postgres.js +10 -9
  19. package/dist/base-assets/connectors/s3.js +10 -9
  20. package/dist/base-assets/connectors/sharepoint.js +10 -9
  21. package/dist/base-assets/connectors/sqlite.js +10 -9
  22. package/dist/base-assets/connectors/static-server.js +10 -9
  23. package/dist/base-assets/connectors/tunnel.js +10 -9
  24. package/dist/base-assets/connectors/webdav.js +10 -9
  25. package/dist/base-assets/connectors/xstate-store.js +10 -9
  26. package/dist/base-assets/connectors/xstate.js +10 -9
  27. package/dist/bridge/drivers/claude-sdk.js +13 -3
  28. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  29. package/dist/bridge/drivers/codex.js +13 -3
  30. package/dist/bridge/drivers/codex.js.map +1 -1
  31. package/dist/bridge/drivers/echo.js +13 -4
  32. package/dist/bridge/drivers/echo.js.map +1 -1
  33. package/dist/bridge/drivers/omp.js +13 -3
  34. package/dist/bridge/drivers/omp.js.map +1 -1
  35. package/dist/bridge/index.js +3 -2
  36. package/dist/bridge/src/drivers/claude-sdk.d.ts +7 -0
  37. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  38. package/dist/bridge/src/drivers/codex.d.ts +7 -0
  39. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  40. package/dist/bridge/src/drivers/echo.d.ts +6 -0
  41. package/dist/bridge/src/drivers/echo.d.ts.map +1 -1
  42. package/dist/bridge/src/drivers/omp.d.ts +6 -0
  43. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  44. package/dist/bridge/src/registry.d.ts +32 -34
  45. package/dist/bridge/src/registry.d.ts.map +1 -1
  46. package/dist/{chunk-DEQ3OOTU.js → chunk-2DNSSQ22.js} +7 -7
  47. package/dist/{chunk-DEQ3OOTU.js.map → chunk-2DNSSQ22.js.map} +1 -1
  48. package/dist/{chunk-ZWIG55ZX.js → chunk-2XY6732A.js} +3 -3
  49. package/dist/{chunk-ZWIG55ZX.js.map → chunk-2XY6732A.js.map} +1 -1
  50. package/dist/{chunk-2WVQMRIE.js → chunk-CSDQBWE6.js} +5 -5
  51. package/dist/{chunk-2WVQMRIE.js.map → chunk-CSDQBWE6.js.map} +1 -1
  52. package/dist/{chunk-KFDTS7RX.js → chunk-F3MGZ5E6.js} +3 -3
  53. package/dist/{chunk-KFDTS7RX.js.map → chunk-F3MGZ5E6.js.map} +1 -1
  54. package/dist/{chunk-XAVM2BAJ.js → chunk-G6GKWGOW.js} +114 -619
  55. package/dist/chunk-G6GKWGOW.js.map +1 -0
  56. package/dist/{chunk-H45ANMIU.js → chunk-GKM6MDUC.js} +3 -3
  57. package/dist/{chunk-H45ANMIU.js.map → chunk-GKM6MDUC.js.map} +1 -1
  58. package/dist/{chunk-4ACWI5YT.js → chunk-IGQEXBBG.js} +44 -36
  59. package/dist/chunk-IGQEXBBG.js.map +1 -0
  60. package/dist/{chunk-RDH4SSMH.js → chunk-J2FCO6TM.js} +2 -2
  61. package/dist/{chunk-RDH4SSMH.js.map → chunk-J2FCO6TM.js.map} +1 -1
  62. package/dist/{chunk-BSY56QS7.js → chunk-KA46DUM4.js} +3 -3
  63. package/dist/{chunk-BSY56QS7.js.map → chunk-KA46DUM4.js.map} +1 -1
  64. package/dist/{chunk-XGWGLIHZ.js → chunk-MO4JPTRD.js} +4 -4
  65. package/dist/{chunk-XGWGLIHZ.js.map → chunk-MO4JPTRD.js.map} +1 -1
  66. package/dist/{chunk-G4BR355S.js → chunk-NGC7ZQI4.js} +10 -10
  67. package/dist/{chunk-G4BR355S.js.map → chunk-NGC7ZQI4.js.map} +1 -1
  68. package/dist/{chunk-W5DFC35Z.js → chunk-RENHNO4J.js} +81 -4
  69. package/dist/chunk-RENHNO4J.js.map +1 -0
  70. package/dist/{chunk-4S4TZDCD.js → chunk-SL6JVGRD.js} +3 -3
  71. package/dist/{chunk-4S4TZDCD.js.map → chunk-SL6JVGRD.js.map} +1 -1
  72. package/dist/{chunk-5QNQLSBW.js → chunk-TKOLD2O7.js} +22 -5
  73. package/dist/chunk-TKOLD2O7.js.map +1 -0
  74. package/dist/{chunk-DFUXWNTS.js → chunk-TTY56FQQ.js} +4 -4
  75. package/dist/{chunk-DFUXWNTS.js.map → chunk-TTY56FQQ.js.map} +1 -1
  76. package/dist/chunk-UZRY5UI2.js +96 -0
  77. package/dist/chunk-UZRY5UI2.js.map +1 -0
  78. package/dist/{chunk-NCUTHLRV.js → chunk-UZVHJ7LX.js} +4 -4
  79. package/dist/{chunk-NCUTHLRV.js.map → chunk-UZVHJ7LX.js.map} +1 -1
  80. package/dist/{chunk-FRPKLIEZ.js → chunk-WIR34WMU.js} +3 -3
  81. package/dist/{chunk-FRPKLIEZ.js.map → chunk-WIR34WMU.js.map} +1 -1
  82. package/dist/{chunk-37JKX6D7.js → chunk-X5Y4EGZB.js} +2 -2
  83. package/dist/{chunk-37JKX6D7.js.map → chunk-X5Y4EGZB.js.map} +1 -1
  84. package/dist/{chunk-S2OVTCAL.js → chunk-XHFMUGDD.js} +3 -3
  85. package/dist/{chunk-S2OVTCAL.js.map → chunk-XHFMUGDD.js.map} +1 -1
  86. package/dist/cli/index.js +701 -413
  87. package/dist/cli/index.js.map +1 -1
  88. package/dist/cli/src/commands/deploy.d.ts +24 -0
  89. package/dist/cli/src/commands/deploy.d.ts.map +1 -0
  90. package/dist/cli/src/commands/integration.d.ts +19 -0
  91. package/dist/cli/src/commands/integration.d.ts.map +1 -0
  92. package/dist/cli/src/commands/plugin-registry-cmd.d.ts +22 -0
  93. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -0
  94. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  95. package/dist/cli/src/plugin-store/index.d.ts +37 -0
  96. package/dist/cli/src/plugin-store/index.d.ts.map +1 -0
  97. package/dist/cli/src/plugin-store/load.d.ts +35 -0
  98. package/dist/cli/src/plugin-store/load.d.ts.map +1 -0
  99. package/dist/cli/src/plugin-store/paths.d.ts +23 -0
  100. package/dist/cli/src/plugin-store/paths.d.ts.map +1 -0
  101. package/dist/cli/src/plugin-store/reconcile.d.ts +50 -0
  102. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -0
  103. package/dist/cli/src/plugin-store/spec.d.ts +25 -0
  104. package/dist/cli/src/plugin-store/spec.d.ts.map +1 -0
  105. package/dist/connectors/config.js +8 -8
  106. package/dist/connectors/index.js +10 -9
  107. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  108. package/dist/connectors/src/connector-registry.d.ts +42 -22
  109. package/dist/connectors/src/connector-registry.d.ts.map +1 -1
  110. package/dist/connectors/src/index.d.ts +2 -3
  111. package/dist/connectors/src/index.d.ts.map +1 -1
  112. package/dist/connectors-shared/index.js +8 -0
  113. package/dist/connectors-shared/index.js.map +1 -0
  114. package/dist/connectors-shared/src/index.d.ts +11 -0
  115. package/dist/connectors-shared/src/index.d.ts.map +1 -0
  116. package/dist/connectors-shared/src/schemas.d.ts +10 -0
  117. package/dist/connectors-shared/src/schemas.d.ts.map +1 -0
  118. package/dist/connectors-shared/src/types.d.ts +11 -0
  119. package/dist/connectors-shared/src/types.d.ts.map +1 -0
  120. package/dist/core/index.js +7 -7
  121. package/dist/core/manifest.js +2 -2
  122. package/dist/core/models.js +1 -1
  123. package/dist/core/runtime-assets.js +4 -4
  124. package/dist/core/src/index.d.ts +2 -2
  125. package/dist/core/src/index.d.ts.map +1 -1
  126. package/dist/core/src/lock.d.ts +20 -1
  127. package/dist/core/src/lock.d.ts.map +1 -1
  128. package/dist/core/src/models.d.ts +13 -0
  129. package/dist/core/src/models.d.ts.map +1 -1
  130. package/dist/core/src/workspace-config.d.ts +14 -0
  131. package/dist/core/src/workspace-config.d.ts.map +1 -1
  132. package/dist/core/src/workspace-yaml-editor.d.ts +20 -0
  133. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  134. package/dist/core/workspace-config.js +3 -3
  135. package/dist/deploy/index.js +454 -0
  136. package/dist/deploy/index.js.map +1 -0
  137. package/dist/deploy/src/handle-store.d.ts +22 -0
  138. package/dist/deploy/src/handle-store.d.ts.map +1 -0
  139. package/dist/deploy/src/index.d.ts +21 -0
  140. package/dist/deploy/src/index.d.ts.map +1 -0
  141. package/dist/deploy/src/targets/container-runtime.d.ts +38 -0
  142. package/dist/deploy/src/targets/container-runtime.d.ts.map +1 -0
  143. package/dist/deploy/src/targets/docker.d.ts +18 -0
  144. package/dist/deploy/src/targets/docker.d.ts.map +1 -0
  145. package/dist/deploy/src/targets/local.d.ts +30 -0
  146. package/dist/deploy/src/targets/local.d.ts.map +1 -0
  147. package/dist/deploy/src/targets/podman.d.ts +18 -0
  148. package/dist/deploy/src/targets/podman.d.ts.map +1 -0
  149. package/dist/deploy/src/targets/port.d.ts +10 -0
  150. package/dist/deploy/src/targets/port.d.ts.map +1 -0
  151. package/dist/deploy/src/targets/stream-lines.d.ts +44 -0
  152. package/dist/deploy/src/targets/stream-lines.d.ts.map +1 -0
  153. package/dist/discovery/index.js +3 -3
  154. package/dist/{ensure-sources-IDVQ77NJ.js → ensure-sources-COGVKY44.js} +11 -11
  155. package/dist/{ensure-sources-IDVQ77NJ.js.map → ensure-sources-COGVKY44.js.map} +1 -1
  156. package/dist/{flows-6BNO4GKK.js → flows-DYFTPCPM.js} +4 -4
  157. package/dist/{flows-6BNO4GKK.js.map → flows-DYFTPCPM.js.map} +1 -1
  158. package/dist/library/index.js +4 -4
  159. package/dist/open-library-DWAQFUSQ.js +13 -0
  160. package/dist/{open-library-IOYWFK7M.js.map → open-library-DWAQFUSQ.js.map} +1 -1
  161. package/dist/plugin-registry/index.js +4 -0
  162. package/dist/plugin-registry/index.js.map +1 -0
  163. package/dist/plugin-registry/src/context.d.ts +29 -0
  164. package/dist/plugin-registry/src/context.d.ts.map +1 -0
  165. package/dist/plugin-registry/src/deploy-handle.d.ts +60 -0
  166. package/dist/plugin-registry/src/deploy-handle.d.ts.map +1 -0
  167. package/dist/plugin-registry/src/errors.d.ts +23 -0
  168. package/dist/plugin-registry/src/errors.d.ts.map +1 -0
  169. package/dist/plugin-registry/src/index.d.ts +16 -0
  170. package/dist/plugin-registry/src/index.d.ts.map +1 -0
  171. package/dist/plugin-registry/src/internal.d.ts +13 -0
  172. package/dist/plugin-registry/src/internal.d.ts.map +1 -0
  173. package/dist/plugin-registry/src/registry.d.ts +25 -0
  174. package/dist/plugin-registry/src/registry.d.ts.map +1 -0
  175. package/dist/plugin-registry/src/targets.d.ts +42 -0
  176. package/dist/plugin-registry/src/targets.d.ts.map +1 -0
  177. package/dist/plugin-store-6OENKNFW.js +144 -0
  178. package/dist/plugin-store-6OENKNFW.js.map +1 -0
  179. package/dist/runner/index.js +14 -13
  180. package/dist/sdk/asset-manager.js +9 -9
  181. package/dist/sdk/bridge.js +3 -2
  182. package/dist/sdk/core.js +7 -7
  183. package/dist/sdk/index.js +15 -14
  184. package/dist/sdk/index.js.map +1 -1
  185. package/dist/sdk/runner.js +14 -13
  186. package/dist/{setup-AIOLUTKV.js → setup-ACMP3QZC.js} +12 -11
  187. package/dist/setup-ACMP3QZC.js.map +1 -0
  188. package/dist/store-client-ZSLNOOQG.js +14 -0
  189. package/dist/{store-client-CYEH2GKC.js.map → store-client-ZSLNOOQG.js.map} +1 -1
  190. package/dist/tui/index.js +14 -13
  191. package/dist/tui/index.js.map +1 -1
  192. package/dist/workspace-plugin/adapters/mcp.js +2 -2
  193. package/dist/workspace-plugin/adapters/omp.js +3 -3
  194. package/dist/workspace-plugin/index.js +1 -1
  195. package/package.json +20 -23
  196. package/dist/base-assets/connectors/redis/adapter.d.ts +0 -39
  197. package/dist/base-assets/connectors/redis/adapter.d.ts.map +0 -1
  198. package/dist/base-assets/connectors/redis.js +0 -20
  199. package/dist/base-assets/connectors/redis.js.map +0 -1
  200. package/dist/base-assets/connectors/yjs/adapter.d.ts +0 -50
  201. package/dist/base-assets/connectors/yjs/adapter.d.ts.map +0 -1
  202. package/dist/base-assets/connectors/yjs.js +0 -20
  203. package/dist/base-assets/connectors/yjs.js.map +0 -1
  204. package/dist/chunk-4ACWI5YT.js.map +0 -1
  205. package/dist/chunk-5QNQLSBW.js.map +0 -1
  206. package/dist/chunk-W5DFC35Z.js.map +0 -1
  207. package/dist/chunk-XAVM2BAJ.js.map +0 -1
  208. package/dist/cli/src/commands/plugin.d.ts +0 -14
  209. package/dist/cli/src/commands/plugin.d.ts.map +0 -1
  210. package/dist/open-library-IOYWFK7M.js +0 -13
  211. package/dist/setup-AIOLUTKV.js.map +0 -1
  212. package/dist/store-client-CYEH2GKC.js +0 -14
@@ -1,18 +1,19 @@
1
- import { resolveAuthRef, resolveAuth } from './chunk-H45ANMIU.js';
1
+ import { resolveAuthRef, resolveAuth } from './chunk-GKM6MDUC.js';
2
2
  import { RcloneProcessManager, ensureDirMode, PortPool } from './chunk-6MB7CRME.js';
3
3
  import { renderWebDAVConfig, renderOneDriveConfig, renderGoogleDriveConfig } from './chunk-QAVZOJCV.js';
4
+ import { pluginRegistry } from './chunk-UZRY5UI2.js';
4
5
  import { computeFlowStateFromSnapshots } from './chunk-ICS76R4T.js';
5
6
  import { renderStimulusPrompt } from './chunk-GZWJGNNN.js';
6
7
  import { computeStimulus } from './chunk-FVTV7M76.js';
7
- import { portableSpawn } from './chunk-W5DFC35Z.js';
8
+ import { portableSpawn } from './chunk-RENHNO4J.js';
8
9
  import { createLogger } from './chunk-24UIWON4.js';
9
10
  import { existsSync, mkdirSync, renameSync, writeFileSync, readFileSync, cpSync, statSync, createReadStream, readdirSync, openSync, writeSync, closeSync, chmodSync } from 'fs';
10
11
  import { join, dirname, resolve, sep, relative } from 'path';
12
+ import * as zNS from 'zod';
11
13
  import { execFile, execSync } from 'child_process';
12
14
  import { promisify } from 'util';
13
15
  import { createServer } from 'http';
14
16
  import mime from 'mime';
15
- import * as zNS from 'zod';
16
17
  import { createRequire } from 'module';
17
18
  import { pathToFileURL } from 'url';
18
19
  import { stat, readdir } from 'fs/promises';
@@ -2087,264 +2088,6 @@ var PostgresConnector = class extends AbstractConnector {
2087
2088
  function createConnector9() {
2088
2089
  return new PostgresConnector();
2089
2090
  }
2090
-
2091
- // base-assets/connectors/redis/adapter.ts
2092
- var RedisConnector = class extends AbstractConnector {
2093
- name = "redis";
2094
- tools;
2095
- constructor() {
2096
- super();
2097
- this.tools = {
2098
- read: (handle, path) => this._read(handle, path),
2099
- write: (handle, path, content) => this._write(handle, path, content),
2100
- delete: (handle, path) => this._delete(handle, path),
2101
- list: (handle, path, options) => this._list(handle, path, options),
2102
- search: (handle, query, options) => this._search(handle, query, options),
2103
- describeOperations: (handle) => this._describeOperations(handle),
2104
- executeOp: (handle, operation, args) => this._executeOp(handle, operation, args),
2105
- describeSkill: (handle, declaration) => this._describeSkill(handle, declaration)
2106
- };
2107
- }
2108
- describeFields() {
2109
- return [
2110
- {
2111
- key: "url",
2112
- label: "Redis URL",
2113
- description: "Redis connection URL (e.g. redis://localhost:6379)",
2114
- type: "url",
2115
- required: true,
2116
- sensitive: true,
2117
- group: "Authentication"
2118
- }
2119
- ];
2120
- }
2121
- _describeSkill(_handle, declaration) {
2122
- const url = String(declaration.options?.url ?? "");
2123
- let hostLabel = declaration.id;
2124
- try {
2125
- hostLabel = new URL(url).hostname;
2126
- } catch {
2127
- }
2128
- return {
2129
- id: declaration.id,
2130
- name: `Redis \u2014 ${hostLabel}`,
2131
- description: `Key-value store at ${hostLabel}`,
2132
- category: "kv",
2133
- access: declaration.access,
2134
- toolNames: ["get", "keys", "ttl", "info"]
2135
- };
2136
- }
2137
- async connect(declaration, ctx) {
2138
- const started = Date.now();
2139
- const url = ctx.resolvedFields?.url ?? resolveAuth(declaration.auth, ctx.secrets) ?? String(declaration.options?.url ?? "");
2140
- if (!url) {
2141
- this.log.error("connect failed: missing url", void 0);
2142
- throw new Error("RedisAdapter requires auth (URL) or options.url");
2143
- }
2144
- let host = "(unknown)";
2145
- try {
2146
- host = new URL(url).hostname;
2147
- } catch {
2148
- }
2149
- this.log.info("connect start", { host });
2150
- try {
2151
- const ioredisPkg = "ioredis";
2152
- const mod = await import(
2153
- /* @vite-ignore */
2154
- ioredisPkg
2155
- );
2156
- const Redis = mod.default ?? mod.Redis ?? mod;
2157
- const client = new Redis(url, { lazyConnect: true, maxRetriesPerRequest: 2 });
2158
- await client.connect();
2159
- const namespace = String(declaration.options?.namespace ?? "");
2160
- this.log.info("connect ok", { host, durationMs: Date.now() - started });
2161
- return this.makeHandle(declaration, { client, namespace });
2162
- } catch (err) {
2163
- this.log.error("connect failed", err, { host });
2164
- throw err;
2165
- }
2166
- }
2167
- async disconnect(handle) {
2168
- this.log.info("disconnect");
2169
- const { client } = handle.state;
2170
- await client.quit();
2171
- handle.status = "disconnected";
2172
- }
2173
- client(handle) {
2174
- return handle.state.client;
2175
- }
2176
- nsKey(handle, key) {
2177
- const ns = handle.state.namespace;
2178
- return ns ? `${ns}:${key}` : key;
2179
- }
2180
- stripNs(handle, key) {
2181
- const ns = handle.state.namespace;
2182
- return ns && key.startsWith(`${ns}:`) ? key.slice(ns.length + 1) : key;
2183
- }
2184
- async _read(handle, path) {
2185
- const value = await this.client(handle).get(this.nsKey(handle, path));
2186
- if (value === null) return null;
2187
- return { data: value, contentType: "application/json" };
2188
- }
2189
- async _write(handle, path, content) {
2190
- const data = typeof content.data === "string" ? content.data : content.data.toString("utf-8");
2191
- await this.client(handle).set(this.nsKey(handle, path), data);
2192
- }
2193
- async _delete(handle, path) {
2194
- const count = await this.client(handle).del(this.nsKey(handle, path));
2195
- return count > 0;
2196
- }
2197
- async _list(handle, path, options) {
2198
- const ns = handle.state.namespace;
2199
- const pattern = path ? this.nsKey(handle, path.endsWith("*") ? path : `${path}*`) : ns ? `${ns}:*` : "*";
2200
- const keys = [];
2201
- let cursor = "0";
2202
- const limit = options?.limit ?? 1e3;
2203
- do {
2204
- const [next, batch] = await this.client(handle).scan(cursor, "MATCH", pattern, "COUNT", 100);
2205
- cursor = next;
2206
- keys.push(...batch);
2207
- if (keys.length >= limit) break;
2208
- } while (cursor !== "0");
2209
- return keys.slice(0, limit).map((k) => ({
2210
- name: this.stripNs(handle, k),
2211
- path: this.stripNs(handle, k),
2212
- type: "key"
2213
- }));
2214
- }
2215
- async _search(handle, query, options) {
2216
- const entries = await this._list(handle, void 0, { limit: options?.maxResults ?? 100 });
2217
- const results = [];
2218
- for (const entry of entries) {
2219
- if (options?.maxResults && results.length >= options.maxResults) break;
2220
- if (entry.name.includes(query)) {
2221
- results.push({ path: entry.name });
2222
- continue;
2223
- }
2224
- const value = await this.client(handle).get(this.nsKey(handle, entry.name));
2225
- if (value?.includes(query)) {
2226
- results.push({ path: entry.name, snippet: value.slice(0, 200) });
2227
- }
2228
- }
2229
- return results;
2230
- }
2231
- _describeOperations(handle) {
2232
- const ops = [
2233
- {
2234
- name: "get",
2235
- description: "Get value by key.",
2236
- accessLevel: "read",
2237
- args: [{ name: "key", type: "string", required: true, description: "Redis key" }],
2238
- examples: ['get --key "config:theme"']
2239
- },
2240
- {
2241
- name: "keys",
2242
- description: "List keys matching a glob pattern.",
2243
- accessLevel: "read",
2244
- args: [
2245
- {
2246
- name: "pattern",
2247
- type: "string",
2248
- required: false,
2249
- description: "Glob pattern (default: *)"
2250
- }
2251
- ],
2252
- examples: ["keys", 'keys --pattern "user:*"']
2253
- },
2254
- {
2255
- name: "ttl",
2256
- description: "Get remaining time-to-live for a key (seconds, -1 if no expiry, -2 if key does not exist).",
2257
- accessLevel: "read",
2258
- args: [{ name: "key", type: "string", required: true, description: "Redis key" }]
2259
- },
2260
- {
2261
- name: "info",
2262
- description: "Get Redis server info (memory, clients, keyspace stats).",
2263
- accessLevel: "read",
2264
- args: [
2265
- {
2266
- name: "section",
2267
- type: "string",
2268
- required: false,
2269
- description: "Info section (memory, clients, keyspace, all)"
2270
- }
2271
- ]
2272
- }
2273
- ];
2274
- if (handle.access === "read-write") {
2275
- ops.push(
2276
- {
2277
- name: "set",
2278
- description: "Set a key-value pair with optional TTL.",
2279
- accessLevel: "write",
2280
- args: [
2281
- { name: "key", type: "string", required: true, description: "Redis key" },
2282
- { name: "value", type: "string", required: true, description: "Value to store" },
2283
- { name: "ttl", type: "number", required: false, description: "Expiry in seconds" }
2284
- ],
2285
- examples: [
2286
- 'set --key "status" --value "running"',
2287
- 'set --key "cache:token" --value "abc" --ttl 3600'
2288
- ]
2289
- },
2290
- {
2291
- name: "del",
2292
- description: "Delete one or more keys.",
2293
- accessLevel: "write",
2294
- args: [{ name: "key", type: "string", required: true, description: "Key to delete" }],
2295
- examples: ['del --key "temp:session"']
2296
- }
2297
- );
2298
- }
2299
- return ops;
2300
- }
2301
- async _executeOp(handle, operation, args) {
2302
- const client = this.client(handle);
2303
- switch (operation) {
2304
- case "get": {
2305
- const key = String(args.key ?? args._positional ?? "");
2306
- const value = await client.get(this.nsKey(handle, key));
2307
- return value ?? "";
2308
- }
2309
- case "set": {
2310
- const key = String(args.key ?? "");
2311
- const value = String(args.value ?? "");
2312
- const fullKey = this.nsKey(handle, key);
2313
- if (args.ttl) {
2314
- await client.set(fullKey, value, "EX", Number(args.ttl));
2315
- } else {
2316
- await client.set(fullKey, value);
2317
- }
2318
- return "OK";
2319
- }
2320
- case "keys": {
2321
- const pattern = args.pattern ? String(args.pattern) : "*";
2322
- const entries = await this._list(handle, pattern.endsWith("*") ? pattern : `${pattern}*`);
2323
- return JSON.stringify(entries.map((e) => e.name));
2324
- }
2325
- case "del": {
2326
- const key = String(args.key ?? args._positional ?? "");
2327
- const count = await client.del(this.nsKey(handle, key));
2328
- return count > 0 ? "Deleted" : "Not found";
2329
- }
2330
- case "ttl": {
2331
- const key = String(args.key ?? args._positional ?? "");
2332
- const ttl = await client.ttl(this.nsKey(handle, key));
2333
- return String(ttl);
2334
- }
2335
- case "info": {
2336
- const section = args.section ? String(args.section) : void 0;
2337
- const info = section ? await client.info(section) : await client.info();
2338
- return info;
2339
- }
2340
- default:
2341
- throw new Error(`RedisAdapter has no operation: ${operation}`);
2342
- }
2343
- }
2344
- };
2345
- function createConnector10() {
2346
- return new RedisConnector();
2347
- }
2348
2091
  var SQLiteConnector = class extends AbstractConnector {
2349
2092
  name = "sqlite";
2350
2093
  tools;
@@ -2580,7 +2323,7 @@ var SQLiteConnector = class extends AbstractConnector {
2580
2323
  }
2581
2324
  }
2582
2325
  };
2583
- function createConnector11() {
2326
+ function createConnector10() {
2584
2327
  return new SQLiteConnector();
2585
2328
  }
2586
2329
 
@@ -2831,7 +2574,7 @@ var MinIOConnector = class extends AbstractConnector {
2831
2574
  }
2832
2575
  }
2833
2576
  };
2834
- function createConnector12() {
2577
+ function createConnector11() {
2835
2578
  return new MinIOConnector();
2836
2579
  }
2837
2580
  var XStateConnector = class extends AbstractConnector {
@@ -3134,7 +2877,7 @@ var XStateConnector = class extends AbstractConnector {
3134
2877
  return [...names];
3135
2878
  }
3136
2879
  };
3137
- function createConnector13() {
2880
+ function createConnector12() {
3138
2881
  return new XStateConnector();
3139
2882
  }
3140
2883
 
@@ -3383,300 +3126,10 @@ var XStateStoreConnector = class extends AbstractConnector {
3383
3126
  if (s.history.length > 500) s.history = s.history.slice(-500);
3384
3127
  }
3385
3128
  };
3386
- function createConnector14() {
3129
+ function createConnector13() {
3387
3130
  return new XStateStoreConnector();
3388
3131
  }
3389
3132
 
3390
- // base-assets/connectors/yjs/adapter.ts
3391
- var YjsConnector = class extends AbstractConnector {
3392
- name = "yjs";
3393
- tools;
3394
- constructor() {
3395
- super();
3396
- this.tools = {
3397
- read: (handle, path) => this._read(handle, path),
3398
- write: (handle, path, content) => this._write(handle, path, content),
3399
- delete: (handle, path) => this._delete(handle, path),
3400
- list: (handle, path, options) => this._list(handle, path, options),
3401
- search: (handle, query, options) => this._search(handle, query, options),
3402
- describeOperations: (handle) => this._describeOperations(handle),
3403
- executeOp: (handle, operation, args) => this._executeOp(handle, operation, args)
3404
- };
3405
- }
3406
- async connect(declaration, _ctx) {
3407
- this.log.info("connect", { id: declaration.id });
3408
- const yjsPkg = "yjs";
3409
- const Y = await import(
3410
- /* @vite-ignore */
3411
- yjsPkg
3412
- );
3413
- const doc = new Y.Doc();
3414
- const root = doc.getMap("root");
3415
- const initial = declaration.options?.initial;
3416
- if (initial) {
3417
- doc.transact(() => {
3418
- for (const [key, value] of Object.entries(initial)) {
3419
- root.set(key, this._toYjsValue(Y, value));
3420
- }
3421
- });
3422
- }
3423
- const state = { doc, root, history: [] };
3424
- root.observe((event) => {
3425
- const changed = [];
3426
- event.changes.keys.forEach((_change, key) => {
3427
- changed.push(key);
3428
- });
3429
- if (changed.length > 0 && state.onChange) {
3430
- state.onChange(root.toJSON(), changed);
3431
- }
3432
- });
3433
- return this.makeHandle(declaration, state);
3434
- }
3435
- async disconnect(handle) {
3436
- this.log.info("disconnect");
3437
- const s = handle.state;
3438
- try {
3439
- s.doc.destroy();
3440
- } finally {
3441
- handle.status = "disconnected";
3442
- }
3443
- }
3444
- s(handle) {
3445
- return handle.state;
3446
- }
3447
- /**
3448
- * Get the Y.Doc for external provider connections (Hocuspocus, y-websocket).
3449
- */
3450
- getDoc(handle) {
3451
- return this.s(handle).doc;
3452
- }
3453
- /**
3454
- * Register a callback fired on every change to the root map.
3455
- */
3456
- onDocChange(handle, cb) {
3457
- this.s(handle).onChange = cb;
3458
- }
3459
- // ── Tool face methods (private, wired in constructor) ─────────────────────
3460
- async _read(handle, path) {
3461
- const root = this.s(handle).root;
3462
- const value = root.get(path);
3463
- if (value === void 0) return null;
3464
- const resolved = this._fromYjsValue(value);
3465
- return { data: JSON.stringify(resolved), contentType: "application/json" };
3466
- }
3467
- async _write(handle, path, content) {
3468
- const data = typeof content.data === "string" ? content.data : content.data.toString("utf-8");
3469
- let value;
3470
- try {
3471
- value = JSON.parse(data);
3472
- } catch {
3473
- value = data;
3474
- }
3475
- const Y = await this._getY();
3476
- const root = this.s(handle).root;
3477
- this.s(handle).doc.transact(() => {
3478
- root.set(path, this._toYjsValue(Y, value));
3479
- });
3480
- this._recordHistory(handle, "set", path);
3481
- }
3482
- async _delete(handle, path) {
3483
- const root = this.s(handle).root;
3484
- if (!root.has(path)) return false;
3485
- root.delete(path);
3486
- this._recordHistory(handle, "delete", path);
3487
- return true;
3488
- }
3489
- async _list(handle, _path, options) {
3490
- const root = this.s(handle).root;
3491
- const entries = [];
3492
- for (const key of root.keys()) {
3493
- if (options?.limit && entries.length >= options.limit) break;
3494
- entries.push({ name: key, path: key, type: "key" });
3495
- }
3496
- return entries;
3497
- }
3498
- async _search(handle, query, options) {
3499
- const root = this.s(handle).root;
3500
- const results = [];
3501
- for (const key of root.keys()) {
3502
- if (options?.maxResults && results.length >= options.maxResults) break;
3503
- const value = root.get(key);
3504
- const str = JSON.stringify(this._fromYjsValue(value));
3505
- if (key.includes(query) || str.includes(query)) {
3506
- results.push({ path: key, snippet: str.slice(0, 200) });
3507
- }
3508
- }
3509
- return results;
3510
- }
3511
- _describeOperations(handle) {
3512
- const ops = [
3513
- {
3514
- name: "snapshot",
3515
- description: "Get the full document snapshot (all keys and values).",
3516
- accessLevel: "read",
3517
- args: []
3518
- },
3519
- {
3520
- name: "get",
3521
- description: "Get a single value by key.",
3522
- accessLevel: "read",
3523
- args: [{ name: "key", type: "string", required: true, description: "Key name" }]
3524
- },
3525
- {
3526
- name: "keys",
3527
- description: "List all keys in the document.",
3528
- accessLevel: "read",
3529
- args: []
3530
- },
3531
- {
3532
- name: "history",
3533
- description: "Get the local operation history.",
3534
- accessLevel: "read",
3535
- args: [{ name: "limit", type: "number", required: false, description: "Max entries" }]
3536
- }
3537
- ];
3538
- if (handle.access === "read-write") {
3539
- ops.push(
3540
- {
3541
- name: "set",
3542
- description: "Set a key to a value. Merges with concurrent writes via CRDT.",
3543
- accessLevel: "write",
3544
- args: [
3545
- { name: "key", type: "string", required: true, description: "Key name" },
3546
- {
3547
- name: "value",
3548
- type: "string",
3549
- required: true,
3550
- description: "Value (JSON-encoded for objects)"
3551
- }
3552
- ],
3553
- examples: [
3554
- `set --key theme --value '"dark"'`,
3555
- `set --key config --value '{"debug":true}'`
3556
- ]
3557
- },
3558
- {
3559
- name: "merge",
3560
- description: "Merge an object into the document (each key set independently via CRDT).",
3561
- accessLevel: "write",
3562
- args: [
3563
- { name: "data", type: "json", required: true, description: "JSON object to merge" }
3564
- ]
3565
- },
3566
- {
3567
- name: "del",
3568
- description: "Delete a key from the document.",
3569
- accessLevel: "write",
3570
- args: [{ name: "key", type: "string", required: true, description: "Key to delete" }]
3571
- }
3572
- );
3573
- }
3574
- return ops;
3575
- }
3576
- async _executeOp(handle, operation, args) {
3577
- const s = this.s(handle);
3578
- const Y = await this._getY();
3579
- switch (operation) {
3580
- case "snapshot":
3581
- return JSON.stringify(s.root.toJSON(), null, 2);
3582
- case "get": {
3583
- const key = String(args.key ?? "");
3584
- const value = s.root.get(key);
3585
- return value !== void 0 ? JSON.stringify(this._fromYjsValue(value)) : "";
3586
- }
3587
- case "keys":
3588
- return JSON.stringify([...s.root.keys()]);
3589
- case "history": {
3590
- const limit = Number(args.limit ?? 50);
3591
- return JSON.stringify(s.history.slice(-limit), null, 2);
3592
- }
3593
- case "set": {
3594
- const key = String(args.key ?? "");
3595
- let value = args.value;
3596
- if (typeof value === "string") {
3597
- try {
3598
- value = JSON.parse(value);
3599
- } catch {
3600
- }
3601
- }
3602
- const hadKey = s.root.has(key);
3603
- s.doc.transact(() => {
3604
- s.root.set(key, this._toYjsValue(Y, value));
3605
- });
3606
- this._recordHistory(handle, "set", key);
3607
- this.emitChange?.({ path: key, action: hadKey ? "edit" : "create", source: "operation" });
3608
- return "OK";
3609
- }
3610
- case "merge": {
3611
- let data = args.data;
3612
- if (typeof data === "string") data = JSON.parse(data);
3613
- if (typeof data !== "object" || data === null) return "Error: data must be a JSON object";
3614
- s.doc.transact(() => {
3615
- for (const [key, value] of Object.entries(data)) {
3616
- s.root.set(key, this._toYjsValue(Y, value));
3617
- }
3618
- });
3619
- for (const key of Object.keys(data)) {
3620
- this._recordHistory(handle, "set", key);
3621
- this.emitChange?.({
3622
- path: key,
3623
- action: s.root.has(key) ? "edit" : "create",
3624
- source: "operation"
3625
- });
3626
- }
3627
- return "OK";
3628
- }
3629
- case "del": {
3630
- const key = String(args.key ?? "");
3631
- if (!s.root.has(key)) return "Not found";
3632
- s.root.delete(key);
3633
- this._recordHistory(handle, "delete", key);
3634
- this.emitChange?.({ path: key, action: "delete", source: "operation" });
3635
- return "Deleted";
3636
- }
3637
- default:
3638
- throw new Error(`YjsConnector has no operation: ${operation}`);
3639
- }
3640
- }
3641
- // ── Private helpers ────────────────────────────────────────────────────────
3642
- async _getY() {
3643
- const yjsPkg = "yjs";
3644
- return import(
3645
- /* @vite-ignore */
3646
- yjsPkg
3647
- );
3648
- }
3649
- /** Convert a JS value to a Yjs-compatible value. */
3650
- _toYjsValue(Y, value) {
3651
- if (value === null || value === void 0) return value;
3652
- if (typeof value !== "object") return value;
3653
- if (Array.isArray(value)) {
3654
- const arr = new Y.Array();
3655
- for (const item of value) arr.push([this._toYjsValue(Y, item)]);
3656
- return arr;
3657
- }
3658
- const map = new Y.Map();
3659
- for (const [k, v] of Object.entries(value)) {
3660
- map.set(k, this._toYjsValue(Y, v));
3661
- }
3662
- return map;
3663
- }
3664
- /** Convert a Yjs value back to plain JS. */
3665
- _fromYjsValue(value) {
3666
- if (value === null || value === void 0) return value;
3667
- if (typeof value?.toJSON === "function") return value.toJSON();
3668
- return value;
3669
- }
3670
- _recordHistory(handle, op, key) {
3671
- const s = this.s(handle);
3672
- s.history.push({ op, key, at: (/* @__PURE__ */ new Date()).toISOString() });
3673
- if (s.history.length > 500) s.history = s.history.slice(-500);
3674
- }
3675
- };
3676
- function createConnector15() {
3677
- return new YjsConnector();
3678
- }
3679
-
3680
3133
  // base-assets/connectors/gmail/adapter.ts
3681
3134
  var GmailConnector = class extends AbstractConnector {
3682
3135
  name = "gmail";
@@ -3880,7 +3333,7 @@ var GmailConnector = class extends AbstractConnector {
3880
3333
  return Buffer.from(message).toString("base64url");
3881
3334
  }
3882
3335
  };
3883
- function createConnector16() {
3336
+ function createConnector14() {
3884
3337
  return new GmailConnector();
3885
3338
  }
3886
3339
 
@@ -4257,7 +3710,7 @@ var MattermostConnector = class extends AbstractConnector {
4257
3710
  return res.json();
4258
3711
  }
4259
3712
  };
4260
- function createConnector17() {
3713
+ function createConnector15() {
4261
3714
  return new MattermostConnector();
4262
3715
  }
4263
3716
 
@@ -4692,7 +4145,7 @@ function instanceToStatus(inst) {
4692
4145
  uptime_ms: Date.now() - new Date(inst.startedAt).getTime()
4693
4146
  };
4694
4147
  }
4695
- function createConnector18() {
4148
+ function createConnector16() {
4696
4149
  return new DevServerConnector();
4697
4150
  }
4698
4151
  var DEFAULT_PORT_RANGE = [14e3, 14099];
@@ -4936,7 +4389,7 @@ function instanceToStatus2(instance) {
4936
4389
  uptime_ms: Date.now() - new Date(instance.startedAt).getTime()
4937
4390
  };
4938
4391
  }
4939
- function createConnector19() {
4392
+ function createConnector17() {
4940
4393
  return new StaticServerConnector();
4941
4394
  }
4942
4395
 
@@ -5164,7 +4617,7 @@ async function spawnNgrokTunnel(port) {
5164
4617
  proc.kill();
5165
4618
  throw new Error("ngrok: timed out");
5166
4619
  }
5167
- function createConnector20() {
4620
+ function createConnector18() {
5168
4621
  return new TunnelConnector();
5169
4622
  }
5170
4623
  var DeployConnector = class extends AbstractConnector {
@@ -5390,56 +4843,90 @@ var DeployConnector = class extends AbstractConnector {
5390
4843
  };
5391
4844
  }
5392
4845
  };
5393
- function createConnector21() {
4846
+ function createConnector19() {
5394
4847
  return new DeployConnector();
5395
4848
  }
5396
4849
 
5397
4850
  // connectors/src/connector-registry.ts
5398
- var connectorFactories = /* @__PURE__ */ new Map();
5399
- function registerConnector(name, factory) {
5400
- connectorFactories.set(name, factory);
4851
+ var BUILTIN_CONNECTOR_CATALOG = [
4852
+ { id: "git", displayName: "git" },
4853
+ { id: "local", displayName: "local" },
4854
+ { id: "s3", displayName: "s3" },
4855
+ { id: "webdav", displayName: "webdav" },
4856
+ { id: "sharepoint", displayName: "sharepoint" },
4857
+ { id: "googledrive", displayName: "googledrive" },
4858
+ { id: "memory", displayName: "memory" },
4859
+ { id: "postgres", displayName: "postgres" },
4860
+ { id: "sqlite", displayName: "sqlite" },
4861
+ { id: "minio", displayName: "minio" },
4862
+ { id: "flow", displayName: "flow" },
4863
+ { id: "xstate", displayName: "xstate" },
4864
+ { id: "xstate-store", displayName: "xstate-store" },
4865
+ { id: "devserver", displayName: "devserver" },
4866
+ { id: "static", displayName: "static" },
4867
+ { id: "tunnel", displayName: "tunnel" },
4868
+ { id: "deploy", displayName: "deploy" },
4869
+ { id: "gmail", displayName: "gmail" },
4870
+ { id: "mattermost", displayName: "mattermost" }
4871
+ ];
4872
+ function connectorTargetFromFactory(id, factory) {
4873
+ return {
4874
+ id,
4875
+ displayName: id,
4876
+ apiVersion: 1,
4877
+ configSchema: zNS.unknown(),
4878
+ create: (_config, _ctx) => factory()
4879
+ };
4880
+ }
4881
+ var _connectorsRegistered = false;
4882
+ function registerBuiltinConnectors(registry = pluginRegistry) {
4883
+ if (registry === pluginRegistry && _connectorsRegistered) return;
4884
+ const reg = (id, factory) => {
4885
+ if (registry.get("connector", id)) return;
4886
+ registry.register("connector", connectorTargetFromFactory(id, factory));
4887
+ };
4888
+ reg("git", () => createConnector2());
4889
+ reg("local", () => createConnector3());
4890
+ reg("s3", () => createConnector4());
4891
+ reg("webdav", () => createConnector5());
4892
+ reg("sharepoint", () => createConnector6());
4893
+ reg("googledrive", () => createConnector7());
4894
+ reg("memory", () => createConnector8());
4895
+ reg("postgres", () => createConnector9());
4896
+ reg("sqlite", () => createConnector10());
4897
+ reg("minio", () => createConnector11());
4898
+ reg("flow", () => createConnector());
4899
+ reg("xstate", () => createConnector12());
4900
+ reg("xstate-store", () => createConnector13());
4901
+ reg("devserver", () => createConnector16());
4902
+ reg("static", () => createConnector17());
4903
+ reg("tunnel", () => createConnector18());
4904
+ reg("deploy", () => createConnector19());
4905
+ reg("gmail", () => createConnector14());
4906
+ reg("mattermost", () => createConnector15());
4907
+ if (registry === pluginRegistry) _connectorsRegistered = true;
5401
4908
  }
5402
4909
  function getConnector(name) {
5403
- const factory = connectorFactories.get(name);
5404
- if (!factory) {
5405
- throw new Error(
5406
- `Unknown connector: "${name}". Available: ${[...connectorFactories.keys()].join(", ") || "none"}`
5407
- );
4910
+ ensureBuiltinsRegistered();
4911
+ const target = pluginRegistry.get("connector", name);
4912
+ if (!target) {
4913
+ const available = pluginRegistry.list("connector").map((m) => m.id).join(", ");
4914
+ throw new Error(`Unknown connector: "${name}". Available: ${available || "none"}`);
5408
4915
  }
5409
- return factory();
4916
+ return target.create({}, {});
5410
4917
  }
5411
4918
  function tryGetConnector(name) {
5412
- const factory = connectorFactories.get(name);
5413
- return factory ? factory() : void 0;
4919
+ ensureBuiltinsRegistered();
4920
+ return pluginRegistry.get("connector", name)?.create({}, {});
5414
4921
  }
5415
4922
  function listConnectors() {
5416
- return [...connectorFactories.keys()];
4923
+ ensureBuiltinsRegistered();
4924
+ return pluginRegistry.list("connector").map((m) => m.id);
5417
4925
  }
5418
- var _connectorsRegistered = false;
5419
- function registerBuiltinConnectors() {
5420
- if (_connectorsRegistered) return;
5421
- _connectorsRegistered = true;
5422
- registerConnector("git", () => createConnector2());
5423
- registerConnector("local", () => createConnector3());
5424
- registerConnector("s3", () => createConnector4());
5425
- registerConnector("webdav", () => createConnector5());
5426
- registerConnector("sharepoint", () => createConnector6());
5427
- registerConnector("googledrive", () => createConnector7());
5428
- registerConnector("memory", () => createConnector8());
5429
- registerConnector("postgres", () => createConnector9());
5430
- registerConnector("redis", () => createConnector10());
5431
- registerConnector("sqlite", () => createConnector11());
5432
- registerConnector("minio", () => createConnector12());
5433
- registerConnector("flow", () => createConnector());
5434
- registerConnector("xstate", () => createConnector13());
5435
- registerConnector("xstate-store", () => createConnector14());
5436
- registerConnector("yjs", () => createConnector15());
5437
- registerConnector("devserver", () => createConnector18());
5438
- registerConnector("static", () => createConnector19());
5439
- registerConnector("tunnel", () => createConnector20());
5440
- registerConnector("deploy", () => createConnector21());
5441
- registerConnector("gmail", () => createConnector16());
5442
- registerConnector("mattermost", () => createConnector17());
4926
+ function ensureBuiltinsRegistered() {
4927
+ if (pluginRegistry.list("connector").length === 0) {
4928
+ registerBuiltinConnectors();
4929
+ }
5443
4930
  }
5444
4931
 
5445
4932
  // connectors/src/connector-types.ts
@@ -5664,7 +5151,15 @@ var ConnectorManager = class {
5664
5151
  );
5665
5152
  }
5666
5153
  const connector = mod.createConnector();
5667
- registerConnector(driver, () => connector);
5154
+ if (!pluginRegistry.get("connector", driver)) {
5155
+ pluginRegistry.register("connector", {
5156
+ id: driver,
5157
+ displayName: driver,
5158
+ apiVersion: 1,
5159
+ configSchema: zNS.unknown(),
5160
+ create: () => connector
5161
+ });
5162
+ }
5668
5163
  return connector;
5669
5164
  }
5670
5165
  /**
@@ -6245,7 +5740,7 @@ async function buildSdkConnectorTools(manager, options) {
6245
5740
  return null;
6246
5741
  }
6247
5742
  }
6248
- const z2 = options?.z ?? zStatic;
5743
+ const z4 = options?.z ?? zStatic;
6249
5744
  const tools = [];
6250
5745
  tools.push({
6251
5746
  name: "connector_list",
@@ -6267,7 +5762,7 @@ async function buildSdkConnectorTools(manager, options) {
6267
5762
  name: "connector_load_skill",
6268
5763
  description: "Load full instructions for a specific connector into context. Returns a markdown document describing the connector and its available CLI commands.",
6269
5764
  inputSchema: {
6270
- connector_id: z2.string().describe("Connector ID (use connector_list to enumerate)")
5765
+ connector_id: z4.string().describe("Connector ID (use connector_list to enumerate)")
6271
5766
  },
6272
5767
  handler: async ({ connector_id }) => {
6273
5768
  try {
@@ -6285,8 +5780,8 @@ async function buildSdkConnectorTools(manager, options) {
6285
5780
  name: "connector_read",
6286
5781
  description: 'Read content from a connector by path. For KV stores, path is the key. For databases, path is "table/pk".',
6287
5782
  inputSchema: {
6288
- connector_id: z2.string().describe("Connector ID"),
6289
- path: z2.string().describe("Path within the connector")
5783
+ connector_id: z4.string().describe("Connector ID"),
5784
+ path: z4.string().describe("Path within the connector")
6290
5785
  },
6291
5786
  handler: async ({ connector_id, path }) => {
6292
5787
  try {
@@ -6306,9 +5801,9 @@ async function buildSdkConnectorTools(manager, options) {
6306
5801
  name: "connector_write",
6307
5802
  description: "Write content to a connector at a path.",
6308
5803
  inputSchema: {
6309
- connector_id: z2.string().describe("Connector ID"),
6310
- path: z2.string().describe("Path within the connector"),
6311
- content: z2.string().describe("Content to write")
5804
+ connector_id: z4.string().describe("Connector ID"),
5805
+ path: z4.string().describe("Path within the connector"),
5806
+ content: z4.string().describe("Content to write")
6312
5807
  },
6313
5808
  handler: async ({
6314
5809
  connector_id,
@@ -6330,9 +5825,9 @@ async function buildSdkConnectorTools(manager, options) {
6330
5825
  name: "connector_list_entries",
6331
5826
  description: "List entries in a connector (files, keys, rows, etc).",
6332
5827
  inputSchema: {
6333
- connector_id: z2.string().describe("Connector ID"),
6334
- path: z2.string().optional().describe("Path prefix or directory"),
6335
- recursive: z2.boolean().optional().describe("Include nested entries")
5828
+ connector_id: z4.string().describe("Connector ID"),
5829
+ path: z4.string().optional().describe("Path prefix or directory"),
5830
+ recursive: z4.boolean().optional().describe("Include nested entries")
6336
5831
  },
6337
5832
  handler: async ({
6338
5833
  connector_id,
@@ -6354,8 +5849,8 @@ async function buildSdkConnectorTools(manager, options) {
6354
5849
  name: "connector_search",
6355
5850
  description: "Search within a connector for matching content.",
6356
5851
  inputSchema: {
6357
- connector_id: z2.string().describe("Connector ID"),
6358
- query: z2.string().describe("Search query")
5852
+ connector_id: z4.string().describe("Connector ID"),
5853
+ query: z4.string().describe("Search query")
6359
5854
  },
6360
5855
  handler: async ({ connector_id, query }) => {
6361
5856
  try {
@@ -6373,8 +5868,8 @@ async function buildSdkConnectorTools(manager, options) {
6373
5868
  name: "connector_delete",
6374
5869
  description: "Delete an entry from a connector.",
6375
5870
  inputSchema: {
6376
- connector_id: z2.string().describe("Connector ID"),
6377
- path: z2.string().describe("Path to delete")
5871
+ connector_id: z4.string().describe("Connector ID"),
5872
+ path: z4.string().describe("Path to delete")
6378
5873
  },
6379
5874
  handler: async ({ connector_id, path }) => {
6380
5875
  try {
@@ -6393,9 +5888,9 @@ async function buildSdkConnectorTools(manager, options) {
6393
5888
  name: "connector_exec",
6394
5889
  description: "Execute a custom connector operation by name. Use only when shell access is unavailable. Load the connector skill first to see available operations and their arguments.",
6395
5890
  inputSchema: {
6396
- connector_id: z2.string().describe("Connector ID"),
6397
- operation: z2.string().describe("Operation name (e.g. 'send_message', 'query')"),
6398
- args: z2.record(z2.unknown()).describe("Named arguments for the operation (without -- prefix)")
5891
+ connector_id: z4.string().describe("Connector ID"),
5892
+ operation: z4.string().describe("Operation name (e.g. 'send_message', 'query')"),
5893
+ args: z4.record(z4.unknown()).describe("Named arguments for the operation (without -- prefix)")
6399
5894
  },
6400
5895
  handler: async ({
6401
5896
  connector_id,
@@ -7980,6 +7475,6 @@ function createConnector() {
7980
7475
  return new FlowAdapter();
7981
7476
  }
7982
7477
 
7983
- export { AbstractConnector, ConnectorFieldMissingError, ConnectorManager, ConnectorStartupError, DeployConnector, DevServerConnector, FlowAdapter, GitConnector, GmailConnector, GoogleDriveConnector, LocalConnector, LogBuffer, ManagedGitconfigCollisionError, MattermostConnector, MemoryConnector, MinIOConnector, PostgresConnector, RedisConnector, S3Connector, SQLiteConnector, SharePointConnector, StaticServerConnector, TunnelConnector, WebDAVConnector, XStateConnector, XStateStoreConnector, YjsConnector, atomicReplaceCredential, buildConnectorPromptSection, buildSdkConnectorTools, createConnector, createConnector10, createConnector11, createConnector12, createConnector13, createConnector14, createConnector15, createConnector16, createConnector17, createConnector18, createConnector19, createConnector2, createConnector20, createConnector21, createConnector3, createConnector4, createConnector5, createConnector6, createConnector7, createConnector8, createConnector9, createFsWatcher, createWorktree, defaultSpawn, ensureFleetMounted, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, parseAuthBlob2 as parseAuthBlob, registerBuiltinConnectors, registerConnector, removeMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock };
7984
- //# sourceMappingURL=chunk-XAVM2BAJ.js.map
7985
- //# sourceMappingURL=chunk-XAVM2BAJ.js.map
7478
+ export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, ConnectorFieldMissingError, ConnectorManager, ConnectorStartupError, DeployConnector, DevServerConnector, FlowAdapter, GitConnector, GmailConnector, GoogleDriveConnector, LocalConnector, LogBuffer, ManagedGitconfigCollisionError, MattermostConnector, MemoryConnector, MinIOConnector, PostgresConnector, S3Connector, SQLiteConnector, SharePointConnector, StaticServerConnector, TunnelConnector, WebDAVConnector, XStateConnector, XStateStoreConnector, atomicReplaceCredential, buildConnectorPromptSection, buildSdkConnectorTools, createConnector, createConnector10, createConnector11, createConnector12, createConnector13, createConnector14, createConnector15, createConnector16, createConnector17, createConnector18, createConnector19, createConnector2, createConnector3, createConnector4, createConnector5, createConnector6, createConnector7, createConnector8, createConnector9, createFsWatcher, createWorktree, defaultSpawn, ensureFleetMounted, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, parseAuthBlob2 as parseAuthBlob, registerBuiltinConnectors, removeMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock };
7479
+ //# sourceMappingURL=chunk-G6GKWGOW.js.map
7480
+ //# sourceMappingURL=chunk-G6GKWGOW.js.map