replicas-cli 0.3.511 → 0.3.513
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.cjs +284 -272
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21776,6 +21776,12 @@ async function fetchWithRedirects(url2, init, attempt = 0) {
|
|
|
21776
21776
|
}
|
|
21777
21777
|
return response;
|
|
21778
21778
|
}
|
|
21779
|
+
async function readApiErrorBody(response) {
|
|
21780
|
+
const payload = await response.json().catch(() => null);
|
|
21781
|
+
const body2 = payload && typeof payload === "object" ? Object.fromEntries(Object.entries(payload)) : {};
|
|
21782
|
+
const field2 = (key) => typeof body2[key] === "string" ? body2[key] : void 0;
|
|
21783
|
+
return { error: field2("error"), code: field2("code"), details: field2("details"), organizationId: field2("organization_id") };
|
|
21784
|
+
}
|
|
21779
21785
|
var REDIRECT_STATUSES, MAX_REDIRECTS;
|
|
21780
21786
|
var init_api_request = __esm({
|
|
21781
21787
|
"../shared/src/api-request.ts"() {
|
|
@@ -24570,11 +24576,263 @@ replicas gpu delete
|
|
|
24570
24576
|
}
|
|
24571
24577
|
});
|
|
24572
24578
|
|
|
24573
|
-
// ../shared/src/
|
|
24574
|
-
var
|
|
24579
|
+
// ../shared/src/routes/issues.ts
|
|
24580
|
+
var ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ACTOR_TYPES, ISSUE_SUBSCRIBER_ROLES, ISSUE_RELATION_TYPES, ISSUE_PULL_REQUEST_STATES, normalizeIssueStatus, 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, title, description, body, createIssueRequestSchema, updateIssueRequestSchema, issueActorRequestSchema, createIssueCommentRequestSchema, updateIssueCommentRequestSchema, createIssueRelationRequestSchema, linkIssuePullRequestRequestSchema, updateIssuePullRequestRequestSchema, issueMutationRequestSchema, updateIssueSettingsRequestSchema, listIssuesQuerySchema, issueDetailResponseSchema, listIssuesResponseSchema, issuesDeltaQuerySchema, issueInboxQuerySchema, markIssueInboxReadRequestSchema, ISSUE_COMMANDS;
|
|
24575
24581
|
var init_issues = __esm({
|
|
24582
|
+
"../shared/src/routes/issues.ts"() {
|
|
24583
|
+
"use strict";
|
|
24584
|
+
init_zod();
|
|
24585
|
+
ISSUE_STATUSES = ["backlog", "todo", "in_progress", "review", "approved", "done", "canceled", "duplicate"];
|
|
24586
|
+
ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
|
|
24587
|
+
ISSUE_ACTOR_TYPES = ["user", "workspace", "system"];
|
|
24588
|
+
ISSUE_SUBSCRIBER_ROLES = ["assignee", "creator", "mentioned", "manual"];
|
|
24589
|
+
ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
|
|
24590
|
+
ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
|
|
24591
|
+
normalizeIssueStatus = (status) => status === "in_review" ? "review" : status;
|
|
24592
|
+
issueStatusSchema = external_exports.preprocess((value) => typeof value === "string" ? normalizeIssueStatus(value) : value, external_exports.enum(ISSUE_STATUSES));
|
|
24593
|
+
issuePrioritySchema = external_exports.enum(ISSUE_PRIORITIES);
|
|
24594
|
+
issueSubscriberRoleSchema = external_exports.enum(ISSUE_SUBSCRIBER_ROLES);
|
|
24595
|
+
issueRelationTypeSchema = external_exports.enum(ISSUE_RELATION_TYPES);
|
|
24596
|
+
issuePullRequestStateSchema = external_exports.enum(ISSUE_PULL_REQUEST_STATES);
|
|
24597
|
+
ISSUE_STATUS_LABELS = { backlog: "Backlog", todo: "Todo", in_progress: "In Progress", review: "Review", approved: "Approved", done: "Done", canceled: "Canceled", duplicate: "Duplicate" };
|
|
24598
|
+
ISSUE_PRIORITY_LABELS = { none: "No priority", urgent: "Urgent", high: "High", medium: "Medium", low: "Low" };
|
|
24599
|
+
issueActorSchema = external_exports.object({
|
|
24600
|
+
type: external_exports.enum(ISSUE_ACTOR_TYPES),
|
|
24601
|
+
id: external_exports.string().toLowerCase().uuid()
|
|
24602
|
+
});
|
|
24603
|
+
ISSUE_KEY_RE = /^[A-Z][A-Z0-9]{0,9}$/;
|
|
24604
|
+
timestamp = external_exports.string();
|
|
24605
|
+
nullableTimestamp = timestamp.nullable();
|
|
24606
|
+
issueSchema = external_exports.object({
|
|
24607
|
+
id: external_exports.string().uuid(),
|
|
24608
|
+
organization_id: external_exports.string().uuid(),
|
|
24609
|
+
number: external_exports.number().int(),
|
|
24610
|
+
identifier: external_exports.string(),
|
|
24611
|
+
title: external_exports.string(),
|
|
24612
|
+
description: external_exports.string(),
|
|
24613
|
+
status: issueStatusSchema,
|
|
24614
|
+
priority: issuePrioritySchema,
|
|
24615
|
+
parent_id: external_exports.string().uuid().nullable(),
|
|
24616
|
+
manager_id: external_exports.string().uuid().nullable(),
|
|
24617
|
+
creator: issueActorSchema,
|
|
24618
|
+
/** Fractional: to move an issue between two others, send the midpoint of their sort orders. */
|
|
24619
|
+
sort_order: external_exports.number(),
|
|
24620
|
+
created_at: timestamp,
|
|
24621
|
+
updated_at: timestamp,
|
|
24622
|
+
completed_at: nullableTimestamp,
|
|
24623
|
+
canceled_at: nullableTimestamp,
|
|
24624
|
+
archived_at: nullableTimestamp
|
|
24625
|
+
});
|
|
24626
|
+
issueSubscriberSchema = external_exports.object({
|
|
24627
|
+
issue_id: external_exports.string().uuid(),
|
|
24628
|
+
subscriber: issueActorSchema,
|
|
24629
|
+
role: issueSubscriberRoleSchema,
|
|
24630
|
+
created_at: timestamp
|
|
24631
|
+
});
|
|
24632
|
+
issueRelationSchema = external_exports.object({
|
|
24633
|
+
id: external_exports.string().uuid(),
|
|
24634
|
+
type: issueRelationTypeSchema,
|
|
24635
|
+
issue_id: external_exports.string().uuid(),
|
|
24636
|
+
related_issue_id: external_exports.string().uuid(),
|
|
24637
|
+
created_at: timestamp
|
|
24638
|
+
});
|
|
24639
|
+
issuePullRequestSchema = external_exports.object({
|
|
24640
|
+
id: external_exports.string().uuid(),
|
|
24641
|
+
issue_id: external_exports.string().uuid(),
|
|
24642
|
+
url: external_exports.string(),
|
|
24643
|
+
pull_request_id: external_exports.string().uuid().nullable(),
|
|
24644
|
+
title: external_exports.string().nullable(),
|
|
24645
|
+
state: issuePullRequestStateSchema,
|
|
24646
|
+
approved: external_exports.boolean(),
|
|
24647
|
+
created_at: timestamp,
|
|
24648
|
+
updated_at: timestamp
|
|
24649
|
+
});
|
|
24650
|
+
issueCommentSchema = external_exports.object({
|
|
24651
|
+
id: external_exports.string().uuid(),
|
|
24652
|
+
issue_id: external_exports.string().uuid(),
|
|
24653
|
+
author: issueActorSchema,
|
|
24654
|
+
body: external_exports.string(),
|
|
24655
|
+
created_at: timestamp,
|
|
24656
|
+
updated_at: timestamp
|
|
24657
|
+
});
|
|
24658
|
+
change = (value) => external_exports.object({ from: value, to: value });
|
|
24659
|
+
nullableId = external_exports.string().uuid().nullable();
|
|
24660
|
+
ISSUE_EVENT_TYPES = [
|
|
24661
|
+
"created",
|
|
24662
|
+
"title_changed",
|
|
24663
|
+
"description_changed",
|
|
24664
|
+
"status_changed",
|
|
24665
|
+
"priority_changed",
|
|
24666
|
+
"parent_changed",
|
|
24667
|
+
"manager_changed",
|
|
24668
|
+
"sort_order_changed",
|
|
24669
|
+
"assignee_added",
|
|
24670
|
+
"assignee_removed",
|
|
24671
|
+
"subscriber_added",
|
|
24672
|
+
"subscriber_removed",
|
|
24673
|
+
"relation_added",
|
|
24674
|
+
"relation_removed",
|
|
24675
|
+
"pr_linked",
|
|
24676
|
+
"pr_unlinked",
|
|
24677
|
+
"pr_state_changed",
|
|
24678
|
+
"comment_added",
|
|
24679
|
+
"comment_edited",
|
|
24680
|
+
"comment_deleted",
|
|
24681
|
+
"archived",
|
|
24682
|
+
"restored"
|
|
24683
|
+
];
|
|
24684
|
+
issueEventDataSchemas = {
|
|
24685
|
+
created: external_exports.object({ issue: issueSchema }),
|
|
24686
|
+
title_changed: change(external_exports.string()),
|
|
24687
|
+
description_changed: change(external_exports.string()),
|
|
24688
|
+
status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp, reason: external_exports.string().optional() }),
|
|
24689
|
+
priority_changed: change(issuePrioritySchema),
|
|
24690
|
+
parent_changed: change(nullableId),
|
|
24691
|
+
manager_changed: change(nullableId),
|
|
24692
|
+
sort_order_changed: change(external_exports.number()),
|
|
24693
|
+
/** `subscriber` is the row after the change: an unassigned principal stays subscribed with role `manual`. */
|
|
24694
|
+
assignee_added: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
24695
|
+
assignee_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
24696
|
+
subscriber_added: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
24697
|
+
subscriber_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
24698
|
+
relation_added: external_exports.object({ relation: issueRelationSchema }),
|
|
24699
|
+
relation_removed: external_exports.object({ relation: issueRelationSchema }),
|
|
24700
|
+
pr_linked: external_exports.object({ pull_request: issuePullRequestSchema }),
|
|
24701
|
+
pr_unlinked: external_exports.object({ pull_request: issuePullRequestSchema }),
|
|
24702
|
+
pr_state_changed: external_exports.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
|
|
24703
|
+
comment_added: external_exports.object({ comment: issueCommentSchema }),
|
|
24704
|
+
comment_edited: external_exports.object({ comment: issueCommentSchema, from: external_exports.string() }),
|
|
24705
|
+
comment_deleted: external_exports.object({ comment: issueCommentSchema }),
|
|
24706
|
+
archived: external_exports.object({ archived_at: timestamp }),
|
|
24707
|
+
restored: external_exports.object({
|
|
24708
|
+
issue: issueSchema,
|
|
24709
|
+
subscribers: external_exports.array(issueSubscriberSchema),
|
|
24710
|
+
relations: external_exports.array(issueRelationSchema),
|
|
24711
|
+
pull_requests: external_exports.array(issuePullRequestSchema)
|
|
24712
|
+
})
|
|
24713
|
+
};
|
|
24714
|
+
issueEventBase = external_exports.object({
|
|
24715
|
+
sync_id: external_exports.number().int(),
|
|
24716
|
+
issue_id: external_exports.string().uuid(),
|
|
24717
|
+
actor: issueActorSchema,
|
|
24718
|
+
/** Echo of the `client_mutation_id` sent with the write, so the writer can settle its optimistic change. */
|
|
24719
|
+
client_mutation_id: external_exports.string().nullable(),
|
|
24720
|
+
created_at: timestamp
|
|
24721
|
+
});
|
|
24722
|
+
issueEventVariant = (type) => issueEventBase.extend({ type: external_exports.literal(type), data: issueEventDataSchemas[type] });
|
|
24723
|
+
issueEventSchema = external_exports.discriminatedUnion("type", [issueEventVariant(ISSUE_EVENT_TYPES[0]), ...ISSUE_EVENT_TYPES.slice(1).map(issueEventVariant)]);
|
|
24724
|
+
clientMutationId = external_exports.string().min(1).max(128).optional();
|
|
24725
|
+
title = external_exports.string().trim().min(1).max(500);
|
|
24726
|
+
description = external_exports.string().max(1e5);
|
|
24727
|
+
body = external_exports.string().trim().min(1).max(1e5);
|
|
24728
|
+
createIssueRequestSchema = external_exports.object({
|
|
24729
|
+
/** Client-generated id, so an optimistic create can be referenced before the server answers. */
|
|
24730
|
+
id: external_exports.string().uuid().optional(),
|
|
24731
|
+
title,
|
|
24732
|
+
description: description.optional(),
|
|
24733
|
+
status: issueStatusSchema.optional(),
|
|
24734
|
+
priority: issuePrioritySchema.optional(),
|
|
24735
|
+
parent_id: external_exports.string().uuid().optional(),
|
|
24736
|
+
manager_id: external_exports.string().uuid().optional(),
|
|
24737
|
+
sort_order: external_exports.number().finite().optional(),
|
|
24738
|
+
assignees: external_exports.array(issueActorSchema).max(20).optional(),
|
|
24739
|
+
subscribers: external_exports.array(issueActorSchema).max(50).optional(),
|
|
24740
|
+
client_mutation_id: clientMutationId
|
|
24741
|
+
});
|
|
24742
|
+
updateIssueRequestSchema = external_exports.object({
|
|
24743
|
+
title: title.optional(),
|
|
24744
|
+
description: description.optional(),
|
|
24745
|
+
status: issueStatusSchema.optional(),
|
|
24746
|
+
priority: issuePrioritySchema.optional(),
|
|
24747
|
+
// PATCH semantics: null clears the parent or Manager, omitting it leaves it unchanged.
|
|
24748
|
+
parent_id: nullableId.optional(),
|
|
24749
|
+
manager_id: nullableId.optional(),
|
|
24750
|
+
sort_order: external_exports.number().finite().optional(),
|
|
24751
|
+
client_mutation_id: clientMutationId
|
|
24752
|
+
});
|
|
24753
|
+
issueActorRequestSchema = issueActorSchema.partial().extend({ client_mutation_id: clientMutationId });
|
|
24754
|
+
createIssueCommentRequestSchema = external_exports.object({
|
|
24755
|
+
id: external_exports.string().uuid().optional(),
|
|
24756
|
+
body,
|
|
24757
|
+
client_mutation_id: clientMutationId
|
|
24758
|
+
});
|
|
24759
|
+
updateIssueCommentRequestSchema = external_exports.object({ body, client_mutation_id: clientMutationId });
|
|
24760
|
+
createIssueRelationRequestSchema = external_exports.object({
|
|
24761
|
+
id: external_exports.string().uuid().optional(),
|
|
24762
|
+
type: issueRelationTypeSchema,
|
|
24763
|
+
related_issue: external_exports.string().min(1),
|
|
24764
|
+
client_mutation_id: clientMutationId
|
|
24765
|
+
});
|
|
24766
|
+
linkIssuePullRequestRequestSchema = external_exports.object({
|
|
24767
|
+
id: external_exports.string().uuid().optional(),
|
|
24768
|
+
url: external_exports.string().url().max(2e3),
|
|
24769
|
+
title: external_exports.string().max(500).optional(),
|
|
24770
|
+
state: issuePullRequestStateSchema.optional(),
|
|
24771
|
+
pull_request_id: external_exports.string().uuid().optional(),
|
|
24772
|
+
client_mutation_id: clientMutationId
|
|
24773
|
+
});
|
|
24774
|
+
updateIssuePullRequestRequestSchema = external_exports.object({
|
|
24775
|
+
state: issuePullRequestStateSchema,
|
|
24776
|
+
client_mutation_id: clientMutationId
|
|
24777
|
+
});
|
|
24778
|
+
issueMutationRequestSchema = external_exports.object({ client_mutation_id: clientMutationId });
|
|
24779
|
+
updateIssueSettingsRequestSchema = external_exports.object({ issue_key: external_exports.string().trim().toUpperCase().regex(ISSUE_KEY_RE) });
|
|
24780
|
+
listIssuesQuerySchema = external_exports.object({
|
|
24781
|
+
status: external_exports.string().optional(),
|
|
24782
|
+
priority: external_exports.string().optional(),
|
|
24783
|
+
assignee: external_exports.string().optional(),
|
|
24784
|
+
subscriber: external_exports.string().optional(),
|
|
24785
|
+
creator: external_exports.string().optional(),
|
|
24786
|
+
manager_id: external_exports.string().optional(),
|
|
24787
|
+
parent_id: external_exports.string().optional(),
|
|
24788
|
+
q: external_exports.string().max(200).optional(),
|
|
24789
|
+
include_archived: external_exports.enum(["true", "false"]).optional(),
|
|
24790
|
+
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
24791
|
+
cursor: external_exports.coerce.number().int().min(0).max(2147483647).optional()
|
|
24792
|
+
});
|
|
24793
|
+
issueDetailResponseSchema = external_exports.object({
|
|
24794
|
+
issue: issueSchema,
|
|
24795
|
+
subscribers: external_exports.array(issueSubscriberSchema),
|
|
24796
|
+
relations: external_exports.array(issueRelationSchema),
|
|
24797
|
+
pull_requests: external_exports.array(issuePullRequestSchema),
|
|
24798
|
+
comments: external_exports.array(issueCommentSchema),
|
|
24799
|
+
events: external_exports.array(issueEventSchema),
|
|
24800
|
+
sub_issues: external_exports.array(issueSchema)
|
|
24801
|
+
});
|
|
24802
|
+
listIssuesResponseSchema = external_exports.object({ issues: external_exports.array(issueSchema), next_cursor: external_exports.number().nullable() });
|
|
24803
|
+
issuesDeltaQuerySchema = external_exports.object({
|
|
24804
|
+
after: external_exports.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
24805
|
+
limit: external_exports.coerce.number().int().min(1).max(1e3).optional()
|
|
24806
|
+
});
|
|
24807
|
+
issueInboxQuerySchema = external_exports.object({
|
|
24808
|
+
limit: external_exports.coerce.number().int().min(1).max(100).optional(),
|
|
24809
|
+
before: external_exports.coerce.number().int().min(1).optional()
|
|
24810
|
+
});
|
|
24811
|
+
markIssueInboxReadRequestSchema = external_exports.object({ sync_id: external_exports.number().int().min(0).optional() });
|
|
24812
|
+
ISSUE_COMMANDS = {
|
|
24813
|
+
create: "create",
|
|
24814
|
+
update: "update",
|
|
24815
|
+
get: "get",
|
|
24816
|
+
list: "list",
|
|
24817
|
+
comment: "comment",
|
|
24818
|
+
assign: "assign",
|
|
24819
|
+
unassign: "unassign",
|
|
24820
|
+
subscribe: "subscribe",
|
|
24821
|
+
unsubscribe: "unsubscribe",
|
|
24822
|
+
linkPr: "link-pr",
|
|
24823
|
+
unlinkPr: "unlink-pr",
|
|
24824
|
+
relate: "relate"
|
|
24825
|
+
};
|
|
24826
|
+
}
|
|
24827
|
+
});
|
|
24828
|
+
|
|
24829
|
+
// ../shared/src/default-skills/replicas-agent/abilities/issues.ts
|
|
24830
|
+
var codeList, SECTION7, REFERENCE7, ISSUES_ABILITY;
|
|
24831
|
+
var init_issues2 = __esm({
|
|
24576
24832
|
"../shared/src/default-skills/replicas-agent/abilities/issues.ts"() {
|
|
24577
24833
|
"use strict";
|
|
24834
|
+
init_issues();
|
|
24835
|
+
codeList = (values) => values.map((value) => `\`${value}\``).join(", ");
|
|
24578
24836
|
SECTION7 = `### Issues
|
|
24579
24837
|
Track work in Replicas Issues (\`REP-42\`), the shared to-do list of the people and agents in this organization, with \`replicas issue\`.
|
|
24580
24838
|
|
|
@@ -24609,7 +24867,7 @@ replicas issue unlink-pr REP-42 https://github.com/acme/app/pull/12
|
|
|
24609
24867
|
replicas issue relate REP-42 blocks REP-43 | duplicate_of REP-40
|
|
24610
24868
|
\`\`\`
|
|
24611
24869
|
|
|
24612
|
-
Statuses:
|
|
24870
|
+
Statuses: ${codeList(ISSUE_STATUSES)}. Priorities: ${codeList(ISSUE_PRIORITIES)}.
|
|
24613
24871
|
|
|
24614
24872
|
## Events
|
|
24615
24873
|
|
|
@@ -24625,13 +24883,14 @@ Read the event and act only when it asks something of you: a person's question o
|
|
|
24625
24883
|
|
|
24626
24884
|
**Keep the status true as you go:**
|
|
24627
24885
|
1. \`in_progress\` when you start.
|
|
24628
|
-
2.
|
|
24629
|
-
3.
|
|
24630
|
-
|
|
24631
|
-
**Statuses mean exactly this**, so a person can read only
|
|
24632
|
-
- \`in_progress\`: work is underway,
|
|
24633
|
-
- \`
|
|
24634
|
-
- \`
|
|
24886
|
+
2. When you open a pull request for the issue, link it with \`replicas issue link-pr\` and comment "Ready for review: <url>". Link only pull requests that do this issue's work, one pull request per issue where you can. Nothing links on its own: \`Fixes REP-42\` in a pull request body is only documentation. Move the issue to \`review\` once it waits only on a person, and assign that person.
|
|
24887
|
+
3. Linked pull requests then move the status: when every one is approved (merged counts), Replicas moves the issue to \`approved\`, and when every one is merged, to \`done\`. Pull requests closed without merging don't count. Each move arrives as an \`<issue_event>\` from Replicas. You still own the result: when it isn't really done (more work is left, or a deploy needs watching), move it back and say why.
|
|
24888
|
+
|
|
24889
|
+
**Statuses mean exactly this**, so a person can read only Review and trust the rest:
|
|
24890
|
+
- \`in_progress\`: work is underway: a check is failing, the pull request has conflicts, review comments need answering, work is missing, or it waits on another pull request.
|
|
24891
|
+
- \`review\`: waiting only on a person. A linked pull request is open with no conflicts and nothing failing (CI rerunning after a push is fine), and needs someone's review or approval; assign that person. Move it back to \`in_progress\` only for a conflict, a failing check or missing work, never just because something was pushed, so issues don't bounce.
|
|
24892
|
+
- \`approved\`: every linked pull request is approved, so nothing waits on a person; it just isn't merged or live yet.
|
|
24893
|
+
- \`done\`: every linked pull request it needs is merged (and deployed when that matters), and nothing is left.
|
|
24635
24894
|
- \`canceled\`: dropped, with a comment saying why.
|
|
24636
24895
|
|
|
24637
24896
|
Keep every property true at all times: status, assignee, linked pull requests (link only the pull requests that do this issue's work; unlink wrong ones with \`replicas issue unlink-pr\` or the app), and the description, when the plan changes. Before ending a turn, check that your issues' statuses match reality.
|
|
@@ -26461,7 +26720,7 @@ var init_registry = __esm({
|
|
|
26461
26720
|
init_github2();
|
|
26462
26721
|
init_gitlab();
|
|
26463
26722
|
init_gpu();
|
|
26464
|
-
|
|
26723
|
+
init_issues2();
|
|
26465
26724
|
init_linear3();
|
|
26466
26725
|
init_local_computer();
|
|
26467
26726
|
init_macos();
|
|
@@ -27126,7 +27385,7 @@ var init_environment_config_source = __esm({
|
|
|
27126
27385
|
});
|
|
27127
27386
|
|
|
27128
27387
|
// ../shared/src/replicas-mcp.ts
|
|
27129
|
-
var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel,
|
|
27388
|
+
var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title2, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
|
|
27130
27389
|
var init_replicas_mcp = __esm({
|
|
27131
27390
|
"../shared/src/replicas-mcp.ts"() {
|
|
27132
27391
|
"use strict";
|
|
@@ -27237,9 +27496,9 @@ var init_replicas_mcp = __esm({
|
|
|
27237
27496
|
scope: external_exports.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
27238
27497
|
});
|
|
27239
27498
|
chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
|
|
27240
|
-
({ provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape);
|
|
27499
|
+
({ provider, model, thinkingLevel, title: title2, message } = forkChatRequestSchema.shape);
|
|
27241
27500
|
createChatToolInputSchema = external_exports.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
27242
|
-
forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
27501
|
+
forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title: title2, message });
|
|
27243
27502
|
renameChatToolInputSchema = external_exports.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
27244
27503
|
runCommandToolInputSchema = external_exports.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
27245
27504
|
environmentMcpPath = { environment_id: external_exports.string().describe("Environment ID") };
|
|
@@ -27493,7 +27752,7 @@ ${MERGE_RULE}
|
|
|
27493
27752
|
${chatRule("the board", "a finding that changes the answer, a ship you started, or a decision you need")}
|
|
27494
27753
|
`;
|
|
27495
27754
|
ISSUE_RULES = `- Your work lives in issues in your slice of the organization's Issues, which the Issues tab beside this chat shows the user. Before delegating, turn a request into issues with \`replicas issue create\`: one per independent task, so five small bugs are five issues, and a parent with sub-issues for a big project. Reuse an issue the request is about; find it with \`replicas issue list\`. A title says what the task is about, never a ship, branch or pull request name.
|
|
27496
|
-
- Spawn ships with \`issue\`, and pass \`issue\` to \`${REPLICAS_MCP_TOOLS.messageSubagent}\` to point a ship at another one: it is assigned, subscribed and told. Several ships can share an issue. Replicas moves an issue to In progress when a ship starts it. Ships link their pull requests with \`replicas issue link-pr\`, move the issue to
|
|
27755
|
+
- Spawn ships with \`issue\`, and pass \`issue\` to \`${REPLICAS_MCP_TOOLS.messageSubagent}\` to point a ship at another one: it is assigned, subscribed and told. Several ships can share an issue. Replicas moves an issue to In progress when a ship starts it. Ships link their pull requests with \`replicas issue link-pr\`, move the issue to Review themselves, and comment their progress, so never restate what an issue shows. Linked pull requests then move the status: Replicas moves an issue to Approved when every linked pull request is approved, and to Done when every one is merged, and each move reaches you as an \`<issue_event>\`. Nothing links on its own, so when a ship is asleep, link its pull request yourself if it isn't linked, and move the issue back when a move isn't really true. Give a ship one issue per pull request where you can. Statuses mean exactly this: In progress, work underway (a failing check, conflicts, review comments to answer, missing work, or waiting on another pull request); Review, waiting only on a person, with a linked pull request open, no conflicts and nothing failing (CI rerunning after a push is fine), and the person who must review or approve it assigned (move it back to In progress only for a conflict, a failing check or missing work, never just because something was pushed, so issues don't bounce); Approved, every linked pull request approved but not yet merged or live; Done, every linked pull request it needs merged (and deployed when that matters) and nothing left; Canceled, dropped, with a comment saying why. Keep every property true at all times: status, assignee, linked pull requests (link only the pull requests that do this issue's work; unlink wrong ones with \`replicas issue unlink-pr\` or the app), and the description, when the plan changes. Before ending a turn, check that your issues' statuses match reality, including those of ships that are asleep. Order, reprioritize or cancel issues with \`replicas issue update\`.
|
|
27497
27756
|
- You are subscribed to every issue in your slice: comments and changes by ships and people arrive as \`<issue_event>\` blocks. Act on them like ship events. Ships assigned to an issue get its comments too, so never relay a comment to them; pass it only to a ship that isn't on the issue.
|
|
27498
27757
|
- Ask the user only for decisions you truly can't make. Make routine calls yourself, such as retries, small scope choices or test cleanup. For a decision or merge only they can give, assign them to the issue with \`replicas issue assign\` and comment the question with \`replicas issue comment\`; their reply comes back as an \`<issue_event>\`. Once they answer a question you asked, unassign them with \`replicas issue unassign\` so the issue leaves their "Assigned to you"; they stay subscribed. Ships ask and unassign for their own questions, so leave those to them.
|
|
27499
27758
|
- A ship with open pull requests is not done when it sends \`finished\`: Replicas fixes their CI failures and review comments automatically, then sends \`ready\` or \`needs_attention\`. On \`needs_attention\`, direct the ship, or assign the user only if you can't decide. On \`ready\` for a pull request that needs a person's review, assign the user with a one-line comment.
|
|
@@ -27578,254 +27837,6 @@ var init_tag_blocks = __esm({
|
|
|
27578
27837
|
}
|
|
27579
27838
|
});
|
|
27580
27839
|
|
|
27581
|
-
// ../shared/src/routes/issues.ts
|
|
27582
|
-
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, ISSUE_COMMANDS;
|
|
27583
|
-
var init_issues2 = __esm({
|
|
27584
|
-
"../shared/src/routes/issues.ts"() {
|
|
27585
|
-
"use strict";
|
|
27586
|
-
init_zod();
|
|
27587
|
-
ISSUE_STATUSES = ["backlog", "todo", "in_progress", "in_review", "done", "canceled", "duplicate"];
|
|
27588
|
-
ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
|
|
27589
|
-
ISSUE_ACTOR_TYPES = ["user", "workspace"];
|
|
27590
|
-
ISSUE_SUBSCRIBER_ROLES = ["assignee", "creator", "mentioned", "manual"];
|
|
27591
|
-
ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
|
|
27592
|
-
ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
|
|
27593
|
-
issueStatusSchema = external_exports.enum(ISSUE_STATUSES);
|
|
27594
|
-
issuePrioritySchema = external_exports.enum(ISSUE_PRIORITIES);
|
|
27595
|
-
issueSubscriberRoleSchema = external_exports.enum(ISSUE_SUBSCRIBER_ROLES);
|
|
27596
|
-
issueRelationTypeSchema = external_exports.enum(ISSUE_RELATION_TYPES);
|
|
27597
|
-
issuePullRequestStateSchema = external_exports.enum(ISSUE_PULL_REQUEST_STATES);
|
|
27598
|
-
ISSUE_STATUS_LABELS = { backlog: "Backlog", todo: "Todo", in_progress: "In Progress", in_review: "In Review", done: "Done", canceled: "Canceled", duplicate: "Duplicate" };
|
|
27599
|
-
ISSUE_PRIORITY_LABELS = { none: "No priority", urgent: "Urgent", high: "High", medium: "Medium", low: "Low" };
|
|
27600
|
-
issueActorSchema = external_exports.object({
|
|
27601
|
-
type: external_exports.enum(ISSUE_ACTOR_TYPES),
|
|
27602
|
-
id: external_exports.string().toLowerCase().uuid()
|
|
27603
|
-
});
|
|
27604
|
-
ISSUE_KEY_RE = /^[A-Z][A-Z0-9]{0,9}$/;
|
|
27605
|
-
timestamp = external_exports.string();
|
|
27606
|
-
nullableTimestamp = timestamp.nullable();
|
|
27607
|
-
issueSchema = external_exports.object({
|
|
27608
|
-
id: external_exports.string().uuid(),
|
|
27609
|
-
organization_id: external_exports.string().uuid(),
|
|
27610
|
-
number: external_exports.number().int(),
|
|
27611
|
-
identifier: external_exports.string(),
|
|
27612
|
-
title: external_exports.string(),
|
|
27613
|
-
description: external_exports.string(),
|
|
27614
|
-
status: issueStatusSchema,
|
|
27615
|
-
priority: issuePrioritySchema,
|
|
27616
|
-
parent_id: external_exports.string().uuid().nullable(),
|
|
27617
|
-
manager_id: external_exports.string().uuid().nullable(),
|
|
27618
|
-
creator: issueActorSchema,
|
|
27619
|
-
/** Fractional: to move an issue between two others, send the midpoint of their sort orders. */
|
|
27620
|
-
sort_order: external_exports.number(),
|
|
27621
|
-
created_at: timestamp,
|
|
27622
|
-
updated_at: timestamp,
|
|
27623
|
-
completed_at: nullableTimestamp,
|
|
27624
|
-
canceled_at: nullableTimestamp,
|
|
27625
|
-
archived_at: nullableTimestamp
|
|
27626
|
-
});
|
|
27627
|
-
issueSubscriberSchema = external_exports.object({
|
|
27628
|
-
issue_id: external_exports.string().uuid(),
|
|
27629
|
-
subscriber: issueActorSchema,
|
|
27630
|
-
role: issueSubscriberRoleSchema,
|
|
27631
|
-
created_at: timestamp
|
|
27632
|
-
});
|
|
27633
|
-
issueRelationSchema = external_exports.object({
|
|
27634
|
-
id: external_exports.string().uuid(),
|
|
27635
|
-
type: issueRelationTypeSchema,
|
|
27636
|
-
issue_id: external_exports.string().uuid(),
|
|
27637
|
-
related_issue_id: external_exports.string().uuid(),
|
|
27638
|
-
created_at: timestamp
|
|
27639
|
-
});
|
|
27640
|
-
issuePullRequestSchema = external_exports.object({
|
|
27641
|
-
id: external_exports.string().uuid(),
|
|
27642
|
-
issue_id: external_exports.string().uuid(),
|
|
27643
|
-
url: external_exports.string(),
|
|
27644
|
-
pull_request_id: external_exports.string().uuid().nullable(),
|
|
27645
|
-
title: external_exports.string().nullable(),
|
|
27646
|
-
state: issuePullRequestStateSchema,
|
|
27647
|
-
created_at: timestamp,
|
|
27648
|
-
updated_at: timestamp
|
|
27649
|
-
});
|
|
27650
|
-
issueCommentSchema = external_exports.object({
|
|
27651
|
-
id: external_exports.string().uuid(),
|
|
27652
|
-
issue_id: external_exports.string().uuid(),
|
|
27653
|
-
author: issueActorSchema,
|
|
27654
|
-
body: external_exports.string(),
|
|
27655
|
-
created_at: timestamp,
|
|
27656
|
-
updated_at: timestamp
|
|
27657
|
-
});
|
|
27658
|
-
change = (value) => external_exports.object({ from: value, to: value });
|
|
27659
|
-
nullableId = external_exports.string().uuid().nullable();
|
|
27660
|
-
ISSUE_EVENT_TYPES = [
|
|
27661
|
-
"created",
|
|
27662
|
-
"title_changed",
|
|
27663
|
-
"description_changed",
|
|
27664
|
-
"status_changed",
|
|
27665
|
-
"priority_changed",
|
|
27666
|
-
"parent_changed",
|
|
27667
|
-
"manager_changed",
|
|
27668
|
-
"sort_order_changed",
|
|
27669
|
-
"assignee_added",
|
|
27670
|
-
"assignee_removed",
|
|
27671
|
-
"subscriber_added",
|
|
27672
|
-
"subscriber_removed",
|
|
27673
|
-
"relation_added",
|
|
27674
|
-
"relation_removed",
|
|
27675
|
-
"pr_linked",
|
|
27676
|
-
"pr_unlinked",
|
|
27677
|
-
"pr_state_changed",
|
|
27678
|
-
"comment_added",
|
|
27679
|
-
"comment_edited",
|
|
27680
|
-
"comment_deleted",
|
|
27681
|
-
"archived",
|
|
27682
|
-
"restored"
|
|
27683
|
-
];
|
|
27684
|
-
issueEventDataSchemas = {
|
|
27685
|
-
created: external_exports.object({ issue: issueSchema }),
|
|
27686
|
-
title_changed: change(external_exports.string()),
|
|
27687
|
-
description_changed: change(external_exports.string()),
|
|
27688
|
-
status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp }),
|
|
27689
|
-
priority_changed: change(issuePrioritySchema),
|
|
27690
|
-
parent_changed: change(nullableId),
|
|
27691
|
-
manager_changed: change(nullableId),
|
|
27692
|
-
sort_order_changed: change(external_exports.number()),
|
|
27693
|
-
/** `subscriber` is the row after the change: an unassigned principal stays subscribed with role `manual`. */
|
|
27694
|
-
assignee_added: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
27695
|
-
assignee_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
27696
|
-
subscriber_added: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
27697
|
-
subscriber_removed: external_exports.object({ subscriber: issueSubscriberSchema }),
|
|
27698
|
-
relation_added: external_exports.object({ relation: issueRelationSchema }),
|
|
27699
|
-
relation_removed: external_exports.object({ relation: issueRelationSchema }),
|
|
27700
|
-
pr_linked: external_exports.object({ pull_request: issuePullRequestSchema }),
|
|
27701
|
-
pr_unlinked: external_exports.object({ pull_request: issuePullRequestSchema }),
|
|
27702
|
-
pr_state_changed: external_exports.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
|
|
27703
|
-
comment_added: external_exports.object({ comment: issueCommentSchema }),
|
|
27704
|
-
comment_edited: external_exports.object({ comment: issueCommentSchema, from: external_exports.string() }),
|
|
27705
|
-
comment_deleted: external_exports.object({ comment: issueCommentSchema }),
|
|
27706
|
-
archived: external_exports.object({ archived_at: timestamp }),
|
|
27707
|
-
restored: external_exports.object({
|
|
27708
|
-
issue: issueSchema,
|
|
27709
|
-
subscribers: external_exports.array(issueSubscriberSchema),
|
|
27710
|
-
relations: external_exports.array(issueRelationSchema),
|
|
27711
|
-
pull_requests: external_exports.array(issuePullRequestSchema)
|
|
27712
|
-
})
|
|
27713
|
-
};
|
|
27714
|
-
issueEventBase = external_exports.object({
|
|
27715
|
-
sync_id: external_exports.number().int(),
|
|
27716
|
-
issue_id: external_exports.string().uuid(),
|
|
27717
|
-
actor: issueActorSchema,
|
|
27718
|
-
/** Echo of the `client_mutation_id` sent with the write, so the writer can settle its optimistic change. */
|
|
27719
|
-
client_mutation_id: external_exports.string().nullable(),
|
|
27720
|
-
created_at: timestamp
|
|
27721
|
-
});
|
|
27722
|
-
issueEventVariant = (type) => issueEventBase.extend({ type: external_exports.literal(type), data: issueEventDataSchemas[type] });
|
|
27723
|
-
issueEventSchema = external_exports.discriminatedUnion("type", [issueEventVariant(ISSUE_EVENT_TYPES[0]), ...ISSUE_EVENT_TYPES.slice(1).map(issueEventVariant)]);
|
|
27724
|
-
clientMutationId = external_exports.string().min(1).max(128).optional();
|
|
27725
|
-
title2 = external_exports.string().trim().min(1).max(500);
|
|
27726
|
-
description = external_exports.string().max(1e5);
|
|
27727
|
-
body = external_exports.string().trim().min(1).max(1e5);
|
|
27728
|
-
createIssueRequestSchema = external_exports.object({
|
|
27729
|
-
/** Client-generated id, so an optimistic create can be referenced before the server answers. */
|
|
27730
|
-
id: external_exports.string().uuid().optional(),
|
|
27731
|
-
title: title2,
|
|
27732
|
-
description: description.optional(),
|
|
27733
|
-
status: issueStatusSchema.optional(),
|
|
27734
|
-
priority: issuePrioritySchema.optional(),
|
|
27735
|
-
parent_id: external_exports.string().uuid().optional(),
|
|
27736
|
-
manager_id: external_exports.string().uuid().optional(),
|
|
27737
|
-
sort_order: external_exports.number().finite().optional(),
|
|
27738
|
-
assignees: external_exports.array(issueActorSchema).max(20).optional(),
|
|
27739
|
-
subscribers: external_exports.array(issueActorSchema).max(50).optional(),
|
|
27740
|
-
client_mutation_id: clientMutationId
|
|
27741
|
-
});
|
|
27742
|
-
updateIssueRequestSchema = external_exports.object({
|
|
27743
|
-
title: title2.optional(),
|
|
27744
|
-
description: description.optional(),
|
|
27745
|
-
status: issueStatusSchema.optional(),
|
|
27746
|
-
priority: issuePrioritySchema.optional(),
|
|
27747
|
-
// PATCH semantics: null clears the parent or Manager, omitting it leaves it unchanged.
|
|
27748
|
-
parent_id: nullableId.optional(),
|
|
27749
|
-
manager_id: nullableId.optional(),
|
|
27750
|
-
sort_order: external_exports.number().finite().optional(),
|
|
27751
|
-
client_mutation_id: clientMutationId
|
|
27752
|
-
});
|
|
27753
|
-
issueActorRequestSchema = issueActorSchema.partial().extend({ client_mutation_id: clientMutationId });
|
|
27754
|
-
createIssueCommentRequestSchema = external_exports.object({
|
|
27755
|
-
id: external_exports.string().uuid().optional(),
|
|
27756
|
-
body,
|
|
27757
|
-
client_mutation_id: clientMutationId
|
|
27758
|
-
});
|
|
27759
|
-
updateIssueCommentRequestSchema = external_exports.object({ body, client_mutation_id: clientMutationId });
|
|
27760
|
-
createIssueRelationRequestSchema = external_exports.object({
|
|
27761
|
-
id: external_exports.string().uuid().optional(),
|
|
27762
|
-
type: issueRelationTypeSchema,
|
|
27763
|
-
related_issue: external_exports.string().min(1),
|
|
27764
|
-
client_mutation_id: clientMutationId
|
|
27765
|
-
});
|
|
27766
|
-
linkIssuePullRequestRequestSchema = external_exports.object({
|
|
27767
|
-
id: external_exports.string().uuid().optional(),
|
|
27768
|
-
url: external_exports.string().url().max(2e3),
|
|
27769
|
-
title: external_exports.string().max(500).optional(),
|
|
27770
|
-
state: issuePullRequestStateSchema.optional(),
|
|
27771
|
-
pull_request_id: external_exports.string().uuid().optional(),
|
|
27772
|
-
client_mutation_id: clientMutationId
|
|
27773
|
-
});
|
|
27774
|
-
updateIssuePullRequestRequestSchema = external_exports.object({
|
|
27775
|
-
state: issuePullRequestStateSchema,
|
|
27776
|
-
client_mutation_id: clientMutationId
|
|
27777
|
-
});
|
|
27778
|
-
issueMutationRequestSchema = external_exports.object({ client_mutation_id: clientMutationId });
|
|
27779
|
-
updateIssueSettingsRequestSchema = external_exports.object({ issue_key: external_exports.string().trim().toUpperCase().regex(ISSUE_KEY_RE) });
|
|
27780
|
-
listIssuesQuerySchema = external_exports.object({
|
|
27781
|
-
status: external_exports.string().optional(),
|
|
27782
|
-
priority: external_exports.string().optional(),
|
|
27783
|
-
assignee: external_exports.string().optional(),
|
|
27784
|
-
subscriber: external_exports.string().optional(),
|
|
27785
|
-
creator: external_exports.string().optional(),
|
|
27786
|
-
manager_id: external_exports.string().optional(),
|
|
27787
|
-
parent_id: external_exports.string().optional(),
|
|
27788
|
-
q: external_exports.string().max(200).optional(),
|
|
27789
|
-
include_archived: external_exports.enum(["true", "false"]).optional(),
|
|
27790
|
-
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
27791
|
-
cursor: external_exports.coerce.number().int().min(0).max(2147483647).optional()
|
|
27792
|
-
});
|
|
27793
|
-
issueDetailResponseSchema = external_exports.object({
|
|
27794
|
-
issue: issueSchema,
|
|
27795
|
-
subscribers: external_exports.array(issueSubscriberSchema),
|
|
27796
|
-
relations: external_exports.array(issueRelationSchema),
|
|
27797
|
-
pull_requests: external_exports.array(issuePullRequestSchema),
|
|
27798
|
-
comments: external_exports.array(issueCommentSchema),
|
|
27799
|
-
events: external_exports.array(issueEventSchema),
|
|
27800
|
-
sub_issues: external_exports.array(issueSchema)
|
|
27801
|
-
});
|
|
27802
|
-
listIssuesResponseSchema = external_exports.object({ issues: external_exports.array(issueSchema), next_cursor: external_exports.number().nullable() });
|
|
27803
|
-
issuesDeltaQuerySchema = external_exports.object({
|
|
27804
|
-
after: external_exports.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
27805
|
-
limit: external_exports.coerce.number().int().min(1).max(1e3).optional()
|
|
27806
|
-
});
|
|
27807
|
-
issueInboxQuerySchema = external_exports.object({
|
|
27808
|
-
limit: external_exports.coerce.number().int().min(1).max(100).optional(),
|
|
27809
|
-
before: external_exports.coerce.number().int().min(1).optional()
|
|
27810
|
-
});
|
|
27811
|
-
markIssueInboxReadRequestSchema = external_exports.object({ sync_id: external_exports.number().int().min(0).optional() });
|
|
27812
|
-
ISSUE_COMMANDS = {
|
|
27813
|
-
create: "create",
|
|
27814
|
-
update: "update",
|
|
27815
|
-
get: "get",
|
|
27816
|
-
list: "list",
|
|
27817
|
-
comment: "comment",
|
|
27818
|
-
assign: "assign",
|
|
27819
|
-
unassign: "unassign",
|
|
27820
|
-
subscribe: "subscribe",
|
|
27821
|
-
unsubscribe: "unsubscribe",
|
|
27822
|
-
linkPr: "link-pr",
|
|
27823
|
-
unlinkPr: "unlink-pr",
|
|
27824
|
-
relate: "relate"
|
|
27825
|
-
};
|
|
27826
|
-
}
|
|
27827
|
-
});
|
|
27828
|
-
|
|
27829
27840
|
// ../shared/src/issue-events.ts
|
|
27830
27841
|
function parseChange(line, excerpt) {
|
|
27831
27842
|
const match = line.match(CHANGE_LINE);
|
|
@@ -27863,7 +27874,7 @@ var init_issue_events = __esm({
|
|
|
27863
27874
|
"../shared/src/issue-events.ts"() {
|
|
27864
27875
|
"use strict";
|
|
27865
27876
|
init_zod();
|
|
27866
|
-
|
|
27877
|
+
init_issues();
|
|
27867
27878
|
init_tag_blocks();
|
|
27868
27879
|
ISSUE_EVENT_TAG = "issue_event";
|
|
27869
27880
|
transitionSchema = external_exports.discriminatedUnion("field", [
|
|
@@ -39724,6 +39735,7 @@ var init_keyboard_shortcuts = __esm({
|
|
|
39724
39735
|
openReviewChat: { label: "Start chat", group: "Review", keys: { key: ";", mod: true } },
|
|
39725
39736
|
mergePullRequest: { label: "Merge", group: "Review", keys: { key: "m" } },
|
|
39726
39737
|
createIssue: { label: "Create issue", group: "Issues", keys: { key: "c" } },
|
|
39738
|
+
searchIssues: { label: "Search issues", group: "Issues", keys: { key: "/" } },
|
|
39727
39739
|
setIssueStatus: { label: "Change status", group: "Issues", keys: { key: "s" } },
|
|
39728
39740
|
setIssuePriority: { label: "Change priority", group: "Issues", keys: { key: "p" } },
|
|
39729
39741
|
setIssueAssignees: { label: "Assign", group: "Issues", keys: { key: "a" } },
|
|
@@ -40169,7 +40181,7 @@ var CLI_VERSION;
|
|
|
40169
40181
|
var init_cli_version = __esm({
|
|
40170
40182
|
"../shared/src/cli-version.ts"() {
|
|
40171
40183
|
"use strict";
|
|
40172
|
-
CLI_VERSION = "0.3.
|
|
40184
|
+
CLI_VERSION = "0.3.513";
|
|
40173
40185
|
}
|
|
40174
40186
|
});
|
|
40175
40187
|
|
|
@@ -51267,7 +51279,7 @@ var init_src = __esm({
|
|
|
51267
51279
|
init_automations();
|
|
51268
51280
|
init_egress2();
|
|
51269
51281
|
init_feature_flags();
|
|
51270
|
-
|
|
51282
|
+
init_issues();
|
|
51271
51283
|
init_repo_files();
|
|
51272
51284
|
init_replica();
|
|
51273
51285
|
init_admin();
|
|
@@ -51433,8 +51445,8 @@ var init_monolith_url = __esm({
|
|
|
51433
51445
|
|
|
51434
51446
|
// src/lib/authenticated-api.ts
|
|
51435
51447
|
async function throwResponseError(response) {
|
|
51436
|
-
const error62 = await response
|
|
51437
|
-
throw new ApiError(error62
|
|
51448
|
+
const { error: error62 } = await readApiErrorBody(response);
|
|
51449
|
+
throw new ApiError(error62 || `Request failed with status ${response.status}`, response.status);
|
|
51438
51450
|
}
|
|
51439
51451
|
async function apiFetch(url2, headers, options) {
|
|
51440
51452
|
const requestHeaders = new Headers({ "Content-Type": "application/json", ...headers });
|
|
@@ -56235,8 +56247,8 @@ async function agentRequest(path12, options) {
|
|
|
56235
56247
|
...isStream ? { duplex: "half" } : {}
|
|
56236
56248
|
});
|
|
56237
56249
|
if (!response.ok) {
|
|
56238
|
-
const error62 = await response
|
|
56239
|
-
throw new AgentRequestError(error62
|
|
56250
|
+
const { error: error62 } = await readApiErrorBody(response);
|
|
56251
|
+
throw new AgentRequestError(error62 || `Request failed with status ${response.status}`, response.status);
|
|
56240
56252
|
}
|
|
56241
56253
|
return response;
|
|
56242
56254
|
}
|
|
@@ -56256,8 +56268,8 @@ async function engineFetch(path12, options) {
|
|
|
56256
56268
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0
|
|
56257
56269
|
});
|
|
56258
56270
|
if (!response.ok) {
|
|
56259
|
-
const error62 = await response
|
|
56260
|
-
throw new Error(error62
|
|
56271
|
+
const { error: error62 } = await readApiErrorBody(response);
|
|
56272
|
+
throw new Error(error62 || `Request failed with status ${response.status}`);
|
|
56261
56273
|
}
|
|
56262
56274
|
return response.json();
|
|
56263
56275
|
}
|