@stigmer/mcp-server 3.2.3 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +60 -13
  2. package/cli/mcp-server-stigmer.js +13 -9
  3. package/config.d.ts +12 -0
  4. package/config.d.ts.map +1 -1
  5. package/config.js +5 -0
  6. package/config.js.map +1 -1
  7. package/domains/agentexecutions/approve.d.ts +9 -0
  8. package/domains/agentexecutions/approve.d.ts.map +1 -0
  9. package/domains/agentexecutions/approve.js +46 -0
  10. package/domains/agentexecutions/approve.js.map +1 -0
  11. package/domains/agentexecutions/fetch.d.ts +28 -0
  12. package/domains/agentexecutions/fetch.d.ts.map +1 -0
  13. package/domains/agentexecutions/fetch.js +82 -0
  14. package/domains/agentexecutions/fetch.js.map +1 -0
  15. package/domains/agentexecutions/run.d.ts +27 -0
  16. package/domains/agentexecutions/run.d.ts.map +1 -0
  17. package/domains/agentexecutions/run.js +87 -0
  18. package/domains/agentexecutions/run.js.map +1 -0
  19. package/domains/agentexecutions/tools.d.ts +5 -0
  20. package/domains/agentexecutions/tools.d.ts.map +1 -0
  21. package/domains/agentexecutions/tools.js +97 -0
  22. package/domains/agentexecutions/tools.js.map +1 -0
  23. package/domains/datastores/apply.d.ts +4 -0
  24. package/domains/datastores/apply.d.ts.map +1 -0
  25. package/domains/datastores/apply.js +28 -0
  26. package/domains/datastores/apply.js.map +1 -0
  27. package/domains/datastores/delete.d.ts +3 -0
  28. package/domains/datastores/delete.d.ts.map +1 -0
  29. package/domains/datastores/delete.js +38 -0
  30. package/domains/datastores/delete.js.map +1 -0
  31. package/domains/datastores/fetch.d.ts +3 -0
  32. package/domains/datastores/fetch.d.ts.map +1 -0
  33. package/domains/datastores/fetch.js +23 -0
  34. package/domains/datastores/fetch.js.map +1 -0
  35. package/domains/datastores/resources.d.ts +5 -0
  36. package/domains/datastores/resources.d.ts.map +1 -0
  37. package/domains/datastores/resources.js +16 -0
  38. package/domains/datastores/resources.js.map +1 -0
  39. package/domains/datastores/tools.d.ts +5 -0
  40. package/domains/datastores/tools.d.ts.map +1 -0
  41. package/domains/datastores/tools.js +46 -0
  42. package/domains/datastores/tools.js.map +1 -0
  43. package/domains/environments/apply.d.ts +4 -0
  44. package/domains/environments/apply.d.ts.map +1 -0
  45. package/domains/environments/apply.js +30 -0
  46. package/domains/environments/apply.js.map +1 -0
  47. package/domains/environments/delete.d.ts +3 -0
  48. package/domains/environments/delete.d.ts.map +1 -0
  49. package/domains/environments/delete.js +36 -0
  50. package/domains/environments/delete.js.map +1 -0
  51. package/domains/environments/fetch.d.ts +6 -0
  52. package/domains/environments/fetch.d.ts.map +1 -0
  53. package/domains/environments/fetch.js +30 -0
  54. package/domains/environments/fetch.js.map +1 -0
  55. package/domains/environments/resources.d.ts +5 -0
  56. package/domains/environments/resources.d.ts.map +1 -0
  57. package/domains/environments/resources.js +16 -0
  58. package/domains/environments/resources.js.map +1 -0
  59. package/domains/environments/tools.d.ts +5 -0
  60. package/domains/environments/tools.d.ts.map +1 -0
  61. package/domains/environments/tools.js +51 -0
  62. package/domains/environments/tools.js.map +1 -0
  63. package/domains/executions/cancel.d.ts +9 -0
  64. package/domains/executions/cancel.d.ts.map +1 -0
  65. package/domains/executions/cancel.js +114 -0
  66. package/domains/executions/cancel.js.map +1 -0
  67. package/domains/executions/tools.d.ts +5 -0
  68. package/domains/executions/tools.d.ts.map +1 -0
  69. package/domains/executions/tools.js +28 -0
  70. package/domains/executions/tools.js.map +1 -0
  71. package/domains/records/calls.d.ts +48 -0
  72. package/domains/records/calls.d.ts.map +1 -0
  73. package/domains/records/calls.js +118 -0
  74. package/domains/records/calls.js.map +1 -0
  75. package/domains/records/errors.d.ts +24 -0
  76. package/domains/records/errors.d.ts.map +1 -0
  77. package/domains/records/errors.js +79 -0
  78. package/domains/records/errors.js.map +1 -0
  79. package/domains/records/tools.d.ts +7 -0
  80. package/domains/records/tools.d.ts.map +1 -0
  81. package/domains/records/tools.js +139 -0
  82. package/domains/records/tools.js.map +1 -0
  83. package/domains/resourceuri.d.ts.map +1 -1
  84. package/domains/resourceuri.js +2 -0
  85. package/domains/resourceuri.js.map +1 -1
  86. package/domains/search/tools.d.ts.map +1 -1
  87. package/domains/search/tools.js +10 -7
  88. package/domains/search/tools.js.map +1 -1
  89. package/domains/skills/tools.d.ts.map +1 -1
  90. package/domains/skills/tools.js +25 -1
  91. package/domains/skills/tools.js.map +1 -1
  92. package/domains/skills/versions.d.ts +9 -0
  93. package/domains/skills/versions.d.ts.map +1 -0
  94. package/domains/skills/versions.js +31 -0
  95. package/domains/skills/versions.js.map +1 -0
  96. package/domains/workflowexecutions/approvals.d.ts +17 -0
  97. package/domains/workflowexecutions/approvals.d.ts.map +1 -0
  98. package/domains/workflowexecutions/approvals.js +61 -0
  99. package/domains/workflowexecutions/approvals.js.map +1 -0
  100. package/domains/workflowexecutions/run.d.ts +12 -0
  101. package/domains/workflowexecutions/run.d.ts.map +1 -0
  102. package/domains/workflowexecutions/run.js +69 -0
  103. package/domains/workflowexecutions/run.js.map +1 -0
  104. package/domains/workflowexecutions/tools.d.ts.map +1 -1
  105. package/domains/workflowexecutions/tools.js +89 -6
  106. package/domains/workflowexecutions/tools.js.map +1 -1
  107. package/domains/workflows/tools.d.ts.map +1 -1
  108. package/domains/workflows/tools.js +69 -5
  109. package/domains/workflows/tools.js.map +1 -1
  110. package/domains/workflows/versions.d.ts +29 -0
  111. package/domains/workflows/versions.d.ts.map +1 -0
  112. package/domains/workflows/versions.js +99 -0
  113. package/domains/workflows/versions.js.map +1 -0
  114. package/gen/agent.d.ts +56 -0
  115. package/gen/agent.d.ts.map +1 -1
  116. package/gen/agent.js +24 -1
  117. package/gen/agent.js.map +1 -1
  118. package/gen/datastore.d.ts +861 -0
  119. package/gen/datastore.d.ts.map +1 -0
  120. package/gen/datastore.js +267 -0
  121. package/gen/datastore.js.map +1 -0
  122. package/gen/environment.d.ts +77 -0
  123. package/gen/environment.d.ts.map +1 -0
  124. package/gen/environment.js +62 -0
  125. package/gen/environment.js.map +1 -0
  126. package/gen/workflow.d.ts +4 -4
  127. package/index.d.ts +2 -2
  128. package/index.d.ts.map +1 -1
  129. package/index.js +4 -4
  130. package/index.js.map +1 -1
  131. package/package.json +3 -3
  132. package/server.d.ts +31 -1
  133. package/server.d.ts.map +1 -1
  134. package/server.js +53 -3
  135. package/server.js.map +1 -1
  136. package/src/config.ts +19 -0
  137. package/src/domains/agentexecutions/approve.ts +67 -0
  138. package/src/domains/agentexecutions/fetch.ts +112 -0
  139. package/src/domains/agentexecutions/run.ts +112 -0
  140. package/src/domains/agentexecutions/tools.ts +139 -0
  141. package/src/domains/apply.integration.test.ts +82 -6
  142. package/src/domains/datastores/apply.ts +33 -0
  143. package/src/domains/datastores/delete.ts +47 -0
  144. package/src/domains/datastores/fetch.ts +32 -0
  145. package/src/domains/datastores/resources.ts +21 -0
  146. package/src/domains/datastores/tools.ts +76 -0
  147. package/src/domains/deletes.integration.test.ts +49 -2
  148. package/src/domains/environments/apply.ts +40 -0
  149. package/src/domains/environments/delete.ts +45 -0
  150. package/src/domains/environments/fetch.ts +39 -0
  151. package/src/domains/environments/resources.ts +21 -0
  152. package/src/domains/environments/tools.ts +81 -0
  153. package/src/domains/executions/cancel.ts +148 -0
  154. package/src/domains/executions/tools.ts +45 -0
  155. package/src/domains/executions.integration.test.ts +376 -0
  156. package/src/domains/reads.integration.test.ts +51 -5
  157. package/src/domains/records/calls.ts +209 -0
  158. package/src/domains/records/errors.ts +98 -0
  159. package/src/domains/records/records.integration.test.ts +313 -0
  160. package/src/domains/records/tools.ts +210 -0
  161. package/src/domains/resources.integration.test.ts +38 -2
  162. package/src/domains/resourceuri.test.ts +11 -2
  163. package/src/domains/resourceuri.ts +2 -0
  164. package/src/domains/search/search.integration.test.ts +18 -2
  165. package/src/domains/search/tools.ts +12 -7
  166. package/src/domains/skills/tools.ts +34 -1
  167. package/src/domains/skills/versions.ts +47 -0
  168. package/src/domains/versions.integration.test.ts +212 -0
  169. package/src/domains/workflowexecutions/approvals.ts +102 -0
  170. package/src/domains/workflowexecutions/run.ts +87 -0
  171. package/src/domains/workflowexecutions/tools.ts +120 -6
  172. package/src/domains/workflows/tools.ts +90 -7
  173. package/src/domains/workflows/versions.ts +147 -0
  174. package/src/gen/agent.ts +28 -1
  175. package/src/gen/datastore.ts +264 -0
  176. package/src/gen/environment.ts +66 -0
  177. package/src/http.integration.test.ts +1 -0
  178. package/src/index.ts +12 -5
  179. package/src/server.ts +71 -5
package/server.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAazD;;;GAGG;AACH,eAAO,MAAM,cAAc,QAA2C,CAAC;AAWvE;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAK7D;AAoCD;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBtF;AAED,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,SAAS,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC1G;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBtG;AAkMD;;;;;GA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,CAiBtG;AA6FD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAEzE;AAwGD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAWtD"}
package/server.js CHANGED
@@ -14,10 +14,17 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
14
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
15
15
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
16
16
  import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
17
+ import { registerAgentExecutionTools } from "./domains/agentexecutions/tools.js";
17
18
  import { registerAgentResources } from "./domains/agents/resources.js";
18
19
  import { registerAgentTools } from "./domains/agents/tools.js";
20
+ import { registerDatastoreResources } from "./domains/datastores/resources.js";
21
+ import { registerDatastoreTools } from "./domains/datastores/tools.js";
22
+ import { registerEnvironmentResources } from "./domains/environments/resources.js";
23
+ import { registerEnvironmentTools } from "./domains/environments/tools.js";
24
+ import { registerExecutionControlTools } from "./domains/executions/tools.js";
19
25
  import { registerMcpServerResources } from "./domains/mcpservers/resources.js";
20
26
  import { registerMcpServerTools } from "./domains/mcpservers/tools.js";
27
+ import { registerRecordTools } from "./domains/records/tools.js";
21
28
  import { registerSearchTools } from "./domains/search/tools.js";
