@capybara-hq/kernel 0.1.0-rc.2 → 0.1.0-rc.4

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 (312) hide show
  1. package/dist/admin/admin.controller.d.ts +9 -4
  2. package/dist/admin/admin.controller.js +13 -4
  3. package/dist/admin/extensions.controller.d.ts +8 -1
  4. package/dist/admin/extensions.controller.js +22 -2
  5. package/dist/agents/agent-lookup.d.ts +3 -0
  6. package/dist/agents/agent-lookup.js +20 -2
  7. package/dist/agents/agent-profile.service.d.ts +29 -0
  8. package/dist/agents/agent-profile.service.js +117 -0
  9. package/dist/agents/agents.controller.d.ts +93 -3
  10. package/dist/agents/agents.controller.js +114 -4
  11. package/dist/agents/agents.module.js +6 -2
  12. package/dist/agents/agents.service.d.ts +13 -5
  13. package/dist/agents/agents.service.js +49 -13
  14. package/dist/agents/definition.d.ts +35 -8
  15. package/dist/agents/definition.js +203 -17
  16. package/dist/agents/instruction-files.d.ts +60 -0
  17. package/dist/agents/instruction-files.js +111 -0
  18. package/dist/agents/models.controller.d.ts +9 -3
  19. package/dist/agents/models.controller.js +19 -4
  20. package/dist/agents/profile.d.ts +96 -0
  21. package/dist/agents/profile.js +51 -0
  22. package/dist/agents/readiness.controller.d.ts +26 -0
  23. package/dist/agents/readiness.controller.js +56 -0
  24. package/dist/agents/templates.js +20 -5
  25. package/dist/background/background.controller.d.ts +38 -0
  26. package/dist/background/background.controller.js +87 -0
  27. package/dist/background/background.module.d.ts +10 -0
  28. package/dist/background/background.module.js +32 -0
  29. package/dist/background/finish.d.ts +43 -0
  30. package/dist/background/finish.js +94 -0
  31. package/dist/background/launch-lock.d.ts +14 -0
  32. package/dist/background/launch-lock.js +39 -0
  33. package/dist/background/launch.d.ts +36 -0
  34. package/dist/background/launch.js +70 -0
  35. package/dist/background/poll.job.d.ts +53 -0
  36. package/dist/background/poll.job.js +182 -0
  37. package/dist/background/render.d.ts +23 -0
  38. package/dist/background/render.js +48 -0
  39. package/dist/background/session.d.ts +37 -0
  40. package/dist/background/session.js +66 -0
  41. package/dist/background/status.d.ts +35 -0
  42. package/dist/background/status.js +57 -0
  43. package/dist/background/stop.d.ts +62 -0
  44. package/dist/background/stop.js +225 -0
  45. package/dist/background/store.d.ts +150 -0
  46. package/dist/background/store.js +351 -0
  47. package/dist/background/store.module.d.ts +6 -0
  48. package/dist/background/store.module.js +22 -0
  49. package/dist/background/tasks.service.d.ts +67 -0
  50. package/dist/background/tasks.service.js +186 -0
  51. package/dist/background/wake-rules.d.ts +57 -0
  52. package/dist/background/wake-rules.js +83 -0
  53. package/dist/background/wake.d.ts +28 -0
  54. package/dist/background/wake.js +57 -0
  55. package/dist/catalog/catalog-content.js +4 -1
  56. package/dist/catalog/claude/agents.js +15 -10
  57. package/dist/catalog/marketplaces.service.d.ts +1 -1
  58. package/dist/catalog/plugin-import.js +1 -1
  59. package/dist/catalog/plugin-upgrade.js +1 -1
  60. package/dist/channels/cards.d.ts +8 -2
  61. package/dist/channels/cards.js +17 -9
  62. package/dist/channels/connections.service.d.ts +16 -1
  63. package/dist/channels/connections.service.js +38 -4
  64. package/dist/channels/threads.d.ts +5 -0
  65. package/dist/channels/threads.js +8 -0
  66. package/dist/config/schema.d.ts +18 -0
  67. package/dist/config/schema.js +104 -2
  68. package/dist/conversations/access.js +2 -0
  69. package/dist/conversations/artifacts.d.ts +1 -1
  70. package/dist/conversations/artifacts.js +1 -1
  71. package/dist/conversations/attachments.service.d.ts +30 -0
  72. package/dist/conversations/attachments.service.js +130 -5
  73. package/dist/conversations/conversations.controller.d.ts +36 -5
  74. package/dist/conversations/conversations.controller.js +62 -12
  75. package/dist/conversations/conversations.module.js +3 -0
  76. package/dist/conversations/conversations.service.d.ts +44 -2
  77. package/dist/conversations/conversations.service.js +140 -12
  78. package/dist/conversations/event-log.d.ts +12 -1
  79. package/dist/conversations/event-log.js +29 -1
  80. package/dist/conversations/events.d.ts +81 -3
  81. package/dist/conversations/events.js +83 -16
  82. package/dist/conversations/queue.d.ts +3 -1
  83. package/dist/conversations/queue.js +13 -2
  84. package/dist/conversations/queue.service.js +3 -1
  85. package/dist/conversations/titles.d.ts +7 -0
  86. package/dist/conversations/titles.js +15 -0
  87. package/dist/db/kernel-schema.d.ts +60 -4
  88. package/dist/db/pool.d.ts +5 -0
  89. package/dist/db/pool.js +3 -0
  90. package/dist/errors.d.ts +8 -0
  91. package/dist/errors.js +8 -0
  92. package/dist/evals/recorded-tools.d.ts +27 -1
  93. package/dist/evals/recorded-tools.js +85 -10
  94. package/dist/evals/run-replay.d.ts +10 -2
  95. package/dist/evals/run-replay.js +49 -12
  96. package/dist/evals/step-replay.js +12 -6
  97. package/dist/evals/trajectory.d.ts +2 -2
  98. package/dist/evals/trajectory.js +1 -1
  99. package/dist/extensions/admin-ops.js +2 -0
  100. package/dist/extensions/admin-view.d.ts +3 -1
  101. package/dist/extensions/admin-view.js +10 -2
  102. package/dist/extensions/blobs.js +1 -0
  103. package/dist/extensions/config-issues.d.ts +13 -1
  104. package/dist/extensions/config-issues.js +22 -5
  105. package/dist/extensions/config-json-schema.d.ts +43 -7
  106. package/dist/extensions/config-json-schema.js +124 -58
  107. package/dist/extensions/deployment-config-store.d.ts +6 -0
  108. package/dist/extensions/deployment-config.d.ts +50 -3
  109. package/dist/extensions/deployment-config.js +125 -28
  110. package/dist/extensions/display-name.d.ts +22 -0
  111. package/dist/extensions/display-name.js +77 -0
  112. package/dist/extensions/extensions.module.js +6 -0
  113. package/dist/extensions/host.d.ts +26 -1
  114. package/dist/extensions/host.js +82 -9
  115. package/dist/extensions/org-config.controller.d.ts +11 -3
  116. package/dist/extensions/org-config.controller.js +14 -6
  117. package/dist/extensions/org-config.d.ts +6 -0
  118. package/dist/extensions/org-config.js +12 -13
  119. package/dist/extensions/package.d.ts +14 -1
  120. package/dist/extensions/package.js +51 -2
  121. package/dist/extensions/permission-view.d.ts +3 -0
  122. package/dist/extensions/point-defaults.controller.d.ts +34 -0
  123. package/dist/extensions/point-defaults.controller.js +71 -0
  124. package/dist/extensions/point-defaults.d.ts +64 -0
  125. package/dist/extensions/point-defaults.js +206 -0
  126. package/dist/extensions/registry.d.ts +1 -1
  127. package/dist/extensions/registry.js +2 -0
  128. package/dist/http/api.module.js +8 -0
  129. package/dist/http/nest-logger.d.ts +6 -5
  130. package/dist/http/nest-logger.js +24 -10
  131. package/dist/identity/auth.controller.js +9 -5
  132. package/dist/identity/cookies.d.ts +20 -5
  133. package/dist/identity/cookies.js +44 -6
  134. package/dist/identity/me.controller.d.ts +5 -1
  135. package/dist/identity/me.controller.js +12 -3
  136. package/dist/identity/sessions.d.ts +12 -0
  137. package/dist/identity/sessions.js +45 -0
  138. package/dist/identity/settings.js +1 -1
  139. package/dist/index.d.ts +1 -1
  140. package/dist/infra/config/kernel-config.service.js +6 -0
  141. package/dist/infra/database/database.module.js +1 -0
  142. package/dist/infra/events/kernel-events.d.ts +8 -0
  143. package/dist/infra/lifecycle/process-guards.js +4 -0
  144. package/dist/infra/logging/logging.module.d.ts +4 -2
  145. package/dist/infra/logging/logging.module.js +24 -6
  146. package/dist/infra/queue/redis-connection.d.ts +6 -0
  147. package/dist/infra/queue/redis-connection.js +7 -0
  148. package/dist/infra/redis/redis.module.js +6 -2
  149. package/dist/infra/tokens.d.ts +6 -1
  150. package/dist/infra/tokens.js +6 -1
  151. package/dist/lifecycle/kernel-lifecycle.js +5 -0
  152. package/dist/log.d.ts +13 -1
  153. package/dist/log.js +93 -17
  154. package/dist/models/purposes.d.ts +23 -0
  155. package/dist/models/purposes.js +31 -10
  156. package/dist/orgs/offboarding.d.ts +3 -1
  157. package/dist/orgs/offboarding.js +26 -16
  158. package/dist/orgs/settings.service.d.ts +7 -2
  159. package/dist/orgs/settings.service.js +15 -4
  160. package/dist/roles/worker.module.js +6 -0
  161. package/dist/runtime/context/build.d.ts +15 -13
  162. package/dist/runtime/context/build.js +45 -27
  163. package/dist/runtime/context/claude-tools.d.ts +3 -1
  164. package/dist/runtime/context/claude-tools.js +12 -12
  165. package/dist/runtime/context/compaction.js +4 -0
  166. package/dist/runtime/context/legacy-text.d.ts +22 -0
  167. package/dist/runtime/context/legacy-text.js +37 -0
  168. package/dist/runtime/context/skills.d.ts +29 -11
  169. package/dist/runtime/context/skills.js +37 -30
  170. package/dist/runtime/langgraph-loop.js +3 -2
  171. package/dist/runtime/loop.d.ts +5 -4
  172. package/dist/runtime/maintenance.d.ts +4 -2
  173. package/dist/runtime/maintenance.js +17 -5
  174. package/dist/runtime/model-call.d.ts +17 -1
  175. package/dist/runtime/model-call.js +4 -3
  176. package/dist/runtime/providers.d.ts +6 -0
  177. package/dist/runtime/providers.js +8 -0
  178. package/dist/runtime/run-finish.d.ts +1 -1
  179. package/dist/runtime/run-queue.d.ts +28 -5
  180. package/dist/runtime/run-queue.js +131 -35
  181. package/dist/runtime/run-worker.d.ts +2 -2
  182. package/dist/runtime/run-worker.js +20 -7
  183. package/dist/runtime/runtime.module.js +8 -3
  184. package/dist/runtime/step-log.d.ts +6 -0
  185. package/dist/runtime/step-log.js +16 -2
  186. package/dist/runtime/subagents/definition.d.ts +1 -6
  187. package/dist/runtime/subagents/definition.js +14 -13
  188. package/dist/runtime/subagents/dispatch.d.ts +2 -2
  189. package/dist/runtime/subagents/dispatch.js +2 -2
  190. package/dist/runtime/subagents/org-agents.js +2 -1
  191. package/dist/runtime/subagents/roster.d.ts +1 -1
  192. package/dist/runtime/subagents/roster.js +1 -1
  193. package/dist/runtime/subagents/skill-fork.d.ts +2 -2
  194. package/dist/runtime/subagents/skill-fork.js +2 -2
  195. package/dist/runtime/subagents/subagents.service.d.ts +3 -3
  196. package/dist/runtime/subagents/subagents.service.js +3 -3
  197. package/dist/runtime/usage-report.d.ts +2 -1
  198. package/dist/runtime/usage-report.js +2 -1
  199. package/dist/runtime/waits.d.ts +13 -7
  200. package/dist/runtime/waits.js +42 -16
  201. package/dist/sandbox/sandbox.module.js +6 -1
  202. package/dist/sandbox/sandbox.service.d.ts +61 -3
  203. package/dist/sandbox/sandbox.service.js +141 -7
  204. package/dist/skills/catalog.d.ts +4 -4
  205. package/dist/skills/catalog.js +4 -4
  206. package/dist/skills/changes.service.d.ts +2 -2
  207. package/dist/skills/changes.service.js +5 -4
  208. package/dist/skills/invocation-keys.d.ts +1 -1
  209. package/dist/skills/invocation-keys.js +1 -1
  210. package/dist/skills/invoke.d.ts +1 -1
  211. package/dist/skills/invoke.js +5 -4
  212. package/dist/tools/approvals.service.d.ts +6 -0
  213. package/dist/tools/approvals.service.js +21 -1
  214. package/dist/tools/builtin-names.d.ts +91 -0
  215. package/dist/tools/builtin-names.js +143 -0
  216. package/dist/tools/builtins/agent.d.ts +7 -7
  217. package/dist/tools/builtins/agent.js +7 -11
  218. package/dist/tools/builtins/ask-user.d.ts +1 -1
  219. package/dist/tools/builtins/ask-user.js +2 -2
  220. package/dist/tools/builtins/builtin-tools.d.ts +17 -3
  221. package/dist/tools/builtins/builtin-tools.js +36 -4
  222. package/dist/tools/builtins/read-tool-output.d.ts +1 -1
  223. package/dist/tools/builtins/read-tool-output.js +2 -2
  224. package/dist/tools/builtins/sandbox/bash.d.ts +4 -4
  225. package/dist/tools/builtins/sandbox/bash.js +259 -29
  226. package/dist/tools/builtins/sandbox/common.d.ts +30 -7
  227. package/dist/tools/builtins/sandbox/common.js +9 -5
  228. package/dist/tools/builtins/sandbox/deliver.d.ts +1 -1
  229. package/dist/tools/builtins/sandbox/deliver.js +12 -12
  230. package/dist/tools/builtins/sandbox/edit.d.ts +1 -1
  231. package/dist/tools/builtins/sandbox/edit.js +41 -30
  232. package/dist/tools/builtins/sandbox/file-state.d.ts +34 -0
  233. package/dist/tools/builtins/sandbox/file-state.js +34 -0
  234. package/dist/tools/builtins/sandbox/glob-match.d.ts +1 -1
  235. package/dist/tools/builtins/sandbox/glob-match.js +1 -1
  236. package/dist/tools/builtins/sandbox/glob.d.ts +1 -1
  237. package/dist/tools/builtins/sandbox/glob.js +4 -4
  238. package/dist/tools/builtins/sandbox/grep.d.ts +7 -4
  239. package/dist/tools/builtins/sandbox/grep.js +147 -30
  240. package/dist/tools/builtins/sandbox/index.d.ts +3 -1
  241. package/dist/tools/builtins/sandbox/index.js +7 -1
  242. package/dist/tools/builtins/sandbox/read.d.ts +2 -2
  243. package/dist/tools/builtins/sandbox/read.js +21 -14
  244. package/dist/tools/builtins/sandbox/task-output.d.ts +63 -0
  245. package/dist/tools/builtins/sandbox/task-output.js +304 -0
  246. package/dist/tools/builtins/sandbox/task-stop.d.ts +10 -0
  247. package/dist/tools/builtins/sandbox/task-stop.js +112 -0
  248. package/dist/tools/builtins/sandbox/write.d.ts +1 -1
  249. package/dist/tools/builtins/sandbox/write.js +37 -33
  250. package/dist/tools/builtins/skill-load.d.ts +3 -3
  251. package/dist/tools/builtins/skill-load.js +32 -16
  252. package/dist/tools/builtins/skill-write.d.ts +4 -4
  253. package/dist/tools/builtins/skill-write.js +10 -10
  254. package/dist/tools/builtins/tool-search.d.ts +13 -9
  255. package/dist/tools/builtins/tool-search.js +25 -14
  256. package/dist/tools/builtins/web/errors.d.ts +8 -0
  257. package/dist/tools/builtins/web/errors.js +53 -0
  258. package/dist/tools/builtins/web/extract.d.ts +62 -0
  259. package/dist/tools/builtins/web/extract.js +267 -0
  260. package/dist/tools/builtins/web/fetch.d.ts +55 -0
  261. package/dist/tools/builtins/web/fetch.js +174 -0
  262. package/dist/tools/builtins/web/index.d.ts +13 -0
  263. package/dist/tools/builtins/web/index.js +12 -0
  264. package/dist/tools/builtins/web/page-cache.d.ts +25 -0
  265. package/dist/tools/builtins/web/page-cache.js +77 -0
  266. package/dist/tools/builtins/web/search.d.ts +25 -0
  267. package/dist/tools/builtins/web/search.js +209 -0
  268. package/dist/tools/builtins/web/url.d.ts +17 -0
  269. package/dist/tools/builtins/web/url.js +43 -0
  270. package/dist/tools/connectors.service.js +4 -4
  271. package/dist/tools/display-names.d.ts +9 -0
  272. package/dist/tools/display-names.js +24 -0
  273. package/dist/tools/drift.js +5 -5
  274. package/dist/tools/elicitation.js +1 -1
  275. package/dist/tools/info.d.ts +20 -4
  276. package/dist/tools/info.js +55 -32
  277. package/dist/tools/legacy-data.d.ts +34 -0
  278. package/dist/tools/legacy-data.js +76 -0
  279. package/dist/tools/legacy-keys.d.ts +51 -0
  280. package/dist/tools/legacy-keys.js +115 -0
  281. package/dist/tools/naming.d.ts +1 -5
  282. package/dist/tools/naming.js +1 -7
  283. package/dist/tools/oauth/flow-paths.d.ts +1 -1
  284. package/dist/tools/oauth/flow-paths.js +1 -1
  285. package/dist/tools/outputs.js +1 -1
  286. package/dist/tools/pipeline.d.ts +13 -7
  287. package/dist/tools/pipeline.js +112 -39
  288. package/dist/tools/policy.d.ts +1 -14
  289. package/dist/tools/policy.js +13 -19
  290. package/dist/tools/questions.controller.d.ts +1 -1
  291. package/dist/tools/questions.controller.js +1 -1
  292. package/dist/tools/questions.service.d.ts +1 -1
  293. package/dist/tools/registry.d.ts +38 -24
  294. package/dist/tools/registry.js +54 -47
  295. package/dist/tools/resources.d.ts +1 -1
  296. package/dist/tools/resources.js +1 -1
  297. package/dist/tools/tools.module.js +13 -1
  298. package/dist/tools/validate.js +1 -1
  299. package/package.json +3 -3
  300. package/src/migrations/0063_tool_keys_claude_code.sql +220 -0
  301. package/src/migrations/0064_account_last_org.sql +7 -0
  302. package/src/migrations/0065_conversation_archive.sql +8 -0
  303. package/src/migrations/0066_extension_display_name.sql +4 -0
  304. package/src/migrations/0067_agent_profiles.sql +20 -0
  305. package/src/migrations/0068_agent_avatar_uploads.sql +7 -0
  306. package/src/migrations/0069_attachments_agent_idx.sql +3 -0
  307. package/src/migrations/0070_background_tasks.sql +37 -0
  308. package/src/migrations/0071_background_tasks_reserve.sql +6 -0
  309. package/src/migrations/0072_background_tasks_stopping.sql +5 -0
  310. package/src/migrations/0073_org_extension_point_defaults.sql +11 -0
  311. package/dist/tools/builtins/sandbox/names.d.ts +0 -7
  312. package/dist/tools/builtins/sandbox/names.js +0 -20
