@burdenoff/mcp-libs 2026.1030.5 → 2026.1031.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.
@@ -23,8 +23,8 @@ var PIPELINE_FIELDS = `
23
23
  tags createdAt updatedAt workspaceId
24
24
  `;
25
25
  var STEP_FIELDS = `
26
- id runId name kind status position inputs outputs logsRef durationMs
27
- startedAt finishedAt errorMessage createdAt updatedAt workspaceId
26
+ id runId name kind status position inputs outputs producedDatasetIds logsRef
27
+ durationMs startedAt finishedAt errorMessage createdAt updatedAt workspaceId
28
28
  `;
29
29
  var RUN_FIELDS = `
30
30
  id pipelineId runNumber status params metrics datasetId triggeredBy
@@ -262,6 +262,17 @@ var ADD_RUN_STEP = `
262
262
  }
263
263
  }
264
264
  `;
265
+ var COMPLETE_RUN_STEP = `
266
+ mutation CosmicintersectionCompleteRunStep(
267
+ $runId: ID!
268
+ $stepId: ID!
269
+ $input: CosCompleteRunStepInput!
270
+ ) {
271
+ cosCompleteRunStep(runId: $runId, stepId: $stepId, input: $input) {
272
+ ${STEP_FIELDS}
273
+ }
274
+ }
275
+ `;
265
276
  var GET_NOTEBOOK = `
266
277
  query CosmicintersectionGetNotebook($id: ID!) {
267
278
  cosNotebook(id: $id) {
@@ -1071,6 +1082,7 @@ function registerPipelineTools(server, ctx, track) {
1071
1082
  }
1072
1083
  );
1073
1084
  }
1085
+ var CosStepCompletionStatusEnum = z.enum(["SUCCEEDED", "FAILED", "CANCELLED"]);
1074
1086
  function registerRunTools(server, ctx, track) {
1075
1087
  server.registerTool(
1076
1088
  track(mcpToolName(ctx.productName, "runs_get")),
@@ -1221,6 +1233,40 @@ function registerRunTools(server, ctx, track) {
1221
1233
  }
1222
1234
  }
1223
1235
  );
1236
+ server.registerTool(
1237
+ track(mcpToolName(ctx.productName, "runs_steps_complete")),
1238
+ {
1239
+ title: "Complete Run Step",
1240
+ description: "Finish a run step with its status, outputs, error and the datasets it produced. producedDatasetIds must be datasets in this workspace you can read (else NOT_FOUND, nothing changes); they are stored as outputs.producedDatasetIds, the datasets are marked lineageCaptured, and catalog search lineage then shows the run as PRODUCED_BY. Completing a finished step returns CONFLICT.",
1241
+ inputSchema: {
1242
+ runId: z.string().describe("Run ID"),
1243
+ stepId: z.string().describe("Step ID"),
1244
+ status: CosStepCompletionStatusEnum.describe("Final step status"),
1245
+ outputs: JsonObject.optional().describe(
1246
+ "Step outputs JSON (e.g. rowsIn/rowsOut/anomaliesFlagged/warnings)"
1247
+ ),
1248
+ producedDatasetIds: z.array(z.string().min(1)).max(100).optional().describe("Datasets this step wrote (at most 100)"),
1249
+ errorMessage: z.string().optional().describe("Error message for a failed step"),
1250
+ logsRef: z.string().optional().describe("Reference to the step logs (e.g. an object-store URI)")
1251
+ }
1252
+ },
1253
+ async ({ runId, stepId, status, outputs, producedDatasetIds, errorMessage, logsRef }) => {
1254
+ try {
1255
+ const input = { status };
1256
+ if (outputs !== void 0) input.outputs = outputs;
1257
+ if (producedDatasetIds !== void 0) input.producedDatasetIds = producedDatasetIds;
1258
+ if (errorMessage !== void 0) input.errorMessage = errorMessage;
1259
+ if (logsRef !== void 0) input.logsRef = logsRef;
1260
+ const data = await ctx.gql.workspace.request(COMPLETE_RUN_STEP, { runId, stepId, input });
1261
+ return jsonResult(data.cosCompleteRunStep);
1262
+ } catch (error) {
1263
+ ctx.logger.error("cosmicintersection runs_steps_complete failed", { error: String(error) });
1264
+ return errorResult(
1265
+ `Failed to complete run step: ${error instanceof Error ? error.message : String(error)}`
1266
+ );
1267
+ }
1268
+ }
1269
+ );
1224
1270
  }
1225
1271
  function registerNotebookTools(server, ctx, track) {
1226
1272
  server.registerTool(
@@ -1915,7 +1961,7 @@ Show results at each step and confirm before publishing.`
1915
1961
  text: `Run a reproducible-research publication workflow. ${notebookNote}
1916
1962
 
1917
1963
  1. **Pipeline**: Use ${p}_pipelines_list / ${p}_pipelines_create to set up the processing pipeline (definition + trigger).
1918
- 2. **Run**: Use ${p}_runs_start to queue a run, ${p}_runs_steps_add to append steps, and ${p}_runs_transition to advance it (QUEUED \u2192 RUNNING \u2192 SUCCEEDED).
1964
+ 2. **Run**: Use ${p}_runs_start to queue a run, ${p}_runs_steps_add to append steps, ${p}_runs_steps_complete to finish each step (pass producedDatasetIds for the datasets it wrote, so search lineage shows the run as PRODUCED_BY), and ${p}_runs_transition to advance it (QUEUED \u2192 RUNNING \u2192 SUCCEEDED).
1919
1965
  3. **Analyze**: Use ${p}_analyses_run against the resulting dataset/notebook, then ${p}_analyses_complete with the results and an output File.
1920
1966
  4. **Release**: Use ${p}_releases_create to bundle datasets + notebook, then ${p}_releases_publish to stamp a DOI.
1921
1967
  5. **(Optional) Share Access**: Use ${p}_grants_grant to give collaborators scoped access to the underlying datasets.