replicas-engine 0.1.1675 → 0.1.1677
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/src/{asp-host-ZFJH7KNZ.js → asp-host-LBXIPZ5Q.js} +5 -5
- package/dist/src/{chunk-O6G4BHWQ.js → chunk-GRKULNCY.js} +337 -335
- package/dist/src/{chunk-HKDP6S5U.js → chunk-LGTK3MTL.js} +2 -2
- package/dist/src/{chunk-VJR6XNAF.js → chunk-O7XPO6NN.js} +2 -2
- package/dist/src/{chunk-GJKUHS3E.js → chunk-OTZZFUHK.js} +2 -2
- package/dist/src/{chunk-CBO425L3.js → chunk-PIVA4SOH.js} +1 -1
- package/dist/src/{chunk-QJF7CZV3.js → chunk-PWGB7XYF.js} +6 -6
- package/dist/src/{chunk-BYHSTF65.js → chunk-SMVAFF4W.js} +1 -1
- package/dist/src/{chunk-44VGMGRF.js → chunk-XZQWZSQR.js} +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +11 -8
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
listCodexModelsForDetails,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-PWGB7XYF.js";
|
|
12
|
+
import "./chunk-LGTK3MTL.js";
|
|
13
|
+
import "./chunk-XZQWZSQR.js";
|
|
14
|
+
import "./chunk-SMVAFF4W.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-GRKULNCY.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -12592,7 +12592,7 @@ var LINEAR_ICON_DEFINITION = {
|
|
|
12592
12592
|
};
|
|
12593
12593
|
|
|
12594
12594
|
// ../shared/src/replicas-mcp.ts
|
|
12595
|
-
import { z as
|
|
12595
|
+
import { z as z28 } from "zod";
|
|
12596
12596
|
|
|
12597
12597
|
// ../shared/src/automations/types.ts
|
|
12598
12598
|
var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
|
|
@@ -12613,13 +12613,13 @@ var AUTOMATION_AUTO_PAUSE_DAYS = 7;
|
|
|
12613
12613
|
var AUTOMATION_AUTO_PAUSE_LABEL = `Paused after failing every run for ${AUTOMATION_AUTO_PAUSE_DAYS} days`;
|
|
12614
12614
|
|
|
12615
12615
|
// ../shared/src/routes/environment-config-source.ts
|
|
12616
|
-
import { z as
|
|
12616
|
+
import { z as z27 } from "zod";
|
|
12617
12617
|
|
|
12618
12618
|
// ../shared/src/environment-config.ts
|
|
12619
|
-
import { z as
|
|
12619
|
+
import { z as z26 } from "zod";
|
|
12620
12620
|
|
|
12621
12621
|
// ../shared/src/routes/preferences.ts
|
|
12622
|
-
import { z as
|
|
12622
|
+
import { z as z25 } from "zod";
|
|
12623
12623
|
|
|
12624
12624
|
// ../shared/src/routes/push.ts
|
|
12625
12625
|
import { z as z22 } from "zod";
|
|
@@ -13531,7 +13531,238 @@ var GPU_ABILITY = {
|
|
|
13531
13531
|
referenceFile: { name: "GPU.md", content: REFERENCE6 }
|
|
13532
13532
|
};
|
|
13533
13533
|
|
|
13534
|
+
// ../shared/src/routes/issues.ts
|
|
13535
|
+
import { z as z24 } from "zod";
|
|
13536
|
+
var ISSUE_STATUSES = ["backlog", "todo", "in_progress", "review", "approved", "done", "canceled", "duplicate"];
|
|
13537
|
+
var ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
|
|
13538
|
+
var ISSUE_ACTOR_TYPES = ["user", "workspace", "system"];
|
|
13539
|
+
var ISSUE_SUBSCRIBER_ROLES = ["assignee", "creator", "mentioned", "manual"];
|
|
13540
|
+
var ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
|
|
13541
|
+
var ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
|
|
13542
|
+
var normalizeIssueStatus = (status) => status === "in_review" ? "review" : status;
|
|
13543
|
+
var issueStatusSchema = z24.preprocess((value) => typeof value === "string" ? normalizeIssueStatus(value) : value, z24.enum(ISSUE_STATUSES));
|
|
13544
|
+
var issuePrioritySchema = z24.enum(ISSUE_PRIORITIES);
|
|
13545
|
+
var issueSubscriberRoleSchema = z24.enum(ISSUE_SUBSCRIBER_ROLES);
|
|
13546
|
+
var issueRelationTypeSchema = z24.enum(ISSUE_RELATION_TYPES);
|
|
13547
|
+
var issuePullRequestStateSchema = z24.enum(ISSUE_PULL_REQUEST_STATES);
|
|
13548
|
+
var ISSUE_STATUS_LABELS = { backlog: "Backlog", todo: "Todo", in_progress: "In Progress", review: "Review", approved: "Approved", done: "Done", canceled: "Canceled", duplicate: "Duplicate" };
|
|
13549
|
+
var ISSUE_PRIORITY_LABELS = { none: "No priority", urgent: "Urgent", high: "High", medium: "Medium", low: "Low" };
|
|
13550
|
+
var issueActorSchema = z24.object({
|
|
13551
|
+
type: z24.enum(ISSUE_ACTOR_TYPES),
|
|
13552
|
+
id: z24.string().toLowerCase().uuid()
|
|
13553
|
+
});
|
|
13554
|
+
var ISSUE_KEY_RE = /^[A-Z][A-Z0-9]{0,9}$/;
|
|
13555
|
+
var timestamp = z24.string();
|
|
13556
|
+
var nullableTimestamp = timestamp.nullable();
|
|
13557
|
+
var issueSchema = z24.object({
|
|
13558
|
+
id: z24.string().uuid(),
|
|
13559
|
+
organization_id: z24.string().uuid(),
|
|
13560
|
+
number: z24.number().int(),
|
|
13561
|
+
identifier: z24.string(),
|
|
13562
|
+
title: z24.string(),
|
|
13563
|
+
description: z24.string(),
|
|
13564
|
+
status: issueStatusSchema,
|
|
13565
|
+
priority: issuePrioritySchema,
|
|
13566
|
+
parent_id: z24.string().uuid().nullable(),
|
|
13567
|
+
manager_id: z24.string().uuid().nullable(),
|
|
13568
|
+
creator: issueActorSchema,
|
|
13569
|
+
/** Fractional: to move an issue between two others, send the midpoint of their sort orders. */
|
|
13570
|
+
sort_order: z24.number(),
|
|
13571
|
+
created_at: timestamp,
|
|
13572
|
+
updated_at: timestamp,
|
|
13573
|
+
completed_at: nullableTimestamp,
|
|
13574
|
+
canceled_at: nullableTimestamp,
|
|
13575
|
+
archived_at: nullableTimestamp
|
|
13576
|
+
});
|
|
13577
|
+
var issueSubscriberSchema = z24.object({
|
|
13578
|
+
issue_id: z24.string().uuid(),
|
|
13579
|
+
subscriber: issueActorSchema,
|
|
13580
|
+
role: issueSubscriberRoleSchema,
|
|
13581
|
+
created_at: timestamp
|
|
13582
|
+
});
|
|
13583
|
+
var issueRelationSchema = z24.object({
|
|
13584
|
+
id: z24.string().uuid(),
|
|
13585
|
+
type: issueRelationTypeSchema,
|
|
13586
|
+
issue_id: z24.string().uuid(),
|
|
13587
|
+
related_issue_id: z24.string().uuid(),
|
|
13588
|
+
created_at: timestamp
|
|
13589
|
+
});
|
|
13590
|
+
var issuePullRequestSchema = z24.object({
|
|
13591
|
+
id: z24.string().uuid(),
|
|
13592
|
+
issue_id: z24.string().uuid(),
|
|
13593
|
+
url: z24.string(),
|
|
13594
|
+
pull_request_id: z24.string().uuid().nullable(),
|
|
13595
|
+
title: z24.string().nullable(),
|
|
13596
|
+
state: issuePullRequestStateSchema,
|
|
13597
|
+
approved: z24.boolean(),
|
|
13598
|
+
created_at: timestamp,
|
|
13599
|
+
updated_at: timestamp
|
|
13600
|
+
});
|
|
13601
|
+
var issueCommentSchema = z24.object({
|
|
13602
|
+
id: z24.string().uuid(),
|
|
13603
|
+
issue_id: z24.string().uuid(),
|
|
13604
|
+
author: issueActorSchema,
|
|
13605
|
+
body: z24.string(),
|
|
13606
|
+
created_at: timestamp,
|
|
13607
|
+
updated_at: timestamp
|
|
13608
|
+
});
|
|
13609
|
+
var change = (value) => z24.object({ from: value, to: value });
|
|
13610
|
+
var nullableId = z24.string().uuid().nullable();
|
|
13611
|
+
var ISSUE_EVENT_TYPES = [
|
|
13612
|
+
"created",
|
|
13613
|
+
"title_changed",
|
|
13614
|
+
"description_changed",
|
|
13615
|
+
"status_changed",
|
|
13616
|
+
"priority_changed",
|
|
13617
|
+
"parent_changed",
|
|
13618
|
+
"manager_changed",
|
|
13619
|
+
"sort_order_changed",
|
|
13620
|
+
"assignee_added",
|
|
13621
|
+
"assignee_removed",
|
|
13622
|
+
"subscriber_added",
|
|
13623
|
+
"subscriber_removed",
|
|
13624
|
+
"relation_added",
|
|
13625
|
+
"relation_removed",
|
|
13626
|
+
"pr_linked",
|
|
13627
|
+
"pr_unlinked",
|
|
13628
|
+
"pr_state_changed",
|
|
13629
|
+
"comment_added",
|
|
13630
|
+
"comment_edited",
|
|
13631
|
+
"comment_deleted",
|
|
13632
|
+
"archived",
|
|
13633
|
+
"restored"
|
|
13634
|
+
];
|
|
13635
|
+
var issueEventDataSchemas = {
|
|
13636
|
+
created: z24.object({ issue: issueSchema }),
|
|
13637
|
+
title_changed: change(z24.string()),
|
|
13638
|
+
description_changed: change(z24.string()),
|
|
13639
|
+
status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp, reason: z24.string().optional() }),
|
|
13640
|
+
priority_changed: change(issuePrioritySchema),
|
|
13641
|
+
parent_changed: change(nullableId),
|
|
13642
|
+
manager_changed: change(nullableId),
|
|
13643
|
+
sort_order_changed: change(z24.number()),
|
|
13644
|
+
/** `subscriber` is the row after the change: an unassigned principal stays subscribed with role `manual`. */
|
|
13645
|
+
assignee_added: z24.object({ subscriber: issueSubscriberSchema }),
|
|
13646
|
+
assignee_removed: z24.object({ subscriber: issueSubscriberSchema }),
|
|
13647
|
+
subscriber_added: z24.object({ subscriber: issueSubscriberSchema }),
|
|
13648
|
+
subscriber_removed: z24.object({ subscriber: issueSubscriberSchema }),
|
|
13649
|
+
relation_added: z24.object({ relation: issueRelationSchema }),
|
|
13650
|
+
relation_removed: z24.object({ relation: issueRelationSchema }),
|
|
13651
|
+
pr_linked: z24.object({ pull_request: issuePullRequestSchema }),
|
|
13652
|
+
pr_unlinked: z24.object({ pull_request: issuePullRequestSchema }),
|
|
13653
|
+
pr_state_changed: z24.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
|
|
13654
|
+
comment_added: z24.object({ comment: issueCommentSchema }),
|
|
13655
|
+
comment_edited: z24.object({ comment: issueCommentSchema, from: z24.string() }),
|
|
13656
|
+
comment_deleted: z24.object({ comment: issueCommentSchema }),
|
|
13657
|
+
archived: z24.object({ archived_at: timestamp }),
|
|
13658
|
+
restored: z24.object({
|
|
13659
|
+
issue: issueSchema,
|
|
13660
|
+
subscribers: z24.array(issueSubscriberSchema),
|
|
13661
|
+
relations: z24.array(issueRelationSchema),
|
|
13662
|
+
pull_requests: z24.array(issuePullRequestSchema)
|
|
13663
|
+
})
|
|
13664
|
+
};
|
|
13665
|
+
var issueEventBase = z24.object({
|
|
13666
|
+
sync_id: z24.number().int(),
|
|
13667
|
+
issue_id: z24.string().uuid(),
|
|
13668
|
+
actor: issueActorSchema,
|
|
13669
|
+
/** Echo of the `client_mutation_id` sent with the write, so the writer can settle its optimistic change. */
|
|
13670
|
+
client_mutation_id: z24.string().nullable(),
|
|
13671
|
+
created_at: timestamp
|
|
13672
|
+
});
|
|
13673
|
+
var issueEventVariant = (type) => issueEventBase.extend({ type: z24.literal(type), data: issueEventDataSchemas[type] });
|
|
13674
|
+
var issueEventSchema = z24.discriminatedUnion("type", [issueEventVariant(ISSUE_EVENT_TYPES[0]), ...ISSUE_EVENT_TYPES.slice(1).map(issueEventVariant)]);
|
|
13675
|
+
var clientMutationId = z24.string().min(1).max(128).optional();
|
|
13676
|
+
var title = z24.string().trim().min(1).max(500);
|
|
13677
|
+
var description = z24.string().max(1e5);
|
|
13678
|
+
var body = z24.string().trim().min(1).max(1e5);
|
|
13679
|
+
var createIssueRequestSchema = z24.object({
|
|
13680
|
+
/** Client-generated id, so an optimistic create can be referenced before the server answers. */
|
|
13681
|
+
id: z24.string().uuid().optional(),
|
|
13682
|
+
title,
|
|
13683
|
+
description: description.optional(),
|
|
13684
|
+
status: issueStatusSchema.optional(),
|
|
13685
|
+
priority: issuePrioritySchema.optional(),
|
|
13686
|
+
parent_id: z24.string().uuid().optional(),
|
|
13687
|
+
manager_id: z24.string().uuid().optional(),
|
|
13688
|
+
sort_order: z24.number().finite().optional(),
|
|
13689
|
+
assignees: z24.array(issueActorSchema).max(20).optional(),
|
|
13690
|
+
subscribers: z24.array(issueActorSchema).max(50).optional(),
|
|
13691
|
+
client_mutation_id: clientMutationId
|
|
13692
|
+
});
|
|
13693
|
+
var updateIssueRequestSchema = z24.object({
|
|
13694
|
+
title: title.optional(),
|
|
13695
|
+
description: description.optional(),
|
|
13696
|
+
status: issueStatusSchema.optional(),
|
|
13697
|
+
priority: issuePrioritySchema.optional(),
|
|
13698
|
+
// PATCH semantics: null clears the parent or Manager, omitting it leaves it unchanged.
|
|
13699
|
+
parent_id: nullableId.optional(),
|
|
13700
|
+
manager_id: nullableId.optional(),
|
|
13701
|
+
sort_order: z24.number().finite().optional(),
|
|
13702
|
+
client_mutation_id: clientMutationId
|
|
13703
|
+
});
|
|
13704
|
+
var issueActorRequestSchema = issueActorSchema.partial().extend({ client_mutation_id: clientMutationId });
|
|
13705
|
+
var createIssueCommentRequestSchema = z24.object({
|
|
13706
|
+
id: z24.string().uuid().optional(),
|
|
13707
|
+
body,
|
|
13708
|
+
client_mutation_id: clientMutationId
|
|
13709
|
+
});
|
|
13710
|
+
var updateIssueCommentRequestSchema = z24.object({ body, client_mutation_id: clientMutationId });
|
|
13711
|
+
var createIssueRelationRequestSchema = z24.object({
|
|
13712
|
+
id: z24.string().uuid().optional(),
|
|
13713
|
+
type: issueRelationTypeSchema,
|
|
13714
|
+
related_issue: z24.string().min(1),
|
|
13715
|
+
client_mutation_id: clientMutationId
|
|
13716
|
+
});
|
|
13717
|
+
var linkIssuePullRequestRequestSchema = z24.object({
|
|
13718
|
+
id: z24.string().uuid().optional(),
|
|
13719
|
+
url: z24.string().url().max(2e3),
|
|
13720
|
+
title: z24.string().max(500).optional(),
|
|
13721
|
+
state: issuePullRequestStateSchema.optional(),
|
|
13722
|
+
pull_request_id: z24.string().uuid().optional(),
|
|
13723
|
+
client_mutation_id: clientMutationId
|
|
13724
|
+
});
|
|
13725
|
+
var updateIssuePullRequestRequestSchema = z24.object({
|
|
13726
|
+
state: issuePullRequestStateSchema,
|
|
13727
|
+
client_mutation_id: clientMutationId
|
|
13728
|
+
});
|
|
13729
|
+
var issueMutationRequestSchema = z24.object({ client_mutation_id: clientMutationId });
|
|
13730
|
+
var updateIssueSettingsRequestSchema = z24.object({ issue_key: z24.string().trim().toUpperCase().regex(ISSUE_KEY_RE) });
|
|
13731
|
+
var listIssuesQuerySchema = z24.object({
|
|
13732
|
+
status: z24.string().optional(),
|
|
13733
|
+
priority: z24.string().optional(),
|
|
13734
|
+
assignee: z24.string().optional(),
|
|
13735
|
+
subscriber: z24.string().optional(),
|
|
13736
|
+
creator: z24.string().optional(),
|
|
13737
|
+
manager_id: z24.string().optional(),
|
|
13738
|
+
parent_id: z24.string().optional(),
|
|
13739
|
+
q: z24.string().max(200).optional(),
|
|
13740
|
+
include_archived: z24.enum(["true", "false"]).optional(),
|
|
13741
|
+
limit: z24.coerce.number().int().min(1).max(200).optional(),
|
|
13742
|
+
cursor: z24.coerce.number().int().min(0).max(2147483647).optional()
|
|
13743
|
+
});
|
|
13744
|
+
var issueDetailResponseSchema = z24.object({
|
|
13745
|
+
issue: issueSchema,
|
|
13746
|
+
subscribers: z24.array(issueSubscriberSchema),
|
|
13747
|
+
relations: z24.array(issueRelationSchema),
|
|
13748
|
+
pull_requests: z24.array(issuePullRequestSchema),
|
|
13749
|
+
comments: z24.array(issueCommentSchema),
|
|
13750
|
+
events: z24.array(issueEventSchema),
|
|
13751
|
+
sub_issues: z24.array(issueSchema)
|
|
13752
|
+
});
|
|
13753
|
+
var listIssuesResponseSchema = z24.object({ issues: z24.array(issueSchema), next_cursor: z24.number().nullable() });
|
|
13754
|
+
var issuesDeltaQuerySchema = z24.object({
|
|
13755
|
+
after: z24.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
13756
|
+
limit: z24.coerce.number().int().min(1).max(1e3).optional()
|
|
13757
|
+
});
|
|
13758
|
+
var issueInboxQuerySchema = z24.object({
|
|
13759
|
+
limit: z24.coerce.number().int().min(1).max(100).optional(),
|
|
13760
|
+
before: z24.coerce.number().int().min(1).optional()
|
|
13761
|
+
});
|
|
13762
|
+
var markIssueInboxReadRequestSchema = z24.object({ sync_id: z24.number().int().min(0).optional() });
|
|
13763
|
+
|
|
13534
13764
|
// ../shared/src/default-skills/replicas-agent/abilities/issues.ts
|
|
13765
|
+
var codeList = (values) => values.map((value) => `\`${value}\``).join(", ");
|
|
13535
13766
|
var SECTION7 = `### Issues
|
|
13536
13767
|
Track work in Replicas Issues (\`REP-42\`), the shared to-do list of the people and agents in this organization, with \`replicas issue\`.
|
|
13537
13768
|
|
|
@@ -13566,7 +13797,7 @@ replicas issue unlink-pr REP-42 https://github.com/acme/app/pull/12
|
|
|
13566
13797
|
replicas issue relate REP-42 blocks REP-43 | duplicate_of REP-40
|
|
13567
13798
|
\`\`\`
|
|
13568
13799
|
|
|
13569
|
-
Statuses:
|
|
13800
|
+
Statuses: ${codeList(ISSUE_STATUSES)}. Priorities: ${codeList(ISSUE_PRIORITIES)}.
|
|
13570
13801
|
|
|
13571
13802
|
## Events
|
|
13572
13803
|
|
|
@@ -13582,13 +13813,14 @@ Read the event and act only when it asks something of you: a person's question o
|
|
|
13582
13813
|
|
|
13583
13814
|
**Keep the status true as you go:**
|
|
13584
13815
|
1. \`in_progress\` when you start.
|
|
13585
|
-
2.
|
|
13586
|
-
3.
|
|
13587
|
-
|
|
13588
|
-
**Statuses mean exactly this**, so a person can read only
|
|
13589
|
-
- \`in_progress\`: work is underway,
|
|
13590
|
-
- \`
|
|
13591
|
-
- \`
|
|
13816
|
+
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.
|
|
13817
|
+
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.
|
|
13818
|
+
|
|
13819
|
+
**Statuses mean exactly this**, so a person can read only Review and trust the rest:
|
|
13820
|
+
- \`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.
|
|
13821
|
+
- \`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.
|
|
13822
|
+
- \`approved\`: every linked pull request is approved, so nothing waits on a person; it just isn't merged or live yet.
|
|
13823
|
+
- \`done\`: every linked pull request it needs is merged (and deployed when that matters), and nothing is left.
|
|
13592
13824
|
- \`canceled\`: dropped, with a comment saying why.
|
|
13593
13825
|
|
|
13594
13826
|
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.
|
|
@@ -15359,16 +15591,16 @@ var DEFAULT_DEFAULT_SKILLS = {
|
|
|
15359
15591
|
abilities: defaultReplicasAgentAbilities()
|
|
15360
15592
|
}
|
|
15361
15593
|
};
|
|
15362
|
-
var defaultSkillsOverridesSchema =
|
|
15363
|
-
replicas_agent:
|
|
15364
|
-
enabled:
|
|
15365
|
-
abilities:
|
|
15594
|
+
var defaultSkillsOverridesSchema = z25.strictObject({
|
|
15595
|
+
replicas_agent: z25.strictObject({
|
|
15596
|
+
enabled: z25.boolean().optional(),
|
|
15597
|
+
abilities: z25.partialRecord(z25.enum(REPLICAS_AGENT_ABILITIES), z25.boolean()).optional()
|
|
15366
15598
|
}).optional()
|
|
15367
15599
|
});
|
|
15368
15600
|
var LINEAR_ROUTING_SKILL_MAX_LENGTH = 5e4;
|
|
15369
|
-
var linearRoutingSkillSchema =
|
|
15370
|
-
|
|
15371
|
-
|
|
15601
|
+
var linearRoutingSkillSchema = z25.union([
|
|
15602
|
+
z25.object({ name: z25.string().min(1), content: z25.string().trim().min(1).max(LINEAR_ROUTING_SKILL_MAX_LENGTH) }),
|
|
15603
|
+
z25.object({ name: z25.string().min(1), repository_id: z25.string().regex(UUID_RE), path: z25.string().min(1) })
|
|
15372
15604
|
]);
|
|
15373
15605
|
|
|
15374
15606
|
// ../shared/src/environment-files.ts
|
|
@@ -15739,52 +15971,52 @@ function isPluginId(value) {
|
|
|
15739
15971
|
}
|
|
15740
15972
|
|
|
15741
15973
|
// ../shared/src/environment-config.ts
|
|
15742
|
-
var variableNameSchema =
|
|
15743
|
-
var mcpValueSchema =
|
|
15744
|
-
|
|
15974
|
+
var variableNameSchema = z26.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name");
|
|
15975
|
+
var mcpValueSchema = z26.union([
|
|
15976
|
+
z26.string(),
|
|
15745
15977
|
environmentMcpVariableReferenceSchema
|
|
15746
15978
|
]);
|
|
15747
|
-
var mcpValuesSchema =
|
|
15979
|
+
var mcpValuesSchema = z26.record(z26.string(), mcpValueSchema);
|
|
15748
15980
|
var httpConfigSchema = environmentMcpHttpConfigSchema.pick({ url: true, auth: true }).extend({
|
|
15749
15981
|
headers: mcpValuesSchema.default({})
|
|
15750
15982
|
}).strict();
|
|
15751
|
-
var replicasMcpDefinitionSchema =
|
|
15752
|
-
|
|
15753
|
-
transport:
|
|
15983
|
+
var replicasMcpDefinitionSchema = z26.discriminatedUnion("transport", [
|
|
15984
|
+
z26.strictObject({
|
|
15985
|
+
transport: z26.literal("stdio"),
|
|
15754
15986
|
config: environmentMcpStdioConfigSchema.pick({ command: true }).extend({
|
|
15755
15987
|
args: environmentMcpStdioConfigSchema.shape.args.unwrap().default([]),
|
|
15756
|
-
env:
|
|
15988
|
+
env: z26.record(variableNameSchema, mcpValueSchema).default({})
|
|
15757
15989
|
}).strict()
|
|
15758
15990
|
}),
|
|
15759
|
-
|
|
15760
|
-
|
|
15991
|
+
z26.strictObject({ transport: z26.literal("http"), config: httpConfigSchema }),
|
|
15992
|
+
z26.strictObject({ transport: z26.literal("sse"), config: httpConfigSchema })
|
|
15761
15993
|
]).superRefine((definition, context) => {
|
|
15762
15994
|
if (definition.transport === "stdio") return;
|
|
15763
15995
|
const result = validateEnvironmentMcpAuthentication(definition.transport, definition.config);
|
|
15764
15996
|
if (!result.ok) context.addIssue({ code: "custom", path: result.error.code === "transport" ? ["transport"] : ["config", result.error.code ?? "auth"], message: result.error.message });
|
|
15765
15997
|
});
|
|
15766
|
-
var replicasEnvironmentConfigSchema =
|
|
15767
|
-
inheritRepositories:
|
|
15768
|
-
memory:
|
|
15769
|
-
gpu:
|
|
15770
|
-
mobileTesting:
|
|
15998
|
+
var replicasEnvironmentConfigSchema = z26.strictObject({
|
|
15999
|
+
inheritRepositories: z26.boolean().optional(),
|
|
16000
|
+
memory: z26.strictObject({ read: z26.boolean().optional(), write: z26.boolean().optional() }).nullable().optional(),
|
|
16001
|
+
gpu: z26.boolean().nullable().optional(),
|
|
16002
|
+
mobileTesting: z26.boolean().nullable().optional(),
|
|
15771
16003
|
defaultSkills: defaultSkillsOverridesSchema.superRefine((skills, context) => {
|
|
15772
16004
|
for (const ability of REPLICAS_AGENT_ABILITIES) if (skills.replicas_agent?.abilities?.[ability] === false && REPLICAS_AGENT_ABILITY_REGISTRY[ability].locked) context.addIssue({ code: "custom", path: ["replicas_agent", "abilities", ability], message: "This built-in ability cannot be disabled" });
|
|
15773
16005
|
}).nullable().optional(),
|
|
15774
|
-
repositories:
|
|
15775
|
-
workspaceSize:
|
|
15776
|
-
files:
|
|
15777
|
-
name:
|
|
15778
|
-
content:
|
|
16006
|
+
repositories: z26.array(z26.string().trim().min(1)).optional(),
|
|
16007
|
+
workspaceSize: z26.enum(WORKSPACE_SIZE_OPTIONS).optional(),
|
|
16008
|
+
files: z26.record(z26.string().trim().refine((path) => !validateEnvironmentFilePath(path), "must be a file path starting with ~/"), z26.strictObject({
|
|
16009
|
+
name: z26.string().trim().min(1).optional(),
|
|
16010
|
+
content: z26.string().max(65536)
|
|
15779
16011
|
})).optional(),
|
|
15780
|
-
skills:
|
|
15781
|
-
requiredPlugins:
|
|
15782
|
-
systemPrompt:
|
|
15783
|
-
warmHook:
|
|
15784
|
-
startHook:
|
|
15785
|
-
variables:
|
|
15786
|
-
requiredSecrets:
|
|
15787
|
-
mcps:
|
|
16012
|
+
skills: z26.record(z26.string().trim().min(1), z26.strictObject({ source: z26.string().trim().min(1), name: z26.string().trim().min(1).optional() })).optional(),
|
|
16013
|
+
requiredPlugins: z26.array(z26.string().refine(isPluginId, "must be a supported plugin")).transform((plugins) => [...new Set(plugins)]).optional(),
|
|
16014
|
+
systemPrompt: z26.string().optional(),
|
|
16015
|
+
warmHook: z26.string().optional(),
|
|
16016
|
+
startHook: z26.string().optional(),
|
|
16017
|
+
variables: z26.record(variableNameSchema, z26.string()).optional(),
|
|
16018
|
+
requiredSecrets: z26.array(variableNameSchema).optional(),
|
|
16019
|
+
mcps: z26.record(z26.string().regex(MCP_NAME_PATTERN, "must be 1\u201364 letters, digits, underscores or hyphens, starting with a letter or digit").refine((name) => !isReservedMcpName(name), "is reserved for Replicas"), replicasMcpDefinitionSchema).optional()
|
|
15788
16020
|
}).superRefine((config, context) => {
|
|
15789
16021
|
if (config.inheritRepositories === true && config.repositories !== void 0) context.addIssue({ code: "custom", path: ["repositories"], message: "Inherited repositories cannot also be declared explicitly" });
|
|
15790
16022
|
const skillNames = Object.keys(config.skills ?? {}).map((slug) => slug.toLowerCase());
|
|
@@ -15807,39 +16039,39 @@ var replicasEnvironmentConfigSchema = z25.strictObject({
|
|
|
15807
16039
|
// ../shared/src/routes/environment-config-source.ts
|
|
15808
16040
|
var ENVIRONMENT_CONFIG_PREFERENCES = [["memory", "memory"], ["gpu", "gpu"], ["mobileTesting", "mobile_testing"], ["defaultSkills", "default_skills"]];
|
|
15809
16041
|
var ENVIRONMENT_CONFIG_SETTING_FIELDS = ["repositories", "workspaceSize", "inheritRepositories", ...ENVIRONMENT_CONFIG_PREFERENCES.map(([field]) => field)];
|
|
15810
|
-
var environmentConfigLocationSchema =
|
|
15811
|
-
|
|
15812
|
-
kind:
|
|
15813
|
-
entrypoint_filename:
|
|
15814
|
-
repository_id:
|
|
15815
|
-
repository_name:
|
|
15816
|
-
filename:
|
|
15817
|
-
commit_sha:
|
|
15818
|
-
source_url:
|
|
15819
|
-
file_sha:
|
|
16042
|
+
var environmentConfigLocationSchema = z27.union([
|
|
16043
|
+
z27.object({
|
|
16044
|
+
kind: z27.literal("git").default("git"),
|
|
16045
|
+
entrypoint_filename: z27.string().optional(),
|
|
16046
|
+
repository_id: z27.string(),
|
|
16047
|
+
repository_name: z27.string(),
|
|
16048
|
+
filename: z27.string(),
|
|
16049
|
+
commit_sha: z27.string(),
|
|
16050
|
+
source_url: z27.string(),
|
|
16051
|
+
file_sha: z27.undefined().optional()
|
|
15820
16052
|
}),
|
|
15821
|
-
|
|
15822
|
-
kind:
|
|
15823
|
-
repository_id:
|
|
15824
|
-
repository_name:
|
|
15825
|
-
filename:
|
|
15826
|
-
commit_sha:
|
|
15827
|
-
source_url:
|
|
15828
|
-
file_sha:
|
|
16053
|
+
z27.object({
|
|
16054
|
+
kind: z27.literal("file"),
|
|
16055
|
+
repository_id: z27.null(),
|
|
16056
|
+
repository_name: z27.null(),
|
|
16057
|
+
filename: z27.string(),
|
|
16058
|
+
commit_sha: z27.null(),
|
|
16059
|
+
source_url: z27.null(),
|
|
16060
|
+
file_sha: z27.string()
|
|
15829
16061
|
})
|
|
15830
16062
|
]);
|
|
15831
16063
|
var sourceInput = {
|
|
15832
|
-
repository_id:
|
|
15833
|
-
file:
|
|
16064
|
+
repository_id: z27.string().min(1).optional(),
|
|
16065
|
+
file: z27.strictObject({ filename: z27.string().min(1).max(1024), environment: replicasEnvironmentConfigSchema }).optional()
|
|
15834
16066
|
};
|
|
15835
|
-
var previewEnvironmentConfigSourceRequestSchema =
|
|
16067
|
+
var previewEnvironmentConfigSourceRequestSchema = z27.strictObject(sourceInput).refine(
|
|
15836
16068
|
(input) => !input.file || !input.repository_id,
|
|
15837
16069
|
{ message: "Choose either a repository or a file" }
|
|
15838
16070
|
);
|
|
15839
|
-
var applyEnvironmentConfigSourceRequestSchema =
|
|
16071
|
+
var applyEnvironmentConfigSourceRequestSchema = z27.strictObject({
|
|
15840
16072
|
...sourceInput,
|
|
15841
|
-
commit_sha:
|
|
15842
|
-
fingerprint:
|
|
16073
|
+
commit_sha: z27.string().min(1).optional(),
|
|
16074
|
+
fingerprint: z27.string().min(1)
|
|
15843
16075
|
}).refine((input) => input.file ? !input.repository_id && !input.commit_sha : !!input.commit_sha, {
|
|
15844
16076
|
message: "File configuration requires file contents; Git configuration requires a reviewed commit"
|
|
15845
16077
|
});
|
|
@@ -15906,55 +16138,55 @@ var REPLICAS_MCP_TOOLS = {
|
|
|
15906
16138
|
deleteChat: "delete_chat",
|
|
15907
16139
|
listRepositories: "list_repositories"
|
|
15908
16140
|
};
|
|
15909
|
-
var automationToolInputSchema =
|
|
15910
|
-
name:
|
|
15911
|
-
prompt:
|
|
15912
|
-
environment_id:
|
|
15913
|
-
triggers:
|
|
16141
|
+
var automationToolInputSchema = z28.object({
|
|
16142
|
+
name: z28.string().describe("Short automation name."),
|
|
16143
|
+
prompt: z28.string().describe("Prompt each automation run starts with."),
|
|
16144
|
+
environment_id: z28.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
16145
|
+
triggers: z28.array(automationTriggerSchema).min(1).describe(
|
|
15914
16146
|
`One or more triggers. Cron: \`{ "type": "cron", "config": { "schedule": "0 9 * * 1", "timezone": "America/New_York" } }\`. GitHub: \`{ "type": "github", "config": { "event": "pull_request.opened", "repository_ids": ["<repository uuid>"] } }\`. Linear: \`{ "type": "linear", "config": { "event": "${LINEAR_ISSUE_STATE_CHANGED_EVENT}", "state_types": ["completed"] } }\`.`
|
|
15915
16147
|
),
|
|
15916
|
-
description:
|
|
15917
|
-
plan_mode:
|
|
15918
|
-
goal_mode:
|
|
15919
|
-
fast_mode:
|
|
15920
|
-
workspace_lifecycle_policy:
|
|
16148
|
+
description: z28.string().optional().describe("One-line summary shown in the dashboard."),
|
|
16149
|
+
plan_mode: z28.boolean().optional(),
|
|
16150
|
+
goal_mode: z28.boolean().optional(),
|
|
16151
|
+
fast_mode: z28.boolean().optional(),
|
|
16152
|
+
workspace_lifecycle_policy: z28.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
15921
16153
|
"What happens to a run's workspace when the agent finishes. `delete_when_done` (default, except one-time runs, which default to `default`) when the output lives elsewhere (PR comments, checks, Slack posts); `sleep_when_done` when later runs reuse the workspace, like one per PR across pushes; `default` (keep alive) when people follow up in the workspace."
|
|
15922
16154
|
)
|
|
15923
16155
|
});
|
|
15924
16156
|
var credentialUserIdDescription = `Organization automations only: the user ID (see \`${REPLICAS_MCP_TOOLS.whoami}\`) of the member whose coding agent credentials, such as their Claude subscription, runs use before the organization's. Only your workspace's owner, or whoever's credentials this workspace runs on.`;
|
|
15925
|
-
var automationBackgroundSchema =
|
|
16157
|
+
var automationBackgroundSchema = z28.boolean().optional().describe(
|
|
15926
16158
|
"Marks this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list."
|
|
15927
16159
|
);
|
|
15928
16160
|
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
15929
|
-
credential_user_id:
|
|
16161
|
+
credential_user_id: z28.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
|
|
15930
16162
|
background: automationBackgroundSchema,
|
|
15931
|
-
scope:
|
|
16163
|
+
scope: z28.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
15932
16164
|
});
|
|
15933
16165
|
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
15934
|
-
automation_id:
|
|
15935
|
-
enabled:
|
|
15936
|
-
agent_provider:
|
|
15937
|
-
model:
|
|
15938
|
-
thinking_level:
|
|
15939
|
-
workspace_size:
|
|
15940
|
-
credential_user_id:
|
|
16166
|
+
automation_id: z28.string().describe("Automation ID"),
|
|
16167
|
+
enabled: z28.boolean().optional(),
|
|
16168
|
+
agent_provider: z28.enum(ENGINE_AGENT_PROVIDERS).nullable().optional(),
|
|
16169
|
+
model: z28.string().nullable().optional(),
|
|
16170
|
+
thinking_level: z28.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
16171
|
+
workspace_size: z28.enum(WORKSPACE_SIZES).optional(),
|
|
16172
|
+
credential_user_id: z28.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
|
|
15941
16173
|
background: automationBackgroundSchema,
|
|
15942
|
-
scope:
|
|
16174
|
+
scope: z28.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
15943
16175
|
});
|
|
15944
|
-
var chatPath = { id:
|
|
15945
|
-
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
15946
|
-
var createChatToolInputSchema =
|
|
15947
|
-
var forkChatToolInputSchema =
|
|
15948
|
-
var renameChatToolInputSchema =
|
|
15949
|
-
var runCommandToolInputSchema =
|
|
15950
|
-
var environmentMcpPath = { environment_id:
|
|
15951
|
-
var createEnvironmentMcpToolInputSchema =
|
|
15952
|
-
var updateEnvironmentMcpToolInputSchema =
|
|
16176
|
+
var chatPath = { id: z28.string().describe("Workspace ID"), chat_id: z28.string().describe("Chat ID") };
|
|
16177
|
+
var { provider, model, thinkingLevel, title: title2, message } = forkChatRequestSchema.shape;
|
|
16178
|
+
var createChatToolInputSchema = z28.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
16179
|
+
var forkChatToolInputSchema = z28.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title: title2, message });
|
|
16180
|
+
var renameChatToolInputSchema = z28.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
16181
|
+
var runCommandToolInputSchema = z28.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
16182
|
+
var environmentMcpPath = { environment_id: z28.string().describe("Environment ID") };
|
|
16183
|
+
var createEnvironmentMcpToolInputSchema = z28.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
16184
|
+
var updateEnvironmentMcpToolInputSchema = z28.object({
|
|
15953
16185
|
...environmentMcpPath,
|
|
15954
|
-
mcp_id:
|
|
16186
|
+
mcp_id: z28.string().describe("MCP ID"),
|
|
15955
16187
|
...updateEnvironmentMcpRequestSchema.shape
|
|
15956
16188
|
});
|
|
15957
|
-
var createEnvironmentDeviceToolInputSchema =
|
|
16189
|
+
var createEnvironmentDeviceToolInputSchema = z28.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
15958
16190
|
var previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
15959
16191
|
var applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
15960
16192
|
|
|
@@ -16165,7 +16397,7 @@ ${MERGE_RULE}
|
|
|
16165
16397
|
${chatRule("the board", "a finding that changes the answer, a ship you started, or a decision you need")}
|
|
16166
16398
|
`;
|
|
16167
16399
|
var 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.
|
|
16168
|
-
- 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
|
|
16400
|
+
- 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\`.
|
|
16169
16401
|
- 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.
|
|
16170
16402
|
- 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.
|
|
16171
16403
|
- 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.
|
|
@@ -16248,236 +16480,6 @@ var parseTagAttributes = (raw) => Object.fromEntries([...raw.matchAll(ATTRIBUTE)
|
|
|
16248
16480
|
|
|
16249
16481
|
// ../shared/src/issue-events.ts
|
|
16250
16482
|
import { z as z29 } from "zod";
|
|
16251
|
-
|
|
16252
|
-
// ../shared/src/routes/issues.ts
|
|
16253
|
-
import { z as z28 } from "zod";
|
|
16254
|
-
var ISSUE_STATUSES = ["backlog", "todo", "in_progress", "in_review", "done", "canceled", "duplicate"];
|
|
16255
|
-
var ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
|
|
16256
|
-
var ISSUE_ACTOR_TYPES = ["user", "workspace"];
|
|
16257
|
-
var ISSUE_SUBSCRIBER_ROLES = ["assignee", "creator", "mentioned", "manual"];
|
|
16258
|
-
var ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
|
|
16259
|
-
var ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
|
|
16260
|
-
var issueStatusSchema = z28.enum(ISSUE_STATUSES);
|
|
16261
|
-
var issuePrioritySchema = z28.enum(ISSUE_PRIORITIES);
|
|
16262
|
-
var issueSubscriberRoleSchema = z28.enum(ISSUE_SUBSCRIBER_ROLES);
|
|
16263
|
-
var issueRelationTypeSchema = z28.enum(ISSUE_RELATION_TYPES);
|
|
16264
|
-
var issuePullRequestStateSchema = z28.enum(ISSUE_PULL_REQUEST_STATES);
|
|
16265
|
-
var ISSUE_STATUS_LABELS = { backlog: "Backlog", todo: "Todo", in_progress: "In Progress", in_review: "In Review", done: "Done", canceled: "Canceled", duplicate: "Duplicate" };
|
|
16266
|
-
var ISSUE_PRIORITY_LABELS = { none: "No priority", urgent: "Urgent", high: "High", medium: "Medium", low: "Low" };
|
|
16267
|
-
var issueActorSchema = z28.object({
|
|
16268
|
-
type: z28.enum(ISSUE_ACTOR_TYPES),
|
|
16269
|
-
id: z28.string().toLowerCase().uuid()
|
|
16270
|
-
});
|
|
16271
|
-
var ISSUE_KEY_RE = /^[A-Z][A-Z0-9]{0,9}$/;
|
|
16272
|
-
var timestamp = z28.string();
|
|
16273
|
-
var nullableTimestamp = timestamp.nullable();
|
|
16274
|
-
var issueSchema = z28.object({
|
|
16275
|
-
id: z28.string().uuid(),
|
|
16276
|
-
organization_id: z28.string().uuid(),
|
|
16277
|
-
number: z28.number().int(),
|
|
16278
|
-
identifier: z28.string(),
|
|
16279
|
-
title: z28.string(),
|
|
16280
|
-
description: z28.string(),
|
|
16281
|
-
status: issueStatusSchema,
|
|
16282
|
-
priority: issuePrioritySchema,
|
|
16283
|
-
parent_id: z28.string().uuid().nullable(),
|
|
16284
|
-
manager_id: z28.string().uuid().nullable(),
|
|
16285
|
-
creator: issueActorSchema,
|
|
16286
|
-
/** Fractional: to move an issue between two others, send the midpoint of their sort orders. */
|
|
16287
|
-
sort_order: z28.number(),
|
|
16288
|
-
created_at: timestamp,
|
|
16289
|
-
updated_at: timestamp,
|
|
16290
|
-
completed_at: nullableTimestamp,
|
|
16291
|
-
canceled_at: nullableTimestamp,
|
|
16292
|
-
archived_at: nullableTimestamp
|
|
16293
|
-
});
|
|
16294
|
-
var issueSubscriberSchema = z28.object({
|
|
16295
|
-
issue_id: z28.string().uuid(),
|
|
16296
|
-
subscriber: issueActorSchema,
|
|
16297
|
-
role: issueSubscriberRoleSchema,
|
|
16298
|
-
created_at: timestamp
|
|
16299
|
-
});
|
|
16300
|
-
var issueRelationSchema = z28.object({
|
|
16301
|
-
id: z28.string().uuid(),
|
|
16302
|
-
type: issueRelationTypeSchema,
|
|
16303
|
-
issue_id: z28.string().uuid(),
|
|
16304
|
-
related_issue_id: z28.string().uuid(),
|
|
16305
|
-
created_at: timestamp
|
|
16306
|
-
});
|
|
16307
|
-
var issuePullRequestSchema = z28.object({
|
|
16308
|
-
id: z28.string().uuid(),
|
|
16309
|
-
issue_id: z28.string().uuid(),
|
|
16310
|
-
url: z28.string(),
|
|
16311
|
-
pull_request_id: z28.string().uuid().nullable(),
|
|
16312
|
-
title: z28.string().nullable(),
|
|
16313
|
-
state: issuePullRequestStateSchema,
|
|
16314
|
-
created_at: timestamp,
|
|
16315
|
-
updated_at: timestamp
|
|
16316
|
-
});
|
|
16317
|
-
var issueCommentSchema = z28.object({
|
|
16318
|
-
id: z28.string().uuid(),
|
|
16319
|
-
issue_id: z28.string().uuid(),
|
|
16320
|
-
author: issueActorSchema,
|
|
16321
|
-
body: z28.string(),
|
|
16322
|
-
created_at: timestamp,
|
|
16323
|
-
updated_at: timestamp
|
|
16324
|
-
});
|
|
16325
|
-
var change = (value) => z28.object({ from: value, to: value });
|
|
16326
|
-
var nullableId = z28.string().uuid().nullable();
|
|
16327
|
-
var ISSUE_EVENT_TYPES = [
|
|
16328
|
-
"created",
|
|
16329
|
-
"title_changed",
|
|
16330
|
-
"description_changed",
|
|
16331
|
-
"status_changed",
|
|
16332
|
-
"priority_changed",
|
|
16333
|
-
"parent_changed",
|
|
16334
|
-
"manager_changed",
|
|
16335
|
-
"sort_order_changed",
|
|
16336
|
-
"assignee_added",
|
|
16337
|
-
"assignee_removed",
|
|
16338
|
-
"subscriber_added",
|
|
16339
|
-
"subscriber_removed",
|
|
16340
|
-
"relation_added",
|
|
16341
|
-
"relation_removed",
|
|
16342
|
-
"pr_linked",
|
|
16343
|
-
"pr_unlinked",
|
|
16344
|
-
"pr_state_changed",
|
|
16345
|
-
"comment_added",
|
|
16346
|
-
"comment_edited",
|
|
16347
|
-
"comment_deleted",
|
|
16348
|
-
"archived",
|
|
16349
|
-
"restored"
|
|
16350
|
-
];
|
|
16351
|
-
var issueEventDataSchemas = {
|
|
16352
|
-
created: z28.object({ issue: issueSchema }),
|
|
16353
|
-
title_changed: change(z28.string()),
|
|
16354
|
-
description_changed: change(z28.string()),
|
|
16355
|
-
status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp }),
|
|
16356
|
-
priority_changed: change(issuePrioritySchema),
|
|
16357
|
-
parent_changed: change(nullableId),
|
|
16358
|
-
manager_changed: change(nullableId),
|
|
16359
|
-
sort_order_changed: change(z28.number()),
|
|
16360
|
-
/** `subscriber` is the row after the change: an unassigned principal stays subscribed with role `manual`. */
|
|
16361
|
-
assignee_added: z28.object({ subscriber: issueSubscriberSchema }),
|
|
16362
|
-
assignee_removed: z28.object({ subscriber: issueSubscriberSchema }),
|
|
16363
|
-
subscriber_added: z28.object({ subscriber: issueSubscriberSchema }),
|
|
16364
|
-
subscriber_removed: z28.object({ subscriber: issueSubscriberSchema }),
|
|
16365
|
-
relation_added: z28.object({ relation: issueRelationSchema }),
|
|
16366
|
-
relation_removed: z28.object({ relation: issueRelationSchema }),
|
|
16367
|
-
pr_linked: z28.object({ pull_request: issuePullRequestSchema }),
|
|
16368
|
-
pr_unlinked: z28.object({ pull_request: issuePullRequestSchema }),
|
|
16369
|
-
pr_state_changed: z28.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
|
|
16370
|
-
comment_added: z28.object({ comment: issueCommentSchema }),
|
|
16371
|
-
comment_edited: z28.object({ comment: issueCommentSchema, from: z28.string() }),
|
|
16372
|
-
comment_deleted: z28.object({ comment: issueCommentSchema }),
|
|
16373
|
-
archived: z28.object({ archived_at: timestamp }),
|
|
16374
|
-
restored: z28.object({
|
|
16375
|
-
issue: issueSchema,
|
|
16376
|
-
subscribers: z28.array(issueSubscriberSchema),
|
|
16377
|
-
relations: z28.array(issueRelationSchema),
|
|
16378
|
-
pull_requests: z28.array(issuePullRequestSchema)
|
|
16379
|
-
})
|
|
16380
|
-
};
|
|
16381
|
-
var issueEventBase = z28.object({
|
|
16382
|
-
sync_id: z28.number().int(),
|
|
16383
|
-
issue_id: z28.string().uuid(),
|
|
16384
|
-
actor: issueActorSchema,
|
|
16385
|
-
/** Echo of the `client_mutation_id` sent with the write, so the writer can settle its optimistic change. */
|
|
16386
|
-
client_mutation_id: z28.string().nullable(),
|
|
16387
|
-
created_at: timestamp
|
|
16388
|
-
});
|
|
16389
|
-
var issueEventVariant = (type) => issueEventBase.extend({ type: z28.literal(type), data: issueEventDataSchemas[type] });
|
|
16390
|
-
var issueEventSchema = z28.discriminatedUnion("type", [issueEventVariant(ISSUE_EVENT_TYPES[0]), ...ISSUE_EVENT_TYPES.slice(1).map(issueEventVariant)]);
|
|
16391
|
-
var clientMutationId = z28.string().min(1).max(128).optional();
|
|
16392
|
-
var title2 = z28.string().trim().min(1).max(500);
|
|
16393
|
-
var description = z28.string().max(1e5);
|
|
16394
|
-
var body = z28.string().trim().min(1).max(1e5);
|
|
16395
|
-
var createIssueRequestSchema = z28.object({
|
|
16396
|
-
/** Client-generated id, so an optimistic create can be referenced before the server answers. */
|
|
16397
|
-
id: z28.string().uuid().optional(),
|
|
16398
|
-
title: title2,
|
|
16399
|
-
description: description.optional(),
|
|
16400
|
-
status: issueStatusSchema.optional(),
|
|
16401
|
-
priority: issuePrioritySchema.optional(),
|
|
16402
|
-
parent_id: z28.string().uuid().optional(),
|
|
16403
|
-
manager_id: z28.string().uuid().optional(),
|
|
16404
|
-
sort_order: z28.number().finite().optional(),
|
|
16405
|
-
assignees: z28.array(issueActorSchema).max(20).optional(),
|
|
16406
|
-
subscribers: z28.array(issueActorSchema).max(50).optional(),
|
|
16407
|
-
client_mutation_id: clientMutationId
|
|
16408
|
-
});
|
|
16409
|
-
var updateIssueRequestSchema = z28.object({
|
|
16410
|
-
title: title2.optional(),
|
|
16411
|
-
description: description.optional(),
|
|
16412
|
-
status: issueStatusSchema.optional(),
|
|
16413
|
-
priority: issuePrioritySchema.optional(),
|
|
16414
|
-
// PATCH semantics: null clears the parent or Manager, omitting it leaves it unchanged.
|
|
16415
|
-
parent_id: nullableId.optional(),
|
|
16416
|
-
manager_id: nullableId.optional(),
|
|
16417
|
-
sort_order: z28.number().finite().optional(),
|
|
16418
|
-
client_mutation_id: clientMutationId
|
|
16419
|
-
});
|
|
16420
|
-
var issueActorRequestSchema = issueActorSchema.partial().extend({ client_mutation_id: clientMutationId });
|
|
16421
|
-
var createIssueCommentRequestSchema = z28.object({
|
|
16422
|
-
id: z28.string().uuid().optional(),
|
|
16423
|
-
body,
|
|
16424
|
-
client_mutation_id: clientMutationId
|
|
16425
|
-
});
|
|
16426
|
-
var updateIssueCommentRequestSchema = z28.object({ body, client_mutation_id: clientMutationId });
|
|
16427
|
-
var createIssueRelationRequestSchema = z28.object({
|
|
16428
|
-
id: z28.string().uuid().optional(),
|
|
16429
|
-
type: issueRelationTypeSchema,
|
|
16430
|
-
related_issue: z28.string().min(1),
|
|
16431
|
-
client_mutation_id: clientMutationId
|
|
16432
|
-
});
|
|
16433
|
-
var linkIssuePullRequestRequestSchema = z28.object({
|
|
16434
|
-
id: z28.string().uuid().optional(),
|
|
16435
|
-
url: z28.string().url().max(2e3),
|
|
16436
|
-
title: z28.string().max(500).optional(),
|
|
16437
|
-
state: issuePullRequestStateSchema.optional(),
|
|
16438
|
-
pull_request_id: z28.string().uuid().optional(),
|
|
16439
|
-
client_mutation_id: clientMutationId
|
|
16440
|
-
});
|
|
16441
|
-
var updateIssuePullRequestRequestSchema = z28.object({
|
|
16442
|
-
state: issuePullRequestStateSchema,
|
|
16443
|
-
client_mutation_id: clientMutationId
|
|
16444
|
-
});
|
|
16445
|
-
var issueMutationRequestSchema = z28.object({ client_mutation_id: clientMutationId });
|
|
16446
|
-
var updateIssueSettingsRequestSchema = z28.object({ issue_key: z28.string().trim().toUpperCase().regex(ISSUE_KEY_RE) });
|
|
16447
|
-
var listIssuesQuerySchema = z28.object({
|
|
16448
|
-
status: z28.string().optional(),
|
|
16449
|
-
priority: z28.string().optional(),
|
|
16450
|
-
assignee: z28.string().optional(),
|
|
16451
|
-
subscriber: z28.string().optional(),
|
|
16452
|
-
creator: z28.string().optional(),
|
|
16453
|
-
manager_id: z28.string().optional(),
|
|
16454
|
-
parent_id: z28.string().optional(),
|
|
16455
|
-
q: z28.string().max(200).optional(),
|
|
16456
|
-
include_archived: z28.enum(["true", "false"]).optional(),
|
|
16457
|
-
limit: z28.coerce.number().int().min(1).max(200).optional(),
|
|
16458
|
-
cursor: z28.coerce.number().int().min(0).max(2147483647).optional()
|
|
16459
|
-
});
|
|
16460
|
-
var issueDetailResponseSchema = z28.object({
|
|
16461
|
-
issue: issueSchema,
|
|
16462
|
-
subscribers: z28.array(issueSubscriberSchema),
|
|
16463
|
-
relations: z28.array(issueRelationSchema),
|
|
16464
|
-
pull_requests: z28.array(issuePullRequestSchema),
|
|
16465
|
-
comments: z28.array(issueCommentSchema),
|
|
16466
|
-
events: z28.array(issueEventSchema),
|
|
16467
|
-
sub_issues: z28.array(issueSchema)
|
|
16468
|
-
});
|
|
16469
|
-
var listIssuesResponseSchema = z28.object({ issues: z28.array(issueSchema), next_cursor: z28.number().nullable() });
|
|
16470
|
-
var issuesDeltaQuerySchema = z28.object({
|
|
16471
|
-
after: z28.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
16472
|
-
limit: z28.coerce.number().int().min(1).max(1e3).optional()
|
|
16473
|
-
});
|
|
16474
|
-
var issueInboxQuerySchema = z28.object({
|
|
16475
|
-
limit: z28.coerce.number().int().min(1).max(100).optional(),
|
|
16476
|
-
before: z28.coerce.number().int().min(1).optional()
|
|
16477
|
-
});
|
|
16478
|
-
var markIssueInboxReadRequestSchema = z28.object({ sync_id: z28.number().int().min(0).optional() });
|
|
16479
|
-
|
|
16480
|
-
// ../shared/src/issue-events.ts
|
|
16481
16483
|
var ISSUE_EVENT_TAG = "issue_event";
|
|
16482
16484
|
var transitionSchema = z29.discriminatedUnion("field", [
|
|
16483
16485
|
z29.object({ field: z29.literal("status"), from: issueStatusSchema, to: issueStatusSchema }),
|
|
@@ -21578,7 +21580,7 @@ async function withRetry(label, fn, options) {
|
|
|
21578
21580
|
}
|
|
21579
21581
|
|
|
21580
21582
|
// ../shared/src/tensorlake.ts
|
|
21581
|
-
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-20-
|
|
21583
|
+
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-20-v25";
|
|
21582
21584
|
var TENSORLAKE_DISK_MB = 100 * 1024;
|
|
21583
21585
|
|
|
21584
21586
|
// ../shared/src/egress.ts
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
SUBPROCESS_MAX_BUFFER,
|
|
6
6
|
execFileAsync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SMVAFF4W.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
provisionedDeviceSchema,
|
|
22
22
|
readReplicasRuntimeEnv,
|
|
23
23
|
serializePosixEnvFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GRKULNCY.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XZQWZSQR.js";
|
|
7
7
|
import {
|
|
8
8
|
ASTER_BASE_URL,
|
|
9
9
|
ASTER_PROVIDER,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isRecord,
|
|
16
16
|
readOllamaAuthEnv,
|
|
17
17
|
readOpenAICompatibleAuthEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GRKULNCY.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LGTK3MTL.js";
|
|
9
9
|
import {
|
|
10
10
|
COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES,
|
|
11
11
|
COMMAND_PROTECTION_REPO_GIT_ARGS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseCommandProtectionRequest,
|
|
19
19
|
toCommandProtectionRepoState,
|
|
20
20
|
withRetry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GRKULNCY.js";
|
|
22
22
|
|
|
23
23
|
// src/services/command-protection-service.ts
|
|
24
24
|
import { readFile, stat } from "fs/promises";
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
resolveDiffBase,
|
|
13
13
|
runGitCommand,
|
|
14
14
|
setAgentCredentialSnapshot
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LGTK3MTL.js";
|
|
16
16
|
import {
|
|
17
17
|
AppServerProcess,
|
|
18
18
|
buildCodexAgentEnv
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XZQWZSQR.js";
|
|
20
20
|
import {
|
|
21
21
|
SUBPROCESS_MAX_BUFFER,
|
|
22
22
|
execFileAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SMVAFF4W.js";
|
|
24
24
|
import {
|
|
25
25
|
isRecord
|
|
26
26
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
shrunkImageSize,
|
|
62
62
|
splitManagerInstructions,
|
|
63
63
|
withTimeout
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-GRKULNCY.js";
|
|
65
65
|
|
|
66
66
|
// src/managers/codex-token-manager.ts
|
|
67
67
|
import { promises as fs } from "fs";
|
|
@@ -461,7 +461,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
461
461
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
462
462
|
await this.applyCredentialsResponse(data);
|
|
463
463
|
setAgentCredentialSnapshot("codex", data);
|
|
464
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
464
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-LBXIPZ5Q.js");
|
|
465
465
|
await restartCodexAspHostIfRunning2();
|
|
466
466
|
});
|
|
467
467
|
await this.start(true);
|
|
@@ -483,7 +483,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
483
483
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
484
484
|
await this.applyCredentialsResponse(data);
|
|
485
485
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
486
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
486
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-LBXIPZ5Q.js");
|
|
487
487
|
await restartCodexAspHostIfRunning2();
|
|
488
488
|
}
|
|
489
489
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GRKULNCY.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
execFileAsync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SMVAFF4W.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GRKULNCY.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -242,7 +242,7 @@ function getCodexModelProvider(method) {
|
|
|
242
242
|
if (method === "foundry") return "azure";
|
|
243
243
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
244
244
|
}
|
|
245
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
245
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1677";
|
|
246
246
|
var INITIALIZE_METHOD = "initialize";
|
|
247
247
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
248
248
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
evaluateCommandProtection
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OTZZFUHK.js";
|
|
7
|
+
import "./chunk-LGTK3MTL.js";
|
|
8
|
+
import "./chunk-SMVAFF4W.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GRKULNCY.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-O7XPO6NN.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-XZQWZSQR.js";
|
|
22
|
+
import "./chunk-SMVAFF4W.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
|
25
25
|
OPENCODE_GO_PROVIDER,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
headlessAgentUsagePath,
|
|
30
30
|
isRecord,
|
|
31
31
|
withTimeout
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-GRKULNCY.js";
|
|
33
33
|
import "./chunk-VEQXQN22.js";
|
|
34
34
|
|
|
35
35
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
evaluateCommandProtection,
|
|
92
92
|
extractToolCommand,
|
|
93
93
|
reportCommandProtectionBlock
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-OTZZFUHK.js";
|
|
95
95
|
import {
|
|
96
96
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
97
97
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -129,10 +129,10 @@ import {
|
|
|
129
129
|
spawnMuseMsp,
|
|
130
130
|
startMuseSession,
|
|
131
131
|
uuidV7
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-O7XPO6NN.js";
|
|
133
133
|
import {
|
|
134
134
|
publishedPullRequestUrls
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-PIVA4SOH.js";
|
|
136
136
|
import {
|
|
137
137
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
138
138
|
AsyncLock,
|
|
@@ -212,7 +212,7 @@ import {
|
|
|
212
212
|
transcriptSecrets,
|
|
213
213
|
upsertCredentialFileLines,
|
|
214
214
|
writeSecureCredentialFile
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-PWGB7XYF.js";
|
|
216
216
|
import {
|
|
217
217
|
ENGINE_ENV,
|
|
218
218
|
UNQUOTED_PATHS_CONFIG,
|
|
@@ -223,17 +223,17 @@ import {
|
|
|
223
223
|
resolveDiffBase,
|
|
224
224
|
setAgentCredentialSnapshot,
|
|
225
225
|
setLinearSessionId
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-LGTK3MTL.js";
|
|
227
227
|
import {
|
|
228
228
|
AspRequestTimeoutError,
|
|
229
229
|
buildCodexAgentEnv,
|
|
230
230
|
getCodexModelProvider
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-XZQWZSQR.js";
|
|
232
232
|
import {
|
|
233
233
|
SUBPROCESS_MAX_BUFFER,
|
|
234
234
|
execAsync,
|
|
235
235
|
execFileAsync
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-SMVAFF4W.js";
|
|
237
237
|
import {
|
|
238
238
|
isRecord as isRecord2
|
|
239
239
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -533,7 +533,7 @@ import {
|
|
|
533
533
|
workspaceTokenRequestSchema,
|
|
534
534
|
workspaceTokenResponseSchema,
|
|
535
535
|
wrapInTag
|
|
536
|
-
} from "./chunk-
|
|
536
|
+
} from "./chunk-GRKULNCY.js";
|
|
537
537
|
import {
|
|
538
538
|
__commonJS,
|
|
539
539
|
__export,
|
|
@@ -11465,6 +11465,9 @@ function describeLoginFailure(provider, login, configuredMethod, revoked) {
|
|
|
11465
11465
|
const fixer = orgLogin ? "an organization admin" : login?.account?.ownerName ?? "you";
|
|
11466
11466
|
return `${agent} could not sign in with ${name}. The login expired or was revoked. Replicas recently switched to one-year Claude logins, so ${fixer} should update the Replicas CLI (\`npm install -g replicas-cli@latest\`) and reconnect with \`replicas claude-auth${orgLogin ? " --org" : ""}\`. Claude logins are listed in ${agentsPage}`;
|
|
11467
11467
|
}
|
|
11468
|
+
if (!login && (!method || method === "unknown")) {
|
|
11469
|
+
return `No ${agent} credential is available to this workspace. Connect your own ${agent} account in ${agentsPage}`;
|
|
11470
|
+
}
|
|
11468
11471
|
const why = revoked ? "It was signed out, revoked, or expired." : method === "api_key" ? "The key may be invalid, revoked, out of credits, or missing access to the selected model." : method === "bedrock" ? "Check its credentials, region, IAM permissions, and Claude model access." : method === "foundry" ? `Check its API key, resource, and ${agent} deployment names.` : method === "anthropic-compatible" ? "Check its endpoint URL, API key, and that it serves the selected model." : "It was rejected even after a refresh.";
|
|
11469
11472
|
const reconnect = orgLogin ? `An organization admin can reconnect it in ${agentsPage}` : `Reconnect it in ${agentsPage}`;
|
|
11470
11473
|
return `${agent} could not sign in with ${name}. ${why} ${reconnect}`;
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
publishedPullRequestUrls
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PIVA4SOH.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
9
|
} from "./chunk-UZSNFLDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
shouldRefreshPullRequests
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GRKULNCY.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/subagent-mcp.js
CHANGED