replicas-cli 0.3.446 → 0.3.449
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 +185 -23
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -244,10 +244,12 @@ var init_urls = __esm({
|
|
|
244
244
|
"audit-logs": `${DASHBOARD_PATH}/audit-logs`,
|
|
245
245
|
accountAgents: `${DASHBOARD_PATH}/account/agents`,
|
|
246
246
|
accountProfile: `${DASHBOARD_PATH}/account/profile`,
|
|
247
|
+
accountAppearance: `${DASHBOARD_PATH}/account/appearance`,
|
|
247
248
|
accountConnections: `${DASHBOARD_PATH}/account/connections`,
|
|
248
249
|
accountIntegrations: `${DASHBOARD_PATH}/account/integrations`,
|
|
249
250
|
accountApiKeys: `${DASHBOARD_PATH}/account/api-keys`,
|
|
250
251
|
accountPreferences: `${DASHBOARD_PATH}/account/preferences`,
|
|
252
|
+
accountKeyboardShortcuts: `${DASHBOARD_PATH}/account/keyboard-shortcuts`,
|
|
251
253
|
fullscreenWorkspaces: "/workspaces"
|
|
252
254
|
};
|
|
253
255
|
UUID_PATTERN = "????????-????-????-????-????????????";
|
|
@@ -22427,7 +22429,7 @@ function codexTurnFromEvent(event) {
|
|
|
22427
22429
|
const { turnId, status, error: error62 } = event.payload;
|
|
22428
22430
|
return typeof turnId === "string" && typeof status === "string" ? { turnId, status, ...typeof error62 === "string" ? { error: error62 } : {} } : null;
|
|
22429
22431
|
}
|
|
22430
|
-
var MERGED_MESSAGE_SEPARATOR, engineStatusSnapshotSchema, updateChatDisplayNameRequestSchema, createChatRequestSchema, spawnSubagentRequestSchema, messageSubagentRequestSchema, waitSubagentRequestSchema, subagentResponseSchema, integrationErrorNotificationTargetSchema, sendChatMessageRequestSchema, CODEX_ITEM_FIELD_CHECKS, sendChatMessageResponseSchema, interruptChatRequestSchema, respondToolInputRequestSchema;
|
|
22432
|
+
var MERGED_MESSAGE_SEPARATOR, engineStatusSnapshotSchema, updateChatDisplayNameRequestSchema, createChatFields, createChatRequestSchema, createHarnessChatRequestSchema, spawnSubagentRequestSchema, messageSubagentRequestSchema, waitSubagentRequestSchema, subagentResponseSchema, integrationErrorNotificationTargetSchema, sendChatMessageRequestSchema, CODEX_ITEM_FIELD_CHECKS, sendChatMessageResponseSchema, interruptChatRequestSchema, respondToolInputRequestSchema;
|
|
22431
22433
|
var init_v1 = __esm({
|
|
22432
22434
|
"../shared/src/engine/v1.ts"() {
|
|
22433
22435
|
"use strict";
|
|
@@ -22454,7 +22456,7 @@ var init_v1 = __esm({
|
|
|
22454
22456
|
updateChatDisplayNameRequestSchema = external_exports.object({
|
|
22455
22457
|
displayName: external_exports.string().trim().min(1).max(100)
|
|
22456
22458
|
});
|
|
22457
|
-
|
|
22459
|
+
createChatFields = external_exports.object({
|
|
22458
22460
|
id: external_exports.string().uuid().optional(),
|
|
22459
22461
|
createdAt: external_exports.string().datetime().optional(),
|
|
22460
22462
|
provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
|
|
@@ -22465,9 +22467,11 @@ var init_v1 = __esm({
|
|
|
22465
22467
|
kind: external_exports.enum(CHAT_KINDS).optional(),
|
|
22466
22468
|
sideChat: external_exports.boolean().optional(),
|
|
22467
22469
|
clientRequestId: external_exports.string().min(1).max(128).optional()
|
|
22468
|
-
})
|
|
22470
|
+
});
|
|
22471
|
+
createChatRequestSchema = createChatFields.refine((request) => !request.sideChat || request.forkSourceChatId !== void 0 && request.parentChatId === request.forkSourceChatId, {
|
|
22469
22472
|
message: "A side chat must fork its parent chat"
|
|
22470
22473
|
});
|
|
22474
|
+
createHarnessChatRequestSchema = createChatFields.pick({ id: true, title: true }).extend({ provider: external_exports.literal(AGENT.REPLICAS) });
|
|
22471
22475
|
spawnSubagentRequestSchema = external_exports.object({
|
|
22472
22476
|
provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
|
|
22473
22477
|
prompt: external_exports.string().min(1),
|
|
@@ -24067,7 +24071,7 @@ Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~
|
|
|
24067
24071
|
| Piece | When it runs | Put here |
|
|
24068
24072
|
| --- | --- | --- |
|
|
24069
24073
|
| **Warm hook** | Once, while Replicas builds the warm-pool snapshot for the environment. Its *filesystem* state is baked into every new workspace; its *processes* are not. Default timeout 60 minutes. | Slow, deterministic setup: dependency installs from the lockfile, toolchain downloads, \`docker pull\`, one-time builds, code generation. |
|
|
24070
|
-
| **Start hook** | On every workspace boot,
|
|
24074
|
+
| **Start hook** | On every workspace boot, alongside the agent, which is told to wait for it before using the setup. Default timeout 5 minutes. | Fast per-boot reconciliation: start daemons and databases, run migrations against local services, launch dev servers with \`replicas service start\`, health checks. Must be idempotent. |
|
|
24071
24075
|
| **System prompt** | Injected into the agent's instructions for every workspace in the environment. | Only what an agent cannot learn from the repository itself: team conventions, review expectations, how to verify, gotchas you hit while setting up. |
|
|
24072
24076
|
| **Variables** | Exported into every workspace (and available inside hooks). Values are encrypted. | API keys, tokens, feature flags, local service URLs. |
|
|
24073
24077
|
| **Files** | Materialized on the workspace filesystem at boot. | \`.env\` files, dotfiles, config that must not be committed. |
|
|
@@ -26618,6 +26622,7 @@ var init_preferences = __esm({
|
|
|
26618
26622
|
appshot_shortcut: "command",
|
|
26619
26623
|
appshot_destination: "automatic",
|
|
26620
26624
|
appshot_sound: true,
|
|
26625
|
+
keyboard_shortcuts: {},
|
|
26621
26626
|
mothership_tour_seen: false,
|
|
26622
26627
|
slack_settings_moved_notice: false,
|
|
26623
26628
|
mothership_board_opened: false,
|
|
@@ -26633,7 +26638,10 @@ var init_preferences = __esm({
|
|
|
26633
26638
|
workspace_alerts: {},
|
|
26634
26639
|
automation_alerts: {},
|
|
26635
26640
|
push_types: { needs_you: true, finished: true, automations: true, usage_limit: true },
|
|
26636
|
-
push_when_active: "wait"
|
|
26641
|
+
push_when_active: "wait",
|
|
26642
|
+
chat_text_size: "default",
|
|
26643
|
+
app_font: "inter",
|
|
26644
|
+
code_font: "geist-mono"
|
|
26637
26645
|
};
|
|
26638
26646
|
DEFAULT_DEFAULT_SKILLS = {
|
|
26639
26647
|
replicas_agent: {
|
|
@@ -37071,6 +37079,113 @@ var init_task_accumulator = __esm({
|
|
|
37071
37079
|
}
|
|
37072
37080
|
});
|
|
37073
37081
|
|
|
37082
|
+
// ../shared/src/display-message/parsers/replicas-parser.ts
|
|
37083
|
+
function contentBlocks(value) {
|
|
37084
|
+
return Array.isArray(value) ? value.filter(isRecord) : [];
|
|
37085
|
+
}
|
|
37086
|
+
function blockImages(blocks) {
|
|
37087
|
+
return blocks.flatMap((block) => block.type === "image" && typeof block.data === "string" && typeof block.mimeType === "string" ? [{ type: "image", mediaType: block.mimeType, data: block.data }] : []);
|
|
37088
|
+
}
|
|
37089
|
+
function toolCallMessage(id, name, args, timestamp, result) {
|
|
37090
|
+
const status = !result ? "in_progress" : result.isError ? "failed" : "completed";
|
|
37091
|
+
if (name === "bash" && typeof args.command === "string") {
|
|
37092
|
+
return { id, type: "command", command: args.command, output: result?.output, ...result?.exitCode !== void 0 ? { exitCode: result.exitCode } : {}, status, timestamp };
|
|
37093
|
+
}
|
|
37094
|
+
if ((name === "write" || name === "edit") && typeof args.path === "string") {
|
|
37095
|
+
return { id, type: "file_change", changes: [{ path: args.path, kind: name === "write" ? "add" : "update" }], status, timestamp };
|
|
37096
|
+
}
|
|
37097
|
+
return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp });
|
|
37098
|
+
}
|
|
37099
|
+
function parseReplicasEvents(events) {
|
|
37100
|
+
const messages = [];
|
|
37101
|
+
const toolCalls = /* @__PURE__ */ new Map();
|
|
37102
|
+
const lastSavedAssistantMs = Math.max(0, ...events.filter((event) => event.type === `${HARNESS_EVENT_TYPE_PREFIX}assistant_message`).map((event) => Date.parse(event.timestamp)));
|
|
37103
|
+
events.forEach((event) => {
|
|
37104
|
+
const { payload, timestamp } = event;
|
|
37105
|
+
const message2 = isRecord(payload.message) ? payload.message : {};
|
|
37106
|
+
switch (event.type) {
|
|
37107
|
+
// The client's copy of a sent prompt, shown until the worker saves it under the same message id.
|
|
37108
|
+
case "event_msg": {
|
|
37109
|
+
if (payload.type !== "user_message" || typeof payload.message !== "string") return;
|
|
37110
|
+
const images = userMessageImages(payload.images);
|
|
37111
|
+
messages.push({ id: getUserMessageId(event) ?? `replicas-pending-${timestamp}`, type: "user", content: payload.message, ...images ? { images } : {}, timestamp });
|
|
37112
|
+
return;
|
|
37113
|
+
}
|
|
37114
|
+
case `${HARNESS_EVENT_TYPE_PREFIX}user_message`: {
|
|
37115
|
+
const images = blockImages(contentBlocks(message2.content));
|
|
37116
|
+
const messageId = payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
37117
|
+
messages.push({
|
|
37118
|
+
id: typeof messageId === "string" ? messageId : `replicas-user-${String(payload.seq)}`,
|
|
37119
|
+
type: "user",
|
|
37120
|
+
content: extractToolResultText(message2.content),
|
|
37121
|
+
...images.length ? { images } : {},
|
|
37122
|
+
timestamp
|
|
37123
|
+
});
|
|
37124
|
+
return;
|
|
37125
|
+
}
|
|
37126
|
+
case `${HARNESS_EVENT_TYPE_PREFIX}assistant_message`: {
|
|
37127
|
+
contentBlocks(message2.content).forEach((block, blockIndex) => {
|
|
37128
|
+
const id = `replicas-${String(payload.seq)}-${blockIndex}`;
|
|
37129
|
+
if (block.type === "text" && typeof block.text === "string" && block.text) messages.push({ id, type: "agent", content: block.text, timestamp });
|
|
37130
|
+
if (block.type === "thinking" && typeof block.thinking === "string" && block.thinking) messages.push({ id, type: "reasoning", content: block.thinking, status: "completed", timestamp });
|
|
37131
|
+
if (block.type === "toolCall" && typeof block.id === "string" && typeof block.name === "string") {
|
|
37132
|
+
const call = { name: block.name, args: isRecord(block.arguments) ? block.arguments : {}, timestamp };
|
|
37133
|
+
toolCalls.set(block.id, call);
|
|
37134
|
+
messages.push(toolCallMessage(`replicas-tool-${block.id}`, call.name, call.args, timestamp));
|
|
37135
|
+
}
|
|
37136
|
+
});
|
|
37137
|
+
if (message2.stopReason === "error") {
|
|
37138
|
+
messages.push({
|
|
37139
|
+
id: `replicas-error-${String(payload.seq)}`,
|
|
37140
|
+
type: "error",
|
|
37141
|
+
message: formatInferenceError(typeof message2.errorMessage === "string" && message2.errorMessage ? message2.errorMessage : "The model request failed", {
|
|
37142
|
+
...typeof message2.provider === "string" ? { provider: message2.provider } : {},
|
|
37143
|
+
...typeof message2.model === "string" ? { model: message2.model } : {}
|
|
37144
|
+
}),
|
|
37145
|
+
timestamp
|
|
37146
|
+
});
|
|
37147
|
+
}
|
|
37148
|
+
return;
|
|
37149
|
+
}
|
|
37150
|
+
case `${HARNESS_EVENT_TYPE_PREFIX}tool_result`: {
|
|
37151
|
+
if (typeof message2.toolCallId !== "string") return;
|
|
37152
|
+
const call = toolCalls.get(message2.toolCallId) ?? { name: typeof message2.toolName === "string" ? message2.toolName : "tool", args: {}, timestamp };
|
|
37153
|
+
const exitCode = isRecord(message2.details) && typeof message2.details.exitCode === "number" ? message2.details.exitCode : void 0;
|
|
37154
|
+
upsertDisplayMessage(messages, toolCallMessage(`replicas-tool-${message2.toolCallId}`, call.name, call.args, call.timestamp, {
|
|
37155
|
+
output: extractToolResultText(message2.content) || void 0,
|
|
37156
|
+
isError: message2.isError === true,
|
|
37157
|
+
exitCode
|
|
37158
|
+
}));
|
|
37159
|
+
return;
|
|
37160
|
+
}
|
|
37161
|
+
case `${HARNESS_EVENT_TYPE_PREFIX}error`:
|
|
37162
|
+
messages.push({ id: `replicas-error-${String(payload.seq)}`, type: "error", message: stringifyDisplayValue(payload.message) ?? "The agent stopped with an error", timestamp });
|
|
37163
|
+
return;
|
|
37164
|
+
case CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE: {
|
|
37165
|
+
const partial2 = coerceClaudePartialMessagePayload(payload);
|
|
37166
|
+
if (!partial2 || Date.parse(event.timestamp) <= lastSavedAssistantMs) return;
|
|
37167
|
+
if (partial2.thinking) upsertDisplayMessage(messages, { id: `replicas-partial-${partial2.streamId}-thinking`, type: "reasoning", content: partial2.thinking, status: "in_progress", timestamp });
|
|
37168
|
+
if (partial2.text) upsertDisplayMessage(messages, { id: `replicas-partial-${partial2.streamId}`, type: "agent", content: partial2.text, timestamp });
|
|
37169
|
+
return;
|
|
37170
|
+
}
|
|
37171
|
+
}
|
|
37172
|
+
});
|
|
37173
|
+
return messages;
|
|
37174
|
+
}
|
|
37175
|
+
var HARNESS_EVENT_TYPE_PREFIX;
|
|
37176
|
+
var init_replicas_parser = __esm({
|
|
37177
|
+
"../shared/src/display-message/parsers/replicas-parser.ts"() {
|
|
37178
|
+
"use strict";
|
|
37179
|
+
init_event();
|
|
37180
|
+
init_agent_event_utils();
|
|
37181
|
+
init_type_guards();
|
|
37182
|
+
init_task_accumulator();
|
|
37183
|
+
init_inference_error();
|
|
37184
|
+
init_utils();
|
|
37185
|
+
HARNESS_EVENT_TYPE_PREFIX = "harness-";
|
|
37186
|
+
}
|
|
37187
|
+
});
|
|
37188
|
+
|
|
37074
37189
|
// ../shared/src/display-message/parsers/claude-parser.ts
|
|
37075
37190
|
function fileOrCommandMessage(block, timestamp) {
|
|
37076
37191
|
let template = toolMessageTemplates.get(block);
|
|
@@ -37382,7 +37497,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
37382
37497
|
}
|
|
37383
37498
|
if (event.type === "claude-assistant") {
|
|
37384
37499
|
const messageId = event.payload.message?.id;
|
|
37385
|
-
const
|
|
37500
|
+
const contentBlocks2 = normalizeContentBlocks(event.payload.message?.content);
|
|
37386
37501
|
const messageKey = messageId || event.timestamp;
|
|
37387
37502
|
const localCommand = event.payload.local_command_run;
|
|
37388
37503
|
const goalArgs = isRecord(localCommand) && localCommand.command === GOAL_TOOL_NAME && typeof localCommand.args === "string" ? localCommand.args.trim() : "";
|
|
@@ -37404,12 +37519,12 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
37404
37519
|
if (liveStreamId !== null && liveStreamId !== messageId) {
|
|
37405
37520
|
supersededStreamIds.add(liveStreamId);
|
|
37406
37521
|
}
|
|
37407
|
-
if (
|
|
37522
|
+
if (contentBlocks2.some((block) => block.type === "text" && block.text)) {
|
|
37408
37523
|
completedStreamIds.add(messageId);
|
|
37409
37524
|
liveStreamId = null;
|
|
37410
37525
|
}
|
|
37411
37526
|
}
|
|
37412
|
-
const thinkingBlocks =
|
|
37527
|
+
const thinkingBlocks = contentBlocks2.flatMap(
|
|
37413
37528
|
(block) => block.type === "thinking" && typeof block.thinking === "string" ? [block.thinking] : []
|
|
37414
37529
|
);
|
|
37415
37530
|
if (thinkingBlocks.length > 0) {
|
|
@@ -37429,7 +37544,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
37429
37544
|
upsertMessage(reasoningMessage);
|
|
37430
37545
|
}
|
|
37431
37546
|
}
|
|
37432
|
-
|
|
37547
|
+
contentBlocks2.forEach((block) => {
|
|
37433
37548
|
if (block.type === "text" && block.text) {
|
|
37434
37549
|
const textIndex = assistantTextCounts.get(messageKey) ?? 0;
|
|
37435
37550
|
assistantTextCounts.set(messageKey, textIndex + 1);
|
|
@@ -37743,6 +37858,9 @@ function parseProviderEvents(events, agentType, parentToolUseId) {
|
|
|
37743
37858
|
if (agentType === "pi") {
|
|
37744
37859
|
return parsePiEvents(events);
|
|
37745
37860
|
}
|
|
37861
|
+
if (agentType === "replicas") {
|
|
37862
|
+
return parseReplicasEvents(events);
|
|
37863
|
+
}
|
|
37746
37864
|
return parseClaudeEvents(events, parentToolUseId);
|
|
37747
37865
|
}
|
|
37748
37866
|
function parseDisplayMessages(events, agentType, options = {}) {
|
|
@@ -37916,11 +38034,13 @@ var init_parsers = __esm({
|
|
|
37916
38034
|
init_opencode_parser();
|
|
37917
38035
|
init_muse_parser();
|
|
37918
38036
|
init_pi_parser();
|
|
38037
|
+
init_replicas_parser();
|
|
37919
38038
|
init_claude_parser();
|
|
37920
38039
|
init_codex_parser();
|
|
37921
38040
|
init_cursor_parser();
|
|
37922
38041
|
init_opencode_parser();
|
|
37923
38042
|
init_pi_parser();
|
|
38043
|
+
init_replicas_parser();
|
|
37924
38044
|
init_claude_parser();
|
|
37925
38045
|
init_mcp();
|
|
37926
38046
|
init_utils();
|
|
@@ -38451,9 +38571,9 @@ var init_keyboard_shortcuts = __esm({
|
|
|
38451
38571
|
keys: { key: "ArrowDown", mod: true, alt: true, shift: true },
|
|
38452
38572
|
linuxKeys: { key: "ArrowDown", alt: true, shift: true }
|
|
38453
38573
|
},
|
|
38454
|
-
jumpToWorkspace: { label: "Workspace 1\u20139 in the sidebar", group: "Navigation", desktopKeys: { key: "1", mod: true } },
|
|
38455
|
-
goBack: { label: "Back", group: "Navigation", desktopKeys: { key: "[", mod: true } },
|
|
38456
|
-
goForward: { label: "Forward", group: "Navigation", desktopKeys: { key: "]", mod: true } },
|
|
38574
|
+
jumpToWorkspace: { label: "Workspace 1\u20139 in the sidebar", group: "Navigation", desktopKeys: { key: "1", mod: true }, fixed: true },
|
|
38575
|
+
goBack: { label: "Back", group: "Navigation", desktopKeys: { key: "[", mod: true }, fixed: true },
|
|
38576
|
+
goForward: { label: "Forward", group: "Navigation", desktopKeys: { key: "]", mod: true }, fixed: true },
|
|
38457
38577
|
stopAgent: { label: "Stop the agent", group: "Chat", keys: { key: "Escape" } },
|
|
38458
38578
|
newChat: { label: "New chat", group: "Chat", desktopKeys: { key: "t", mod: true } },
|
|
38459
38579
|
previousChat: {
|
|
@@ -38490,15 +38610,15 @@ var init_keyboard_shortcuts = __esm({
|
|
|
38490
38610
|
keys: { key: "l", alt: true },
|
|
38491
38611
|
macKeys: { key: "Tab", alt: true }
|
|
38492
38612
|
},
|
|
38493
|
-
send: { label: "Send", group: "Composer", keys: { key: "Enter" } },
|
|
38494
|
-
sendAlternate: { label: "Queue or steer instead", group: "Composer", keys: { key: "Enter", alt: true } },
|
|
38495
|
-
newLine: { label: "New line", group: "Composer", keys: { key: "Enter", shift: true } },
|
|
38613
|
+
send: { label: "Send", group: "Composer", keys: { key: "Enter" }, fixed: true },
|
|
38614
|
+
sendAlternate: { label: "Queue or steer instead", group: "Composer", keys: { key: "Enter", alt: true }, fixed: true },
|
|
38615
|
+
newLine: { label: "New line", group: "Composer", keys: { key: "Enter", shift: true }, fixed: true },
|
|
38496
38616
|
toggleTaskMode: { label: "Switch Plan / Build", group: "Composer", keys: { key: "Tab", shift: true } },
|
|
38497
38617
|
toggleVoiceInput: { label: "Voice input", group: "Composer", keys: { key: " ", mod: true, shift: true } },
|
|
38498
|
-
previousPrompt: { label: "Previous prompt", group: "Composer", keys: { key: "ArrowUp" } },
|
|
38618
|
+
previousPrompt: { label: "Previous prompt", group: "Composer", keys: { key: "ArrowUp" }, fixed: true },
|
|
38499
38619
|
searchPromptHistory: { label: "Search prompt history", group: "Composer", keys: { key: "r", ctrl: true } },
|
|
38500
|
-
mentionFile: { label: "Mention a file", group: "Composer", keys: { key: "@" } },
|
|
38501
|
-
slashCommand: { label: "Commands and skills", group: "Composer", keys: { key: "/" } },
|
|
38620
|
+
mentionFile: { label: "Mention a file", group: "Composer", keys: { key: "@" }, fixed: true },
|
|
38621
|
+
slashCommand: { label: "Commands and skills", group: "Composer", keys: { key: "/" }, fixed: true },
|
|
38502
38622
|
previousCanvasItem: { label: "Previous item", group: "Canvas", keys: { key: "ArrowLeft" } },
|
|
38503
38623
|
nextCanvasItem: { label: "Next item", group: "Canvas", keys: { key: "ArrowRight" } },
|
|
38504
38624
|
exitCanvasFullScreen: { label: "Exit full screen", group: "Canvas", keys: { key: "Escape" } },
|
|
@@ -38754,7 +38874,7 @@ var init_organizations = __esm({
|
|
|
38754
38874
|
});
|
|
38755
38875
|
|
|
38756
38876
|
// ../shared/src/harness/types.ts
|
|
38757
|
-
var HARNESS_THREAD_STATUSES, textSchema, imageSchema, userMessageSchema, assistantMessageSchema, toolResultMessageSchema, harnessInboxPayloadSchemas, harnessEventBodySchema;
|
|
38877
|
+
var HARNESS_THREAD_STATUSES, textSchema, imageSchema, userMessageSchema, assistantMessageSchema, toolResultMessageSchema, harnessInboxPayloadSchemas, harnessEventBodySchema, harnessLiveMessageSchema;
|
|
38758
38878
|
var init_types8 = __esm({
|
|
38759
38879
|
"../shared/src/harness/types.ts"() {
|
|
38760
38880
|
"use strict";
|
|
@@ -38815,6 +38935,39 @@ var init_types8 = __esm({
|
|
|
38815
38935
|
external_exports.object({ type: external_exports.literal("status"), payload: external_exports.looseObject({ status: external_exports.enum(HARNESS_THREAD_STATUSES) }) }),
|
|
38816
38936
|
external_exports.object({ type: external_exports.literal("error"), payload: external_exports.looseObject({ message: external_exports.string() }) })
|
|
38817
38937
|
]);
|
|
38938
|
+
harnessLiveMessageSchema = external_exports.union([
|
|
38939
|
+
external_exports.object({ type: external_exports.literal("delta"), streamId: external_exports.string(), text: external_exports.string() }),
|
|
38940
|
+
external_exports.object({ type: external_exports.literal("delta"), streamId: external_exports.string(), thinking: external_exports.string() }),
|
|
38941
|
+
external_exports.object({ type: external_exports.literal("delta"), streamId: external_exports.string(), toolCall: external_exports.object({ id: external_exports.string(), name: external_exports.string(), argumentsDelta: external_exports.string() }) }),
|
|
38942
|
+
external_exports.object({ type: external_exports.literal("step_saved"), seq: external_exports.number() }),
|
|
38943
|
+
external_exports.object({ type: external_exports.literal("status"), status: external_exports.enum(HARNESS_THREAD_STATUSES) })
|
|
38944
|
+
]);
|
|
38945
|
+
}
|
|
38946
|
+
});
|
|
38947
|
+
|
|
38948
|
+
// ../shared/src/harness/worker-routes.ts
|
|
38949
|
+
var harnessWorkerEngineRequestSchema, harnessWorkerEngineResponseSchema, harnessWorkerCredentialRequestSchema, harnessWorkerCredentialResponseSchema;
|
|
38950
|
+
var init_worker_routes = __esm({
|
|
38951
|
+
"../shared/src/harness/worker-routes.ts"() {
|
|
38952
|
+
"use strict";
|
|
38953
|
+
init_zod();
|
|
38954
|
+
init_types3();
|
|
38955
|
+
harnessWorkerEngineRequestSchema = external_exports.object({
|
|
38956
|
+
/** The engine we were given didn't answer, so the monolith checks the provider instead of trusting the workspace's status. */
|
|
38957
|
+
unreachable: external_exports.boolean().optional()
|
|
38958
|
+
});
|
|
38959
|
+
harnessWorkerEngineResponseSchema = external_exports.discriminatedUnion("status", [
|
|
38960
|
+
external_exports.object({ status: external_exports.literal("ready"), engineUrl: external_exports.string(), headers: external_exports.record(external_exports.string(), external_exports.string()) }),
|
|
38961
|
+
external_exports.object({ status: external_exports.literal("waking") })
|
|
38962
|
+
]);
|
|
38963
|
+
harnessWorkerCredentialRequestSchema = external_exports.object({
|
|
38964
|
+
/** The credential the model rejected, so the monolith refreshes it or moves to the next one instead of handing it back. */
|
|
38965
|
+
failedCredential: agentCredentialSnapshotSchema.optional()
|
|
38966
|
+
});
|
|
38967
|
+
harnessWorkerCredentialResponseSchema = external_exports.discriminatedUnion("method", [
|
|
38968
|
+
external_exports.object({ method: external_exports.literal("oauth"), accessToken: external_exports.string(), expiresAt: external_exports.string(), credential: agentCredentialSnapshotSchema }),
|
|
38969
|
+
external_exports.object({ method: external_exports.literal("api_key"), apiKey: external_exports.string(), credential: agentCredentialSnapshotSchema })
|
|
38970
|
+
]);
|
|
38818
38971
|
}
|
|
38819
38972
|
});
|
|
38820
38973
|
|
|
@@ -38882,7 +39035,7 @@ var CLI_VERSION;
|
|
|
38882
39035
|
var init_cli_version = __esm({
|
|
38883
39036
|
"../shared/src/cli-version.ts"() {
|
|
38884
39037
|
"use strict";
|
|
38885
|
-
CLI_VERSION = "0.3.
|
|
39038
|
+
CLI_VERSION = "0.3.449";
|
|
38886
39039
|
}
|
|
38887
39040
|
});
|
|
38888
39041
|
|
|
@@ -38916,6 +39069,7 @@ var init_chat_tabs = __esm({
|
|
|
38916
39069
|
"../shared/src/engine/chat-tabs.ts"() {
|
|
38917
39070
|
"use strict";
|
|
38918
39071
|
init_types4();
|
|
39072
|
+
init_agent();
|
|
38919
39073
|
init_chat_fork();
|
|
38920
39074
|
}
|
|
38921
39075
|
});
|
|
@@ -39065,7 +39219,7 @@ var init_git_invocations = __esm({
|
|
|
39065
39219
|
});
|
|
39066
39220
|
|
|
39067
39221
|
// ../shared/src/routes/command-protection.ts
|
|
39068
|
-
var commandProtectionRepoStateSchema, commandProtectionEvaluateRequestSchema;
|
|
39222
|
+
var commandProtectionRepoStateSchema, commandProtectionEvaluateRequestSchema, commandProtectionEvaluateResponseSchema, COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES;
|
|
39069
39223
|
var init_command_protection = __esm({
|
|
39070
39224
|
"../shared/src/routes/command-protection.ts"() {
|
|
39071
39225
|
"use strict";
|
|
@@ -39083,8 +39237,8 @@ var init_command_protection = __esm({
|
|
|
39083
39237
|
mergeInProgress: external_exports.boolean().optional()
|
|
39084
39238
|
});
|
|
39085
39239
|
commandProtectionEvaluateRequestSchema = external_exports.object({
|
|
39086
|
-
provider: external_exports.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
39087
|
-
source: external_exports.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
39240
|
+
provider: external_exports.enum(["claude", "codex", "cursor", "opencode", "pi", "harness"]),
|
|
39241
|
+
source: external_exports.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call", "harness_tool_call"]),
|
|
39088
39242
|
toolName: external_exports.string(),
|
|
39089
39243
|
toolInput: external_exports.unknown(),
|
|
39090
39244
|
command: external_exports.string().nullish(),
|
|
@@ -39097,6 +39251,13 @@ var init_command_protection = __esm({
|
|
|
39097
39251
|
messageFiles: external_exports.record(external_exports.string(), external_exports.string())
|
|
39098
39252
|
}).optional()
|
|
39099
39253
|
});
|
|
39254
|
+
commandProtectionEvaluateResponseSchema = external_exports.object({
|
|
39255
|
+
allowed: external_exports.boolean(),
|
|
39256
|
+
enabled: external_exports.boolean(),
|
|
39257
|
+
reason: external_exports.string().optional(),
|
|
39258
|
+
matchedSignals: external_exports.array(external_exports.string()).optional()
|
|
39259
|
+
});
|
|
39260
|
+
COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES = 64 * 1024;
|
|
39100
39261
|
}
|
|
39101
39262
|
});
|
|
39102
39263
|
|
|
@@ -50242,6 +50403,7 @@ var init_src = __esm({
|
|
|
50242
50403
|
init_replicas_mcp();
|
|
50243
50404
|
init_subagent_mcp();
|
|
50244
50405
|
init_types8();
|
|
50406
|
+
init_worker_routes();
|
|
50245
50407
|
init_headless_agent();
|
|
50246
50408
|
init_errors3();
|
|
50247
50409
|
init_external_api_host();
|