replicas-cli 0.3.504 → 0.3.506

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.
Files changed (2) hide show
  1. package/dist/index.cjs +337 -253
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -232,6 +232,7 @@ var init_urls = __esm({
232
232
  environment: "/environment",
233
233
  analytics: "/analytics",
234
234
  review: "/review",
235
+ issues: "/issues",
235
236
  dashboard: DASHBOARD_PATH,
236
237
  agents: `${DASHBOARD_PATH}/agents`,
237
238
  integrations: `${DASHBOARD_PATH}/integrations`,
@@ -22189,7 +22190,7 @@ function classifyCanvasFilename(filename) {
22189
22190
  const ext = idx === -1 ? "" : filename.slice(idx).toLowerCase();
22190
22191
  return CANVAS_KIND_BY_EXTENSION[ext] ?? (detectLanguageByPath(filename) ? { kind: "text", mimeType: "text/plain; charset=utf-8" } : { kind: "other", mimeType: "application/octet-stream" });
22191
22192
  }
22192
- var CLAUDE_OPUS_1M_MODEL, LEGACY_CLAUDE_OPUS_1M_MODEL, CLAUDE_FABLE_5_1_MODEL, CLAUDE_FABLE_5_MODEL, CLAUDE_OPUS_5_MODEL, CLAUDE_OPUS_4_8_MODEL, CLAUDE_SONNET_5_5_MODEL, CLAUDE_SONNET_5_MODEL, CLAUDE_HAIKU_5_5_MODEL, CLAUDE_HAIKU_4_5_MODEL, DEFAULT_CLAUDE_MODEL, GPT_6_ASTRA_MODEL, GPT_6_SOL_MODEL, GPT_6_LUNA_MODEL, GPT_5_6_SOL_MODEL, GPT_5_6_TERRA_MODEL, GPT_5_6_LUNA_MODEL, DEFAULT_CODEX_MODEL, DEFAULT_OPENCODE_MODEL, GLM_5_3_FLASH_MODEL, DEEPSEEK_V4_PRO_MODEL, DEEPSEEK_V4_FLASH_MODEL, MUSE_WONDER_1_0_MODEL, MUSE_SPARK_1_3_MODEL, DEFAULT_MUSE_MODEL, DEFAULT_OPENROUTER_MODELS, OPENROUTER_MODELS, CLAUDE_MODEL_CONTEXT_WINDOWS, CLAUDE_MODEL_MIN_SANDBOX_IMAGE, CODEX_MODEL_MIN_SANDBOX_IMAGE, AGENT_MODELS, HIDDEN_BY_DEFAULT_MODELS, withoutHiddenByDefault, DEFAULT_STATIC_AGENT_MODELS, DEFAULT_CURSOR_MODELS, MODEL_PREDECESSORS, MODEL_LABELS, IMAGE_MEDIA_TYPES, resourcePressure, sandboxResourceMinuteSchema, MAX_PENDING_RESOURCE_MINUTES, sandboxResourceMinutesSchema, sandboxMemorySampleSchema, engineUpdateProgressSchema, MAX_CANVAS_FILE_BYTES, MAX_CANVAS_PREVIEW_BYTES, CANVAS_KIND_BY_EXTENSION;
22193
+ var CLAUDE_OPUS_1M_MODEL, LEGACY_CLAUDE_OPUS_1M_MODEL, CLAUDE_FABLE_5_1_MODEL, CLAUDE_FABLE_5_MODEL, CLAUDE_OPUS_5_MODEL, CLAUDE_OPUS_4_8_MODEL, CLAUDE_SONNET_5_5_MODEL, CLAUDE_SONNET_5_MODEL, CLAUDE_HAIKU_5_5_MODEL, CLAUDE_HAIKU_4_5_MODEL, DEFAULT_CLAUDE_MODEL, GPT_6_ASTRA_MODEL, GPT_6_SOL_MODEL, GPT_6_LUNA_MODEL, GPT_5_6_SOL_MODEL, GPT_5_6_TERRA_MODEL, GPT_5_6_LUNA_MODEL, DEFAULT_CODEX_MODEL, DEFAULT_OPENCODE_MODEL, GLM_5_3_FLASH_MODEL, DEEPSEEK_V4_PRO_MODEL, DEEPSEEK_V4_FLASH_MODEL, MUSE_WONDER_1_0_MODEL, MUSE_SPARK_1_3_MODEL, DEFAULT_MUSE_MODEL, DEFAULT_OPENROUTER_MODELS, OPENROUTER_MODELS, CLAUDE_MODEL_CONTEXT_WINDOWS, CLAUDE_MODEL_MIN_SANDBOX_IMAGE, CODEX_MODEL_MIN_SANDBOX_IMAGE, AGENT_MODELS, HIDDEN_BY_DEFAULT_MODELS, withoutHiddenByDefault, DEFAULT_STATIC_AGENT_MODELS, DEFAULT_CURSOR_MODELS, MODEL_PREDECESSORS, MODEL_LABELS, IMAGE_MEDIA_TYPES, resourcePressure, sandboxResourceMinuteSchema, MAX_PENDING_RESOURCE_MINUTES, sandboxResourceMinutesSchema, sandboxMemorySampleSchema, versionChangeSchema, engineUpdateChangesSchema, engineUpdateProgressSchema, MAX_CANVAS_FILE_BYTES, MAX_CANVAS_PREVIEW_BYTES, CANVAS_KIND_BY_EXTENSION;
22193
22194
  var init_types4 = __esm({
22194
22195
  "../shared/src/engine/types.ts"() {
22195
22196
  "use strict";
@@ -22461,9 +22462,11 @@ var init_types4 = __esm({
22461
22462
  memoryUsedMb: external_exports.number().min(0),
22462
22463
  memoryPressureSome: resourcePressure
22463
22464
  });
22465
+ versionChangeSchema = external_exports.object({ from: external_exports.string(), to: external_exports.string() });
22466
+ engineUpdateChangesSchema = external_exports.object({ engine: versionChangeSchema.optional(), cli: versionChangeSchema.optional() });
22464
22467
  engineUpdateProgressSchema = external_exports.discriminatedUnion("state", [
22465
- external_exports.object({ state: external_exports.enum(["updating", "updated"]), from: external_exports.string(), to: external_exports.string() }),
22466
- external_exports.object({ state: external_exports.literal("failed"), from: external_exports.string(), to: external_exports.string(), reason: external_exports.string() })
22468
+ engineUpdateChangesSchema.extend({ state: external_exports.enum(["updating", "updated"]) }),
22469
+ engineUpdateChangesSchema.extend({ state: external_exports.literal("failed"), reason: external_exports.string() })
22467
22470
  ]);
22468
22471
  MAX_CANVAS_FILE_BYTES = 100 * 1024 * 1024;
22469
22472
  MAX_CANVAS_PREVIEW_BYTES = 5 * 1024 * 1024;
@@ -27547,10 +27550,307 @@ var init_message_origin = __esm({
27547
27550
  }
27548
27551
  });
27549
27552
 
27553
+ // ../shared/src/tag-blocks.ts
27554
+ var ATTRIBUTE, MULTITASK_EVENT_TAG, tagBlockPattern, parseTagAttributes;
27555
+ var init_tag_blocks = __esm({
27556
+ "../shared/src/tag-blocks.ts"() {
27557
+ "use strict";
27558
+ ATTRIBUTE = /(\w+)="([^"]*)"/g;
27559
+ MULTITASK_EVENT_TAG = "multitask_event";
27560
+ tagBlockPattern = (tag) => new RegExp(`<${tag}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${tag}>`, "g");
27561
+ parseTagAttributes = (raw) => Object.fromEntries([...raw.matchAll(ATTRIBUTE)].map(([, key, value]) => [key, value.replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&")]));
27562
+ }
27563
+ });
27564
+
27565
+ // ../shared/src/routes/issues.ts
27566
+ var ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ACTOR_TYPES, ISSUE_SUBSCRIBER_ROLES, ISSUE_RELATION_TYPES, ISSUE_PULL_REQUEST_STATES, issueStatusSchema, issuePrioritySchema, issueSubscriberRoleSchema, issueRelationTypeSchema, issuePullRequestStateSchema, ISSUE_STATUS_LABELS, ISSUE_PRIORITY_LABELS, issueActorSchema, ISSUE_KEY_RE, timestamp, nullableTimestamp, issueSchema, issueSubscriberSchema, issueRelationSchema, issuePullRequestSchema, issueCommentSchema, change, nullableId, ISSUE_EVENT_TYPES, issueEventDataSchemas, issueEventBase, issueEventVariant, issueEventSchema, clientMutationId, title2, description, body, createIssueRequestSchema, updateIssueRequestSchema, issueActorRequestSchema, createIssueCommentRequestSchema, updateIssueCommentRequestSchema, createIssueRelationRequestSchema, linkIssuePullRequestRequestSchema, updateIssuePullRequestRequestSchema, issueMutationRequestSchema, updateIssueSettingsRequestSchema, listIssuesQuerySchema, issueDetailResponseSchema, listIssuesResponseSchema, issuesDeltaQuerySchema, issueInboxQuerySchema, markIssueInboxReadRequestSchema;
27567
+ var init_issues2 = __esm({
27568
+ "../shared/src/routes/issues.ts"() {
27569
+ "use strict";
27570
+ init_zod();
27571
+ ISSUE_STATUSES = ["backlog", "todo", "in_progress", "in_review", "done", "canceled", "duplicate"];
27572
+ ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
27573
+ ISSUE_ACTOR_TYPES = ["user", "workspace"];
27574
+ ISSUE_SUBSCRIBER_ROLES = ["assignee", "creator", "mentioned", "manual"];
27575
+ ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
27576
+ ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
27577
+ issueStatusSchema = external_exports.enum(ISSUE_STATUSES);
27578
+ issuePrioritySchema = external_exports.enum(ISSUE_PRIORITIES);
27579
+ issueSubscriberRoleSchema = external_exports.enum(ISSUE_SUBSCRIBER_ROLES);
27580
+ issueRelationTypeSchema = external_exports.enum(ISSUE_RELATION_TYPES);
27581
+ issuePullRequestStateSchema = external_exports.enum(ISSUE_PULL_REQUEST_STATES);
27582
+ ISSUE_STATUS_LABELS = { backlog: "Backlog", todo: "Todo", in_progress: "In Progress", in_review: "In Review", done: "Done", canceled: "Canceled", duplicate: "Duplicate" };
27583
+ ISSUE_PRIORITY_LABELS = { none: "No priority", urgent: "Urgent", high: "High", medium: "Medium", low: "Low" };
27584
+ issueActorSchema = external_exports.object({
27585
+ type: external_exports.enum(ISSUE_ACTOR_TYPES),
27586
+ id: external_exports.string().toLowerCase().uuid()
27587
+ });
27588
+ ISSUE_KEY_RE = /^[A-Z][A-Z0-9]{0,9}$/;
27589
+ timestamp = external_exports.string();
27590
+ nullableTimestamp = timestamp.nullable();
27591
+ issueSchema = external_exports.object({
27592
+ id: external_exports.string().uuid(),
27593
+ organization_id: external_exports.string().uuid(),
27594
+ number: external_exports.number().int(),
27595
+ identifier: external_exports.string(),
27596
+ title: external_exports.string(),
27597
+ description: external_exports.string(),
27598
+ status: issueStatusSchema,
27599
+ priority: issuePrioritySchema,
27600
+ parent_id: external_exports.string().uuid().nullable(),
27601
+ manager_id: external_exports.string().uuid().nullable(),
27602
+ creator: issueActorSchema,
27603
+ /** Fractional: to move an issue between two others, send the midpoint of their sort orders. */
27604
+ sort_order: external_exports.number(),
27605
+ created_at: timestamp,
27606
+ updated_at: timestamp,
27607
+ completed_at: nullableTimestamp,
27608
+ canceled_at: nullableTimestamp,
27609
+ archived_at: nullableTimestamp
27610
+ });
27611
+ issueSubscriberSchema = external_exports.object({
27612
+ issue_id: external_exports.string().uuid(),
27613
+ subscriber: issueActorSchema,
27614
+ role: issueSubscriberRoleSchema,
27615
+ created_at: timestamp
27616
+ });
27617
+ issueRelationSchema = external_exports.object({
27618
+ id: external_exports.string().uuid(),
27619
+ type: issueRelationTypeSchema,
27620
+ issue_id: external_exports.string().uuid(),
27621
+ related_issue_id: external_exports.string().uuid(),
27622
+ created_at: timestamp
27623
+ });
27624
+ issuePullRequestSchema = external_exports.object({
27625
+ id: external_exports.string().uuid(),
27626
+ issue_id: external_exports.string().uuid(),
27627
+ url: external_exports.string(),
27628
+ pull_request_id: external_exports.string().uuid().nullable(),
27629
+ title: external_exports.string().nullable(),
27630
+ state: issuePullRequestStateSchema,
27631
+ created_at: timestamp,
27632
+ updated_at: timestamp
27633
+ });
27634
+ issueCommentSchema = external_exports.object({
27635
+ id: external_exports.string().uuid(),
27636
+ issue_id: external_exports.string().uuid(),
27637
+ author: issueActorSchema,
27638
+ body: external_exports.string(),
27639
+ created_at: timestamp,
27640
+ updated_at: timestamp
27641
+ });
27642
+ change = (value) => external_exports.object({ from: value, to: value });
27643
+ nullableId = external_exports.string().uuid().nullable();
27644
+ ISSUE_EVENT_TYPES = [
27645
+ "created",
27646
+ "title_changed",
27647
+ "description_changed",
27648
+ "status_changed",
27649
+ "priority_changed",
27650
+ "parent_changed",
27651
+ "manager_changed",
27652
+ "sort_order_changed",
27653
+ "assignee_added",
27654
+ "assignee_removed",
27655
+ "subscriber_added",
27656
+ "subscriber_removed",
27657
+ "relation_added",
27658
+ "relation_removed",
27659
+ "pr_linked",
27660
+ "pr_unlinked",
27661
+ "pr_state_changed",
27662
+ "comment_added",
27663
+ "comment_edited",
27664
+ "comment_deleted",
27665
+ "archived",
27666
+ "restored"
27667
+ ];
27668
+ issueEventDataSchemas = {
27669
+ created: external_exports.object({ issue: issueSchema }),
27670
+ title_changed: change(external_exports.string()),
27671
+ description_changed: change(external_exports.string()),
27672
+ status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp }),
27673
+ priority_changed: change(issuePrioritySchema),
27674
+ parent_changed: change(nullableId),
27675
+ manager_changed: change(nullableId),
27676
+ sort_order_changed: change(external_exports.number()),
27677
+ /** `subscriber` is the row after the change: an unassigned principal stays subscribed with role `manual`. */
27678
+ assignee_added: external_exports.object({ subscriber: issueSubscriberSchema }),
27679
+ assignee_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
27680
+ subscriber_added: external_exports.object({ subscriber: issueSubscriberSchema }),
27681
+ subscriber_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
27682
+ relation_added: external_exports.object({ relation: issueRelationSchema }),
27683
+ relation_removed: external_exports.object({ relation: issueRelationSchema }),
27684
+ pr_linked: external_exports.object({ pull_request: issuePullRequestSchema }),
27685
+ pr_unlinked: external_exports.object({ pull_request: issuePullRequestSchema }),
27686
+ pr_state_changed: external_exports.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
27687
+ comment_added: external_exports.object({ comment: issueCommentSchema }),
27688
+ comment_edited: external_exports.object({ comment: issueCommentSchema, from: external_exports.string() }),
27689
+ comment_deleted: external_exports.object({ comment: issueCommentSchema }),
27690
+ archived: external_exports.object({ archived_at: timestamp }),
27691
+ restored: external_exports.object({
27692
+ issue: issueSchema,
27693
+ subscribers: external_exports.array(issueSubscriberSchema),
27694
+ relations: external_exports.array(issueRelationSchema),
27695
+ pull_requests: external_exports.array(issuePullRequestSchema)
27696
+ })
27697
+ };
27698
+ issueEventBase = external_exports.object({
27699
+ sync_id: external_exports.number().int(),
27700
+ issue_id: external_exports.string().uuid(),
27701
+ actor: issueActorSchema,
27702
+ /** Echo of the `client_mutation_id` sent with the write, so the writer can settle its optimistic change. */
27703
+ client_mutation_id: external_exports.string().nullable(),
27704
+ created_at: timestamp
27705
+ });
27706
+ issueEventVariant = (type) => issueEventBase.extend({ type: external_exports.literal(type), data: issueEventDataSchemas[type] });
27707
+ issueEventSchema = external_exports.discriminatedUnion("type", [issueEventVariant(ISSUE_EVENT_TYPES[0]), ...ISSUE_EVENT_TYPES.slice(1).map(issueEventVariant)]);
27708
+ clientMutationId = external_exports.string().min(1).max(128).optional();
27709
+ title2 = external_exports.string().trim().min(1).max(500);
27710
+ description = external_exports.string().max(1e5);
27711
+ body = external_exports.string().trim().min(1).max(1e5);
27712
+ createIssueRequestSchema = external_exports.object({
27713
+ /** Client-generated id, so an optimistic create can be referenced before the server answers. */
27714
+ id: external_exports.string().uuid().optional(),
27715
+ title: title2,
27716
+ description: description.optional(),
27717
+ status: issueStatusSchema.optional(),
27718
+ priority: issuePrioritySchema.optional(),
27719
+ parent_id: external_exports.string().uuid().optional(),
27720
+ manager_id: external_exports.string().uuid().optional(),
27721
+ sort_order: external_exports.number().finite().optional(),
27722
+ assignees: external_exports.array(issueActorSchema).max(20).optional(),
27723
+ subscribers: external_exports.array(issueActorSchema).max(50).optional(),
27724
+ client_mutation_id: clientMutationId
27725
+ });
27726
+ updateIssueRequestSchema = external_exports.object({
27727
+ title: title2.optional(),
27728
+ description: description.optional(),
27729
+ status: issueStatusSchema.optional(),
27730
+ priority: issuePrioritySchema.optional(),
27731
+ // PATCH semantics: null clears the parent or Manager, omitting it leaves it unchanged.
27732
+ parent_id: nullableId.optional(),
27733
+ manager_id: nullableId.optional(),
27734
+ sort_order: external_exports.number().finite().optional(),
27735
+ client_mutation_id: clientMutationId
27736
+ });
27737
+ issueActorRequestSchema = issueActorSchema.partial().extend({ client_mutation_id: clientMutationId });
27738
+ createIssueCommentRequestSchema = external_exports.object({
27739
+ id: external_exports.string().uuid().optional(),
27740
+ body,
27741
+ client_mutation_id: clientMutationId
27742
+ });
27743
+ updateIssueCommentRequestSchema = external_exports.object({ body, client_mutation_id: clientMutationId });
27744
+ createIssueRelationRequestSchema = external_exports.object({
27745
+ id: external_exports.string().uuid().optional(),
27746
+ type: issueRelationTypeSchema,
27747
+ related_issue: external_exports.string().min(1),
27748
+ client_mutation_id: clientMutationId
27749
+ });
27750
+ linkIssuePullRequestRequestSchema = external_exports.object({
27751
+ id: external_exports.string().uuid().optional(),
27752
+ url: external_exports.string().url().max(2e3),
27753
+ title: external_exports.string().max(500).optional(),
27754
+ state: issuePullRequestStateSchema.optional(),
27755
+ pull_request_id: external_exports.string().uuid().optional(),
27756
+ client_mutation_id: clientMutationId
27757
+ });
27758
+ updateIssuePullRequestRequestSchema = external_exports.object({
27759
+ state: issuePullRequestStateSchema,
27760
+ client_mutation_id: clientMutationId
27761
+ });
27762
+ issueMutationRequestSchema = external_exports.object({ client_mutation_id: clientMutationId });
27763
+ updateIssueSettingsRequestSchema = external_exports.object({ issue_key: external_exports.string().trim().toUpperCase().regex(ISSUE_KEY_RE) });
27764
+ listIssuesQuerySchema = external_exports.object({
27765
+ status: external_exports.string().optional(),
27766
+ priority: external_exports.string().optional(),
27767
+ assignee: external_exports.string().optional(),
27768
+ subscriber: external_exports.string().optional(),
27769
+ creator: external_exports.string().optional(),
27770
+ manager_id: external_exports.string().optional(),
27771
+ parent_id: external_exports.string().optional(),
27772
+ q: external_exports.string().max(200).optional(),
27773
+ include_archived: external_exports.enum(["true", "false"]).optional(),
27774
+ limit: external_exports.coerce.number().int().min(1).max(200).optional(),
27775
+ cursor: external_exports.coerce.number().int().min(0).max(2147483647).optional()
27776
+ });
27777
+ issueDetailResponseSchema = external_exports.object({
27778
+ issue: issueSchema,
27779
+ subscribers: external_exports.array(issueSubscriberSchema),
27780
+ relations: external_exports.array(issueRelationSchema),
27781
+ pull_requests: external_exports.array(issuePullRequestSchema),
27782
+ comments: external_exports.array(issueCommentSchema),
27783
+ events: external_exports.array(issueEventSchema),
27784
+ sub_issues: external_exports.array(issueSchema)
27785
+ });
27786
+ listIssuesResponseSchema = external_exports.object({ issues: external_exports.array(issueSchema), next_cursor: external_exports.number().nullable() });
27787
+ issuesDeltaQuerySchema = external_exports.object({
27788
+ after: external_exports.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
27789
+ limit: external_exports.coerce.number().int().min(1).max(1e3).optional()
27790
+ });
27791
+ issueInboxQuerySchema = external_exports.object({
27792
+ limit: external_exports.coerce.number().int().min(1).max(100).optional(),
27793
+ before: external_exports.coerce.number().int().min(1).optional()
27794
+ });
27795
+ markIssueInboxReadRequestSchema = external_exports.object({ sync_id: external_exports.number().int().min(0).optional() });
27796
+ }
27797
+ });
27798
+
27799
+ // ../shared/src/issue-events.ts
27800
+ function parseChange(line, excerpt) {
27801
+ const match = line.match(CHANGE_LINE);
27802
+ const rest = (match ? match[3] + match[4] : line).replaceAll(" (agent)", "").replace(/(?:\. Now)?:$/, "");
27803
+ const [, field2, from, to] = rest.match(TRANSITION) ?? [];
27804
+ const transition = transitionSchema.safeParse({ field: field2, from, to }).data;
27805
+ const labels = !transition ? [] : transition.field === "status" ? [ISSUE_STATUS_LABELS[transition.from], ISSUE_STATUS_LABELS[transition.to]] : [ISSUE_PRIORITY_LABELS[transition.from], ISSUE_PRIORITY_LABELS[transition.to]];
27806
+ const text4 = transition ? `changed the ${transition.field}: ${labels.join(" \u2192 ")}` : rest;
27807
+ return { actor: match?.[1] ?? "", agent: Boolean(match?.[2]), text: excerpt ? `${text4}: ${excerpt}` : text4, ...transition ? { transition } : {} };
27808
+ }
27809
+ function extractIssueEvents(text4) {
27810
+ return [...text4.matchAll(tagBlockPattern(ISSUE_EVENT_TAG))].flatMap((match) => {
27811
+ const attributes = parseTagAttributes(match[1]);
27812
+ if (!attributes.issue) return [];
27813
+ const detail = match[2].replaceAll(`<\\/${ISSUE_EVENT_TAG}`, `</${ISSUE_EVENT_TAG}`).trim();
27814
+ const changes = detail.split("\n\n").flatMap((paragraph) => {
27815
+ const [line, ...quoted] = paragraph.split("\n");
27816
+ if (!line.trim() || line.startsWith(">")) return [];
27817
+ return [parseChange(line, line.endsWith(". Now:") ? void 0 : quoted.map((quote) => quote.replace(/^>\s?/, "").trim()).find(Boolean))];
27818
+ });
27819
+ return [{
27820
+ id: `${attributes.issue}:${attributes.sync_id ?? ""}`,
27821
+ at: "",
27822
+ kind: "issue",
27823
+ agentId: attributes.issue,
27824
+ agentName: attributes.issue,
27825
+ summary: changes.map(issueChangeSentence).join(" \xB7 "),
27826
+ ...detail ? { detail } : {},
27827
+ issue: { title: attributes.title ?? "", url: attributes.url ?? "", changes }
27828
+ }];
27829
+ });
27830
+ }
27831
+ var ISSUE_EVENT_TAG, transitionSchema, issueEventChangeSchema, CHANGE_LINE, TRANSITION, issueChangeSentence;
27832
+ var init_issue_events = __esm({
27833
+ "../shared/src/issue-events.ts"() {
27834
+ "use strict";
27835
+ init_zod();
27836
+ init_issues2();
27837
+ init_tag_blocks();
27838
+ ISSUE_EVENT_TAG = "issue_event";
27839
+ transitionSchema = external_exports.discriminatedUnion("field", [
27840
+ external_exports.object({ field: external_exports.literal("status"), from: issueStatusSchema, to: issueStatusSchema }),
27841
+ external_exports.object({ field: external_exports.literal("priority"), from: issuePrioritySchema, to: issuePrioritySchema })
27842
+ ]);
27843
+ issueEventChangeSchema = external_exports.object({ actor: external_exports.string(), agent: external_exports.boolean(), text: external_exports.string(), transition: transitionSchema.optional() });
27844
+ CHANGE_LINE = /^(.+?)( \(agent\))? (created it|renamed it|edited |changed the |made it|moved it|removed |assigned |unassigned |marked |linked |unlinked |pull request |commented|deleted a comment|archived it|restored it)(.*)$/;
27845
+ TRANSITION = /^changed the (status|priority): (\w+) → (\w+)$/;
27846
+ issueChangeSentence = (change2) => [change2.actor, change2.text].filter(Boolean).join(" ");
27847
+ }
27848
+ });
27849
+
27550
27850
  // ../shared/src/manager-events.ts
27551
27851
  function extractManagerEvents(text4) {
27552
27852
  return [...text4.matchAll(BLOCK)].flatMap((match) => {
27553
- const attributes = Object.fromEntries([...match[1].matchAll(ATTRIBUTE)].map(([, key, value]) => [key, unescapeAttribute(value)]));
27853
+ const attributes = parseTagAttributes(match[1]);
27554
27854
  if (!attributes.kind || !attributes.id || !attributes.agent_id) return [];
27555
27855
  const kind = MANAGER_EVENT_KINDS.find((candidate) => candidate === attributes.kind) ?? UNKNOWN_EVENT_KIND;
27556
27856
  const [summary, ...rest] = match[2].replaceAll(`<\\/${TAG}`, `</${TAG}`).split("\n\n");
@@ -27570,13 +27870,13 @@ function extractManagerEvents(text4) {
27570
27870
  });
27571
27871
  }
27572
27872
  function parseManagerEvents(text4) {
27573
- const events = extractManagerEvents(text4);
27574
- return events.length > 0 && text4.replace(BLOCK, "").replaceAll(MERGED_MESSAGE_SEPARATOR.trim(), "").trim() === "" ? events : null;
27873
+ const events = [...extractManagerEvents(text4), ...extractIssueEvents(text4)];
27874
+ return events.length > 0 && text4.replace(BLOCK, "").replace(ISSUE_BLOCK, "").replaceAll(MERGED_MESSAGE_SEPARATOR.trim(), "").trim() === "" ? events : null;
27575
27875
  }
27576
27876
  function stripManagerEventNotes(content) {
27577
- return stripInstructionBlocksOutside(content, [...content.matchAll(BLOCK)].map((block) => [block.index, block.index + block[0].length]));
27877
+ return stripInstructionBlocksOutside(content, [...content.matchAll(BLOCK), ...content.matchAll(ISSUE_BLOCK)].map((block) => [block.index, block.index + block[0].length]));
27578
27878
  }
27579
- var MANAGER_EVENT_KINDS, UNKNOWN_EVENT_KIND, MANAGER_EVENT_TYPE, managerEventSchema, TAG, BLOCK, ATTRIBUTE, unescapeAttribute;
27879
+ var MANAGER_EVENT_KINDS, UNKNOWN_EVENT_KIND, MANAGER_EVENT_TYPE, managerEventSchema, TAG, BLOCK, ISSUE_BLOCK;
27580
27880
  var init_manager_events = __esm({
27581
27881
  "../shared/src/manager-events.ts"() {
27582
27882
  "use strict";
@@ -27585,13 +27885,15 @@ var init_manager_events = __esm({
27585
27885
  init_prompts();
27586
27886
  init_message_origin();
27587
27887
  init_urls();
27888
+ init_tag_blocks();
27889
+ init_issue_events();
27588
27890
  MANAGER_EVENT_KINDS = ["finished", "ready", "needs_attention", "approved", "merged", "closed", "archived", "replied"];
27589
27891
  UNKNOWN_EVENT_KIND = "update";
27590
27892
  MANAGER_EVENT_TYPE = "multitask-event";
27591
27893
  managerEventSchema = external_exports.object({
27592
27894
  id: external_exports.string(),
27593
27895
  at: external_exports.string(),
27594
- kind: external_exports.enum([...MANAGER_EVENT_KINDS, UNKNOWN_EVENT_KIND]),
27896
+ kind: external_exports.enum([...MANAGER_EVENT_KINDS, UNKNOWN_EVENT_KIND, "issue"]),
27595
27897
  agentId: external_exports.string(),
27596
27898
  agentName: external_exports.string(),
27597
27899
  summary: external_exports.string(),
@@ -27599,13 +27901,13 @@ var init_manager_events = __esm({
27599
27901
  // Set when the subagent is a chat in this workspace rather than a ship; agentId is then that chat's id.
27600
27902
  chatId: external_exports.string().optional(),
27601
27903
  ticket: external_exports.object({ id: external_exports.string(), title: external_exports.string() }).optional(),
27904
+ issue: external_exports.object({ title: external_exports.string(), url: external_exports.string(), changes: external_exports.array(issueEventChangeSchema) }).optional(),
27602
27905
  // Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
27603
27906
  noticed: external_exports.boolean().optional()
27604
27907
  });
27605
- TAG = "multitask_event";
27606
- BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
27607
- ATTRIBUTE = /(\w+)="([^"]*)"/g;
27608
- unescapeAttribute = (value) => value.replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");
27908
+ TAG = MULTITASK_EVENT_TAG;
27909
+ BLOCK = tagBlockPattern(TAG);
27910
+ ISSUE_BLOCK = tagBlockPattern(ISSUE_EVENT_TAG);
27609
27911
  }
27610
27912
  });
27611
27913
 
@@ -35706,7 +36008,7 @@ var init_workspace_target = __esm({
35706
36008
  });
35707
36009
 
35708
36010
  // ../shared/src/manager-board.ts
35709
- var MANAGER_TICKET_LIMITS, L, tooLong, text3, clearable, httpsUrl, inlineMarkdown, markdown, linearIdentifier, mediaSchema, questionSchema, managerTicketTitleSchema, managerTicketTaskSchema, managerTicketMediaSchema, managerTicketQuestionsSchema, issueSchema, fixSchema, updateManagerTicketRequestSchema, updateManagerBoardRequestSchema, answerManagerTicketRequestSchema, managerTicketAnswerRefSchema, replyOnManagerTicketRequestSchema, managerTicketReplyRefSchema, managerTicketThreadSchema, LINEAR_ISSUE_SUMMARIES_MAX, linearIssueSummariesRequestSchema;
36011
+ var MANAGER_TICKET_LIMITS, L, tooLong, text3, clearable, httpsUrl, inlineMarkdown, markdown, linearIdentifier, mediaSchema, questionSchema, managerTicketTitleSchema, managerTicketTaskSchema, managerTicketMediaSchema, managerTicketQuestionsSchema, issueSchema2, fixSchema, updateManagerTicketRequestSchema, updateManagerBoardRequestSchema, answerManagerTicketRequestSchema, managerTicketAnswerRefSchema, replyOnManagerTicketRequestSchema, managerTicketReplyRefSchema, managerTicketThreadSchema, LINEAR_ISSUE_SUMMARIES_MAX, linearIssueSummariesRequestSchema;
35710
36012
  var init_manager_board = __esm({
35711
36013
  "../shared/src/manager-board.ts"() {
35712
36014
  "use strict";
@@ -35753,11 +36055,11 @@ var init_manager_board = __esm({
35753
36055
  managerTicketTaskSchema = text3(L.task);
35754
36056
  managerTicketMediaSchema = external_exports.array(mediaSchema);
35755
36057
  managerTicketQuestionsSchema = external_exports.array(questionSchema.extend({ id: external_exports.string() }));
35756
- issueSchema = clearable(text3(L.issue)).describe(`What was wrong or what was asked, in a few plain sentences a busy reader understands: the problem, not the fix. Carry the evidence: Slack and Linear threads as links, customer quotes in quotation marks, and screenshots in \`media\`. ${markdown} At most ${L.issue} characters.`);
36058
+ issueSchema2 = clearable(text3(L.issue)).describe(`What was wrong or what was asked, in a few plain sentences a busy reader understands: the problem, not the fix. Carry the evidence: Slack and Linear threads as links, customer quotes in quotation marks, and screenshots in \`media\`. ${markdown} At most ${L.issue} characters.`);
35757
36059
  fixSchema = clearable(text3(L.fix)).describe(`What was done or is being done about it, with pull requests as #number. Keep it current as the work goes on, and say how it ended once the pull requests land. ${markdown} At most ${L.fix} characters.`);
35758
36060
  updateManagerTicketRequestSchema = external_exports.object({
35759
36061
  title: managerTicketTitleSchema.optional(),
35760
- issue: issueSchema,
36062
+ issue: issueSchema2,
35761
36063
  fix: fixSchema,
35762
36064
  media: external_exports.array(mediaSchema).max(L.media).optional().describe(`Screenshots and recordings that show the result, uploaded with \`replicas media upload\`, at most ${L.media}. Replaces the ticket's media.`),
35763
36065
  questions: external_exports.array(questionSchema).max(L.questions).optional().describe(`Questions only the user can answer, at most ${L.questions}. Replaces the open ones; pass [] once they are answered. Their answer comes back to you in this chat.`),
@@ -35768,7 +36070,7 @@ var init_manager_board = __esm({
35768
36070
  tickets: external_exports.array(external_exports.object({
35769
36071
  id: external_exports.uuid(),
35770
36072
  title: managerTicketTitleSchema.optional(),
35771
- issue: issueSchema,
36073
+ issue: issueSchema2,
35772
36074
  fix: fixSchema,
35773
36075
  pull_requests: external_exports.array(httpsUrl).max(20).optional().describe("Pull request URLs that came out of this ticket's task. They move here from any other ticket. Each pull request is filed under the ticket its ship was working on when it opened it, so pass this only to correct that."),
35774
36076
  note: clearable(text3(L.note)).describe(`Your one short comment on the ticket, shown under its row, replacing the last. ${inlineMarkdown}. "" removes it. At most ${L.note} characters.`),
@@ -39390,7 +39692,19 @@ var init_keyboard_shortcuts = __esm({
39390
39692
  copyPullRequestGitHubLink: { label: "Copy GitHub link", group: "Review", prefix: "c", keys: { key: "g" } },
39391
39693
  copyPullRequest: { label: "Copy PR", group: "Review", prefix: "c", keys: { key: "p" } },
39392
39694
  openReviewChat: { label: "Start chat", group: "Review", keys: { key: ";", mod: true } },
39393
- mergePullRequest: { label: "Merge", group: "Review", keys: { key: "m" } }
39695
+ mergePullRequest: { label: "Merge", group: "Review", keys: { key: "m" } },
39696
+ createIssue: { label: "Create issue", group: "Issues", keys: { key: "c" } },
39697
+ setIssueStatus: { label: "Change status", group: "Issues", keys: { key: "s" } },
39698
+ setIssuePriority: { label: "Change priority", group: "Issues", keys: { key: "p" } },
39699
+ setIssueAssignees: { label: "Assign", group: "Issues", keys: { key: "a" } },
39700
+ nextIssue: { label: "Next issue", group: "Issues", keys: { key: "j" } },
39701
+ previousIssue: { label: "Previous issue", group: "Issues", keys: { key: "k" } },
39702
+ openIssue: { label: "Open issue", group: "Issues", keys: { key: "Enter" } },
39703
+ peekIssue: { label: "Peek issue", group: "Issues", keys: { key: " " } },
39704
+ selectIssue: { label: "Select issue", group: "Issues", keys: { key: "x" } },
39705
+ toggleIssueLayout: { label: "Switch list / board", group: "Issues", keys: { key: "b", mod: true, shift: true } },
39706
+ copyIssueIdentifier: { label: "Copy issue ID", group: "Issues", keys: { key: ".", mod: true } },
39707
+ copyIssueLink: { label: "Copy issue link", group: "Issues", keys: { key: ",", mod: true, shift: true } }
39394
39708
  };
39395
39709
  COMPOSER_SEND_SHORTCUTS = {
39396
39710
  enter: { send: KEYBOARD_SHORTCUTS.send, sendAlternate: KEYBOARD_SHORTCUTS.sendAlternate, newLine: KEYBOARD_SHORTCUTS.newLine },
@@ -39825,7 +40139,7 @@ var CLI_VERSION;
39825
40139
  var init_cli_version = __esm({
39826
40140
  "../shared/src/cli-version.ts"() {
39827
40141
  "use strict";
39828
- CLI_VERSION = "0.3.504";
40142
+ CLI_VERSION = "0.3.506";
39829
40143
  }
39830
40144
  });
39831
40145
 
@@ -50395,238 +50709,6 @@ var init_feature_flags = __esm({
50395
50709
  }
50396
50710
  });
50397
50711
 
50398
- // ../shared/src/routes/issues.ts
50399
- var ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ACTOR_TYPES, ISSUE_SUBSCRIBER_ROLES, ISSUE_RELATION_TYPES, ISSUE_PULL_REQUEST_STATES, issueStatusSchema, issuePrioritySchema, issueSubscriberRoleSchema, issueRelationTypeSchema, issuePullRequestStateSchema, issueActorSchema, ISSUE_KEY_RE, timestamp, nullableTimestamp, issueSchema2, issueSubscriberSchema, issueRelationSchema, issuePullRequestSchema, issueCommentSchema, change, nullableId, ISSUE_EVENT_TYPES, issueEventDataSchemas, issueEventBase, issueEventVariant, issueEventSchema, clientMutationId, title2, description, body, createIssueRequestSchema, updateIssueRequestSchema, issueActorRequestSchema, createIssueCommentRequestSchema, updateIssueCommentRequestSchema, createIssueRelationRequestSchema, linkIssuePullRequestRequestSchema, updateIssuePullRequestRequestSchema, issueMutationRequestSchema, updateIssueSettingsRequestSchema, listIssuesQuerySchema, issueDetailResponseSchema, listIssuesResponseSchema, issuesDeltaQuerySchema, issueInboxQuerySchema, markIssueInboxReadRequestSchema;
50400
- var init_issues2 = __esm({
50401
- "../shared/src/routes/issues.ts"() {
50402
- "use strict";
50403
- init_zod();
50404
- ISSUE_STATUSES = ["backlog", "todo", "in_progress", "in_review", "done", "canceled", "duplicate"];
50405
- ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
50406
- ISSUE_ACTOR_TYPES = ["user", "workspace"];
50407
- ISSUE_SUBSCRIBER_ROLES = ["assignee", "creator", "mentioned", "manual"];
50408
- ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
50409
- ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
50410
- issueStatusSchema = external_exports.enum(ISSUE_STATUSES);
50411
- issuePrioritySchema = external_exports.enum(ISSUE_PRIORITIES);
50412
- issueSubscriberRoleSchema = external_exports.enum(ISSUE_SUBSCRIBER_ROLES);
50413
- issueRelationTypeSchema = external_exports.enum(ISSUE_RELATION_TYPES);
50414
- issuePullRequestStateSchema = external_exports.enum(ISSUE_PULL_REQUEST_STATES);
50415
- issueActorSchema = external_exports.object({
50416
- type: external_exports.enum(ISSUE_ACTOR_TYPES),
50417
- id: external_exports.string().toLowerCase().uuid()
50418
- });
50419
- ISSUE_KEY_RE = /^[A-Z][A-Z0-9]{0,9}$/;
50420
- timestamp = external_exports.string();
50421
- nullableTimestamp = timestamp.nullable();
50422
- issueSchema2 = external_exports.object({
50423
- id: external_exports.string().uuid(),
50424
- organization_id: external_exports.string().uuid(),
50425
- number: external_exports.number().int(),
50426
- identifier: external_exports.string(),
50427
- title: external_exports.string(),
50428
- description: external_exports.string(),
50429
- status: issueStatusSchema,
50430
- priority: issuePrioritySchema,
50431
- parent_id: external_exports.string().uuid().nullable(),
50432
- manager_id: external_exports.string().uuid().nullable(),
50433
- creator: issueActorSchema,
50434
- /** Fractional: to move an issue between two others, send the midpoint of their sort orders. */
50435
- sort_order: external_exports.number(),
50436
- created_at: timestamp,
50437
- updated_at: timestamp,
50438
- completed_at: nullableTimestamp,
50439
- canceled_at: nullableTimestamp,
50440
- archived_at: nullableTimestamp
50441
- });
50442
- issueSubscriberSchema = external_exports.object({
50443
- issue_id: external_exports.string().uuid(),
50444
- subscriber: issueActorSchema,
50445
- role: issueSubscriberRoleSchema,
50446
- created_at: timestamp
50447
- });
50448
- issueRelationSchema = external_exports.object({
50449
- id: external_exports.string().uuid(),
50450
- type: issueRelationTypeSchema,
50451
- issue_id: external_exports.string().uuid(),
50452
- related_issue_id: external_exports.string().uuid(),
50453
- created_at: timestamp
50454
- });
50455
- issuePullRequestSchema = external_exports.object({
50456
- id: external_exports.string().uuid(),
50457
- issue_id: external_exports.string().uuid(),
50458
- url: external_exports.string(),
50459
- pull_request_id: external_exports.string().uuid().nullable(),
50460
- title: external_exports.string().nullable(),
50461
- state: issuePullRequestStateSchema,
50462
- created_at: timestamp,
50463
- updated_at: timestamp
50464
- });
50465
- issueCommentSchema = external_exports.object({
50466
- id: external_exports.string().uuid(),
50467
- issue_id: external_exports.string().uuid(),
50468
- author: issueActorSchema,
50469
- body: external_exports.string(),
50470
- created_at: timestamp,
50471
- updated_at: timestamp
50472
- });
50473
- change = (value) => external_exports.object({ from: value, to: value });
50474
- nullableId = external_exports.string().uuid().nullable();
50475
- ISSUE_EVENT_TYPES = [
50476
- "created",
50477
- "title_changed",
50478
- "description_changed",
50479
- "status_changed",
50480
- "priority_changed",
50481
- "parent_changed",
50482
- "manager_changed",
50483
- "sort_order_changed",
50484
- "assignee_added",
50485
- "assignee_removed",
50486
- "subscriber_added",
50487
- "subscriber_removed",
50488
- "relation_added",
50489
- "relation_removed",
50490
- "pr_linked",
50491
- "pr_unlinked",
50492
- "pr_state_changed",
50493
- "comment_added",
50494
- "comment_edited",
50495
- "comment_deleted",
50496
- "archived",
50497
- "restored"
50498
- ];
50499
- issueEventDataSchemas = {
50500
- created: external_exports.object({ issue: issueSchema2 }),
50501
- title_changed: change(external_exports.string()),
50502
- description_changed: change(external_exports.string()),
50503
- status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp }),
50504
- priority_changed: change(issuePrioritySchema),
50505
- parent_changed: change(nullableId),
50506
- manager_changed: change(nullableId),
50507
- sort_order_changed: change(external_exports.number()),
50508
- /** `subscriber` is the row after the change: an unassigned principal stays subscribed with role `manual`. */
50509
- assignee_added: external_exports.object({ subscriber: issueSubscriberSchema }),
50510
- assignee_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
50511
- subscriber_added: external_exports.object({ subscriber: issueSubscriberSchema }),
50512
- subscriber_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
50513
- relation_added: external_exports.object({ relation: issueRelationSchema }),
50514
- relation_removed: external_exports.object({ relation: issueRelationSchema }),
50515
- pr_linked: external_exports.object({ pull_request: issuePullRequestSchema }),
50516
- pr_unlinked: external_exports.object({ pull_request: issuePullRequestSchema }),
50517
- pr_state_changed: external_exports.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
50518
- comment_added: external_exports.object({ comment: issueCommentSchema }),
50519
- comment_edited: external_exports.object({ comment: issueCommentSchema, from: external_exports.string() }),
50520
- comment_deleted: external_exports.object({ comment: issueCommentSchema }),
50521
- archived: external_exports.object({ archived_at: timestamp }),
50522
- restored: external_exports.object({
50523
- issue: issueSchema2,
50524
- subscribers: external_exports.array(issueSubscriberSchema),
50525
- relations: external_exports.array(issueRelationSchema),
50526
- pull_requests: external_exports.array(issuePullRequestSchema)
50527
- })
50528
- };
50529
- issueEventBase = external_exports.object({
50530
- sync_id: external_exports.number().int(),
50531
- issue_id: external_exports.string().uuid(),
50532
- actor: issueActorSchema,
50533
- /** Echo of the `client_mutation_id` sent with the write, so the writer can settle its optimistic change. */
50534
- client_mutation_id: external_exports.string().nullable(),
50535
- created_at: timestamp
50536
- });
50537
- issueEventVariant = (type) => issueEventBase.extend({ type: external_exports.literal(type), data: issueEventDataSchemas[type] });
50538
- issueEventSchema = external_exports.discriminatedUnion("type", [issueEventVariant(ISSUE_EVENT_TYPES[0]), ...ISSUE_EVENT_TYPES.slice(1).map(issueEventVariant)]);
50539
- clientMutationId = external_exports.string().min(1).max(128).optional();
50540
- title2 = external_exports.string().trim().min(1).max(500);
50541
- description = external_exports.string().max(1e5);
50542
- body = external_exports.string().trim().min(1).max(1e5);
50543
- createIssueRequestSchema = external_exports.object({
50544
- /** Client-generated id, so an optimistic create can be referenced before the server answers. */
50545
- id: external_exports.string().uuid().optional(),
50546
- title: title2,
50547
- description: description.optional(),
50548
- status: issueStatusSchema.optional(),
50549
- priority: issuePrioritySchema.optional(),
50550
- parent_id: external_exports.string().uuid().optional(),
50551
- manager_id: external_exports.string().uuid().optional(),
50552
- sort_order: external_exports.number().finite().optional(),
50553
- assignees: external_exports.array(issueActorSchema).max(20).optional(),
50554
- subscribers: external_exports.array(issueActorSchema).max(50).optional(),
50555
- client_mutation_id: clientMutationId
50556
- });
50557
- updateIssueRequestSchema = external_exports.object({
50558
- title: title2.optional(),
50559
- description: description.optional(),
50560
- status: issueStatusSchema.optional(),
50561
- priority: issuePrioritySchema.optional(),
50562
- // PATCH semantics: null clears the parent or Manager, omitting it leaves it unchanged.
50563
- parent_id: nullableId.optional(),
50564
- manager_id: nullableId.optional(),
50565
- sort_order: external_exports.number().finite().optional(),
50566
- client_mutation_id: clientMutationId
50567
- });
50568
- issueActorRequestSchema = issueActorSchema.partial().extend({ client_mutation_id: clientMutationId });
50569
- createIssueCommentRequestSchema = external_exports.object({
50570
- id: external_exports.string().uuid().optional(),
50571
- body,
50572
- client_mutation_id: clientMutationId
50573
- });
50574
- updateIssueCommentRequestSchema = external_exports.object({ body, client_mutation_id: clientMutationId });
50575
- createIssueRelationRequestSchema = external_exports.object({
50576
- id: external_exports.string().uuid().optional(),
50577
- type: issueRelationTypeSchema,
50578
- related_issue: external_exports.string().min(1),
50579
- client_mutation_id: clientMutationId
50580
- });
50581
- linkIssuePullRequestRequestSchema = external_exports.object({
50582
- id: external_exports.string().uuid().optional(),
50583
- url: external_exports.string().url().max(2e3),
50584
- title: external_exports.string().max(500).optional(),
50585
- state: issuePullRequestStateSchema.optional(),
50586
- pull_request_id: external_exports.string().uuid().optional(),
50587
- client_mutation_id: clientMutationId
50588
- });
50589
- updateIssuePullRequestRequestSchema = external_exports.object({
50590
- state: issuePullRequestStateSchema,
50591
- client_mutation_id: clientMutationId
50592
- });
50593
- issueMutationRequestSchema = external_exports.object({ client_mutation_id: clientMutationId });
50594
- updateIssueSettingsRequestSchema = external_exports.object({ issue_key: external_exports.string().trim().toUpperCase().regex(ISSUE_KEY_RE) });
50595
- listIssuesQuerySchema = external_exports.object({
50596
- status: external_exports.string().optional(),
50597
- priority: external_exports.string().optional(),
50598
- assignee: external_exports.string().optional(),
50599
- subscriber: external_exports.string().optional(),
50600
- creator: external_exports.string().optional(),
50601
- manager_id: external_exports.string().optional(),
50602
- parent_id: external_exports.string().optional(),
50603
- q: external_exports.string().max(200).optional(),
50604
- include_archived: external_exports.enum(["true", "false"]).optional(),
50605
- limit: external_exports.coerce.number().int().min(1).max(200).optional(),
50606
- cursor: external_exports.coerce.number().int().min(0).max(2147483647).optional()
50607
- });
50608
- issueDetailResponseSchema = external_exports.object({
50609
- issue: issueSchema2,
50610
- subscribers: external_exports.array(issueSubscriberSchema),
50611
- relations: external_exports.array(issueRelationSchema),
50612
- pull_requests: external_exports.array(issuePullRequestSchema),
50613
- comments: external_exports.array(issueCommentSchema),
50614
- events: external_exports.array(issueEventSchema),
50615
- sub_issues: external_exports.array(issueSchema2)
50616
- });
50617
- listIssuesResponseSchema = external_exports.object({ issues: external_exports.array(issueSchema2), next_cursor: external_exports.number().nullable() });
50618
- issuesDeltaQuerySchema = external_exports.object({
50619
- after: external_exports.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
50620
- limit: external_exports.coerce.number().int().min(1).max(1e3).optional()
50621
- });
50622
- issueInboxQuerySchema = external_exports.object({
50623
- limit: external_exports.coerce.number().int().min(1).max(100).optional(),
50624
- before: external_exports.coerce.number().int().min(1).optional()
50625
- });
50626
- markIssueInboxReadRequestSchema = external_exports.object({ sync_id: external_exports.number().int().min(0).optional() });
50627
- }
50628
- });
50629
-
50630
50712
  // ../shared/src/routes/repo-files.ts
50631
50713
  var MAX_REPO_FILE_CONTENT_BYTES;
50632
50714
  var init_repo_files = __esm({
@@ -51053,6 +51135,8 @@ var init_src = __esm({
51053
51135
  init_slash_commands();
51054
51136
  init_keyboard_shortcuts();
51055
51137
  init_prompts();
51138
+ init_issue_events();
51139
+ init_tag_blocks();
51056
51140
  init_manager_events();
51057
51141
  init_message_origin();
51058
51142
  init_user_message_attachments();
@@ -56669,7 +56753,7 @@ var init_issue = __esm({
56669
56753
  result: external_exports.object({ content: external_exports.array(external_exports.object({ type: external_exports.string(), text: external_exports.string().optional() })).optional(), isError: external_exports.boolean().optional() }).optional(),
56670
56754
  error: external_exports.object({ message: external_exports.string() }).optional()
56671
56755
  });
56672
- mutationSchema = external_exports.object({ issue: issueSchema2 });
56756
+ mutationSchema = external_exports.object({ issue: issueSchema });
56673
56757
  csv = (value) => value?.split(",").map((entry) => entry.trim()).filter(Boolean).join(",");
56674
56758
  printMutation = ({ issue: issue3 }) => console.log(`${import_chalk29.default.green("\u2713")} ${import_chalk29.default.cyan(issue3.identifier)} ${issue3.title} (${issue3.status})`);
56675
56759
  }
@@ -58409,7 +58493,7 @@ ${VISUAL_PAGE_RULES}`).action(run(visualizeCommand));
58409
58493
  cmds.length = 0;
58410
58494
  cmds.push(...kept);
58411
58495
  }
58412
- if (process.argv[2] !== "identity") startUpdateCheck(CLI_VERSION);
58496
+ if (process.argv[2] !== "identity" && !isAgentMode()) startUpdateCheck(CLI_VERSION);
58413
58497
  program.parse();
58414
58498
  }
58415
58499
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.504",
3
+ "version": "0.3.506",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {