@rudderhq/cli 0.3.4-canary.21 → 0.3.4-canary.23

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
@@ -296,7 +296,6 @@ var init_constants = __esm({
296
296
  "project.workspaces.read",
297
297
  "issues.read",
298
298
  "issue.comments.read",
299
- "issue.documents.read",
300
299
  "agents.read",
301
300
  "goals.read",
302
301
  "goals.create",
@@ -307,7 +306,6 @@ var init_constants = __esm({
307
306
  "issues.create",
308
307
  "issues.update",
309
308
  "issue.comments.create",
310
- "issue.documents.write",
311
309
  "agents.pause",
312
310
  "agents.resume",
313
311
  "agents.invoke",
@@ -1706,7 +1704,7 @@ var init_project = __esm({
1706
1704
 
1707
1705
  // ../packages/shared/dist/validators/issue.js
1708
1706
  import { z as z14 } from "zod";
1709
- var runWorkspaceStrategySchema, issueRunWorkspaceSettingsSchema, issueAssigneeAdapterOverridesSchema, createIssueSchema, createIssueLabelSchema, updateIssueLabelSchema, updateIssueSchema, reorderIssueSchema, checkoutIssueSchema, addIssueCommentSchema, updateIssueCommentSchema, reportIssueCommitSchema, linkIssueApprovalSchema, createIssueAttachmentMetadataSchema, createIssueWorkspaceAttachmentSchema, ISSUE_DOCUMENT_FORMATS, issueDocumentFormatSchema, issueDocumentKeySchema, upsertIssueDocumentSchema, createLibraryDocumentSchema, updateLibraryDocumentSchema, restoreLibraryDocumentRevisionSchema;
1707
+ var runWorkspaceStrategySchema, issueRunWorkspaceSettingsSchema, issueAssigneeAdapterOverridesSchema, createIssueSchema, createIssueLabelSchema, updateIssueLabelSchema, updateIssueSchema, reorderIssueSchema, checkoutIssueSchema, addIssueCommentSchema, updateIssueCommentSchema, reportIssueCommitSchema, linkIssueApprovalSchema, createIssueAttachmentMetadataSchema, createIssueWorkspaceAttachmentSchema, ISSUE_DOCUMENT_FORMATS, issueDocumentFormatSchema, createLibraryDocumentSchema, updateLibraryDocumentSchema, restoreLibraryDocumentRevisionSchema;
1710
1708
  var init_issue = __esm({
1711
1709
  "../packages/shared/dist/validators/issue.js"() {
1712
1710
  "use strict";
@@ -1823,14 +1821,6 @@ var init_issue = __esm({
1823
1821
  });
1824
1822
  ISSUE_DOCUMENT_FORMATS = ["markdown"];
1825
1823
  issueDocumentFormatSchema = z14.enum(ISSUE_DOCUMENT_FORMATS);
1826
- issueDocumentKeySchema = z14.string().trim().min(1).max(64).regex(/^[a-z0-9][a-z0-9_-]*$/, "Document key must be lowercase letters, numbers, _ or -");
1827
- upsertIssueDocumentSchema = z14.object({
1828
- title: z14.string().trim().max(200).nullable().optional(),
1829
- format: issueDocumentFormatSchema,
1830
- body: z14.string().max(524288),
1831
- changeSummary: z14.string().trim().max(500).nullable().optional(),
1832
- baseRevisionId: z14.string().uuid().nullable().optional()
1833
- });
1834
1824
  createLibraryDocumentSchema = z14.object({
1835
1825
  title: z14.string().trim().max(200).nullable().optional(),
1836
1826
  format: issueDocumentFormatSchema.optional().default("markdown"),
@@ -10749,54 +10739,6 @@ var AGENT_CLI_CAPABILITIES = [
10749
10739
  requiresRunId: false,
10750
10740
  attachesRunIdWhenAvailable: true
10751
10741
  },
10752
- {
10753
- id: "issue.documents.list",
10754
- command: "rudder issue documents list <issue>",
10755
- category: "issue",
10756
- description: "List issue documents.",
10757
- mutating: false,
10758
- contract: "agent-v1",
10759
- requiresOrgId: false,
10760
- requiresAgentId: false,
10761
- requiresRunId: false,
10762
- attachesRunIdWhenAvailable: false
10763
- },
10764
- {
10765
- id: "issue.documents.get",
10766
- command: "rudder issue documents get <issue> <key>",
10767
- category: "issue",
10768
- description: "Read one issue document by key.",
10769
- mutating: false,
10770
- contract: "agent-v1",
10771
- requiresOrgId: false,
10772
- requiresAgentId: false,
10773
- requiresRunId: false,
10774
- attachesRunIdWhenAvailable: false
10775
- },
10776
- {
10777
- id: "issue.documents.put",
10778
- command: "rudder issue documents put <issue> <key> --body-file <path>",
10779
- category: "issue",
10780
- description: "Legacy create or update of a DB-backed issue document; prefer local project Library files under `$RUDDER_PROJECT_LIBRARY_ROOT` for durable project files.",
10781
- mutating: true,
10782
- contract: "compat",
10783
- requiresOrgId: false,
10784
- requiresAgentId: false,
10785
- requiresRunId: false,
10786
- attachesRunIdWhenAvailable: true
10787
- },
10788
- {
10789
- id: "issue.documents.revisions",
10790
- command: "rudder issue documents revisions <issue> <key>",
10791
- category: "issue",
10792
- description: "List revisions for an issue document.",
10793
- mutating: false,
10794
- contract: "agent-v1",
10795
- requiresOrgId: false,
10796
- requiresAgentId: false,
10797
- requiresRunId: false,
10798
- attachesRunIdWhenAvailable: false
10799
- },
10800
10742
  {
10801
10743
  id: "project.list",
10802
10744
  command: "rudder project list --org-id <id>",
@@ -11697,64 +11639,6 @@ function registerIssueCommands(program) {
11697
11639
  }
11698
11640
  })
11699
11641
  );
11700
- const documents = issue.command("documents").description("Issue document operations");
11701
- addCommonClientOptions(
11702
- documents.command("list").description(getAgentCliCapabilityById("issue.documents.list").description).argument("<issueId>", "Issue ID").action(async (issueId, opts) => {
11703
- try {
11704
- const ctx = resolveCommandContext(opts);
11705
- const rows = await ctx.api.get(`/api/issues/${issueId}/documents`) ?? [];
11706
- printOutput(rows, { json: ctx.json });
11707
- } catch (err) {
11708
- handleCommandError(err);
11709
- }
11710
- })
11711
- );
11712
- addCommonClientOptions(
11713
- documents.command("get").description(getAgentCliCapabilityById("issue.documents.get").description).argument("<issueId>", "Issue ID").argument("<key>", "Document key").action(async (issueId, key, opts) => {
11714
- try {
11715
- const ctx = resolveCommandContext(opts);
11716
- const row = await ctx.api.get(`/api/issues/${issueId}/documents/${key}`);
11717
- printOutput(row, { json: ctx.json });
11718
- } catch (err) {
11719
- handleCommandError(err);
11720
- }
11721
- })
11722
- );
11723
- addCommonClientOptions(
11724
- documents.command("put").description(getAgentCliCapabilityById("issue.documents.put").description).argument("<issueId>", "Issue ID").argument("<key>", "Document key").option("--body-file <path>", "Read document body from a file, or '-' for stdin").option("--title <text>", "Document title").option("--format <format>", "Document format", "markdown").option("--change-summary <text>", "Optional change summary").option("--base-revision-id <id>", "Latest revision id for optimistic concurrency").action(async (issueId, key, opts) => {
11725
- try {
11726
- const ctx = resolveCommandContext(opts);
11727
- const body = await resolveFileTextInput({
11728
- file: opts.bodyFile,
11729
- fileOption: "--body-file",
11730
- removedTextOption: "--body",
11731
- required: true
11732
- });
11733
- const payload = upsertIssueDocumentSchema.parse({
11734
- title: opts.title,
11735
- format: opts.format,
11736
- body,
11737
- changeSummary: opts.changeSummary,
11738
- baseRevisionId: opts.baseRevisionId
11739
- });
11740
- const row = await ctx.api.put(`/api/issues/${issueId}/documents/${key}`, payload);
11741
- printOutput(row, { json: ctx.json });
11742
- } catch (err) {
11743
- handleCommandError(err);
11744
- }
11745
- })
11746
- );
11747
- addCommonClientOptions(
11748
- documents.command("revisions").description(getAgentCliCapabilityById("issue.documents.revisions").description).argument("<issueId>", "Issue ID").argument("<key>", "Document key").action(async (issueId, key, opts) => {
11749
- try {
11750
- const ctx = resolveCommandContext(opts);
11751
- const rows = await ctx.api.get(`/api/issues/${issueId}/documents/${key}/revisions`) ?? [];
11752
- printOutput(rows, { json: ctx.json });
11753
- } catch (err) {
11754
- handleCommandError(err);
11755
- }
11756
- })
11757
- );
11758
11642
  addCommonClientOptions(
11759
11643
  issue.command("checkout").description(getAgentCliCapabilityById("issue.checkout").description).argument("<issueId>", "Issue ID").option("--agent-id <id>", "Agent ID (defaults to RUDDER_AGENT_ID)").option(
11760
11644
  "--expected-statuses <csv>",