@rudderhq/cli 0.2.0-canary.27 → 0.2.0-canary.28

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
@@ -1476,7 +1476,7 @@ var init_project = __esm({
1476
1476
 
1477
1477
  // ../packages/shared/src/validators/issue.ts
1478
1478
  import { z as z13 } from "zod";
1479
- var executionWorkspaceStrategySchema2, issueExecutionWorkspaceSettingsSchema, issueAssigneeAdapterOverridesSchema, createIssueSchema, createIssueLabelSchema, updateIssueLabelSchema, updateIssueSchema, reorderIssueSchema, checkoutIssueSchema, addIssueCommentSchema, linkIssueApprovalSchema, createIssueAttachmentMetadataSchema, createIssueWorkspaceAttachmentSchema, ISSUE_DOCUMENT_FORMATS, issueDocumentFormatSchema, issueDocumentKeySchema, upsertIssueDocumentSchema;
1479
+ var executionWorkspaceStrategySchema2, issueExecutionWorkspaceSettingsSchema, issueAssigneeAdapterOverridesSchema, createIssueSchema, createIssueLabelSchema, updateIssueLabelSchema, updateIssueSchema, reorderIssueSchema, checkoutIssueSchema, addIssueCommentSchema, reportIssueCommitSchema, linkIssueApprovalSchema, createIssueAttachmentMetadataSchema, createIssueWorkspaceAttachmentSchema, ISSUE_DOCUMENT_FORMATS, issueDocumentFormatSchema, issueDocumentKeySchema, upsertIssueDocumentSchema;
1480
1480
  var init_issue = __esm({
1481
1481
  "../packages/shared/src/validators/issue.ts"() {
1482
1482
  "use strict";
@@ -1563,6 +1563,14 @@ var init_issue = __esm({
1563
1563
  reopen: z13.boolean().optional(),
1564
1564
  interrupt: z13.boolean().optional()
1565
1565
  });
1566
+ reportIssueCommitSchema = z13.object({
1567
+ sha: z13.string().trim().regex(/^[0-9a-f]{7,64}$/i, "Commit SHA must be 7 to 64 hexadecimal characters"),
1568
+ message: z13.string().trim().min(1).max(500),
1569
+ branch: z13.string().trim().min(1).max(255).optional().nullable(),
1570
+ repoPath: z13.string().trim().min(1).max(2048).optional().nullable(),
1571
+ workspacePath: z13.string().trim().min(1).max(2048).optional().nullable(),
1572
+ commitCount: z13.number().int().positive().max(1e3).optional()
1573
+ });
1566
1574
  linkIssueApprovalSchema = z13.object({
1567
1575
  approvalId: z13.string().uuid()
1568
1576
  });
@@ -9396,6 +9404,18 @@ var AGENT_CLI_CAPABILITIES = [
9396
9404
  requiresRunId: false,
9397
9405
  attachesRunIdWhenAvailable: true
9398
9406
  },
9407
+ {
9408
+ id: "issue.commit",
9409
+ command: "rudder issue commit <issue> --sha <sha> --message <subject>",
9410
+ category: "issue",
9411
+ description: "Report a code commit created during issue work as structured issue activity.",
9412
+ mutating: true,
9413
+ contract: "agent-v1",
9414
+ requiresOrgId: false,
9415
+ requiresAgentId: false,
9416
+ requiresRunId: false,
9417
+ attachesRunIdWhenAvailable: true
9418
+ },
9399
9419
  {
9400
9420
  id: "issue.done",
9401
9421
  command: "rudder issue done <issue> --comment <text> [--image <path>]",
@@ -9818,6 +9838,25 @@ function registerIssueCommands(program) {
9818
9838
  }
9819
9839
  })
9820
9840
  );
9841
+ addCommonClientOptions(
9842
+ issue.command("commit").description(getAgentCliCapabilityById("issue.commit").description).argument("<issueId>", "Issue ID").requiredOption("--sha <sha>", "Commit SHA").requiredOption("--message <subject>", "Commit subject or message").option("--branch <name>", "Branch name").option("--repo-path <path>", "Repository path").option("--workspace-path <path>", "Workspace path").option("--count <n>", "Number of commits represented by this report").action(async (issueId, opts) => {
9843
+ try {
9844
+ const ctx = resolveCommandContext(opts);
9845
+ const payload = reportIssueCommitSchema.parse({
9846
+ sha: opts.sha,
9847
+ message: opts.message,
9848
+ branch: opts.branch,
9849
+ repoPath: opts.repoPath,
9850
+ workspacePath: opts.workspacePath,
9851
+ commitCount: parseOptionalInt(opts.count)
9852
+ });
9853
+ const reported = await ctx.api.post(`/api/issues/${issueId}/commit`, payload);
9854
+ printOutput(reported, { json: ctx.json });
9855
+ } catch (err) {
9856
+ handleCommandError(err);
9857
+ }
9858
+ })
9859
+ );
9821
9860
  addCommonClientOptions(
9822
9861
  issue.command("done").description(getAgentCliCapabilityById("issue.done").description).argument("<issueId>", "Issue ID").requiredOption("--comment <text>", "Required completion comment").option("--image <path>", "Image file to upload and append to the completion comment; may be repeated", collectImagePath, []).action(async (issueId, opts) => {
9823
9862
  try {
@@ -10150,6 +10189,8 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
10150
10189
  "",
10151
10190
  "When you write issue comments or chat replies, match the language of the user's or board's most recent substantive message unless they explicitly ask for a different language.",
10152
10191
  "",
10192
+ "When an issue comment, done comment, or blocker comment cites visual evidence from a local screenshot/image path, attach the image with the Rudder CLI `--image <path>` option instead of leaving only the filesystem path in the text.",
10193
+ "",
10153
10194
  "## Memory and Planning",
10154
10195
  "",
10155
10196
  "You MUST use the `para-memory-files` skill for all memory operations: storing facts, writing daily notes, creating entities, running weekly synthesis, recalling past context, and managing plans. The skill defines your three-layer memory system (knowledge graph, daily notes, tacit knowledge), the PARA folder structure, atomic fact schemas, memory decay rules, and recall/planning conventions.",