@rudderhq/cli 0.7.12 → 0.7.13

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.
package/dist/index.js CHANGED
@@ -474,6 +474,15 @@ var init_rudder_mcp_tool_descriptors_generated = __esm({
474
474
  "requiresAgentId": false,
475
475
  "attachesRunIdWhenAvailable": true
476
476
  },
477
+ {
478
+ "capabilityId": "issue.create",
479
+ "name": "rudder_issue_create",
480
+ "description": "Create a new issue or subtask with the generic issue surface; agent-created issues default to the creating agent when no assignee is supplied.",
481
+ "mutating": true,
482
+ "requiresOrgId": true,
483
+ "requiresAgentId": false,
484
+ "attachesRunIdWhenAvailable": true
485
+ },
477
486
  {
478
487
  "capabilityId": "approval.get",
479
488
  "name": "rudder_approval_get",
@@ -1477,6 +1486,20 @@ function coreMcpInputSchema(id) {
1477
1486
  riskSummary: string("Known risks, limitations, or remaining gaps."),
1478
1487
  idempotencyKey: string("Stable key for safe retry.", { maxLength: 500 })
1479
1488
  }, ["goal", "contractRevision", "criteria", "evidenceRefs", "riskSummary", "idempotencyKey"]);
1489
+ case "issue.create":
1490
+ return schema({
1491
+ title: string("Issue title.", { maxLength: 500 }),
1492
+ description: string("Issue description.", { maxLength: 5e5 }),
1493
+ status: string("Issue status.", { maxLength: 100 }),
1494
+ priority: string("Issue priority.", { maxLength: 100 }),
1495
+ assigneeAgentId: string("Assignee agent id or reference.", { maxLength: 200 }),
1496
+ projectId: string("Project id or reference.", { maxLength: 200 }),
1497
+ goalId: string("Goal id or reference.", { maxLength: 200 }),
1498
+ parentId: string("Parent issue id or reference.", { maxLength: 200 }),
1499
+ requestDepth: number("Requested issue depth.", 0, 1e4),
1500
+ billingCode: string("Billing code.", { maxLength: 200 }),
1501
+ labelIds: strings("Issue label ids.", 100)
1502
+ }, ["title"]);
1480
1503
  case "issue.list":
1481
1504
  return schema({
1482
1505
  status: string("Comma-separated issue statuses.", { maxLength: 500 }),
@@ -2397,6 +2420,7 @@ var init_constants = __esm({
2397
2420
  "rudder_library_file_ref",
2398
2421
  "rudder_library_file_link",
2399
2422
  "rudder_library_file_put",
2423
+ "rudder_issue_create",
2400
2424
  "rudder_approval_get",
2401
2425
  "rudder_approval_issues",
2402
2426
  "rudder_approval_comment",
@@ -12133,7 +12157,7 @@ var AGENT_CLI_CAPABILITIES = [
12133
12157
  category: "issue",
12134
12158
  description: "Create a new issue or subtask with the generic issue surface; agent-created issues default to the creating agent when no assignee is supplied.",
12135
12159
  mutating: true,
12136
- contract: "compat",
12160
+ contract: "agent-v1",
12137
12161
  requiresOrgId: true,
12138
12162
  requiresAgentId: false,
12139
12163
  requiresRunId: false,
@@ -14425,6 +14449,26 @@ async function callToolDirectlyIfSupported(toolName, rawArgs, env, signal) {
14425
14449
  payload
14426
14450
  ));
14427
14451
  }
14452
+ case "issue.create": {
14453
+ const orgId = requiredRuntimeString(env, "RUDDER_ORG_ID");
14454
+ const payload = createIssueSchema.parse({
14455
+ title: requiredString(input, "title"),
14456
+ description: input.description,
14457
+ status: input.status,
14458
+ priority: input.priority,
14459
+ assigneeAgentId: input.assigneeAgentId,
14460
+ projectId: input.projectId,
14461
+ goalId: input.goalId,
14462
+ parentId: input.parentId,
14463
+ requestDepth: input.requestDepth,
14464
+ billingCode: input.billingCode,
14465
+ labelIds: input.labelIds
14466
+ });
14467
+ return success(await api.post(
14468
+ `/api/orgs/${encodeURIComponent(orgId)}/issues`,
14469
+ payload
14470
+ ));
14471
+ }
14428
14472
  case "issue.get":
14429
14473
  return success(await api.get(`/api/issues/${encodeURIComponent(requiredAnyString(input, ["issue", "issueId"]))}`));
14430
14474
  case "issue.context": {
@@ -14864,6 +14908,22 @@ function cliArgsForCapability(capabilityId, input, tempFiles, env) {
14864
14908
  if (input.resultPayload !== void 0) args.push("--result-payload", JSON.stringify(input.resultPayload));
14865
14909
  return args;
14866
14910
  }
14911
+ case "issue.create": {
14912
+ const args = ["issue", "create", "--title", requiredString(input, "title")];
14913
+ pushOptional(args, "--description", input.description);
14914
+ pushOptional(args, "--status", input.status);
14915
+ pushOptional(args, "--priority", input.priority);
14916
+ pushOptional(args, "--assignee-agent-id", input.assigneeAgentId);
14917
+ pushOptional(args, "--project-id", input.projectId);
14918
+ pushOptional(args, "--goal-id", input.goalId);
14919
+ pushOptional(args, "--parent-id", input.parentId);
14920
+ pushOptional(args, "--request-depth", input.requestDepth);
14921
+ pushOptional(args, "--billing-code", input.billingCode);
14922
+ if (Array.isArray(input.labelIds)) {
14923
+ for (const labelId of input.labelIds) args.push("--label-id", String(labelId));
14924
+ }
14925
+ return args;
14926
+ }
14867
14927
  case "issue.get":
14868
14928
  return ["issue", "get", requiredAnyString(input, ["issue", "issueId"])];
14869
14929
  case "issue.list": {
@@ -16141,7 +16201,7 @@ var ISSUE_PASSIVE_FOLLOWUP_PROMPT_TEMPLATE = `You are agent {{agent.id}} ({{agen
16141
16201
 
16142
16202
  ## Why You Were Woken
16143
16203
 
16144
- The previous run ended without sufficient issue close-out.
16204
+ The previous run ended without sufficient issue close-out. Continue to progress the current issue.
16145
16205
 
16146
16206
  - Origin Run ID: {{context.passiveFollowup.originRunId}}
16147
16207
  - Previous Run ID: {{context.passiveFollowup.previousRunId}}
@@ -16163,7 +16223,7 @@ Reason: {{context.passiveFollowup.reason}}
16163
16223
  {{issue.description}}
16164
16224
 
16165
16225
 
16166
- Before changing the issue, inspect the current issue state and any side effects from the previous run. Then do exactly one close-out action: add a progress comment, mark the issue done, block it with a reason, or hand it off explicitly with explanation.
16226
+ Before changing the issue, continue to progress the current issue, then inspect the current issue state and any side effects from the previous run. Finally, do exactly one close-out action: add a progress comment, mark the issue done, block it with a reason, or hand it off explicitly with explanation.
16167
16227
  ${ISSUE_ASSIGNEE_EXECUTION_RAIL}`;
16168
16228
  var RUDDER_AGENT_OPERATING_CONTRACT = [
16169
16229
  "# Rudder Agent Operating Contract",