replicas-cli 0.3.515 → 0.3.517
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 +140 -120
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -500,8 +500,8 @@ function assertNever(_x) {
|
|
|
500
500
|
function assert(_) {
|
|
501
501
|
}
|
|
502
502
|
function getEnumValues(entries) {
|
|
503
|
-
const numericValues = Object.values(entries).filter((
|
|
504
|
-
const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_,
|
|
503
|
+
const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
|
|
504
|
+
const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v2]) => v2);
|
|
505
505
|
return values;
|
|
506
506
|
}
|
|
507
507
|
function joinValues(array2, separator = "|") {
|
|
@@ -544,9 +544,9 @@ function defineLazy(object2, key, getter) {
|
|
|
544
544
|
}
|
|
545
545
|
return value;
|
|
546
546
|
},
|
|
547
|
-
set(
|
|
547
|
+
set(v2) {
|
|
548
548
|
Object.defineProperty(object2, key, {
|
|
549
|
-
value:
|
|
549
|
+
value: v2
|
|
550
550
|
// configurable: true,
|
|
551
551
|
});
|
|
552
552
|
},
|
|
@@ -3327,10 +3327,10 @@ var init_schemas = __esm({
|
|
|
3327
3327
|
v7: 7,
|
|
3328
3328
|
v8: 8
|
|
3329
3329
|
};
|
|
3330
|
-
const
|
|
3331
|
-
if (
|
|
3330
|
+
const v2 = versionMap[def.version];
|
|
3331
|
+
if (v2 === void 0)
|
|
3332
3332
|
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
3333
|
-
def.pattern ?? (def.pattern = uuid(
|
|
3333
|
+
def.pattern ?? (def.pattern = uuid(v2));
|
|
3334
3334
|
} else
|
|
3335
3335
|
def.pattern ?? (def.pattern = uuid());
|
|
3336
3336
|
$ZodStringFormat.init(inst, def);
|
|
@@ -3840,8 +3840,8 @@ var init_schemas = __esm({
|
|
|
3840
3840
|
if (!Object.prototype.hasOwnProperty.call(propValues, key)) {
|
|
3841
3841
|
assignProp(propValues, key, /* @__PURE__ */ new Set());
|
|
3842
3842
|
}
|
|
3843
|
-
for (const
|
|
3844
|
-
propValues[key].add(
|
|
3843
|
+
for (const v2 of field2.values)
|
|
3844
|
+
propValues[key].add(v2);
|
|
3845
3845
|
if (field2.optin !== void 0)
|
|
3846
3846
|
propValues[key].add(void 0);
|
|
3847
3847
|
}
|
|
@@ -4108,11 +4108,11 @@ var init_schemas = __esm({
|
|
|
4108
4108
|
throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
|
|
4109
4109
|
if (pv[zod.def.discriminator]?.has(void 0))
|
|
4110
4110
|
undefinedCount++;
|
|
4111
|
-
for (const [k,
|
|
4111
|
+
for (const [k, v2] of Object.entries(pv)) {
|
|
4112
4112
|
if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
|
|
4113
4113
|
assignProp(propValues, k, /* @__PURE__ */ new Set());
|
|
4114
4114
|
}
|
|
4115
|
-
for (const val of
|
|
4115
|
+
for (const val of v2) {
|
|
4116
4116
|
propValues[k].add(val);
|
|
4117
4117
|
}
|
|
4118
4118
|
}
|
|
@@ -4659,8 +4659,8 @@ var init_schemas = __esm({
|
|
|
4659
4659
|
$ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
|
|
4660
4660
|
$ZodType.init(inst, def);
|
|
4661
4661
|
defineLazyInternal(inst, "values", (zod) => {
|
|
4662
|
-
const
|
|
4663
|
-
return
|
|
4662
|
+
const v2 = zod.def.innerType._zod.values;
|
|
4663
|
+
return v2 ? new Set([...v2].filter((x) => x !== void 0)) : void 0;
|
|
4664
4664
|
});
|
|
4665
4665
|
inst._zod.parse = (payload, ctx) => {
|
|
4666
4666
|
const result = def.innerType._zod.run(payload, ctx);
|
|
@@ -7790,7 +7790,7 @@ var init_he = __esm({
|
|
|
7790
7790
|
if (issue3.values.length === 1) {
|
|
7791
7791
|
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue3.values[0])}`;
|
|
7792
7792
|
}
|
|
7793
|
-
const stringified = issue3.values.map((
|
|
7793
|
+
const stringified = issue3.values.map((v2) => stringifyPrimitive(v2));
|
|
7794
7794
|
if (issue3.values.length === 2) {
|
|
7795
7795
|
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;
|
|
7796
7796
|
}
|
|
@@ -13470,8 +13470,8 @@ ${code}
|
|
|
13470
13470
|
return fn;
|
|
13471
13471
|
}
|
|
13472
13472
|
function addConstant(ctx, value) {
|
|
13473
|
-
for (const [name2,
|
|
13474
|
-
if (
|
|
13473
|
+
for (const [name2, v2] of ctx.constants) {
|
|
13474
|
+
if (v2 === value)
|
|
13475
13475
|
return name2;
|
|
13476
13476
|
}
|
|
13477
13477
|
const name = `c${ctx.constantCounter++}`;
|
|
@@ -13606,9 +13606,9 @@ function generateChecks(doc, ctx, schema, accessor) {
|
|
|
13606
13606
|
}
|
|
13607
13607
|
function codePointLengthVar(doc, ctx, accessor, inDoubt) {
|
|
13608
13608
|
const cpLen = addConstant(ctx, codePointLength);
|
|
13609
|
-
const
|
|
13610
|
-
doc.write(`const ${
|
|
13611
|
-
return
|
|
13609
|
+
const v2 = newVar(ctx);
|
|
13610
|
+
doc.write(`const ${v2} = typeof ${accessor} === "string" && ${inDoubt} ? ${cpLen}(${accessor}) : ${accessor}.length;`);
|
|
13611
|
+
return v2;
|
|
13612
13612
|
}
|
|
13613
13613
|
function numericOperand(value, label) {
|
|
13614
13614
|
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
@@ -15757,7 +15757,7 @@ function _set(Class2, valueType, params) {
|
|
|
15757
15757
|
}
|
|
15758
15758
|
// @__NO_SIDE_EFFECTS__
|
|
15759
15759
|
function _enum(Class2, values, params) {
|
|
15760
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
15760
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
15761
15761
|
return new Class2({
|
|
15762
15762
|
type: "enum",
|
|
15763
15763
|
entries,
|
|
@@ -15963,8 +15963,8 @@ function _stringbool(Classes, _params) {
|
|
|
15963
15963
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
15964
15964
|
let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
15965
15965
|
if (params.case !== "sensitive") {
|
|
15966
|
-
truthyArray = truthyArray.map((
|
|
15967
|
-
falsyArray = falsyArray.map((
|
|
15966
|
+
truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
15967
|
+
falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
15968
15968
|
}
|
|
15969
15969
|
const truthySet = new Set(truthyArray);
|
|
15970
15970
|
const falsySet = new Set(falsyArray);
|
|
@@ -16644,11 +16644,11 @@ function stringifyKeyNames(bySchema, json2, visited) {
|
|
|
16644
16644
|
const types = Array.isArray(json2.type) ? json2.type : [json2.type];
|
|
16645
16645
|
const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
|
|
16646
16646
|
const values = json2.enum ?? (json2.const !== void 0 ? [json2.const] : void 0);
|
|
16647
|
-
if (!numericType && !values?.some((
|
|
16647
|
+
if (!numericType && !values?.some((v2) => typeof v2 === "number"))
|
|
16648
16648
|
return json2;
|
|
16649
16649
|
const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json2;
|
|
16650
16650
|
if (rest.enum)
|
|
16651
|
-
rest.enum = rest.enum.map((
|
|
16651
|
+
rest.enum = rest.enum.map((v2) => typeof v2 === "number" ? String(v2) : v2);
|
|
16652
16652
|
else if (typeof rest.const === "number")
|
|
16653
16653
|
rest.const = String(rest.const);
|
|
16654
16654
|
if (!numericType)
|
|
@@ -16927,9 +16927,9 @@ var init_json_schema_processors = __esm({
|
|
|
16927
16927
|
json2.not = {};
|
|
16928
16928
|
return;
|
|
16929
16929
|
}
|
|
16930
|
-
if (values.every((
|
|
16930
|
+
if (values.every((v2) => typeof v2 === "number"))
|
|
16931
16931
|
json2.type = "number";
|
|
16932
|
-
if (values.every((
|
|
16932
|
+
if (values.every((v2) => typeof v2 === "string"))
|
|
16933
16933
|
json2.type = "string";
|
|
16934
16934
|
json2.enum = values;
|
|
16935
16935
|
};
|
|
@@ -16962,13 +16962,13 @@ var init_json_schema_processors = __esm({
|
|
|
16962
16962
|
json2.const = val;
|
|
16963
16963
|
}
|
|
16964
16964
|
} else {
|
|
16965
|
-
if (vals.every((
|
|
16965
|
+
if (vals.every((v2) => typeof v2 === "number"))
|
|
16966
16966
|
json2.type = "number";
|
|
16967
|
-
if (vals.every((
|
|
16967
|
+
if (vals.every((v2) => typeof v2 === "string"))
|
|
16968
16968
|
json2.type = "string";
|
|
16969
|
-
if (vals.every((
|
|
16969
|
+
if (vals.every((v2) => typeof v2 === "boolean"))
|
|
16970
16970
|
json2.type = "boolean";
|
|
16971
|
-
if (vals.every((
|
|
16971
|
+
if (vals.every((v2) => v2 === null))
|
|
16972
16972
|
json2.type = "null";
|
|
16973
16973
|
json2.enum = vals;
|
|
16974
16974
|
}
|
|
@@ -17206,7 +17206,7 @@ var init_json_schema_processors = __esm({
|
|
|
17206
17206
|
const keyValues = keyType._zod.values;
|
|
17207
17207
|
const omittableOnInput = ctx.io === "input" && inputOptin(def.valueType) !== void 0;
|
|
17208
17208
|
if (keyValues && !def.partial && !omittableOnInput) {
|
|
17209
|
-
const validKeyValues = [...keyValues].filter((
|
|
17209
|
+
const validKeyValues = [...keyValues].filter((v2) => typeof v2 === "string" || typeof v2 === "number");
|
|
17210
17210
|
if (validKeyValues.length > 0) {
|
|
17211
17211
|
json2.required = validKeyValues.map(String);
|
|
17212
17212
|
}
|
|
@@ -18364,7 +18364,7 @@ function set(valueType, params) {
|
|
|
18364
18364
|
});
|
|
18365
18365
|
}
|
|
18366
18366
|
function _enum2(values, params) {
|
|
18367
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
18367
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
18368
18368
|
return new ZodEnum({
|
|
18369
18369
|
type: "enum",
|
|
18370
18370
|
entries,
|
|
@@ -19871,10 +19871,10 @@ function convertBaseSchema(schema, ctx) {
|
|
|
19871
19871
|
if (enumValues.length === 1) {
|
|
19872
19872
|
return z.literal(enumValues[0]);
|
|
19873
19873
|
}
|
|
19874
|
-
if (enumValues.every((
|
|
19874
|
+
if (enumValues.every((v2) => typeof v2 === "string")) {
|
|
19875
19875
|
return z.enum(enumValues);
|
|
19876
19876
|
}
|
|
19877
|
-
const literalSchemas = enumValues.map((
|
|
19877
|
+
const literalSchemas = enumValues.map((v2) => z.literal(v2));
|
|
19878
19878
|
if (literalSchemas.length < 2) {
|
|
19879
19879
|
return literalSchemas[0];
|
|
19880
19880
|
}
|
|
@@ -21598,7 +21598,7 @@ var init_pixel_crew = __esm({
|
|
|
21598
21598
|
});
|
|
21599
21599
|
|
|
21600
21600
|
// ../shared/src/routes/manager.ts
|
|
21601
|
-
var avatarColorSchema, MANAGER_AVATAR_BACKGROUNDS, MANAGER_AVATAR_PRIMARIES, managerPresetAvatarSchema, managerEmojiAvatarSchema, managerChosenAvatarSchema, setUpManagerTextingRequestSchema, linearRuleFields, withLabelIds, managerLinearRuleSchema, SUBAGENT_SERVICE_TIERS, managerSubagentSettingsSchema, QUEUE_SECTIONS, MANAGER_QUEUE_GROUPS, MANAGER_SHIPPING_LOOKBACK_MS;
|
|
21601
|
+
var avatarColorSchema, MANAGER_AVATAR_BACKGROUNDS, MANAGER_AVATAR_PRIMARIES, managerPresetAvatarSchema, managerEmojiAvatarSchema, managerChosenAvatarSchema, managerAvatarSchema, setUpManagerTextingRequestSchema, linearRuleFields, withLabelIds, managerLinearRuleSchema, SUBAGENT_SERVICE_TIERS, managerSubagentSettingsSchema, QUEUE_SECTIONS, MANAGER_QUEUE_GROUPS, MANAGER_SHIPPING_LOOKBACK_MS;
|
|
21602
21602
|
var init_manager = __esm({
|
|
21603
21603
|
"../shared/src/routes/manager.ts"() {
|
|
21604
21604
|
"use strict";
|
|
@@ -21649,6 +21649,7 @@ var init_manager = __esm({
|
|
|
21649
21649
|
background: avatarColorSchema
|
|
21650
21650
|
});
|
|
21651
21651
|
managerChosenAvatarSchema = external_exports.discriminatedUnion("kind", [managerPresetAvatarSchema, managerEmojiAvatarSchema]);
|
|
21652
|
+
managerAvatarSchema = external_exports.union([managerChosenAvatarSchema, external_exports.object({ kind: external_exports.literal("image"), url: external_exports.string() })]);
|
|
21652
21653
|
setUpManagerTextingRequestSchema = external_exports.object({ line: external_exports.string().optional() });
|
|
21653
21654
|
linearRuleFields = linearIssueFiltersSchema.extend({ team_id: external_exports.string().min(1) }).strict();
|
|
21654
21655
|
withLabelIds = (value) => {
|
|
@@ -24578,11 +24579,13 @@ replicas gpu delete
|
|
|
24578
24579
|
});
|
|
24579
24580
|
|
|
24580
24581
|
// ../shared/src/routes/issues.ts
|
|
24581
|
-
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,
|
|
24582
|
+
var ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ACTOR_TYPES, ISSUE_SUBSCRIBER_ROLES, ISSUE_RELATION_TYPES, ISSUE_PULL_REQUEST_STATES, normalizeIssueStatus, ISSUE_STATUSES_HEADER, issueStatusSchema, issuePrioritySchema, issueSubscriberRoleSchema, issueRelationTypeSchema, issuePullRequestStateSchema, ISSUE_STATUS_LABELS, ISSUE_PRIORITY_LABELS, unknownValues, knownOrRaw, issueActorSchema, ISSUE_KEY_RE, timestamp, nullableTimestamp, issueSchema, issueSubscriberSchema, issueRelationSchema, issuePullRequestSchema, issueCommentSchema, change, nullableId, issueEventDataSchemas, issueEventBase, v, issueEventVariants, created, laterVariants, issueEventSchema, clientMutationId, title, description, body, createIssueRequestSchema, updateIssueRequestSchema, issueActorRequestSchema, createIssueCommentRequestSchema, updateIssueCommentRequestSchema, createIssueRelationRequestSchema, linkIssuePullRequestRequestSchema, updateIssuePullRequestRequestSchema, issueMutationRequestSchema, updateIssueSettingsRequestSchema, listIssuesQuerySchema, issueDetailResponseSchema, listIssuesResponseSchema, issueDirectoryUserSchema, issueDirectoryWorkspaceSchema, issuesBootstrapResponseSchema, issuesDeltaQuerySchema, issuesDeltaResponseSchema, issueInboxQuerySchema, markIssueInboxReadRequestSchema, ISSUE_COMMANDS;
|
|
24582
24583
|
var init_issues = __esm({
|
|
24583
24584
|
"../shared/src/routes/issues.ts"() {
|
|
24584
24585
|
"use strict";
|
|
24585
24586
|
init_zod();
|
|
24587
|
+
init_manager();
|
|
24588
|
+
init_workspaces();
|
|
24586
24589
|
ISSUE_STATUSES = ["backlog", "todo", "in_progress", "review", "approved", "done", "canceled", "duplicate"];
|
|
24587
24590
|
ISSUE_PRIORITIES = ["none", "urgent", "high", "medium", "low"];
|
|
24588
24591
|
ISSUE_ACTOR_TYPES = ["user", "workspace", "system"];
|
|
@@ -24590,6 +24593,7 @@ var init_issues = __esm({
|
|
|
24590
24593
|
ISSUE_RELATION_TYPES = ["blocks", "duplicate_of"];
|
|
24591
24594
|
ISSUE_PULL_REQUEST_STATES = ["draft", "open", "merged", "closed"];
|
|
24592
24595
|
normalizeIssueStatus = (status) => status === "in_review" ? "review" : status;
|
|
24596
|
+
ISSUE_STATUSES_HEADER = "x-replicas-issue-statuses";
|
|
24593
24597
|
issueStatusSchema = external_exports.preprocess((value) => typeof value === "string" ? normalizeIssueStatus(value) : value, external_exports.enum(ISSUE_STATUSES));
|
|
24594
24598
|
issuePrioritySchema = external_exports.enum(ISSUE_PRIORITIES);
|
|
24595
24599
|
issueSubscriberRoleSchema = external_exports.enum(ISSUE_SUBSCRIBER_ROLES);
|
|
@@ -24597,6 +24601,12 @@ var init_issues = __esm({
|
|
|
24597
24601
|
issuePullRequestStateSchema = external_exports.enum(ISSUE_PULL_REQUEST_STATES);
|
|
24598
24602
|
ISSUE_STATUS_LABELS = { backlog: "Backlog", todo: "Todo", in_progress: "In Progress", review: "Review", approved: "Approved", done: "Done", canceled: "Canceled", duplicate: "Duplicate" };
|
|
24599
24603
|
ISSUE_PRIORITY_LABELS = { none: "No priority", urgent: "Urgent", high: "High", medium: "Medium", low: "Low" };
|
|
24604
|
+
unknownValues = null;
|
|
24605
|
+
knownOrRaw = (known) => external_exports.union([known, external_exports.custom((value) => {
|
|
24606
|
+
if (typeof value !== "string") return false;
|
|
24607
|
+
unknownValues?.push(value);
|
|
24608
|
+
return true;
|
|
24609
|
+
})]);
|
|
24600
24610
|
issueActorSchema = external_exports.object({
|
|
24601
24611
|
type: external_exports.enum(ISSUE_ACTOR_TYPES),
|
|
24602
24612
|
id: external_exports.string().toLowerCase().uuid()
|
|
@@ -24611,8 +24621,8 @@ var init_issues = __esm({
|
|
|
24611
24621
|
identifier: external_exports.string(),
|
|
24612
24622
|
title: external_exports.string(),
|
|
24613
24623
|
description: external_exports.string(),
|
|
24614
|
-
status: issueStatusSchema,
|
|
24615
|
-
priority: issuePrioritySchema,
|
|
24624
|
+
status: knownOrRaw(issueStatusSchema),
|
|
24625
|
+
priority: knownOrRaw(issuePrioritySchema),
|
|
24616
24626
|
parent_id: external_exports.string().uuid().nullable(),
|
|
24617
24627
|
manager_id: external_exports.string().uuid().nullable(),
|
|
24618
24628
|
creator: issueActorSchema,
|
|
@@ -24643,7 +24653,7 @@ var init_issues = __esm({
|
|
|
24643
24653
|
url: external_exports.string(),
|
|
24644
24654
|
pull_request_id: external_exports.string().uuid().nullable(),
|
|
24645
24655
|
title: external_exports.string().nullable(),
|
|
24646
|
-
state: issuePullRequestStateSchema,
|
|
24656
|
+
state: knownOrRaw(issuePullRequestStateSchema),
|
|
24647
24657
|
approved: external_exports.boolean(),
|
|
24648
24658
|
created_at: timestamp,
|
|
24649
24659
|
updated_at: timestamp
|
|
@@ -24658,36 +24668,12 @@ var init_issues = __esm({
|
|
|
24658
24668
|
});
|
|
24659
24669
|
change = (value) => external_exports.object({ from: value, to: value });
|
|
24660
24670
|
nullableId = external_exports.string().uuid().nullable();
|
|
24661
|
-
ISSUE_EVENT_TYPES = [
|
|
24662
|
-
"created",
|
|
24663
|
-
"title_changed",
|
|
24664
|
-
"description_changed",
|
|
24665
|
-
"status_changed",
|
|
24666
|
-
"priority_changed",
|
|
24667
|
-
"parent_changed",
|
|
24668
|
-
"manager_changed",
|
|
24669
|
-
"sort_order_changed",
|
|
24670
|
-
"assignee_added",
|
|
24671
|
-
"assignee_removed",
|
|
24672
|
-
"subscriber_added",
|
|
24673
|
-
"subscriber_removed",
|
|
24674
|
-
"relation_added",
|
|
24675
|
-
"relation_removed",
|
|
24676
|
-
"pr_linked",
|
|
24677
|
-
"pr_unlinked",
|
|
24678
|
-
"pr_state_changed",
|
|
24679
|
-
"comment_added",
|
|
24680
|
-
"comment_edited",
|
|
24681
|
-
"comment_deleted",
|
|
24682
|
-
"archived",
|
|
24683
|
-
"restored"
|
|
24684
|
-
];
|
|
24685
24671
|
issueEventDataSchemas = {
|
|
24686
24672
|
created: external_exports.object({ issue: issueSchema }),
|
|
24687
24673
|
title_changed: change(external_exports.string()),
|
|
24688
24674
|
description_changed: change(external_exports.string()),
|
|
24689
|
-
status_changed: change(issueStatusSchema).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp, reason: external_exports.string().optional() }),
|
|
24690
|
-
priority_changed: change(issuePrioritySchema),
|
|
24675
|
+
status_changed: change(knownOrRaw(issueStatusSchema)).extend({ completed_at: nullableTimestamp, canceled_at: nullableTimestamp, reason: external_exports.string().optional() }),
|
|
24676
|
+
priority_changed: change(knownOrRaw(issuePrioritySchema)),
|
|
24691
24677
|
parent_changed: change(nullableId),
|
|
24692
24678
|
manager_changed: change(nullableId),
|
|
24693
24679
|
sort_order_changed: change(external_exports.number()),
|
|
@@ -24700,7 +24686,7 @@ var init_issues = __esm({
|
|
|
24700
24686
|
relation_removed: external_exports.object({ relation: issueRelationSchema }),
|
|
24701
24687
|
pr_linked: external_exports.object({ pull_request: issuePullRequestSchema }),
|
|
24702
24688
|
pr_unlinked: external_exports.object({ pull_request: issuePullRequestSchema }),
|
|
24703
|
-
pr_state_changed: external_exports.object({ pull_request: issuePullRequestSchema, from: issuePullRequestStateSchema }),
|
|
24689
|
+
pr_state_changed: external_exports.object({ pull_request: issuePullRequestSchema, from: knownOrRaw(issuePullRequestStateSchema) }),
|
|
24704
24690
|
comment_added: external_exports.object({ comment: issueCommentSchema }),
|
|
24705
24691
|
comment_edited: external_exports.object({ comment: issueCommentSchema, from: external_exports.string() }),
|
|
24706
24692
|
comment_deleted: external_exports.object({ comment: issueCommentSchema }),
|
|
@@ -24720,8 +24706,10 @@ var init_issues = __esm({
|
|
|
24720
24706
|
client_mutation_id: external_exports.string().nullable(),
|
|
24721
24707
|
created_at: timestamp
|
|
24722
24708
|
});
|
|
24723
|
-
|
|
24724
|
-
|
|
24709
|
+
v = (type) => issueEventBase.extend({ type: external_exports.literal(type), data: issueEventDataSchemas[type] });
|
|
24710
|
+
issueEventVariants = { created: v("created"), title_changed: v("title_changed"), description_changed: v("description_changed"), status_changed: v("status_changed"), priority_changed: v("priority_changed"), parent_changed: v("parent_changed"), manager_changed: v("manager_changed"), sort_order_changed: v("sort_order_changed"), assignee_added: v("assignee_added"), assignee_removed: v("assignee_removed"), subscriber_added: v("subscriber_added"), subscriber_removed: v("subscriber_removed"), relation_added: v("relation_added"), relation_removed: v("relation_removed"), pr_linked: v("pr_linked"), pr_unlinked: v("pr_unlinked"), pr_state_changed: v("pr_state_changed"), comment_added: v("comment_added"), comment_edited: v("comment_edited"), comment_deleted: v("comment_deleted"), archived: v("archived"), restored: v("restored") };
|
|
24711
|
+
({ created, ...laterVariants } = issueEventVariants);
|
|
24712
|
+
issueEventSchema = external_exports.discriminatedUnion("type", [created, ...Object.values(laterVariants)]);
|
|
24725
24713
|
clientMutationId = external_exports.string().min(1).max(128).optional();
|
|
24726
24714
|
title = external_exports.string().trim().min(1).max(500);
|
|
24727
24715
|
description = external_exports.string().max(1e5);
|
|
@@ -24801,10 +24789,42 @@ var init_issues = __esm({
|
|
|
24801
24789
|
sub_issues: external_exports.array(issueSchema)
|
|
24802
24790
|
});
|
|
24803
24791
|
listIssuesResponseSchema = external_exports.object({ issues: external_exports.array(issueSchema), next_cursor: external_exports.number().nullable() });
|
|
24792
|
+
issueDirectoryUserSchema = external_exports.object({
|
|
24793
|
+
id: external_exports.string(),
|
|
24794
|
+
display_name: external_exports.string(),
|
|
24795
|
+
email: external_exports.string(),
|
|
24796
|
+
avatar_url: external_exports.string().nullable()
|
|
24797
|
+
});
|
|
24798
|
+
issueDirectoryWorkspaceSchema = external_exports.object({
|
|
24799
|
+
id: external_exports.string(),
|
|
24800
|
+
name: external_exports.string(),
|
|
24801
|
+
kind: external_exports.enum(WORKSPACE_KINDS),
|
|
24802
|
+
status: external_exports.enum(WORKSPACE_STATUSES),
|
|
24803
|
+
avatar: managerAvatarSchema.nullable(),
|
|
24804
|
+
manager_id: external_exports.string().nullable()
|
|
24805
|
+
});
|
|
24806
|
+
issuesBootstrapResponseSchema = external_exports.object({
|
|
24807
|
+
sync_id: external_exports.number().int(),
|
|
24808
|
+
issue_key: external_exports.string(),
|
|
24809
|
+
users: external_exports.array(issueDirectoryUserSchema),
|
|
24810
|
+
workspaces: external_exports.array(issueDirectoryWorkspaceSchema),
|
|
24811
|
+
issues: external_exports.array(issueSchema),
|
|
24812
|
+
subscribers: external_exports.array(issueSubscriberSchema),
|
|
24813
|
+
relations: external_exports.array(issueRelationSchema),
|
|
24814
|
+
pull_requests: external_exports.array(issuePullRequestSchema)
|
|
24815
|
+
});
|
|
24804
24816
|
issuesDeltaQuerySchema = external_exports.object({
|
|
24805
24817
|
after: external_exports.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
24806
24818
|
limit: external_exports.coerce.number().int().min(1).max(1e3).optional()
|
|
24807
24819
|
});
|
|
24820
|
+
issuesDeltaResponseSchema = external_exports.object({
|
|
24821
|
+
sync_id: external_exports.number().int(),
|
|
24822
|
+
issue_key: external_exports.string(),
|
|
24823
|
+
users: external_exports.array(issueDirectoryUserSchema),
|
|
24824
|
+
workspaces: external_exports.array(issueDirectoryWorkspaceSchema),
|
|
24825
|
+
events: external_exports.array(issueEventSchema),
|
|
24826
|
+
has_more: external_exports.boolean()
|
|
24827
|
+
});
|
|
24808
24828
|
issueInboxQuerySchema = external_exports.object({
|
|
24809
24829
|
limit: external_exports.coerce.number().int().min(1).max(100).optional(),
|
|
24810
24830
|
before: external_exports.coerce.number().int().min(1).optional()
|
|
@@ -26080,7 +26100,7 @@ When the user asks you to start a task in a new workspace or thread, create it n
|
|
|
26080
26100
|
replicas create fix-login-redirect -e <env-name-or-id> -a claude -m "Fix the login redirect loop on /settings. Open a PR when done."
|
|
26081
26101
|
\`\`\`
|
|
26082
26102
|
|
|
26083
|
-
-
|
|
26103
|
+
- Pick the environment with \`replicas environment list\`; use this workspace's environment when the task is in the same repos. Use \`-a\` with this conversation's agent unless the user asked for another.
|
|
26084
26104
|
- Write \`-m\` as the full task: the new agent can't see this conversation.
|
|
26085
26105
|
- On success it prints the workspace ID and a **Link**. Run \`replicas get <id>\` to confirm the workspace exists and is starting, then give the user the link.
|
|
26086
26106
|
- If the command fails (it exits non-zero and prints the reason), tell the user the exact error. Never say a workspace was created unless \`replicas get\` found it.
|
|
@@ -29181,7 +29201,7 @@ var require_toJS = __commonJS({
|
|
|
29181
29201
|
var identity = require_identity();
|
|
29182
29202
|
function toJS(value, arg, ctx) {
|
|
29183
29203
|
if (Array.isArray(value))
|
|
29184
|
-
return value.map((
|
|
29204
|
+
return value.map((v2, i) => toJS(v2, String(i), ctx));
|
|
29185
29205
|
if (value && typeof value.toJSON === "function") {
|
|
29186
29206
|
if (!ctx || !identity.hasAnchor(value))
|
|
29187
29207
|
return value.toJSON(arg, ctx);
|
|
@@ -29474,18 +29494,18 @@ var require_Collection = __commonJS({
|
|
|
29474
29494
|
var identity = require_identity();
|
|
29475
29495
|
var Node = require_Node();
|
|
29476
29496
|
function collectionFromPath(schema, path12, value) {
|
|
29477
|
-
let
|
|
29497
|
+
let v2 = value;
|
|
29478
29498
|
for (let i = path12.length - 1; i >= 0; --i) {
|
|
29479
29499
|
const k = path12[i];
|
|
29480
29500
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
29481
29501
|
const a = [];
|
|
29482
|
-
a[k] =
|
|
29483
|
-
|
|
29502
|
+
a[k] = v2;
|
|
29503
|
+
v2 = a;
|
|
29484
29504
|
} else {
|
|
29485
|
-
|
|
29505
|
+
v2 = /* @__PURE__ */ new Map([[k, v2]]);
|
|
29486
29506
|
}
|
|
29487
29507
|
}
|
|
29488
|
-
return createNode.createNode(
|
|
29508
|
+
return createNode.createNode(v2, void 0, {
|
|
29489
29509
|
aliasDuplicateObjects: false,
|
|
29490
29510
|
keepUndefined: false,
|
|
29491
29511
|
onAnchor: () => {
|
|
@@ -30458,8 +30478,8 @@ var require_Pair = __commonJS({
|
|
|
30458
30478
|
var identity = require_identity();
|
|
30459
30479
|
function createPair(key, value, ctx) {
|
|
30460
30480
|
const k = createNode.createNode(key, void 0, ctx);
|
|
30461
|
-
const
|
|
30462
|
-
return new Pair(k,
|
|
30481
|
+
const v2 = createNode.createNode(value, void 0, ctx);
|
|
30482
|
+
return new Pair(k, v2);
|
|
30463
30483
|
}
|
|
30464
30484
|
var Pair = class _Pair {
|
|
30465
30485
|
constructor(key, value = null) {
|
|
@@ -32131,7 +32151,7 @@ var require_Document = __commonJS({
|
|
|
32131
32151
|
value = replacer.call({ "": value }, "", value);
|
|
32132
32152
|
_replacer = replacer;
|
|
32133
32153
|
} else if (Array.isArray(replacer)) {
|
|
32134
|
-
const keyToStr = (
|
|
32154
|
+
const keyToStr = (v2) => typeof v2 === "number" || v2 instanceof String || v2 instanceof Number;
|
|
32135
32155
|
const asStr = replacer.filter(keyToStr).map(String);
|
|
32136
32156
|
if (asStr.length > 0)
|
|
32137
32157
|
replacer = replacer.concat(asStr);
|
|
@@ -32167,8 +32187,8 @@ var require_Document = __commonJS({
|
|
|
32167
32187
|
*/
|
|
32168
32188
|
createPair(key, value, options = {}) {
|
|
32169
32189
|
const k = this.createNode(key, null, options);
|
|
32170
|
-
const
|
|
32171
|
-
return new Pair.Pair(k,
|
|
32190
|
+
const v2 = this.createNode(value, null, options);
|
|
32191
|
+
return new Pair.Pair(k, v2);
|
|
32172
32192
|
}
|
|
32173
32193
|
/**
|
|
32174
32194
|
* Removes a value from the document.
|
|
@@ -40182,7 +40202,7 @@ var CLI_VERSION;
|
|
|
40182
40202
|
var init_cli_version = __esm({
|
|
40183
40203
|
"../shared/src/cli-version.ts"() {
|
|
40184
40204
|
"use strict";
|
|
40185
|
-
CLI_VERSION = "0.3.
|
|
40205
|
+
CLI_VERSION = "0.3.517";
|
|
40186
40206
|
}
|
|
40187
40207
|
});
|
|
40188
40208
|
|
|
@@ -43111,7 +43131,7 @@ var require_luxon = __commonJS({
|
|
|
43111
43131
|
} else if (typeof settings !== "object") {
|
|
43112
43132
|
throw new InvalidArgumentError2("Week settings must be an object");
|
|
43113
43133
|
} else {
|
|
43114
|
-
if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((
|
|
43134
|
+
if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((v2) => !integerBetween(v2, 1, 7))) {
|
|
43115
43135
|
throw new InvalidArgumentError2("Invalid week settings");
|
|
43116
43136
|
}
|
|
43117
43137
|
return {
|
|
@@ -43248,9 +43268,9 @@ var require_luxon = __commonJS({
|
|
|
43248
43268
|
const normalized = {};
|
|
43249
43269
|
for (const u in obj) {
|
|
43250
43270
|
if (hasOwnProperty(obj, u)) {
|
|
43251
|
-
const
|
|
43252
|
-
if (
|
|
43253
|
-
normalized[normalizer(u)] = asNumber(
|
|
43271
|
+
const v2 = obj[u];
|
|
43272
|
+
if (v2 === void 0 || v2 === null) continue;
|
|
43273
|
+
normalized[normalizer(u)] = asNumber(v2);
|
|
43254
43274
|
}
|
|
43255
43275
|
}
|
|
43256
43276
|
return normalized;
|
|
@@ -46624,8 +46644,8 @@ var require_luxon = __commonJS({
|
|
|
46624
46644
|
}
|
|
46625
46645
|
let foundFirst = false;
|
|
46626
46646
|
for (const u of units) {
|
|
46627
|
-
const
|
|
46628
|
-
if (!isUndefined(
|
|
46647
|
+
const v2 = normalized[u];
|
|
46648
|
+
if (!isUndefined(v2)) {
|
|
46629
46649
|
foundFirst = true;
|
|
46630
46650
|
} else if (foundFirst) {
|
|
46631
46651
|
normalized[u] = defaultValues[u];
|
|
@@ -49893,12 +49913,12 @@ var require_CronExpressionParser = __commonJS({
|
|
|
49893
49913
|
if (__privateMethod(_a3 = _CronExpressionParser, _CronExpressionParser_static, isValidConstraintChar_fn).call(_a3, constraints2, result)) {
|
|
49894
49914
|
stack.push(result);
|
|
49895
49915
|
} else {
|
|
49896
|
-
const
|
|
49897
|
-
const isValid =
|
|
49916
|
+
const v2 = parseInt(result.toString(), 10);
|
|
49917
|
+
const isValid = v2 >= constraints2.min && v2 <= constraints2.max;
|
|
49898
49918
|
if (!isValid) {
|
|
49899
49919
|
throw new Error(`Constraint error, got value ${result} expected range ${constraints2.min}-${constraints2.max}`);
|
|
49900
49920
|
}
|
|
49901
|
-
stack.push(field2 === CronUnit.DayOfWeek ?
|
|
49921
|
+
stack.push(field2 === CronUnit.DayOfWeek ? v2 % 7 : result);
|
|
49902
49922
|
}
|
|
49903
49923
|
}
|
|
49904
49924
|
}
|
|
@@ -50003,10 +50023,10 @@ var require_CronFileParser = __commonJS({
|
|
|
50003
50023
|
if (k2 === void 0) k2 = k;
|
|
50004
50024
|
o[k2] = m[k];
|
|
50005
50025
|
}));
|
|
50006
|
-
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o,
|
|
50007
|
-
Object.defineProperty(o, "default", { enumerable: true, value:
|
|
50008
|
-
}) : function(o,
|
|
50009
|
-
o["default"] =
|
|
50026
|
+
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v2) {
|
|
50027
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
50028
|
+
}) : function(o, v2) {
|
|
50029
|
+
o["default"] = v2;
|
|
50010
50030
|
});
|
|
50011
50031
|
var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
|
|
50012
50032
|
var ownKeys = function(o) {
|
|
@@ -53872,7 +53892,7 @@ async function environmentCreateCommand(name, options) {
|
|
|
53872
53892
|
type: "text",
|
|
53873
53893
|
name: "name",
|
|
53874
53894
|
message: "Environment name:",
|
|
53875
|
-
validate: (
|
|
53895
|
+
validate: (v2) => v2.trim() ? true : "Name is required"
|
|
53876
53896
|
});
|
|
53877
53897
|
if (!r.name) {
|
|
53878
53898
|
console.log(import_chalk21.default.yellow("\nCancelled."));
|
|
@@ -53945,11 +53965,11 @@ async function environmentDeleteCommand(idOrName, options) {
|
|
|
53945
53965
|
Deleted environment ${idOrName}.
|
|
53946
53966
|
`);
|
|
53947
53967
|
}
|
|
53948
|
-
function printVariable(
|
|
53949
|
-
console.log(import_chalk21.default.white(` ${
|
|
53950
|
-
console.log(import_chalk21.default.gray(` ID: ${
|
|
53951
|
-
console.log(import_chalk21.default.gray(` Value: ${
|
|
53952
|
-
console.log(import_chalk21.default.gray(` Updated: ${formatDate(
|
|
53968
|
+
function printVariable(v2) {
|
|
53969
|
+
console.log(import_chalk21.default.white(` ${v2.key}`));
|
|
53970
|
+
console.log(import_chalk21.default.gray(` ID: ${v2.id}`));
|
|
53971
|
+
console.log(import_chalk21.default.gray(` Value: ${v2.value}`));
|
|
53972
|
+
console.log(import_chalk21.default.gray(` Updated: ${formatDate(v2.updated_at)}`));
|
|
53953
53973
|
console.log();
|
|
53954
53974
|
}
|
|
53955
53975
|
async function envVarsListCommand(envIdOrName, options) {
|
|
@@ -53958,7 +53978,7 @@ async function envVarsListCommand(envIdOrName, options) {
|
|
|
53958
53978
|
const response = await orgAuthenticatedFetch(
|
|
53959
53979
|
`/v1/environments/${id}/variables`
|
|
53960
53980
|
);
|
|
53961
|
-
const variables = options.reveal ? response.environment_variables : response.environment_variables.map((
|
|
53981
|
+
const variables = options.reveal ? response.environment_variables : response.environment_variables.map((v2) => ({ ...v2, value: maskValue(v2.value) }));
|
|
53962
53982
|
output2({ environment_variables: variables }, ({ environment_variables }) => {
|
|
53963
53983
|
if (environment_variables.length === 0) {
|
|
53964
53984
|
console.log(import_chalk21.default.yellow("\nNo variables.\n"));
|
|
@@ -53970,7 +53990,7 @@ Variables (${environment_variables.length}):
|
|
|
53970
53990
|
if (!options.reveal) {
|
|
53971
53991
|
console.log(import_chalk21.default.gray(" Values are masked. Pass --reveal to show full values.\n"));
|
|
53972
53992
|
}
|
|
53973
|
-
for (const
|
|
53993
|
+
for (const v2 of environment_variables) printVariable(v2);
|
|
53974
53994
|
});
|
|
53975
53995
|
}
|
|
53976
53996
|
async function envVarsSetCommand(envIdOrName, key, value) {
|
|
@@ -53979,7 +53999,7 @@ async function envVarsSetCommand(envIdOrName, key, value) {
|
|
|
53979
53999
|
const existing = await orgAuthenticatedFetch(
|
|
53980
54000
|
`/v1/environments/${id}/variables`
|
|
53981
54001
|
);
|
|
53982
|
-
const match = existing.environment_variables.find((
|
|
54002
|
+
const match = existing.environment_variables.find((v2) => v2.key === key);
|
|
53983
54003
|
if (match) {
|
|
53984
54004
|
const body3 = { value };
|
|
53985
54005
|
const response2 = await orgAuthenticatedFetch(
|
|
@@ -54012,7 +54032,7 @@ async function envVarsDeleteCommand(envIdOrName, keyOrId, options) {
|
|
|
54012
54032
|
const existing = await orgAuthenticatedFetch(
|
|
54013
54033
|
`/v1/environments/${id}/variables`
|
|
54014
54034
|
);
|
|
54015
|
-
const match = existing.environment_variables.find((
|
|
54035
|
+
const match = existing.environment_variables.find((v2) => v2.key === keyOrId);
|
|
54016
54036
|
if (!match) throw new Error(`Variable not found: ${keyOrId}`);
|
|
54017
54037
|
variableId = match.id;
|
|
54018
54038
|
}
|
|
@@ -54048,12 +54068,12 @@ async function envVarsRequestCommand(requiredKeys, options) {
|
|
|
54048
54068
|
});
|
|
54049
54069
|
return;
|
|
54050
54070
|
}
|
|
54051
|
-
const
|
|
54071
|
+
const created2 = await orgAuthenticatedFetch("/v1/variable-requests", {
|
|
54052
54072
|
method: "POST",
|
|
54053
54073
|
body: { reason: options.reason, variables: wanted.map((key) => ({ key, required: !optional2.has(key), ...options.replace ? { replace: true } : {} })), wait: options.wait !== false }
|
|
54054
54074
|
});
|
|
54055
|
-
let { request } =
|
|
54056
|
-
if (request.status === "pending" &&
|
|
54075
|
+
let { request } = created2;
|
|
54076
|
+
if (request.status === "pending" && created2.wait) {
|
|
54057
54077
|
const id = request.id;
|
|
54058
54078
|
request = await waitForUser({
|
|
54059
54079
|
timeoutMs,
|
|
@@ -54076,7 +54096,7 @@ async function envVarsRequestCommand(requiredKeys, options) {
|
|
|
54076
54096
|
}
|
|
54077
54097
|
if (request.status !== "pending") await orgAuthenticatedFetch(`/v1/variable-requests/${request.id}/ack`, { method: "POST" });
|
|
54078
54098
|
const missing = wanted.filter((key) => !exported.includes(key));
|
|
54079
|
-
output2({ status: request.status, request_id: request.id, destination: request.destination, url:
|
|
54099
|
+
output2({ status: request.status, request_id: request.id, destination: request.destination, url: created2.url, exported: [...available, ...exported], missing }, () => {
|
|
54080
54100
|
console.log("");
|
|
54081
54101
|
if (exported.length > 0 || available.length > 0) {
|
|
54082
54102
|
const where = request.destination === "workspace" ? "this workspace only" : "saved to the environment";
|
|
@@ -54085,11 +54105,11 @@ async function envVarsRequestCommand(requiredKeys, options) {
|
|
|
54085
54105
|
if (request.status === "pending") {
|
|
54086
54106
|
console.log(` ${import_chalk21.default.yellow("Still waiting for:")} ${missing.join(", ")}`);
|
|
54087
54107
|
console.log(import_chalk21.default.gray(options.wait === false ? `
|
|
54088
|
-
Asked above the chat composer (${
|
|
54089
|
-
` :
|
|
54090
|
-
The form stays open above the chat composer (${
|
|
54108
|
+
Asked above the chat composer (${created2.url}). Keep working, and run this command again when you need the values.
|
|
54109
|
+
` : created2.wait ? `
|
|
54110
|
+
The form stays open above the chat composer (${created2.url}). End your turn and say what the values are for. When the user saves, you get a message; run this command again then.
|
|
54091
54111
|
` : `
|
|
54092
|
-
The user may not be watching Replicas. Send them this link where you are talking with them (the Slack thread, Linear issue, or pull request) and ask them to add the values there, never in chat: ${
|
|
54112
|
+
The user may not be watching Replicas. Send them this link where you are talking with them (the Slack thread, Linear issue, or pull request) and ask them to add the values there, never in chat: ${created2.url}
|
|
54093
54113
|
When they save, you get a message; run this command again then.
|
|
54094
54114
|
`));
|
|
54095
54115
|
return;
|
|
@@ -56676,7 +56696,7 @@ var init_media_gif = __esm({
|
|
|
56676
56696
|
async function callIssueTool(name, args, schema) {
|
|
56677
56697
|
if (!isAgentMode() && !getApiKey()) throw new Error("replicas issue needs an API key: run `replicas login --api-key`, or use it inside a workspace.");
|
|
56678
56698
|
try {
|
|
56679
|
-
return schema.parse(await orgAuthenticatedFetch(`/v1/issue-commands/${name}`, { method: "POST", body: args }));
|
|
56699
|
+
return schema.parse(await orgAuthenticatedFetch(`/v1/issue-commands/${name}`, { method: "POST", body: args, headers: { [ISSUE_STATUSES_HEADER]: "1" } }));
|
|
56680
56700
|
} catch (error62) {
|
|
56681
56701
|
if (error62 instanceof ApiError && error62.status === 404 && error62.message === "Not found") throw new Error("Issues are not enabled for this organization");
|
|
56682
56702
|
throw error62;
|
|
@@ -58035,12 +58055,12 @@ async function localControlRequestCommand(options) {
|
|
|
58035
58055
|
};
|
|
58036
58056
|
const computers = await connectedComputers();
|
|
58037
58057
|
if (computers.length > 0) return connected(computers);
|
|
58038
|
-
const
|
|
58058
|
+
const created2 = await orgAuthenticatedFetch("/v1/local-control-request", {
|
|
58039
58059
|
method: "POST",
|
|
58040
58060
|
body: { reason: options.reason, wait: options.wait !== false }
|
|
58041
58061
|
});
|
|
58042
58062
|
let pending = true;
|
|
58043
|
-
if (
|
|
58063
|
+
if (created2.wait) {
|
|
58044
58064
|
const answer = await waitForUser({
|
|
58045
58065
|
timeoutMs,
|
|
58046
58066
|
asked: "Asked the user above the chat composer to let you run commands on their computer.",
|
|
@@ -58055,17 +58075,17 @@ async function localControlRequestCommand(options) {
|
|
|
58055
58075
|
if (answer.computers.length > 0) return connected(answer.computers);
|
|
58056
58076
|
({ pending } = answer);
|
|
58057
58077
|
}
|
|
58058
|
-
output2({ status: pending ? "pending" : "declined", computers: [], url:
|
|
58078
|
+
output2({ status: pending ? "pending" : "declined", computers: [], url: created2.url }, () => {
|
|
58059
58079
|
if (!pending) {
|
|
58060
58080
|
console.log(import_chalk36.default.yellow("\n The user declined. Continue without their computer, or ask how they want to proceed.\n"));
|
|
58061
58081
|
return;
|
|
58062
58082
|
}
|
|
58063
58083
|
console.log(import_chalk36.default.gray(options.wait === false ? `
|
|
58064
|
-
Asked above the chat composer (${
|
|
58065
|
-
` :
|
|
58066
|
-
The request stays open above the chat composer (${
|
|
58084
|
+
Asked above the chat composer (${created2.url}). Keep working, and run this command again when you need the computer.
|
|
58085
|
+
` : created2.wait ? `
|
|
58086
|
+
The request stays open above the chat composer (${created2.url}). End your turn and say what you need the computer for. When the user answers, you get a message; run this command again then.
|
|
58067
58087
|
` : `
|
|
58068
|
-
The user may not be watching Replicas. Send them this link where you are talking with them (the Slack thread, Linear issue, or pull request) and ask them to allow local control there: ${
|
|
58088
|
+
The user may not be watching Replicas. Send them this link where you are talking with them (the Slack thread, Linear issue, or pull request) and ask them to allow local control there: ${created2.url}
|
|
58069
58089
|
When they answer, you get a message; run this command again then.
|
|
58070
58090
|
`));
|
|
58071
58091
|
});
|