replicas-cli 0.3.460 → 0.3.462
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 +32 -10
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21737,7 +21737,7 @@ var init_mothership = __esm({
|
|
|
21737
21737
|
mothershipLinearRuleSchema = external_exports.preprocess(withLabelIds, linearRuleFields);
|
|
21738
21738
|
SUBAGENT_SERVICE_TIERS = ["default", "fast", "ultrafast"];
|
|
21739
21739
|
mothershipSubagentSettingsSchema = external_exports.object({
|
|
21740
|
-
coding_agent: external_exports.enum(
|
|
21740
|
+
coding_agent: external_exports.enum(VALID_AGENT_PROVIDERS),
|
|
21741
21741
|
model: external_exports.string().nullable(),
|
|
21742
21742
|
thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable(),
|
|
21743
21743
|
service_tier: external_exports.enum(SUBAGENT_SERVICE_TIERS),
|
|
@@ -35341,13 +35341,19 @@ function parseAnnotationsNote(body) {
|
|
|
35341
35341
|
const lines = entry.trim().split("\n");
|
|
35342
35342
|
const file2 = lines[0]?.match(ANNOTATION_FILE_REGEX);
|
|
35343
35343
|
if (file2) lines.shift();
|
|
35344
|
+
const source = lines[0]?.match(ANNOTATION_SOURCE_REGEX);
|
|
35345
|
+
if (source) lines.shift();
|
|
35346
|
+
const occurrence = lines[0]?.match(ANNOTATION_OCCURRENCE_REGEX);
|
|
35347
|
+
if (occurrence) lines.shift();
|
|
35344
35348
|
const quoteLength = lines.findIndex((line) => !line.startsWith(">"));
|
|
35345
35349
|
const quote = lines.slice(0, quoteLength === -1 ? void 0 : quoteLength).map((line) => line.replace(/^>\s?/, ""));
|
|
35346
35350
|
const comment = quoteLength === -1 ? "" : lines.slice(quoteLength).join("\n").trim();
|
|
35347
35351
|
return {
|
|
35348
35352
|
text: quote.join("\n"),
|
|
35349
35353
|
...comment ? { comment } : {},
|
|
35350
|
-
...file2 ? { lines: { path: file2[1], start: Number(file2[2]), end: Number(file2[3] ?? file2[2]) } } : {}
|
|
35354
|
+
...file2 ? { lines: { path: file2[1], start: Number(file2[2]), end: Number(file2[3] ?? file2[2]) } } : {},
|
|
35355
|
+
...occurrence ? { occurrence: Number(occurrence[1]) - 1 } : {},
|
|
35356
|
+
...source ? { messageId: source[1], ...source[2] ? { endMessageId: source[2] } : {} } : {}
|
|
35351
35357
|
};
|
|
35352
35358
|
});
|
|
35353
35359
|
}
|
|
@@ -35388,7 +35394,7 @@ function stripAttachmentNote(text4) {
|
|
|
35388
35394
|
annotations: annotationsNote ? parseAnnotationsNote(annotationsNote.body) : []
|
|
35389
35395
|
};
|
|
35390
35396
|
}
|
|
35391
|
-
var ATTACHMENT_PLACEHOLDER_REGEX, withoutAttachmentPlaceholder, annotationLinesSchema, ANNOTATIONS_NOTE_OPENING, ANNOTATIONS_NOTE_REGEX, ANNOTATION_HEADER_REGEX, ANNOTATION_FILE_REGEX, APPSHOT_NOTE_REGEX, TRUNCATED_APPSHOT_NOTE_REGEX, XML_UNESCAPES, unescapeXml, WALKTHROUGH_NOTE_REGEX, TRUNCATED_WALKTHROUGH_NOTE_REGEX, VIDEO_SIZES_REGEX, parseVideoSizes;
|
|
35397
|
+
var ATTACHMENT_PLACEHOLDER_REGEX, withoutAttachmentPlaceholder, annotationLinesSchema, messageAnnotationSchema, ANNOTATIONS_NOTE_OPENING, ANNOTATIONS_NOTE_REGEX, ANNOTATION_HEADER_REGEX, ANNOTATION_FILE_REGEX, ANNOTATION_OCCURRENCE_REGEX, ANNOTATION_SOURCE_REGEX, APPSHOT_NOTE_REGEX, TRUNCATED_APPSHOT_NOTE_REGEX, XML_UNESCAPES, unescapeXml, WALKTHROUGH_NOTE_REGEX, TRUNCATED_WALKTHROUGH_NOTE_REGEX, VIDEO_SIZES_REGEX, parseVideoSizes;
|
|
35392
35398
|
var init_user_message_attachments = __esm({
|
|
35393
35399
|
"../shared/src/user-message-attachments.ts"() {
|
|
35394
35400
|
"use strict";
|
|
@@ -35398,10 +35404,22 @@ var init_user_message_attachments = __esm({
|
|
|
35398
35404
|
ATTACHMENT_PLACEHOLDER_REGEX = /^\[\d+ (?:(?:images?|files?)(?: and \d+ files?)? attached|(?:image )?attachments?)\]$/;
|
|
35399
35405
|
withoutAttachmentPlaceholder = (content, attached) => attached && ATTACHMENT_PLACEHOLDER_REGEX.test(content) ? "" : content;
|
|
35400
35406
|
annotationLinesSchema = external_exports.object({ path: external_exports.string(), start: external_exports.number(), end: external_exports.number() });
|
|
35407
|
+
messageAnnotationSchema = external_exports.object({
|
|
35408
|
+
text: external_exports.string(),
|
|
35409
|
+
comment: external_exports.string().optional(),
|
|
35410
|
+
lines: annotationLinesSchema.optional(),
|
|
35411
|
+
/** Which match of `text` in its message was quoted, from 0, when the same words appear more than once. */
|
|
35412
|
+
occurrence: external_exports.number().int().nonnegative().optional(),
|
|
35413
|
+
/** The rendered message the quote was selected in, and its last one when it spans several, so clients find it without searching. */
|
|
35414
|
+
messageId: external_exports.string().optional(),
|
|
35415
|
+
endMessageId: external_exports.string().optional()
|
|
35416
|
+
});
|
|
35401
35417
|
ANNOTATIONS_NOTE_OPENING = '<replicas_annotations>\nThe user quoted these passages, some with a comment. Address each annotation, and when you do, refer to it as "Annotation N".';
|
|
35402
35418
|
ANNOTATIONS_NOTE_REGEX = /(?:^|\n\n)<replicas_annotations>\n([\s\S]*?)\n<\/replicas_annotations>$/;
|
|
35403
35419
|
ANNOTATION_HEADER_REGEX = /^Annotation \d+$/m;
|
|
35404
35420
|
ANNOTATION_FILE_REGEX = /^File: (.+):(\d+)(?:-(\d+))?$/;
|
|
35421
|
+
ANNOTATION_OCCURRENCE_REGEX = /^Occurrence: (\d+) /;
|
|
35422
|
+
ANNOTATION_SOURCE_REGEX = /^Source: (\S+)(?: to (\S+))?$/;
|
|
35405
35423
|
APPSHOT_NOTE_REGEX = /(?:^|\n\n)<replicas_appshot app="([^"\n]*)" window="([^"\n]*)" image="(\d+)">\n([^\n<]*)(?:\n\n([^<]*))?\n<\/replicas_appshot>$/;
|
|
35406
35424
|
TRUNCATED_APPSHOT_NOTE_REGEX = /(?:^|\n\n)<replicas_appshot app="([^"\n]*)(?:" window="([^"\n]*)(?:" image="(\d*))?)?[^<]*(?:<\/?[a-z_]*)?$/;
|
|
35407
35425
|
XML_UNESCAPES = { "&": "&", "<": "<", ">": ">", """: '"', "'": "'" };
|
|
@@ -38959,6 +38977,7 @@ var init_types8 = __esm({
|
|
|
38959
38977
|
"use strict";
|
|
38960
38978
|
init_zod();
|
|
38961
38979
|
init_agent();
|
|
38980
|
+
init_v1();
|
|
38962
38981
|
HARNESS_THREAD_STATUSES = ["idle", "working", "error"];
|
|
38963
38982
|
textSchema = external_exports.looseObject({ type: external_exports.literal("text"), text: external_exports.string() });
|
|
38964
38983
|
imageSchema = external_exports.looseObject({ type: external_exports.literal("image"), data: external_exports.string(), mimeType: external_exports.string() });
|
|
@@ -39004,8 +39023,10 @@ var init_types8 = __esm({
|
|
|
39004
39023
|
model: external_exports.string().optional(),
|
|
39005
39024
|
thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional(),
|
|
39006
39025
|
instructionsHash: external_exports.string().optional(),
|
|
39026
|
+
queued: external_exports.boolean().optional(),
|
|
39007
39027
|
/** Stored only on a message whose `instructionsHash` differs from the message before it; later ones find it by hash. */
|
|
39008
|
-
instructions: external_exports.object({ environmentSystemPrompt: external_exports.string().optional(), customInstructions: external_exports.string().optional() }).optional()
|
|
39028
|
+
instructions: external_exports.object({ environmentSystemPrompt: external_exports.string().optional(), customInstructions: external_exports.string().optional() }).optional(),
|
|
39029
|
+
errorNotificationTarget: integrationErrorNotificationTargetSchema.optional()
|
|
39009
39030
|
}),
|
|
39010
39031
|
interrupt: external_exports.looseObject({ userId: external_exports.string().nullable() })
|
|
39011
39032
|
};
|
|
@@ -39039,7 +39060,7 @@ var init_types8 = __esm({
|
|
|
39039
39060
|
});
|
|
39040
39061
|
|
|
39041
39062
|
// ../shared/src/harness/worker-routes.ts
|
|
39042
|
-
var harnessWorkerEngineRequestSchema, harnessWorkerEngineResponseSchema, harnessWorkerCredentialRequestSchema, harnessWorkerCredentialResponseSchema;
|
|
39063
|
+
var harnessWorkerEngineRequestSchema, harnessWorkerEngineResponseSchema, harnessWorkerCredentialRequestSchema, harnessWorkerCredentialResponseSchema, harnessWorkerTurnCompleteRequestSchema;
|
|
39043
39064
|
var init_worker_routes = __esm({
|
|
39044
39065
|
"../shared/src/harness/worker-routes.ts"() {
|
|
39045
39066
|
"use strict";
|
|
@@ -39064,6 +39085,7 @@ var init_worker_routes = __esm({
|
|
|
39064
39085
|
external_exports.object({ method: external_exports.literal("oauth"), accessToken: external_exports.string(), expiresAt: external_exports.string(), credential: agentCredentialSnapshotSchema }),
|
|
39065
39086
|
external_exports.object({ method: external_exports.literal("api_key"), apiKey: external_exports.string(), credential: agentCredentialSnapshotSchema })
|
|
39066
39087
|
]);
|
|
39088
|
+
harnessWorkerTurnCompleteRequestSchema = external_exports.object({ errors: external_exports.array(external_exports.string()) });
|
|
39067
39089
|
}
|
|
39068
39090
|
});
|
|
39069
39091
|
|
|
@@ -39131,7 +39153,7 @@ var CLI_VERSION;
|
|
|
39131
39153
|
var init_cli_version = __esm({
|
|
39132
39154
|
"../shared/src/cli-version.ts"() {
|
|
39133
39155
|
"use strict";
|
|
39134
|
-
CLI_VERSION = "0.3.
|
|
39156
|
+
CLI_VERSION = "0.3.462";
|
|
39135
39157
|
}
|
|
39136
39158
|
});
|
|
39137
39159
|
|
|
@@ -39595,7 +39617,7 @@ var init_scout2 = __esm({
|
|
|
39595
39617
|
RESET_TO_DEFAULT = "default";
|
|
39596
39618
|
resettable = (schema, description) => external_exports.union([schema, external_exports.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
|
|
39597
39619
|
scoutSetSlackAgentDefaultsToolInputSchema = scoutSettingsConfirmationSchema.extend({
|
|
39598
|
-
agent_provider: resettable(external_exports.enum(
|
|
39620
|
+
agent_provider: resettable(external_exports.enum(VALID_AGENT_PROVIDERS), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
|
|
39599
39621
|
model: resettable(external_exports.string(), "Model id for that agent; the default is the agent's own."),
|
|
39600
39622
|
thinking_level: resettable(external_exports.enum(VALID_THINKING_LEVELS), "Thinking level."),
|
|
39601
39623
|
goal_mode: resettable(external_exports.boolean(), "Goal mode."),
|
|
@@ -40242,7 +40264,7 @@ var init_review_messages = __esm({
|
|
|
40242
40264
|
}).shape,
|
|
40243
40265
|
/** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
|
|
40244
40266
|
newChat: external_exports.boolean().optional(),
|
|
40245
|
-
provider: external_exports.enum(
|
|
40267
|
+
provider: external_exports.enum(VALID_AGENT_PROVIDERS).optional()
|
|
40246
40268
|
});
|
|
40247
40269
|
}
|
|
40248
40270
|
});
|
|
@@ -40320,8 +40342,8 @@ var init_github_checks = __esm({
|
|
|
40320
40342
|
function validateAgentSelection(body, existing, modelCatalogs = {}) {
|
|
40321
40343
|
const agentProvider = body.agent_provider;
|
|
40322
40344
|
if (agentProvider !== void 0 && agentProvider !== null) {
|
|
40323
|
-
if (!
|
|
40324
|
-
return createErrorResult({ message: `Invalid agent_provider: must be one of ${
|
|
40345
|
+
if (!isValidAgentProvider(agentProvider)) {
|
|
40346
|
+
return createErrorResult({ message: `Invalid agent_provider: must be one of ${VALID_AGENT_PROVIDERS.join(", ")}` });
|
|
40325
40347
|
}
|
|
40326
40348
|
}
|
|
40327
40349
|
const executionAgent = agentProvider !== void 0 ? agentProvider : existing.agentProvider;
|