22
29
  import { registerSkillResources } from "./domains/skills/resources.js";
23
30
  import { registerSkillTools } from "./domains/skills/tools.js";
@@ -49,6 +56,21 @@ export function createServer(target) {
49
56
  registerResources(server, target);
50
57
  return server;
51
58
  }
59
+ /**
60
+ * Build a records-only MCP server: the five record tools with the
61
+ * agent-facing argument surface, and nothing else (T05 R1). This is
62
+ * the roster the runner-synthesized datastore attachment connects to —
63
+ * a structural guarantee that an agent session never sees the
64
+ * management tools (apply/delete/…) its empty approval maps would make
65
+ * approval-free. Served on the /records HTTP route and as the stdio
66
+ * roster when STIGMER_MCP_ROSTER=records.
67
+ */
68
+ export function createRecordsServer(target) {
69
+ const server = new McpServer({ name: "mcp-server-stigmer-records", version: SERVER_VERSION });
70
+ const tools = registerRecordTools(server, target, "agent");
71
+ log.info("tools registered (records roster)", { count: tools.length, tools });
72
+ return server;
73
+ }
52
74
  /**
53
75
  * Wire up every domain's tools. Each domain returns the names it registered so
54
76
  * the startup log's count and roster cannot drift from what is actually wired,
@@ -58,12 +80,20 @@ function registerTools(server, target) {
58
80
  const tools = [
59
81
  ...registerSearchTools(server, target),
60
82
  ...registerAgentTools(server, target),
83
+ ...registerAgentExecutionTools(server, target),
61
84
  ...registerMcpServerTools(server, target),
62
85
  ...registerSkillTools(server, target),
63
86
  ...registerWorkflowTools(server, target),
64
87
  ...registerValidateWorkflowYamlTool(server, target),
65
88
  ...registerTaskKindTools(server, target),
66
89
  ...registerWorkflowExecutionTools(server, target),
90
+ ...registerExecutionControlTools(server, target),
91
+ ...registerEnvironmentTools(server, target),
92
+ ...registerDatastoreTools(server, target),
93
+ // The record tools also serve external MCP clients — as direct
94
+ // principals with the org argument and honest annotations (the
95
+ // agent-facing variant lives on the records-only roster).
96
+ ...registerRecordTools(server, target, "direct"),
67
97
  ];
68
98
  log.info("tools registered", { count: tools.length, tools });
69
99
  }
@@ -78,6 +108,8 @@ function registerResources(server, target) {
78
108
  ...registerMcpServerResources(server, target),
79
109
  ...registerSkillResources(server, target),
80
110
  ...registerWorkflowResources(server, target),
111
+ ...registerEnvironmentResources(server, target),
112
+ ...registerDatastoreResources(server, target),
81
113
  ];
82
114
  log.info("resources registered", { count: resources.length, resources });
83
115
  }
@@ -104,6 +136,15 @@ export async function serveStdio(server, signal) {
104
136
  server.server.onerror = (err) => log.error("mcp protocol error", { error: err.message });
105
137
  });
106
138
  }
139
+ /** HTTP route serving the records-only roster (T05 R1). */
140
+ export const RECORDS_ROUTE = "/records";
141
+ /**
142
+ * The standard HTTP route dispatch: the records-only roster on
143
+ * {@link RECORDS_ROUTE}, the full roster everywhere else.
144
+ */
145
+ export function routedServerFactory(target) {
146
+ return (path) => (path === RECORDS_ROUTE ? createRecordsServer(target) : createServer(target));
147
+ }
107
148
  /**
108
149
  * Serve over Streamable HTTP until `signal` aborts.
109
150
  *
@@ -163,8 +204,8 @@ export async function serveBoth(target, cfg, signal) {
163
204
  const onParentAbort = () => linked.abort();
164
205
  signal.addEventListener("abort", onParentAbort, { once: true });
165
206
  const tasks = [
166
- serveStdio(createServer(target), linked.signal),
167
- serveHttp(() => createServer(target), cfg, linked.signal),
207
+ serveStdio(stdioServer(target, cfg), linked.signal),
208
+ serveHttp(routedServerFactory(target), cfg, linked.signal),
168
209
  ];
169
210
  try {
170
211
  await Promise.race(tasks);
@@ -212,6 +253,7 @@ async function routeRequest(req, res, sessions, makeServer, cfg) {
212
253
  }
213
254
  req.auth = { token, clientId: "stigmer-mcp-passthrough", scopes: [] };
214
255
  }
256
+ const path = requestPath(req);
215
257
  const sessionId = headerValue(req, "mcp-session-id");
216
258
  // Established session → dispatch to its transport.
217
259
  if (sessionId !== undefined) {
@@ -249,9 +291,17 @@ async function routeRequest(req, res, sessions, makeServer, cfg) {
249
291
  if (transport.sessionId !== undefined)
250
292
  sessions.delete(transport.sessionId);
251
293
  };
252
- await makeServer().connect(transport);
294
+ await makeServer(path).connect(transport);
253
295
  await transport.handleRequest(req, res, body);
254
296
  }
297
+ /**
298
+ * The stdio server for the configured roster: the records-only roster
299
+ * when STIGMER_MCP_ROSTER=records (what the OSS runner-synthesized
300
+ * datastore attachment spawns), the full roster otherwise.
301
+ */
302
+ export function stdioServer(target, cfg) {
303
+ return cfg.roster === "records" ? createRecordsServer(target) : createServer(target);
304
+ }
255
305
  /** Return a single header value, collapsing the array form Node may produce. */
