@rudderhq/cli 0.3.6-canary.4 → 0.3.6-canary.5
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 +34 -12
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1771,7 +1771,7 @@ var init_agent = __esm({
|
|
|
1771
1771
|
|
|
1772
1772
|
// ../packages/shared/dist/validators/agent-integration.js
|
|
1773
1773
|
import { z as z13 } from "zod";
|
|
1774
|
-
var agentIntegrationProviderSchema, agentIntegrationStatusSchema, agentIntegrationTransportSchema, agentIntegrationProviderRegionSchema, agentIntegrationChatTypeSchema, agentIntegrationDropReasonSchema, agentIntegrationOutboundStatusSchema, createAgentIntegrationSchema, feishuEventHeaderSchema, feishuSenderIdSchema, feishuMessageMentionSchema, feishuMessageSchema, feishuEventSchema, mockFeishuInboundEventSchema;
|
|
1774
|
+
var agentIntegrationProviderSchema, agentIntegrationStatusSchema, agentIntegrationTransportSchema, agentIntegrationProviderRegionSchema, agentIntegrationChatTypeSchema, agentIntegrationDropReasonSchema, agentIntegrationOutboundStatusSchema, createAgentIntegrationSchema, connectAgentIntegrationSchema, feishuEventHeaderSchema, feishuSenderIdSchema, feishuMessageMentionSchema, feishuMessageSchema, feishuEventSchema, mockFeishuInboundEventSchema;
|
|
1775
1775
|
var init_agent_integration = __esm({
|
|
1776
1776
|
"../packages/shared/dist/validators/agent-integration.js"() {
|
|
1777
1777
|
"use strict";
|
|
@@ -1795,9 +1795,11 @@ var init_agent_integration = __esm({
|
|
|
1795
1795
|
installerUserId: z13.string().min(1).optional().nullable(),
|
|
1796
1796
|
manageUrl: z13.string().url().optional().nullable()
|
|
1797
1797
|
});
|
|
1798
|
+
connectAgentIntegrationSchema = createAgentIntegrationSchema.omit({ agentId: true });
|
|
1798
1799
|
feishuEventHeaderSchema = z13.object({
|
|
1799
1800
|
event_id: z13.string().min(1).optional(),
|
|
1800
1801
|
app_id: z13.string().min(1).optional(),
|
|
1802
|
+
token: z13.string().min(1).optional(),
|
|
1801
1803
|
create_time: z13.string().min(1).optional()
|
|
1802
1804
|
}).passthrough();
|
|
1803
1805
|
feishuSenderIdSchema = z13.object({
|
|
@@ -1824,6 +1826,11 @@ var init_agent_integration = __esm({
|
|
|
1824
1826
|
message: feishuMessageSchema.optional()
|
|
1825
1827
|
}).passthrough();
|
|
1826
1828
|
mockFeishuInboundEventSchema = z13.object({
|
|
1829
|
+
type: z13.string().min(1).optional(),
|
|
1830
|
+
token: z13.string().min(1).optional(),
|
|
1831
|
+
challenge: z13.string().min(1).optional(),
|
|
1832
|
+
mockVerificationToken: z13.string().min(1).optional(),
|
|
1833
|
+
mockEncryptKey: z13.string().min(1).optional(),
|
|
1827
1834
|
eventId: z13.string().min(1).optional(),
|
|
1828
1835
|
appId: z13.string().min(1).optional(),
|
|
1829
1836
|
botOpenId: z13.string().min(1).optional().nullable(),
|
|
@@ -3036,6 +3043,19 @@ var init_project_url_key = __esm({
|
|
|
3036
3043
|
}
|
|
3037
3044
|
});
|
|
3038
3045
|
|
|
3046
|
+
// ../packages/shared/dist/short-refs.js
|
|
3047
|
+
var SHORT_REF_PREFIX_BY_KIND, SHORT_REF_KIND_BY_PREFIX;
|
|
3048
|
+
var init_short_refs = __esm({
|
|
3049
|
+
"../packages/shared/dist/short-refs.js"() {
|
|
3050
|
+
"use strict";
|
|
3051
|
+
SHORT_REF_PREFIX_BY_KIND = {
|
|
3052
|
+
agent: "agt",
|
|
3053
|
+
issue_comment: "cmt"
|
|
3054
|
+
};
|
|
3055
|
+
SHORT_REF_KIND_BY_PREFIX = Object.fromEntries(Object.entries(SHORT_REF_PREFIX_BY_KIND).map(([kind, prefix]) => [prefix, kind]));
|
|
3056
|
+
}
|
|
3057
|
+
});
|
|
3058
|
+
|
|
3039
3059
|
// ../packages/shared/dist/token-usage.js
|
|
3040
3060
|
var init_token_usage = __esm({
|
|
3041
3061
|
"../packages/shared/dist/token-usage.js"() {
|
|
@@ -3251,6 +3271,7 @@ var init_dist = __esm({
|
|
|
3251
3271
|
init_organization_url_key();
|
|
3252
3272
|
init_project_mentions();
|
|
3253
3273
|
init_project_url_key();
|
|
3274
|
+
init_short_refs();
|
|
3254
3275
|
init_token_usage();
|
|
3255
3276
|
init_issue_activity();
|
|
3256
3277
|
init_config_schema();
|
|
@@ -7015,7 +7036,7 @@ function printOutput(data, opts = {}) {
|
|
|
7015
7036
|
}
|
|
7016
7037
|
function formatInlineRecord(record, opts = {}) {
|
|
7017
7038
|
const displayRecord = shouldShowFullIds(opts.fullIds) ? record : toCliShortIdOutput(record);
|
|
7018
|
-
const keyOrder = ["identifier", "id", "name", "status", "priority", "title", "action"];
|
|
7039
|
+
const keyOrder = ["identifier", "shortRef", "id", "name", "status", "priority", "title", "action"];
|
|
7019
7040
|
const seen = /* @__PURE__ */ new Set();
|
|
7020
7041
|
const parts = [];
|
|
7021
7042
|
for (const key of keyOrder) {
|
|
@@ -7446,9 +7467,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7446
7467
|
},
|
|
7447
7468
|
{
|
|
7448
7469
|
id: "agent.get",
|
|
7449
|
-
command: "rudder agent get <agent-id-or-shortname>",
|
|
7470
|
+
command: "rudder agent get <agent-id-or-shortname-or-agt-ref>",
|
|
7450
7471
|
category: "agent",
|
|
7451
|
-
description: "Read one agent by id or
|
|
7472
|
+
description: "Read one agent by id, shortname, or agt_<uuid-prefix> short ref.",
|
|
7452
7473
|
mutating: false,
|
|
7453
7474
|
contract: "compat",
|
|
7454
7475
|
requiresOrgId: false,
|
|
@@ -7602,9 +7623,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7602
7623
|
},
|
|
7603
7624
|
{
|
|
7604
7625
|
id: "issue.context",
|
|
7605
|
-
command: "rudder issue context <issue>",
|
|
7626
|
+
command: "rudder issue context <issue> [--wake-comment-id <comment-id-or-cmt-ref>]",
|
|
7606
7627
|
category: "issue",
|
|
7607
|
-
description: "Read the compact heartbeat context for an issue
|
|
7628
|
+
description: "Read the compact heartbeat context for an issue; wake comments may be addressed by full id or cmt_<uuid-prefix>.",
|
|
7608
7629
|
mutating: false,
|
|
7609
7630
|
contract: "agent-v1",
|
|
7610
7631
|
requiresOrgId: false,
|
|
@@ -7638,9 +7659,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7638
7659
|
},
|
|
7639
7660
|
{
|
|
7640
7661
|
id: "issue.comments.list",
|
|
7641
|
-
command: "rudder issue comments list <issue>",
|
|
7662
|
+
command: "rudder issue comments list <issue> [--after <comment-id-or-cmt-ref>]",
|
|
7642
7663
|
category: "issue",
|
|
7643
|
-
description: "List issue comments, optionally only newer comments after a
|
|
7664
|
+
description: "List issue comments, optionally only newer comments after a full comment id or cmt_<uuid-prefix> with --after.",
|
|
7644
7665
|
mutating: false,
|
|
7645
7666
|
contract: "agent-v1",
|
|
7646
7667
|
requiresOrgId: false,
|
|
@@ -7650,9 +7671,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7650
7671
|
},
|
|
7651
7672
|
{
|
|
7652
7673
|
id: "issue.comments.get",
|
|
7653
|
-
command: "rudder issue comments get <issue> <comment-id>",
|
|
7674
|
+
command: "rudder issue comments get <issue> <comment-id-or-cmt-ref>",
|
|
7654
7675
|
category: "issue",
|
|
7655
|
-
description: "Read one issue comment by id.",
|
|
7676
|
+
description: "Read one issue comment by full id or cmt_<uuid-prefix> scoped to the issue.",
|
|
7656
7677
|
mutating: false,
|
|
7657
7678
|
contract: "agent-v1",
|
|
7658
7679
|
requiresOrgId: false,
|
|
@@ -8613,6 +8634,7 @@ function registerAgentCommands(program) {
|
|
|
8613
8634
|
for (const row of rows) {
|
|
8614
8635
|
console.log(
|
|
8615
8636
|
formatInlineRecord({
|
|
8637
|
+
shortRef: row.shortRef,
|
|
8616
8638
|
id: row.id,
|
|
8617
8639
|
name: row.name,
|
|
8618
8640
|
role: row.role,
|
|
@@ -11514,7 +11536,7 @@ function registerIssueCommands(program) {
|
|
|
11514
11536
|
);
|
|
11515
11537
|
const comments = issue.command("comments").description("Issue comment operations");
|
|
11516
11538
|
addCommonClientOptions(
|
|
11517
|
-
comments.command("list").description(getAgentCliCapabilityById("issue.comments.list").description).argument("<issueId>", "Issue ID").option("--after <commentId>", "Only return comments after this comment ID").option("--order <order>", "Comment ordering (asc or desc)", "desc").action(async (issueId, opts) => {
|
|
11539
|
+
comments.command("list").description(getAgentCliCapabilityById("issue.comments.list").description).argument("<issueId>", "Issue ID").option("--after <commentId>", "Only return comments after this full comment ID or cmt_<uuid-prefix>").option("--order <order>", "Comment ordering (asc or desc)", "desc").action(async (issueId, opts) => {
|
|
11518
11540
|
try {
|
|
11519
11541
|
const ctx = resolveCommandContext(opts);
|
|
11520
11542
|
const params = new URLSearchParams();
|
|
@@ -11531,7 +11553,7 @@ function registerIssueCommands(program) {
|
|
|
11531
11553
|
})
|
|
11532
11554
|
);
|
|
11533
11555
|
addCommonClientOptions(
|
|
11534
|
-
comments.command("get").description(getAgentCliCapabilityById("issue.comments.get").description).argument("<issueId>", "Issue ID").argument("<commentId>", "
|
|
11556
|
+
comments.command("get").description(getAgentCliCapabilityById("issue.comments.get").description).argument("<issueId>", "Issue ID").argument("<commentId>", "Full comment ID or cmt_<uuid-prefix>").action(async (issueId, commentId, opts) => {
|
|
11535
11557
|
try {
|
|
11536
11558
|
const ctx = resolveCommandContext(opts);
|
|
11537
11559
|
const row = await ctx.api.get(`/api/issues/${issueId}/comments/${commentId}`);
|