@frontmcp/sdk 1.10.8 → 1.10.9-rc.2

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 (124) hide show
  1. package/auth/flows/auth.verify.flow.d.ts +1 -1
  2. package/auth/flows/oauth.auth-ui.flow.d.ts +2 -2
  3. package/auth/flows/oauth.authorize.flow.d.ts +2 -2
  4. package/auth/flows/oauth.callback.flow.d.ts +2 -2
  5. package/auth/flows/oauth.connect.flow.d.ts +2 -2
  6. package/auth/flows/oauth.provider-callback.flow.d.ts +2 -2
  7. package/auth/flows/oauth.register.flow.d.ts +2 -2
  8. package/auth/flows/oauth.token.flow.d.ts +2 -2
  9. package/auth/flows/oauth.userinfo.flow.d.ts +2 -2
  10. package/auth/flows/session.verify.flow.d.ts +1 -1
  11. package/auth/flows/well-known.jwks.flow.d.ts +2 -2
  12. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +2 -2
  13. package/auth/flows/well-known.prm.flow.d.ts +2 -2
  14. package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
  15. package/browser/agent/agent.registry.mjs +1 -1
  16. package/browser/app/instances/app.esm.instance.mjs +4 -4
  17. package/browser/app/instances/app.remote.instance.mjs +6 -6
  18. package/browser/auth/auth-ui/auth-ui.registry.mjs +6 -6
  19. package/browser/auth/flows/oauth.authorize.flow.mjs +5 -5
  20. package/browser/auth/flows/oauth.callback.flow.mjs +11 -11
  21. package/browser/auth/flows/oauth.connect.flow.mjs +1 -1
  22. package/browser/auth/flows/oauth.register.flow.mjs +1 -1
  23. package/browser/auth/flows/oauth.token.flow.mjs +1 -1
  24. package/browser/auth/flows/well-known.oauth-authorization-server.flow.mjs +5 -5
  25. package/browser/auth/instances/instance.local-primary-auth.mjs +35 -11
  26. package/browser/auth/session/utils/session-id.utils.mjs +1 -1
  27. package/browser/common/entries/skill.entry.mjs +2 -2
  28. package/browser/common/entries/tool.entry.mjs +3 -3
  29. package/browser/common/interfaces/channel.interface.mjs +1 -1
  30. package/browser/common/interfaces/execution-context.interface.mjs +4 -4
  31. package/browser/common/interfaces/flow.interface.mjs +10 -0
  32. package/browser/common/interfaces/internal/primary-auth-provider.interface.mjs +2 -2
  33. package/browser/common/metadata/app.metadata.mjs +1 -1
  34. package/browser/common/metadata/front-mcp.metadata.mjs +5 -5
  35. package/browser/common/schemas/http-input.schema.mjs +9 -3
  36. package/browser/common/tokens/app.tokens.mjs +1 -1
  37. package/browser/common/tokens/front-mcp.tokens.mjs +1 -1
  38. package/browser/common/types/options/http/schema.mjs +4 -4
  39. package/browser/common/types/options/redis/schema.mjs +1 -1
  40. package/browser/common/types/options/sqlite/schema.mjs +3 -3
  41. package/browser/common/types/options/transport/schema.mjs +4 -4
  42. package/browser/common/utils/decide-request-intent.utils.mjs +13 -11
  43. package/browser/context/frontmcp-context.mjs +1 -1
  44. package/browser/direct/direct-client.mjs +29 -29
  45. package/browser/direct/direct-server.mjs +14 -14
  46. package/browser/errors/job.errors.mjs +1 -1
  47. package/browser/errors/mcp.error.mjs +4 -4
  48. package/browser/errors/plugin.errors.mjs +1 -1
  49. package/browser/errors/task.error.mjs +1 -1
  50. package/browser/errors/tool-credentials-required.error.mjs +2 -2
  51. package/browser/esm-loader/esm-module-loader.mjs +1 -7
  52. package/browser/esm-loader/import-computed.mjs +11 -0
  53. package/browser/esm-loader/semver.utils.mjs +17 -11
  54. package/browser/flows/flow.instance.mjs +55 -24
  55. package/browser/flows/flow.stages.mjs +3 -2
  56. package/browser/front-mcp/front-mcp.mjs +10 -14
  57. package/browser/ha/ha-manager.mjs +1 -1
  58. package/browser/ha/notification-relay.mjs +1 -1
  59. package/browser/index.cjs +1346 -1490
  60. package/browser/index.mjs +4 -4
  61. package/browser/job/store/job-definition-store.factory.mjs +1 -1
  62. package/browser/job/store/redis-job-definition.store.mjs +2 -2
  63. package/browser/job/tools/get-job-status.tool.mjs +1 -1
  64. package/browser/logger/logger.registry.mjs +1 -1
  65. package/browser/metrics/metrics.service.mjs +3 -3
  66. package/browser/prompt/prompt.registry.mjs +1 -1
  67. package/browser/provider/provider.registry.mjs +4 -4
  68. package/browser/remote-mcp/mcp-client.service.mjs +19 -19
  69. package/browser/remote-mcp/resilience/circuit-breaker.mjs +2 -2
  70. package/browser/resource/resource.registry.mjs +2 -2
  71. package/browser/scope/flows/http.request.flow.mjs +3 -3
  72. package/browser/scope/scope.instance.mjs +4 -4
  73. package/browser/scope/scope.utils.mjs +1 -1
  74. package/browser/skill/providers/memory-skill.provider.mjs +31 -9
  75. package/browser/skill/skill.registry.mjs +10 -10
  76. package/browser/task/flows/tasks-result.flow.mjs +2 -2
  77. package/browser/task/task.registry.mjs +5 -5
  78. package/browser/tool/flows/call-tool.flow.mjs +4 -4
  79. package/browser/tool/tool.instance.mjs +16 -7
  80. package/browser/tool/tool.registry.mjs +4 -4
  81. package/browser/tool/ui/ui-shared.mjs +1 -1
  82. package/browser/transport/adapters/transport.local.adapter.mjs +2 -2
  83. package/browser/transport/adapters/transport.streamable-http.adapter.mjs +13 -4
  84. package/browser/transport/event-stores/redis.event-store.mjs +1 -1
  85. package/browser/transport/mcp-20260728/client/mcp-stateless.client.mjs +1 -1
  86. package/browser/transport/mcp-20260728/request-notifications.mjs +1 -1
  87. package/browser/transport/transport.registry.mjs +15 -9
  88. package/browser/transport/web-response.renderer.mjs +2 -2
  89. package/browser/utils/lineage.utils.mjs +1 -1
  90. package/browser/workflow/tools/get-workflow-status.tool.mjs +1 -1
  91. package/common/interfaces/flow.interface.d.ts.map +1 -1
  92. package/common/schemas/http-input.schema.d.ts +3 -3
  93. package/common/schemas/http-input.schema.d.ts.map +1 -1
  94. package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
  95. package/esm/esm-loader/import-computed.mjs +10 -0
  96. package/esm/index.mjs +136 -77029
  97. package/esm-loader/esm-module-loader.d.ts.map +1 -1
  98. package/esm-loader/import-computed.d.ts +21 -0
  99. package/esm-loader/import-computed.d.ts.map +1 -0
  100. package/esm-loader/import-computed.js +34 -0
  101. package/esm-loader/semver.utils.d.ts.map +1 -1
  102. package/flows/flow.instance.d.ts +1 -0
  103. package/flows/flow.instance.d.ts.map +1 -1
  104. package/flows/flow.stages.d.ts.map +1 -1
  105. package/front-mcp/front-mcp.d.ts.map +1 -1
  106. package/index.d.ts +9 -8
  107. package/index.d.ts.map +1 -1
  108. package/index.js +140 -77685
  109. package/mcp-registry/flows/server-card.flow.d.ts +2 -2
  110. package/mcp-registry/flows/well-known.ai-catalog.flow.d.ts +2 -2
  111. package/mcp-registry/flows/well-known.mcp-registry-auth.flow.d.ts +2 -2
  112. package/package.json +14 -10
  113. package/skill/flows/http/llm-full-txt.flow.d.ts +2 -2
  114. package/skill/flows/http/llm-txt.flow.d.ts +2 -2
  115. package/skill/flows/http/skills-api.flow.d.ts +2 -2
  116. package/skill/providers/memory-skill.provider.d.ts +1 -0
  117. package/skill/providers/memory-skill.provider.d.ts.map +1 -1
  118. package/tool/tool.instance.d.ts +3 -0
  119. package/tool/tool.instance.d.ts.map +1 -1
  120. package/transport/adapters/transport.streamable-http.adapter.d.ts +2 -1
  121. package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
  122. package/transport/transport.registry.d.ts +1 -0
  123. package/transport/transport.registry.d.ts.map +1 -1
  124. package/browser/transport/index.mjs +0 -32
