@rudderhq/cli 0.3.6-canary.0 → 0.3.6-canary.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.
- package/dist/index.js +371 -20
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1768,7 +1768,7 @@ var init_agent = __esm({
|
|
|
1768
1768
|
|
|
1769
1769
|
// ../packages/shared/dist/validators/agent-integration.js
|
|
1770
1770
|
import { z as z13 } from "zod";
|
|
1771
|
-
var agentIntegrationProviderSchema, agentIntegrationStatusSchema, agentIntegrationTransportSchema, agentIntegrationProviderRegionSchema, agentIntegrationChatTypeSchema, agentIntegrationDropReasonSchema, agentIntegrationOutboundStatusSchema, createAgentIntegrationSchema;
|
|
1771
|
+
var agentIntegrationProviderSchema, agentIntegrationStatusSchema, agentIntegrationTransportSchema, agentIntegrationProviderRegionSchema, agentIntegrationChatTypeSchema, agentIntegrationDropReasonSchema, agentIntegrationOutboundStatusSchema, createAgentIntegrationSchema, feishuEventHeaderSchema, feishuSenderIdSchema, feishuMessageMentionSchema, feishuMessageSchema, feishuEventSchema, mockFeishuInboundEventSchema;
|
|
1772
1772
|
var init_agent_integration = __esm({
|
|
1773
1773
|
"../packages/shared/dist/validators/agent-integration.js"() {
|
|
1774
1774
|
"use strict";
|
|
@@ -1792,6 +1792,52 @@ var init_agent_integration = __esm({
|
|
|
1792
1792
|
installerUserId: z13.string().min(1).optional().nullable(),
|
|
1793
1793
|
manageUrl: z13.string().url().optional().nullable()
|
|
1794
1794
|
});
|
|
1795
|
+
feishuEventHeaderSchema = z13.object({
|
|
1796
|
+
event_id: z13.string().min(1).optional(),
|
|
1797
|
+
app_id: z13.string().min(1).optional(),
|
|
1798
|
+
create_time: z13.string().min(1).optional()
|
|
1799
|
+
}).passthrough();
|
|
1800
|
+
feishuSenderIdSchema = z13.object({
|
|
1801
|
+
open_id: z13.string().min(1).optional(),
|
|
1802
|
+
union_id: z13.string().min(1).optional()
|
|
1803
|
+
}).passthrough();
|
|
1804
|
+
feishuMessageMentionSchema = z13.object({
|
|
1805
|
+
key: z13.string().optional(),
|
|
1806
|
+
id: feishuSenderIdSchema.optional()
|
|
1807
|
+
}).passthrough();
|
|
1808
|
+
feishuMessageSchema = z13.object({
|
|
1809
|
+
message_id: z13.string().min(1).optional(),
|
|
1810
|
+
chat_id: z13.string().min(1).optional(),
|
|
1811
|
+
chat_type: agentIntegrationChatTypeSchema.optional(),
|
|
1812
|
+
message_type: z13.string().min(1).optional(),
|
|
1813
|
+
content: z13.string().optional(),
|
|
1814
|
+
mentions: z13.array(feishuMessageMentionSchema).optional(),
|
|
1815
|
+
parent_id: z13.string().min(1).optional().nullable()
|
|
1816
|
+
}).passthrough();
|
|
1817
|
+
feishuEventSchema = z13.object({
|
|
1818
|
+
sender: z13.object({
|
|
1819
|
+
sender_id: feishuSenderIdSchema.optional()
|
|
1820
|
+
}).passthrough().optional(),
|
|
1821
|
+
message: feishuMessageSchema.optional()
|
|
1822
|
+
}).passthrough();
|
|
1823
|
+
mockFeishuInboundEventSchema = z13.object({
|
|
1824
|
+
eventId: z13.string().min(1).optional(),
|
|
1825
|
+
appId: z13.string().min(1).optional(),
|
|
1826
|
+
botOpenId: z13.string().min(1).optional().nullable(),
|
|
1827
|
+
chatId: z13.string().min(1).optional(),
|
|
1828
|
+
chatType: agentIntegrationChatTypeSchema.optional(),
|
|
1829
|
+
messageId: z13.string().min(1).optional(),
|
|
1830
|
+
senderOpenId: z13.string().min(1).optional(),
|
|
1831
|
+
senderUnionId: z13.string().min(1).optional().nullable(),
|
|
1832
|
+
body: z13.string().optional(),
|
|
1833
|
+
commandBody: z13.string().optional(),
|
|
1834
|
+
addressedToBot: z13.boolean().optional(),
|
|
1835
|
+
messageType: z13.string().min(1).optional(),
|
|
1836
|
+
parentMessageId: z13.string().min(1).optional().nullable(),
|
|
1837
|
+
receivedAt: z13.string().datetime().optional(),
|
|
1838
|
+
header: feishuEventHeaderSchema.optional(),
|
|
1839
|
+
event: feishuEventSchema.optional()
|
|
1840
|
+
}).passthrough();
|
|
1795
1841
|
}
|
|
1796
1842
|
});
|
|
1797
1843
|
|
|
@@ -8373,6 +8419,26 @@ function formatAgentCliCapabilitiesHumanReadable(capabilities = getAgentCliCapab
|
|
|
8373
8419
|
return lines.join("\n").trimEnd();
|
|
8374
8420
|
}
|
|
8375
8421
|
|
|
8422
|
+
// src/commands/client/help.ts
|
|
8423
|
+
function formatExamplesAndCautions(notes) {
|
|
8424
|
+
const sections = [];
|
|
8425
|
+
if (notes.examples?.length) {
|
|
8426
|
+
sections.push(["Examples:", ...notes.examples.map(formatHelpExample)].join("\n"));
|
|
8427
|
+
}
|
|
8428
|
+
if (notes.cautions?.length) {
|
|
8429
|
+
sections.push(["Cautions:", ...notes.cautions.map((caution) => ` - ${caution}`)].join("\n"));
|
|
8430
|
+
}
|
|
8431
|
+
return sections.length > 0 ? `
|
|
8432
|
+
${sections.join("\n\n")}` : "";
|
|
8433
|
+
}
|
|
8434
|
+
function formatHelpExample(example) {
|
|
8435
|
+
if (typeof example === "string") {
|
|
8436
|
+
return ` ${example}`;
|
|
8437
|
+
}
|
|
8438
|
+
return ` ${example.description}
|
|
8439
|
+
${example.command}`;
|
|
8440
|
+
}
|
|
8441
|
+
|
|
8376
8442
|
// src/commands/client/agent.ts
|
|
8377
8443
|
var __moduleDir = path10.dirname(fileURLToPath3(import.meta.url));
|
|
8378
8444
|
function codexSkillsHome() {
|
|
@@ -8689,7 +8755,22 @@ function registerAgentCommands(program) {
|
|
|
8689
8755
|
})
|
|
8690
8756
|
);
|
|
8691
8757
|
addCommonClientOptions(
|
|
8692
|
-
skills.command("enable").description(getAgentCliCapabilityById("agent.skills.enable").description).argument("<agentId>", "Agent ID").argument("<selectionRefs...>", "Skill selection refs to enable").
|
|
8758
|
+
skills.command("enable").description(getAgentCliCapabilityById("agent.skills.enable").description).argument("<agentId>", "Agent ID").argument("<selectionRefs...>", "Skill selection refs to enable").addHelpText("after", formatExamplesAndCautions({
|
|
8759
|
+
examples: [
|
|
8760
|
+
{
|
|
8761
|
+
description: "Add skills while preserving the agent's existing enabled set:",
|
|
8762
|
+
command: "rudder agent skills enable <agent-id> rudder/rudder local/abc123/custom-skill"
|
|
8763
|
+
},
|
|
8764
|
+
{
|
|
8765
|
+
description: "Enable one newly created private skill and inspect the resulting snapshot:",
|
|
8766
|
+
command: "rudder agent skills enable <agent-id> <selection-ref> --json"
|
|
8767
|
+
}
|
|
8768
|
+
],
|
|
8769
|
+
cautions: [
|
|
8770
|
+
"This is additive and preserves existing enabled optional skills.",
|
|
8771
|
+
"After creating or copying a private skill, enable it before claiming future runs will load it."
|
|
8772
|
+
]
|
|
8773
|
+
})).action(async (agentId, selectionRefs, opts) => {
|
|
8693
8774
|
try {
|
|
8694
8775
|
const ctx = resolveCommandContext(opts);
|
|
8695
8776
|
const snapshot = await ctx.api.post(`/api/agents/${agentId}/skills/enable`, {
|
|
@@ -8705,7 +8786,22 @@ function registerAgentCommands(program) {
|
|
|
8705
8786
|
skills.command("sync").description(getAgentCliCapabilityById("agent.skills.sync").description).argument("<agentId>", "Agent ID").requiredOption(
|
|
8706
8787
|
"--desired-skills <csv>",
|
|
8707
8788
|
"Comma-separated desired skill refs (for example rudder/rudder)"
|
|
8708
|
-
).
|
|
8789
|
+
).addHelpText("after", formatExamplesAndCautions({
|
|
8790
|
+
examples: [
|
|
8791
|
+
{
|
|
8792
|
+
description: "Replace the optional enabled set with an explicitly preserved CSV:",
|
|
8793
|
+
command: 'rudder agent skills sync <agent-id> --desired-skills "rudder/rudder,local/abc123/custom-skill"'
|
|
8794
|
+
},
|
|
8795
|
+
{
|
|
8796
|
+
description: "Clear optional skills only when that is the intended final state:",
|
|
8797
|
+
command: 'rudder agent skills sync <agent-id> --desired-skills "" --json'
|
|
8798
|
+
}
|
|
8799
|
+
],
|
|
8800
|
+
cautions: [
|
|
8801
|
+
"Sync replaces the full optional enabled-skill set; use enable for additive changes.",
|
|
8802
|
+
"Preserve every existing desired skill in the CSV unless you intentionally want to disable it."
|
|
8803
|
+
]
|
|
8804
|
+
})).action(async (agentId, opts) => {
|
|
8709
8805
|
try {
|
|
8710
8806
|
const ctx = resolveCommandContext(opts);
|
|
8711
8807
|
const snapshot = await ctx.api.post(`/api/agents/${agentId}/skills/sync`, {
|
|
@@ -8994,7 +9090,22 @@ function registerApprovalCommands(program) {
|
|
|
8994
9090
|
{ includeCompany: false }
|
|
8995
9091
|
);
|
|
8996
9092
|
addCommonClientOptions(
|
|
8997
|
-
approval.command("approve").description("Approve an approval request").argument("<approvalId>", "Approval ID").option("--decision-note <text>", "Decision note").option("--decided-by-user-id <id>", "Decision actor user ID").
|
|
9093
|
+
approval.command("approve").description("Approve an approval request").argument("<approvalId>", "Approval ID").option("--decision-note <text>", "Decision note").option("--decided-by-user-id <id>", "Decision actor user ID").addHelpText("after", formatExamplesAndCautions({
|
|
9094
|
+
examples: [
|
|
9095
|
+
{
|
|
9096
|
+
description: "Read the approval payload before deciding:",
|
|
9097
|
+
command: "rudder approval get <approval-id> --json"
|
|
9098
|
+
},
|
|
9099
|
+
{
|
|
9100
|
+
description: "Record the durable approval decision with concise context:",
|
|
9101
|
+
command: 'rudder approval approve <approval-id> --decision-note "Approved after reviewing linked issues" --json'
|
|
9102
|
+
}
|
|
9103
|
+
],
|
|
9104
|
+
cautions: [
|
|
9105
|
+
"Read the approval and linked issues before approving; this is a governed mutation.",
|
|
9106
|
+
"approval approve/reject use --decision-note, while approval comment uses --body-file."
|
|
9107
|
+
]
|
|
9108
|
+
})).action(async (approvalId, opts) => {
|
|
8998
9109
|
try {
|
|
8999
9110
|
const ctx = resolveCommandContext(opts);
|
|
9000
9111
|
const payload = resolveApprovalSchema.parse({
|
|
@@ -9053,7 +9164,22 @@ function registerApprovalCommands(program) {
|
|
|
9053
9164
|
})
|
|
9054
9165
|
);
|
|
9055
9166
|
addCommonClientOptions(
|
|
9056
|
-
approval.command("comment").description(getAgentCliCapabilityById("approval.comment").description).argument("<approvalId>", "Approval ID").option("--body-file <path>", "Read comment body from a file, or '-' for stdin").
|
|
9167
|
+
approval.command("comment").description(getAgentCliCapabilityById("approval.comment").description).argument("<approvalId>", "Approval ID").option("--body-file <path>", "Read comment body from a file, or '-' for stdin").addHelpText("after", formatExamplesAndCautions({
|
|
9168
|
+
examples: [
|
|
9169
|
+
{
|
|
9170
|
+
description: "Add a longer Markdown discussion note without deciding:",
|
|
9171
|
+
command: "rudder approval comment <approval-id> --body-file ./approval-note.md --json"
|
|
9172
|
+
},
|
|
9173
|
+
{
|
|
9174
|
+
description: "Ask a short follow-up from stdin:",
|
|
9175
|
+
command: "printf '%s\\n' 'Need one more linked issue checked.' | rudder approval comment <approval-id> --body-file -"
|
|
9176
|
+
}
|
|
9177
|
+
],
|
|
9178
|
+
cautions: [
|
|
9179
|
+
"Comments do not approve or reject; use approve/reject/request-revision for the durable decision.",
|
|
9180
|
+
"Use --body-file for multiline Markdown. Do not pass decision notes here."
|
|
9181
|
+
]
|
|
9182
|
+
})).action(async (approvalId, opts) => {
|
|
9057
9183
|
try {
|
|
9058
9184
|
const ctx = resolveCommandContext(opts);
|
|
9059
9185
|
const body = await resolveBodyFile(opts.bodyFile);
|
|
@@ -9345,7 +9471,22 @@ function registerAutomationCommands(program) {
|
|
|
9345
9471
|
})
|
|
9346
9472
|
);
|
|
9347
9473
|
addCommonClientOptions(
|
|
9348
|
-
automation.command("run").description(getAgentCliCapabilityById("automation.run").description).argument("<automationId>", "Automation ID").option("--trigger-id <id>", "Trigger ID").option("--payload <json>", "Manual run payload JSON").option("--idempotency-key <key>", "Idempotency key").option("--source <source>", "Run source", "manual").
|
|
9474
|
+
automation.command("run").description(getAgentCliCapabilityById("automation.run").description).argument("<automationId>", "Automation ID").option("--trigger-id <id>", "Trigger ID").option("--payload <json>", "Manual run payload JSON").option("--idempotency-key <key>", "Idempotency key").option("--source <source>", "Run source", "manual").addHelpText("after", formatExamplesAndCautions({
|
|
9475
|
+
examples: [
|
|
9476
|
+
{
|
|
9477
|
+
description: "Run a verified automation manually with an explicit payload:",
|
|
9478
|
+
command: `rudder automation run <automation-id> --payload '{"manual":true}' --json`
|
|
9479
|
+
},
|
|
9480
|
+
{
|
|
9481
|
+
description: "Retry a trigger-specific smoke run with duplicate protection:",
|
|
9482
|
+
command: "rudder automation run <automation-id> --trigger-id <trigger-id> --idempotency-key zst-123-smoke"
|
|
9483
|
+
}
|
|
9484
|
+
],
|
|
9485
|
+
cautions: [
|
|
9486
|
+
"Confirm the automation and trigger target before running; manual runs can create tracked issues or chats.",
|
|
9487
|
+
"Use an idempotency key for retried manual invocations so duplicate work is easier to detect."
|
|
9488
|
+
]
|
|
9489
|
+
})).action(async (automationId, opts) => {
|
|
9349
9490
|
try {
|
|
9350
9491
|
const ctx = resolveCommandContext(opts);
|
|
9351
9492
|
const payload = runAutomationSchema.parse({
|
|
@@ -9535,7 +9676,22 @@ function registerChatCommands(program) {
|
|
|
9535
9676
|
})
|
|
9536
9677
|
);
|
|
9537
9678
|
addCommonClientOptions(
|
|
9538
|
-
chat.command("read").description(getAgentCliCapabilityById("chat.read").description).argument("<chatId>", "Chat conversation ID").option("--include-transcript", "Include assistant transcript entries").option("--include-output", "Alias for --include-transcript").option("--include-outputs", "Alias for --include-transcript").option("--limit <n>", "Maximum recent messages", "20").option("--turn-limit <n>", "Alias for --limit for chat turn snapshots").option("--cursor <cursor>", "Stable message cursor returned in page.nextCursor").option("--max-output-chars <n>", "Maximum transcript output chars for human output", "1200").
|
|
9679
|
+
chat.command("read").description(getAgentCliCapabilityById("chat.read").description).argument("<chatId>", "Chat conversation ID").option("--include-transcript", "Include assistant transcript entries").option("--include-output", "Alias for --include-transcript").option("--include-outputs", "Alias for --include-transcript").option("--limit <n>", "Maximum recent messages", "20").option("--turn-limit <n>", "Alias for --limit for chat turn snapshots").option("--cursor <cursor>", "Stable message cursor returned in page.nextCursor").option("--max-output-chars <n>", "Maximum transcript output chars for human output", "1200").addHelpText("after", formatExamplesAndCautions({
|
|
9680
|
+
examples: [
|
|
9681
|
+
{
|
|
9682
|
+
description: "Read a bounded conversation page with transcript output when needed:",
|
|
9683
|
+
command: "rudder chat read <chat-id> --turn-limit 20 --include-output"
|
|
9684
|
+
},
|
|
9685
|
+
{
|
|
9686
|
+
description: "Continue from a stable cursor in scripts:",
|
|
9687
|
+
command: "rudder chat read <chat-id> --cursor <nextCursor> --json"
|
|
9688
|
+
}
|
|
9689
|
+
],
|
|
9690
|
+
cautions: [
|
|
9691
|
+
"Read bounded pages first; long chats can include large transcript payloads.",
|
|
9692
|
+
"Use --include-output only when transcript output is needed for diagnosis."
|
|
9693
|
+
]
|
|
9694
|
+
})).action(async (chatId, opts) => {
|
|
9539
9695
|
try {
|
|
9540
9696
|
const ctx = resolveCommandContext(opts);
|
|
9541
9697
|
const [conversation, page] = await Promise.all([
|
|
@@ -9583,7 +9739,22 @@ function registerChatCommands(program) {
|
|
|
9583
9739
|
{ includeCompany: false }
|
|
9584
9740
|
);
|
|
9585
9741
|
addCommonClientOptions(
|
|
9586
|
-
chat.command("send").description(getAgentCliCapabilityById("chat.send").description).argument("<chatId>", "Chat conversation ID").option("--body <text>", "Message body").option("--edit-user-message-id <id>", "Regenerate/edit from a prior user message").
|
|
9742
|
+
chat.command("send").description(getAgentCliCapabilityById("chat.send").description).argument("<chatId>", "Chat conversation ID").option("--body <text>", "Message body").option("--edit-user-message-id <id>", "Regenerate/edit from a prior user message").addHelpText("after", formatExamplesAndCautions({
|
|
9743
|
+
examples: [
|
|
9744
|
+
{
|
|
9745
|
+
description: "Append a short agent-authored status note:",
|
|
9746
|
+
command: 'rudder chat send <chat-id> --body "Status: validation is running"'
|
|
9747
|
+
},
|
|
9748
|
+
{
|
|
9749
|
+
description: "Send a longer or multiline note through stdin:",
|
|
9750
|
+
command: "printf '%s\\n' 'Multiline note' | rudder chat send <chat-id>"
|
|
9751
|
+
}
|
|
9752
|
+
],
|
|
9753
|
+
cautions: [
|
|
9754
|
+
"chat send accepts --body or stdin; it does not support --body-file.",
|
|
9755
|
+
"Agent-authenticated sends append an agent-authored message and do not start a new assistant reply."
|
|
9756
|
+
]
|
|
9757
|
+
})).action(async (chatId, opts) => {
|
|
9587
9758
|
try {
|
|
9588
9759
|
const ctx = resolveCommandContext(opts);
|
|
9589
9760
|
const body = opts.body ?? await readStdin();
|
|
@@ -11177,7 +11348,22 @@ function registerIssueCommands(program) {
|
|
|
11177
11348
|
})
|
|
11178
11349
|
);
|
|
11179
11350
|
addCommonClientOptions(
|
|
11180
|
-
issue.command("comment").description(getAgentCliCapabilityById("issue.comment").description).argument("<issueId>", "Issue ID").option("--body-file <path>", "Read comment body from a file, or '-' for stdin").option("--image <path>", "Image file to upload and append to the comment; may be repeated", collectImagePath, []).option("--reopen", "Reopen if issue is done/cancelled").
|
|
11351
|
+
issue.command("comment").description(getAgentCliCapabilityById("issue.comment").description).argument("<issueId>", "Issue ID").option("--body-file <path>", "Read comment body from a file, or '-' for stdin").option("--image <path>", "Image file to upload and append to the comment; may be repeated", collectImagePath, []).option("--reopen", "Reopen if issue is done/cancelled").addHelpText("after", formatExamplesAndCautions({
|
|
11352
|
+
examples: [
|
|
11353
|
+
{
|
|
11354
|
+
description: "Progress update with attached screenshot evidence:",
|
|
11355
|
+
command: "rudder issue comment ZST-123 --body-file ./progress.md --image ./screenshot.png --json"
|
|
11356
|
+
},
|
|
11357
|
+
{
|
|
11358
|
+
description: "Short stdin status when a separate file is unnecessary:",
|
|
11359
|
+
command: "printf '%s\\n' 'Short status' | rudder issue comment ZST-123 --body-file -"
|
|
11360
|
+
}
|
|
11361
|
+
],
|
|
11362
|
+
cautions: [
|
|
11363
|
+
"Use --body-file for multiline Markdown; the old --body option is intentionally rejected.",
|
|
11364
|
+
"Attach local visual evidence with --image instead of leaving only a filesystem path in the comment."
|
|
11365
|
+
]
|
|
11366
|
+
})).action(async (issueId, opts) => {
|
|
11181
11367
|
try {
|
|
11182
11368
|
const ctx = resolveCommandContext(opts);
|
|
11183
11369
|
const bodyText = await resolveFileTextInput({
|
|
@@ -11205,7 +11391,22 @@ function registerIssueCommands(program) {
|
|
|
11205
11391
|
issue.command("review").description(getAgentCliCapabilityById("issue.review").description).argument("<issueId>", "Issue ID").requiredOption(
|
|
11206
11392
|
"--decision <decision>",
|
|
11207
11393
|
"Review decision: approve, request_changes, needs_followup, or blocked"
|
|
11208
|
-
).option("--comment-file <path>", "Read required review comment from a file, or '-' for stdin").
|
|
11394
|
+
).option("--comment-file <path>", "Read required review comment from a file, or '-' for stdin").addHelpText("after", formatExamplesAndCautions({
|
|
11395
|
+
examples: [
|
|
11396
|
+
{
|
|
11397
|
+
description: "Return implementation work with durable review feedback:",
|
|
11398
|
+
command: "rudder issue review ZST-123 --decision request_changes --comment-file ./review.md --json"
|
|
11399
|
+
},
|
|
11400
|
+
{
|
|
11401
|
+
description: "Approve after reading the issue evidence and validation:",
|
|
11402
|
+
command: "rudder issue review ZST-123 --decision approve --comment-file ./review.md"
|
|
11403
|
+
}
|
|
11404
|
+
],
|
|
11405
|
+
cautions: [
|
|
11406
|
+
"Free-form comments are not durable review decisions; use this command for approve/request_changes/etc.",
|
|
11407
|
+
"Approving an implementation issue can move it to done, so use request_changes when returning it for fixes."
|
|
11408
|
+
]
|
|
11409
|
+
})).action(async (issueId, opts) => {
|
|
11209
11410
|
try {
|
|
11210
11411
|
const ctx = resolveCommandContext(opts);
|
|
11211
11412
|
const decision = parseReviewDecision(opts.decision);
|
|
@@ -11245,7 +11446,22 @@ function registerIssueCommands(program) {
|
|
|
11245
11446
|
})
|
|
11246
11447
|
);
|
|
11247
11448
|
addCommonClientOptions(
|
|
11248
|
-
issue.command("done").description(getAgentCliCapabilityById("issue.done").description).argument("<issueId>", "Issue ID").option("--comment-file <path>", "Read required completion comment from a file, or '-' for stdin").option("--image <path>", "Image file to upload and append to the completion comment; may be repeated", collectImagePath, []).
|
|
11449
|
+
issue.command("done").description(getAgentCliCapabilityById("issue.done").description).argument("<issueId>", "Issue ID").option("--comment-file <path>", "Read required completion comment from a file, or '-' for stdin").option("--image <path>", "Image file to upload and append to the completion comment; may be repeated", collectImagePath, []).addHelpText("after", formatExamplesAndCautions({
|
|
11450
|
+
examples: [
|
|
11451
|
+
{
|
|
11452
|
+
description: "Close out with validation summary and visual evidence:",
|
|
11453
|
+
command: "rudder issue done ZST-123 --comment-file ./done.md --image ./screenshot.png --json"
|
|
11454
|
+
},
|
|
11455
|
+
{
|
|
11456
|
+
description: "Read the completion note from stdin in scripts:",
|
|
11457
|
+
command: "rudder issue done ZST-123 --comment-file - < ./done.md"
|
|
11458
|
+
}
|
|
11459
|
+
],
|
|
11460
|
+
cautions: [
|
|
11461
|
+
"Include validation evidence and commit/push status in the completion comment.",
|
|
11462
|
+
"If the server reports a run ownership conflict, stop and inspect the issue/run instead of retrying blindly."
|
|
11463
|
+
]
|
|
11464
|
+
})).action(async (issueId, opts) => {
|
|
11249
11465
|
try {
|
|
11250
11466
|
const ctx = resolveCommandContext(opts);
|
|
11251
11467
|
const commentText = await resolveFileTextInput({
|
|
@@ -11624,7 +11840,22 @@ function registerLibraryCommands(program) {
|
|
|
11624
11840
|
{ includeCompany: true }
|
|
11625
11841
|
);
|
|
11626
11842
|
addCommonClientOptions(
|
|
11627
|
-
file.command("ref").description(getAgentCliCapabilityById("library.file.ref").description).argument("<filePath>", "Library file path").
|
|
11843
|
+
file.command("ref").description(getAgentCliCapabilityById("library.file.ref").description).argument("<filePath>", "Library file path").addHelpText("after", formatExamplesAndCautions({
|
|
11844
|
+
examples: [
|
|
11845
|
+
{
|
|
11846
|
+
description: "Return the renderable Markdown link for a known Library file:",
|
|
11847
|
+
command: "rudder library file ref projects/rudder/proposals/plan.md --json"
|
|
11848
|
+
},
|
|
11849
|
+
{
|
|
11850
|
+
description: "Reference a file under the current project Library path:",
|
|
11851
|
+
command: 'rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/proposals/plan.md" --json'
|
|
11852
|
+
}
|
|
11853
|
+
],
|
|
11854
|
+
cautions: [
|
|
11855
|
+
"Pass the Library-relative path, not an absolute filesystem path.",
|
|
11856
|
+
"Use the returned markdownLink in issue comments instead of hand-writing library-entry URLs."
|
|
11857
|
+
]
|
|
11858
|
+
})).action(async (filePath, opts) => {
|
|
11628
11859
|
try {
|
|
11629
11860
|
await printLibraryFileReference(filePath, opts);
|
|
11630
11861
|
} catch (err) {
|
|
@@ -11634,7 +11865,22 @@ function registerLibraryCommands(program) {
|
|
|
11634
11865
|
{ includeCompany: true }
|
|
11635
11866
|
);
|
|
11636
11867
|
addCommonClientOptions(
|
|
11637
|
-
file.command("put").description(getAgentCliCapabilityById("library.file.put").description).argument("<filePath>", "Library file path").option("--body-file <path>", "Read file content from a file, or '-' for stdin").
|
|
11868
|
+
file.command("put").description(getAgentCliCapabilityById("library.file.put").description).argument("<filePath>", "Library file path").option("--body-file <path>", "Read file content from a file, or '-' for stdin").addHelpText("after", formatExamplesAndCautions({
|
|
11869
|
+
examples: [
|
|
11870
|
+
{
|
|
11871
|
+
description: "Upload a durable Markdown artifact from a local file:",
|
|
11872
|
+
command: "rudder library file put projects/rudder/proposals/plan.md --body-file ./plan.md --json"
|
|
11873
|
+
},
|
|
11874
|
+
{
|
|
11875
|
+
description: "Write a small generated artifact from stdin:",
|
|
11876
|
+
command: "printf '%s\\n' '# Plan' | rudder library file put projects/rudder/proposals/plan.md --body-file -"
|
|
11877
|
+
}
|
|
11878
|
+
],
|
|
11879
|
+
cautions: [
|
|
11880
|
+
"Use --body-file for content; the old --body option is intentionally rejected.",
|
|
11881
|
+
"For local trusted runs, prefer writing durable files under the project Library root, then use file ref for the renderable link."
|
|
11882
|
+
]
|
|
11883
|
+
})).action(async (filePath, opts) => {
|
|
11638
11884
|
try {
|
|
11639
11885
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
11640
11886
|
const body = await resolveBodyFileInput(opts.bodyFile);
|
|
@@ -11921,7 +12167,22 @@ function registerProjectCommands(program) {
|
|
|
11921
12167
|
{ includeCompany: false }
|
|
11922
12168
|
);
|
|
11923
12169
|
addCommonClientOptions(
|
|
11924
|
-
project.command("create").description(getAgentCliCapabilityById("project.create").description).option("-O, --org-id <id>", "Organization ID").requiredOption("--name <name>", "Project name").option("--description <text>", "Project description").option("--status <status>", "Project status").option("--goal-id <id>", "Primary goal ID").option("--goal-ids <csv>", "Comma-separated goal IDs").option("--lead-agent-id <id>", "Lead agent ID").option("--target-date <date>", "Target date").option("--color <value>", "Project color or supported gradient token").
|
|
12170
|
+
project.command("create").description(getAgentCliCapabilityById("project.create").description).option("-O, --org-id <id>", "Organization ID").requiredOption("--name <name>", "Project name").option("--description <text>", "Project description").option("--status <status>", "Project status").option("--goal-id <id>", "Primary goal ID").option("--goal-ids <csv>", "Comma-separated goal IDs").option("--lead-agent-id <id>", "Lead agent ID").option("--target-date <date>", "Target date").option("--color <value>", "Project color or supported gradient token").addHelpText("after", formatExamplesAndCautions({
|
|
12171
|
+
examples: [
|
|
12172
|
+
{
|
|
12173
|
+
description: "Create a new active workstream after confirming it does not already exist:",
|
|
12174
|
+
command: 'rudder project create --org-id <org-id> --name "Rudder dev" --status in_progress --json'
|
|
12175
|
+
},
|
|
12176
|
+
{
|
|
12177
|
+
description: "Create a project tied to a goal and responsible agent:",
|
|
12178
|
+
command: 'rudder project create --org-id <org-id> --name "Release" --goal-id <goal-id> --lead-agent-id <agent-id>'
|
|
12179
|
+
}
|
|
12180
|
+
],
|
|
12181
|
+
cautions: [
|
|
12182
|
+
"Project mutations are organization-scoped; pass --org-id when context might be ambiguous.",
|
|
12183
|
+
"Use existing project IDs/shortnames for updates instead of creating duplicate project containers."
|
|
12184
|
+
]
|
|
12185
|
+
})).action(async (opts) => {
|
|
11925
12186
|
try {
|
|
11926
12187
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
11927
12188
|
const payload = createProjectSchema.parse({
|
|
@@ -11943,7 +12204,22 @@ function registerProjectCommands(program) {
|
|
|
11943
12204
|
{ includeCompany: false }
|
|
11944
12205
|
);
|
|
11945
12206
|
addCommonClientOptions(
|
|
11946
|
-
project.command("update").description(getAgentCliCapabilityById("project.update").description).argument("<projectIdOrShortname>", "Project ID or shortname").option("-O, --org-id <id>", "Organization ID for shortname resolution").option("--name <name>", "Project name").option("--description <text>", "Project description").option("--status <status>", "Project status").option("--goal-id <id>", "Primary goal ID").option("--goal-ids <csv>", "Comma-separated goal IDs").option("--lead-agent-id <id>", "Lead agent ID").option("--target-date <date>", "Target date").option("--color <value>", "Project color or supported gradient token").option("--archived-at <iso8601|null>", "Set archivedAt timestamp or literal 'null'").
|
|
12207
|
+
project.command("update").description(getAgentCliCapabilityById("project.update").description).argument("<projectIdOrShortname>", "Project ID or shortname").option("-O, --org-id <id>", "Organization ID for shortname resolution").option("--name <name>", "Project name").option("--description <text>", "Project description").option("--status <status>", "Project status").option("--goal-id <id>", "Primary goal ID").option("--goal-ids <csv>", "Comma-separated goal IDs").option("--lead-agent-id <id>", "Lead agent ID").option("--target-date <date>", "Target date").option("--color <value>", "Project color or supported gradient token").option("--archived-at <iso8601|null>", "Set archivedAt timestamp or literal 'null'").addHelpText("after", formatExamplesAndCautions({
|
|
12208
|
+
examples: [
|
|
12209
|
+
{
|
|
12210
|
+
description: "Move a known project shortname under the intended org:",
|
|
12211
|
+
command: "rudder project update rudder-dev --org-id <org-id> --status in_progress --json"
|
|
12212
|
+
},
|
|
12213
|
+
{
|
|
12214
|
+
description: "Unarchive a verified project id:",
|
|
12215
|
+
command: "rudder project update <project-id> --archived-at null"
|
|
12216
|
+
}
|
|
12217
|
+
],
|
|
12218
|
+
cautions: [
|
|
12219
|
+
"Shortname resolution needs the intended organization; include --org-id for cross-org local contexts.",
|
|
12220
|
+
"Archiving and unarchiving changes project visibility, so verify the target with project get first."
|
|
12221
|
+
]
|
|
12222
|
+
})).action(async (projectRef, opts) => {
|
|
11947
12223
|
try {
|
|
11948
12224
|
const ctx = resolveCommandContext(opts);
|
|
11949
12225
|
const payload = updateProjectSchema.parse({
|
|
@@ -11986,7 +12262,22 @@ function projectPath(projectRef, orgId) {
|
|
|
11986
12262
|
function registerRunsCommands(program) {
|
|
11987
12263
|
const runs = program.command("runs").description("Run debugging operations");
|
|
11988
12264
|
addCommonClientOptions(
|
|
11989
|
-
runs.command("list").description(getAgentCliCapabilityById("runs.list").description).option("-O, --org-id <id>", "Organization ID").option("--updated-after <iso>", "Only runs updated after this timestamp").option("--run-id-prefix <prefix>", "Filter by run ID prefix").option("--agent-id <id>", "Filter by agent ID").option("--status <status>", "Filter by run status").option("--runtime <type>", "Filter by runtime type").option("--issue-id <id>", "Filter by linked issue ID").option("--used-skill <key-or-name>", "Filter by skill actually used during the run").option("--loaded-skill <key-or-name>", "Filter by skill loaded for the run").option("--created-before <iso>", "Only runs created before this timestamp").option("--limit <n>", "Maximum rows", "200").
|
|
12265
|
+
runs.command("list").description(getAgentCliCapabilityById("runs.list").description).option("-O, --org-id <id>", "Organization ID").option("--updated-after <iso>", "Only runs updated after this timestamp").option("--run-id-prefix <prefix>", "Filter by run ID prefix").option("--agent-id <id>", "Filter by agent ID").option("--status <status>", "Filter by run status").option("--runtime <type>", "Filter by runtime type").option("--issue-id <id>", "Filter by linked issue ID").option("--used-skill <key-or-name>", "Filter by skill actually used during the run").option("--loaded-skill <key-or-name>", "Filter by skill loaded for the run").option("--created-before <iso>", "Only runs created before this timestamp").option("--limit <n>", "Maximum rows", "200").addHelpText("after", formatExamplesAndCautions({
|
|
12266
|
+
examples: [
|
|
12267
|
+
{
|
|
12268
|
+
description: "Find recent failures for one agent before opening transcripts:",
|
|
12269
|
+
command: "rudder runs list --org-id <org-id> --agent-id <agent-id> --status failed --limit 20"
|
|
12270
|
+
},
|
|
12271
|
+
{
|
|
12272
|
+
description: "Collect skill-specific evidence for a linked issue:",
|
|
12273
|
+
command: "rudder runs list --org-id <org-id> --issue-id ZST-123 --used-skill release-maintainer --json"
|
|
12274
|
+
}
|
|
12275
|
+
],
|
|
12276
|
+
cautions: [
|
|
12277
|
+
"Filter first by org, agent, issue, status, skill, or time; do not start by dumping broad run history.",
|
|
12278
|
+
"Use runs errors or runs transcript for detail instead of expecting list to return full debug payloads."
|
|
12279
|
+
]
|
|
12280
|
+
})).action(async (opts) => {
|
|
11990
12281
|
try {
|
|
11991
12282
|
assertSingleSkillFilter(opts);
|
|
11992
12283
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
@@ -12051,7 +12342,22 @@ function registerRunsCommands(program) {
|
|
|
12051
12342
|
})
|
|
12052
12343
|
);
|
|
12053
12344
|
addCommonClientOptions(
|
|
12054
|
-
runs.command("transcript").description(getAgentCliCapabilityById("runs.transcript").description).argument("<runId>", "Run ID or short run ID").option("--errors-only", "Show only error transcript rows").option("--around-error <id>", "Show context around a run error id such as step-12").option("--context-turns <n>", "Turns around --around-error", "1").option("--cursor <cursor>", "Stable transcript cursor returned in page.nextCursor").option("--turn-limit <n>", "Maximum turns to return", "20").option("--chronological", "Show oldest-first instead of default newest-first").option("--narrative", "Use a narrative human layout").option("--max-chars <n>", "Maximum output characters per row", "1200").option("--max-output-chars <n>", "Alias for --max-chars").option("--include-output", "Include row output in compact human transcript rows").option("--include-outputs", "Alias for --include-output").
|
|
12345
|
+
runs.command("transcript").description(getAgentCliCapabilityById("runs.transcript").description).argument("<runId>", "Run ID or short run ID").option("--errors-only", "Show only error transcript rows").option("--around-error <id>", "Show context around a run error id such as step-12").option("--context-turns <n>", "Turns around --around-error", "1").option("--cursor <cursor>", "Stable transcript cursor returned in page.nextCursor").option("--turn-limit <n>", "Maximum turns to return", "20").option("--chronological", "Show oldest-first instead of default newest-first").option("--narrative", "Use a narrative human layout").option("--max-chars <n>", "Maximum output characters per row", "1200").option("--max-output-chars <n>", "Alias for --max-chars").option("--include-output", "Include row output in compact human transcript rows").option("--include-outputs", "Alias for --include-output").addHelpText("after", formatExamplesAndCautions({
|
|
12346
|
+
examples: [
|
|
12347
|
+
{
|
|
12348
|
+
description: "Inspect the neighborhood around a failing step:",
|
|
12349
|
+
command: "rudder runs transcript <run-id> --around-error step-12 --context-turns 2"
|
|
12350
|
+
},
|
|
12351
|
+
{
|
|
12352
|
+
description: "Reconstruct a bounded chronological decision trail:",
|
|
12353
|
+
command: "rudder runs transcript <run-id> --chronological --turn-limit 30 --include-output"
|
|
12354
|
+
}
|
|
12355
|
+
],
|
|
12356
|
+
cautions: [
|
|
12357
|
+
"Human output is compact and clipped by default; use --json only when a script needs the full payload.",
|
|
12358
|
+
"Use --around-error from runs errors when investigating a failure instead of reading the entire run first."
|
|
12359
|
+
]
|
|
12360
|
+
})).action(async (runId, opts) => {
|
|
12055
12361
|
try {
|
|
12056
12362
|
const ctx = resolveCommandContext(opts);
|
|
12057
12363
|
const payload = await ctx.api.get(
|
|
@@ -12070,7 +12376,22 @@ function registerRunsCommands(program) {
|
|
|
12070
12376
|
})
|
|
12071
12377
|
);
|
|
12072
12378
|
addCommonClientOptions(
|
|
12073
|
-
runs.command("errors").description(getAgentCliCapabilityById("runs.errors").description).argument("<runId>", "Run ID or short run ID").option("--max-chars <n>", "Maximum output characters per error", "1200").
|
|
12379
|
+
runs.command("errors").description(getAgentCliCapabilityById("runs.errors").description).argument("<runId>", "Run ID or short run ID").option("--max-chars <n>", "Maximum output characters per error", "1200").addHelpText("after", formatExamplesAndCautions({
|
|
12380
|
+
examples: [
|
|
12381
|
+
{
|
|
12382
|
+
description: "Start failed-run investigation with error summaries:",
|
|
12383
|
+
command: "rudder runs errors <run-id>"
|
|
12384
|
+
},
|
|
12385
|
+
{
|
|
12386
|
+
description: "Increase clipped error output for scripts or reports:",
|
|
12387
|
+
command: "rudder runs errors <run-id> --max-chars 4000 --json"
|
|
12388
|
+
}
|
|
12389
|
+
],
|
|
12390
|
+
cautions: [
|
|
12391
|
+
"Start here for failed runs, then follow the transcript context command returned for the relevant step.",
|
|
12392
|
+
"Increase --max-chars deliberately; large tool outputs can be noisy and expensive to inspect."
|
|
12393
|
+
]
|
|
12394
|
+
})).action(async (runId, opts) => {
|
|
12074
12395
|
try {
|
|
12075
12396
|
const ctx = resolveCommandContext(opts);
|
|
12076
12397
|
const params = new URLSearchParams();
|
|
@@ -12365,7 +12686,22 @@ function registerSkillCommands(program) {
|
|
|
12365
12686
|
{ includeCompany: false }
|
|
12366
12687
|
);
|
|
12367
12688
|
addCommonClientOptions(
|
|
12368
|
-
skill.command("file").description(getAgentCliCapabilityById("skill.file").description).argument("<skillId>", "Skill ID").option("-O, --org-id <id>", "Organization ID").option("--path <path>", "Skill package file path", "SKILL.md").
|
|
12689
|
+
skill.command("file").description(getAgentCliCapabilityById("skill.file").description).argument("<skillId>", "Skill ID").option("-O, --org-id <id>", "Organization ID").option("--path <path>", "Skill package file path", "SKILL.md").addHelpText("after", formatExamplesAndCautions({
|
|
12690
|
+
examples: [
|
|
12691
|
+
{
|
|
12692
|
+
description: "Read the main skill trigger and workflow instructions:",
|
|
12693
|
+
command: "rudder skill file <skill-uuid> --path SKILL.md --org-id <org-id>"
|
|
12694
|
+
},
|
|
12695
|
+
{
|
|
12696
|
+
description: "Inspect a specific reference file in the skill package:",
|
|
12697
|
+
command: "rudder skill file <skill-uuid> --path references/usage.md --json"
|
|
12698
|
+
}
|
|
12699
|
+
],
|
|
12700
|
+
cautions: [
|
|
12701
|
+
"Prefer the skill UUID for slashful keys such as local/<hash>/<slug>.",
|
|
12702
|
+
"Read SKILL.md before assuming a skill's trigger or workflow behavior."
|
|
12703
|
+
]
|
|
12704
|
+
})).action(async (skillId, opts) => {
|
|
12369
12705
|
try {
|
|
12370
12706
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
12371
12707
|
const query = new URLSearchParams({ path: opts.path ?? "SKILL.md" });
|
|
@@ -12380,7 +12716,22 @@ function registerSkillCommands(program) {
|
|
|
12380
12716
|
{ includeCompany: false }
|
|
12381
12717
|
);
|
|
12382
12718
|
addCommonClientOptions(
|
|
12383
|
-
skill.command("import").description(getAgentCliCapabilityById("skill.import").description).option("-O, --org-id <id>", "Organization ID").requiredOption("--source <source>", "Skill source (local path, URL, or repo ref)").
|
|
12719
|
+
skill.command("import").description(getAgentCliCapabilityById("skill.import").description).option("-O, --org-id <id>", "Organization ID").requiredOption("--source <source>", "Skill source (local path, URL, or repo ref)").addHelpText("after", formatExamplesAndCautions({
|
|
12720
|
+
examples: [
|
|
12721
|
+
{
|
|
12722
|
+
description: "Import a durable organization-shared skill package:",
|
|
12723
|
+
command: "rudder skill import --org-id <org-id> --source /abs/path/to/skill --json"
|
|
12724
|
+
},
|
|
12725
|
+
{
|
|
12726
|
+
description: "List imported skills afterward to get stable ids:",
|
|
12727
|
+
command: "rudder skill list --org-id <org-id> --json"
|
|
12728
|
+
}
|
|
12729
|
+
],
|
|
12730
|
+
cautions: [
|
|
12731
|
+
"Import organization-shared skills from durable shared paths, not disposable agent-private work directories.",
|
|
12732
|
+
"Importing a skill does not automatically enable it for every agent; update agent skill selections separately."
|
|
12733
|
+
]
|
|
12734
|
+
})).action(async (opts) => {
|
|
12384
12735
|
try {
|
|
12385
12736
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
12386
12737
|
const payload = organizationSkillImportSchema.parse({ source: opts.source });
|