@rayu-dev/rayu-cli 2.0.1 → 2.0.10
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/rayu.js +1103 -187
- package/package.json +1 -1
package/dist/rayu.js
CHANGED
|
@@ -62423,7 +62423,7 @@ var init_coreSchemas = __esm(() => {
|
|
|
62423
62423
|
});
|
|
62424
62424
|
|
|
62425
62425
|
// src/protocol/controlSchemas.ts
|
|
62426
|
-
var JSONRPCMessagePlaceholder, SDKHookCallbackMatcherSchema, SDKControlInitializeRequestSchema, SDKControlInitializeResponseSchema, SDKControlInterruptRequestSchema, SDKControlPermissionRequestSchema, SDKControlSetPermissionModeRequestSchema, SDKControlSetModelRequestSchema, SDKControlSetMaxThinkingTokensRequestSchema, SDKControlMcpStatusRequestSchema, SDKControlMcpStatusResponseSchema, SDKControlGetContextUsageRequestSchema, ContextCategorySchema, ContextGridSquareSchema, SDKControlGetContextUsageResponseSchema, SDKControlRewindFilesRequestSchema, SDKControlRewindFilesResponseSchema, SDKControlCancelAsyncMessageRequestSchema, SDKControlCancelAsyncMessageResponseSchema, SDKControlSeedReadStateRequestSchema, SDKHookCallbackRequestSchema, SDKControlMcpMessageRequestSchema, SDKControlMcpSetServersRequestSchema, SDKControlMcpSetServersResponseSchema, SDKControlReloadPluginsRequestSchema, SDKControlReloadPluginsResponseSchema, SDKControlMcpReconnectRequestSchema, SDKControlMcpToggleRequestSchema, SDKControlStopTaskRequestSchema, SDKControlTaskOutputRequestSchema, SDKControlTaskOutputResponseSchema, SDKControlApplyFlagSettingsRequestSchema, SDKControlSetEffortRequestSchema, SDKControlGetSettingsRequestSchema, SDKControlGetSettingsResponseSchema, SDKControlElicitationRequestSchema, SDKControlElicitationResponseSchema, SDKControlRequestInnerSchema, SDKControlRequestSchema, ControlResponseSchema, ControlErrorResponseSchema, SDKControlResponseSchema, SDKControlCancelRequestSchema, SDKKeepAliveMessageSchema, SDKUpdateEnvironmentVariablesMessageSchema, StdoutMessageSchema, StdinMessageSchema;
|
|
62426
|
+
var JSONRPCMessagePlaceholder, SDKHookCallbackMatcherSchema, SDKControlInitializeRequestSchema, RuntimeCapabilitiesSchema, RuntimeCommandDescriptorSchema, RuntimeToolDescriptorSchema, RuntimeAgentDescriptorSchema, RuntimePluginDescriptorSchema, RuntimeSkillDescriptorSchema, RuntimeTaskActivitySchema, RuntimeTaskCapabilitiesSchema, RuntimeBackgroundTaskSchema, RuntimeInferenceSnapshotSchema, RuntimeSnapshotSchema, SDKControlInitializeResponseSchema, SDKControlInterruptRequestSchema, SDKControlPermissionRequestSchema, SDKControlSetPermissionModeRequestSchema, SDKControlSetModelRequestSchema, SDKControlSetMaxThinkingTokensRequestSchema, SDKControlMcpStatusRequestSchema, SDKControlMcpStatusResponseSchema, SDKControlGetContextUsageRequestSchema, ContextCategorySchema, ContextGridSquareSchema, SDKControlGetContextUsageResponseSchema, SDKControlRewindFilesRequestSchema, SDKControlRewindFilesResponseSchema, SDKControlCancelAsyncMessageRequestSchema, SDKControlCancelAsyncMessageResponseSchema, SDKControlSeedReadStateRequestSchema, SDKHookCallbackRequestSchema, SDKControlMcpMessageRequestSchema, SDKControlMcpSetServersRequestSchema, SDKControlMcpSetServersResponseSchema, SDKControlReloadPluginsRequestSchema, SDKControlReloadPluginsResponseSchema, SDKControlInstallSkillRequestSchema, SDKControlGetRuntimeSnapshotRequestSchema, SDKControlGetRuntimeSnapshotResponseSchema, SDKControlMcpReconnectRequestSchema, SDKControlMcpToggleRequestSchema, SDKControlStopTaskRequestSchema, SDKControlTaskOutputRequestSchema, SDKControlTaskOutputResponseSchema, SDKControlApplyFlagSettingsRequestSchema, SDKControlSetEffortRequestSchema, SDKControlSetThinkingRequestSchema, SDKControlEndSessionRequestSchema, SDKControlChannelEnableRequestSchema, SDKControlMcpAuthenticateRequestSchema, SDKControlMcpOAuthCallbackRequestSchema, SDKControlMcpClearAuthRequestSchema, SDKControlGenerateSessionTitleRequestSchema, SDKControlSideQuestionRequestSchema, SDKControlRemoteControlRequestSchema, SDKControlSetProactiveRequestSchema, SDKControlGetSettingsRequestSchema, SDKControlGetSettingsResponseSchema, SDKControlElicitationRequestSchema, SDKControlElicitationResponseSchema, SDKControlRequestInnerSchema, SDKControlRequestSchema, ControlResponseSchema, ControlErrorResponseSchema, SDKControlResponseSchema, SDKControlCancelRequestSchema, SDKKeepAliveMessageSchema, SDKUpdateEnvironmentVariablesMessageSchema, StdoutMessageSchema, StdinMessageSchema;
|
|
62427
62427
|
var init_controlSchemas = __esm(() => {
|
|
62428
62428
|
init_v4();
|
|
62429
62429
|
init_coreSchemas();
|
|
@@ -62442,8 +62442,156 @@ var init_controlSchemas = __esm(() => {
|
|
|
62442
62442
|
appendSystemPrompt: exports_external.string().optional(),
|
|
62443
62443
|
agents: exports_external.record(exports_external.string(), AgentDefinitionSchema()).optional(),
|
|
62444
62444
|
promptSuggestions: exports_external.boolean().optional(),
|
|
62445
|
-
agentProgressSummaries: exports_external.boolean().optional()
|
|
62445
|
+
agentProgressSummaries: exports_external.boolean().optional(),
|
|
62446
|
+
runtimeCapabilities: exports_external.boolean().optional().describe("Requests the shared runtime catalogue and initial state projection. Additive and ignored by older engines.")
|
|
62446
62447
|
}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration."));
|
|
62448
|
+
RuntimeCapabilitiesSchema = lazySchema(() => exports_external.object({
|
|
62449
|
+
version: exports_external.literal(1),
|
|
62450
|
+
features: exports_external.record(exports_external.string(), exports_external.boolean())
|
|
62451
|
+
}));
|
|
62452
|
+
RuntimeCommandDescriptorSchema = lazySchema(() => exports_external.object({
|
|
62453
|
+
name: exports_external.string(),
|
|
62454
|
+
aliases: exports_external.array(exports_external.string()),
|
|
62455
|
+
description: exports_external.string(),
|
|
62456
|
+
argumentHint: exports_external.string(),
|
|
62457
|
+
executionKind: exports_external.enum(["prompt", "local", "local-jsx"]),
|
|
62458
|
+
surface: exports_external.enum(["prompt", "panel", "action", "terminal_only"]),
|
|
62459
|
+
origin: exports_external.string(),
|
|
62460
|
+
available: exports_external.boolean(),
|
|
62461
|
+
unavailableReason: exports_external.string().optional(),
|
|
62462
|
+
workflow: exports_external.boolean(),
|
|
62463
|
+
sensitive: exports_external.boolean()
|
|
62464
|
+
}));
|
|
62465
|
+
RuntimeToolDescriptorSchema = lazySchema(() => exports_external.object({
|
|
62466
|
+
name: exports_external.string(),
|
|
62467
|
+
aliases: exports_external.array(exports_external.string()),
|
|
62468
|
+
source: exports_external.enum(["builtin", "mcp", "lsp"]),
|
|
62469
|
+
serverName: exports_external.string().optional(),
|
|
62470
|
+
inputSchema: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
62471
|
+
deferred: exports_external.boolean(),
|
|
62472
|
+
alwaysLoad: exports_external.boolean(),
|
|
62473
|
+
requiresUserInteraction: exports_external.boolean()
|
|
62474
|
+
}));
|
|
62475
|
+
RuntimeAgentDescriptorSchema = lazySchema(() => exports_external.object({
|
|
62476
|
+
name: exports_external.string(),
|
|
62477
|
+
description: exports_external.string(),
|
|
62478
|
+
source: exports_external.string(),
|
|
62479
|
+
model: exports_external.string().optional(),
|
|
62480
|
+
background: exports_external.boolean(),
|
|
62481
|
+
tools: exports_external.array(exports_external.string()),
|
|
62482
|
+
disallowedTools: exports_external.array(exports_external.string()),
|
|
62483
|
+
skills: exports_external.array(exports_external.string()),
|
|
62484
|
+
plugin: exports_external.string().optional()
|
|
62485
|
+
}));
|
|
62486
|
+
RuntimePluginDescriptorSchema = lazySchema(() => exports_external.object({
|
|
62487
|
+
name: exports_external.string(),
|
|
62488
|
+
description: exports_external.string(),
|
|
62489
|
+
version: exports_external.string().optional(),
|
|
62490
|
+
source: exports_external.string(),
|
|
62491
|
+
enabled: exports_external.boolean(),
|
|
62492
|
+
builtin: exports_external.boolean(),
|
|
62493
|
+
components: exports_external.array(exports_external.enum(["commands", "agents", "skills", "hooks", "mcp", "lsp", "settings"]))
|
|
62494
|
+
}));
|
|
62495
|
+
RuntimeSkillDescriptorSchema = lazySchema(() => exports_external.object({
|
|
62496
|
+
name: exports_external.string(),
|
|
62497
|
+
description: exports_external.string(),
|
|
62498
|
+
source: exports_external.string(),
|
|
62499
|
+
version: exports_external.string().optional(),
|
|
62500
|
+
workflow: exports_external.boolean(),
|
|
62501
|
+
context: exports_external.enum(["inline", "fork"]).optional(),
|
|
62502
|
+
agent: exports_external.string().optional()
|
|
62503
|
+
}));
|
|
62504
|
+
RuntimeTaskActivitySchema = lazySchema(() => exports_external.object({
|
|
62505
|
+
id: exports_external.string(),
|
|
62506
|
+
label: exports_external.string(),
|
|
62507
|
+
toolName: exports_external.string().optional(),
|
|
62508
|
+
timestamp: exports_external.number(),
|
|
62509
|
+
kind: exports_external.enum(["tool", "search", "read", "thinking", "status"]).optional()
|
|
62510
|
+
}));
|
|
62511
|
+
RuntimeTaskCapabilitiesSchema = lazySchema(() => exports_external.object({
|
|
62512
|
+
canStop: exports_external.boolean(),
|
|
62513
|
+
canSendMessage: exports_external.boolean(),
|
|
62514
|
+
hasTranscript: exports_external.boolean(),
|
|
62515
|
+
hasOutput: exports_external.boolean()
|
|
62516
|
+
}));
|
|
62517
|
+
RuntimeBackgroundTaskSchema = lazySchema(() => exports_external.object({
|
|
62518
|
+
key: exports_external.string(),
|
|
62519
|
+
taskId: exports_external.string(),
|
|
62520
|
+
sourceSessionId: exports_external.string(),
|
|
62521
|
+
type: exports_external.enum([
|
|
62522
|
+
"local_agent",
|
|
62523
|
+
"in_process_teammate",
|
|
62524
|
+
"local_shell",
|
|
62525
|
+
"remote_agent",
|
|
62526
|
+
"external_agent",
|
|
62527
|
+
"local_workflow",
|
|
62528
|
+
"monitor_mcp",
|
|
62529
|
+
"dream",
|
|
62530
|
+
"unknown"
|
|
62531
|
+
]),
|
|
62532
|
+
rawType: exports_external.string().optional(),
|
|
62533
|
+
group: exports_external.enum(["agents", "shells", "workflows", "remote", "monitors", "other"]),
|
|
62534
|
+
description: exports_external.string(),
|
|
62535
|
+
prompt: exports_external.string().optional(),
|
|
62536
|
+
agentId: exports_external.string().optional(),
|
|
62537
|
+
agentName: exports_external.string().optional(),
|
|
62538
|
+
status: exports_external.enum(["pending", "running", "waiting", "completed", "failed", "stopped"]),
|
|
62539
|
+
executionMode: exports_external.enum(["foreground", "background"]),
|
|
62540
|
+
startedAt: exports_external.number(),
|
|
62541
|
+
updatedAt: exports_external.number(),
|
|
62542
|
+
currentActivity: exports_external.string().optional(),
|
|
62543
|
+
recentActivities: exports_external.array(RuntimeTaskActivitySchema()),
|
|
62544
|
+
model: exports_external.string().optional(),
|
|
62545
|
+
provider: exports_external.string().optional(),
|
|
62546
|
+
tokenCount: exports_external.number(),
|
|
62547
|
+
toolCount: exports_external.number(),
|
|
62548
|
+
result: exports_external.string().optional(),
|
|
62549
|
+
error: exports_external.string().optional(),
|
|
62550
|
+
unread: exports_external.boolean(),
|
|
62551
|
+
capabilities: RuntimeTaskCapabilitiesSchema(),
|
|
62552
|
+
workflowProgress: exports_external.array(exports_external.object({
|
|
62553
|
+
label: exports_external.string(),
|
|
62554
|
+
status: exports_external.string().optional(),
|
|
62555
|
+
detail: exports_external.string().optional()
|
|
62556
|
+
})).optional()
|
|
62557
|
+
}));
|
|
62558
|
+
RuntimeInferenceSnapshotSchema = lazySchema(() => exports_external.object({
|
|
62559
|
+
model: exports_external.string(),
|
|
62560
|
+
supportsEffort: exports_external.boolean(),
|
|
62561
|
+
supportedLevels: exports_external.array(exports_external.enum(["low", "medium", "high", "max"])),
|
|
62562
|
+
effort: exports_external.union([exports_external.enum(["low", "medium", "high", "max"]), exports_external.number()]).nullable(),
|
|
62563
|
+
effortEnvOverride: exports_external.string().nullable(),
|
|
62564
|
+
supportsThinking: exports_external.boolean(),
|
|
62565
|
+
thinkingEnabled: exports_external.boolean()
|
|
62566
|
+
}));
|
|
62567
|
+
RuntimeSnapshotSchema = lazySchema(() => exports_external.object({
|
|
62568
|
+
capabilities: RuntimeCapabilitiesSchema(),
|
|
62569
|
+
revision: exports_external.number().int().nonnegative(),
|
|
62570
|
+
product: exports_external.enum(["cli", "rayucode", "sdk"]),
|
|
62571
|
+
session: exports_external.object({
|
|
62572
|
+
id: exports_external.string(),
|
|
62573
|
+
status: exports_external.enum(["idle", "running", "requires_action"])
|
|
62574
|
+
}),
|
|
62575
|
+
commands: exports_external.array(RuntimeCommandDescriptorSchema()),
|
|
62576
|
+
tools: exports_external.array(RuntimeToolDescriptorSchema()),
|
|
62577
|
+
agents: exports_external.array(RuntimeAgentDescriptorSchema()),
|
|
62578
|
+
plugins: exports_external.array(RuntimePluginDescriptorSchema()),
|
|
62579
|
+
skills: exports_external.array(RuntimeSkillDescriptorSchema()),
|
|
62580
|
+
workflows: exports_external.array(RuntimeSkillDescriptorSchema()),
|
|
62581
|
+
tasks: exports_external.array(RuntimeBackgroundTaskSchema()),
|
|
62582
|
+
mcpServers: exports_external.array(McpServerStatusSchema()),
|
|
62583
|
+
inference: RuntimeInferenceSnapshotSchema(),
|
|
62584
|
+
account: AccountInfoSchema(),
|
|
62585
|
+
outputStyle: exports_external.string(),
|
|
62586
|
+
availableOutputStyles: exports_external.array(exports_external.string()),
|
|
62587
|
+
permissionMode: PermissionModeSchema(),
|
|
62588
|
+
bridges: exports_external.object({
|
|
62589
|
+
telegramAttached: exports_external.boolean(),
|
|
62590
|
+
webBridgeEnabled: exports_external.boolean(),
|
|
62591
|
+
webBridgeConnected: exports_external.boolean(),
|
|
62592
|
+
remoteSessionConnected: exports_external.boolean()
|
|
62593
|
+
})
|
|
62594
|
+
}));
|
|
62447
62595
|
SDKControlInitializeResponseSchema = lazySchema(() => exports_external.object({
|
|
62448
62596
|
commands: exports_external.array(SlashCommandSchema()),
|
|
62449
62597
|
agents: exports_external.array(AgentInfoSchema()),
|
|
@@ -62452,7 +62600,8 @@ var init_controlSchemas = __esm(() => {
|
|
|
62452
62600
|
models: exports_external.array(ModelInfoSchema()),
|
|
62453
62601
|
account: AccountInfoSchema(),
|
|
62454
62602
|
pid: exports_external.number().optional().describe("@internal CLI process PID for tmux socket isolation"),
|
|
62455
|
-
fast_mode_state: FastModeStateSchema().optional()
|
|
62603
|
+
fast_mode_state: FastModeStateSchema().optional(),
|
|
62604
|
+
runtime: RuntimeSnapshotSchema().optional().describe("Shared runtime snapshot requested by non-terminal first-party clients.")
|
|
62456
62605
|
}).describe("Response from session initialization with available commands, models, and account info."));
|
|
62457
62606
|
SDKControlInterruptRequestSchema = lazySchema(() => exports_external.object({
|
|
62458
62607
|
subtype: exports_external.literal("interrupt")
|
|
@@ -62630,8 +62779,17 @@ var init_controlSchemas = __esm(() => {
|
|
|
62630
62779
|
source: exports_external.string().optional()
|
|
62631
62780
|
})),
|
|
62632
62781
|
mcpServers: exports_external.array(McpServerStatusSchema()),
|
|
62633
|
-
error_count: exports_external.number()
|
|
62782
|
+
error_count: exports_external.number(),
|
|
62783
|
+
runtimeCommands: exports_external.array(exports_external.unknown()).optional(),
|
|
62784
|
+
runtimeTools: exports_external.array(exports_external.unknown()).optional()
|
|
62634
62785
|
}).describe("Refreshed commands, agents, plugins, and MCP server status after reload."));
|
|
62786
|
+
SDKControlInstallSkillRequestSchema = lazySchema(() => exports_external.object({
|
|
62787
|
+
subtype: exports_external.literal("install_skill"),
|
|
62788
|
+
source: exports_external.string().min(1),
|
|
62789
|
+
overwrite: exports_external.boolean().optional()
|
|
62790
|
+
}));
|
|
62791
|
+
SDKControlGetRuntimeSnapshotRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("get_runtime_snapshot") }));
|
|
62792
|
+
SDKControlGetRuntimeSnapshotResponseSchema = lazySchema(() => exports_external.object({ runtime: RuntimeSnapshotSchema() }));
|
|
62635
62793
|
SDKControlMcpReconnectRequestSchema = lazySchema(() => exports_external.object({
|
|
62636
62794
|
subtype: exports_external.literal("mcp_reconnect"),
|
|
62637
62795
|
serverName: exports_external.string()
|
|
@@ -62664,6 +62822,27 @@ var init_controlSchemas = __esm(() => {
|
|
|
62664
62822
|
subtype: exports_external.literal("set_effort"),
|
|
62665
62823
|
effort: exports_external.enum(["low", "medium", "high", "max"]).nullable()
|
|
62666
62824
|
}));
|
|
62825
|
+
SDKControlSetThinkingRequestSchema = lazySchema(() => exports_external.object({
|
|
62826
|
+
subtype: exports_external.literal("set_thinking"),
|
|
62827
|
+
enabled: exports_external.boolean()
|
|
62828
|
+
}));
|
|
62829
|
+
SDKControlEndSessionRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("end_session"), reason: exports_external.string().optional() }));
|
|
62830
|
+
SDKControlChannelEnableRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("channel_enable"), serverName: exports_external.string() }));
|
|
62831
|
+
SDKControlMcpAuthenticateRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("mcp_authenticate"), serverName: exports_external.string() }));
|
|
62832
|
+
SDKControlMcpOAuthCallbackRequestSchema = lazySchema(() => exports_external.object({
|
|
62833
|
+
subtype: exports_external.literal("mcp_oauth_callback_url"),
|
|
62834
|
+
serverName: exports_external.string(),
|
|
62835
|
+
callbackUrl: exports_external.string()
|
|
62836
|
+
}));
|
|
62837
|
+
SDKControlMcpClearAuthRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("mcp_clear_auth"), serverName: exports_external.string() }));
|
|
62838
|
+
SDKControlGenerateSessionTitleRequestSchema = lazySchema(() => exports_external.object({
|
|
62839
|
+
subtype: exports_external.literal("generate_session_title"),
|
|
62840
|
+
description: exports_external.string(),
|
|
62841
|
+
persist: exports_external.boolean().optional()
|
|
62842
|
+
}));
|
|
62843
|
+
SDKControlSideQuestionRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("side_question"), question: exports_external.string() }));
|
|
62844
|
+
SDKControlRemoteControlRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("remote_control"), enabled: exports_external.boolean() }));
|
|
62845
|
+
SDKControlSetProactiveRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("set_proactive"), enabled: exports_external.boolean() }));
|
|
62667
62846
|
SDKControlGetSettingsRequestSchema = lazySchema(() => exports_external.object({
|
|
62668
62847
|
subtype: exports_external.literal("get_settings")
|
|
62669
62848
|
}).describe("Returns the effective merged settings and the raw per-source settings."));
|
|
@@ -62721,6 +62900,8 @@ var init_controlSchemas = __esm(() => {
|
|
|
62721
62900
|
SDKControlSeedReadStateRequestSchema(),
|
|
62722
62901
|
SDKControlMcpSetServersRequestSchema(),
|
|
62723
62902
|
SDKControlReloadPluginsRequestSchema(),
|
|
62903
|
+
SDKControlInstallSkillRequestSchema(),
|
|
62904
|
+
SDKControlGetRuntimeSnapshotRequestSchema(),
|
|
62724
62905
|
SDKControlMcpReconnectRequestSchema(),
|
|
62725
62906
|
SDKControlMcpToggleRequestSchema(),
|
|
62726
62907
|
SDKControlStopTaskRequestSchema(),
|
|
@@ -62728,6 +62909,16 @@ var init_controlSchemas = __esm(() => {
|
|
|
62728
62909
|
SDKControlApplyFlagSettingsRequestSchema(),
|
|
62729
62910
|
SDKControlGetSettingsRequestSchema(),
|
|
62730
62911
|
SDKControlSetEffortRequestSchema(),
|
|
62912
|
+
SDKControlSetThinkingRequestSchema(),
|
|
62913
|
+
SDKControlEndSessionRequestSchema(),
|
|
62914
|
+
SDKControlChannelEnableRequestSchema(),
|
|
62915
|
+
SDKControlMcpAuthenticateRequestSchema(),
|
|
62916
|
+
SDKControlMcpOAuthCallbackRequestSchema(),
|
|
62917
|
+
SDKControlMcpClearAuthRequestSchema(),
|
|
62918
|
+
SDKControlGenerateSessionTitleRequestSchema(),
|
|
62919
|
+
SDKControlSideQuestionRequestSchema(),
|
|
62920
|
+
SDKControlRemoteControlRequestSchema(),
|
|
62921
|
+
SDKControlSetProactiveRequestSchema(),
|
|
62731
62922
|
SDKControlElicitationRequestSchema()
|
|
62732
62923
|
]));
|
|
62733
62924
|
SDKControlRequestSchema = lazySchema(() => exports_external.object({
|
|
@@ -138299,7 +138490,7 @@ var init_isEqual = __esm(() => {
|
|
|
138299
138490
|
|
|
138300
138491
|
// src/utils/userAgent.ts
|
|
138301
138492
|
function getRayuUserAgent() {
|
|
138302
|
-
return `rayu/${"2.0.
|
|
138493
|
+
return `rayu/${"2.0.10"}`;
|
|
138303
138494
|
}
|
|
138304
138495
|
var getClaudeCodeUserAgent;
|
|
138305
138496
|
var init_userAgent = __esm(() => {
|
|
@@ -138325,7 +138516,7 @@ function getUserAgent() {
|
|
|
138325
138516
|
const clientApp = process.env.RAYU_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}` : "";
|
|
138326
138517
|
const workload = getWorkload();
|
|
138327
138518
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
138328
|
-
return `rayu/${"2.0.
|
|
138519
|
+
return `rayu/${"2.0.10"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
138329
138520
|
}
|
|
138330
138521
|
function getMCPUserAgent() {
|
|
138331
138522
|
const parts = [];
|
|
@@ -138339,7 +138530,7 @@ function getMCPUserAgent() {
|
|
|
138339
138530
|
parts.push(`client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}`);
|
|
138340
138531
|
}
|
|
138341
138532
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
138342
|
-
return `rayu/${"2.0.
|
|
138533
|
+
return `rayu/${"2.0.10"}${suffix}`;
|
|
138343
138534
|
}
|
|
138344
138535
|
function getWebFetchUserAgent() {
|
|
138345
138536
|
return `Rayu-User (${getRayuUserAgent()})`;
|
|
@@ -149286,7 +149477,7 @@ var init_metadata = __esm(() => {
|
|
|
149286
149477
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
149287
149478
|
WHITESPACE_REGEX = /\s+/;
|
|
149288
149479
|
getVersionBase = memoize_default(() => {
|
|
149289
|
-
const match = "2.0.
|
|
149480
|
+
const match = "2.0.10".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
149290
149481
|
return match ? match[0] : undefined;
|
|
149291
149482
|
});
|
|
149292
149483
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -149325,7 +149516,7 @@ var init_metadata = __esm(() => {
|
|
|
149325
149516
|
},
|
|
149326
149517
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
149327
149518
|
isRayuAction: isEnvTruthy(process.env.RAYU_ACTION),
|
|
149328
|
-
version: "2.0.
|
|
149519
|
+
version: "2.0.10",
|
|
149329
149520
|
versionBase: getVersionBase(),
|
|
149330
149521
|
buildTime: "",
|
|
149331
149522
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
@@ -156719,7 +156910,7 @@ function getAttributionHeader(fingerprint2) {
|
|
|
156719
156910
|
if (!isAttributionHeaderEnabled()) {
|
|
156720
156911
|
return "";
|
|
156721
156912
|
}
|
|
156722
|
-
const version2 = `${"2.0.
|
|
156913
|
+
const version2 = `${"2.0.10"}.${fingerprint2}`;
|
|
156723
156914
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
156724
156915
|
const cch = "";
|
|
156725
156916
|
const workload = getWorkload();
|
|
@@ -318137,7 +318328,7 @@ function getTelemetryAttributes() {
|
|
|
318137
318328
|
attributes["session.id"] = sessionId;
|
|
318138
318329
|
}
|
|
318139
318330
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
318140
|
-
attributes["app.version"] = "2.0.
|
|
318331
|
+
attributes["app.version"] = "2.0.10";
|
|
318141
318332
|
}
|
|
318142
318333
|
const oauthAccount = getOauthAccountInfo();
|
|
318143
318334
|
if (oauthAccount) {
|
|
@@ -362121,7 +362312,7 @@ function getInstallationEnv() {
|
|
|
362121
362312
|
return;
|
|
362122
362313
|
}
|
|
362123
362314
|
function getClaudeCodeVersion() {
|
|
362124
|
-
return "2.0.
|
|
362315
|
+
return "2.0.10";
|
|
362125
362316
|
}
|
|
362126
362317
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
362127
362318
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -365097,7 +365288,7 @@ function computeFingerprint(messageText, version2) {
|
|
|
365097
365288
|
}
|
|
365098
365289
|
function computeFingerprintFromMessages(messages) {
|
|
365099
365290
|
const firstMessageText = extractFirstMessageText(messages);
|
|
365100
|
-
return computeFingerprint(firstMessageText, "2.0.
|
|
365291
|
+
return computeFingerprint(firstMessageText, "2.0.10");
|
|
365101
365292
|
}
|
|
365102
365293
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
365103
365294
|
var init_fingerprint = () => {};
|
|
@@ -365139,7 +365330,7 @@ async function sideQuery(opts) {
|
|
|
365139
365330
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
365140
365331
|
}
|
|
365141
365332
|
const messageText = extractFirstUserMessageText(messages);
|
|
365142
|
-
const fingerprint2 = computeFingerprint(messageText, "2.0.
|
|
365333
|
+
const fingerprint2 = computeFingerprint(messageText, "2.0.10");
|
|
365143
365334
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
365144
365335
|
const systemBlocks = [
|
|
365145
365336
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -402007,7 +402198,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
402007
402198
|
const client = new Client({
|
|
402008
402199
|
name: "claude-code",
|
|
402009
402200
|
title: "RAYU",
|
|
402010
|
-
version: "2.0.
|
|
402201
|
+
version: "2.0.10",
|
|
402011
402202
|
description: "Anthropic's agentic coding tool",
|
|
402012
402203
|
websiteUrl: PRODUCT_URL
|
|
402013
402204
|
}, {
|
|
@@ -402324,7 +402515,7 @@ var init_client5 = __esm(() => {
|
|
|
402324
402515
|
const client = new Client({
|
|
402325
402516
|
name: "claude-code",
|
|
402326
402517
|
title: "RAYU",
|
|
402327
|
-
version: "2.0.
|
|
402518
|
+
version: "2.0.10",
|
|
402328
402519
|
description: "Anthropic's agentic coding tool",
|
|
402329
402520
|
websiteUrl: PRODUCT_URL
|
|
402330
402521
|
}, {
|
|
@@ -427984,6 +428175,14 @@ ${result.result}`
|
|
|
427984
428175
|
});
|
|
427985
428176
|
|
|
427986
428177
|
// src/skills/installSkill.ts
|
|
428178
|
+
var exports_installSkill = {};
|
|
428179
|
+
__export(exports_installSkill, {
|
|
428180
|
+
sanitizeSkillName: () => sanitizeSkillName,
|
|
428181
|
+
installSkillFromSource: () => installSkillFromSource,
|
|
428182
|
+
getUserSkillsDir: () => getUserSkillsDir,
|
|
428183
|
+
classifySource: () => classifySource,
|
|
428184
|
+
InstallSkillError: () => InstallSkillError
|
|
428185
|
+
});
|
|
427987
428186
|
import { randomUUID as randomUUID18 } from "crypto";
|
|
427988
428187
|
import { cp, mkdir as mkdir17, mkdtemp as mkdtemp3, readFile as readFile25, readdir as readdir16, rename as rename6, rm as rm11, stat as stat25, writeFile as writeFile19 } from "fs/promises";
|
|
427989
428188
|
import { homedir as homedir21, tmpdir as tmpdir11 } from "os";
|
|
@@ -462530,7 +462729,7 @@ async function handshake(peer) {
|
|
|
462530
462729
|
clientInfo: {
|
|
462531
462730
|
name: "rayu_cli",
|
|
462532
462731
|
title: "RAYU CLI",
|
|
462533
|
-
version: typeof MACRO !== "undefined" ? "2.0.
|
|
462732
|
+
version: typeof MACRO !== "undefined" ? "2.0.10" : "0.0.0"
|
|
462534
462733
|
},
|
|
462535
462734
|
capabilities: { experimentalApi: false }
|
|
462536
462735
|
};
|
|
@@ -493868,9 +494067,9 @@ async function assertMinVersion() {
|
|
|
493868
494067
|
if (false) {}
|
|
493869
494068
|
try {
|
|
493870
494069
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
493871
|
-
if (versionConfig.minVersion && lt("2.0.
|
|
494070
|
+
if (versionConfig.minVersion && lt("2.0.10", versionConfig.minVersion)) {
|
|
493872
494071
|
console.error(`
|
|
493873
|
-
It looks like your version of RAYU (${"2.0.
|
|
494072
|
+
It looks like your version of RAYU (${"2.0.10"}) needs an update.
|
|
493874
494073
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
493875
494074
|
|
|
493876
494075
|
To update, please run:
|
|
@@ -494034,7 +494233,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
494034
494233
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
494035
494234
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
494036
494235
|
pid: process.pid,
|
|
494037
|
-
currentVersion: "2.0.
|
|
494236
|
+
currentVersion: "2.0.10"
|
|
494038
494237
|
});
|
|
494039
494238
|
return "in_progress";
|
|
494040
494239
|
}
|
|
@@ -494043,7 +494242,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
494043
494242
|
if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
|
|
494044
494243
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
494045
494244
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
494046
|
-
currentVersion: "2.0.
|
|
494245
|
+
currentVersion: "2.0.10"
|
|
494047
494246
|
});
|
|
494048
494247
|
console.error(`
|
|
494049
494248
|
Error: Windows NPM detected in WSL
|
|
@@ -494692,7 +494891,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
494692
494891
|
}
|
|
494693
494892
|
async function getDoctorDiagnostic() {
|
|
494694
494893
|
const installationType = await getCurrentInstallationType();
|
|
494695
|
-
const version2 = typeof MACRO !== "undefined" ? "2.0.
|
|
494894
|
+
const version2 = typeof MACRO !== "undefined" ? "2.0.10" : "unknown";
|
|
494696
494895
|
const installationPath = await getInstallationPath();
|
|
494697
494896
|
const invokedBinary = getInvokedBinary();
|
|
494698
494897
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -495488,8 +495687,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
495488
495687
|
const maxVersion = await getMaxVersion();
|
|
495489
495688
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
495490
495689
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
495491
|
-
if (gte("2.0.
|
|
495492
|
-
logForDebugging(`Native installer: current version ${"2.0.
|
|
495690
|
+
if (gte("2.0.10", maxVersion)) {
|
|
495691
|
+
logForDebugging(`Native installer: current version ${"2.0.10"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
495493
495692
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
495494
495693
|
latency_ms: Date.now() - startTime2,
|
|
495495
495694
|
max_version: maxVersion,
|
|
@@ -495500,7 +495699,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
495500
495699
|
version2 = maxVersion;
|
|
495501
495700
|
}
|
|
495502
495701
|
}
|
|
495503
|
-
if (!forceReinstall && version2 === "2.0.
|
|
495702
|
+
if (!forceReinstall && version2 === "2.0.10" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
|
|
495504
495703
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
495505
495704
|
logEvent("tengu_native_update_complete", {
|
|
495506
495705
|
latency_ms: Date.now() - startTime2,
|
|
@@ -496708,7 +496907,7 @@ function buildPrimarySection() {
|
|
|
496708
496907
|
});
|
|
496709
496908
|
return [{
|
|
496710
496909
|
label: "Version",
|
|
496711
|
-
value: "2.0.
|
|
496910
|
+
value: "2.0.10"
|
|
496712
496911
|
}, {
|
|
496713
496912
|
label: "Session name",
|
|
496714
496913
|
value: nameValue
|
|
@@ -500391,7 +500590,7 @@ function Config({
|
|
|
500391
500590
|
}
|
|
500392
500591
|
})
|
|
500393
500592
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime168.jsx(ChannelDowngradeDialog, {
|
|
500394
|
-
currentVersion: "2.0.
|
|
500593
|
+
currentVersion: "2.0.10",
|
|
500395
500594
|
onChoice: (choice) => {
|
|
500396
500595
|
setShowSubmenu(null);
|
|
500397
500596
|
setTabsHidden(false);
|
|
@@ -500403,7 +500602,7 @@ function Config({
|
|
|
500403
500602
|
autoUpdatesChannel: "stable"
|
|
500404
500603
|
};
|
|
500405
500604
|
if (choice === "stay") {
|
|
500406
|
-
newSettings.minimumVersion = "2.0.
|
|
500605
|
+
newSettings.minimumVersion = "2.0.10";
|
|
500407
500606
|
}
|
|
500408
500607
|
updateSettingsForSource("userSettings", newSettings);
|
|
500409
500608
|
setSettingsData((prev_27) => ({
|
|
@@ -508464,7 +508663,7 @@ function HelpV2(t0) {
|
|
|
508464
508663
|
let t6;
|
|
508465
508664
|
if ($3[31] !== tabs) {
|
|
508466
508665
|
t6 = /* @__PURE__ */ jsx_runtime195.jsx(Tabs, {
|
|
508467
|
-
title: `Rayu-CLI v${"2.0.
|
|
508666
|
+
title: `Rayu-CLI v${"2.0.10"}`,
|
|
508468
508667
|
color: "professionalBlue",
|
|
508469
508668
|
defaultTab: "general",
|
|
508470
508669
|
children: tabs
|
|
@@ -529774,7 +529973,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
|
|
|
529774
529973
|
}
|
|
529775
529974
|
return [];
|
|
529776
529975
|
}
|
|
529777
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "2.0.
|
|
529976
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "2.0.10") {
|
|
529778
529977
|
if (false) {}
|
|
529779
529978
|
const cachedChangelog = await getStoredChangelog();
|
|
529780
529979
|
if (lastSeenVersion !== currentVersion || !cachedChangelog) {
|
|
@@ -529787,7 +529986,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "2.0.1") {
|
|
|
529787
529986
|
releaseNotes
|
|
529788
529987
|
};
|
|
529789
529988
|
}
|
|
529790
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "2.0.
|
|
529989
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "2.0.10") {
|
|
529791
529990
|
if (false) {}
|
|
529792
529991
|
const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
|
|
529793
529992
|
return {
|
|
@@ -529915,7 +530114,7 @@ function getRecentActivitySync() {
|
|
|
529915
530114
|
return cachedActivity;
|
|
529916
530115
|
}
|
|
529917
530116
|
function getLogoDisplayData() {
|
|
529918
|
-
const version2 = process.env.DEMO_VERSION ?? "2.0.
|
|
530117
|
+
const version2 = process.env.DEMO_VERSION ?? "2.0.10";
|
|
529919
530118
|
const serverUrl = getDirectConnectServerUrl();
|
|
529920
530119
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
529921
530120
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -531127,7 +531326,7 @@ function LogoV2() {
|
|
|
531127
531326
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
531128
531327
|
t2 = () => {
|
|
531129
531328
|
const currentConfig = getGlobalConfig();
|
|
531130
|
-
if (currentConfig.lastReleaseNotesSeen === "2.0.
|
|
531329
|
+
if (currentConfig.lastReleaseNotesSeen === "2.0.10") {
|
|
531131
531330
|
return;
|
|
531132
531331
|
}
|
|
531133
531332
|
saveGlobalConfig(_temp327);
|
|
@@ -531606,7 +531805,7 @@ function LogoV2() {
|
|
|
531606
531805
|
t24 = $3[61];
|
|
531607
531806
|
}
|
|
531608
531807
|
const _latestNpm = getCachedLatestNpmVersionSync();
|
|
531609
|
-
const _updateFeeds = _latestNpm && gt(_latestNpm, "2.0.
|
|
531808
|
+
const _updateFeeds = _latestNpm && gt(_latestNpm, "2.0.10") ? [createUpdateAvailableFeed("2.0.10", _latestNpm)] : [];
|
|
531610
531809
|
const t25 = layoutMode === "horizontal" && /* @__PURE__ */ jsx_runtime236.jsx(FeedColumn, {
|
|
531611
531810
|
feeds: showOnboarding ? [createProjectOnboardingFeed(getSteps()), createRecentActivityFeed(activities)] : showGuestPassesUpsell ? [createRecentActivityFeed(activities), createGuestPassesFeed()] : showOverageCreditUpsell ? [createRecentActivityFeed(activities), createOverageCreditFeed()] : [createRecentActivityFeed(activities), ..._updateFeeds, createWhatsNewFeed(changelog)],
|
|
531612
531811
|
maxWidth: rightWidth
|
|
@@ -531806,12 +532005,12 @@ function LogoV2() {
|
|
|
531806
532005
|
return t41;
|
|
531807
532006
|
}
|
|
531808
532007
|
function _temp327(current) {
|
|
531809
|
-
if (current.lastReleaseNotesSeen === "2.0.
|
|
532008
|
+
if (current.lastReleaseNotesSeen === "2.0.10") {
|
|
531810
532009
|
return current;
|
|
531811
532010
|
}
|
|
531812
532011
|
return {
|
|
531813
532012
|
...current,
|
|
531814
|
-
lastReleaseNotesSeen: "2.0.
|
|
532013
|
+
lastReleaseNotesSeen: "2.0.10"
|
|
531815
532014
|
};
|
|
531816
532015
|
}
|
|
531817
532016
|
function _temp241(s_0) {
|
|
@@ -557845,7 +558044,7 @@ function createRayuMcpServer(options) {
|
|
|
557845
558044
|
commandsPromise ??= getCommands(options.cwd);
|
|
557846
558045
|
return commandsPromise;
|
|
557847
558046
|
};
|
|
557848
|
-
const server = new Server({ name: RAYU_MCP_SERVER_NAME, version: "2.0.
|
|
558047
|
+
const server = new Server({ name: RAYU_MCP_SERVER_NAME, version: "2.0.10" }, { capabilities: { tools: {}, prompts: {} } });
|
|
557849
558048
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
557850
558049
|
const toolPermissionContext = getEmptyToolPermissionContext();
|
|
557851
558050
|
const allTools = getTools(toolPermissionContext);
|
|
@@ -557945,7 +558144,7 @@ async function pingRayuMcpServer(cwd2) {
|
|
|
557945
558144
|
const server = createRayuMcpServer2({ cwd: cwd2, debug: false, verbose: false });
|
|
557946
558145
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
557947
558146
|
await server.connect(serverTransport);
|
|
557948
|
-
client = new Client({ name: `${RAYU_MCP_SERVER_NAME}-healthcheck`, version: "2.0.
|
|
558147
|
+
client = new Client({ name: `${RAYU_MCP_SERVER_NAME}-healthcheck`, version: "2.0.10" });
|
|
557949
558148
|
await client.connect(clientTransport);
|
|
557950
558149
|
const tools = await client.listTools();
|
|
557951
558150
|
let promptCount = 0;
|
|
@@ -558649,7 +558848,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
558649
558848
|
smapsRollup,
|
|
558650
558849
|
platform: process.platform,
|
|
558651
558850
|
nodeVersion: process.version,
|
|
558652
|
-
ccVersion: "2.0.
|
|
558851
|
+
ccVersion: "2.0.10"
|
|
558653
558852
|
};
|
|
558654
558853
|
}
|
|
558655
558854
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -559171,7 +559370,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
559171
559370
|
var call53 = async () => {
|
|
559172
559371
|
return {
|
|
559173
559372
|
type: "text",
|
|
559174
|
-
value: "2.0.
|
|
559373
|
+
value: "2.0.10"
|
|
559175
559374
|
};
|
|
559176
559375
|
}, version2, version_default;
|
|
559177
559376
|
var init_version = __esm(() => {
|
|
@@ -567359,7 +567558,7 @@ var init_user = __esm(() => {
|
|
|
567359
567558
|
deviceId,
|
|
567360
567559
|
sessionId: getSessionId(),
|
|
567361
567560
|
email: getEmail(),
|
|
567362
|
-
appVersion: "2.0.
|
|
567561
|
+
appVersion: "2.0.10",
|
|
567363
567562
|
platform: getHostPlatformForAnalytics(),
|
|
567364
567563
|
organizationUuid,
|
|
567365
567564
|
accountUuid,
|
|
@@ -575027,7 +575226,7 @@ function generateHtmlReport(data, insights) {
|
|
|
575027
575226
|
</html>`;
|
|
575028
575227
|
}
|
|
575029
575228
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
575030
|
-
const version3 = typeof MACRO !== "undefined" ? "2.0.
|
|
575229
|
+
const version3 = typeof MACRO !== "undefined" ? "2.0.10" : "unknown";
|
|
575031
575230
|
const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
|
|
575032
575231
|
const facets_summary = {
|
|
575033
575232
|
total: facets.size,
|
|
@@ -575606,6 +575805,7 @@ Want to dig into any section or try one of the suggestions?
|
|
|
575606
575805
|
var exports_commands = {};
|
|
575607
575806
|
__export(exports_commands, {
|
|
575608
575807
|
meetsAvailabilityRequirement: () => meetsAvailabilityRequirement,
|
|
575808
|
+
isNonInteractiveCommand: () => isNonInteractiveCommand,
|
|
575609
575809
|
isCommandEnabled: () => isCommandEnabled,
|
|
575610
575810
|
isBridgeSafeCommand: () => isBridgeSafeCommand,
|
|
575611
575811
|
hasCommand: () => hasCommand,
|
|
@@ -575618,6 +575818,7 @@ __export(exports_commands, {
|
|
|
575618
575818
|
formatDescriptionWithSource: () => formatDescriptionWithSource,
|
|
575619
575819
|
findCommand: () => findCommand,
|
|
575620
575820
|
filterCommandsForRemoteMode: () => filterCommandsForRemoteMode,
|
|
575821
|
+
filterCommandsForNonInteractive: () => filterCommandsForNonInteractive,
|
|
575621
575822
|
clearCommandsCache: () => clearCommandsCache,
|
|
575622
575823
|
clearCommandMemoizationCaches: () => clearCommandMemoizationCaches,
|
|
575623
575824
|
builtInCommandNames: () => builtInCommandNames,
|
|
@@ -575708,6 +575909,12 @@ function isBridgeSafeCommand(cmd) {
|
|
|
575708
575909
|
return true;
|
|
575709
575910
|
return BRIDGE_SAFE_COMMANDS.has(cmd);
|
|
575710
575911
|
}
|
|
575912
|
+
function isNonInteractiveCommand(command12) {
|
|
575913
|
+
return command12.type === "prompt" && !command12.disableNonInteractive || command12.type === "local" && command12.supportsNonInteractive;
|
|
575914
|
+
}
|
|
575915
|
+
function filterCommandsForNonInteractive(commands) {
|
|
575916
|
+
return commands.filter(isNonInteractiveCommand);
|
|
575917
|
+
}
|
|
575711
575918
|
function filterCommandsForRemoteMode(commands) {
|
|
575712
575919
|
return commands.filter((cmd) => REMOTE_SAFE_COMMANDS.has(cmd));
|
|
575713
575920
|
}
|
|
@@ -578951,7 +579158,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
578951
579158
|
init_settings2();
|
|
578952
579159
|
init_slowOperations();
|
|
578953
579160
|
init_uuid();
|
|
578954
|
-
VERSION5 = typeof MACRO !== "undefined" ? "2.0.
|
|
579161
|
+
VERSION5 = typeof MACRO !== "undefined" ? "2.0.10" : "unknown";
|
|
578955
579162
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
578956
579163
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
578957
579164
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -580169,7 +580376,7 @@ var init_filesystem = __esm(() => {
|
|
|
580169
580376
|
});
|
|
580170
580377
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
580171
580378
|
const nonce = randomBytes20(16).toString("hex");
|
|
580172
|
-
return join157(getClaudeTempDir(), "bundled-skills", "2.0.
|
|
580379
|
+
return join157(getClaudeTempDir(), "bundled-skills", "2.0.10", nonce);
|
|
580173
580380
|
});
|
|
580174
580381
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
580175
580382
|
});
|
|
@@ -602556,7 +602763,7 @@ __export(exports_update, {
|
|
|
602556
602763
|
});
|
|
602557
602764
|
import { spawnSync as spawnSync10 } from "child_process";
|
|
602558
602765
|
async function update() {
|
|
602559
|
-
writeToStdout(`Current version: ${"2.0.
|
|
602766
|
+
writeToStdout(`Current version: ${"2.0.10"}
|
|
602560
602767
|
`);
|
|
602561
602768
|
if (await updateInstallerManaged())
|
|
602562
602769
|
return;
|
|
@@ -602652,18 +602859,18 @@ Manual check: npm view ${"@rayu-dev/rayu-cli"} version
|
|
|
602652
602859
|
process.exit(1);
|
|
602653
602860
|
return;
|
|
602654
602861
|
}
|
|
602655
|
-
if (latestVersion === "2.0.
|
|
602862
|
+
if (latestVersion === "2.0.10") {
|
|
602656
602863
|
writeToStdout(source_default.green(`
|
|
602657
|
-
Rayu CLI is up to date (${"2.0.
|
|
602864
|
+
Rayu CLI is up to date (${"2.0.10"})
|
|
602658
602865
|
`));
|
|
602659
602866
|
process.exit(0);
|
|
602660
602867
|
}
|
|
602661
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"2.0.
|
|
602868
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"2.0.10"})
|
|
602662
602869
|
`);
|
|
602663
602870
|
writeToStdout(`Installing update...
|
|
602664
602871
|
|
|
602665
602872
|
`);
|
|
602666
|
-
const versionBeforeInstall = getInstalledVersion() ?? "2.0.
|
|
602873
|
+
const versionBeforeInstall = getInstalledVersion() ?? "2.0.10";
|
|
602667
602874
|
const installSpec = buildPinnedSpec("@rayu-dev/rayu-cli", latestVersion) ?? `${"@rayu-dev/rayu-cli"}@latest`;
|
|
602668
602875
|
if (!await acquireUpdateLock()) {
|
|
602669
602876
|
process.stderr.write(source_default.yellow(`
|
|
@@ -602781,14 +602988,14 @@ async function updateNativeBinary() {
|
|
|
602781
602988
|
} catch {
|
|
602782
602989
|
latestVersion = "";
|
|
602783
602990
|
}
|
|
602784
|
-
if (latestVersion && latestVersion === "2.0.
|
|
602991
|
+
if (latestVersion && latestVersion === "2.0.10") {
|
|
602785
602992
|
writeToStdout(source_default.green(`
|
|
602786
|
-
Rayu CLI is up to date (2.0.
|
|
602993
|
+
Rayu CLI is up to date (2.0.10)
|
|
602787
602994
|
`));
|
|
602788
602995
|
process.exit(0);
|
|
602789
602996
|
}
|
|
602790
602997
|
if (latestVersion) {
|
|
602791
|
-
writeToStdout(`New version available: ${latestVersion} (current: 2.0.
|
|
602998
|
+
writeToStdout(`New version available: ${latestVersion} (current: 2.0.10)
|
|
602792
602999
|
`);
|
|
602793
603000
|
}
|
|
602794
603001
|
writeToStdout(`Downloading and installing update...
|
|
@@ -602803,13 +603010,13 @@ Rayu CLI is up to date (2.0.1)
|
|
|
602803
603010
|
return;
|
|
602804
603011
|
}
|
|
602805
603012
|
writeToStdout(source_default.green(`
|
|
602806
|
-
Rayu CLI is up to date (2.0.
|
|
603013
|
+
Rayu CLI is up to date (2.0.10)
|
|
602807
603014
|
`));
|
|
602808
603015
|
process.exit(0);
|
|
602809
603016
|
}
|
|
602810
603017
|
const updatedTo = result.latestVersion ?? latestVersion ?? "latest";
|
|
602811
603018
|
writeToStdout(source_default.green(`
|
|
602812
|
-
Successfully updated from 2.0.
|
|
603019
|
+
Successfully updated from 2.0.10 to ${updatedTo}
|
|
602813
603020
|
`));
|
|
602814
603021
|
writeToStdout(`Restart your terminal to use the new version.
|
|
602815
603022
|
`);
|
|
@@ -603281,7 +603488,7 @@ async function uninstall(args = []) {
|
|
|
603281
603488
|
const keepData = args.includes("--keep-data");
|
|
603282
603489
|
const dryRun = args.includes("--dry-run");
|
|
603283
603490
|
const plan2 = await planUninstall({ keepData });
|
|
603284
|
-
writeToStdout(`Rayu CLI ${"2.0.
|
|
603491
|
+
writeToStdout(`Rayu CLI ${"2.0.10"}
|
|
603285
603492
|
|
|
603286
603493
|
`);
|
|
603287
603494
|
for (const line of describePlan(plan2))
|
|
@@ -603604,7 +603811,7 @@ function showFirstRunWelcome() {
|
|
|
603604
603811
|
`);
|
|
603605
603812
|
try {
|
|
603606
603813
|
mkdirSync19(getRayuConfigHomeDir(), { recursive: true });
|
|
603607
|
-
writeFileSync22(markerPath(), "2.0.
|
|
603814
|
+
writeFileSync22(markerPath(), "2.0.10", "utf8");
|
|
603608
603815
|
} catch {}
|
|
603609
603816
|
}
|
|
603610
603817
|
var init_firstRun = __esm(() => {
|
|
@@ -618674,7 +618881,7 @@ async function initializeBetaTracing(resource) {
|
|
|
618674
618881
|
});
|
|
618675
618882
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
618676
618883
|
setLoggerProvider(loggerProvider);
|
|
618677
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "2.0.
|
|
618884
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "2.0.10");
|
|
618678
618885
|
setEventLogger(eventLogger);
|
|
618679
618886
|
process.on("beforeExit", async () => {
|
|
618680
618887
|
await loggerProvider?.forceFlush();
|
|
@@ -618714,7 +618921,7 @@ async function initializeTelemetry() {
|
|
|
618714
618921
|
const platform4 = getPlatform();
|
|
618715
618922
|
const baseAttributes = {
|
|
618716
618923
|
[import_semantic_conventions.ATTR_SERVICE_NAME]: "claude-code",
|
|
618717
|
-
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "2.0.
|
|
618924
|
+
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "2.0.10"
|
|
618718
618925
|
};
|
|
618719
618926
|
if (platform4 === "wsl") {
|
|
618720
618927
|
const wslVersion = getWslVersion();
|
|
@@ -618759,7 +618966,7 @@ async function initializeTelemetry() {
|
|
|
618759
618966
|
} catch {}
|
|
618760
618967
|
};
|
|
618761
618968
|
registerCleanup(shutdownTelemetry2);
|
|
618762
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "2.0.
|
|
618969
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "2.0.10");
|
|
618763
618970
|
}
|
|
618764
618971
|
const meterProvider = new import_sdk_metrics2.MeterProvider({
|
|
618765
618972
|
resource,
|
|
@@ -618779,7 +618986,7 @@ async function initializeTelemetry() {
|
|
|
618779
618986
|
});
|
|
618780
618987
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
618781
618988
|
setLoggerProvider(loggerProvider);
|
|
618782
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "2.0.
|
|
618989
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "2.0.10");
|
|
618783
618990
|
setEventLogger(eventLogger);
|
|
618784
618991
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
618785
618992
|
process.on("beforeExit", async () => {
|
|
@@ -618841,7 +619048,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
618841
619048
|
}
|
|
618842
619049
|
};
|
|
618843
619050
|
registerCleanup(shutdownTelemetry);
|
|
618844
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "2.0.
|
|
619051
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "2.0.10");
|
|
618845
619052
|
}
|
|
618846
619053
|
async function flushTelemetry() {
|
|
618847
619054
|
const meterProvider = getMeterProvider();
|
|
@@ -620349,7 +620556,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
620349
620556
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
620350
620557
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
620351
620558
|
betas: getSdkBetas(),
|
|
620352
|
-
claude_code_version: "2.0.
|
|
620559
|
+
claude_code_version: "2.0.10",
|
|
620353
620560
|
output_style: outputStyle2,
|
|
620354
620561
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
620355
620562
|
skills: inputs.skills.filter((s2) => s2.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -623176,10 +623383,17 @@ function remoteStreamDelta(delta) {
|
|
|
623176
623383
|
function remoteStreamEnd() {
|
|
623177
623384
|
notifyIpcPeers(IPC_STREAM_END);
|
|
623178
623385
|
}
|
|
623386
|
+
function getActivityHistory() {
|
|
623387
|
+
return activityHistory;
|
|
623388
|
+
}
|
|
623179
623389
|
function remoteActivity(messages) {
|
|
623390
|
+
activityHistory.push(messages);
|
|
623391
|
+
if (activityHistory.length > MAX_ACTIVITY_HISTORY_TURNS) {
|
|
623392
|
+
activityHistory.splice(0, activityHistory.length - MAX_ACTIVITY_HISTORY_TURNS);
|
|
623393
|
+
}
|
|
623180
623394
|
notifyIpcPeers(IPC_ACTIVITY, { messages });
|
|
623181
623395
|
}
|
|
623182
|
-
var IPC_PERMISSION_REQUEST = "telegram:permission-request", IPC_PERMISSION_CANCEL = "telegram:permission-cancel", IPC_PERMISSION_RESOLVED = "telegram:permission-resolved", IPC_STREAM_START = "telegram:stream-start", IPC_STREAM_DELTA = "telegram:stream-delta", IPC_STREAM_THINKING = "telegram:stream-thinking", IPC_STREAM_END = "telegram:stream-end", IPC_ACTIVITY = "telegram:activity", IPC_PERMISSION_DECISION = "telegram:permission-decision", IPC_ATTACH = "telegram:attach", IPC_DETACH = "telegram:detach", pendingDecisions, remoteCallbacks, attachedPeers, remoteChanged, subscribeToRemoteBridge;
|
|
623396
|
+
var IPC_PERMISSION_REQUEST = "telegram:permission-request", IPC_PERMISSION_CANCEL = "telegram:permission-cancel", IPC_PERMISSION_RESOLVED = "telegram:permission-resolved", IPC_STREAM_START = "telegram:stream-start", IPC_STREAM_DELTA = "telegram:stream-delta", IPC_STREAM_THINKING = "telegram:stream-thinking", IPC_STREAM_END = "telegram:stream-end", IPC_ACTIVITY = "telegram:activity", IPC_PERMISSION_DECISION = "telegram:permission-decision", IPC_ATTACH = "telegram:attach", IPC_DETACH = "telegram:detach", pendingDecisions, remoteCallbacks, attachedPeers, remoteChanged, subscribeToRemoteBridge, MAX_ACTIVITY_HISTORY_TURNS = 200, activityHistory;
|
|
623183
623397
|
var init_telegramRemoteBridge = __esm(() => {
|
|
623184
623398
|
init_bridgePermissionCallbacks();
|
|
623185
623399
|
init_sessionServer();
|
|
@@ -623188,6 +623402,7 @@ var init_telegramRemoteBridge = __esm(() => {
|
|
|
623188
623402
|
attachedPeers = new Set;
|
|
623189
623403
|
remoteChanged = createSignal();
|
|
623190
623404
|
subscribeToRemoteBridge = remoteChanged.subscribe;
|
|
623405
|
+
activityHistory = [];
|
|
623191
623406
|
});
|
|
623192
623407
|
|
|
623193
623408
|
// src/telegram/telegramLeaderLink.ts
|
|
@@ -623648,7 +623863,7 @@ function getDeviceFacts() {
|
|
|
623648
623863
|
return {
|
|
623649
623864
|
platform: process.platform,
|
|
623650
623865
|
arch: process.arch,
|
|
623651
|
-
version: "2.0.
|
|
623866
|
+
version: "2.0.10"
|
|
623652
623867
|
};
|
|
623653
623868
|
}
|
|
623654
623869
|
var cached3 = null;
|
|
@@ -625463,9 +625678,160 @@ var init_taskHistory = __esm(() => {
|
|
|
625463
625678
|
});
|
|
625464
625679
|
|
|
625465
625680
|
// src/vscode/shared/attachChannels.ts
|
|
625466
|
-
var IPC_TASK_SNAPSHOT = "rayucode:task-snapshot", IPC_TASK_STATE_CHANGED = "rayucode:task-state-changed", IPC_TASK_STOP = "rayucode:task-stop", IPC_TASK_MESSAGE = "rayucode:task-message";
|
|
625467
|
-
|
|
625468
|
-
|
|
625681
|
+
var IPC_TASK_SNAPSHOT = "rayucode:task-snapshot", IPC_TASK_STATE_CHANGED = "rayucode:task-state-changed", IPC_TASK_STOP = "rayucode:task-stop", IPC_TASK_MESSAGE = "rayucode:task-message", IPC_SIDE_QUESTION = "rayucode:side-question", IPC_CAPABILITIES = "rayucode:capabilities", IPC_CONVERSATION_SNAPSHOT = "rayucode:conversation-snapshot", IPC_RUNTIME_SNAPSHOT = "rayucode:runtime-snapshot", IPC_RUNTIME_ACTION = "rayucode:runtime-action", IPC_COMMAND_REGISTRY = "rayucode:command-registry", ATTACHED_RUNTIME_CAPABILITIES;
|
|
625682
|
+
var init_attachChannels = __esm(() => {
|
|
625683
|
+
ATTACHED_RUNTIME_CAPABILITIES = {
|
|
625684
|
+
protocolVersion: 1,
|
|
625685
|
+
features: {
|
|
625686
|
+
chat: true,
|
|
625687
|
+
streaming: true,
|
|
625688
|
+
steering: true,
|
|
625689
|
+
queuedMessages: true,
|
|
625690
|
+
sideQuestions: true,
|
|
625691
|
+
conversationSnapshot: true,
|
|
625692
|
+
runtimeSnapshot: true,
|
|
625693
|
+
configurationActions: true,
|
|
625694
|
+
taskInspection: true,
|
|
625695
|
+
taskMessaging: true,
|
|
625696
|
+
permissions: true,
|
|
625697
|
+
mcpInteractions: false,
|
|
625698
|
+
hookInteractions: false
|
|
625699
|
+
}
|
|
625700
|
+
};
|
|
625701
|
+
});
|
|
625702
|
+
|
|
625703
|
+
// src/vscode/host/panel/commandRegistry.ts
|
|
625704
|
+
async function buildCommandRegistry(cwd2) {
|
|
625705
|
+
const { getCommands: getCommands2 } = await Promise.resolve().then(() => (init_commands(), exports_commands));
|
|
625706
|
+
const commands = await getCommands2(cwd2 ?? getOriginalCwd());
|
|
625707
|
+
return {
|
|
625708
|
+
version: 1,
|
|
625709
|
+
commands: commands.map((cmd) => toCommandMetadata(cmd))
|
|
625710
|
+
};
|
|
625711
|
+
}
|
|
625712
|
+
function toCommandMetadata(cmd) {
|
|
625713
|
+
const name = cmd.name;
|
|
625714
|
+
const category = CATEGORY_MAP[name] ?? "advanced";
|
|
625715
|
+
const icon = ICON_MAP[name];
|
|
625716
|
+
const displayName = typeof cmd.userFacingName === "function" ? cmd.userFacingName() : cmd.userFacingName ?? titleCase(name);
|
|
625717
|
+
return {
|
|
625718
|
+
name,
|
|
625719
|
+
displayName,
|
|
625720
|
+
description: cmd.description ?? "",
|
|
625721
|
+
category,
|
|
625722
|
+
icon,
|
|
625723
|
+
requiresSession: true,
|
|
625724
|
+
requiresAuth: false,
|
|
625725
|
+
isPaid: false,
|
|
625726
|
+
isEnabled: true
|
|
625727
|
+
};
|
|
625728
|
+
}
|
|
625729
|
+
function titleCase(name) {
|
|
625730
|
+
return name.replace(/[-_]/g, " ").replace(/\b\w/g, (c4) => c4.toUpperCase());
|
|
625731
|
+
}
|
|
625732
|
+
var CATEGORY_MAP, ICON_MAP;
|
|
625733
|
+
var init_commandRegistry = __esm(() => {
|
|
625734
|
+
init_state();
|
|
625735
|
+
CATEGORY_MAP = {
|
|
625736
|
+
read: "file_operations",
|
|
625737
|
+
write: "file_operations",
|
|
625738
|
+
edit: "file_operations",
|
|
625739
|
+
glob: "file_operations",
|
|
625740
|
+
grep: "file_operations",
|
|
625741
|
+
diff: "file_operations",
|
|
625742
|
+
clear: "conversation",
|
|
625743
|
+
compact: "conversation",
|
|
625744
|
+
context: "conversation",
|
|
625745
|
+
export: "conversation",
|
|
625746
|
+
summary: "conversation",
|
|
625747
|
+
undo: "conversation",
|
|
625748
|
+
mcp: "mcp",
|
|
625749
|
+
"mcp-list": "mcp",
|
|
625750
|
+
"mcp-resources": "mcp",
|
|
625751
|
+
task: "tasks",
|
|
625752
|
+
tasks: "tasks",
|
|
625753
|
+
todo: "tasks",
|
|
625754
|
+
"todo-write": "tasks",
|
|
625755
|
+
plan: "tasks",
|
|
625756
|
+
model: "settings",
|
|
625757
|
+
config: "settings",
|
|
625758
|
+
connect: "settings",
|
|
625759
|
+
permissions: "settings",
|
|
625760
|
+
effort: "settings",
|
|
625761
|
+
thinking: "settings",
|
|
625762
|
+
status: "debug",
|
|
625763
|
+
sessions: "debug",
|
|
625764
|
+
logs: "debug"
|
|
625765
|
+
};
|
|
625766
|
+
ICON_MAP = {
|
|
625767
|
+
read: "$(file)",
|
|
625768
|
+
write: "$(pencil)",
|
|
625769
|
+
edit: "$(edit)",
|
|
625770
|
+
glob: "$(search)",
|
|
625771
|
+
grep: "$(search-fuzzy)",
|
|
625772
|
+
model: "$(hubot)",
|
|
625773
|
+
config: "$(gear)",
|
|
625774
|
+
connect: "$(plug)",
|
|
625775
|
+
mcp: "$(extensions)",
|
|
625776
|
+
tasks: "$(checklist)",
|
|
625777
|
+
task: "$(add)",
|
|
625778
|
+
plan: "$(project)",
|
|
625779
|
+
clear: "$(trash)",
|
|
625780
|
+
compact: "$(fold-down)",
|
|
625781
|
+
status: "$(info)",
|
|
625782
|
+
sessions: "$(list-unordered)",
|
|
625783
|
+
diff: "$(diff)",
|
|
625784
|
+
permissions: "$(shield)",
|
|
625785
|
+
effort: "$(dashboard)",
|
|
625786
|
+
thinking: "$(lightbulb)"
|
|
625787
|
+
};
|
|
625788
|
+
});
|
|
625789
|
+
|
|
625790
|
+
// src/runtime/taskProjection.ts
|
|
625791
|
+
function normalizeType(value) {
|
|
625792
|
+
if (value === "local_bash")
|
|
625793
|
+
return "local_shell";
|
|
625794
|
+
switch (value) {
|
|
625795
|
+
case "local_agent":
|
|
625796
|
+
case "in_process_teammate":
|
|
625797
|
+
case "local_shell":
|
|
625798
|
+
case "remote_agent":
|
|
625799
|
+
case "external_agent":
|
|
625800
|
+
case "local_workflow":
|
|
625801
|
+
case "monitor_mcp":
|
|
625802
|
+
case "dream":
|
|
625803
|
+
return value;
|
|
625804
|
+
default:
|
|
625805
|
+
return "unknown";
|
|
625806
|
+
}
|
|
625807
|
+
}
|
|
625808
|
+
function groupFor(type) {
|
|
625809
|
+
switch (type) {
|
|
625810
|
+
case "local_agent":
|
|
625811
|
+
case "in_process_teammate":
|
|
625812
|
+
return "agents";
|
|
625813
|
+
case "local_shell":
|
|
625814
|
+
return "shells";
|
|
625815
|
+
case "local_workflow":
|
|
625816
|
+
return "workflows";
|
|
625817
|
+
case "remote_agent":
|
|
625818
|
+
case "external_agent":
|
|
625819
|
+
return "remote";
|
|
625820
|
+
case "monitor_mcp":
|
|
625821
|
+
return "monitors";
|
|
625822
|
+
default:
|
|
625823
|
+
return "other";
|
|
625824
|
+
}
|
|
625825
|
+
}
|
|
625826
|
+
function taskCapabilities(type, running) {
|
|
625827
|
+
const agent2 = type === "local_agent" || type === "in_process_teammate";
|
|
625828
|
+
return {
|
|
625829
|
+
canStop: running,
|
|
625830
|
+
canSendMessage: false,
|
|
625831
|
+
hasTranscript: agent2,
|
|
625832
|
+
hasOutput: type === "local_shell" || type === "monitor_mcp" || type === "local_workflow"
|
|
625833
|
+
};
|
|
625834
|
+
}
|
|
625469
625835
|
function projectTaskState(sourceSessionId, task) {
|
|
625470
625836
|
const record3 = task;
|
|
625471
625837
|
const rawType = String(task.type);
|
|
@@ -625521,42 +625887,11 @@ function projectTaskState(sourceSessionId, task) {
|
|
|
625521
625887
|
error: stringValue(record3.error),
|
|
625522
625888
|
unread: terminal && task.notified !== true,
|
|
625523
625889
|
capabilities: {
|
|
625524
|
-
|
|
625525
|
-
|
|
625526
|
-
hasTranscript: type === "local_agent" || type === "in_process_teammate",
|
|
625527
|
-
hasOutput: type === "local_shell" || type === "local_workflow" || type === "monitor_mcp"
|
|
625890
|
+
...taskCapabilities(type, task.status === "running"),
|
|
625891
|
+
canStop: !terminal && task.status === "running"
|
|
625528
625892
|
}
|
|
625529
625893
|
};
|
|
625530
625894
|
}
|
|
625531
|
-
function normalizeType(value) {
|
|
625532
|
-
if (value === "local_bash")
|
|
625533
|
-
return "local_shell";
|
|
625534
|
-
switch (value) {
|
|
625535
|
-
case "local_agent":
|
|
625536
|
-
case "in_process_teammate":
|
|
625537
|
-
case "remote_agent":
|
|
625538
|
-
case "external_agent":
|
|
625539
|
-
case "local_workflow":
|
|
625540
|
-
case "monitor_mcp":
|
|
625541
|
-
case "dream":
|
|
625542
|
-
return value;
|
|
625543
|
-
default:
|
|
625544
|
-
return "unknown";
|
|
625545
|
-
}
|
|
625546
|
-
}
|
|
625547
|
-
function groupFor(type) {
|
|
625548
|
-
if (type === "local_agent" || type === "in_process_teammate")
|
|
625549
|
-
return "agents";
|
|
625550
|
-
if (type === "local_shell")
|
|
625551
|
-
return "shells";
|
|
625552
|
-
if (type === "local_workflow")
|
|
625553
|
-
return "workflows";
|
|
625554
|
-
if (type === "remote_agent" || type === "external_agent")
|
|
625555
|
-
return "remote";
|
|
625556
|
-
if (type === "monitor_mcp")
|
|
625557
|
-
return "monitors";
|
|
625558
|
-
return "other";
|
|
625559
|
-
}
|
|
625560
625895
|
function objectValue(value) {
|
|
625561
625896
|
return value && typeof value === "object" ? value : undefined;
|
|
625562
625897
|
}
|
|
@@ -625590,10 +625925,31 @@ function safeResult(value) {
|
|
|
625590
625925
|
function useRayucodeTaskBridge() {
|
|
625591
625926
|
const store = useAppStateStore();
|
|
625592
625927
|
import_react192.useEffect(() => {
|
|
625928
|
+
const unregisterCapabilities = registerIpcHandler(IPC_CAPABILITIES, () => ATTACHED_RUNTIME_CAPABILITIES);
|
|
625593
625929
|
const unregisterSnapshot = registerIpcHandler(IPC_TASK_SNAPSHOT, () => ({
|
|
625594
625930
|
version: 1,
|
|
625595
625931
|
tasks: Object.values(store.getState().tasks ?? {}).map((task) => projectTaskState(getSessionId(), task))
|
|
625596
625932
|
}));
|
|
625933
|
+
const unregisterConversationSnapshot = registerIpcHandler(IPC_CONVERSATION_SNAPSHOT, () => ({
|
|
625934
|
+
version: 1,
|
|
625935
|
+
messages: getActivityHistory().flat()
|
|
625936
|
+
}));
|
|
625937
|
+
const unregisterRuntimeSnapshot = registerIpcHandler(IPC_RUNTIME_SNAPSHOT, () => buildRuntimeSnapshot(store.getState()));
|
|
625938
|
+
const unregisterCommandRegistry = registerIpcHandler(IPC_COMMAND_REGISTRY, async () => buildCommandRegistry());
|
|
625939
|
+
const unregisterRuntimeAction = registerIpcHandler(IPC_RUNTIME_ACTION, (payload) => {
|
|
625940
|
+
const req = payload;
|
|
625941
|
+
const requestId = typeof req?.requestId === "string" ? req.requestId : "";
|
|
625942
|
+
const action2 = req?.action;
|
|
625943
|
+
if (!action2 || typeof action2.type !== "string") {
|
|
625944
|
+
return { requestId, success: false, error: "Missing or invalid action." };
|
|
625945
|
+
}
|
|
625946
|
+
try {
|
|
625947
|
+
dispatchRuntimeAction(action2, store);
|
|
625948
|
+
return { requestId, success: true };
|
|
625949
|
+
} catch (error52) {
|
|
625950
|
+
return { requestId, success: false, error: String(error52) };
|
|
625951
|
+
}
|
|
625952
|
+
});
|
|
625597
625953
|
const unregisterStop = registerIpcHandler(IPC_TASK_STOP, async (payload) => {
|
|
625598
625954
|
const taskId = readTaskId(payload);
|
|
625599
625955
|
await stopTask(taskId, {
|
|
@@ -625619,6 +625975,24 @@ function useRayucodeTaskBridge() {
|
|
|
625619
625975
|
}
|
|
625620
625976
|
throw new Error("This task does not accept follow-up messages.");
|
|
625621
625977
|
});
|
|
625978
|
+
const unregisterSideQuestion = registerIpcHandler(IPC_SIDE_QUESTION, async (payload) => {
|
|
625979
|
+
const question = readSideQuestion(payload);
|
|
625980
|
+
const saved = getLastCacheSafeParams();
|
|
625981
|
+
if (!saved) {
|
|
625982
|
+
throw new Error("The attached session has not produced reusable conversation context yet. Try /btw again after its first response starts.");
|
|
625983
|
+
}
|
|
625984
|
+
const result = await runSideQuestion({
|
|
625985
|
+
question,
|
|
625986
|
+
cacheSafeParams: {
|
|
625987
|
+
...saved,
|
|
625988
|
+
toolUseContext: {
|
|
625989
|
+
...saved.toolUseContext,
|
|
625990
|
+
abortController: createAbortController()
|
|
625991
|
+
}
|
|
625992
|
+
}
|
|
625993
|
+
});
|
|
625994
|
+
return { response: result.response };
|
|
625995
|
+
});
|
|
625622
625996
|
const unsubscribeEvents = subscribeSdkEvents((event) => {
|
|
625623
625997
|
notifyIpcPeers(IPC_TASK_STATE_CHANGED, event);
|
|
625624
625998
|
});
|
|
@@ -625637,14 +626011,82 @@ function useRayucodeTaskBridge() {
|
|
|
625637
626011
|
});
|
|
625638
626012
|
});
|
|
625639
626013
|
return () => {
|
|
626014
|
+
unregisterCapabilities();
|
|
625640
626015
|
unregisterSnapshot();
|
|
626016
|
+
unregisterConversationSnapshot();
|
|
626017
|
+
unregisterRuntimeSnapshot();
|
|
626018
|
+
unregisterRuntimeAction();
|
|
626019
|
+
unregisterCommandRegistry();
|
|
625641
626020
|
unregisterStop();
|
|
625642
626021
|
unregisterMessage();
|
|
626022
|
+
unregisterSideQuestion();
|
|
625643
626023
|
unsubscribeEvents();
|
|
625644
626024
|
unsubscribeStore();
|
|
625645
626025
|
};
|
|
625646
626026
|
}, [store]);
|
|
625647
626027
|
}
|
|
626028
|
+
function dispatchRuntimeAction(action2, store) {
|
|
626029
|
+
switch (action2.type) {
|
|
626030
|
+
case "change_model":
|
|
626031
|
+
store.setState((s2) => ({ ...s2, mainLoopModel: { value: action2.modelId } }));
|
|
626032
|
+
break;
|
|
626033
|
+
case "toggle_thinking":
|
|
626034
|
+
store.setState((s2) => ({
|
|
626035
|
+
...s2,
|
|
626036
|
+
thinkingEnabled: action2.enabled
|
|
626037
|
+
}));
|
|
626038
|
+
break;
|
|
626039
|
+
case "set_effort":
|
|
626040
|
+
store.setState((s2) => ({ ...s2, effort: action2.effort }));
|
|
626041
|
+
break;
|
|
626042
|
+
case "update_permission_mode":
|
|
626043
|
+
store.setState((s2) => ({
|
|
626044
|
+
...s2,
|
|
626045
|
+
toolPermissionContext: {
|
|
626046
|
+
...s2.toolPermissionContext,
|
|
626047
|
+
permissionMode: action2.mode
|
|
626048
|
+
}
|
|
626049
|
+
}));
|
|
626050
|
+
break;
|
|
626051
|
+
case "reconnect_mcp":
|
|
626052
|
+
break;
|
|
626053
|
+
default: {
|
|
626054
|
+
const exhaustive = action2;
|
|
626055
|
+
throw new Error(`Unknown runtime action type: ${exhaustive.type}`);
|
|
626056
|
+
}
|
|
626057
|
+
}
|
|
626058
|
+
}
|
|
626059
|
+
function buildRuntimeSnapshot(appState) {
|
|
626060
|
+
const tasks2 = Object.values(appState.tasks ?? {});
|
|
626061
|
+
const totalTasks = tasks2.length;
|
|
626062
|
+
const completedTasks = tasks2.filter((t2) => t2.status === "completed").length;
|
|
626063
|
+
const currentTask2 = tasks2.find((t2) => t2.status === "in_progress")?.content ?? null;
|
|
626064
|
+
const model = appState.mainLoopModelForSession;
|
|
626065
|
+
const permContext = appState.toolPermissionContext;
|
|
626066
|
+
return {
|
|
626067
|
+
version: 1,
|
|
626068
|
+
sessionId: getSessionId(),
|
|
626069
|
+
timestamp: Date.now(),
|
|
626070
|
+
...model?.value ? {
|
|
626071
|
+
model: {
|
|
626072
|
+
id: String(model.value),
|
|
626073
|
+
providerId: "",
|
|
626074
|
+
displayName: String(model.value),
|
|
626075
|
+
supportsThinking: false
|
|
626076
|
+
}
|
|
626077
|
+
} : {},
|
|
626078
|
+
permissions: {
|
|
626079
|
+
mode: permContext?.permissionMode ?? "default",
|
|
626080
|
+
pendingCount: permContext?.pendingCount ?? 0
|
|
626081
|
+
},
|
|
626082
|
+
thinking: {
|
|
626083
|
+
enabled: Boolean(appState.thinkingEnabled),
|
|
626084
|
+
currentlyThinking: false
|
|
626085
|
+
},
|
|
626086
|
+
effort: appState.effort ?? null,
|
|
626087
|
+
taskList: totalTasks > 0 ? { totalTasks, completedTasks, currentTask: currentTask2 } : null
|
|
626088
|
+
};
|
|
626089
|
+
}
|
|
625648
626090
|
function readTaskId(payload) {
|
|
625649
626091
|
const taskId = payload?.taskId;
|
|
625650
626092
|
if (typeof taskId !== "string" || !taskId)
|
|
@@ -625657,6 +626099,13 @@ function readMessage(payload) {
|
|
|
625657
626099
|
throw new Error("Missing task message.");
|
|
625658
626100
|
return text4.trim();
|
|
625659
626101
|
}
|
|
626102
|
+
function readSideQuestion(payload) {
|
|
626103
|
+
const question = payload?.question;
|
|
626104
|
+
if (typeof question !== "string" || !question.trim()) {
|
|
626105
|
+
throw new Error("Missing side question.");
|
|
626106
|
+
}
|
|
626107
|
+
return question.trim();
|
|
626108
|
+
}
|
|
625660
626109
|
var import_react192;
|
|
625661
626110
|
var init_useRayucodeTaskBridge = __esm(() => {
|
|
625662
626111
|
init_state();
|
|
@@ -625666,7 +626115,13 @@ var init_useRayucodeTaskBridge = __esm(() => {
|
|
|
625666
626115
|
init_LocalAgentTask();
|
|
625667
626116
|
init_stopTask();
|
|
625668
626117
|
init_sdkEventQueue();
|
|
626118
|
+
init_abortController();
|
|
626119
|
+
init_forkedAgent();
|
|
626120
|
+
init_sideQuestion();
|
|
625669
626121
|
init_taskHistory();
|
|
626122
|
+
init_telegramRemoteBridge();
|
|
626123
|
+
init_attachChannels();
|
|
626124
|
+
init_commandRegistry();
|
|
625670
626125
|
import_react192 = __toESM(require_react(), 1);
|
|
625671
626126
|
});
|
|
625672
626127
|
|
|
@@ -644709,7 +645164,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
644709
645164
|
function getSemverPart(version3) {
|
|
644710
645165
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
644711
645166
|
}
|
|
644712
|
-
function useUpdateNotification(updatedVersion, initialVersion = "2.0.
|
|
645167
|
+
function useUpdateNotification(updatedVersion, initialVersion = "2.0.10") {
|
|
644713
645168
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react223.useState(() => getSemverPart(initialVersion));
|
|
644714
645169
|
if (!updatedVersion) {
|
|
644715
645170
|
return null;
|
|
@@ -644749,7 +645204,7 @@ function AutoUpdater({
|
|
|
644749
645204
|
return;
|
|
644750
645205
|
}
|
|
644751
645206
|
if (false) {}
|
|
644752
|
-
const currentVersion = "2.0.
|
|
645207
|
+
const currentVersion = "2.0.10";
|
|
644753
645208
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
644754
645209
|
let latestVersion = await getLatestVersion(channel2);
|
|
644755
645210
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -644967,12 +645422,12 @@ function NativeAutoUpdater({
|
|
|
644967
645422
|
logEvent("tengu_native_auto_updater_start", {});
|
|
644968
645423
|
try {
|
|
644969
645424
|
const maxVersion = await getMaxVersion();
|
|
644970
|
-
if (maxVersion && gt("2.0.
|
|
645425
|
+
if (maxVersion && gt("2.0.10", maxVersion)) {
|
|
644971
645426
|
const msg = await getMaxVersionMessage();
|
|
644972
645427
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
644973
645428
|
}
|
|
644974
645429
|
const result = await installLatest(channel2);
|
|
644975
|
-
const currentVersion = "2.0.
|
|
645430
|
+
const currentVersion = "2.0.10";
|
|
644976
645431
|
const latencyMs = Date.now() - startTime2;
|
|
644977
645432
|
if (result.lockFailed) {
|
|
644978
645433
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -645109,17 +645564,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
645109
645564
|
const maxVersion = await getMaxVersion();
|
|
645110
645565
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
645111
645566
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
645112
|
-
if (gte("2.0.
|
|
645113
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"2.0.
|
|
645567
|
+
if (gte("2.0.10", maxVersion)) {
|
|
645568
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"2.0.10"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
645114
645569
|
setUpdateAvailable(false);
|
|
645115
645570
|
return;
|
|
645116
645571
|
}
|
|
645117
645572
|
latest = maxVersion;
|
|
645118
645573
|
}
|
|
645119
|
-
const hasUpdate = latest && !gte("2.0.
|
|
645574
|
+
const hasUpdate = latest && !gte("2.0.10", latest) && !shouldSkipVersion(latest);
|
|
645120
645575
|
setUpdateAvailable(!!hasUpdate);
|
|
645121
645576
|
if (hasUpdate) {
|
|
645122
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"2.0.
|
|
645577
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"2.0.10"} -> ${latest}`);
|
|
645123
645578
|
}
|
|
645124
645579
|
};
|
|
645125
645580
|
$3[0] = t1;
|
|
@@ -645153,7 +645608,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
645153
645608
|
wrap: "truncate",
|
|
645154
645609
|
children: [
|
|
645155
645610
|
"currentVersion: ",
|
|
645156
|
-
"2.0.
|
|
645611
|
+
"2.0.10"
|
|
645157
645612
|
]
|
|
645158
645613
|
});
|
|
645159
645614
|
$3[3] = verbose;
|
|
@@ -645556,7 +646011,7 @@ function readNoticeEnvironment() {
|
|
|
645556
646011
|
function UpdateAvailableNotice({
|
|
645557
646012
|
detectInstallationType = getCurrentInstallationType,
|
|
645558
646013
|
fetchLatestVersion,
|
|
645559
|
-
currentVersion = "2.0.
|
|
646014
|
+
currentVersion = "2.0.10",
|
|
645560
646015
|
readEnvironment = readNoticeEnvironment
|
|
645561
646016
|
} = {}) {
|
|
645562
646017
|
const [latestVersion, setLatestVersion] = import_react230.useState(() => getCachedLatestNpmVersionSync());
|
|
@@ -653408,7 +653863,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
653408
653863
|
project_dir: getOriginalCwd(),
|
|
653409
653864
|
added_dirs: addedDirs
|
|
653410
653865
|
},
|
|
653411
|
-
version: "2.0.
|
|
653866
|
+
version: "2.0.10",
|
|
653412
653867
|
output_style: {
|
|
653413
653868
|
name: outputStyleName
|
|
653414
653869
|
},
|
|
@@ -664924,7 +665379,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
664924
665379
|
} catch {}
|
|
664925
665380
|
const data = {
|
|
664926
665381
|
trigger,
|
|
664927
|
-
version: "2.0.
|
|
665382
|
+
version: "2.0.10",
|
|
664928
665383
|
platform: process.platform,
|
|
664929
665384
|
transcript,
|
|
664930
665385
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -676096,6 +676551,80 @@ var init_bootstrap = __esm(() => {
|
|
|
676096
676551
|
}));
|
|
676097
676552
|
});
|
|
676098
676553
|
|
|
676554
|
+
// src/runtime/productPreferences.ts
|
|
676555
|
+
import { mkdirSync as mkdirSync25, readFileSync as readFileSync39, renameSync as renameSync2, writeFileSync as writeFileSync29, chmodSync as chmodSync13 } from "node:fs";
|
|
676556
|
+
import { dirname as dirname71, join as join185 } from "node:path";
|
|
676557
|
+
function hasRayucodePreferenceProfile() {
|
|
676558
|
+
return Boolean(process.env.RAYU_AUTH_CONFIG_DIR) || isRayucodeRuntime();
|
|
676559
|
+
}
|
|
676560
|
+
function isRayucodeRuntime() {
|
|
676561
|
+
return process.env.RAYU_CLIENT_PRODUCT === "rayucode";
|
|
676562
|
+
}
|
|
676563
|
+
function getRayucodePreferencesPath() {
|
|
676564
|
+
return join185(getRayuAuthConfigDir(), FILE_NAME4);
|
|
676565
|
+
}
|
|
676566
|
+
function isEffort(value2) {
|
|
676567
|
+
return value2 === "low" || value2 === "medium" || value2 === "high" || value2 === "max";
|
|
676568
|
+
}
|
|
676569
|
+
function isPermissionMode(value2) {
|
|
676570
|
+
return value2 === "default" || value2 === "acceptEdits" || value2 === "bypassPermissions" || value2 === "plan" || value2 === "auto" || value2 === "bubble" || value2 === "delegate" || value2 === "dontAsk" || value2 === "fullManage";
|
|
676571
|
+
}
|
|
676572
|
+
function readRayucodePreferences() {
|
|
676573
|
+
if (!hasRayucodePreferenceProfile())
|
|
676574
|
+
return {};
|
|
676575
|
+
try {
|
|
676576
|
+
const parsed = JSON.parse(readFileSync39(getRayucodePreferencesPath(), "utf8"));
|
|
676577
|
+
return {
|
|
676578
|
+
...isEffort(parsed.effort) ? { effort: parsed.effort } : {},
|
|
676579
|
+
...typeof parsed.thinkingEnabled === "boolean" ? { thinkingEnabled: parsed.thinkingEnabled } : {},
|
|
676580
|
+
...isPermissionMode(parsed.permissionMode) ? { permissionMode: parsed.permissionMode } : {}
|
|
676581
|
+
};
|
|
676582
|
+
} catch {
|
|
676583
|
+
return {};
|
|
676584
|
+
}
|
|
676585
|
+
}
|
|
676586
|
+
function initialEffortForProduct(cliValue) {
|
|
676587
|
+
return isRayucodeRuntime() ? readRayucodePreferences().effort : cliValue;
|
|
676588
|
+
}
|
|
676589
|
+
function initialThinkingForProduct(cliValue) {
|
|
676590
|
+
if (!isRayucodeRuntime())
|
|
676591
|
+
return cliValue;
|
|
676592
|
+
return readRayucodePreferences().thinkingEnabled ?? true;
|
|
676593
|
+
}
|
|
676594
|
+
function updateRayucodePreferences(patch2) {
|
|
676595
|
+
const current = readRayucodePreferences();
|
|
676596
|
+
if (!hasRayucodePreferenceProfile())
|
|
676597
|
+
return { error: null, value: current };
|
|
676598
|
+
const next = { ...current };
|
|
676599
|
+
for (const [key2, value2] of Object.entries(patch2)) {
|
|
676600
|
+
if (value2 === undefined)
|
|
676601
|
+
delete next[key2];
|
|
676602
|
+
else
|
|
676603
|
+
Object.assign(next, { [key2]: value2 });
|
|
676604
|
+
}
|
|
676605
|
+
const path24 = getRayucodePreferencesPath();
|
|
676606
|
+
const temporary = `${path24}.${process.pid}.${Date.now()}.tmp`;
|
|
676607
|
+
try {
|
|
676608
|
+
mkdirSync25(dirname71(path24), { recursive: true, mode: 448 });
|
|
676609
|
+
writeFileSync29(temporary, `${JSON.stringify(next, null, 2)}
|
|
676610
|
+
`, { mode: 384 });
|
|
676611
|
+
renameSync2(temporary, path24);
|
|
676612
|
+
try {
|
|
676613
|
+
chmodSync13(path24, 384);
|
|
676614
|
+
} catch {}
|
|
676615
|
+
return { error: null, value: next };
|
|
676616
|
+
} catch (cause) {
|
|
676617
|
+
return {
|
|
676618
|
+
error: cause instanceof Error ? cause : new Error(String(cause)),
|
|
676619
|
+
value: current
|
|
676620
|
+
};
|
|
676621
|
+
}
|
|
676622
|
+
}
|
|
676623
|
+
var FILE_NAME4 = "rayucode-preferences.json";
|
|
676624
|
+
var init_productPreferences = __esm(() => {
|
|
676625
|
+
init_envUtils();
|
|
676626
|
+
});
|
|
676627
|
+
|
|
676099
676628
|
// src/utils/warningHandler.ts
|
|
676100
676629
|
import { posix as posix9, win32 as win325 } from "path";
|
|
676101
676630
|
function isRunningFromBuildDirectory() {
|
|
@@ -676982,7 +677511,7 @@ function WelcomeV2() {
|
|
|
676982
677511
|
dimColor: true,
|
|
676983
677512
|
children: [
|
|
676984
677513
|
"v",
|
|
676985
|
-
"2.0.
|
|
677514
|
+
"2.0.10"
|
|
676986
677515
|
]
|
|
676987
677516
|
})
|
|
676988
677517
|
]
|
|
@@ -677989,7 +678518,7 @@ function completeOnboarding() {
|
|
|
677989
678518
|
saveGlobalConfig((current) => ({
|
|
677990
678519
|
...current,
|
|
677991
678520
|
hasCompletedOnboarding: true,
|
|
677992
|
-
lastOnboardingVersion: "2.0.
|
|
678521
|
+
lastOnboardingVersion: "2.0.10"
|
|
677993
678522
|
}));
|
|
677994
678523
|
}
|
|
677995
678524
|
function showDialog(root2, renderer) {
|
|
@@ -679143,7 +679672,7 @@ var exports_ResumeConversation = {};
|
|
|
679143
679672
|
__export(exports_ResumeConversation, {
|
|
679144
679673
|
ResumeConversation: () => ResumeConversation
|
|
679145
679674
|
});
|
|
679146
|
-
import { dirname as
|
|
679675
|
+
import { dirname as dirname72 } from "path";
|
|
679147
679676
|
function parsePrIdentifier(value2) {
|
|
679148
679677
|
const directNumber = parseInt(value2, 10);
|
|
679149
679678
|
if (!isNaN(directNumber) && directNumber > 0) {
|
|
@@ -679275,7 +679804,7 @@ function ResumeConversation({
|
|
|
679275
679804
|
}
|
|
679276
679805
|
if (false) {}
|
|
679277
679806
|
if (result_3.sessionId && !forkSession) {
|
|
679278
|
-
switchSession(asSessionId(result_3.sessionId), log_0.fullPath ?
|
|
679807
|
+
switchSession(asSessionId(result_3.sessionId), log_0.fullPath ? dirname72(log_0.fullPath) : null);
|
|
679279
679808
|
await renameRecordingForSession();
|
|
679280
679809
|
await resetSessionFilePointer();
|
|
679281
679810
|
restoreCostStateForSession(result_3.sessionId);
|
|
@@ -682552,7 +683081,7 @@ function parsePromptPayload(payload) {
|
|
|
682552
683081
|
if (typeof payload !== "object" || payload === null) {
|
|
682553
683082
|
throw new Error("prompt payload must be an object");
|
|
682554
683083
|
}
|
|
682555
|
-
const { value: value2, mode } = payload;
|
|
683084
|
+
const { value: value2, mode, priority, operationId } = payload;
|
|
682556
683085
|
const hasValue = typeof value2 === "string" && value2.length > 0 || Array.isArray(value2) && value2.length > 0;
|
|
682557
683086
|
if (!hasValue) {
|
|
682558
683087
|
throw new Error("prompt payload missing a non-empty `value`");
|
|
@@ -682560,7 +683089,18 @@ function parsePromptPayload(payload) {
|
|
|
682560
683089
|
if (mode !== "prompt" && mode !== "task-notification") {
|
|
682561
683090
|
throw new Error("prompt payload has an unsupported `mode`");
|
|
682562
683091
|
}
|
|
682563
|
-
|
|
683092
|
+
if (priority !== undefined && priority !== "now" && priority !== "next" && priority !== "later") {
|
|
683093
|
+
throw new Error("prompt payload has an unsupported `priority`");
|
|
683094
|
+
}
|
|
683095
|
+
if (operationId !== undefined && (typeof operationId !== "string" || !operationId)) {
|
|
683096
|
+
throw new Error("prompt payload has an invalid `operationId`");
|
|
683097
|
+
}
|
|
683098
|
+
return {
|
|
683099
|
+
value: value2,
|
|
683100
|
+
mode,
|
|
683101
|
+
...priority ? { priority } : {},
|
|
683102
|
+
...operationId ? { operationId } : {}
|
|
683103
|
+
};
|
|
682564
683104
|
}
|
|
682565
683105
|
function registerTelegramSessionHandlers() {
|
|
682566
683106
|
if (registered)
|
|
@@ -682568,9 +683108,9 @@ function registerTelegramSessionHandlers() {
|
|
|
682568
683108
|
registered = true;
|
|
682569
683109
|
registerIpcHandler(IPC_PROMPT, (payload) => {
|
|
682570
683110
|
const prompt = parsePromptPayload(payload);
|
|
682571
|
-
enqueue({ value: prompt.value, mode: prompt.mode });
|
|
683111
|
+
enqueue({ value: prompt.value, mode: prompt.mode, priority: prompt.priority });
|
|
682572
683112
|
logForDebugging(`[telegram-session] enqueued remote prompt (${prompt.mode})`);
|
|
682573
|
-
return { queued: true };
|
|
683113
|
+
return { queued: true, ...prompt.operationId ? { operationId: prompt.operationId } : {} };
|
|
682574
683114
|
});
|
|
682575
683115
|
registerIpcNotifyHandler(IPC_ATTACH, (_payload, peerId) => {
|
|
682576
683116
|
setRemotelyAttached(true, peerId);
|
|
@@ -682637,10 +683177,10 @@ var init_migrateAutoUpdatesToSettings = __esm(() => {
|
|
|
682637
683177
|
});
|
|
682638
683178
|
|
|
682639
683179
|
// src/migrations/migrateBedrockToUnifiedProvider.ts
|
|
682640
|
-
import { copyFileSync as copyFileSync4, existsSync as existsSync49, renameSync as
|
|
682641
|
-
import { join as
|
|
683180
|
+
import { copyFileSync as copyFileSync4, existsSync as existsSync49, renameSync as renameSync3, writeFileSync as writeFileSync30 } from "fs";
|
|
683181
|
+
import { join as join186 } from "path";
|
|
682642
683182
|
function configPath3() {
|
|
682643
|
-
return
|
|
683183
|
+
return join186(getRayuConfigHomeDir(), FILE_NAME5);
|
|
682644
683184
|
}
|
|
682645
683185
|
function needsBedrockUnification(cfg) {
|
|
682646
683186
|
return cfg.providers.some((p) => p.kind === "bedrock" && (p.bedrockApi !== undefined || LEGACY_BEDROCK_IDS.includes(p.id)));
|
|
@@ -682686,14 +683226,14 @@ function migrateBedrockToUnifiedProvider() {
|
|
|
682686
683226
|
const backup = `${path24}.bak-${Date.now()}`;
|
|
682687
683227
|
copyFileSync4(path24, backup);
|
|
682688
683228
|
const tmp = `${path24}.tmp-${process.pid}`;
|
|
682689
|
-
|
|
682690
|
-
|
|
683229
|
+
writeFileSync30(tmp, JSON.stringify(next, null, 2), { mode: 384 });
|
|
683230
|
+
renameSync3(tmp, path24);
|
|
682691
683231
|
_resetRayuConfigCache();
|
|
682692
683232
|
} catch (e2) {
|
|
682693
683233
|
reportIssue("rayu_config.bedrock_migration_failed", "Bedrock provider unification failed; leaving providers.json untouched", { error: e2 instanceof Error ? e2.message : String(e2) });
|
|
682694
683234
|
}
|
|
682695
683235
|
}
|
|
682696
|
-
var
|
|
683236
|
+
var FILE_NAME5 = "providers.json", LEGACY_BEDROCK_IDS, UNIFIED_BEDROCK_ID = "bedrock";
|
|
682697
683237
|
var init_migrateBedrockToUnifiedProvider = __esm(() => {
|
|
682698
683238
|
init_envUtils();
|
|
682699
683239
|
init_rayuConfig();
|
|
@@ -683008,12 +683548,12 @@ var init_createDirectConnectSession = __esm(() => {
|
|
|
683008
683548
|
});
|
|
683009
683549
|
|
|
683010
683550
|
// src/utils/errorLogSink.ts
|
|
683011
|
-
import { dirname as
|
|
683551
|
+
import { dirname as dirname73, join as join187 } from "path";
|
|
683012
683552
|
function getErrorsPath() {
|
|
683013
|
-
return
|
|
683553
|
+
return join187(CACHE_PATHS.errors(), DATE + ".jsonl");
|
|
683014
683554
|
}
|
|
683015
683555
|
function getMCPLogsPath(serverName) {
|
|
683016
|
-
return
|
|
683556
|
+
return join187(CACHE_PATHS.mcpLogs(serverName), DATE + ".jsonl");
|
|
683017
683557
|
}
|
|
683018
683558
|
function createJsonlWriter(options) {
|
|
683019
683559
|
const writer = createBufferedWriter(options);
|
|
@@ -683029,7 +683569,7 @@ function createJsonlWriter(options) {
|
|
|
683029
683569
|
function getLogWriter(path24) {
|
|
683030
683570
|
let writer = logWriters.get(path24);
|
|
683031
683571
|
if (!writer) {
|
|
683032
|
-
const dir =
|
|
683572
|
+
const dir = dirname73(path24);
|
|
683033
683573
|
writer = createJsonlWriter({
|
|
683034
683574
|
writeFn: (content) => {
|
|
683035
683575
|
try {
|
|
@@ -683057,7 +683597,7 @@ function appendToLog(path24, message) {
|
|
|
683057
683597
|
cwd: getFsImplementation().cwd(),
|
|
683058
683598
|
userType: "external",
|
|
683059
683599
|
sessionId: getSessionId(),
|
|
683060
|
-
version: "2.0.
|
|
683600
|
+
version: "2.0.10"
|
|
683061
683601
|
};
|
|
683062
683602
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
683063
683603
|
}
|
|
@@ -683348,7 +683888,7 @@ var init_sessionMemory = __esm(() => {
|
|
|
683348
683888
|
// src/utils/iTermBackup.ts
|
|
683349
683889
|
import { copyFile as copyFile13, stat as stat49 } from "fs/promises";
|
|
683350
683890
|
import { homedir as homedir41 } from "os";
|
|
683351
|
-
import { join as
|
|
683891
|
+
import { join as join188 } from "path";
|
|
683352
683892
|
function markITerm2SetupComplete() {
|
|
683353
683893
|
saveGlobalConfig((current) => ({
|
|
683354
683894
|
...current,
|
|
@@ -683363,7 +683903,7 @@ function getIterm2RecoveryInfo() {
|
|
|
683363
683903
|
};
|
|
683364
683904
|
}
|
|
683365
683905
|
function getITerm2PlistPath() {
|
|
683366
|
-
return
|
|
683906
|
+
return join188(homedir41(), "Library", "Preferences", "com.googlecode.iterm2.plist");
|
|
683367
683907
|
}
|
|
683368
683908
|
async function checkAndRestoreITerm2Backup() {
|
|
683369
683909
|
const { inProgress, backupPath } = getIterm2RecoveryInfo();
|
|
@@ -686792,7 +687332,7 @@ var init_idleTimeout = __esm(() => {
|
|
|
686792
687332
|
// src/bridge/inboundAttachments.ts
|
|
686793
687333
|
import { randomUUID as randomUUID53 } from "crypto";
|
|
686794
687334
|
import { mkdir as mkdir47, writeFile as writeFile51 } from "fs/promises";
|
|
686795
|
-
import { basename as basename63, join as
|
|
687335
|
+
import { basename as basename63, join as join189 } from "path";
|
|
686796
687336
|
function debug14(msg) {
|
|
686797
687337
|
logForDebugging(`[bridge:inbound-attach] ${msg}`);
|
|
686798
687338
|
}
|
|
@@ -686808,7 +687348,7 @@ function sanitizeFileName(name) {
|
|
|
686808
687348
|
return base2 || "attachment";
|
|
686809
687349
|
}
|
|
686810
687350
|
function uploadsDir() {
|
|
686811
|
-
return
|
|
687351
|
+
return join189(getRayuConfigHomeDir(), "uploads", getSessionId());
|
|
686812
687352
|
}
|
|
686813
687353
|
async function resolveOne(att) {
|
|
686814
687354
|
const token2 = getBridgeAccessToken();
|
|
@@ -686837,7 +687377,7 @@ async function resolveOne(att) {
|
|
|
686837
687377
|
const safeName = sanitizeFileName(att.file_name);
|
|
686838
687378
|
const prefix = (att.file_uuid.slice(0, 8) || randomUUID53().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
686839
687379
|
const dir = uploadsDir();
|
|
686840
|
-
const outPath =
|
|
687380
|
+
const outPath = join189(dir, `${prefix}-${safeName}`);
|
|
686841
687381
|
try {
|
|
686842
687382
|
await mkdir47(dir, { recursive: true });
|
|
686843
687383
|
await writeFile51(outPath, data);
|
|
@@ -686956,9 +687496,267 @@ var init_inferenceSettings = __esm(() => {
|
|
|
686956
687496
|
init_thinking();
|
|
686957
687497
|
});
|
|
686958
687498
|
|
|
687499
|
+
// src/runtime/catalog.ts
|
|
687500
|
+
function commandSurface(command12) {
|
|
687501
|
+
const name = getCommandName(command12);
|
|
687502
|
+
if (RAYUCODE_TERMINAL_ONLY_COMMANDS.has(name))
|
|
687503
|
+
return "terminal_only";
|
|
687504
|
+
if (command12.type === "prompt")
|
|
687505
|
+
return "prompt";
|
|
687506
|
+
if (PANEL_COMMANDS.has(name))
|
|
687507
|
+
return "panel";
|
|
687508
|
+
return "action";
|
|
687509
|
+
}
|
|
687510
|
+
function projectRuntimeCommands(commands) {
|
|
687511
|
+
return commands.filter((command12) => command12.userInvocable !== false && isCommandEnabled(command12)).map((command12) => {
|
|
687512
|
+
const surface = commandSurface(command12);
|
|
687513
|
+
const available = surface !== "terminal_only" && (isNonInteractiveCommand(command12) || RAYUCODE_IMPLEMENTED_COMMANDS.has(getCommandName(command12)));
|
|
687514
|
+
const source = command12.type === "prompt" ? command12.source : command12.loadedFrom ?? "builtin";
|
|
687515
|
+
return {
|
|
687516
|
+
name: getCommandName(command12),
|
|
687517
|
+
aliases: [...command12.aliases ?? []],
|
|
687518
|
+
description: formatDescriptionWithSource(command12),
|
|
687519
|
+
argumentHint: command12.argumentHint ?? "",
|
|
687520
|
+
executionKind: command12.type,
|
|
687521
|
+
surface,
|
|
687522
|
+
origin: source,
|
|
687523
|
+
available,
|
|
687524
|
+
...!available ? {
|
|
687525
|
+
unavailableReason: surface === "terminal_only" ? "This command changes terminal presentation or terminal input." : "This interactive command does not have a Rayucode surface yet."
|
|
687526
|
+
} : {},
|
|
687527
|
+
workflow: command12.kind === "workflow",
|
|
687528
|
+
sensitive: command12.isSensitive === true
|
|
687529
|
+
};
|
|
687530
|
+
});
|
|
687531
|
+
}
|
|
687532
|
+
function jsonInputSchema(tool) {
|
|
687533
|
+
if (tool.inputJSONSchema)
|
|
687534
|
+
return { ...tool.inputJSONSchema };
|
|
687535
|
+
const schema = tool.inputSchema;
|
|
687536
|
+
try {
|
|
687537
|
+
return schema.toJSONSchema?.();
|
|
687538
|
+
} catch {
|
|
687539
|
+
return;
|
|
687540
|
+
}
|
|
687541
|
+
}
|
|
687542
|
+
function projectRuntimeTools(tools) {
|
|
687543
|
+
return tools.filter((tool) => tool.isEnabled()).map((tool) => {
|
|
687544
|
+
const inputSchema44 = jsonInputSchema(tool);
|
|
687545
|
+
return {
|
|
687546
|
+
name: tool.name,
|
|
687547
|
+
aliases: [...tool.aliases ?? []],
|
|
687548
|
+
source: tool.isMcp ? "mcp" : tool.isLsp ? "lsp" : "builtin",
|
|
687549
|
+
...tool.mcpInfo?.serverName ? { serverName: tool.mcpInfo.serverName } : {},
|
|
687550
|
+
...inputSchema44 ? { inputSchema: inputSchema44 } : {},
|
|
687551
|
+
deferred: tool.shouldDefer === true,
|
|
687552
|
+
alwaysLoad: tool.alwaysLoad === true,
|
|
687553
|
+
requiresUserInteraction: tool.requiresUserInteraction?.() === true
|
|
687554
|
+
};
|
|
687555
|
+
});
|
|
687556
|
+
}
|
|
687557
|
+
function projectRuntimeAgents(agents2) {
|
|
687558
|
+
return agents2.map((agent2) => ({
|
|
687559
|
+
name: agent2.agentType,
|
|
687560
|
+
description: agent2.whenToUse,
|
|
687561
|
+
source: agent2.source,
|
|
687562
|
+
...agent2.model && agent2.model !== "inherit" ? { model: agent2.model } : {},
|
|
687563
|
+
background: agent2.background === true,
|
|
687564
|
+
tools: [...agent2.tools ?? []],
|
|
687565
|
+
disallowedTools: [...agent2.disallowedTools ?? []],
|
|
687566
|
+
skills: [...agent2.skills ?? []],
|
|
687567
|
+
..."plugin" in agent2 && typeof agent2.plugin === "string" ? { plugin: agent2.plugin } : {}
|
|
687568
|
+
}));
|
|
687569
|
+
}
|
|
687570
|
+
function projectRuntimePlugins(enabled2, disabled) {
|
|
687571
|
+
const rows = [
|
|
687572
|
+
...enabled2.map((plugin2) => ({ plugin: plugin2, enabled: true })),
|
|
687573
|
+
...disabled.map((plugin2) => ({ plugin: plugin2, enabled: false }))
|
|
687574
|
+
];
|
|
687575
|
+
return rows.map(({ plugin: plugin2, enabled: isEnabled2 }) => ({
|
|
687576
|
+
name: plugin2.name,
|
|
687577
|
+
description: plugin2.manifest.description ?? "",
|
|
687578
|
+
...plugin2.manifest.version ? { version: plugin2.manifest.version } : {},
|
|
687579
|
+
source: plugin2.source,
|
|
687580
|
+
enabled: isEnabled2,
|
|
687581
|
+
builtin: plugin2.isBuiltin === true,
|
|
687582
|
+
components: pluginComponents(plugin2)
|
|
687583
|
+
}));
|
|
687584
|
+
}
|
|
687585
|
+
function projectRuntimeSkills(commands) {
|
|
687586
|
+
return commands.flatMap((command12) => {
|
|
687587
|
+
if (command12.type !== "prompt")
|
|
687588
|
+
return [];
|
|
687589
|
+
const isSkill = command12.kind === "workflow" || command12.loadedFrom === "skills" || command12.loadedFrom === "plugin" || command12.loadedFrom === "managed" || command12.loadedFrom === "bundled" || command12.loadedFrom === "mcp" || command12.source !== "builtin";
|
|
687590
|
+
if (!isSkill || command12.userInvocable === false || !isCommandEnabled(command12)) {
|
|
687591
|
+
return [];
|
|
687592
|
+
}
|
|
687593
|
+
return [{
|
|
687594
|
+
name: getCommandName(command12),
|
|
687595
|
+
description: formatDescriptionWithSource(command12),
|
|
687596
|
+
source: command12.source,
|
|
687597
|
+
...command12.version ? { version: command12.version } : {},
|
|
687598
|
+
workflow: command12.kind === "workflow",
|
|
687599
|
+
...command12.context ? { context: command12.context } : {},
|
|
687600
|
+
...command12.agent ? { agent: command12.agent } : {}
|
|
687601
|
+
}];
|
|
687602
|
+
});
|
|
687603
|
+
}
|
|
687604
|
+
function pluginComponents(plugin2) {
|
|
687605
|
+
const components = [];
|
|
687606
|
+
if (plugin2.commandsPath || plugin2.commandsPaths?.length)
|
|
687607
|
+
components.push("commands");
|
|
687608
|
+
if (plugin2.agentsPath || plugin2.agentsPaths?.length)
|
|
687609
|
+
components.push("agents");
|
|
687610
|
+
if (plugin2.skillsPath || plugin2.skillsPaths?.length)
|
|
687611
|
+
components.push("skills");
|
|
687612
|
+
if (plugin2.hooksConfig)
|
|
687613
|
+
components.push("hooks");
|
|
687614
|
+
if (plugin2.mcpServers && Object.keys(plugin2.mcpServers).length > 0)
|
|
687615
|
+
components.push("mcp");
|
|
687616
|
+
if (plugin2.lspServers && Object.keys(plugin2.lspServers).length > 0)
|
|
687617
|
+
components.push("lsp");
|
|
687618
|
+
if (plugin2.settings && Object.keys(plugin2.settings).length > 0)
|
|
687619
|
+
components.push("settings");
|
|
687620
|
+
return components;
|
|
687621
|
+
}
|
|
687622
|
+
var RAYUCODE_TERMINAL_ONLY_COMMANDS, PANEL_COMMANDS, RAYUCODE_IMPLEMENTED_COMMANDS, RUNTIME_CAPABILITIES;
|
|
687623
|
+
var init_catalog = __esm(() => {
|
|
687624
|
+
init_commands();
|
|
687625
|
+
RAYUCODE_TERMINAL_ONLY_COMMANDS = new Set([
|
|
687626
|
+
"banner",
|
|
687627
|
+
"brandmark",
|
|
687628
|
+
"color",
|
|
687629
|
+
"theme",
|
|
687630
|
+
"mascot",
|
|
687631
|
+
"vim",
|
|
687632
|
+
"keybindings",
|
|
687633
|
+
"terminal-setup",
|
|
687634
|
+
"exit",
|
|
687635
|
+
"quit",
|
|
687636
|
+
"statusline",
|
|
687637
|
+
"thinkback-play"
|
|
687638
|
+
]);
|
|
687639
|
+
PANEL_COMMANDS = new Set([
|
|
687640
|
+
"connect",
|
|
687641
|
+
"login",
|
|
687642
|
+
"logout",
|
|
687643
|
+
"model",
|
|
687644
|
+
"model_subagent",
|
|
687645
|
+
"webfetch_model",
|
|
687646
|
+
"collaborator_model",
|
|
687647
|
+
"model_image_generation",
|
|
687648
|
+
"model_video_generation",
|
|
687649
|
+
"effort",
|
|
687650
|
+
"output-style",
|
|
687651
|
+
"config",
|
|
687652
|
+
"permissions",
|
|
687653
|
+
"plan",
|
|
687654
|
+
"sandbox",
|
|
687655
|
+
"resume",
|
|
687656
|
+
"session",
|
|
687657
|
+
"branch",
|
|
687658
|
+
"rename",
|
|
687659
|
+
"rewind",
|
|
687660
|
+
"checkpoint",
|
|
687661
|
+
"copy",
|
|
687662
|
+
"export",
|
|
687663
|
+
"btw",
|
|
687664
|
+
"mcp",
|
|
687665
|
+
"skills",
|
|
687666
|
+
"install-skill",
|
|
687667
|
+
"plugin",
|
|
687668
|
+
"reload-plugins",
|
|
687669
|
+
"agents",
|
|
687670
|
+
"tasks",
|
|
687671
|
+
"hooks",
|
|
687672
|
+
"memory",
|
|
687673
|
+
"doctor",
|
|
687674
|
+
"status",
|
|
687675
|
+
"stats",
|
|
687676
|
+
"context",
|
|
687677
|
+
"diff",
|
|
687678
|
+
"review_detail",
|
|
687679
|
+
"add-dir",
|
|
687680
|
+
"tag",
|
|
687681
|
+
"ide",
|
|
687682
|
+
"telegram-bot",
|
|
687683
|
+
"remote-control",
|
|
687684
|
+
"rc",
|
|
687685
|
+
"web-bridge",
|
|
687686
|
+
"think-back",
|
|
687687
|
+
"contact_me"
|
|
687688
|
+
]);
|
|
687689
|
+
RAYUCODE_IMPLEMENTED_COMMANDS = new Set([
|
|
687690
|
+
"connect",
|
|
687691
|
+
"login",
|
|
687692
|
+
"logout",
|
|
687693
|
+
"model_subagent",
|
|
687694
|
+
"webfetch_model",
|
|
687695
|
+
"btw",
|
|
687696
|
+
"reload-plugins",
|
|
687697
|
+
"install-skill",
|
|
687698
|
+
"mcp",
|
|
687699
|
+
"skills",
|
|
687700
|
+
"plugin",
|
|
687701
|
+
"agents",
|
|
687702
|
+
"tasks",
|
|
687703
|
+
"workflows",
|
|
687704
|
+
"model",
|
|
687705
|
+
"effort"
|
|
687706
|
+
]);
|
|
687707
|
+
RUNTIME_CAPABILITIES = {
|
|
687708
|
+
version: 1,
|
|
687709
|
+
features: {
|
|
687710
|
+
commandCatalogue: true,
|
|
687711
|
+
toolCatalogue: true,
|
|
687712
|
+
runtimeSnapshot: true,
|
|
687713
|
+
productPreferences: true,
|
|
687714
|
+
promptSuggestions: true,
|
|
687715
|
+
mcpElicitation: true,
|
|
687716
|
+
hookLifecycle: true,
|
|
687717
|
+
taskInspection: true,
|
|
687718
|
+
attachedSessionTasks: true,
|
|
687719
|
+
resourceCatalogues: true
|
|
687720
|
+
}
|
|
687721
|
+
};
|
|
687722
|
+
});
|
|
687723
|
+
|
|
687724
|
+
// src/runtime/snapshot.ts
|
|
687725
|
+
function buildRuntimeSnapshot2(input) {
|
|
687726
|
+
const skills2 = projectRuntimeSkills(input.commands);
|
|
687727
|
+
return {
|
|
687728
|
+
capabilities: RUNTIME_CAPABILITIES,
|
|
687729
|
+
revision: input.revision,
|
|
687730
|
+
product: input.product,
|
|
687731
|
+
session: { id: input.sessionId, status: input.sessionStatus },
|
|
687732
|
+
commands: projectRuntimeCommands(input.commands),
|
|
687733
|
+
tools: projectRuntimeTools([...input.tools, ...input.appState.mcp.tools]),
|
|
687734
|
+
agents: projectRuntimeAgents(input.agents),
|
|
687735
|
+
plugins: projectRuntimePlugins(input.appState.plugins.enabled, input.appState.plugins.disabled),
|
|
687736
|
+
skills: skills2,
|
|
687737
|
+
workflows: skills2.filter((skill) => skill.workflow),
|
|
687738
|
+
tasks: Object.values(input.appState.tasks ?? {}).map((task) => projectTaskState(input.sessionId, task)),
|
|
687739
|
+
mcpServers: input.mcpServers,
|
|
687740
|
+
inference: { model: input.model, ...input.inference },
|
|
687741
|
+
account: input.account,
|
|
687742
|
+
outputStyle: input.outputStyle,
|
|
687743
|
+
availableOutputStyles: input.availableOutputStyles,
|
|
687744
|
+
permissionMode: input.appState.toolPermissionContext.mode,
|
|
687745
|
+
bridges: {
|
|
687746
|
+
telegramAttached: input.telegramAttached === true,
|
|
687747
|
+
webBridgeEnabled: input.appState.replBridgeEnabled,
|
|
687748
|
+
webBridgeConnected: input.appState.replBridgeConnected || input.appState.replBridgeSessionActive,
|
|
687749
|
+
remoteSessionConnected: input.appState.remoteConnectionStatus === "connected"
|
|
687750
|
+
}
|
|
687751
|
+
};
|
|
687752
|
+
}
|
|
687753
|
+
var init_snapshot = __esm(() => {
|
|
687754
|
+
init_catalog();
|
|
687755
|
+
});
|
|
687756
|
+
|
|
686959
687757
|
// src/utils/plugins/zipCacheAdapters.ts
|
|
686960
687758
|
import { readFile as readFile61 } from "fs/promises";
|
|
686961
|
-
import { join as
|
|
687759
|
+
import { join as join190 } from "path";
|
|
686962
687760
|
async function readZipCacheKnownMarketplaces() {
|
|
686963
687761
|
try {
|
|
686964
687762
|
const content = await readFile61(getZipCacheKnownMarketplacesPath(), "utf-8");
|
|
@@ -686983,13 +687781,13 @@ async function saveMarketplaceJsonToZipCache(marketplaceName, installLocation) {
|
|
|
686983
687781
|
const content = await readMarketplaceJsonContent(installLocation);
|
|
686984
687782
|
if (content !== null) {
|
|
686985
687783
|
const relPath = getMarketplaceJsonRelativePath(marketplaceName);
|
|
686986
|
-
await atomicWriteToZipCache(
|
|
687784
|
+
await atomicWriteToZipCache(join190(zipCachePath, relPath), content);
|
|
686987
687785
|
}
|
|
686988
687786
|
}
|
|
686989
687787
|
async function readMarketplaceJsonContent(dir) {
|
|
686990
687788
|
const candidates = [
|
|
686991
|
-
|
|
686992
|
-
|
|
687789
|
+
join190(dir, ".claude-plugin", "marketplace.json"),
|
|
687790
|
+
join190(dir, "marketplace.json"),
|
|
686993
687791
|
dir
|
|
686994
687792
|
];
|
|
686995
687793
|
for (const candidate of candidates) {
|
|
@@ -687119,8 +687917,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
687119
687917
|
}
|
|
687120
687918
|
async function checkEnvLessBridgeMinVersion() {
|
|
687121
687919
|
const cfg = await getEnvLessBridgeConfig();
|
|
687122
|
-
if (cfg.min_version && lt("2.0.
|
|
687123
|
-
return `Your version of RAYU (${"2.0.
|
|
687920
|
+
if (cfg.min_version && lt("2.0.10", cfg.min_version)) {
|
|
687921
|
+
return `Your version of RAYU (${"2.0.10"}) is too old for Remote Control.
|
|
687124
687922
|
Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
|
|
687125
687923
|
}
|
|
687126
687924
|
return null;
|
|
@@ -687448,14 +688246,14 @@ __export(exports_bridgePointer, {
|
|
|
687448
688246
|
BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
|
|
687449
688247
|
});
|
|
687450
688248
|
import { mkdir as mkdir48, readFile as readFile62, stat as stat50, unlink as unlink28, writeFile as writeFile52 } from "fs/promises";
|
|
687451
|
-
import { dirname as
|
|
688249
|
+
import { dirname as dirname74, join as join191 } from "path";
|
|
687452
688250
|
function getBridgePointerPath(dir) {
|
|
687453
|
-
return
|
|
688251
|
+
return join191(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
|
|
687454
688252
|
}
|
|
687455
688253
|
async function writeBridgePointer(dir, pointer) {
|
|
687456
688254
|
const path24 = getBridgePointerPath(dir);
|
|
687457
688255
|
try {
|
|
687458
|
-
await mkdir48(
|
|
688256
|
+
await mkdir48(dirname74(path24), { recursive: true });
|
|
687459
688257
|
await writeFile52(path24, jsonStringify(pointer), "utf8");
|
|
687460
688258
|
logForDebugging(`[bridge:pointer] wrote ${path24}`);
|
|
687461
688259
|
} catch (err2) {
|
|
@@ -687595,7 +688393,7 @@ async function initBridgeCore(params) {
|
|
|
687595
688393
|
const rawApi = createBridgeApiClient({
|
|
687596
688394
|
baseUrl,
|
|
687597
688395
|
getAccessToken,
|
|
687598
|
-
runnerVersion: "2.0.
|
|
688396
|
+
runnerVersion: "2.0.10",
|
|
687599
688397
|
onDebug: logForDebugging,
|
|
687600
688398
|
onAuth401,
|
|
687601
688399
|
getTrustedDeviceToken
|
|
@@ -689433,7 +690231,7 @@ __export(exports_print, {
|
|
|
689433
690231
|
canBatchWith: () => canBatchWith
|
|
689434
690232
|
});
|
|
689435
690233
|
import { readFile as readFile63, stat as stat51 } from "fs/promises";
|
|
689436
|
-
import { dirname as
|
|
690234
|
+
import { dirname as dirname75 } from "path";
|
|
689437
690235
|
import { cwd as cwd2 } from "process";
|
|
689438
690236
|
import { randomUUID as randomUUID56 } from "crypto";
|
|
689439
690237
|
function looksLikeTranscript(content) {
|
|
@@ -690151,10 +690949,44 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
690151
690949
|
}
|
|
690152
690950
|
const idleTimeout = createIdleTimeoutManager(() => !running);
|
|
690153
690951
|
let currentCommands = commands;
|
|
690952
|
+
let currentCatalogCommands = options.catalogCommands ?? commands;
|
|
690154
690953
|
let currentAgents = agents2;
|
|
690954
|
+
let runtimeRevision = 0;
|
|
690955
|
+
async function currentRuntimeSnapshot() {
|
|
690956
|
+
const appState = getAppState();
|
|
690957
|
+
const settings = getSettings_DEPRECATED();
|
|
690958
|
+
const outputStyle2 = settings?.outputStyle || DEFAULT_OUTPUT_STYLE_NAME;
|
|
690959
|
+
const availableOutputStyles = await getAllOutputStyles(getCwd());
|
|
690960
|
+
const accountInfo = getAccountInformation();
|
|
690961
|
+
const model = getMainLoopModel();
|
|
690962
|
+
return buildRuntimeSnapshot2({
|
|
690963
|
+
revision: ++runtimeRevision,
|
|
690964
|
+
product: isRayucodeRuntime() ? "rayucode" : "sdk",
|
|
690965
|
+
sessionId: getSessionId(),
|
|
690966
|
+
sessionStatus: getSessionState(),
|
|
690967
|
+
commands: currentCatalogCommands,
|
|
690968
|
+
tools,
|
|
690969
|
+
agents: currentAgents,
|
|
690970
|
+
appState,
|
|
690971
|
+
mcpServers: buildMcpServerStatuses(),
|
|
690972
|
+
inference: resolveInferenceSettings(model, appState.effortValue, options.thinkingConfig),
|
|
690973
|
+
model,
|
|
690974
|
+
account: {
|
|
690975
|
+
email: accountInfo?.email,
|
|
690976
|
+
organization: accountInfo?.organization,
|
|
690977
|
+
subscriptionType: accountInfo?.subscription,
|
|
690978
|
+
tokenSource: accountInfo?.tokenSource,
|
|
690979
|
+
apiKeySource: accountInfo?.apiKeySource,
|
|
690980
|
+
apiProvider: getAPIProvider()
|
|
690981
|
+
},
|
|
690982
|
+
outputStyle: outputStyle2,
|
|
690983
|
+
availableOutputStyles: Object.keys(availableOutputStyles)
|
|
690984
|
+
});
|
|
690985
|
+
}
|
|
690155
690986
|
async function refreshPluginState() {
|
|
690156
690987
|
const { agentDefinitions: freshAgentDefs } = await refreshActivePlugins(setAppState);
|
|
690157
|
-
|
|
690988
|
+
currentCatalogCommands = await getCommands(cwd2());
|
|
690989
|
+
currentCommands = filterCommandsForNonInteractive(currentCatalogCommands);
|
|
690158
690990
|
const sdkAgents = currentAgents.filter((a2) => a2.source === "flagSettings");
|
|
690159
690991
|
currentAgents = [...freshAgentDefs.allAgents, ...sdkAgents];
|
|
690160
690992
|
}
|
|
@@ -690181,7 +691013,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
690181
691013
|
const unsubscribeSkillChanges = skillChangeDetector.subscribe(() => {
|
|
690182
691014
|
clearCommandsCache();
|
|
690183
691015
|
getCommands(cwd2()).then((newCommands) => {
|
|
690184
|
-
|
|
691016
|
+
currentCatalogCommands = newCommands;
|
|
691017
|
+
currentCommands = filterCommandsForNonInteractive(newCommands);
|
|
690185
691018
|
});
|
|
690186
691019
|
});
|
|
690187
691020
|
const scheduleProactiveTick = undefined;
|
|
@@ -690748,7 +691581,8 @@ ${m3.text}
|
|
|
690748
691581
|
};
|
|
690749
691582
|
}
|
|
690750
691583
|
}
|
|
690751
|
-
|
|
691584
|
+
const runtimeSnapshot = message.request.runtimeCapabilities ? await currentRuntimeSnapshot() : undefined;
|
|
691585
|
+
await handleInitializeRequest(message.request, message.request_id, initialized5, output, currentCommands, modelInfos, structuredIO, !!options.enableAuthStatus, options, currentAgents, getAppState, runtimeSnapshot);
|
|
690752
691586
|
if (message.request.promptSuggestions) {
|
|
690753
691587
|
setAppState((prev) => {
|
|
690754
691588
|
if (prev.promptSuggestionEnabled)
|
|
@@ -690763,13 +691597,27 @@ ${m3.text}
|
|
|
690763
691597
|
if (hasCommandsInQueue()) {
|
|
690764
691598
|
run();
|
|
690765
691599
|
}
|
|
691600
|
+
} else if (message.request.subtype === "get_runtime_snapshot") {
|
|
691601
|
+
try {
|
|
691602
|
+
sendControlResponseSuccess(message, {
|
|
691603
|
+
runtime: await currentRuntimeSnapshot()
|
|
691604
|
+
});
|
|
691605
|
+
} catch (error52) {
|
|
691606
|
+
sendControlResponseError(message, errorMessage(error52));
|
|
691607
|
+
}
|
|
690766
691608
|
} else if (message.request.subtype === "set_permission_mode") {
|
|
690767
691609
|
const m3 = message.request;
|
|
690768
|
-
setAppState((prev) =>
|
|
690769
|
-
|
|
690770
|
-
|
|
690771
|
-
|
|
690772
|
-
|
|
691610
|
+
setAppState((prev) => {
|
|
691611
|
+
const toolPermissionContext = handleSetPermissionMode(m3, message.request_id, prev.toolPermissionContext, output);
|
|
691612
|
+
if (isRayucodeRuntime() && toolPermissionContext.mode === m3.mode) {
|
|
691613
|
+
updateRayucodePreferences({ permissionMode: m3.mode });
|
|
691614
|
+
}
|
|
691615
|
+
return {
|
|
691616
|
+
...prev,
|
|
691617
|
+
toolPermissionContext,
|
|
691618
|
+
isUltraplanMode: m3.ultraplan ?? prev.isUltraplanMode
|
|
691619
|
+
};
|
|
691620
|
+
});
|
|
690773
691621
|
} else if (message.request.subtype === "set_model") {
|
|
690774
691622
|
const { invalidateRayuConfigCache: invalidateRayuConfigCache2 } = await Promise.resolve().then(() => (init_rayuConfig(), exports_rayuConfig));
|
|
690775
691623
|
invalidateRayuConfigCache2();
|
|
@@ -690796,6 +691644,21 @@ ${m3.text}
|
|
|
690796
691644
|
};
|
|
690797
691645
|
}
|
|
690798
691646
|
sendControlResponseSuccess(message);
|
|
691647
|
+
} else if (message.request.subtype === "set_thinking") {
|
|
691648
|
+
options.thinkingConfig = message.request.enabled ? { type: "adaptive" } : { type: "disabled" };
|
|
691649
|
+
if (isRayucodeRuntime()) {
|
|
691650
|
+
const stored = updateRayucodePreferences({
|
|
691651
|
+
thinkingEnabled: message.request.enabled
|
|
691652
|
+
});
|
|
691653
|
+
if (stored.error) {
|
|
691654
|
+
sendControlResponseError(message, stored.error.message);
|
|
691655
|
+
continue;
|
|
691656
|
+
}
|
|
691657
|
+
}
|
|
691658
|
+
const currentAppState = getAppState();
|
|
691659
|
+
sendControlResponseSuccess(message, {
|
|
691660
|
+
inference: resolveInferenceSettings(getMainLoopModel(), currentAppState.effortValue, options.thinkingConfig)
|
|
691661
|
+
});
|
|
690799
691662
|
} else if (message.request.subtype === "mcp_status") {
|
|
690800
691663
|
sendControlResponseSuccess(message, {
|
|
690801
691664
|
mcpServers: buildMcpServerStatuses()
|
|
@@ -690876,7 +691739,8 @@ ${m3.text}
|
|
|
690876
691739
|
loadAllPluginsCacheOnly()
|
|
690877
691740
|
]);
|
|
690878
691741
|
if (cmdsR.status === "fulfilled") {
|
|
690879
|
-
|
|
691742
|
+
currentCatalogCommands = cmdsR.value;
|
|
691743
|
+
currentCommands = filterCommandsForNonInteractive(cmdsR.value);
|
|
690880
691744
|
} else {
|
|
690881
691745
|
logError2(cmdsR.reason);
|
|
690882
691746
|
}
|
|
@@ -690905,7 +691769,39 @@ ${m3.text}
|
|
|
690905
691769
|
})),
|
|
690906
691770
|
plugins,
|
|
690907
691771
|
mcpServers: buildMcpServerStatuses(),
|
|
690908
|
-
error_count: r2.error_count
|
|
691772
|
+
error_count: r2.error_count,
|
|
691773
|
+
runtimeCommands: projectRuntimeCommands(currentCatalogCommands),
|
|
691774
|
+
runtimeTools: projectRuntimeTools([
|
|
691775
|
+
...tools,
|
|
691776
|
+
...getAppState().mcp.tools
|
|
691777
|
+
])
|
|
691778
|
+
});
|
|
691779
|
+
} catch (error52) {
|
|
691780
|
+
sendControlResponseError(message, errorMessage(error52));
|
|
691781
|
+
}
|
|
691782
|
+
} else if (message.request.subtype === "install_skill") {
|
|
691783
|
+
try {
|
|
691784
|
+
const { installSkillFromSource: installSkillFromSource2 } = await Promise.resolve().then(() => (init_installSkill(), exports_installSkill));
|
|
691785
|
+
const installed3 = await installSkillFromSource2(message.request.source, {
|
|
691786
|
+
overwrite: message.request.overwrite === true
|
|
691787
|
+
});
|
|
691788
|
+
currentCatalogCommands = await getCommands(cwd2());
|
|
691789
|
+
currentCommands = filterCommandsForNonInteractive(currentCatalogCommands);
|
|
691790
|
+
const appState = getAppState();
|
|
691791
|
+
sendControlResponseSuccess(message, {
|
|
691792
|
+
skills: installed3.map((skill) => ({
|
|
691793
|
+
name: skill.name,
|
|
691794
|
+
description: skill.description,
|
|
691795
|
+
path: skill.path,
|
|
691796
|
+
replaced: skill.replaced
|
|
691797
|
+
})),
|
|
691798
|
+
commands: currentCommands.filter((command12) => command12.userInvocable !== false).map((command12) => ({
|
|
691799
|
+
name: getCommandName(command12),
|
|
691800
|
+
description: formatDescriptionWithSource(command12),
|
|
691801
|
+
argumentHint: command12.argumentHint || ""
|
|
691802
|
+
})),
|
|
691803
|
+
runtimeCommands: projectRuntimeCommands(currentCatalogCommands),
|
|
691804
|
+
runtimeTools: projectRuntimeTools([...tools, ...appState.mcp.tools])
|
|
690909
691805
|
});
|
|
690910
691806
|
} catch (error52) {
|
|
690911
691807
|
sendControlResponseError(message, errorMessage(error52));
|
|
@@ -691203,8 +692099,16 @@ ${m3.text}
|
|
|
691203
692099
|
}
|
|
691204
692100
|
sendControlResponseSuccess(message);
|
|
691205
692101
|
} else if (message.request.subtype === "set_effort") {
|
|
691206
|
-
const
|
|
691207
|
-
const result =
|
|
692102
|
+
const requested = message.request.effort;
|
|
692103
|
+
const result = isRayucodeRuntime() ? (() => {
|
|
692104
|
+
const stored = updateRayucodePreferences({
|
|
692105
|
+
effort: requested ?? undefined
|
|
692106
|
+
});
|
|
692107
|
+
return stored.error ? { message: `Failed to set effort level: ${stored.error.message}` } : {
|
|
692108
|
+
message: requested ? `Set Rayucode effort level to ${requested}` : "Rayucode effort level set to auto",
|
|
692109
|
+
effortUpdate: { value: requested ?? undefined }
|
|
692110
|
+
};
|
|
692111
|
+
})() : (await Promise.resolve().then(() => (init_effortCommand(), exports_effortCommand))).executeEffort(requested ?? "auto");
|
|
691208
692112
|
if (result.effortUpdate) {
|
|
691209
692113
|
const value2 = result.effortUpdate.value;
|
|
691210
692114
|
setAppState((prev) => ({ ...prev, effortValue: value2 }));
|
|
@@ -691561,7 +692465,7 @@ function getCanUseToolFn(permissionPromptToolName, structuredIO, getMcpTools, on
|
|
|
691561
692465
|
return resolved(tool, input, toolUseContext, assistantMessage, toolUseId, forceDecision);
|
|
691562
692466
|
};
|
|
691563
692467
|
}
|
|
691564
|
-
async function handleInitializeRequest(request, requestId, initialized5, output, commands, modelInfos, structuredIO, enableAuthStatus, options, agents2, getAppState) {
|
|
692468
|
+
async function handleInitializeRequest(request, requestId, initialized5, output, commands, modelInfos, structuredIO, enableAuthStatus, options, agents2, getAppState, runtimeSnapshot) {
|
|
691565
692469
|
if (initialized5) {
|
|
691566
692470
|
output.enqueue({
|
|
691567
692471
|
type: "control_response",
|
|
@@ -691609,9 +692513,9 @@ async function handleInitializeRequest(request, requestId, initialized5, output,
|
|
|
691609
692513
|
structuredIO.prependUserMessage(mainThreadAgent.initialPrompt);
|
|
691610
692514
|
}
|
|
691611
692515
|
}
|
|
691612
|
-
const settings = getSettings_DEPRECATED();
|
|
691613
|
-
const outputStyle2 = settings?.outputStyle
|
|
691614
|
-
const
|
|
692516
|
+
const settings = runtimeSnapshot ? undefined : getSettings_DEPRECATED();
|
|
692517
|
+
const outputStyle2 = runtimeSnapshot?.outputStyle ?? settings?.outputStyle ?? DEFAULT_OUTPUT_STYLE_NAME;
|
|
692518
|
+
const availableOutputStyleNames = runtimeSnapshot?.availableOutputStyles ?? Object.keys(await getAllOutputStyles(getCwd()));
|
|
691615
692519
|
const accountInfo = getAccountInformation();
|
|
691616
692520
|
if (request.hooks) {
|
|
691617
692521
|
const hooks3 = {};
|
|
@@ -691631,19 +692535,24 @@ async function handleInitializeRequest(request, requestId, initialized5, output,
|
|
|
691631
692535
|
if (request.jsonSchema) {
|
|
691632
692536
|
setInitJsonSchema(request.jsonSchema);
|
|
691633
692537
|
}
|
|
692538
|
+
const commandsForResponse = runtimeSnapshot ? runtimeSnapshot.commands.filter((command12) => command12.available) : commands.filter((cmd) => cmd.userInvocable !== false).map((cmd) => ({
|
|
692539
|
+
name: getCommandName(cmd),
|
|
692540
|
+
description: formatDescriptionWithSource(cmd),
|
|
692541
|
+
argumentHint: cmd.argumentHint || ""
|
|
692542
|
+
}));
|
|
691634
692543
|
const initResponse = {
|
|
691635
|
-
commands:
|
|
691636
|
-
name:
|
|
691637
|
-
description:
|
|
691638
|
-
argumentHint:
|
|
691639
|
-
})),
|
|
692544
|
+
commands: runtimeSnapshot ? commandsForResponse.map((command12) => ({
|
|
692545
|
+
name: command12.name,
|
|
692546
|
+
description: command12.description,
|
|
692547
|
+
argumentHint: command12.argumentHint
|
|
692548
|
+
})) : commandsForResponse,
|
|
691640
692549
|
agents: agents2.map((agent2) => ({
|
|
691641
692550
|
name: agent2.agentType,
|
|
691642
692551
|
description: agent2.whenToUse,
|
|
691643
692552
|
model: agent2.model === "inherit" ? undefined : agent2.model
|
|
691644
692553
|
})),
|
|
691645
692554
|
output_style: outputStyle2,
|
|
691646
|
-
available_output_styles:
|
|
692555
|
+
available_output_styles: availableOutputStyleNames,
|
|
691647
692556
|
models: modelInfos,
|
|
691648
692557
|
account: {
|
|
691649
692558
|
email: accountInfo?.email,
|
|
@@ -691655,6 +692564,8 @@ async function handleInitializeRequest(request, requestId, initialized5, output,
|
|
|
691655
692564
|
},
|
|
691656
692565
|
pid: process.pid
|
|
691657
692566
|
};
|
|
692567
|
+
if (runtimeSnapshot)
|
|
692568
|
+
initResponse.runtime = runtimeSnapshot;
|
|
691658
692569
|
if (isFastModeEnabled() && isFastModeAvailable()) {
|
|
691659
692570
|
const appState = getAppState();
|
|
691660
692571
|
initResponse.fast_mode_state = getFastModeState(options.userSpecifiedModel ?? null, appState.fastMode);
|
|
@@ -691890,7 +692801,7 @@ async function loadInitialMessages(setAppState, options) {
|
|
|
691890
692801
|
if (false) {}
|
|
691891
692802
|
if (!options.forkSession) {
|
|
691892
692803
|
if (result.sessionId) {
|
|
691893
|
-
switchSession(asSessionId(result.sessionId), result.fullPath ?
|
|
692804
|
+
switchSession(asSessionId(result.sessionId), result.fullPath ? dirname75(result.fullPath) : null);
|
|
691894
692805
|
if (persistSession) {
|
|
691895
692806
|
await resetSessionFilePointer();
|
|
691896
692807
|
}
|
|
@@ -691988,7 +692899,7 @@ async function loadInitialMessages(setAppState, options) {
|
|
|
691988
692899
|
}
|
|
691989
692900
|
if (false) {}
|
|
691990
692901
|
if (!options.forkSession && result.sessionId) {
|
|
691991
|
-
switchSession(asSessionId(result.sessionId), result.fullPath ?
|
|
692902
|
+
switchSession(asSessionId(result.sessionId), result.fullPath ? dirname75(result.fullPath) : null);
|
|
691992
692903
|
if (persistSession) {
|
|
691993
692904
|
await resetSessionFilePointer();
|
|
691994
692905
|
}
|
|
@@ -692363,6 +693274,9 @@ var init_print = __esm(() => {
|
|
|
692363
693274
|
init_slowOperations();
|
|
692364
693275
|
init_skillChangeDetector();
|
|
692365
693276
|
init_commands();
|
|
693277
|
+
init_catalog();
|
|
693278
|
+
init_productPreferences();
|
|
693279
|
+
init_snapshot();
|
|
692366
693280
|
init_envUtils();
|
|
692367
693281
|
init_headlessPluginInstall();
|
|
692368
693282
|
init_refresh();
|
|
@@ -692874,7 +693788,7 @@ __export(exports_plugins, {
|
|
|
692874
693788
|
VALID_UPDATE_SCOPES: () => VALID_UPDATE_SCOPES,
|
|
692875
693789
|
VALID_INSTALLABLE_SCOPES: () => VALID_INSTALLABLE_SCOPES
|
|
692876
693790
|
});
|
|
692877
|
-
import { basename as basename64, dirname as
|
|
693791
|
+
import { basename as basename64, dirname as dirname76 } from "path";
|
|
692878
693792
|
function handleMarketplaceError(error52, action2) {
|
|
692879
693793
|
logError2(error52);
|
|
692880
693794
|
cliError(`${figures_default.cross} Failed to ${action2}: ${errorMessage(error52)}`);
|
|
@@ -692907,9 +693821,9 @@ async function pluginValidateHandler(manifestPath, options) {
|
|
|
692907
693821
|
printValidationResult(result);
|
|
692908
693822
|
let contentResults = [];
|
|
692909
693823
|
if (result.fileType === "plugin") {
|
|
692910
|
-
const manifestDir =
|
|
693824
|
+
const manifestDir = dirname76(result.filePath);
|
|
692911
693825
|
if (basename64(manifestDir) === ".claude-plugin") {
|
|
692912
|
-
contentResults = await validatePluginContents(
|
|
693826
|
+
contentResults = await validatePluginContents(dirname76(manifestDir));
|
|
692913
693827
|
for (const r2 of contentResults) {
|
|
692914
693828
|
console.log(`Validating ${r2.fileType}: ${r2.filePath}
|
|
692915
693829
|
`);
|
|
@@ -693441,12 +694355,12 @@ __export(exports_install, {
|
|
|
693441
694355
|
install: () => install
|
|
693442
694356
|
});
|
|
693443
694357
|
import { homedir as homedir42 } from "node:os";
|
|
693444
|
-
import { join as
|
|
694358
|
+
import { join as join192 } from "node:path";
|
|
693445
694359
|
function getInstallationPath2() {
|
|
693446
694360
|
const isWindows2 = env4.platform === "win32";
|
|
693447
694361
|
const homeDir = homedir42();
|
|
693448
694362
|
if (isWindows2) {
|
|
693449
|
-
const windowsPath =
|
|
694363
|
+
const windowsPath = join192(homeDir, ".local", "bin", "claude.exe");
|
|
693450
694364
|
return windowsPath.replace(/\//g, "\\");
|
|
693451
694365
|
}
|
|
693452
694366
|
return "~/.local/bin/claude";
|
|
@@ -693882,7 +694796,7 @@ __export(exports_main, {
|
|
|
693882
694796
|
startDeferredPrefetches: () => startDeferredPrefetches,
|
|
693883
694797
|
main: () => main
|
|
693884
694798
|
});
|
|
693885
|
-
import { readFileSync as
|
|
694799
|
+
import { readFileSync as readFileSync40 } from "fs";
|
|
693886
694800
|
import { resolve as resolve54 } from "path";
|
|
693887
694801
|
function logManagedSettings() {
|
|
693888
694802
|
try {
|
|
@@ -694039,7 +694953,7 @@ function loadSettingsFromFlag(settingsFile) {
|
|
|
694039
694953
|
resolvedPath: resolvedSettingsPath
|
|
694040
694954
|
} = safeResolvePath(getFsImplementation(), settingsFile);
|
|
694041
694955
|
try {
|
|
694042
|
-
|
|
694956
|
+
readFileSync40(resolvedSettingsPath, "utf8");
|
|
694043
694957
|
} catch (e2) {
|
|
694044
694958
|
if (isENOENT(e2)) {
|
|
694045
694959
|
process.stderr.write(source_default.red(`Error: Settings file not found: ${resolvedSettingsPath}
|
|
@@ -694447,7 +695361,7 @@ ${getTmuxInstallInstructions2()}
|
|
|
694447
695361
|
}
|
|
694448
695362
|
try {
|
|
694449
695363
|
const filePath = resolve54(options.systemPromptFile);
|
|
694450
|
-
systemPrompt =
|
|
695364
|
+
systemPrompt = readFileSync40(filePath, "utf8");
|
|
694451
695365
|
} catch (error52) {
|
|
694452
695366
|
const code = getErrnoCode(error52);
|
|
694453
695367
|
if (code === "ENOENT") {
|
|
@@ -694469,7 +695383,7 @@ ${getTmuxInstallInstructions2()}
|
|
|
694469
695383
|
}
|
|
694470
695384
|
try {
|
|
694471
695385
|
const filePath = resolve54(options.appendSystemPromptFile);
|
|
694472
|
-
appendSystemPrompt =
|
|
695386
|
+
appendSystemPrompt = readFileSync40(filePath, "utf8");
|
|
694473
695387
|
} catch (error52) {
|
|
694474
695388
|
const code = getErrnoCode(error52);
|
|
694475
695389
|
if (code === "ENOENT") {
|
|
@@ -694970,7 +695884,7 @@ ${customInstructions}` : customInstructions;
|
|
|
694970
695884
|
const mcpClients = [];
|
|
694971
695885
|
const mcpTools = [];
|
|
694972
695886
|
const mcpCommands = [];
|
|
694973
|
-
let thinkingEnabled = shouldEnableThinkingByDefault();
|
|
695887
|
+
let thinkingEnabled = initialThinkingForProduct(shouldEnableThinkingByDefault());
|
|
694974
695888
|
let thinkingConfig = thinkingEnabled !== false ? {
|
|
694975
695889
|
type: "adaptive"
|
|
694976
695890
|
} : {
|
|
@@ -695004,7 +695918,7 @@ ${customInstructions}` : customInstructions;
|
|
|
695004
695918
|
}
|
|
695005
695919
|
}
|
|
695006
695920
|
logForDiagnosticsNoPII("info", "started", {
|
|
695007
|
-
version: "2.0.
|
|
695921
|
+
version: "2.0.10",
|
|
695008
695922
|
is_native_binary: isInBundledMode()
|
|
695009
695923
|
});
|
|
695010
695924
|
registerCleanup(async () => {
|
|
@@ -695093,7 +696007,7 @@ ${customInstructions}` : customInstructions;
|
|
|
695093
696007
|
`);
|
|
695094
696008
|
process.exit(1);
|
|
695095
696009
|
}
|
|
695096
|
-
const commandsHeadless = disableSlashCommands ? [] : commands
|
|
696010
|
+
const commandsHeadless = disableSlashCommands ? [] : filterCommandsForNonInteractive(commands);
|
|
695097
696011
|
const defaultState = getDefaultAppState();
|
|
695098
696012
|
const headlessInitialState = {
|
|
695099
696013
|
...defaultState,
|
|
@@ -695104,7 +696018,7 @@ ${customInstructions}` : customInstructions;
|
|
|
695104
696018
|
tools: mcpTools
|
|
695105
696019
|
},
|
|
695106
696020
|
toolPermissionContext,
|
|
695107
|
-
effortValue: parseEffortValue(options.effort) ?? getInitialEffortSetting(),
|
|
696021
|
+
effortValue: parseEffortValue(options.effort) ?? initialEffortForProduct(getInitialEffortSetting()),
|
|
695108
696022
|
...isFastModeEnabled() && {
|
|
695109
696023
|
fastMode: getInitialFastModeSetting(effectiveModel ?? null)
|
|
695110
696024
|
},
|
|
@@ -695167,6 +696081,7 @@ ${customInstructions}` : customInstructions;
|
|
|
695167
696081
|
} = await Promise.resolve().then(() => (init_print(), exports_print));
|
|
695168
696082
|
profileCheckpoint("after_print_import");
|
|
695169
696083
|
runHeadless2(inputPrompt, () => headlessStore.getState(), headlessStore.setState, commandsHeadless, tools, sdkMcpConfigs, agentDefinitions.activeAgents, {
|
|
696084
|
+
catalogCommands: commands,
|
|
695170
696085
|
continue: options.continue,
|
|
695171
696086
|
resume: options.resume,
|
|
695172
696087
|
verbose,
|
|
@@ -695343,7 +696258,7 @@ ${customInstructions}` : customInstructions;
|
|
|
695343
696258
|
content: String(inputPrompt)
|
|
695344
696259
|
})
|
|
695345
696260
|
} : null,
|
|
695346
|
-
effortValue: parseEffortValue(options.effort) ?? getInitialEffortSetting(),
|
|
696261
|
+
effortValue: parseEffortValue(options.effort) ?? initialEffortForProduct(getInitialEffortSetting()),
|
|
695347
696262
|
activeOverlays: new Set,
|
|
695348
696263
|
fastMode: getInitialFastModeSetting(resolvedInitialModel),
|
|
695349
696264
|
...isAdvisorEnabled() && advisorModel && {
|
|
@@ -695727,7 +696642,7 @@ Usage: rayu --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
695727
696642
|
pendingHookMessages
|
|
695728
696643
|
}, renderAndRun);
|
|
695729
696644
|
}
|
|
695730
|
-
}).version(`2.0.
|
|
696645
|
+
}).version(`2.0.10 (${PRODUCT_NAME})`, "-v, --version", "Output the version number");
|
|
695731
696646
|
program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
695732
696647
|
program.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
695733
696648
|
if (canUserConfigureAdvisor()) {
|
|
@@ -696064,6 +696979,7 @@ var init_main3 = __esm(() => {
|
|
|
696064
696979
|
init_config8();
|
|
696065
696980
|
init_earlyInput();
|
|
696066
696981
|
init_effort();
|
|
696982
|
+
init_productPreferences();
|
|
696067
696983
|
init_fastMode();
|
|
696068
696984
|
init_managedEnv();
|
|
696069
696985
|
init_messages3();
|
|
@@ -696192,7 +697108,7 @@ if (false) {}
|
|
|
696192
697108
|
async function main2() {
|
|
696193
697109
|
const args = process.argv.slice(2);
|
|
696194
697110
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
696195
|
-
console.log(`${"2.0.
|
|
697111
|
+
console.log(`${"2.0.10"} (Beta-Rayu-CLI)`);
|
|
696196
697112
|
return;
|
|
696197
697113
|
}
|
|
696198
697114
|
if (!isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE)) {
|