@@ -181,9 +181,9 @@ var DirectClientImpl = class _DirectClientImpl {
181
181
  }
182
182
  return { action: "decline" };
183
183
  }
184
- // ─────────────────────────────────────────────────────────────────────────────
184
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
185
185
  // Tool Operations (platform-formatted)
186
- // ─────────────────────────────────────────────────────────────────────────────
186
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
187
187
  async listTools() {
188
188
  const tools = await listAllPages("tools/list", async (cursor) => {
189
189
  const result = await this.mcpClient.listTools(cursor ? { cursor } : void 0);
@@ -200,9 +200,9 @@ var DirectClientImpl = class _DirectClientImpl {
200
200
  if (result.isError && this.platform !== "raw") throw new ToolCallError(name, result);
201
201
  return formatResultForPlatform(result, this.platform);
202
202
  }
203
- // ─────────────────────────────────────────────────────────────────────────────
203
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
204
204
  // Resource Operations (raw format)
205
- // ─────────────────────────────────────────────────────────────────────────────
205
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
206
206
  async listResources() {
207
207
  const resources = await listAllPages("resources/list", async (cursor) => {
208
208
  const result = await this.mcpClient.listResources(cursor ? { cursor } : void 0);
@@ -223,9 +223,9 @@ var DirectClientImpl = class _DirectClientImpl {
223
223
  );
224
224
  return { resourceTemplates };
225
225
  }
226
- // ─────────────────────────────────────────────────────────────────────────────
226
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
227
227
  // Prompt Operations (raw format)
228
- // ─────────────────────────────────────────────────────────────────────────────
228
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
229
229
  async listPrompts() {
230
230
  const prompts = await listAllPages("prompts/list", async (cursor) => {
231
231
  const result = await this.mcpClient.listPrompts(cursor ? { cursor } : void 0);
@@ -239,9 +239,9 @@ var DirectClientImpl = class _DirectClientImpl {
239
239
  arguments: args
240
240
  });
241
241
  }
242
- // ─────────────────────────────────────────────────────────────────────────────
242
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
243
243
  // Info
244
- // ─────────────────────────────────────────────────────────────────────────────
244
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
245
245
  getSessionId() {
246
246
  return this.sessionId;
247
247
  }
@@ -257,9 +257,9 @@ var DirectClientImpl = class _DirectClientImpl {
257
257
  getDetectedPlatform() {
258
258
  return this.platform;
259
259
  }
260
- // ─────────────────────────────────────────────────────────────────────────────
260
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
261
261
  // Lifecycle
262
- // ─────────────────────────────────────────────────────────────────────────────
262
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
263
263
  async close() {
264
264
  try {
265
265
  await this.mcpClient.close();
@@ -273,7 +273,7 @@ var DirectClientImpl = class _DirectClientImpl {
273
273
  }
274
274
  }
275
275
  }
276
- // ─────────────────────────────────────────────────────────────────────────────
276
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
277
277
  // Skills Operations
278
278
  //
279
279
  // NOTE: Skills methods use `{} as any` for the response schema parameter because:
@@ -282,7 +282,7 @@ var DirectClientImpl = class _DirectClientImpl {
282
282
  // SkillsLoadResultSchema, and SkillsListResultSchema
283
283
  // 3. The MCP SDK's client.request() validates responses using these schemas
284
284
  // 4. Schemas are shared between client and server
285
- // ─────────────────────────────────────────────────────────────────────────────
285
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
286
286
  /**
287
287
  * Search for skills matching a query.
288
288
  *
@@ -346,12 +346,12 @@ var DirectClientImpl = class _DirectClientImpl {
346
346
  );
347
347
  }
348
348
  /**
349
- * SEP-2640 convenience wrapper — see `DirectClient.listSep2640Skills`.
349
+ * SEP-2640 convenience wrapper \u2014 see `DirectClient.listSep2640Skills`.
350
350
  *
351
351
  * Reads `skill://index.json` via `resources/read`, validates the
352
352
  * agentskills.io v0.2.0 schema URI, and returns the parsed entries.
353
353
  * Returns `[]` (with a console.warn) when the resource isn't present,
354
- * per SEP §Discovery: hosts MUST NOT treat absence as proof of zero
354
+ * per SEP \u00a7Discovery: hosts MUST NOT treat absence as proof of zero
355
355
  * skills, but the convenience helper degrades gracefully.
356
356
  */
357
357
  async listSep2640Skills() {
@@ -390,7 +390,7 @@ var DirectClientImpl = class _DirectClientImpl {
390
390
  });
391
391
  }
392
392
  /**
393
- * SEP-2640 convenience wrapper — see `DirectClient.readSkillUri`.
393
+ * SEP-2640 convenience wrapper \u2014 see `DirectClient.readSkillUri`.
394
394
  *
395
395
  * Performs `resources/read` on a `skill://` URI and returns the body
396
396
  * text directly. Throws when given a non-`skill://` URI to keep
@@ -412,9 +412,9 @@ var DirectClientImpl = class _DirectClientImpl {
412
412
  }
413
413
  return text;
414
414
  }
415
- // ─────────────────────────────────────────────────────────────────────────────
415
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
416
416
  // Elicitation Operations
417
- // ─────────────────────────────────────────────────────────────────────────────
417
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
418
418
  onElicitation(handler) {
419
419
  this.elicitationHandler = handler;
420
420
  return () => {
@@ -424,15 +424,15 @@ var DirectClientImpl = class _DirectClientImpl {
424
424
  async submitElicitationResult(elicitId, response) {
425
425
  return this.callTool("sendElicitationResult", { elicitId, ...response });
426
426
  }
427
- // ─────────────────────────────────────────────────────────────────────────────
427
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
428
428
  // Completion Operations
429
- // ─────────────────────────────────────────────────────────────────────────────
429
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
430
430
  async complete(options) {
431
431
  return this.mcpClient.complete(options);
432
432
  }
433
- // ─────────────────────────────────────────────────────────────────────────────
433
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
434
434
  // Resource Subscription Operations
435
- // ─────────────────────────────────────────────────────────────────────────────
435
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
436
436
  async subscribeResource(uri) {
437
437
  await this.mcpClient.subscribeResource({ uri });
438
438
  }
@@ -451,15 +451,15 @@ var DirectClientImpl = class _DirectClientImpl {
451
451
  this.notificationHandlers.delete(handler);
452
452
  };
453
453
  }
454
- // ─────────────────────────────────────────────────────────────────────────────
454
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
455
455
  // Logging Operations
456
- // ─────────────────────────────────────────────────────────────────────────────
456
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
457
457
  async setLogLevel(level) {
458
458
  await this.mcpClient.setLoggingLevel(level);
459
459
  }
460
- // ─────────────────────────────────────────────────────────────────────────────
460
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
461
461
  // Job Operations (via MCP tools)
462
- // ─────────────────────────────────────────────────────────────────────────────
462
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
463
463
  async callToolAndParseJson(toolName, args) {
464
464
  const result = await this.mcpClient.callTool({ name: toolName, arguments: args });
465
465
  const textContent = result.content?.find((c) => c.type === "text");
@@ -481,9 +481,9 @@ var DirectClientImpl = class _DirectClientImpl {
481
481
  async getJobStatus(runId) {
482
482
  return this.callToolAndParseJson("get_job_status", { runId });
483
483
  }
484
- // ─────────────────────────────────────────────────────────────────────────────
484
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
485
485
  // Workflow Operations (via MCP tools)
486
- // ─────────────────────────────────────────────────────────────────────────────
486
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
487
487
  async listWorkflows(options) {
488
488
  return this.callToolAndParseJson("list_workflows", { ...options });
489
489
  }
@@ -497,9 +497,9 @@ var DirectClientImpl = class _DirectClientImpl {
497
497
  async getWorkflowStatus(runId) {
498
498
  return this.callToolAndParseJson("get_workflow_status", { runId });
499
499
  }
500
- // ─────────────────────────────────────────────────────────────────────────────
500
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
501
501
  // Build-Time Asset Collection
502
- // ─────────────────────────────────────────────────────────────────────────────
502
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
503
503
  async collectSkillAssets() {
504
504
  const scope = this.scopeRef;
505
505
  if (!scope?.skills) return { entries: [] };
@@ -85,9 +85,9 @@ var DirectMcpServerImpl = class {
85
85
  throw failure;
86
86
  }
87
87
  }
88
- // ─────────────────────────────────────────────────────────────────
88
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
89
89
  // Tool Operations
90
- // ─────────────────────────────────────────────────────────────────
90
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
91
91
  /**
92
92
  * Run a list flow: the one page `options` asks for, or every page joined into one result (#678).
93
93
  * Every page is read with the same call options, so with the same caller and session.
@@ -120,9 +120,9 @@ var DirectMcpServerImpl = class {
120
120
  }
121
121
  return registerRuntimeTool(this.scope, definition);
122
122
  }
123
- // ─────────────────────────────────────────────────────────────────
123
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
124
124
  // Resource Operations
125
- // ─────────────────────────────────────────────────────────────────
125
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
126
126
  async listResources(options) {
127
127
  return this.runListFlow(
128
128
  "resources:list-resources",
@@ -146,9 +146,9 @@ var DirectMcpServerImpl = class {
146
146
  options
147
147
  );
148
148
  }
149
- // ─────────────────────────────────────────────────────────────────
149
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
150
150
  // Prompt Operations
151
- // ─────────────────────────────────────────────────────────────────
151
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
152
152
  async listPrompts(options) {
153
153
  return this.runListFlow("prompts:list-prompts", "prompts/list", "prompts", options);
154
154
  }
@@ -159,9 +159,9 @@ var DirectMcpServerImpl = class {
159
159
  options
160
160
  );
161
161
  }
162
- // ─────────────────────────────────────────────────────────────────
162
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
163
163
  // Job Operations - delegate to MCP tools
164
- // ─────────────────────────────────────────────────────────────────
164
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
165
165
  async listJobs(options) {
166
166
  return this.callTool("list_jobs", {}, options);
167
167
  }
@@ -175,9 +175,9 @@ var DirectMcpServerImpl = class {
175
175
  async getJobStatus(runId, options) {
176
176
  return this.callTool("get_job_status", { runId }, options);
177
177
  }
178
- // ─────────────────────────────────────────────────────────────────
178
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
179
179
  // Workflow Operations - delegate to MCP tools
180
- // ─────────────────────────────────────────────────────────────────
180
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
181
181
  async listWorkflows(options) {
182
182
  return this.callTool("list_workflows", {}, options);
183
183
  }
@@ -191,9 +191,9 @@ var DirectMcpServerImpl = class {
191
191
  async getWorkflowStatus(runId, options) {
192
192
  return this.callTool("get_workflow_status", { runId }, options);
193
193
  }
194
- // ─────────────────────────────────────────────────────────────────
194
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
195
195
  // Client Connections
196
- // ─────────────────────────────────────────────────────────────────
196
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
197
197
  async connect(sessionIdOrOptions) {
198
198
  if (this._isDisposed) {
199
199
  throw new InternalMcpError("DirectMcpServer has been disposed");
@@ -204,9 +204,9 @@ var DirectMcpServerImpl = class {
204
204
  const { DirectClientImpl } = await import("./direct-client.mjs");
205
205
  return DirectClientImpl.create(this.scope, options);
206
206
  }
207
- // ─────────────────────────────────────────────────────────────────
207
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
208
208
  // Lifecycle
209
- // ─────────────────────────────────────────────────────────────────
209
+ // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
210
210
  async dispose() {
211
211
  if (this._isDisposed) return;
212
212
  this._isDisposed = true;
@@ -1,7 +1,7 @@
1
1
  // libs/sdk/src/errors/job.errors.ts
2
2
  import { PublicMcpError } from "./mcp.error.mjs";
3
3
  var JobNotAuthorizedError = class extends PublicMcpError {
4
- /** The requested name, for internal logs only — never surfaced publicly. */
4
+ /** The requested name, for internal logs only \u2014 never surfaced publicly. */
5
5
  requestedName;
6
6
  constructor(requestedName) {
7
7
  super(`Job or workflow "${requestedName}" not found or not permitted`, "JOB_NOT_AUTHORIZED", 403);
@@ -142,7 +142,7 @@ var EntryUnavailableError = class extends PublicMcpError {
142
142
  entryName;
143
143
  availability;
144
144
  runtimeContext;
145
- /** Issue #417 — axes that failed to match (e.g. ['surface', 'provider']). */
145
+ /** Issue #417 \u2014 axes that failed to match (e.g. ['surface', 'provider']). */
146
146
  missingAxes;
147
147
  constructor(entryType, entryName, availability, runtimeContext, missingAxes = []) {
148
148
  const safeStringify = (v) => {
@@ -169,7 +169,7 @@ var EntryUnavailableError = class extends PublicMcpError {
169
169
  /**
170
170
  * Convert to JSON-RPC error format per MCP specification.
171
171
  *
172
- * Issue #417 — `data` now exposes `{tool, missingAxes, constraint, context}`
172
+ * Issue #417 \u2014 `data` now exposes `{tool, missingAxes, constraint, context}`
173
173
  * so MCP clients can react structurally without parsing prose.
174
174
  */
175
175
  toJsonRpcError() {
@@ -252,7 +252,7 @@ Details: ${JSON.stringify(this.validationErrors, null, 2)}`;
252
252
  };
253
253
  var InvalidOutputError = class extends InternalMcpError {
254
254
  hasCustomErrorId;
255
- /** Optional structured context — path/value/reason — for diagnostics. */
255
+ /** Optional structured context \u2014 path/value/reason \u2014 for diagnostics. */
256
256
  details;
257
257
  constructor(errorIdOrDetails, maybeDetails) {
258
258
  const errorId = typeof errorIdOrDetails === "string" ? errorIdOrDetails : void 0;
@@ -463,7 +463,7 @@ var AuthorityDeniedMcpError = class extends PublicMcpError {
463
463
  }
464
464
  };
465
465
  var GuardLimitMcpError = class extends PublicMcpError {
466
- /** The guard's own message — what the server logs. */
466
+ /** The guard's own message \u2014 what the server logs. */
467
467
  detail;
468
468
  constructor(error) {
469
469
  super(publicGuardMessage(error), error.code, error.statusCode);
@@ -1,7 +1,7 @@
1
1
  // libs/sdk/src/errors/plugin.errors.ts
2
2
  import { PublicMcpError } from "./mcp.error.mjs";
3
3
  var UnenforcedMetadataError = class extends PublicMcpError {
4
- /** One line per entry and field, e.g. `Tool "wipe_disk" declares 'approval' (enforced by …)`. */
4
+ /** One line per entry and field, e.g. `Tool "wipe_disk" declares 'approval' (enforced by \u2026)`. */
5
5
  errors;
6
6
  suggestion;
7
7
  constructor(problems) {
@@ -32,7 +32,7 @@ var TaskAugmentationNotSupportedError = class extends PublicMcpError {
32
32
  }
33
33
  };
34
34
  var TaskAugmentationRequiredError = class extends PublicMcpError {
35
- // Per MCP 2025-11-25 §Tool-Level Negotiation: tool-level `taskSupport: "required"`
35
+ // Per MCP 2025-11-25 \u00a7Tool-Level Negotiation: tool-level `taskSupport: "required"`
36
36
  // without task augmentation MUST return -32601 (Method not found).
37
37
  mcpErrorCode = MCP_ERROR_CODES.METHOD_NOT_FOUND;
38
38
  constructor(toolName) {
@@ -27,8 +27,8 @@ var ToolCredentialsRequiredError = class extends PublicMcpError {
27
27
  * "data": {
28
28
  * "tool": "deploy_app",
29
29
  * "providers": ["github"],
30
- * "authUrl": "https://.../oauth/connect?token=…",
31
- * "auth_url": "https://.../oauth/connect?token=…"
30
+ * "authUrl": "https://.../oauth/connect?token=\u2026",
31
+ * "auth_url": "https://.../oauth/connect?token=\u2026"
32
32
  * }
33
33
  * }
34
34
  */
@@ -10,17 +10,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
10
10
 
11
11
  // libs/sdk/src/esm-loader/esm-module-loader.ts
12
12
  import { sha256Hex } from "@frontmcp/utils";
13
+ import { importComputed } from "./import-computed.mjs";
13
14
  import { EsmCacheError, EsmManifestInvalidError, EsmPackageLoadError } from "../errors/esm.errors.mjs";
14
15
  import { normalizeEsmExport } from "./esm-manifest.mjs";
15
16
  import { applyImportMap, buildEsmShUrl, importMapPackages } from "./package-specifier.mjs";
16
17
  import { VersionResolver } from "./version-resolver.mjs";
17
- function importComputed(specifier) {
18
- return import(
19
- /* webpackIgnore: true */
20
- /* @vite-ignore */
21
- specifier
22
- );
23
- }
24
18
  var EsmModuleLoader = class {
25
19
  cache;
26
20
  versionResolver;
@@ -0,0 +1,11 @@
1
+ // libs/sdk/src/esm-loader/import-computed.ts
2
+ function importComputed(specifier) {
3
+ return import(
4
+ /* webpackIgnore: true */
5
+ /* @vite-ignore */
6
+ specifier
7
+ );
8
+ }
9
+ export {
10
+ importComputed
11
+ };
@@ -1,37 +1,43 @@
1
1
  // libs/sdk/src/esm-loader/semver.utils.ts
2
- import * as semver from "semver";
2
+ import semverCompare from "semver/functions/compare.js";
3
+ import semverGt from "semver/functions/gt.js";
4
+ import semverRcompare from "semver/functions/rcompare.js";
5
+ import semverSatisfies from "semver/functions/satisfies.js";
6
+ import semverValid from "semver/functions/valid.js";
7
+ import semverMaxSatisfying from "semver/ranges/max-satisfying.js";
8
+ import semverValidRange from "semver/ranges/valid.js";
3
9
  function isDistTag(range) {
4
- return /^[a-zA-Z][a-zA-Z0-9]*$/.test(range) && semver.validRange(range) === null;
10
+ return /^[a-zA-Z][a-zA-Z0-9]*$/.test(range) && semverValidRange(range) === null;
5
11
  }
6
12
  function satisfiesRange(version, range) {
7
13
  if (range === "latest" || isDistTag(range)) return true;
8
- return semver.satisfies(version, range);
14
+ return semverSatisfies(version, range);
9
15
  }
10
- function maxSatisfying2(versions, range) {
16
+ function maxSatisfying(versions, range) {
11
17
  if (range === "latest" || isDistTag(range)) {
12
- const sorted = versions.filter((v) => semver.valid(v)).sort(semver.rcompare);
18
+ const sorted = versions.filter((v) => semverValid(v)).sort(semverRcompare);
13
19
  return sorted[0] ?? null;
14
20
  }
15
- return semver.maxSatisfying(versions, range);
21
+ return semverMaxSatisfying(versions, range);
16
22
  }
17
23
  function isValidRange(range) {
18
24
  if (range === "latest" || isDistTag(range)) return true;
19
- return semver.validRange(range) !== null;
25
+ return semverValidRange(range) !== null;
20
26
  }
21
27
  function isValidVersion(version) {
22
- return semver.valid(version) !== null;
28
+ return semverValid(version) !== null;
23
29
  }
24
30
  function compareVersions(v1, v2) {
25
- return semver.compare(v1, v2);
31
+ return semverCompare(v1, v2);
26
32
  }
27
33
  function isNewerVersion(v1, v2) {
28
- return semver.gt(v1, v2);
34
+ return semverGt(v1, v2);
29
35
  }
30
36
  export {
31
37
  compareVersions,
32
38
  isNewerVersion,
33
39
  isValidRange,
34
40
  isValidVersion,
35
- maxSatisfying2 as maxSatisfying,
41
+ maxSatisfying,
36
42
  satisfiesRange
37
43
  };
@@ -21,9 +21,15 @@ import {
21
21
  var HOOK_OBSERVER_KEY = /* @__PURE__ */ Symbol.for("frontmcp:hook-observer");
22
22
  var FAILED_OUTCOMES = /* @__PURE__ */ new Set(["fail", "abort", "unknown_error"]);
23
23
  var CAP = (s) => s ? s[0].toUpperCase() + s.slice(1) : s;
24
- var WILL = (s) => `will${CAP(s)}`;
25
- var DID = (s) => `did${CAP(s)}`;
26
- var AROUND = (s) => `around${CAP(s)}`;
24
+ var stageKeysByName = /* @__PURE__ */ new Map();
25
+ function stageKeysOf(stage) {
26
+ let keys = stageKeysByName.get(stage);
27
+ if (!keys) {
28
+ keys = { will: `will${CAP(stage)}`, did: `did${CAP(stage)}`, around: `around${CAP(stage)}` };
29
+ stageKeysByName.set(stage, keys);
30
+ }
31
+ return keys;
32
+ }
27
33
  function parseTypedKey(k) {
28
34
  const lc = k.toLowerCase();
29
35
  if (lc.startsWith("will") && k.length > 4) return { base: k.slice(4, 5).toLowerCase() + k.slice(5), type: "will" };
@@ -32,6 +38,25 @@ function parseTypedKey(k) {
32
38
  return { base: k.slice(6, 7).toLowerCase() + k.slice(7), type: "around" };
33
39
  return { base: k };
34
40
  }
41
+ var stageBasesByGroup = /* @__PURE__ */ new WeakMap();
42
+ function stageBasesOf(group) {
43
+ let bases = stageBasesByGroup.get(group);
44
+ if (!bases) {
45
+ const seen = /* @__PURE__ */ new Set();
46
+ bases = [];
47
+ for (const rawKey of group) {
48
+ const { base, type } = parseTypedKey(rawKey);
49
+ if (type || seen.has(base)) continue;
50
+ seen.add(base);
51
+ bases.push(base);
52
+ }
53
+ stageBasesByGroup.set(group, bases);
54
+ }
55
+ return bases;
56
+ }
57
+ function nextStageOrder(stages) {
58
+ return Math.max(0, ...Object.values(stages).flatMap((list) => list.map((e) => e._order ?? 0))) + 1;
59
+ }
35
60
  var FlowInstance = class extends FlowEntry {
36
61
  deps;
37
62
  globalProviders;
@@ -40,6 +65,7 @@ var FlowInstance = class extends FlowEntry {
40
65
  stages;
41
66
  hooks;
42
67
  logger;
68
+ baseStageOrderEnd;
43
69
  constructor(scope, record, deps, globalProviders) {
44
70
  super(scope, record);
45
71
  this.deps = [...deps];
@@ -139,7 +165,7 @@ var FlowInstance = class extends FlowEntry {
139
165
  * no-op so flows never mount as routes). It mirrors how Express dispatches:
140
166
  * method + `middleware.path` (mounted as a prefix) + `canActivate`.
141
167
  *
142
- * Only flows with a SPECIFIC matcher qualify — a `middleware.path` (e.g.
168
+ * Only flows with a SPECIFIC matcher qualify \u2014 a `middleware.path` (e.g.
143
169
  * `/oauth/token`) and/or a `canActivate` (static class method or
144
170
  * `middleware.canActivate`, e.g. the well-known PRM path set). A bare
145
171
  * `{ method }` middleware is too broad to safely claim an arbitrary request,
@@ -245,8 +271,9 @@ var FlowInstance = class extends FlowEntry {
245
271
  mergedDeps.set(token, instance);
246
272
  }
247
273
  const baseStages = this.stages;
248
- const stages = cloneStageMap(baseStages);
249
- let orderBase = Math.max(0, ...Object.values(stages).flatMap((list) => list.map((e) => e._order ?? 0))) + 1;
274
+ let stages = baseStages;
275
+ let ownsStages = false;
276
+ let orderBase = this.baseStageOrderEnd ??= nextStageOrder(baseStages);
250
277
  const hookOwnerId = await FlowClass.resolveHookOwnerId?.(input, scope);
251
278
  const entryClass = await FlowClass.resolveHookEntryClass?.(input, scope);
252
279
  const entryStaticHooks = entryClass ? staticHooksFor(this.hooks.getClsHooks(entryClass), name) : [];
@@ -274,6 +301,10 @@ var FlowInstance = class extends FlowEntry {
274
301
  }
275
302
  if (metas.length) {
276
303
  const start = opts?.orderStart ?? orderBase;
304
+ if (!ownsStages) {
305
+ stages = cloneStageMap(baseStages);
306
+ ownsStages = true;
307
+ }
277
308
  mergeHookMetasIntoStageMap(FlowClass, stages, metas, start, runHook);
278
309
  if (opts?.orderStart === void 0) orderBase += metas.length;
279
310
  }
@@ -284,7 +315,7 @@ var FlowInstance = class extends FlowEntry {
284
315
  const context = new FlowClass(this.metadata, input, scope, appendContextHooks, mergedDeps);
285
316
  contextReady = true;
286
317
  await materializeAndMerge(initialInjectedHooks, { orderStart: -1e6 });
287
- orderBase = Math.max(0, ...Object.values(stages).flatMap((list) => list.map((e) => e._order ?? 0))) + 1;
318
+ if (ownsStages) orderBase = nextStageOrder(stages);
288
319
  await materializeAndMerge(entryStaticHooks);
289
320
  let responded;
290
321
  const toStageResult = (e) => {
@@ -298,12 +329,18 @@ var FlowInstance = class extends FlowEntry {
298
329
  }
299
330
  return { outcome: "unknown_error", control: e };
300
331
  };
332
+ const hasEntries = (key) => (stages[key]?.length ?? 0) > 0;
301
333
  const runList = async (key, opts) => {
302
- const getList = () => stages[key] ?? [];
303
334
  const seen = /* @__PURE__ */ new Set();
304
335
  while (true) {
305
- const list = getList();
306
- const item = list.find((e) => !seen.has(e));
336
+ const list = stages[key] ?? [];
337
+ let item;
338
+ for (const entry of list) {
339
+ if (!seen.has(entry)) {
340
+ item = entry;
341
+ break;
342
+ }
343
+ }
307
344
  if (!item) break;
308
345
  seen.add(item);
309
346
  try {
@@ -316,7 +353,7 @@ var FlowInstance = class extends FlowEntry {
316
353
  return { outcome: "ok" };
317
354
  };
318
355
  const runAroundChain = async (stageName, index = 0) => {
319
- const around = (stages[AROUND(stageName)] ?? [])[index];
356
+ const around = (stages[stageKeysOf(stageName).around] ?? [])[index];
320
357
  if (!around) return runList(stageName, { ignoreRespond: false });
321
358
  let innerResult = { outcome: "ok" };
322
359
  const next = async () => {
@@ -331,17 +368,18 @@ var FlowInstance = class extends FlowEntry {
331
368
  return FAILED_OUTCOMES.has(innerResult.outcome) ? { outcome: "ok" } : innerResult;
332
369
  };
333
370
  const runOneStage = async (stageName, stopOnRespond) => {
334
- {
335
- const res = await runList(WILL(stageName));
371
+ const keys = stageKeysOf(stageName);
372
+ if (hasEntries(keys.will)) {
373
+ const res = await runList(keys.will);
336
374
  if (res.outcome === "respond" && stopOnRespond) return res;
337
375
  if (res.outcome !== "ok" && res.outcome !== "respond") return res;
338
376
  }
339
- const bodyOutcome = await runAroundChain(stageName);
377
+ const bodyOutcome = hasEntries(keys.around) ? await runAroundChain(stageName) : await runList(stageName, { ignoreRespond: false });
340
378
  if (bodyOutcome.outcome !== "ok" && bodyOutcome.outcome !== "respond") {
341
379
  return bodyOutcome;
342
380
  }
343
- {
344
- const res = await runList(DID(stageName), { ignoreRespond: true });
381
+ if (hasEntries(keys.did)) {
382
+ const res = await runList(keys.did, { ignoreRespond: true });
345
383
  if (res.outcome !== "ok" && res.outcome !== "respond") return res;
346
384
  }
347
385
  if (bodyOutcome.outcome === "respond") return bodyOutcome;
@@ -349,14 +387,7 @@ var FlowInstance = class extends FlowEntry {
349
387
  };
350
388
  const runStageGroup = async (group, stopOnRespond, opts) => {
351
389
  if (!group || group.length === 0) return { outcome: "ok" };
352
- const seenBase = /* @__PURE__ */ new Set();
353
- for (const rawKey of group) {
354
- const { base, type } = parseTypedKey(rawKey);
355
- if (type) {
356
- continue;
357
- }
358
- if (seenBase.has(base)) continue;
359
- seenBase.add(base);
390
+ for (const base of stageBasesOf(group)) {
360
391
  const res = await runOneStage(base, stopOnRespond);
361
392
  if (res.outcome === "respond") {
362
393
  if (stopOnRespond) return res;