@rudderhq/cli 0.3.6-canary.0 → 0.3.6-canary.1
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 +250 -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,19 @@ 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((example) => ` ${example}`)].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
|
+
|
|
8376
8435
|
// src/commands/client/agent.ts
|
|
8377
8436
|
var __moduleDir = path10.dirname(fileURLToPath3(import.meta.url));
|
|
8378
8437
|
function codexSkillsHome() {
|
|
@@ -8689,7 +8748,16 @@ function registerAgentCommands(program) {
|
|
|
8689
8748
|
})
|
|
8690
8749
|
);
|
|
8691
8750
|
addCommonClientOptions(
|
|
8692
|
-
skills.command("enable").description(getAgentCliCapabilityById("agent.skills.enable").description).argument("<agentId>", "Agent ID").argument("<selectionRefs...>", "Skill selection refs to enable").
|
|
8751
|
+
skills.command("enable").description(getAgentCliCapabilityById("agent.skills.enable").description).argument("<agentId>", "Agent ID").argument("<selectionRefs...>", "Skill selection refs to enable").addHelpText("after", formatExamplesAndCautions({
|
|
8752
|
+
examples: [
|
|
8753
|
+
"rudder agent skills enable <agent-id> rudder/rudder local/abc123/custom-skill",
|
|
8754
|
+
"rudder agent skills enable <agent-id> <selection-ref> --json"
|
|
8755
|
+
],
|
|
8756
|
+
cautions: [
|
|
8757
|
+
"This is additive and preserves existing enabled optional skills.",
|
|
8758
|
+
"After creating or copying a private skill, enable it before claiming future runs will load it."
|
|
8759
|
+
]
|
|
8760
|
+
})).action(async (agentId, selectionRefs, opts) => {
|
|
8693
8761
|
try {
|
|
8694
8762
|
const ctx = resolveCommandContext(opts);
|
|
8695
8763
|
const snapshot = await ctx.api.post(`/api/agents/${agentId}/skills/enable`, {
|
|
@@ -8705,7 +8773,16 @@ function registerAgentCommands(program) {
|
|
|
8705
8773
|
skills.command("sync").description(getAgentCliCapabilityById("agent.skills.sync").description).argument("<agentId>", "Agent ID").requiredOption(
|
|
8706
8774
|
"--desired-skills <csv>",
|
|
8707
8775
|
"Comma-separated desired skill refs (for example rudder/rudder)"
|
|
8708
|
-
).
|
|
8776
|
+
).addHelpText("after", formatExamplesAndCautions({
|
|
8777
|
+
examples: [
|
|
8778
|
+
'rudder agent skills sync <agent-id> --desired-skills "rudder/rudder,local/abc123/custom-skill"',
|
|
8779
|
+
'rudder agent skills sync <agent-id> --desired-skills "" --json'
|
|
8780
|
+
],
|
|
8781
|
+
cautions: [
|
|
8782
|
+
"Sync replaces the full optional enabled-skill set; use enable for additive changes.",
|
|
8783
|
+
"Preserve every existing desired skill in the CSV unless you intentionally want to disable it."
|
|
8784
|
+
]
|
|
8785
|
+
})).action(async (agentId, opts) => {
|
|
8709
8786
|
try {
|
|
8710
8787
|
const ctx = resolveCommandContext(opts);
|
|
8711
8788
|
const snapshot = await ctx.api.post(`/api/agents/${agentId}/skills/sync`, {
|
|
@@ -8994,7 +9071,16 @@ function registerApprovalCommands(program) {
|
|
|
8994
9071
|
{ includeCompany: false }
|
|
8995
9072
|
);
|
|
8996
9073
|
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").
|
|
9074
|
+
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({
|
|
9075
|
+
examples: [
|
|
9076
|
+
"rudder approval get <approval-id> --json",
|
|
9077
|
+
'rudder approval approve <approval-id> --decision-note "Approved after reviewing linked issues" --json'
|
|
9078
|
+
],
|
|
9079
|
+
cautions: [
|
|
9080
|
+
"Read the approval and linked issues before approving; this is a governed mutation.",
|
|
9081
|
+
"approval approve/reject use --decision-note, while approval comment uses --body-file."
|
|
9082
|
+
]
|
|
9083
|
+
})).action(async (approvalId, opts) => {
|
|
8998
9084
|
try {
|
|
8999
9085
|
const ctx = resolveCommandContext(opts);
|
|
9000
9086
|
const payload = resolveApprovalSchema.parse({
|
|
@@ -9053,7 +9139,16 @@ function registerApprovalCommands(program) {
|
|
|
9053
9139
|
})
|
|
9054
9140
|
);
|
|
9055
9141
|
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").
|
|
9142
|
+
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({
|
|
9143
|
+
examples: [
|
|
9144
|
+
"rudder approval comment <approval-id> --body-file ./approval-note.md --json",
|
|
9145
|
+
"printf '%s\\n' 'Need one more linked issue checked.' | rudder approval comment <approval-id> --body-file -"
|
|
9146
|
+
],
|
|
9147
|
+
cautions: [
|
|
9148
|
+
"Comments do not approve or reject; use approve/reject/request-revision for the durable decision.",
|
|
9149
|
+
"Use --body-file for multiline Markdown. Do not pass decision notes here."
|
|
9150
|
+
]
|
|
9151
|
+
})).action(async (approvalId, opts) => {
|
|
9057
9152
|
try {
|
|
9058
9153
|
const ctx = resolveCommandContext(opts);
|
|
9059
9154
|
const body = await resolveBodyFile(opts.bodyFile);
|
|
@@ -9345,7 +9440,16 @@ function registerAutomationCommands(program) {
|
|
|
9345
9440
|
})
|
|
9346
9441
|
);
|
|
9347
9442
|
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").
|
|
9443
|
+
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({
|
|
9444
|
+
examples: [
|
|
9445
|
+
`rudder automation run <automation-id> --payload '{"manual":true}' --json`,
|
|
9446
|
+
"rudder automation run <automation-id> --trigger-id <trigger-id> --idempotency-key zst-123-smoke"
|
|
9447
|
+
],
|
|
9448
|
+
cautions: [
|
|
9449
|
+
"Confirm the automation and trigger target before running; manual runs can create tracked issues or chats.",
|
|
9450
|
+
"Use an idempotency key for retried manual invocations so duplicate work is easier to detect."
|
|
9451
|
+
]
|
|
9452
|
+
})).action(async (automationId, opts) => {
|
|
9349
9453
|
try {
|
|
9350
9454
|
const ctx = resolveCommandContext(opts);
|
|
9351
9455
|
const payload = runAutomationSchema.parse({
|
|
@@ -9535,7 +9639,16 @@ function registerChatCommands(program) {
|
|
|
9535
9639
|
})
|
|
9536
9640
|
);
|
|
9537
9641
|
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").
|
|
9642
|
+
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({
|
|
9643
|
+
examples: [
|
|
9644
|
+
"rudder chat read <chat-id> --turn-limit 20 --include-output",
|
|
9645
|
+
"rudder chat read <chat-id> --cursor <nextCursor> --json"
|
|
9646
|
+
],
|
|
9647
|
+
cautions: [
|
|
9648
|
+
"Read bounded pages first; long chats can include large transcript payloads.",
|
|
9649
|
+
"Use --include-output only when transcript output is needed for diagnosis."
|
|
9650
|
+
]
|
|
9651
|
+
})).action(async (chatId, opts) => {
|
|
9539
9652
|
try {
|
|
9540
9653
|
const ctx = resolveCommandContext(opts);
|
|
9541
9654
|
const [conversation, page] = await Promise.all([
|
|
@@ -9583,7 +9696,16 @@ function registerChatCommands(program) {
|
|
|
9583
9696
|
{ includeCompany: false }
|
|
9584
9697
|
);
|
|
9585
9698
|
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").
|
|
9699
|
+
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({
|
|
9700
|
+
examples: [
|
|
9701
|
+
'rudder chat send <chat-id> --body "Status: validation is running"',
|
|
9702
|
+
"printf '%s\\n' 'Multiline note' | rudder chat send <chat-id>"
|
|
9703
|
+
],
|
|
9704
|
+
cautions: [
|
|
9705
|
+
"chat send accepts --body or stdin; it does not support --body-file.",
|
|
9706
|
+
"Agent-authenticated sends append an agent-authored message and do not start a new assistant reply."
|
|
9707
|
+
]
|
|
9708
|
+
})).action(async (chatId, opts) => {
|
|
9587
9709
|
try {
|
|
9588
9710
|
const ctx = resolveCommandContext(opts);
|
|
9589
9711
|
const body = opts.body ?? await readStdin();
|
|
@@ -11177,7 +11299,16 @@ function registerIssueCommands(program) {
|
|
|
11177
11299
|
})
|
|
11178
11300
|
);
|
|
11179
11301
|
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").
|
|
11302
|
+
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({
|
|
11303
|
+
examples: [
|
|
11304
|
+
"rudder issue comment ZST-123 --body-file ./progress.md --image ./screenshot.png --json",
|
|
11305
|
+
"printf '%s\\n' 'Short status' | rudder issue comment ZST-123 --body-file -"
|
|
11306
|
+
],
|
|
11307
|
+
cautions: [
|
|
11308
|
+
"Use --body-file for multiline Markdown; the old --body option is intentionally rejected.",
|
|
11309
|
+
"Attach local visual evidence with --image instead of leaving only a filesystem path in the comment."
|
|
11310
|
+
]
|
|
11311
|
+
})).action(async (issueId, opts) => {
|
|
11181
11312
|
try {
|
|
11182
11313
|
const ctx = resolveCommandContext(opts);
|
|
11183
11314
|
const bodyText = await resolveFileTextInput({
|
|
@@ -11205,7 +11336,16 @@ function registerIssueCommands(program) {
|
|
|
11205
11336
|
issue.command("review").description(getAgentCliCapabilityById("issue.review").description).argument("<issueId>", "Issue ID").requiredOption(
|
|
11206
11337
|
"--decision <decision>",
|
|
11207
11338
|
"Review decision: approve, request_changes, needs_followup, or blocked"
|
|
11208
|
-
).option("--comment-file <path>", "Read required review comment from a file, or '-' for stdin").
|
|
11339
|
+
).option("--comment-file <path>", "Read required review comment from a file, or '-' for stdin").addHelpText("after", formatExamplesAndCautions({
|
|
11340
|
+
examples: [
|
|
11341
|
+
"rudder issue review ZST-123 --decision request_changes --comment-file ./review.md --json",
|
|
11342
|
+
"rudder issue review ZST-123 --decision approve --comment-file ./review.md"
|
|
11343
|
+
],
|
|
11344
|
+
cautions: [
|
|
11345
|
+
"Free-form comments are not durable review decisions; use this command for approve/request_changes/etc.",
|
|
11346
|
+
"Approving an implementation issue can move it to done, so use request_changes when returning it for fixes."
|
|
11347
|
+
]
|
|
11348
|
+
})).action(async (issueId, opts) => {
|
|
11209
11349
|
try {
|
|
11210
11350
|
const ctx = resolveCommandContext(opts);
|
|
11211
11351
|
const decision = parseReviewDecision(opts.decision);
|
|
@@ -11245,7 +11385,16 @@ function registerIssueCommands(program) {
|
|
|
11245
11385
|
})
|
|
11246
11386
|
);
|
|
11247
11387
|
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, []).
|
|
11388
|
+
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({
|
|
11389
|
+
examples: [
|
|
11390
|
+
"rudder issue done ZST-123 --comment-file ./done.md --image ./screenshot.png --json",
|
|
11391
|
+
"rudder issue done ZST-123 --comment-file - < ./done.md"
|
|
11392
|
+
],
|
|
11393
|
+
cautions: [
|
|
11394
|
+
"Include validation evidence and commit/push status in the completion comment.",
|
|
11395
|
+
"If the server reports a run ownership conflict, stop and inspect the issue/run instead of retrying blindly."
|
|
11396
|
+
]
|
|
11397
|
+
})).action(async (issueId, opts) => {
|
|
11249
11398
|
try {
|
|
11250
11399
|
const ctx = resolveCommandContext(opts);
|
|
11251
11400
|
const commentText = await resolveFileTextInput({
|
|
@@ -11624,7 +11773,16 @@ function registerLibraryCommands(program) {
|
|
|
11624
11773
|
{ includeCompany: true }
|
|
11625
11774
|
);
|
|
11626
11775
|
addCommonClientOptions(
|
|
11627
|
-
file.command("ref").description(getAgentCliCapabilityById("library.file.ref").description).argument("<filePath>", "Library file path").
|
|
11776
|
+
file.command("ref").description(getAgentCliCapabilityById("library.file.ref").description).argument("<filePath>", "Library file path").addHelpText("after", formatExamplesAndCautions({
|
|
11777
|
+
examples: [
|
|
11778
|
+
"rudder library file ref projects/rudder/proposals/plan.md --json",
|
|
11779
|
+
'rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/proposals/plan.md" --json'
|
|
11780
|
+
],
|
|
11781
|
+
cautions: [
|
|
11782
|
+
"Pass the Library-relative path, not an absolute filesystem path.",
|
|
11783
|
+
"Use the returned markdownLink in issue comments instead of hand-writing library-entry URLs."
|
|
11784
|
+
]
|
|
11785
|
+
})).action(async (filePath, opts) => {
|
|
11628
11786
|
try {
|
|
11629
11787
|
await printLibraryFileReference(filePath, opts);
|
|
11630
11788
|
} catch (err) {
|
|
@@ -11634,7 +11792,16 @@ function registerLibraryCommands(program) {
|
|
|
11634
11792
|
{ includeCompany: true }
|
|
11635
11793
|
);
|
|
11636
11794
|
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").
|
|
11795
|
+
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({
|
|
11796
|
+
examples: [
|
|
11797
|
+
"rudder library file put projects/rudder/proposals/plan.md --body-file ./plan.md --json",
|
|
11798
|
+
"printf '%s\\n' '# Plan' | rudder library file put projects/rudder/proposals/plan.md --body-file -"
|
|
11799
|
+
],
|
|
11800
|
+
cautions: [
|
|
11801
|
+
"Use --body-file for content; the old --body option is intentionally rejected.",
|
|
11802
|
+
"For local trusted runs, prefer writing durable files under the project Library root, then use file ref for the renderable link."
|
|
11803
|
+
]
|
|
11804
|
+
})).action(async (filePath, opts) => {
|
|
11638
11805
|
try {
|
|
11639
11806
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
11640
11807
|
const body = await resolveBodyFileInput(opts.bodyFile);
|
|
@@ -11921,7 +12088,16 @@ function registerProjectCommands(program) {
|
|
|
11921
12088
|
{ includeCompany: false }
|
|
11922
12089
|
);
|
|
11923
12090
|
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").
|
|
12091
|
+
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({
|
|
12092
|
+
examples: [
|
|
12093
|
+
'rudder project create --org-id <org-id> --name "Rudder dev" --status in_progress --json',
|
|
12094
|
+
'rudder project create --org-id <org-id> --name "Release" --goal-id <goal-id> --lead-agent-id <agent-id>'
|
|
12095
|
+
],
|
|
12096
|
+
cautions: [
|
|
12097
|
+
"Project mutations are organization-scoped; pass --org-id when context might be ambiguous.",
|
|
12098
|
+
"Use existing project IDs/shortnames for updates instead of creating duplicate project containers."
|
|
12099
|
+
]
|
|
12100
|
+
})).action(async (opts) => {
|
|
11925
12101
|
try {
|
|
11926
12102
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
11927
12103
|
const payload = createProjectSchema.parse({
|
|
@@ -11943,7 +12119,16 @@ function registerProjectCommands(program) {
|
|
|
11943
12119
|
{ includeCompany: false }
|
|
11944
12120
|
);
|
|
11945
12121
|
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'").
|
|
12122
|
+
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({
|
|
12123
|
+
examples: [
|
|
12124
|
+
"rudder project update rudder-dev --org-id <org-id> --status in_progress --json",
|
|
12125
|
+
"rudder project update <project-id> --archived-at null"
|
|
12126
|
+
],
|
|
12127
|
+
cautions: [
|
|
12128
|
+
"Shortname resolution needs the intended organization; include --org-id for cross-org local contexts.",
|
|
12129
|
+
"Archiving and unarchiving changes project visibility, so verify the target with project get first."
|
|
12130
|
+
]
|
|
12131
|
+
})).action(async (projectRef, opts) => {
|
|
11947
12132
|
try {
|
|
11948
12133
|
const ctx = resolveCommandContext(opts);
|
|
11949
12134
|
const payload = updateProjectSchema.parse({
|
|
@@ -11986,7 +12171,16 @@ function projectPath(projectRef, orgId) {
|
|
|
11986
12171
|
function registerRunsCommands(program) {
|
|
11987
12172
|
const runs = program.command("runs").description("Run debugging operations");
|
|
11988
12173
|
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").
|
|
12174
|
+
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({
|
|
12175
|
+
examples: [
|
|
12176
|
+
"rudder runs list --org-id <org-id> --agent-id <agent-id> --status failed --limit 20",
|
|
12177
|
+
"rudder runs list --org-id <org-id> --issue-id ZST-123 --used-skill release-maintainer --json"
|
|
12178
|
+
],
|
|
12179
|
+
cautions: [
|
|
12180
|
+
"Filter first by org, agent, issue, status, skill, or time; do not start by dumping broad run history.",
|
|
12181
|
+
"Use runs errors or runs transcript for detail instead of expecting list to return full debug payloads."
|
|
12182
|
+
]
|
|
12183
|
+
})).action(async (opts) => {
|
|
11990
12184
|
try {
|
|
11991
12185
|
assertSingleSkillFilter(opts);
|
|
11992
12186
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
@@ -12051,7 +12245,16 @@ function registerRunsCommands(program) {
|
|
|
12051
12245
|
})
|
|
12052
12246
|
);
|
|
12053
12247
|
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").
|
|
12248
|
+
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({
|
|
12249
|
+
examples: [
|
|
12250
|
+
"rudder runs transcript <run-id> --around-error step-12 --context-turns 2",
|
|
12251
|
+
"rudder runs transcript <run-id> --chronological --turn-limit 30 --include-output"
|
|
12252
|
+
],
|
|
12253
|
+
cautions: [
|
|
12254
|
+
"Human output is compact and clipped by default; use --json only when a script needs the full payload.",
|
|
12255
|
+
"Use --around-error from runs errors when investigating a failure instead of reading the entire run first."
|
|
12256
|
+
]
|
|
12257
|
+
})).action(async (runId, opts) => {
|
|
12055
12258
|
try {
|
|
12056
12259
|
const ctx = resolveCommandContext(opts);
|
|
12057
12260
|
const payload = await ctx.api.get(
|
|
@@ -12070,7 +12273,16 @@ function registerRunsCommands(program) {
|
|
|
12070
12273
|
})
|
|
12071
12274
|
);
|
|
12072
12275
|
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").
|
|
12276
|
+
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({
|
|
12277
|
+
examples: [
|
|
12278
|
+
"rudder runs errors <run-id>",
|
|
12279
|
+
"rudder runs errors <run-id> --max-chars 4000 --json"
|
|
12280
|
+
],
|
|
12281
|
+
cautions: [
|
|
12282
|
+
"Start here for failed runs, then follow the transcript context command returned for the relevant step.",
|
|
12283
|
+
"Increase --max-chars deliberately; large tool outputs can be noisy and expensive to inspect."
|
|
12284
|
+
]
|
|
12285
|
+
})).action(async (runId, opts) => {
|
|
12074
12286
|
try {
|
|
12075
12287
|
const ctx = resolveCommandContext(opts);
|
|
12076
12288
|
const params = new URLSearchParams();
|
|
@@ -12365,7 +12577,16 @@ function registerSkillCommands(program) {
|
|
|
12365
12577
|
{ includeCompany: false }
|
|
12366
12578
|
);
|
|
12367
12579
|
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").
|
|
12580
|
+
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({
|
|
12581
|
+
examples: [
|
|
12582
|
+
"rudder skill file <skill-uuid> --path SKILL.md --org-id <org-id>",
|
|
12583
|
+
"rudder skill file <skill-uuid> --path references/usage.md --json"
|
|
12584
|
+
],
|
|
12585
|
+
cautions: [
|
|
12586
|
+
"Prefer the skill UUID for slashful keys such as local/<hash>/<slug>.",
|
|
12587
|
+
"Read SKILL.md before assuming a skill's trigger or workflow behavior."
|
|
12588
|
+
]
|
|
12589
|
+
})).action(async (skillId, opts) => {
|
|
12369
12590
|
try {
|
|
12370
12591
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
12371
12592
|
const query = new URLSearchParams({ path: opts.path ?? "SKILL.md" });
|
|
@@ -12380,7 +12601,16 @@ function registerSkillCommands(program) {
|
|
|
12380
12601
|
{ includeCompany: false }
|
|
12381
12602
|
);
|
|
12382
12603
|
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)").
|
|
12604
|
+
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({
|
|
12605
|
+
examples: [
|
|
12606
|
+
"rudder skill import --org-id <org-id> --source /abs/path/to/skill --json",
|
|
12607
|
+
"rudder skill list --org-id <org-id> --json"
|
|
12608
|
+
],
|
|
12609
|
+
cautions: [
|
|
12610
|
+
"Import organization-shared skills from durable shared paths, not disposable agent-private work directories.",
|
|
12611
|
+
"Importing a skill does not automatically enable it for every agent; update agent skill selections separately."
|
|
12612
|
+
]
|
|
12613
|
+
})).action(async (opts) => {
|
|
12384
12614
|
try {
|
|
12385
12615
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
12386
12616
|
const payload = organizationSkillImportSchema.parse({ source: opts.source });
|