@@ -396,6 +396,8 @@ export { ExtensionAdminOps };
396
396
  function fallbackView(name, known, err) {
397
397
  return {
398
398
  name,
399
+ // the degraded item reads nothing more (the read that failed may be the database)
400
+ displayName: null,
399
401
  version: known.version,
400
402
  source: "install",
401
403
  sha256: known.sha256,
@@ -5,6 +5,7 @@ import { TransactionHost } from "../infra/database/transaction-host.js";
5
5
  import type { KernelLogger } from "../log.js";
6
6
  import { ExtensionApprovals } from "./approvals.js";
7
7
  import { ExtensionBlobs } from "./blobs.js";
8
+ import { ExtensionDisplayNames } from "./display-name.js";
8
9
  import { ExtensionHost } from "./host.js";
9
10
  import { ExtensionInstalls } from "./installs.js";
10
11
  import { ExtensionLifecycle, PLUGINS_CHANGED_TOPIC } from "./lifecycle.js";
@@ -41,6 +42,7 @@ export declare class ExtensionAdmin {
41
42
  private readonly config;
42
43
  private readonly bus;
43
44
  private readonly log;
45
+ private readonly displayNames;
44
46
  private readonly packageSets;
45
47
  constructor(kdb: KernelDb, txHost: TransactionHost,
46
48
  /** The enterprise admin lock (identity/enterprise-admin.ts): joins the transaction. */
@@ -48,7 +50,7 @@ export declare class ExtensionAdmin {
48
50
  /** The config-declared extensions (this replica's host; the CLI fills it from its inspection). */
49
51
  host: ExtensionHost,
50
52
  /** This replica's reconcile after an approval (a no-op where the lifecycle never started: the CLI). */
51
- lifecycle: ExtensionLifecycle, config: KernelConfigService, bus: PublishBus, log: KernelLogger);
53
+ lifecycle: ExtensionLifecycle, config: KernelConfigService, bus: PublishBus, log: KernelLogger, displayNames: ExtensionDisplayNames);
52
54
  private get db();
53
55
  /** 全部插件(配置声明 → 安装记录,各自按名字)。 */
54
56
  list(): Promise<AdminExtensionView[]>;
@@ -19,6 +19,7 @@ import { Transactional } from "../infra/database/transactional.decorator.js";
19
19
  import { KERNEL_BUS, KERNEL_LOGGER } from "../infra/tokens.js";
20
20
  import { ExtensionApprovals, snapshotCovers, writeSnapshot, } from "./approvals.js";
21
21
  import { ExtensionBlobs } from "./blobs.js";
22
+ import { ExtensionDisplayNames } from "./display-name.js";
22
23
  import { ExtensionHost } from "./host.js";
23
24
  import { ExtensionInstalls } from "./installs.js";
24
25
  import { ExtensionLifecycle, PLUGINS_CHANGED_TOPIC, STALE_RECONCILE_PERIODS } from "./lifecycle.js";
@@ -63,6 +64,7 @@ let ExtensionAdmin = class ExtensionAdmin {
63
64
  config;
64
65
  bus;
65
66
  log;
67
+ displayNames;
66
68
  packageSets = new Map();
67
69
  constructor(kdb, txHost,
68
70
  /** The enterprise admin lock (identity/enterprise-admin.ts): joins the transaction. */
@@ -70,7 +72,7 @@ let ExtensionAdmin = class ExtensionAdmin {
70
72
  /** The config-declared extensions (this replica's host; the CLI fills it from its inspection). */
71
73
  host,
72
74
  /** This replica's reconcile after an approval (a no-op where the lifecycle never started: the CLI). */
73
- lifecycle, config, bus, log) {
75
+ lifecycle, config, bus, log, displayNames) {
74
76
  this.kdb = kdb;
75
77
  this.txHost = txHost;
76
78
  this.adminLock = adminLock;
@@ -83,6 +85,7 @@ let ExtensionAdmin = class ExtensionAdmin {
83
85
  this.config = config;
84
86
  this.bus = bus;
85
87
  this.log = log;
88
+ this.displayNames = displayNames;
86
89
  }
87
90
  get db() {
88
91
  return this.kdb.db;
@@ -278,6 +281,7 @@ let ExtensionAdmin = class ExtensionAdmin {
278
281
  return [];
279
282
  const names = subjects.map((s) => s.name);
280
283
  const snapshots = await this.approvals.all();
284
+ const displayNames = await this.displayNames.many(names);
281
285
  const staleSeconds = STALE_RECONCILE_PERIODS * this.config.get().extensionHost.reconcileIntervalSeconds;
282
286
  const rows = await this.db
283
287
  .selectFrom("extension_replica_status")
@@ -294,9 +298,11 @@ let ExtensionAdmin = class ExtensionAdmin {
294
298
  const configValid = s.configValid ??
295
299
  !replicas.some((r) => r.state === "pending" && r.reason === "config" && r.sha256 === target);
296
300
  const install = s.install;
301
+ const displayName = displayNames.get(s.name) ?? null;
297
302
  if (s.broken !== undefined) {
298
303
  return {
299
304
  name: s.name,
305
+ displayName,
300
306
  version: s.version,
301
307
  source: s.source,
302
308
  sha256: target,
@@ -326,6 +332,7 @@ let ExtensionAdmin = class ExtensionAdmin {
326
332
  const permissions = permissionGroups(s.set);
327
333
  return {
328
334
  name: s.name,
335
+ displayName,
329
336
  version: s.version,
330
337
  source: s.source,
331
338
  sha256: target,
@@ -376,7 +383,8 @@ ExtensionAdmin = __decorate([
376
383
  __param(8, Inject(ExtensionLifecycle)),
377
384
  __param(9, Inject(KernelConfigService)),
378
385
  __param(10, Inject(KERNEL_BUS)),
379
- __param(11, Inject(KERNEL_LOGGER))
386
+ __param(11, Inject(KERNEL_LOGGER)),
387
+ __param(12, Inject(ExtensionDisplayNames))
380
388
  ], ExtensionAdmin);
381
389
  export { ExtensionAdmin };
382
390
  const replicaView = (r) => ({
@@ -123,6 +123,7 @@ let ExtensionBlobs = class ExtensionBlobs {
123
123
  source: src.source,
124
124
  source_ref: src.ref,
125
125
  uploaded_by: src.actor,
126
+ display_name: p.displayName === undefined ? null : JSON.stringify(p.displayName),
126
127
  })
127
128
  .onConflict((oc) => oc.column("sha256").doNothing())
128
129
  .returning("sha256")
@@ -1,7 +1,19 @@
1
1
  import type { z } from "zod";
2
2
  /** 校验失败的单条原因:只含路径与按 issue 类型生成的说明,不回显字段值。 */
3
3
  export interface ConfigIssue {
4
+ /** The path joined with dots (`""` = the root); ambiguous when a key contains a dot. */
4
5
  path: string;
6
+ /** The zod path unjoined (record keys such as endpoint names may contain dots). */
7
+ segments: (string | number)[];
5
8
  message: string;
9
+ /**
10
+ * A custom issue whose `params.ui` names a key of the schema's root `x-ui.messages`: the form
11
+ * shows that localized message (spec §4.4). Never zod's own custom text.
12
+ */
13
+ messageKey?: string;
6
14
  }
7
- export declare function toIssues(error: z.ZodError): ConfigIssue[];
15
+ /**
16
+ * The issues of a failed config parse. `messages` is the root `x-ui.messages` of the schema's
17
+ * form JSON Schema (`configMessages`): custom issues naming one of its keys get `messageKey`.
18
+ */
19
+ export declare function toIssues(error: z.ZodError, messages?: Record<string, unknown>): ConfigIssue[];
@@ -23,9 +23,26 @@ function issueMessage(i) {
23
23
  return "invalid value";
24
24
  }
25
25
  }
26
- export function toIssues(error) {
27
- return error.issues.map((i) => ({
28
- path: i.path.map(String).join("."),
29
- message: issueMessage(i),
30
- }));
26
+ /** The `params.ui` of a custom issue when it names one of `messages` (own keys only). */
27
+ function messageKeyOf(i, messages) {
28
+ if (i.code !== "custom" || messages === undefined)
29
+ return undefined;
30
+ const key = i.params?.ui;
31
+ return typeof key === "string" && Object.hasOwn(messages, key) ? key : undefined;
32
+ }
33
+ /**
34
+ * The issues of a failed config parse. `messages` is the root `x-ui.messages` of the schema's
35
+ * form JSON Schema (`configMessages`): custom issues naming one of its keys get `messageKey`.
36
+ */
37
+ export function toIssues(error, messages) {
38
+ return error.issues.map((i) => {
39
+ const segments = i.path.map((s) => (typeof s === "number" ? s : String(s)));
40
+ const messageKey = messageKeyOf(i, messages);
41
+ return {
42
+ path: segments.join("."),
43
+ segments,
44
+ message: issueMessage(i),
45
+ ...(messageKey !== undefined && { messageKey }),
46
+ };
47
+ });
31
48
  }
@@ -1,9 +1,45 @@
1
- import { z } from "zod";
2
- export type JsonSchema = Record<string, unknown>;
3
1
  /**
4
- * 把插件配置 schema 转成 JSON Schema(供界面渲染表单):
5
- * - `secret()` 字段带 `"x-secret": true`(去掉 zod 附带的 `secret` 元数据键);
6
- * - 无法表达的类型为 `{ "x-unsupported": true }`,不抛错;
7
- * - 以输入侧形态输出(含 default),不带 `$schema`。
2
+ * Config schema → JSON Schema for forms. The conversion (and the secret scrub) lives in the SDK
3
+ * (`configJsonSchema`, extension config forms spec §4.1) so the packer, the checks and the kernel
4
+ * share one implementation; the kernel keeps no copy.
8
5
  */
9
- export declare function configToJsonSchema(schema: z.ZodType): JsonSchema;
6
+ import { type ConfigUiProblem, type JsonSchema } from "@capybara-hq/plugin-sdk";
7
+ import type { z } from "zod";
8
+ export { configJsonSchema as configToJsonSchema, type JsonSchema } from "@capybara-hq/plugin-sdk";
9
+ /** The config level a schema belongs to (which hints `validateConfigUi` allows). */
10
+ export type ConfigLevel = "deployment" | "org" | "connection";
11
+ /** A config schema as served to forms, with the problems of its hints (empty = kept). */
12
+ export interface ConfigFormSchema {
13
+ /** Shared by every caller: clone it before handing it out or changing it. */
14
+ readonly schema: JsonSchema;
15
+ readonly problems: ConfigUiProblem[];
16
+ }
17
+ /**
18
+ * Removes every `x-ui` from a JSON Schema in place (a property named `x-ui` is kept, and so are
19
+ * values: `default`, `const`, `enum` and `examples` are left as they are).
20
+ */
21
+ export declare function stripConfigUi(node: unknown): void;
22
+ /**
23
+ * Validates the hints of a JSON Schema at a level and strips every `x-ui` when there is any
24
+ * problem (in place): invalid hints never reach a form, and never fail a load (spec §4.1).
25
+ */
26
+ export declare function checkConfigUi(schema: JsonSchema, level: ConfigLevel): ConfigUiProblem[];
27
+ /** A config schema's form JSON Schema ({@link checkConfigUi} applied), cached per schema object. */
28
+ export declare function configFormSchema(schema: z.ZodTypeAny, level: ConfigLevel): ConfigFormSchema;
29
+ /**
30
+ * {@link configFormSchema} that never throws, for every caller that serves a form schema or reads
31
+ * its messages (deployment, org, connection, issues). A hint conversion that throws (a hand-made
32
+ * package, e.g. hints that won't serialize as JSON) drops the hints: the plain schema with every
33
+ * `x-ui` stripped, else `null` when even the plain conversion fails. `onFallback` runs once per
34
+ * schema object and level on this replica (the caller's one warning); later calls reuse the result.
35
+ */
36
+ export declare function safeConfigFormSchema(schema: z.ZodTypeAny, level: ConfigLevel, onFallback: (err: unknown, fallback: "plain" | "none") => void): ConfigFormSchema | null;
37
+ /**
38
+ * The secret record paths some `x-ui.secrets[].path` of a form schema names (spec §4.3), anywhere in
39
+ * the schema. Read from a checked schema: one whose hints were invalid was stripped and names none.
40
+ */
41
+ export declare function hintedSecretPaths(node: unknown, out?: Set<string>): Set<string>;
42
+ /** The root `x-ui.messages` of a form schema (the localized texts of custom issues), if any. */
43
+ export declare function configMessages(schema: JsonSchema | null | undefined): Record<string, unknown> | undefined;
44
+ /** A short text of hint problems for a status detail or a log (the first few). */
45
+ export declare function describeConfigUiProblems(level: ConfigLevel, problems: ConfigUiProblem[]): string;
@@ -1,73 +1,139 @@
1
- import { z } from "zod";
2
- /** JSON Schema 无法表达的 zod 类型:降级为 `{}` 并标注 `x-unsupported`。 */
3
- const UNSUPPORTED = new Set([
4
- "bigint",
5
- "date",
6
- "symbol",
7
- "undefined",
8
- "void",
9
- "nan",
10
- "map",
11
- "set",
12
- "function",
13
- "promise",
14
- "custom",
15
- "file",
16
- ]);
17
1
  /**
18
- * 把插件配置 schema 转成 JSON Schema(供界面渲染表单):
19
- * - `secret()` 字段带 `"x-secret": true`(去掉 zod 附带的 `secret` 元数据键);
20
- * - 无法表达的类型为 `{ "x-unsupported": true }`,不抛错;
21
- * - 以输入侧形态输出(含 default),不带 `$schema`。
2
+ * Config schema → JSON Schema for forms. The conversion (and the secret scrub) lives in the SDK
3
+ * (`configJsonSchema`, extension config forms spec §4.1) so the packer, the checks and the kernel
4
+ * share one implementation; the kernel keeps no copy.
22
5
  */
23
- export function configToJsonSchema(schema) {
24
- const out = z.toJSONSchema(schema, {
25
- io: "input",
26
- unrepresentable: "any",
27
- override: (ctx) => {
28
- const js = ctx.jsonSchema;
29
- const def = ctx.zodSchema._zod.def;
30
- if (js.secret === true) {
31
- delete js.secret;
32
- js["x-secret"] = true;
33
- }
34
- if (UNSUPPORTED.has(def.type))
35
- js["x-unsupported"] = true;
36
- },
37
- });
38
- delete out.$schema;
39
- scrubSecrets(out);
40
- return out;
41
- }
42
- /** 会泄露取值的关键字:密钥字段一律不输出。 */
43
- const VALUE_KEYWORDS = ["default", "examples", "const", "enum"];
44
- /** 值为「名字 -> 子 schema」映射的关键字:其键是用户字段名,不是关键字。 */
6
+ import { configJsonSchema, validateConfigUi, } from "@capybara-hq/plugin-sdk";
7
+ export { configJsonSchema as configToJsonSchema } from "@capybara-hq/plugin-sdk";
8
+ const isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
9
+ /** Keywords whose value maps names to sub-schemas: their keys are field names, not keywords. */
45
10
  const SCHEMA_MAPS = new Set(["properties", "patternProperties", "$defs", "definitions"]);
11
+ /** Keywords whose value is data, not a schema: never recursed into. */
12
+ const VALUE_KEYWORDS = new Set(["default", "const", "enum", "examples"]);
46
13
  /**
47
- * 递归清掉密钥节点及其所有后代上会暴露取值的关键字(`inSecret` 随递归下传);无环(输出为纯 JSON 树)。
48
- * 只有 schema 关键字 default / examples / const / enum 的值被当作数据跳过;
49
- * `properties` 等映射里的键是字段名,名为 default / enum 的字段照常遍历。
14
+ * Removes every `x-ui` from a JSON Schema in place (a property named `x-ui` is kept, and so are
15
+ * values: `default`, `const`, `enum` and `examples` are left as they are).
50
16
  */
51
- function scrubSecrets(node, inSecret = false) {
17
+ export function stripConfigUi(node) {
52
18
  if (Array.isArray(node)) {
53
19
  for (const n of node)
54
- scrubSecrets(n, inSecret);
20
+ stripConfigUi(n);
55
21
  return;
56
22
  }
57
- if (typeof node !== "object" || node === null)
23
+ if (!isObj(node))
58
24
  return;
59
- const o = node;
60
- const secret = inSecret || o["x-secret"] === true;
61
- if (secret)
62
- for (const k of VALUE_KEYWORDS)
63
- delete o[k];
64
- for (const [k, v] of Object.entries(o)) {
65
- if (SCHEMA_MAPS.has(k) && typeof v === "object" && v !== null) {
25
+ delete node["x-ui"];
26
+ for (const [k, v] of Object.entries(node)) {
27
+ if (VALUE_KEYWORDS.has(k))
28
+ continue;
29
+ if (SCHEMA_MAPS.has(k) && isObj(v))
66
30
  for (const child of Object.values(v))
67
- scrubSecrets(child, secret);
31
+ stripConfigUi(child);
32
+ else
33
+ stripConfigUi(v);
34
+ }
35
+ }
36
+ /**
37
+ * Validates the hints of a JSON Schema at a level and strips every `x-ui` when there is any
38
+ * problem (in place): invalid hints never reach a form, and never fail a load (spec §4.1).
39
+ */
40
+ export function checkConfigUi(schema, level) {
41
+ const problems = validateConfigUi(schema, level);
42
+ if (problems.length > 0)
43
+ stripConfigUi(schema);
44
+ return problems;
45
+ }
46
+ /** Manifests are immutable: one conversion per zod schema object and level (read-only, per replica). */
47
+ const caches = {
48
+ deployment: new WeakMap(),
49
+ org: new WeakMap(),
50
+ connection: new WeakMap(),
51
+ };
52
+ /** A config schema's form JSON Schema ({@link checkConfigUi} applied), cached per schema object. */
53
+ export function configFormSchema(schema, level) {
54
+ const cache = caches[level];
55
+ let r = cache.get(schema);
56
+ if (!r) {
57
+ const js = configJsonSchema(schema);
58
+ r = { schema: js, problems: checkConfigUi(js, level) };
59
+ cache.set(schema, r);
60
+ }
61
+ return r;
62
+ }
63
+ /** The schemas whose hinted conversion threw: their fallback (plain schema, or null). */
64
+ const fallbacks = {
65
+ deployment: new WeakMap(),
66
+ org: new WeakMap(),
67
+ connection: new WeakMap(),
68
+ };
69
+ /**
70
+ * {@link configFormSchema} that never throws, for every caller that serves a form schema or reads
71
+ * its messages (deployment, org, connection, issues). A hint conversion that throws (a hand-made
72
+ * package, e.g. hints that won't serialize as JSON) drops the hints: the plain schema with every
73
+ * `x-ui` stripped, else `null` when even the plain conversion fails. `onFallback` runs once per
74
+ * schema object and level on this replica (the caller's one warning); later calls reuse the result.
75
+ */
76
+ export function safeConfigFormSchema(schema, level, onFallback) {
77
+ const failed = fallbacks[level].get(schema);
78
+ if (failed !== undefined)
79
+ return failed;
80
+ try {
81
+ return configFormSchema(schema, level);
82
+ }
83
+ catch (err) {
84
+ let r = null;
85
+ try {
86
+ const plain = configJsonSchema(schema);
87
+ stripConfigUi(plain);
88
+ r = { schema: plain, problems: [] };
89
+ }
90
+ catch {
91
+ r = null;
68
92
  }
69
- else if (!VALUE_KEYWORDS.includes(k)) {
70
- scrubSecrets(v, secret);
93
+ fallbacks[level].set(schema, r);
94
+ onFallback(err, r ? "plain" : "none");
95
+ return r;
96
+ }
97
+ }
98
+ /**
99
+ * The secret record paths some `x-ui.secrets[].path` of a form schema names (spec §4.3), anywhere in
100
+ * the schema. Read from a checked schema: one whose hints were invalid was stripped and names none.
101
+ */
102
+ export function hintedSecretPaths(node, out = new Set()) {
103
+ if (Array.isArray(node)) {
104
+ for (const n of node)
105
+ hintedSecretPaths(n, out);
106
+ return out;
107
+ }
108
+ if (!isObj(node))
109
+ return out;
110
+ const hints = node["x-ui"];
111
+ if (isObj(hints) && Array.isArray(hints.secrets)) {
112
+ for (const s of hints.secrets) {
113
+ if (isObj(s) && typeof s.path === "string")
114
+ out.add(s.path);
71
115
  }
72
116
  }
117
+ for (const [k, v] of Object.entries(node)) {
118
+ if (k === "x-ui" || VALUE_KEYWORDS.has(k))
119
+ continue;
120
+ if (SCHEMA_MAPS.has(k) && isObj(v)) {
121
+ for (const child of Object.values(v))
122
+ hintedSecretPaths(child, out);
123
+ }
124
+ else
125
+ hintedSecretPaths(v, out);
126
+ }
127
+ return out;
128
+ }
129
+ /** The root `x-ui.messages` of a form schema (the localized texts of custom issues), if any. */
130
+ export function configMessages(schema) {
131
+ const hints = schema?.["x-ui"];
132
+ return isObj(hints) && isObj(hints.messages) ? hints.messages : undefined;
133
+ }
134
+ /** A short text of hint problems for a status detail or a log (the first few). */
135
+ export function describeConfigUiProblems(level, problems) {
136
+ const shown = problems.slice(0, 5).map((p) => `${p.path || "<root>"}: ${p.message}`);
137
+ const more = problems.length > shown.length ? `; and ${problems.length - shown.length} more` : "";
138
+ return `${level} config UI hints ignored (${shown.join("; ")}${more})`;
73
139
  }
@@ -1,6 +1,7 @@
1
1
  import type { core } from "zod";
2
2
  import { type Keyring } from "../ctx/secrets.js";
3
3
  import type { KernelSchemaDb } from "../db/kernel-schema.js";
4
+ import type { JsonSchema } from "./config-json-schema.js";
4
5
  type Obj = Record<string, unknown>;
5
6
  /**
6
7
  * The stored half of the deployment-level extension config (C10): where PG keeps it, how it is read
@@ -16,6 +17,11 @@ export declare const secretKey: (plugin: string, path: string) => string;
16
17
  export interface DeploymentSchemaInfo {
17
18
  version: string;
18
19
  schema?: core.$ZodType | undefined;
20
+ /**
21
+ * Without `schema` (no module on this replica): the package's static form schema
22
+ * (`extension.configSchemas.deployment`), shown but never used to validate.
23
+ */
24
+ jsonSchema?: JsonSchema | undefined;
19
25
  fields: {
20
26
  path: string;
21
27
  secret: boolean;
@@ -1,3 +1,4 @@
1
+ import type { LocalizedName } from "@capybara-hq/plugin-sdk";
1
2
  import type { core } from "zod";
2
3
  import type { KernelAppOptions } from "../app.js";
3
4
  import { type ConfigSourceKind } from "../config/sources.js";
@@ -12,6 +13,7 @@ import type { PublishBus } from "./admin-view.js";
12
13
  import { type ConfigIssue } from "./config-issues.js";
13
14
  import { type JsonSchema } from "./config-json-schema.js";
14
15
  import { DEPLOYMENT_SECRETS_ORG, type DeploymentSchemaInfo, mergeDeploymentConfig, readStoredDeploymentConfig, schemaFields, secretPathsOf } from "./deployment-config-store.js";
16
+ import { ExtensionDisplayNames } from "./display-name.js";
15
17
  import { ExtensionHost } from "./host.js";
16
18
  import { ExtensionInstalls } from "./installs.js";
17
19
  import { ExtensionLifecycle } from "./lifecycle.js";
@@ -34,15 +36,36 @@ export interface DeploymentConfigField {
34
36
  value?: unknown;
35
37
  /** 密钥字段是否已设置(任何来源);值永不回显。 */
36
38
  set?: boolean;
39
+ /**
40
+ * Only on a secret record some `x-ui.secrets[].path` names: the record's keys that are set, sorted
41
+ * (item names, not secret values; spec §4.3). Other secret fields report only `set`.
42
+ */
43
+ keys?: string[];
44
+ }
45
+ /**
46
+ * One operation on a secret record drawn per item (spec §4.3), only for a path some
47
+ * `x-ui.secrets[].path` names: `renameFrom` moves an existing value to `key` (nothing when it has
48
+ * none, replacing a value already at `key`), then `value` sets it (a string) or removes it (`null`).
49
+ */
50
+ export interface SecretEntry {
51
+ path: string;
52
+ key: string;
53
+ value?: string | null | undefined;
54
+ renameFrom?: string | undefined;
37
55
  }
38
56
  /** The response of `GET / PUT /api/v1/admin/extensions/:name/config`. */
39
57
  export interface DeploymentConfigView {
40
58
  plugin: string;
59
+ /** The plugin's display name (`ExtensionDisplayNames`); null when it has none. */
60
+ displayName: LocalizedName | null;
41
61
  version: string;
42
62
  /** 插件声明了部署级配置。 */
43
63
  configurable: boolean;
44
64
  fields: DeploymentConfigField[];
45
- /** 部署级 schema 的 JSON Schema(密钥字段带 `x-secret`);本副本拿不到模块(未加载的安装记录)时为 null。 */
65
+ /**
66
+ * 部署级 schema 的 JSON Schema(密钥字段带 `x-secret`,提示 `x-ui` / `x-hot`)。本副本拿不到模块(未加载的
67
+ * 安装记录)时取包内的 `extension.configSchemas.deployment`(`validated` 为 false);旧包没有它时为 null。
68
+ */
46
69
  schema: JsonSchema | null;
47
70
  /** 生效配置按 schema 校验通过(`validated` 为 false 时没有校验,恒为 true,界面不要据此显示「合法」)。 */
48
71
  valid: boolean;
@@ -79,6 +102,7 @@ export declare class ExtensionDeploymentConfigService {
79
102
  /** Publishes {@link PLUGIN_DEPLOYMENT_CONFIG_TOPIC} after a save (a failure only warns). */
80
103
  private readonly bus;
81
104
  private readonly log;
105
+ private readonly displayNames;
82
106
  /** Where each startup-config field comes from (see `extensionConfigSources`); those fields are read-only. */
83
107
  private readonly sources;
84
108
  constructor(kdb: KernelDb, txHost: TransactionHost,
@@ -91,7 +115,7 @@ export declare class ExtensionDeploymentConfigService {
91
115
  /** Applies a saved config on this replica at once (other replicas through the bus). */
92
116
  lifecycle: ExtensionLifecycle,
93
117
  /** Publishes {@link PLUGIN_DEPLOYMENT_CONFIG_TOPIC} after a save (a failure only warns). */
94
- bus: PublishBus, log: KernelLogger, options: Pick<KernelAppOptions, "env" | "extensionConfigSources">);
118
+ bus: PublishBus, log: KernelLogger, options: Pick<KernelAppOptions, "env" | "extensionConfigSources">, displayNames: ExtensionDisplayNames);
95
119
  private get db();
96
120
  /** The startup config's `extensionConfig` (file / Nacos merged with env). */
97
121
  private fileConfig;
@@ -113,17 +137,40 @@ export declare class ExtensionDeploymentConfigService {
113
137
  * invalid after merging (except a problem in a read-only startup-config field itself) ->
114
138
  * `extension.config_invalid` (details carry only paths and messages);
115
139
  * - a field present in the startup config (file / Nacos / env) -> 409 `extension.config_readonly`.
140
+ * `secretEntries` change single keys of secret records some `x-ui.secrets[].path` names
141
+ * ({@link SecretEntry}; spec §4.3): applied under the same locks to the decrypted record, which
142
+ * is re-encrypted whole, then validated with `values`; the audit lists the record's path, no keys.
143
+ * A path no hint names -> 400 `validation_failed`; one in the startup config -> 409
144
+ * `extension.config_readonly`.
116
145
  * In a transaction, first `lockEnterpriseAdminsAndAuthorize` (re-checks the enterprise admin under
117
146
  * the lock), then an advisory lock per extension; audit `extension.deployment_config_updated`
118
147
  * (detail only `changedPaths`). After the commit publishes {@link PLUGIN_DEPLOYMENT_CONFIG_TOPIC} and
119
148
  * applies it on this replica right away.
120
149
  */
121
- put(plugin: string, values: Record<string, unknown>, actor: string, actorTokenId?: string): Promise<DeploymentConfigView>;
150
+ put(plugin: string, values: Record<string, unknown>, actor: string, actorTokenId?: string, secretEntries?: readonly SecretEntry[]): Promise<DeploymentConfigView>;
151
+ /**
152
+ * Secret entries name a secret record field some hint names (else 400 `validation_failed`, also
153
+ * for a path given in `values` too, an entry with neither `value` nor `renameFrom`, or a key
154
+ * `__proto__`). Messages carry paths and keys only, never values.
155
+ */
156
+ private checkSecretEntries;
122
157
  private write;
123
158
  private info;
124
159
  private render;
160
+ /**
161
+ * The form JSON Schema of the description: the zod schema's, else the package's static one. A
162
+ * hint conversion that throws (a hand-made package) drops the hints: the plain schema, or none
163
+ * when even the conversion fails; one warning per schema. Never throws.
164
+ */
165
+ private formSchemaOf;
166
+ private messagesOf;
167
+ /** The secret record paths some hint of the form schema names. */
168
+ private hintedPaths;
125
169
  }
126
170
  /**
127
171
  * 本副本拿不到模块时(未加载的安装记录)按包内审阅过的静态清单给出字段(没有 zod schema:不校验,加载时再校验)。
172
+ * The package's `extension.configSchemas.deployment` (written by the packer) is the form schema;
173
+ * its hints are checked like a loaded schema's (stripped when invalid, silently: a hand-made
174
+ * package). It is not compared with the module (not part of `manifest_mismatch`, spec §4.5).
128
175
  */
129
176
  export declare function staticDeploymentSchema(db: KernelSchemaDb, plugin: string): Promise<DeploymentSchemaInfo | undefined>;