256
306
  function headerValue(req, name) {
257
307
  const v = req.headers[name];
package/server.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE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OAAO,EAAE,CAAC;IAC1C,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,IAAI,GAAG,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAE7B,MAAM,IAAI,GAAI,GAAyB,CAAC,IAAI,CAAC;IAC7C,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,IAAI,GAAI,GAA6B,CAAC,IAAI,CAAC;IACjD,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,IAAI,CAAC;IAEnF,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AACpE,CAAC"}
package/src/config.ts CHANGED
@@ -11,6 +11,17 @@ import { log, type LogFormat, type LogLevel } from "./logger.js";
11
11
  /** Communication mode between MCP clients and the server. */
12
12
  export type Transport = "stdio" | "http" | "both";
13
13
 
14
+ /**
15
+ * Which tool roster the server exposes.
16
+ *
17
+ * - "full": every domain (the default — external MCP clients).
18
+ * - "records": only the five record tools (DD-005) with the agent-facing
19
+ * argument surface. This is what the runner-synthesized datastore
20
+ * attachment spawns over stdio (T05 R1); over HTTP the same roster is
21
+ * served on the /records route regardless of this setting.
22
+ */
23
+ export type Roster = "full" | "records";
24
+
14
25
  /**
15
26
  * OAuth 2.0 Protected Resource Metadata (RFC 9728) discovery settings.
16
27
  *
@@ -36,6 +47,8 @@ export interface Config {
36
47
  */
37
48
  readonly apiKey: string;
38
49
  readonly transport: Transport;
50
+ /** Tool roster for stdio/both stdio-side; HTTP routes by path. */
51
+ readonly roster: Roster;
39
52
  readonly httpPort: string;
40
53
  /** Whether HTTP requests require an Authorization: Bearer header. */
41
54
  readonly httpAuthEnabled: boolean;
@@ -45,6 +58,7 @@ export interface Config {
45
58
  }
46
59
 
47
60
  const VALID_TRANSPORTS: readonly string[] = ["stdio", "http", "both"];
61
+ const VALID_ROSTERS: readonly string[] = ["full", "records"];
48
62
  const VALID_LOG_FORMATS: readonly string[] = ["text", "json"];
49
63
  const VALID_LOG_LEVELS: readonly string[] = ["debug", "info", "warn", "error"];
50
64
 
@@ -54,6 +68,7 @@ export function loadConfigFromEnv(env: NodeJS.ProcessEnv = process.env): Config
54
68
  stigmerServerAddress: envOr(env, "STIGMER_SERVER_ADDRESS", "localhost:7234"),
55
69
  apiKey: env.STIGMER_API_KEY ?? "",
56
70
  transport: envOr(env, "STIGMER_MCP_TRANSPORT", "stdio").toLowerCase() as Transport,
71
+ roster: envOr(env, "STIGMER_MCP_ROSTER", "full").toLowerCase() as Roster,
57
72
  httpPort: envOr(env, "STIGMER_MCP_HTTP_PORT", "8080"),
58
73
  // Go semantics: only the exact string "true" enables auth.
59
74
  httpAuthEnabled: envOr(env, "STIGMER_MCP_HTTP_AUTH_ENABLED", "true") === "true",
@@ -81,6 +96,10 @@ export function validateConfig(cfg: Config): void {
81
96
  );
82
97
  }
