@rudderhq/cli 0.2.0-canary.26 → 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
@@ -656,7 +656,9 @@ var init_chat = __esm({
656
656
  goalId: z5.string().uuid().optional().nullable(),
657
657
  parentId: z5.string().uuid().optional().nullable(),
658
658
  assigneeAgentId: z5.string().uuid().optional().nullable(),
659
- assigneeUserId: z5.string().trim().optional().nullable()
659
+ assigneeUserId: z5.string().trim().optional().nullable(),
660
+ reviewerAgentId: z5.string().uuid().optional().nullable(),
661
+ reviewerUserId: z5.string().trim().optional().nullable()
660
662
  });
661
663
  convertChatToIssueSchema = z5.object({
662
664
  messageId: z5.string().uuid().optional().nullable(),
@@ -842,7 +844,7 @@ var init_organization_skill = __esm({
842
844
 
843
845
  // ../packages/shared/src/validators/adapter-skills.ts
844
846
  import { z as z7 } from "zod";
845
- var agentSkillStateSchema, agentSkillOriginSchema, agentSkillSourceClassSchema, agentSkillSyncModeSchema, agentSkillEntrySchema, agentSkillSnapshotSchema, agentSkillSyncSchema;
847
+ var agentSkillStateSchema, agentSkillOriginSchema, agentSkillSourceClassSchema, agentSkillSyncModeSchema, agentSkillEntrySchema, agentSkillSnapshotSchema, agentSkillSyncSchema, agentSkillEnableSchema;
846
848
  var init_adapter_skills = __esm({
847
849
  "../packages/shared/src/validators/adapter-skills.ts"() {
848
850
  "use strict";
@@ -905,6 +907,9 @@ var init_adapter_skills = __esm({
905
907
  agentSkillSyncSchema = z7.object({
906
908
  desiredSkills: z7.array(z7.string().min(1))
907
909
  });
910
+ agentSkillEnableSchema = z7.object({
911
+ skills: z7.array(z7.string().min(1)).min(1)
912
+ });
908
913
  }
909
914
  });
910
915
 
@@ -1471,7 +1476,7 @@ var init_project = __esm({
1471
1476
 
1472
1477
  // ../packages/shared/src/validators/issue.ts
1473
1478
  import { z as z13 } from "zod";
1474
- 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;
1475
1480
  var init_issue = __esm({
1476
1481
  "../packages/shared/src/validators/issue.ts"() {
1477
1482
  "use strict";
@@ -1558,6 +1563,14 @@ var init_issue = __esm({
1558
1563
  reopen: z13.boolean().optional(),
1559
1564
  interrupt: z13.boolean().optional()
1560
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
+ });
1561
1574
  linkIssueApprovalSchema = z13.object({
1562
1575
  approvalId: z13.string().uuid()
1563
1576
  });
@@ -9187,6 +9200,18 @@ var AGENT_CLI_CAPABILITIES = [
9187
9200
  requiresRunId: false,
9188
9201
  attachesRunIdWhenAvailable: false
9189
9202
  },
9203
+ {
9204
+ id: "agent.skills.enable",
9205
+ command: "rudder agent skills enable <agent-id> <selection-ref...>",
9206
+ category: "agent",
9207
+ description: "Add skill selections to an agent without replacing existing enabled skills.",
9208
+ mutating: true,
9209
+ contract: "agent-v1",
9210
+ requiresOrgId: false,
9211
+ requiresAgentId: false,
9212
+ requiresRunId: false,
9213
+ attachesRunIdWhenAvailable: true
9214
+ },
9190
9215
  {
9191
9216
  id: "agent.skills.sync",
9192
9217
  command: "rudder agent skills sync <agent-id>",
@@ -9379,6 +9404,18 @@ var AGENT_CLI_CAPABILITIES = [
9379
9404
  requiresRunId: false,
9380
9405
  attachesRunIdWhenAvailable: true
9381
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
+ },
9382
9419
  {
9383
9420
  id: "issue.done",
9384
9421
  command: "rudder issue done <issue> --comment <text> [--image <path>]",
@@ -9467,7 +9504,7 @@ var AGENT_CLI_CAPABILITIES = [
9467
9504
  id: "issue.create",
9468
9505
  command: "rudder issue create --org-id <id> ...",
9469
9506
  category: "issue",
9470
- description: "Create a new issue or subtask with the generic issue surface.",
9507
+ 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.",
9471
9508
  mutating: true,
9472
9509
  contract: "compat",
9473
9510
  requiresOrgId: true,
@@ -9801,6 +9838,25 @@ function registerIssueCommands(program) {
9801
9838
  }
9802
9839
  })
9803
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
+ );
9804
9860
  addCommonClientOptions(
9805
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) => {
9806
9862
  try {
@@ -10129,8 +10185,12 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
10129
10185
  "- Shared organization plans live under `$RUDDER_ORG_PLANS_DIR`.",
10130
10186
  "- Durable shared work output should prefer these managed workspace paths instead of ad-hoc top-level `projects/` folders.",
10131
10187
  "",
10188
+ "When you create or copy a skill under `$AGENT_HOME/skills/<slug>/`, check the agent's Skills snapshot before claiming it will load in future runs. If it is installed but not enabled, say exactly that future runs will not load it until enabled, and offer to enable it with `rudder agent skills enable <agent-id> <selection-ref>` when you have permission.",
10189
+ "",
10132
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.",
10133
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
+ "",
10134
10194
  "## Memory and Planning",
10135
10195
  "",
10136
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.",
@@ -10450,6 +10510,19 @@ function registerAgentCommands(program) {
10450
10510
  })
10451
10511
  );
10452
10512
  const skills = agent.command("skills").description("Agent skill selection operations");
10513
+ addCommonClientOptions(
10514
+ skills.command("enable").description(getAgentCliCapabilityById("agent.skills.enable").description).argument("<agentId>", "Agent ID").argument("<selectionRefs...>", "Skill selection refs to enable").action(async (agentId, selectionRefs, opts) => {
10515
+ try {
10516
+ const ctx = resolveCommandContext(opts);
10517
+ const snapshot = await ctx.api.post(`/api/agents/${agentId}/skills/enable`, {
10518
+ skills: selectionRefs
10519
+ });
10520
+ printOutput(snapshot, { json: ctx.json });
10521
+ } catch (err) {
10522
+ handleCommandError(err);
10523
+ }
10524
+ })
10525
+ );
10453
10526
  addCommonClientOptions(
10454
10527
  skills.command("sync").description(getAgentCliCapabilityById("agent.skills.sync").description).argument("<agentId>", "Agent ID").requiredOption(
10455
10528
  "--desired-skills <csv>",