83
98
 
99
+ if (!VALID_ROSTERS.includes(cfg.roster)) {
100
+ throw new Error(`invalid STIGMER_MCP_ROSTER "${cfg.roster}": must be full or records`);
101
+ }
102
+
84
103
  if (cfg.stigmerServerAddress === "") {
85
104
  throw new Error("STIGMER_SERVER_ADDRESS must not be empty");
86
105
  }
@@ -0,0 +1,67 @@
1
+ // Agent-execution approval path: submit a decision for a tool call the
2
+ // execution is waiting on (AgentExecutionCommandController.submitApproval).
3
+ //
4
+ // Pending approvals surface in get_agent_execution's
5
+ // status.pending_approvals[] — there is no org-wide inbox for agent
6
+ // executions (that exists only for workflow human_input tasks, see
7
+ // workflowexecutions/approvals.ts). The response reuses the compact
8
+ // projection: the returned AgentExecution embeds the full message history,
9
+ // which the approval loop doesn't need.
10
+
11
+ import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
12
+ import { AgentExecutionCommandController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/command_pb";
13
+
14
+ import { withClient } from "../client.js";
15
+ import { rpcError } from "../rpcerr.js";
16
+ import { compactExecutionJson, DEFAULT_MESSAGE_LIMIT } from "./fetch.js";
17
+
18
+ /**
19
+ * Model-facing action spelling → proto enum. APPROVE_ALL is deliberately not
20
+ * exposed: blanket auto-approval is a run-configuration concern, not a
21
+ * per-decision one.
22
+ */
23
+ const APPROVAL_ACTIONS: Readonly<Record<string, ApprovalAction>> = {
24
+ approve: ApprovalAction.APPROVE,
25
+ skip: ApprovalAction.SKIP,
26
+ reject: ApprovalAction.REJECT,
27
+ };
28
+
29
+ export interface SubmitAgentApprovalArgs {
30
+ readonly executionId: string;
31
+ readonly toolCallId: string;
32
+ readonly action: string;
33
+ readonly comment?: string;
34
+ }
35
+
36
+ /** Submit an approval decision; returns the execution in the compact view. */
37
+ export async function submitAgentApproval(
38
+ serverAddress: string,
39
+ token: string,
40
+ args: SubmitAgentApprovalArgs,
41
+ ): Promise<string> {
42
+ const action = APPROVAL_ACTIONS[args.action];
43
+ if (action === undefined) {
44
+ throw new Error(`unknown action "${args.action}"; valid actions: approve, skip, reject`);
45
+ }
46
+ return withClient(
47
+ AgentExecutionCommandController,
48
+ serverAddress,
49
+ token,
50
+ async (client, callOptions) => {
51
+ try {
52
+ const execution = await client.submitApproval(
53
+ {
54
+ agentExecutionId: args.executionId,
55
+ toolCallId: args.toolCallId,
56
+ action,
57
+ comment: args.comment ?? "",
58
+ },
59
+ callOptions,
60
+ );
61
+ return compactExecutionJson(execution, DEFAULT_MESSAGE_LIMIT);
62
+ } catch (err) {
63
+ throw rpcError(err, `approval for agent execution "${args.executionId}"`);
64
+ }
65
+ },
66
+ );
67
+ }
@@ -0,0 +1,112 @@
1
+ // Agent-execution read path: the polling primitive behind get_agent_execution.
2
+ //
3
+ // Agent executions have no event-log RPC (unlike workflow executions) — the
4
+ // platform's contract is: poll get and read status.phase, status.messages[],
5
+ // and status.pending_approvals[]. That makes the response shape critical for
6
+ // MCP: a long conversation's full protojson (every message, the resolved
7
+ // context snapshot, the approval ledger, sub-agent transcripts) can dwarf the
8
+ // model's context. The default "compact" view therefore returns a bounded
9
+ // message tail and drops the bulky server-side bookkeeping fields; "full" is
10
+ // the verbatim protojson for when the model genuinely needs everything.
11
+
12
+ import { AgentExecutionSchema, type AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
13
+ import { AgentExecutionQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/query_pb";
14
+
15
+ import { withClient } from "../client.js";
16
+ import { toProtoJson } from "../marshal.js";
17
+ import { rpcError } from "../rpcerr.js";
18
+
19
+ export type ExecutionView = "compact" | "full";
20
+
21
+ /** Message-tail size when the caller doesn't specify one. */
22
+ export const DEFAULT_MESSAGE_LIMIT = 5;
23
+
24
+ /**
25
+ * Bulky status fields pruned from the compact view. These are server-side
26
+ * bookkeeping (resolved-resource snapshot, append-only approval ledger,
27
+ * Temporal callback token) and sub-agent transcripts — none of which the
28
+ * poll loop (phase? messages? approvals?) needs.
29
+ */
30
+ const COMPACT_PRUNED_STATUS_FIELDS = [
31
+ "resolved_context",
32
+ "approval_events",
33
+ "callback_token",
34
+ "sub_agent_executions",
35
+ ] as const;
36
+
37
+ /** Fetch a single agent execution by ID and shape it for the requested view. */
38
+ export async function fetchAgentExecution(
39
+ serverAddress: string,
40
+ token: string,
41
+ executionId: string,
42
+ view: ExecutionView,
43
+ messageLimit: number,
44
+ ): Promise<string> {
45
+ if (executionId === "") {
46
+ throw new Error("execution_id is required");
47
+ }
48
+ return withClient(
49
+ AgentExecutionQueryController,
50
+ serverAddress,
51
+ token,
52
+ async (client, callOptions) => {
53
+ let execution: AgentExecution;
54
+ try {
55
+ execution = await client.get({ value: executionId }, callOptions);
56
+ } catch (err) {
57
+ throw rpcError(err, `agent execution "${executionId}"`);
58
+ }
59
+ return view === "full"
60
+ ? toProtoJson(AgentExecutionSchema, execution)
61
+ : compactExecutionJson(execution, messageLimit);
62
+ },
63
+ );
64
+ }
65
+
66
+ /** The compact projection plus the pre-truncation message count. */
67
+ export interface CompactExecution {
68
+ readonly totalMessages: number;
69
+ readonly data: Record<string, unknown>;
70
+ }
71
+
72
+ /**
73
+ * Build the compact projection: full protojson minus the pruned status
74
+ * fields, with status.messages sliced to the last `messageLimit` entries.
75
+ * Exposed at the data level so wrappers (cancel_execution's already_terminal
76
+ * envelope) can compose it without double-nesting.
77
+ *
78
+ * Shared by the write tools that return an AgentExecution (approve, cancel):
79
+ * their responses embed the same potentially-huge status.
80
+ */
81
+ export function compactExecution(execution: AgentExecution, messageLimit: number): CompactExecution {
82
+ const data = JSON.parse(toProtoJson(AgentExecutionSchema, execution)) as Record<string, unknown>;
83
+ let totalMessages = 0;
84
+
85
+ const status = data.status as Record<string, unknown> | undefined;
86
+ if (status !== undefined) {
87
+ const messages: unknown[] = Array.isArray(status.messages) ? status.messages : [];
88
+ totalMessages = messages.length;
89
+ if (messages.length > messageLimit) {
90
+ status.messages = messages.slice(-messageLimit);
91
+ }
92
+ for (const field of COMPACT_PRUNED_STATUS_FIELDS) {
93
+ delete status[field];
94
+ }
95
+ }
96
+
97
+ return { totalMessages, data };
98
+ }
99
+
100
+ /**
101
+ * The compact view as returned by tools: a wrapper carrying total_messages so
102
+ * the model can tell when the message tail is a window (and re-request with a
103
+ * larger message_limit or view=full).
104
+ */
105
+ export function compactExecutionJson(execution: AgentExecution, messageLimit: number): string {
106
+ const { totalMessages, data } = compactExecution(execution, messageLimit);
107
+ return JSON.stringify(
108
+ { view: "compact", total_messages: totalMessages, execution: data },
109
+ null,
110
+ 2,
111
+ );
112
+ }
@@ -0,0 +1,112 @@
1
+ // Agent-execution start path for the run_agent tool.
2
+ //
3
+ // Mirrors the CLI's run stack (client-apps/cli/src/resources/run/create.ts):
4
+ // starting an agent is a single AgentExecutionCommandController.create call —
5
+ // the server bootstraps the session, resolves the agent's default instance
6
+ // (auto-creating if missing), and dispatches the message. The MCP layer only
7
+ // resolves the org/slug reference to the agent ID first, over the same
8
+ // transport (the two-step pattern the delete tools use).
9
+ //
10
+ // The tool is deliberately asynchronous: it returns the created execution
11
+ // (with its aex_* ID) immediately and the run continues in the background.
12
+ // Observation happens through get_agent_execution polling — MCP tools are
13
+ // request/response, so there is no streaming path here by design.
14
+
15
+ import { createClient } from "@connectrpc/connect";
16
+ import { create as createMessage } from "@bufbuild/protobuf";
17
+ import { AgentQueryController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/query_pb";
18
+ import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
19
+ import { AgentExecutionCommandController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/command_pb";
20
+ import { AgentExecutionSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/spec_pb";
21
+ import {
22
+ ExecutionValueSchema,
23
+ type ExecutionValue,
24
+ } from "@stigmer/protos/ai/stigmer/agentic/executioncontext/v1/spec_pb";
25
+ import { ApiResourceMetadataSchema } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
26
+ import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
27
+
28
+ import { withTransport } from "../client.js";
29
+ import { toProtoJson } from "../marshal.js";
30
+ import { rpcError } from "../rpcerr.js";
31
+
32
+ /** apiVersion stamped on created executions; mirrors the CLI's run stack. */
33
+ const API_VERSION = "agentic.stigmer.ai/v1";
34
+
35
+ export interface RunAgentArgs {
36
+ readonly org: string;
37
+ readonly agent: string;
38
+ readonly message: string;
39
+ readonly sessionId?: string;
40
+ readonly runtimeEnv?: Record<string, string>;
41
+ }
42
+
43
+ /**
44
+ * Start an agent execution: resolve org/slug → agent ID, then create the
45
+ * execution. Returns the created execution as protojson (small at creation
46
+ * time — status is empty until the runner picks it up).
47
+ */
48
+ export async function runAgent(
49
+ serverAddress: string,
50
+ token: string,
51
+ args: RunAgentArgs,
52
+ ): Promise<string> {
53
+ const desc = `agent "${args.agent}" in org "${args.org}"`;
54
+ return withTransport(serverAddress, token, async (transport, callOptions) => {
55
+ const query = createClient(AgentQueryController, transport);
56
+ let agentId: string;
57
+ try {
58
+ const agent = await query.getByReference(
59
+ { org: args.org, kind: ApiResourceKind.agent, slug: args.agent },
60
+ callOptions,
61
+ );
62
+ agentId = agent.metadata?.id ?? "";
63
+ } catch (err) {
64
+ throw rpcError(err, desc);
65
+ }
66
+
67
+ const execution = createMessage(AgentExecutionSchema, {
68
+ apiVersion: API_VERSION,
69
+ kind: "AgentExecution",
70
+ metadata: createMessage(ApiResourceMetadataSchema, { name: executionName(), org: args.org }),
71
+ spec: createMessage(AgentExecutionSpecSchema, {
72
+ // Empty message means "just run" — the CLI applies the same default.
73
+ message: args.message === "" ? "execute" : args.message,
74
+ runtimeEnv: toExecutionValues(args.runtimeEnv),
75
+ sessionId: args.sessionId ?? "",
76
+ agentId,
77
+ }),
78
+ });
79
+
80
+ const command = createClient(AgentExecutionCommandController, transport);
81
+ try {
82
+ const created = await command.create(execution, callOptions);
83
+ return toProtoJson(AgentExecutionSchema, created);
84
+ } catch (err) {
85
+ throw rpcError(err, `execution of ${desc}`);
86
+ }
87
+ });
88
+ }
89
+
90
+ /**
91
+ * Convert the tool's plain string map to the proto ExecutionValue map. Values
92
+ * arriving through an MCP tool call have already passed through the model's
93
+ * context, so they are never secrets by definition — secrets reach executions
94
+ * through Environments, not through this tool.
95
+ */
96
+ export function toExecutionValues(
97
+ env: Record<string, string> | undefined,
98
+ ): Record<string, ExecutionValue> {
99
+ const out: Record<string, ExecutionValue> = {};
100
+ for (const [key, value] of Object.entries(env ?? {})) {
101
+ out[key] = createMessage(ExecutionValueSchema, { value, isSecret: false });
102
+ }
103
+ return out;
104
+ }
105
+
106
+ /**
107
+ * Unique-enough placeholder name; the backend owns final identity. Mirrors the
108
+ * CLI's executionName (Go's fmt.Sprintf("execution-%d", UnixMicro())).
109
+ */
110
+ export function executionName(): string {
111
+ return `execution-${Date.now() * 1000}`;
112
+ }