@hasna/assistants 1.1.69 → 1.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +60 -839
- package/dist/index.js.map +21 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -558,19 +558,6 @@ var init_config = __esm(async () => {
|
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
},
|
|
561
|
-
energy: {
|
|
562
|
-
enabled: true,
|
|
563
|
-
regenRate: 500,
|
|
564
|
-
lowEnergyThreshold: 3000,
|
|
565
|
-
criticalThreshold: 1000,
|
|
566
|
-
maxEnergy: 1e4,
|
|
567
|
-
costs: {
|
|
568
|
-
message: 200,
|
|
569
|
-
toolCall: 500,
|
|
570
|
-
llmCall: 300,
|
|
571
|
-
longContext: 1000
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
561
|
validation: {
|
|
575
562
|
mode: "strict",
|
|
576
563
|
maxUserMessageLength: 1e5,
|
|
@@ -1222,13 +1209,6 @@ var init_schema = __esm(() => {
|
|
|
1222
1209
|
heartbeat TEXT NOT NULL,
|
|
1223
1210
|
context TEXT NOT NULL,
|
|
1224
1211
|
timestamp TEXT NOT NULL
|
|
1225
|
-
)`,
|
|
1226
|
-
`CREATE TABLE IF NOT EXISTS energy_state (
|
|
1227
|
-
id TEXT PRIMARY KEY DEFAULT 'default',
|
|
1228
|
-
current_energy REAL NOT NULL,
|
|
1229
|
-
max_energy REAL NOT NULL,
|
|
1230
|
-
regen_rate REAL NOT NULL,
|
|
1231
|
-
last_update TEXT NOT NULL
|
|
1232
1212
|
)`,
|
|
1233
1213
|
`CREATE TABLE IF NOT EXISTS capability_chains (
|
|
1234
1214
|
entity_id TEXT PRIMARY KEY,
|
|
@@ -11296,7 +11276,10 @@ var init_connector = __esm(async () => {
|
|
|
11296
11276
|
if (cached === null) {
|
|
11297
11277
|
continue;
|
|
11298
11278
|
}
|
|
11299
|
-
const
|
|
11279
|
+
const cwdForResolve = this.cwd || process.cwd();
|
|
11280
|
+
const localBin = join7(cwdForResolve, ".connectors", `connect-${name}`, "bin", "index.js");
|
|
11281
|
+
const cli = existsSync6(localBin) ? localBin : `connect-${name}`;
|
|
11282
|
+
const connector = this.createMinimalConnector(name, cli);
|
|
11300
11283
|
ConnectorBridge.cache.set(name, connector);
|
|
11301
11284
|
this.connectors.set(connector.name, connector);
|
|
11302
11285
|
connectors.push(connector);
|
|
@@ -12273,15 +12256,6 @@ var init_config2 = __esm(async () => {
|
|
|
12273
12256
|
"context.injection.enabled",
|
|
12274
12257
|
"context.injection.maxTokens",
|
|
12275
12258
|
"context.injection.format",
|
|
12276
|
-
"energy.enabled",
|
|
12277
|
-
"energy.regenRate",
|
|
12278
|
-
"energy.lowEnergyThreshold",
|
|
12279
|
-
"energy.criticalThreshold",
|
|
12280
|
-
"energy.maxEnergy",
|
|
12281
|
-
"energy.costs.message",
|
|
12282
|
-
"energy.costs.toolCall",
|
|
12283
|
-
"energy.costs.llmCall",
|
|
12284
|
-
"energy.costs.longContext",
|
|
12285
12259
|
"validation.mode",
|
|
12286
12260
|
"validation.maxUserMessageLength",
|
|
12287
12261
|
"validation.maxToolOutputLength",
|
|
@@ -12331,11 +12305,6 @@ var init_config2 = __esm(async () => {
|
|
|
12331
12305
|
"context.preserveLastToolCalls",
|
|
12332
12306
|
"context.injection.enabled",
|
|
12333
12307
|
"context.injection.maxTokens",
|
|
12334
|
-
"energy.enabled",
|
|
12335
|
-
"energy.regenRate",
|
|
12336
|
-
"energy.lowEnergyThreshold",
|
|
12337
|
-
"energy.criticalThreshold",
|
|
12338
|
-
"energy.maxEnergy",
|
|
12339
12308
|
"memory.enabled",
|
|
12340
12309
|
"memory.injection.enabled",
|
|
12341
12310
|
"memory.injection.maxTokens",
|
|
@@ -20376,157 +20345,6 @@ var init_model = __esm(() => {
|
|
|
20376
20345
|
];
|
|
20377
20346
|
});
|
|
20378
20347
|
|
|
20379
|
-
// packages/core/src/tools/energy.ts
|
|
20380
|
-
function getEnergyLevelInfo(percentage) {
|
|
20381
|
-
if (percentage >= 80) {
|
|
20382
|
-
return {
|
|
20383
|
-
level: "energetic",
|
|
20384
|
-
recommendation: "Energy is high. Continue working normally."
|
|
20385
|
-
};
|
|
20386
|
-
} else if (percentage >= 60) {
|
|
20387
|
-
return {
|
|
20388
|
-
level: "normal",
|
|
20389
|
-
recommendation: "Energy is good. No rest needed yet."
|
|
20390
|
-
};
|
|
20391
|
-
} else if (percentage >= 30) {
|
|
20392
|
-
return {
|
|
20393
|
-
level: "low",
|
|
20394
|
-
recommendation: "Energy is getting low. Consider taking a rest soon."
|
|
20395
|
-
};
|
|
20396
|
-
} else if (percentage >= 10) {
|
|
20397
|
-
return {
|
|
20398
|
-
level: "tired",
|
|
20399
|
-
recommendation: "Energy is low. Responses may be affected. Rest recommended."
|
|
20400
|
-
};
|
|
20401
|
-
} else {
|
|
20402
|
-
return {
|
|
20403
|
-
level: "exhausted",
|
|
20404
|
-
recommendation: "Energy is critically low. Rest immediately to restore normal function."
|
|
20405
|
-
};
|
|
20406
|
-
}
|
|
20407
|
-
}
|
|
20408
|
-
function createEnergyToolExecutors(context) {
|
|
20409
|
-
return {
|
|
20410
|
-
energy_rest: async (input) => {
|
|
20411
|
-
const manager = context.getEnergyManager();
|
|
20412
|
-
if (!manager) {
|
|
20413
|
-
return JSON.stringify({
|
|
20414
|
-
success: false,
|
|
20415
|
-
error: "Energy system not enabled"
|
|
20416
|
-
});
|
|
20417
|
-
}
|
|
20418
|
-
const stateBefore = context.getEnergyState();
|
|
20419
|
-
if (!stateBefore) {
|
|
20420
|
-
return JSON.stringify({
|
|
20421
|
-
success: false,
|
|
20422
|
-
error: "Unable to get energy state"
|
|
20423
|
-
});
|
|
20424
|
-
}
|
|
20425
|
-
const defaultAmount = Math.floor(stateBefore.max * 0.2);
|
|
20426
|
-
const amount = typeof input.amount === "number" && input.amount > 0 ? Math.min(input.amount, stateBefore.max) : defaultAmount;
|
|
20427
|
-
context.restEnergy(amount);
|
|
20428
|
-
const stateAfter = context.getEnergyState();
|
|
20429
|
-
if (!stateAfter) {
|
|
20430
|
-
return JSON.stringify({
|
|
20431
|
-
success: true,
|
|
20432
|
-
message: "Rested successfully",
|
|
20433
|
-
restored: amount
|
|
20434
|
-
});
|
|
20435
|
-
}
|
|
20436
|
-
const actualRestored = stateAfter.current - stateBefore.current;
|
|
20437
|
-
const percentage = Math.round(stateAfter.current / stateAfter.max * 100);
|
|
20438
|
-
const { level } = getEnergyLevelInfo(percentage);
|
|
20439
|
-
return JSON.stringify({
|
|
20440
|
-
success: true,
|
|
20441
|
-
message: `Restored ${actualRestored} energy points`,
|
|
20442
|
-
before: {
|
|
20443
|
-
current: stateBefore.current,
|
|
20444
|
-
percentage: Math.round(stateBefore.current / stateBefore.max * 100)
|
|
20445
|
-
},
|
|
20446
|
-
after: {
|
|
20447
|
-
current: stateAfter.current,
|
|
20448
|
-
max: stateAfter.max,
|
|
20449
|
-
percentage,
|
|
20450
|
-
level
|
|
20451
|
-
}
|
|
20452
|
-
});
|
|
20453
|
-
},
|
|
20454
|
-
energy_info: async () => {
|
|
20455
|
-
const state = context.getEnergyState();
|
|
20456
|
-
if (!state) {
|
|
20457
|
-
return JSON.stringify({
|
|
20458
|
-
success: false,
|
|
20459
|
-
error: "Energy system not enabled or unavailable"
|
|
20460
|
-
});
|
|
20461
|
-
}
|
|
20462
|
-
const manager = context.getEnergyManager();
|
|
20463
|
-
const effects = manager?.getEffects();
|
|
20464
|
-
const percentage = Math.round(state.current / state.max * 100);
|
|
20465
|
-
const { level, recommendation } = getEnergyLevelInfo(percentage);
|
|
20466
|
-
const response = {
|
|
20467
|
-
success: true,
|
|
20468
|
-
energy: {
|
|
20469
|
-
current: state.current,
|
|
20470
|
-
max: state.max,
|
|
20471
|
-
percentage,
|
|
20472
|
-
level,
|
|
20473
|
-
regenRate: state.regenRate,
|
|
20474
|
-
lastUpdate: state.lastUpdate
|
|
20475
|
-
},
|
|
20476
|
-
recommendation
|
|
20477
|
-
};
|
|
20478
|
-
if (effects) {
|
|
20479
|
-
response.effects = {
|
|
20480
|
-
level: effects.level,
|
|
20481
|
-
promptModifier: effects.promptModifier || null,
|
|
20482
|
-
responseLengthFactor: effects.responseLengthFactor,
|
|
20483
|
-
processingDelayMs: effects.processingDelayMs
|
|
20484
|
-
};
|
|
20485
|
-
if (effects.message) {
|
|
20486
|
-
response.statusMessage = effects.message;
|
|
20487
|
-
}
|
|
20488
|
-
}
|
|
20489
|
-
return JSON.stringify(response);
|
|
20490
|
-
}
|
|
20491
|
-
};
|
|
20492
|
-
}
|
|
20493
|
-
function registerEnergyTools(registry, context) {
|
|
20494
|
-
const executors = createEnergyToolExecutors(context);
|
|
20495
|
-
for (const tool of energyTools) {
|
|
20496
|
-
registry.register(tool, executors[tool.name]);
|
|
20497
|
-
}
|
|
20498
|
-
}
|
|
20499
|
-
var energyRestTool, energyStatusTool, energyTools;
|
|
20500
|
-
var init_energy = __esm(() => {
|
|
20501
|
-
energyRestTool = {
|
|
20502
|
-
name: "energy_rest",
|
|
20503
|
-
description: "Recharge energy by resting. Restores a specified amount of energy points (default: 20% of max energy). Use when energy is low to avoid tired responses.",
|
|
20504
|
-
parameters: {
|
|
20505
|
-
type: "object",
|
|
20506
|
-
properties: {
|
|
20507
|
-
amount: {
|
|
20508
|
-
type: "number",
|
|
20509
|
-
description: "Amount of energy to restore (default: 20% of max, which is typically 2000 points)"
|
|
20510
|
-
}
|
|
20511
|
-
},
|
|
20512
|
-
required: []
|
|
20513
|
-
}
|
|
20514
|
-
};
|
|
20515
|
-
energyStatusTool = {
|
|
20516
|
-
name: "energy_info",
|
|
20517
|
-
description: "Get detailed information about the current energy state including level, effects, and recommendations.",
|
|
20518
|
-
parameters: {
|
|
20519
|
-
type: "object",
|
|
20520
|
-
properties: {},
|
|
20521
|
-
required: []
|
|
20522
|
-
}
|
|
20523
|
-
};
|
|
20524
|
-
energyTools = [
|
|
20525
|
-
energyRestTool,
|
|
20526
|
-
energyStatusTool
|
|
20527
|
-
];
|
|
20528
|
-
});
|
|
20529
|
-
|
|
20530
20348
|
// packages/core/src/heartbeat/history.ts
|
|
20531
20349
|
function getDb() {
|
|
20532
20350
|
return getDatabase();
|
|
@@ -24318,6 +24136,7 @@ var init_bash = __esm(async () => {
|
|
|
24318
24136
|
"git tag",
|
|
24319
24137
|
"connect-",
|
|
24320
24138
|
"connect_",
|
|
24139
|
+
"connectors",
|
|
24321
24140
|
"node --version",
|
|
24322
24141
|
"bun --version",
|
|
24323
24142
|
"npm --version",
|
|
@@ -24538,7 +24357,7 @@ var init_bash = __esm(async () => {
|
|
|
24538
24357
|
}
|
|
24539
24358
|
const baseCommand = command.replace(/\s*2>&1\s*/g, " ").trim();
|
|
24540
24359
|
const baseTrimmed = baseCommand.toLowerCase();
|
|
24541
|
-
const allowConnectorNewlines = baseTrimmed.startsWith("connect-") || baseTrimmed.startsWith("connect_");
|
|
24360
|
+
const allowConnectorNewlines = baseTrimmed.startsWith("connect-") || baseTrimmed.startsWith("connect_") || baseTrimmed.startsWith("connectors");
|
|
24542
24361
|
const commandForExec = allowConnectorNewlines ? normalizeNewlinesOutsideQuotes(baseCommand).trim() : baseCommand;
|
|
24543
24362
|
const commandForChecks = commandForExec;
|
|
24544
24363
|
const commandSansQuotes = stripQuotedSegments(commandForChecks);
|
|
@@ -80232,7 +80051,6 @@ class BuiltinCommands {
|
|
|
80232
80051
|
loader.register(this.projectsCommand());
|
|
80233
80052
|
loader.register(this.plansCommand());
|
|
80234
80053
|
loader.register(this.summarizeCommand());
|
|
80235
|
-
loader.register(this.restCommand());
|
|
80236
80054
|
loader.register(this.voiceCommand());
|
|
80237
80055
|
loader.register(this.talkCommand());
|
|
80238
80056
|
loader.register(this.assistantCommand());
|
|
@@ -86170,40 +85988,6 @@ Not enough context to summarize yet.
|
|
|
86170
85988
|
}
|
|
86171
85989
|
};
|
|
86172
85990
|
}
|
|
86173
|
-
restCommand() {
|
|
86174
|
-
return {
|
|
86175
|
-
name: "rest",
|
|
86176
|
-
description: "Recharge assistant energy (optional: amount, e.g. /rest 5000)",
|
|
86177
|
-
builtin: true,
|
|
86178
|
-
selfHandled: true,
|
|
86179
|
-
content: "",
|
|
86180
|
-
handler: async (args, context) => {
|
|
86181
|
-
if (!context.restEnergy) {
|
|
86182
|
-
context.emit("text", `
|
|
86183
|
-
Energy system is not available.
|
|
86184
|
-
`);
|
|
86185
|
-
context.emit("done");
|
|
86186
|
-
return { handled: true };
|
|
86187
|
-
}
|
|
86188
|
-
const parsed = parseInt(args.trim(), 10);
|
|
86189
|
-
const amount = Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
86190
|
-
context.restEnergy(amount);
|
|
86191
|
-
const state = context.getEnergyState?.();
|
|
86192
|
-
if (state) {
|
|
86193
|
-
const percent = Math.round(state.current / Math.max(1, state.max) * 100);
|
|
86194
|
-
context.emit("text", `
|
|
86195
|
-
Energy restored. Current level: ${percent}% (${state.current}/${state.max}).
|
|
86196
|
-
`);
|
|
86197
|
-
} else {
|
|
86198
|
-
context.emit("text", `
|
|
86199
|
-
Energy restored.
|
|
86200
|
-
`);
|
|
86201
|
-
}
|
|
86202
|
-
context.emit("done");
|
|
86203
|
-
return { handled: true };
|
|
86204
|
-
}
|
|
86205
|
-
};
|
|
86206
|
-
}
|
|
86207
85991
|
skillsCommand(loader) {
|
|
86208
85992
|
return {
|
|
86209
85993
|
name: "skills",
|
|
@@ -86478,7 +86262,7 @@ Options for install/uninstall:
|
|
|
86478
86262
|
statusCommand() {
|
|
86479
86263
|
return {
|
|
86480
86264
|
name: "status",
|
|
86481
|
-
description: "Show session overview: status,
|
|
86265
|
+
description: "Show session overview: status, identity, tokens, and runtime info",
|
|
86482
86266
|
builtin: true,
|
|
86483
86267
|
selfHandled: true,
|
|
86484
86268
|
content: "",
|
|
@@ -86502,14 +86286,6 @@ Options for install/uninstall:
|
|
|
86502
86286
|
message += ` \xB7 ${identity.name}`;
|
|
86503
86287
|
}
|
|
86504
86288
|
message += `
|
|
86505
|
-
`;
|
|
86506
|
-
}
|
|
86507
|
-
const energyState = context.getEnergyState?.();
|
|
86508
|
-
if (energyState) {
|
|
86509
|
-
const energyPercent = Math.round(energyState.current / Math.max(1, energyState.max) * 100);
|
|
86510
|
-
const energyBar = "\u2588".repeat(Math.round(energyPercent / 10)) + "\u2591".repeat(10 - Math.round(energyPercent / 10));
|
|
86511
|
-
const energyEmoji = energyPercent > 70 ? "\u26A1" : energyPercent > 30 ? "\uD83D\uDD0B" : "\uD83E\uDEAB";
|
|
86512
|
-
message += `**Energy:** ${energyEmoji} [${energyBar}] ${energyPercent}% (${energyState.current}/${energyState.max})
|
|
86513
86289
|
`;
|
|
86514
86290
|
}
|
|
86515
86291
|
const voiceState = context.getVoiceState?.();
|
|
@@ -86610,7 +86386,7 @@ Format the summary as a brief bullet-point list. This summary will replace the c
|
|
|
86610
86386
|
configCommand() {
|
|
86611
86387
|
return {
|
|
86612
86388
|
name: "config",
|
|
86613
|
-
description: "View and edit configuration interactively (model, context,
|
|
86389
|
+
description: "View and edit configuration interactively (model, context, etc.)",
|
|
86614
86390
|
builtin: true,
|
|
86615
86391
|
selfHandled: true,
|
|
86616
86392
|
content: "",
|
|
@@ -88820,9 +88596,9 @@ Connector "${connectorName}" not found.
|
|
|
88820
88596
|
message += `No connectors found.
|
|
88821
88597
|
|
|
88822
88598
|
`;
|
|
88823
|
-
message += "
|
|
88824
|
-
message += `
|
|
88825
|
-
|
|
88599
|
+
message += "Install connectors using the `connectors` CLI:\n";
|
|
88600
|
+
message += " `connectors install <name>` (e.g. `connectors install gmail`)\n\n";
|
|
88601
|
+
message += "Or install standalone `connect-*` CLIs:\n";
|
|
88826
88602
|
message += " `bun add -g connect-<name>`\n\n";
|
|
88827
88603
|
message += "Then run `/connectors` again to verify it is detected.\n";
|
|
88828
88604
|
} else {
|
|
@@ -89241,7 +89017,7 @@ Not a git repository or git not available.
|
|
|
89241
89017
|
context.setProjectContext(projectContext);
|
|
89242
89018
|
}
|
|
89243
89019
|
}
|
|
89244
|
-
var VERSION2 = "1.1.
|
|
89020
|
+
var VERSION2 = "1.1.71";
|
|
89245
89021
|
var init_builtin = __esm(async () => {
|
|
89246
89022
|
init_src2();
|
|
89247
89023
|
init_context3();
|
|
@@ -93742,7 +93518,7 @@ ${systemPrompt}` : this.getDefaultSystemPrompt();
|
|
|
93742
93518
|
return `You are a helpful personal AI assistant running in the terminal.
|
|
93743
93519
|
|
|
93744
93520
|
You have access to various tools and connectors:
|
|
93745
|
-
- Connectors
|
|
93521
|
+
- Connectors installed via \`connectors install <name>\` or standalone connect-* CLIs. To install a new connector, use the bash tool to run \`connectors install <name>\`.
|
|
93746
93522
|
- Filesystem operations (read, write, search files)
|
|
93747
93523
|
- Shell command execution
|
|
93748
93524
|
- Scheduling tools for recurring or delayed commands
|
|
@@ -94079,7 +93855,7 @@ ${systemPrompt}` : this.getDefaultSystemPrompt();
|
|
|
94079
93855
|
return `You are a helpful personal AI assistant running in the terminal.
|
|
94080
93856
|
|
|
94081
93857
|
You have access to various tools and connectors:
|
|
94082
|
-
- Connectors
|
|
93858
|
+
- Connectors installed via \`connectors install <name>\` or standalone connect-* CLIs. To install a new connector, use the bash tool to run \`connectors install <name>\`.
|
|
94083
93859
|
- Filesystem operations (read, write, search files)
|
|
94084
93860
|
- Shell command execution
|
|
94085
93861
|
- Scheduling tools for recurring or delayed commands
|
|
@@ -94684,218 +94460,6 @@ var init_heartbeat2 = __esm(async () => {
|
|
|
94684
94460
|
]);
|
|
94685
94461
|
});
|
|
94686
94462
|
|
|
94687
|
-
// packages/core/src/energy/types.ts
|
|
94688
|
-
function buildEnergyConfig(config) {
|
|
94689
|
-
return {
|
|
94690
|
-
enabled: config?.enabled ?? DEFAULT_ENERGY_CONFIG.enabled,
|
|
94691
|
-
costs: {
|
|
94692
|
-
...DEFAULT_ENERGY_COSTS,
|
|
94693
|
-
...config?.costs || {}
|
|
94694
|
-
},
|
|
94695
|
-
regenRate: config?.regenRate ?? DEFAULT_ENERGY_CONFIG.regenRate,
|
|
94696
|
-
lowEnergyThreshold: config?.lowEnergyThreshold ?? DEFAULT_ENERGY_CONFIG.lowEnergyThreshold,
|
|
94697
|
-
criticalThreshold: config?.criticalThreshold ?? DEFAULT_ENERGY_CONFIG.criticalThreshold,
|
|
94698
|
-
maxEnergy: config?.maxEnergy ?? DEFAULT_ENERGY_CONFIG.maxEnergy
|
|
94699
|
-
};
|
|
94700
|
-
}
|
|
94701
|
-
function createInitialEnergyState(config) {
|
|
94702
|
-
return {
|
|
94703
|
-
current: config.maxEnergy,
|
|
94704
|
-
max: config.maxEnergy,
|
|
94705
|
-
regenRate: config.regenRate,
|
|
94706
|
-
lastUpdate: new Date().toISOString()
|
|
94707
|
-
};
|
|
94708
|
-
}
|
|
94709
|
-
var DEFAULT_ENERGY_COSTS, DEFAULT_ENERGY_CONFIG;
|
|
94710
|
-
var init_types6 = __esm(() => {
|
|
94711
|
-
DEFAULT_ENERGY_COSTS = {
|
|
94712
|
-
message: 200,
|
|
94713
|
-
toolCall: 500,
|
|
94714
|
-
llmCall: 300,
|
|
94715
|
-
longContext: 1000
|
|
94716
|
-
};
|
|
94717
|
-
DEFAULT_ENERGY_CONFIG = {
|
|
94718
|
-
enabled: true,
|
|
94719
|
-
costs: DEFAULT_ENERGY_COSTS,
|
|
94720
|
-
regenRate: 500,
|
|
94721
|
-
lowEnergyThreshold: 3000,
|
|
94722
|
-
criticalThreshold: 1000,
|
|
94723
|
-
maxEnergy: 1e4
|
|
94724
|
-
};
|
|
94725
|
-
});
|
|
94726
|
-
|
|
94727
|
-
// packages/core/src/energy/personality.ts
|
|
94728
|
-
function effectsForLevel(level) {
|
|
94729
|
-
const effect = PERSONALITIES[level];
|
|
94730
|
-
return {
|
|
94731
|
-
level,
|
|
94732
|
-
promptModifier: effect.promptModifier,
|
|
94733
|
-
responseLengthFactor: effect.responseLengthFactor,
|
|
94734
|
-
processingDelayMs: effect.processingDelayMs,
|
|
94735
|
-
message: effect.message ?? null
|
|
94736
|
-
};
|
|
94737
|
-
}
|
|
94738
|
-
function applyPersonality(systemPrompt, effects) {
|
|
94739
|
-
if (!effects.promptModifier)
|
|
94740
|
-
return systemPrompt;
|
|
94741
|
-
return `${systemPrompt}
|
|
94742
|
-
|
|
94743
|
-
${effects.promptModifier}`;
|
|
94744
|
-
}
|
|
94745
|
-
var PERSONALITIES;
|
|
94746
|
-
var init_personality = __esm(() => {
|
|
94747
|
-
PERSONALITIES = {
|
|
94748
|
-
energetic: {
|
|
94749
|
-
responseLengthFactor: 1,
|
|
94750
|
-
processingDelayMs: 0,
|
|
94751
|
-
message: null
|
|
94752
|
-
},
|
|
94753
|
-
tired: {
|
|
94754
|
-
promptModifier: "You are feeling a bit tired. Keep responses concise and focused.",
|
|
94755
|
-
responseLengthFactor: 0.85,
|
|
94756
|
-
processingDelayMs: 200,
|
|
94757
|
-
message: "Getting a bit tired... responses may be shorter."
|
|
94758
|
-
},
|
|
94759
|
-
exhausted: {
|
|
94760
|
-
promptModifier: "You are very tired. Provide minimal but helpful responses.",
|
|
94761
|
-
responseLengthFactor: 0.6,
|
|
94762
|
-
processingDelayMs: 500,
|
|
94763
|
-
message: "*yawns* Running low on energy. Responses will be brief."
|
|
94764
|
-
}
|
|
94765
|
-
};
|
|
94766
|
-
});
|
|
94767
|
-
|
|
94768
|
-
// packages/core/src/energy/manager.ts
|
|
94769
|
-
class EnergyManager {
|
|
94770
|
-
config;
|
|
94771
|
-
state;
|
|
94772
|
-
storage;
|
|
94773
|
-
regenInterval;
|
|
94774
|
-
constructor(config, storage) {
|
|
94775
|
-
this.config = buildEnergyConfig(config);
|
|
94776
|
-
this.storage = storage;
|
|
94777
|
-
this.state = createInitialEnergyState(this.config);
|
|
94778
|
-
}
|
|
94779
|
-
async initialize() {
|
|
94780
|
-
const saved = await this.storage.load();
|
|
94781
|
-
if (saved) {
|
|
94782
|
-
this.state = saved;
|
|
94783
|
-
this.applyOfflineRegen();
|
|
94784
|
-
this.storage.save(this.state);
|
|
94785
|
-
}
|
|
94786
|
-
this.startRegen();
|
|
94787
|
-
}
|
|
94788
|
-
consume(action) {
|
|
94789
|
-
if (!this.config.enabled)
|
|
94790
|
-
return true;
|
|
94791
|
-
const cost = this.config.costs[action] ?? 0;
|
|
94792
|
-
const enough = this.state.current >= cost;
|
|
94793
|
-
this.state.current = Math.max(0, this.state.current - cost);
|
|
94794
|
-
this.state.lastUpdate = new Date().toISOString();
|
|
94795
|
-
this.storage.save(this.state);
|
|
94796
|
-
return enough;
|
|
94797
|
-
}
|
|
94798
|
-
rest(amount = 20) {
|
|
94799
|
-
this.state.current = Math.min(this.state.max, this.state.current + amount);
|
|
94800
|
-
this.state.lastUpdate = new Date().toISOString();
|
|
94801
|
-
this.storage.save(this.state);
|
|
94802
|
-
}
|
|
94803
|
-
getState() {
|
|
94804
|
-
return { ...this.state };
|
|
94805
|
-
}
|
|
94806
|
-
getEffects() {
|
|
94807
|
-
if (!this.config.enabled) {
|
|
94808
|
-
return effectsForLevel("energetic");
|
|
94809
|
-
}
|
|
94810
|
-
const level = this.state.current;
|
|
94811
|
-
if (level <= this.config.criticalThreshold) {
|
|
94812
|
-
return effectsForLevel("exhausted");
|
|
94813
|
-
}
|
|
94814
|
-
if (level <= this.config.lowEnergyThreshold) {
|
|
94815
|
-
return effectsForLevel("tired");
|
|
94816
|
-
}
|
|
94817
|
-
return effectsForLevel("energetic");
|
|
94818
|
-
}
|
|
94819
|
-
stop() {
|
|
94820
|
-
if (this.regenInterval) {
|
|
94821
|
-
clearInterval(this.regenInterval);
|
|
94822
|
-
}
|
|
94823
|
-
}
|
|
94824
|
-
startRegen() {
|
|
94825
|
-
if (!this.config.enabled)
|
|
94826
|
-
return;
|
|
94827
|
-
if (this.config.regenRate <= 0)
|
|
94828
|
-
return;
|
|
94829
|
-
if (this.regenInterval)
|
|
94830
|
-
return;
|
|
94831
|
-
const intervalMs = Math.max(1000, Math.floor(60000 / this.config.regenRate));
|
|
94832
|
-
this.regenInterval = setInterval(() => {
|
|
94833
|
-
if (this.state.current < this.state.max) {
|
|
94834
|
-
this.state.current = Math.min(this.state.max, this.state.current + 1);
|
|
94835
|
-
this.state.lastUpdate = new Date().toISOString();
|
|
94836
|
-
this.storage.save(this.state);
|
|
94837
|
-
}
|
|
94838
|
-
}, intervalMs);
|
|
94839
|
-
if (typeof this.regenInterval.unref === "function") {
|
|
94840
|
-
this.regenInterval.unref();
|
|
94841
|
-
}
|
|
94842
|
-
}
|
|
94843
|
-
applyOfflineRegen() {
|
|
94844
|
-
const lastUpdate = new Date(this.state.lastUpdate).getTime();
|
|
94845
|
-
const now2 = Date.now();
|
|
94846
|
-
const minutesElapsed = Math.max(0, (now2 - lastUpdate) / 60000);
|
|
94847
|
-
const regenAmount = Math.floor(minutesElapsed * this.config.regenRate);
|
|
94848
|
-
if (regenAmount > 0) {
|
|
94849
|
-
this.state.current = Math.min(this.state.max, this.state.current + regenAmount);
|
|
94850
|
-
this.state.lastUpdate = new Date().toISOString();
|
|
94851
|
-
}
|
|
94852
|
-
}
|
|
94853
|
-
}
|
|
94854
|
-
var init_manager3 = __esm(() => {
|
|
94855
|
-
init_types6();
|
|
94856
|
-
init_personality();
|
|
94857
|
-
});
|
|
94858
|
-
|
|
94859
|
-
// packages/core/src/energy/storage.ts
|
|
94860
|
-
class EnergyStorage {
|
|
94861
|
-
db;
|
|
94862
|
-
constructor(db) {
|
|
94863
|
-
this.db = db || getDatabase();
|
|
94864
|
-
}
|
|
94865
|
-
async save(state) {
|
|
94866
|
-
try {
|
|
94867
|
-
this.db.prepare(`INSERT OR REPLACE INTO energy_state (id, current_energy, max_energy, regen_rate, last_update)
|
|
94868
|
-
VALUES ('default', ?, ?, ?, ?)`).run(state.current, state.max, state.regenRate, state.lastUpdate);
|
|
94869
|
-
} catch {}
|
|
94870
|
-
}
|
|
94871
|
-
async load() {
|
|
94872
|
-
try {
|
|
94873
|
-
const row = this.db.query(`SELECT * FROM energy_state WHERE id = 'default'`).get();
|
|
94874
|
-
if (!row)
|
|
94875
|
-
return null;
|
|
94876
|
-
return {
|
|
94877
|
-
current: row.current_energy,
|
|
94878
|
-
max: row.max_energy,
|
|
94879
|
-
regenRate: row.regen_rate,
|
|
94880
|
-
lastUpdate: row.last_update
|
|
94881
|
-
};
|
|
94882
|
-
} catch {
|
|
94883
|
-
return null;
|
|
94884
|
-
}
|
|
94885
|
-
}
|
|
94886
|
-
}
|
|
94887
|
-
var init_storage = __esm(async () => {
|
|
94888
|
-
await init_database();
|
|
94889
|
-
});
|
|
94890
|
-
|
|
94891
|
-
// packages/core/src/energy/index.ts
|
|
94892
|
-
var init_energy2 = __esm(async () => {
|
|
94893
|
-
init_manager3();
|
|
94894
|
-
init_personality();
|
|
94895
|
-
init_types6();
|
|
94896
|
-
await init_storage();
|
|
94897
|
-
});
|
|
94898
|
-
|
|
94899
94463
|
// packages/core/src/validation/llm-response.ts
|
|
94900
94464
|
function validateToolCalls(toolCalls, tools) {
|
|
94901
94465
|
const toolMap = new Map;
|
|
@@ -95761,7 +95325,7 @@ class VoiceManager {
|
|
|
95761
95325
|
});
|
|
95762
95326
|
}
|
|
95763
95327
|
}
|
|
95764
|
-
var
|
|
95328
|
+
var init_manager3 = __esm(() => {
|
|
95765
95329
|
init_stt();
|
|
95766
95330
|
init_tts();
|
|
95767
95331
|
init_player();
|
|
@@ -107732,7 +107296,7 @@ More information can be found at: https://a.co/c895JFp`);
|
|
|
107732
107296
|
|
|
107733
107297
|
// node_modules/.bun/@aws-sdk+middleware-flexible-checksums@3.972.8/node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js
|
|
107734
107298
|
var CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS;
|
|
107735
|
-
var
|
|
107299
|
+
var init_types6 = __esm(() => {
|
|
107736
107300
|
init_constants2();
|
|
107737
107301
|
CLIENT_SUPPORTED_ALGORITHMS = [
|
|
107738
107302
|
ChecksumAlgorithm.CRC32,
|
|
@@ -107766,7 +107330,7 @@ var getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestA
|
|
|
107766
107330
|
};
|
|
107767
107331
|
var init_getChecksumAlgorithmForRequest = __esm(() => {
|
|
107768
107332
|
init_constants2();
|
|
107769
|
-
|
|
107333
|
+
init_types6();
|
|
107770
107334
|
});
|
|
107771
107335
|
|
|
107772
107336
|
// node_modules/.bun/@aws-sdk+middleware-flexible-checksums@3.972.8/node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js
|
|
@@ -108913,7 +108477,7 @@ var getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {
|
|
|
108913
108477
|
return validChecksumAlgorithms;
|
|
108914
108478
|
};
|
|
108915
108479
|
var init_getChecksumAlgorithmListForResponse = __esm(() => {
|
|
108916
|
-
|
|
108480
|
+
init_types6();
|
|
108917
108481
|
});
|
|
108918
108482
|
|
|
108919
108483
|
// node_modules/.bun/@aws-sdk+middleware-flexible-checksums@3.972.8/node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js
|
|
@@ -117865,7 +117429,7 @@ var init_fromInstanceMetadata = __esm(() => {
|
|
|
117865
117429
|
});
|
|
117866
117430
|
|
|
117867
117431
|
// node_modules/.bun/@smithy+credential-provider-imds@4.2.8/node_modules/@smithy/credential-provider-imds/dist-es/types.js
|
|
117868
|
-
var
|
|
117432
|
+
var init_types7 = () => {};
|
|
117869
117433
|
|
|
117870
117434
|
// node_modules/.bun/@smithy+credential-provider-imds@4.2.8/node_modules/@smithy/credential-provider-imds/dist-es/index.js
|
|
117871
117435
|
var exports_dist_es2 = {};
|
|
@@ -117888,7 +117452,7 @@ var init_dist_es10 = __esm(() => {
|
|
|
117888
117452
|
init_Endpoint();
|
|
117889
117453
|
init_fromContainerMetadata();
|
|
117890
117454
|
init_fromInstanceMetadata();
|
|
117891
|
-
|
|
117455
|
+
init_types7();
|
|
117892
117456
|
});
|
|
117893
117457
|
|
|
117894
117458
|
// node_modules/.bun/@aws-sdk+credential-provider-http@3.972.10/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js
|
|
@@ -122256,7 +121820,7 @@ var init_fromSSO = __esm(() => {
|
|
|
122256
121820
|
});
|
|
122257
121821
|
|
|
122258
121822
|
// node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.8/node_modules/@aws-sdk/credential-provider-sso/dist-es/types.js
|
|
122259
|
-
var
|
|
121823
|
+
var init_types8 = () => {};
|
|
122260
121824
|
|
|
122261
121825
|
// node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.8/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js
|
|
122262
121826
|
var exports_dist_es4 = {};
|
|
@@ -122267,7 +121831,7 @@ __export(exports_dist_es4, {
|
|
|
122267
121831
|
});
|
|
122268
121832
|
var init_dist_es14 = __esm(() => {
|
|
122269
121833
|
init_fromSSO();
|
|
122270
|
-
|
|
121834
|
+
init_types8();
|
|
122271
121835
|
init_validateSsoProfile();
|
|
122272
121836
|
});
|
|
122273
121837
|
|
|
@@ -124165,12 +123729,12 @@ var init_fromLoginCredentials = __esm(() => {
|
|
|
124165
123729
|
});
|
|
124166
123730
|
|
|
124167
123731
|
// node_modules/.bun/@aws-sdk+credential-provider-login@3.972.8/node_modules/@aws-sdk/credential-provider-login/dist-es/types.js
|
|
124168
|
-
var
|
|
123732
|
+
var init_types9 = () => {};
|
|
124169
123733
|
|
|
124170
123734
|
// node_modules/.bun/@aws-sdk+credential-provider-login@3.972.8/node_modules/@aws-sdk/credential-provider-login/dist-es/index.js
|
|
124171
123735
|
var init_dist_es15 = __esm(() => {
|
|
124172
123736
|
init_fromLoginCredentials();
|
|
124173
|
-
|
|
123737
|
+
init_types9();
|
|
124174
123738
|
});
|
|
124175
123739
|
|
|
124176
123740
|
// node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.8/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
|
|
@@ -152205,7 +151769,7 @@ function createWebhooksManager(assistantId, config) {
|
|
|
152205
151769
|
config
|
|
152206
151770
|
});
|
|
152207
151771
|
}
|
|
152208
|
-
var
|
|
151772
|
+
var init_manager4 = __esm(async () => {
|
|
152209
151773
|
init_crypto();
|
|
152210
151774
|
await __promiseAll([
|
|
152211
151775
|
init_local_storage2(),
|
|
@@ -152543,7 +152107,7 @@ var init_webhooks4 = __esm(async () => {
|
|
|
152543
152107
|
init_crypto();
|
|
152544
152108
|
init_tools9();
|
|
152545
152109
|
await __promiseAll([
|
|
152546
|
-
|
|
152110
|
+
init_manager4(),
|
|
152547
152111
|
init_local_storage2(),
|
|
152548
152112
|
init_watcher2()
|
|
152549
152113
|
]);
|
|
@@ -153049,7 +152613,7 @@ function createChannelsManager(assistantId, assistantName, config, options) {
|
|
|
153049
152613
|
dbPath: options?.dbPath
|
|
153050
152614
|
});
|
|
153051
152615
|
}
|
|
153052
|
-
var
|
|
152616
|
+
var init_manager5 = __esm(async () => {
|
|
153053
152617
|
await init_store7();
|
|
153054
152618
|
});
|
|
153055
152619
|
|
|
@@ -174276,9 +173840,6 @@ class ClaudeAgentLoop {
|
|
|
174276
173840
|
getContextInfo() {
|
|
174277
173841
|
return null;
|
|
174278
173842
|
}
|
|
174279
|
-
getEnergyState() {
|
|
174280
|
-
return null;
|
|
174281
|
-
}
|
|
174282
173843
|
getVoiceState() {
|
|
174283
173844
|
return null;
|
|
174284
173845
|
}
|
|
@@ -174956,9 +174517,6 @@ class CodexAgentLoop {
|
|
|
174956
174517
|
getContextInfo() {
|
|
174957
174518
|
return null;
|
|
174958
174519
|
}
|
|
174959
|
-
getEnergyState() {
|
|
174960
|
-
return null;
|
|
174961
|
-
}
|
|
174962
174520
|
getVoiceState() {
|
|
174963
174521
|
return null;
|
|
174964
174522
|
}
|
|
@@ -175331,12 +174889,6 @@ class EmbeddedClient {
|
|
|
175331
174889
|
getTokenUsage() {
|
|
175332
174890
|
return this.assistantLoop.getTokenUsage();
|
|
175333
174891
|
}
|
|
175334
|
-
getEnergyState() {
|
|
175335
|
-
if (typeof this.assistantLoop.getEnergyState === "function") {
|
|
175336
|
-
return this.assistantLoop.getEnergyState();
|
|
175337
|
-
}
|
|
175338
|
-
return null;
|
|
175339
|
-
}
|
|
175340
174892
|
getVoiceState() {
|
|
175341
174893
|
if (typeof this.assistantLoop.getVoiceState === "function") {
|
|
175342
174894
|
return this.assistantLoop.getVoiceState();
|
|
@@ -175978,7 +175530,7 @@ var init_tools10 = __esm(() => {
|
|
|
175978
175530
|
var init_channels = __esm(async () => {
|
|
175979
175531
|
init_tools10();
|
|
175980
175532
|
await __promiseAll([
|
|
175981
|
-
|
|
175533
|
+
init_manager5(),
|
|
175982
175534
|
init_agent_pool(),
|
|
175983
175535
|
init_store7()
|
|
175984
175536
|
]);
|
|
@@ -176199,7 +175751,7 @@ async function createPeopleManager() {
|
|
|
176199
175751
|
await manager.initialize();
|
|
176200
175752
|
return manager;
|
|
176201
175753
|
}
|
|
176202
|
-
var
|
|
175754
|
+
var init_manager6 = __esm(async () => {
|
|
176203
175755
|
await init_store8();
|
|
176204
175756
|
});
|
|
176205
175757
|
|
|
@@ -176527,7 +176079,7 @@ var init_people = __esm(async () => {
|
|
|
176527
176079
|
init_tools11();
|
|
176528
176080
|
await __promiseAll([
|
|
176529
176081
|
init_store8(),
|
|
176530
|
-
|
|
176082
|
+
init_manager6()
|
|
176531
176083
|
]);
|
|
176532
176084
|
});
|
|
176533
176085
|
|
|
@@ -178103,7 +177655,7 @@ function createTelephonyManager(assistantId, assistantName, config2) {
|
|
|
178103
177655
|
config: config2
|
|
178104
177656
|
});
|
|
178105
177657
|
}
|
|
178106
|
-
var
|
|
177658
|
+
var init_manager7 = __esm(async () => {
|
|
178107
177659
|
init_voice_bridge();
|
|
178108
177660
|
await init_store9();
|
|
178109
177661
|
});
|
|
@@ -178607,7 +178159,7 @@ var init_telephony = __esm(async () => {
|
|
|
178607
178159
|
init_voice_bridge();
|
|
178608
178160
|
init_tools12();
|
|
178609
178161
|
await __promiseAll([
|
|
178610
|
-
|
|
178162
|
+
init_manager7(),
|
|
178611
178163
|
init_store9()
|
|
178612
178164
|
]);
|
|
178613
178165
|
});
|
|
@@ -179075,7 +178627,7 @@ function createOrdersManager(assistantId, assistantName, config2) {
|
|
|
179075
178627
|
config: config2
|
|
179076
178628
|
});
|
|
179077
178629
|
}
|
|
179078
|
-
var
|
|
178630
|
+
var init_manager8 = __esm(async () => {
|
|
179079
178631
|
await init_store10();
|
|
179080
178632
|
});
|
|
179081
178633
|
|
|
@@ -179626,7 +179178,7 @@ var init_tools13 = __esm(() => {
|
|
|
179626
179178
|
var init_orders = __esm(async () => {
|
|
179627
179179
|
init_tools13();
|
|
179628
179180
|
await __promiseAll([
|
|
179629
|
-
|
|
179181
|
+
init_manager8(),
|
|
179630
179182
|
init_store10()
|
|
179631
179183
|
]);
|
|
179632
179184
|
});
|
|
@@ -180090,7 +179642,7 @@ function createContactsManager() {
|
|
|
180090
179642
|
return new ContactsManager;
|
|
180091
179643
|
}
|
|
180092
179644
|
var VALID_RELATIONSHIPS, EMAIL_REGEX, ISO_DATE_REGEX;
|
|
180093
|
-
var
|
|
179645
|
+
var init_manager9 = __esm(async () => {
|
|
180094
179646
|
await init_store11();
|
|
180095
179647
|
VALID_RELATIONSHIPS = ["friend", "colleague", "vendor", "client", "family", "other"];
|
|
180096
179648
|
EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
@@ -180698,7 +180250,7 @@ var init_contacts = __esm(async () => {
|
|
|
180698
180250
|
init_tools14();
|
|
180699
180251
|
await __promiseAll([
|
|
180700
180252
|
init_store11(),
|
|
180701
|
-
|
|
180253
|
+
init_manager9()
|
|
180702
180254
|
]);
|
|
180703
180255
|
});
|
|
180704
180256
|
|
|
@@ -182224,40 +181776,6 @@ function createSelfAwarenessToolExecutors(context) {
|
|
|
182224
181776
|
}
|
|
182225
181777
|
return JSON.stringify(response, null, 2);
|
|
182226
181778
|
},
|
|
182227
|
-
energy_status: async () => {
|
|
182228
|
-
const energyManager = context.getEnergyManager?.();
|
|
182229
|
-
const energyState = context.getEnergyState?.();
|
|
182230
|
-
if (!energyManager || !energyState) {
|
|
182231
|
-
return JSON.stringify({
|
|
182232
|
-
error: "Energy system not available",
|
|
182233
|
-
current: 0,
|
|
182234
|
-
max: 0,
|
|
182235
|
-
percentage: 0,
|
|
182236
|
-
level: "energetic",
|
|
182237
|
-
regenRate: 0,
|
|
182238
|
-
effects: {
|
|
182239
|
-
promptModifier: null,
|
|
182240
|
-
responseLengthFactor: 1,
|
|
182241
|
-
processingDelayMs: 0
|
|
182242
|
-
}
|
|
182243
|
-
});
|
|
182244
|
-
}
|
|
182245
|
-
const effects = energyManager.getEffects();
|
|
182246
|
-
const percentage = energyState.max > 0 ? Math.round(energyState.current / energyState.max * 100) : 0;
|
|
182247
|
-
const response = {
|
|
182248
|
-
current: energyState.current,
|
|
182249
|
-
max: energyState.max,
|
|
182250
|
-
percentage,
|
|
182251
|
-
level: effects.level,
|
|
182252
|
-
regenRate: energyState.regenRate,
|
|
182253
|
-
effects: {
|
|
182254
|
-
promptModifier: effects.promptModifier ?? null,
|
|
182255
|
-
responseLengthFactor: effects.responseLengthFactor,
|
|
182256
|
-
processingDelayMs: effects.processingDelayMs
|
|
182257
|
-
}
|
|
182258
|
-
};
|
|
182259
|
-
return JSON.stringify(response, null, 2);
|
|
182260
|
-
},
|
|
182261
181779
|
resource_limits: async () => {
|
|
182262
181780
|
const contextInfo = context.getContextInfo?.();
|
|
182263
181781
|
const walletManager = context.getWalletManager?.();
|
|
@@ -182268,12 +181786,6 @@ function createSelfAwarenessToolExecutors(context) {
|
|
|
182268
181786
|
maxMessages: 500,
|
|
182269
181787
|
keepRecentMessages: 10
|
|
182270
181788
|
};
|
|
182271
|
-
const defaultEnergyCosts = {
|
|
182272
|
-
message: 200,
|
|
182273
|
-
toolCall: 500,
|
|
182274
|
-
llmCall: 300,
|
|
182275
|
-
longContext: 1000
|
|
182276
|
-
};
|
|
182277
181789
|
const response = {
|
|
182278
181790
|
context: {
|
|
182279
181791
|
maxTokens: contextConfig.maxContextTokens,
|
|
@@ -182282,13 +181794,6 @@ function createSelfAwarenessToolExecutors(context) {
|
|
|
182282
181794
|
maxMessages: contextConfig.maxMessages,
|
|
182283
181795
|
keepRecentMessages: contextConfig.keepRecentMessages
|
|
182284
181796
|
},
|
|
182285
|
-
energy: {
|
|
182286
|
-
enabled: true,
|
|
182287
|
-
maxEnergy: 1e4,
|
|
182288
|
-
lowThreshold: 3000,
|
|
182289
|
-
criticalThreshold: 1000,
|
|
182290
|
-
costs: defaultEnergyCosts
|
|
182291
|
-
},
|
|
182292
181797
|
wallet: {
|
|
182293
181798
|
configured: walletManager?.isConfigured() ?? false
|
|
182294
181799
|
}
|
|
@@ -182632,7 +182137,7 @@ function registerSelfAwarenessTools(registry2, context) {
|
|
|
182632
182137
|
registry2.register(tool2, executors[tool2.name]);
|
|
182633
182138
|
}
|
|
182634
182139
|
}
|
|
182635
|
-
var contextGetTool, contextStatsTool, whoamiTool, identityGetTool2,
|
|
182140
|
+
var contextGetTool, contextStatsTool, whoamiTool, identityGetTool2, resourceLimitsTool, sessionStatsTool, toolStatsTool, statsSummaryTool, sessionStateTool, workspaceMapTool, messageIndexTool, uiStateTool, selfAwarenessTools;
|
|
182636
182141
|
var init_self_awareness = __esm(() => {
|
|
182637
182142
|
contextGetTool = {
|
|
182638
182143
|
name: "context_get",
|
|
@@ -182670,18 +182175,9 @@ var init_self_awareness = __esm(() => {
|
|
|
182670
182175
|
required: []
|
|
182671
182176
|
}
|
|
182672
182177
|
};
|
|
182673
|
-
energyStatusTool2 = {
|
|
182674
|
-
name: "energy_status",
|
|
182675
|
-
description: "Get current energy state, level, and any effects (like response modifications). Check before expensive operations.",
|
|
182676
|
-
parameters: {
|
|
182677
|
-
type: "object",
|
|
182678
|
-
properties: {},
|
|
182679
|
-
required: []
|
|
182680
|
-
}
|
|
182681
|
-
};
|
|
182682
182178
|
resourceLimitsTool = {
|
|
182683
182179
|
name: "resource_limits",
|
|
182684
|
-
description: "Get current resource limits including context window
|
|
182180
|
+
description: "Get current resource limits including context window and wallet rate limits. Use for planning multi-step operations.",
|
|
182685
182181
|
parameters: {
|
|
182686
182182
|
type: "object",
|
|
182687
182183
|
properties: {},
|
|
@@ -182792,7 +182288,6 @@ var init_self_awareness = __esm(() => {
|
|
|
182792
182288
|
contextStatsTool,
|
|
182793
182289
|
whoamiTool,
|
|
182794
182290
|
identityGetTool2,
|
|
182795
|
-
energyStatusTool2,
|
|
182796
182291
|
resourceLimitsTool,
|
|
182797
182292
|
sessionStatsTool,
|
|
182798
182293
|
toolStatsTool,
|
|
@@ -185392,7 +184887,7 @@ Use for complex tasks that benefit from parallel processing or multiple perspect
|
|
|
185392
184887
|
|
|
185393
184888
|
// packages/core/src/memory/types.ts
|
|
185394
184889
|
var DEFAULT_MEMORY_CONFIG;
|
|
185395
|
-
var
|
|
184890
|
+
var init_types10 = __esm(() => {
|
|
185396
184891
|
DEFAULT_MEMORY_CONFIG = {
|
|
185397
184892
|
enabled: true,
|
|
185398
184893
|
injection: {
|
|
@@ -186026,7 +185521,7 @@ class GlobalMemoryManager {
|
|
|
186026
185521
|
var MAX_KEY_LENGTH2 = 256, MAX_VALUE_SIZE = 65536, MAX_SUMMARY_LENGTH2 = 500;
|
|
186027
185522
|
var init_global_memory = __esm(async () => {
|
|
186028
185523
|
init_src2();
|
|
186029
|
-
|
|
185524
|
+
init_types10();
|
|
186030
185525
|
await __promiseAll([
|
|
186031
185526
|
init_database(),
|
|
186032
185527
|
init_runtime()
|
|
@@ -186216,7 +185711,7 @@ var init_memory3 = __esm(async () => {
|
|
|
186216
185711
|
init_store13(),
|
|
186217
185712
|
init_global_memory()
|
|
186218
185713
|
]);
|
|
186219
|
-
|
|
185714
|
+
init_types10();
|
|
186220
185715
|
});
|
|
186221
185716
|
|
|
186222
185717
|
// packages/core/src/agent/subagent-manager.ts
|
|
@@ -186571,7 +186066,7 @@ var init_subagent_manager = __esm(() => {
|
|
|
186571
186066
|
|
|
186572
186067
|
// packages/core/src/capabilities/types.ts
|
|
186573
186068
|
var ORCHESTRATION_DEFAULTS, DEFAULT_CAPABILITY_SET, RESTRICTED_CAPABILITY_SET, COORDINATOR_CAPABILITY_SET;
|
|
186574
|
-
var
|
|
186069
|
+
var init_types11 = __esm(() => {
|
|
186575
186070
|
ORCHESTRATION_DEFAULTS = {
|
|
186576
186071
|
none: {
|
|
186577
186072
|
level: "none",
|
|
@@ -186887,7 +186382,7 @@ function extendCapabilityChain(chain3, scope, capabilities) {
|
|
|
186887
186382
|
};
|
|
186888
186383
|
}
|
|
186889
186384
|
var init_resolver = __esm(() => {
|
|
186890
|
-
|
|
186385
|
+
init_types11();
|
|
186891
186386
|
});
|
|
186892
186387
|
|
|
186893
186388
|
// packages/core/src/capabilities/storage.ts
|
|
@@ -187065,8 +186560,8 @@ function resetGlobalCapabilityStorage() {
|
|
|
187065
186560
|
}
|
|
187066
186561
|
}
|
|
187067
186562
|
var DEFAULT_STORAGE_CONFIG, globalStorage = null;
|
|
187068
|
-
var
|
|
187069
|
-
|
|
186563
|
+
var init_storage = __esm(async () => {
|
|
186564
|
+
init_types11();
|
|
187070
186565
|
await init_database();
|
|
187071
186566
|
DEFAULT_STORAGE_CONFIG = {
|
|
187072
186567
|
enabled: true,
|
|
@@ -187322,17 +186817,17 @@ function resetGlobalCapabilityEnforcer() {
|
|
|
187322
186817
|
var globalEnforcer = null;
|
|
187323
186818
|
var init_enforcer = __esm(async () => {
|
|
187324
186819
|
init_resolver();
|
|
187325
|
-
await
|
|
186820
|
+
await init_storage();
|
|
187326
186821
|
});
|
|
187327
186822
|
|
|
187328
186823
|
// packages/core/src/capabilities/index.ts
|
|
187329
186824
|
var init_capabilities2 = __esm(async () => {
|
|
187330
186825
|
init_resolver();
|
|
187331
186826
|
await __promiseAll([
|
|
187332
|
-
|
|
186827
|
+
init_storage(),
|
|
187333
186828
|
init_enforcer()
|
|
187334
186829
|
]);
|
|
187335
|
-
|
|
186830
|
+
init_types11();
|
|
187336
186831
|
});
|
|
187337
186832
|
|
|
187338
186833
|
// packages/core/src/agent/loop.ts
|
|
@@ -187355,7 +186850,6 @@ var init_loop = __esm(async () => {
|
|
|
187355
186850
|
init_assistant();
|
|
187356
186851
|
init_identity();
|
|
187357
186852
|
init_model();
|
|
187358
|
-
init_energy();
|
|
187359
186853
|
init_security();
|
|
187360
186854
|
init_web();
|
|
187361
186855
|
init_image();
|
|
@@ -187366,7 +186860,7 @@ var init_loop = __esm(async () => {
|
|
|
187366
186860
|
init_errors();
|
|
187367
186861
|
init_limits();
|
|
187368
186862
|
init_llm_response();
|
|
187369
|
-
|
|
186863
|
+
init_manager3();
|
|
187370
186864
|
init_self_awareness();
|
|
187371
186865
|
init_memory2();
|
|
187372
186866
|
init_agents();
|
|
@@ -187401,7 +186895,6 @@ var init_loop = __esm(async () => {
|
|
|
187401
186895
|
init_backup(),
|
|
187402
186896
|
init_migrate(),
|
|
187403
186897
|
init_heartbeat2(),
|
|
187404
|
-
init_energy2(),
|
|
187405
186898
|
init_store3(),
|
|
187406
186899
|
init_auto_refresh(),
|
|
187407
186900
|
init_identity2(),
|
|
@@ -187437,9 +186930,6 @@ var init_loop = __esm(async () => {
|
|
|
187437
186930
|
lastUserMessage = null;
|
|
187438
186931
|
lastToolName = null;
|
|
187439
186932
|
pendingToolCalls = new Map;
|
|
187440
|
-
energyManager = null;
|
|
187441
|
-
energyEffects = null;
|
|
187442
|
-
lastEnergyLevel = null;
|
|
187443
186933
|
toolRegistry;
|
|
187444
186934
|
connectorBridge;
|
|
187445
186935
|
skillLoader;
|
|
@@ -187833,8 +187323,6 @@ var init_loop = __esm(async () => {
|
|
|
187833
187323
|
getContextInfo: () => this.getContextInfo(),
|
|
187834
187324
|
getAssistantManager: () => this.assistantManager,
|
|
187835
187325
|
getIdentityManager: () => this.identityManager,
|
|
187836
|
-
getEnergyManager: () => this.energyManager,
|
|
187837
|
-
getEnergyState: () => this.getEnergyState(),
|
|
187838
187326
|
getWalletManager: () => this.walletManager,
|
|
187839
187327
|
sessionId: this.sessionId,
|
|
187840
187328
|
model: this.config?.llm?.model
|
|
@@ -187867,16 +187355,6 @@ var init_loop = __esm(async () => {
|
|
|
187867
187355
|
switchModel: async (modelId) => this.switchModel(modelId),
|
|
187868
187356
|
getLLMConfig: () => this.config?.llm ?? null
|
|
187869
187357
|
});
|
|
187870
|
-
registerEnergyTools(this.toolRegistry, {
|
|
187871
|
-
getEnergyManager: () => this.energyManager,
|
|
187872
|
-
getEnergyState: () => this.getEnergyState(),
|
|
187873
|
-
restEnergy: (amount) => {
|
|
187874
|
-
if (this.energyManager) {
|
|
187875
|
-
this.energyManager.rest(amount);
|
|
187876
|
-
this.refreshEnergyEffects();
|
|
187877
|
-
}
|
|
187878
|
-
}
|
|
187879
|
-
});
|
|
187880
187358
|
registerHeartbeatTools(this.toolRegistry, {
|
|
187881
187359
|
sessionId: this.sessionId,
|
|
187882
187360
|
getHeartbeatState: () => this.getHeartbeatState(),
|
|
@@ -188041,7 +187519,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
188041
187519
|
});
|
|
188042
187520
|
this.startHeartbeat();
|
|
188043
187521
|
await this.startAssistantHeartbeat();
|
|
188044
|
-
await this.startEnergySystem();
|
|
188045
187522
|
}
|
|
188046
187523
|
async process(userMessage) {
|
|
188047
187524
|
if (this.isRunning) {
|
|
@@ -188095,7 +187572,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
188095
187572
|
const beforeCount = this.context.getMessages().length;
|
|
188096
187573
|
this.lastUserMessage = userMessage;
|
|
188097
187574
|
this.recordHeartbeatActivity("message");
|
|
188098
|
-
this.consumeEnergy("message");
|
|
188099
187575
|
try {
|
|
188100
187576
|
if (source === "user") {
|
|
188101
187577
|
const promptHookResult = await this.hookExecutor.execute(this.hookLoader.getHooks("UserPromptSubmit"), {
|
|
@@ -188289,16 +187765,8 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
188289
187765
|
}
|
|
188290
187766
|
await this.maybeSummarizeContext();
|
|
188291
187767
|
const messages = this.context.getMessages();
|
|
188292
|
-
this.consumeEnergy("llmCall");
|
|
188293
|
-
if (this.contextConfig && this.contextManager) {
|
|
188294
|
-
const contextTokens = this.contextManager.getState().totalTokens;
|
|
188295
|
-
if (contextTokens > this.contextConfig.maxContextTokens * 0.8) {
|
|
188296
|
-
this.consumeEnergy("longContext");
|
|
188297
|
-
}
|
|
188298
|
-
}
|
|
188299
|
-
await this.applyEnergyDelay();
|
|
188300
187768
|
const tools = this.filterAllowedTools(this.toolRegistry.getTools());
|
|
188301
|
-
const systemPrompt = this.
|
|
187769
|
+
const systemPrompt = this.buildSystemPrompt(messages);
|
|
188302
187770
|
let responseText = "";
|
|
188303
187771
|
let toolCalls = [];
|
|
188304
187772
|
for await (const chunk of this.llmClient.chat(messages, tools, systemPrompt)) {
|
|
@@ -188742,7 +188210,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
188742
188210
|
results.push(askResult);
|
|
188743
188211
|
continue;
|
|
188744
188212
|
}
|
|
188745
|
-
this.consumeEnergy("toolCall");
|
|
188746
188213
|
this.recordHeartbeatActivity("tool");
|
|
188747
188214
|
this.lastToolName = toolCall.name;
|
|
188748
188215
|
this.pendingToolCalls.set(toolCall.id, toolCall.name);
|
|
@@ -188844,7 +188311,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
188844
188311
|
}
|
|
188845
188312
|
return result2;
|
|
188846
188313
|
},
|
|
188847
|
-
getEnergyState: () => this.getEnergyState(),
|
|
188848
188314
|
getAssistantManager: () => this.assistantManager,
|
|
188849
188315
|
getIdentityManager: () => this.identityManager,
|
|
188850
188316
|
getInboxManager: () => this.inboxManager,
|
|
@@ -188934,12 +188400,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
188934
188400
|
setAutoSend: (enabled) => {
|
|
188935
188401
|
this.voiceManager?.setAutoSend(enabled);
|
|
188936
188402
|
},
|
|
188937
|
-
restEnergy: (amount) => {
|
|
188938
|
-
if (this.energyManager) {
|
|
188939
|
-
this.energyManager.rest(amount);
|
|
188940
|
-
this.refreshEnergyEffects();
|
|
188941
|
-
}
|
|
188942
|
-
},
|
|
188943
188403
|
refreshConnectors: async () => {
|
|
188944
188404
|
const connectors = await this.connectorBridge.refresh();
|
|
188945
188405
|
return {
|
|
@@ -189157,7 +188617,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
189157
188617
|
}
|
|
189158
188618
|
this.heartbeatManager?.stop();
|
|
189159
188619
|
this.deregisterFromRegistry();
|
|
189160
|
-
this.energyManager?.stop();
|
|
189161
188620
|
this.voiceManager?.stopTalking();
|
|
189162
188621
|
this.messagesManager?.stopWatching();
|
|
189163
188622
|
this.webhooksManager?.stopWatching();
|
|
@@ -189382,9 +188841,6 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
|
|
|
189382
188841
|
state: this.contextManager.getState()
|
|
189383
188842
|
};
|
|
189384
188843
|
}
|
|
189385
|
-
getEnergyState() {
|
|
189386
|
-
return this.energyManager ? this.energyManager.getState() : null;
|
|
189387
|
-
}
|
|
189388
188844
|
updateTokenUsage(usage) {
|
|
189389
188845
|
this.builtinCommands.updateTokenUsage(usage);
|
|
189390
188846
|
this.onTokenUsage?.(this.builtinCommands.getTokenUsage());
|
|
@@ -189636,46 +189092,6 @@ ${content.trim()}`);
|
|
|
189636
189092
|
recordHeartbeatActivity(type) {
|
|
189637
189093
|
this.heartbeatManager?.recordActivity(type);
|
|
189638
189094
|
}
|
|
189639
|
-
async startEnergySystem() {
|
|
189640
|
-
if (!this.config || this.config.energy?.enabled === false)
|
|
189641
|
-
return;
|
|
189642
|
-
this.energyManager = new EnergyManager(this.config.energy, new EnergyStorage);
|
|
189643
|
-
await this.energyManager.initialize();
|
|
189644
|
-
this.refreshEnergyEffects();
|
|
189645
|
-
}
|
|
189646
|
-
consumeEnergy(action) {
|
|
189647
|
-
if (!this.energyManager)
|
|
189648
|
-
return;
|
|
189649
|
-
this.energyManager.consume(action);
|
|
189650
|
-
this.refreshEnergyEffects();
|
|
189651
|
-
}
|
|
189652
|
-
refreshEnergyEffects() {
|
|
189653
|
-
if (!this.energyManager)
|
|
189654
|
-
return;
|
|
189655
|
-
const effects = this.energyManager.getEffects();
|
|
189656
|
-
this.energyEffects = effects;
|
|
189657
|
-
if (this.lastEnergyLevel !== effects.level) {
|
|
189658
|
-
this.lastEnergyLevel = effects.level;
|
|
189659
|
-
if (effects.message) {
|
|
189660
|
-
this.emit({ type: "text", content: `
|
|
189661
|
-
${effects.message}
|
|
189662
|
-
` });
|
|
189663
|
-
}
|
|
189664
|
-
}
|
|
189665
|
-
}
|
|
189666
|
-
async applyEnergyDelay() {
|
|
189667
|
-
const delay = this.energyEffects?.processingDelayMs ?? 0;
|
|
189668
|
-
if (delay <= 0)
|
|
189669
|
-
return;
|
|
189670
|
-
await new Promise((resolve6) => setTimeout(resolve6, delay));
|
|
189671
|
-
}
|
|
189672
|
-
applyEnergyPersonality(systemPrompt) {
|
|
189673
|
-
if (!systemPrompt)
|
|
189674
|
-
return systemPrompt;
|
|
189675
|
-
if (!this.energyEffects)
|
|
189676
|
-
return systemPrompt;
|
|
189677
|
-
return applyPersonality(systemPrompt, this.energyEffects);
|
|
189678
|
-
}
|
|
189679
189095
|
async injectPendingMessages() {
|
|
189680
189096
|
if (!this.messagesManager)
|
|
189681
189097
|
return;
|
|
@@ -190870,7 +190286,7 @@ function inferToolMetadata(tool2) {
|
|
|
190870
190286
|
category = "interaction";
|
|
190871
190287
|
} else if (name === "display_image") {
|
|
190872
190288
|
category = "media";
|
|
190873
|
-
} else if (["context_get", "context_stats", "whoami", "identity_get", "
|
|
190289
|
+
} else if (["context_get", "context_stats", "whoami", "identity_get", "resource_limits"].includes(name)) {
|
|
190874
190290
|
category = "self-awareness";
|
|
190875
190291
|
} else if (name.startsWith("connector") || name === "connectors_list" || name === "connectors_search") {
|
|
190876
190292
|
category = "connectors";
|
|
@@ -191369,7 +190785,7 @@ function getCommandHistory() {
|
|
|
191369
190785
|
return globalHistory;
|
|
191370
190786
|
}
|
|
191371
190787
|
var MAX_HISTORY_SIZE = 1000, globalHistory = null;
|
|
191372
|
-
var
|
|
190788
|
+
var init_storage2 = __esm(async () => {
|
|
191373
190789
|
await init_database();
|
|
191374
190790
|
});
|
|
191375
190791
|
|
|
@@ -191798,10 +191214,8 @@ __export(exports_src3, {
|
|
|
191798
191214
|
ensureDefaultProject: () => ensureDefaultProject,
|
|
191799
191215
|
enforceToolOutputLimit: () => enforceToolOutputLimit,
|
|
191800
191216
|
enforceMessageLimit: () => enforceMessageLimit,
|
|
191801
|
-
energyStatusTool: () => energyStatusTool2,
|
|
191802
191217
|
encodeTwilioPayload: () => encodeTwilioPayload,
|
|
191803
191218
|
elevenLabsToTwilio: () => elevenLabsToTwilio,
|
|
191804
|
-
effectsForLevel: () => effectsForLevel,
|
|
191805
191219
|
downsample16kTo8k: () => downsample16kTo8k,
|
|
191806
191220
|
deleteTask: () => deleteTask,
|
|
191807
191221
|
deleteSkill: () => deleteSkill,
|
|
@@ -191911,7 +191325,6 @@ __export(exports_src3, {
|
|
|
191911
191325
|
buildToolsSystemPrompt: () => buildToolsSystemPrompt,
|
|
191912
191326
|
buildSystemAssistant: () => buildSystemAssistant,
|
|
191913
191327
|
buildProjectContext: () => buildProjectContext,
|
|
191914
|
-
buildEnergyConfig: () => buildEnergyConfig,
|
|
191915
191328
|
buildContextInjection: () => buildContextInjection,
|
|
191916
191329
|
backupIfNeeded: () => backupIfNeeded,
|
|
191917
191330
|
assistantTools: () => assistantTools2,
|
|
@@ -191921,7 +191334,6 @@ __export(exports_src3, {
|
|
|
191921
191334
|
assistantJobStatusTool: () => assistantJobStatusTool,
|
|
191922
191335
|
assistantDelegateTool: () => assistantDelegateTool,
|
|
191923
191336
|
assertNoExistingTarget: () => assertNoExistingTarget,
|
|
191924
|
-
applyPersonality: () => applyPersonality,
|
|
191925
191337
|
appendToHistory: () => appendToHistory,
|
|
191926
191338
|
aggregateTaskResults: () => aggregateTaskResults,
|
|
191927
191339
|
addTask: () => addTask,
|
|
@@ -192034,8 +191446,6 @@ __export(exports_src3, {
|
|
|
192034
191446
|
FeedbackTool: () => FeedbackTool,
|
|
192035
191447
|
ErrorCodes: () => ErrorCodes,
|
|
192036
191448
|
ErrorAggregator: () => ErrorAggregator,
|
|
192037
|
-
EnergyStorage: () => EnergyStorage,
|
|
192038
|
-
EnergyManager: () => EnergyManager,
|
|
192039
191449
|
EmbeddedClient: () => EmbeddedClient,
|
|
192040
191450
|
EmailParser: () => EmailParser,
|
|
192041
191451
|
ElevenLabsTTS: () => ElevenLabsTTS,
|
|
@@ -192057,8 +191467,6 @@ __export(exports_src3, {
|
|
|
192057
191467
|
DEFAULT_MEMORY_CONFIG: () => DEFAULT_MEMORY_CONFIG,
|
|
192058
191468
|
DEFAULT_MAX_SLEEP_MS: () => DEFAULT_MAX_SLEEP_MS,
|
|
192059
191469
|
DEFAULT_GUARDRAILS_CONFIG: () => DEFAULT_GUARDRAILS_CONFIG,
|
|
192060
|
-
DEFAULT_ENERGY_COSTS: () => DEFAULT_ENERGY_COSTS,
|
|
192061
|
-
DEFAULT_ENERGY_CONFIG: () => DEFAULT_ENERGY_CONFIG,
|
|
192062
191470
|
DEFAULT_DISPATCHER_CONFIG: () => DEFAULT_DISPATCHER_CONFIG,
|
|
192063
191471
|
DEFAULT_DEPTH_POLICY: () => DEFAULT_DEPTH_POLICY,
|
|
192064
191472
|
DEFAULT_DECISION_POLICY: () => DEFAULT_DECISION_POLICY,
|
|
@@ -192126,10 +191534,10 @@ var init_src3 = __esm(async () => {
|
|
|
192126
191534
|
init_native();
|
|
192127
191535
|
init_scope_context();
|
|
192128
191536
|
init_injector();
|
|
192129
|
-
|
|
191537
|
+
init_types10();
|
|
192130
191538
|
init_memory2();
|
|
192131
191539
|
init_voice();
|
|
192132
|
-
|
|
191540
|
+
init_manager3();
|
|
192133
191541
|
init_player();
|
|
192134
191542
|
init_recorder();
|
|
192135
191543
|
init_stt();
|
|
@@ -192178,11 +191586,10 @@ var init_src3 = __esm(async () => {
|
|
|
192178
191586
|
init_store12(),
|
|
192179
191587
|
init_sessions3(),
|
|
192180
191588
|
init_logger2(),
|
|
192181
|
-
|
|
191589
|
+
init_storage2()
|
|
192182
191590
|
]);
|
|
192183
191591
|
init_context2();
|
|
192184
191592
|
init_heartbeat2();
|
|
192185
|
-
init_energy2();
|
|
192186
191593
|
init_identity2();
|
|
192187
191594
|
init_migration();
|
|
192188
191595
|
init_inbox();
|
|
@@ -236909,7 +236316,6 @@ function Status({
|
|
|
236909
236316
|
cwd: cwd3,
|
|
236910
236317
|
queueLength = 0,
|
|
236911
236318
|
tokenUsage,
|
|
236912
|
-
energyState,
|
|
236913
236319
|
voiceState,
|
|
236914
236320
|
heartbeatState,
|
|
236915
236321
|
identityInfo,
|
|
@@ -236981,7 +236387,6 @@ function Status({
|
|
|
236981
236387
|
}
|
|
236982
236388
|
const sessionInfo = sessionCount && sessionCount > 1 && sessionIndex !== undefined ? `${sessionIndex + 1}/${sessionCount}` : "";
|
|
236983
236389
|
const bgIndicator = backgroundProcessingCount > 0 ? ` +${backgroundProcessingCount}` : "";
|
|
236984
|
-
const energyInfo = energyState ? `${Math.round(energyState.current / energyState.max * 100)}%` : "";
|
|
236985
236390
|
const voiceLabel = voiceState?.enabled ? voiceState.isTalking ? "talk" : voiceState.isListening ? "mic" : voiceState.isSpeaking ? "spk" : "voice" : "";
|
|
236986
236391
|
const heartbeatLabel = heartbeatState?.enabled ? heartbeatState.isStale ? "hb!" : "hb" : "";
|
|
236987
236392
|
const heartbeatDisplay = heartbeatLabel ? `${heartbeatLabel}${heartbeatCountdown ? ` ${heartbeatCountdown}` : ""}` : "";
|
|
@@ -237024,8 +236429,6 @@ function Status({
|
|
|
237024
236429
|
rightParts.push(formatDuration4(elapsed));
|
|
237025
236430
|
if (sessionInfo)
|
|
237026
236431
|
rightParts.push(`${sessionInfo}${bgIndicator}`);
|
|
237027
|
-
if (energyInfo)
|
|
237028
|
-
rightParts.push(energyInfo);
|
|
237029
236432
|
if (contextInfo)
|
|
237030
236433
|
rightParts.push(contextInfo);
|
|
237031
236434
|
if (verboseLabel)
|
|
@@ -244297,7 +243700,6 @@ var SECTIONS = [
|
|
|
244297
243700
|
{ id: "memory", name: "Memory" },
|
|
244298
243701
|
{ id: "subassistants", name: "Subassistants" },
|
|
244299
243702
|
{ id: "voice", name: "Voice" },
|
|
244300
|
-
{ id: "energy", name: "Energy" },
|
|
244301
243703
|
{ id: "statusLine", name: "Status Line" }
|
|
244302
243704
|
];
|
|
244303
243705
|
function ConfigPanel({
|
|
@@ -244320,9 +243722,6 @@ function ConfigPanel({
|
|
|
244320
243722
|
const defaultModelIndex = Math.max(0, ALL_MODELS.findIndex((m5) => m5.id === DEFAULT_MODEL));
|
|
244321
243723
|
const [selectedModelIndex, setSelectedModelIndex] = import_react55.useState(configModelIndex >= 0 ? configModelIndex : defaultModelIndex);
|
|
244322
243724
|
const [maxTokens, setMaxTokens] = import_react55.useState(config2.llm?.maxTokens ?? 8192);
|
|
244323
|
-
const [selectedEnergyField, setSelectedEnergyField] = import_react55.useState(0);
|
|
244324
|
-
const [energyMaxEnergy, setEnergyMaxEnergy] = import_react55.useState(config2.energy?.maxEnergy ?? 1e4);
|
|
244325
|
-
const [energyRegenRate, setEnergyRegenRate] = import_react55.useState(config2.energy?.regenRate ?? 500);
|
|
244326
243725
|
import_react55.useEffect(() => {
|
|
244327
243726
|
if (message) {
|
|
244328
243727
|
const timer = setTimeout(() => setMessage(null), 3000);
|
|
@@ -244395,8 +243794,6 @@ function ConfigPanel({
|
|
|
244395
243794
|
handleSaveField("memory.enabled", !config2.memory?.enabled);
|
|
244396
243795
|
} else if (section.id === "voice") {
|
|
244397
243796
|
handleSaveField("voice.enabled", !config2.voice?.enabled);
|
|
244398
|
-
} else if (section.id === "energy") {
|
|
244399
|
-
handleSaveField("energy.enabled", !config2.energy?.enabled);
|
|
244400
243797
|
}
|
|
244401
243798
|
return;
|
|
244402
243799
|
}
|
|
@@ -244423,37 +243820,6 @@ function ConfigPanel({
|
|
|
244423
243820
|
}
|
|
244424
243821
|
return;
|
|
244425
243822
|
}
|
|
244426
|
-
if (section.id === "energy" && !editingField && input !== "t" && input !== "T") {
|
|
244427
|
-
if (key.upArrow) {
|
|
244428
|
-
setSelectedEnergyField((prev) => prev === 0 ? 1 : 0);
|
|
244429
|
-
return;
|
|
244430
|
-
}
|
|
244431
|
-
if (key.downArrow) {
|
|
244432
|
-
setSelectedEnergyField((prev) => prev === 1 ? 0 : 1);
|
|
244433
|
-
return;
|
|
244434
|
-
}
|
|
244435
|
-
if (key.leftArrow) {
|
|
244436
|
-
if (selectedEnergyField === 0) {
|
|
244437
|
-
setEnergyMaxEnergy((prev) => Math.max(1000, prev - 1000));
|
|
244438
|
-
} else {
|
|
244439
|
-
setEnergyRegenRate((prev) => Math.max(100, prev - 100));
|
|
244440
|
-
}
|
|
244441
|
-
return;
|
|
244442
|
-
}
|
|
244443
|
-
if (key.rightArrow) {
|
|
244444
|
-
if (selectedEnergyField === 0) {
|
|
244445
|
-
setEnergyMaxEnergy((prev) => Math.min(1e5, prev + 1000));
|
|
244446
|
-
} else {
|
|
244447
|
-
setEnergyRegenRate((prev) => Math.min(5000, prev + 100));
|
|
244448
|
-
}
|
|
244449
|
-
return;
|
|
244450
|
-
}
|
|
244451
|
-
if (key.return || input === "s" || input === "S") {
|
|
244452
|
-
setMode("location-select");
|
|
244453
|
-
return;
|
|
244454
|
-
}
|
|
244455
|
-
return;
|
|
244456
|
-
}
|
|
244457
243823
|
if (section.id === "statusLine" && !editingField) {
|
|
244458
243824
|
const sl = config2.statusLine || {};
|
|
244459
243825
|
const toggleField = (field, current) => {
|
|
@@ -244558,15 +243924,6 @@ function ConfigPanel({
|
|
|
244558
243924
|
}
|
|
244559
243925
|
};
|
|
244560
243926
|
}
|
|
244561
|
-
if (!saveUpdates && section.id === "energy") {
|
|
244562
|
-
saveUpdates = {
|
|
244563
|
-
energy: {
|
|
244564
|
-
...config2.energy,
|
|
244565
|
-
maxEnergy: energyMaxEnergy,
|
|
244566
|
-
regenRate: energyRegenRate
|
|
244567
|
-
}
|
|
244568
|
-
};
|
|
244569
|
-
}
|
|
244570
243927
|
if (saveUpdates) {
|
|
244571
243928
|
await onSave(location, saveUpdates);
|
|
244572
243929
|
setMessage({ type: "success", text: `Saved to ${location} config` });
|
|
@@ -245161,132 +244518,6 @@ function ConfigPanel({
|
|
|
245161
244518
|
}, undefined, false, undefined, this)
|
|
245162
244519
|
]
|
|
245163
244520
|
}, undefined, true, undefined, this);
|
|
245164
|
-
case "energy":
|
|
245165
|
-
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
245166
|
-
flexDirection: "column",
|
|
245167
|
-
children: [
|
|
245168
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245169
|
-
bold: true,
|
|
245170
|
-
children: "Energy Settings"
|
|
245171
|
-
}, undefined, false, undefined, this),
|
|
245172
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
245173
|
-
marginTop: 1,
|
|
245174
|
-
flexDirection: "column",
|
|
245175
|
-
children: [
|
|
245176
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245177
|
-
children: [
|
|
245178
|
-
"Enabled: ",
|
|
245179
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245180
|
-
color: config2.energy?.enabled ? "green" : "red",
|
|
245181
|
-
children: config2.energy?.enabled ? "Yes" : "No"
|
|
245182
|
-
}, undefined, false, undefined, this),
|
|
245183
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245184
|
-
dimColor: true,
|
|
245185
|
-
children: [
|
|
245186
|
-
" (t to toggle) ",
|
|
245187
|
-
getSource("energy.enabled")
|
|
245188
|
-
]
|
|
245189
|
-
}, undefined, true, undefined, this)
|
|
245190
|
-
]
|
|
245191
|
-
}, undefined, true, undefined, this),
|
|
245192
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
245193
|
-
children: [
|
|
245194
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245195
|
-
inverse: selectedEnergyField === 0,
|
|
245196
|
-
children: [
|
|
245197
|
-
selectedEnergyField === 0 ? ">" : " ",
|
|
245198
|
-
" Max Energy: ",
|
|
245199
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245200
|
-
color: "cyan",
|
|
245201
|
-
children: energyMaxEnergy
|
|
245202
|
-
}, undefined, false, undefined, this)
|
|
245203
|
-
]
|
|
245204
|
-
}, undefined, true, undefined, this),
|
|
245205
|
-
selectedEnergyField === 0 && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245206
|
-
dimColor: true,
|
|
245207
|
-
children: " (\u2190\u2192 adjust)"
|
|
245208
|
-
}, undefined, false, undefined, this)
|
|
245209
|
-
]
|
|
245210
|
-
}, undefined, true, undefined, this),
|
|
245211
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
245212
|
-
children: [
|
|
245213
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245214
|
-
inverse: selectedEnergyField === 1,
|
|
245215
|
-
children: [
|
|
245216
|
-
selectedEnergyField === 1 ? ">" : " ",
|
|
245217
|
-
" Regen Rate: ",
|
|
245218
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245219
|
-
color: "cyan",
|
|
245220
|
-
children: energyRegenRate
|
|
245221
|
-
}, undefined, false, undefined, this),
|
|
245222
|
-
"/min"
|
|
245223
|
-
]
|
|
245224
|
-
}, undefined, true, undefined, this),
|
|
245225
|
-
selectedEnergyField === 1 && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245226
|
-
dimColor: true,
|
|
245227
|
-
children: " (\u2190\u2192 adjust)"
|
|
245228
|
-
}, undefined, false, undefined, this)
|
|
245229
|
-
]
|
|
245230
|
-
}, undefined, true, undefined, this),
|
|
245231
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245232
|
-
children: [
|
|
245233
|
-
"Low Threshold: ",
|
|
245234
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245235
|
-
color: "cyan",
|
|
245236
|
-
children: config2.energy?.lowEnergyThreshold ?? 3000
|
|
245237
|
-
}, undefined, false, undefined, this)
|
|
245238
|
-
]
|
|
245239
|
-
}, undefined, true, undefined, this),
|
|
245240
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245241
|
-
children: [
|
|
245242
|
-
"Critical Threshold: ",
|
|
245243
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245244
|
-
color: "cyan",
|
|
245245
|
-
children: config2.energy?.criticalThreshold ?? 1000
|
|
245246
|
-
}, undefined, false, undefined, this)
|
|
245247
|
-
]
|
|
245248
|
-
}, undefined, true, undefined, this)
|
|
245249
|
-
]
|
|
245250
|
-
}, undefined, true, undefined, this),
|
|
245251
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
245252
|
-
marginTop: 1,
|
|
245253
|
-
children: [
|
|
245254
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245255
|
-
dimColor: true,
|
|
245256
|
-
children: "Costs:"
|
|
245257
|
-
}, undefined, false, undefined, this),
|
|
245258
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245259
|
-
dimColor: true,
|
|
245260
|
-
children: [
|
|
245261
|
-
" Message: ",
|
|
245262
|
-
config2.energy?.costs?.message ?? 200
|
|
245263
|
-
]
|
|
245264
|
-
}, undefined, true, undefined, this),
|
|
245265
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245266
|
-
dimColor: true,
|
|
245267
|
-
children: [
|
|
245268
|
-
" Tool Call: ",
|
|
245269
|
-
config2.energy?.costs?.toolCall ?? 500
|
|
245270
|
-
]
|
|
245271
|
-
}, undefined, true, undefined, this),
|
|
245272
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245273
|
-
dimColor: true,
|
|
245274
|
-
children: [
|
|
245275
|
-
" LLM Call: ",
|
|
245276
|
-
config2.energy?.costs?.llmCall ?? 300
|
|
245277
|
-
]
|
|
245278
|
-
}, undefined, true, undefined, this)
|
|
245279
|
-
]
|
|
245280
|
-
}, undefined, true, undefined, this),
|
|
245281
|
-
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
245282
|
-
marginTop: 1,
|
|
245283
|
-
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
245284
|
-
dimColor: true,
|
|
245285
|
-
children: "\u2191\u2193 select | \u2190\u2192 adjust | t toggle | Enter/s save | Esc back"
|
|
245286
|
-
}, undefined, false, undefined, this)
|
|
245287
|
-
}, undefined, false, undefined, this)
|
|
245288
|
-
]
|
|
245289
|
-
}, undefined, true, undefined, this);
|
|
245290
244521
|
case "statusLine": {
|
|
245291
244522
|
const sl = config2.statusLine || {};
|
|
245292
244523
|
const showIcon = (v5) => v5 ?? true ? "Yes" : "No";
|
|
@@ -264838,7 +264069,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
264838
264069
|
const [inlinePending, setInlinePending] = import_react86.useState([]);
|
|
264839
264070
|
const [activityLog, setActivityLog] = import_react86.useState([]);
|
|
264840
264071
|
const [tokenUsage, setTokenUsage] = import_react86.useState();
|
|
264841
|
-
const [energyState, setEnergyState] = import_react86.useState();
|
|
264842
264072
|
const [voiceState, setVoiceState] = import_react86.useState();
|
|
264843
264073
|
const [heartbeatState, setHeartbeatState] = import_react86.useState();
|
|
264844
264074
|
const [identityInfo, setIdentityInfo] = import_react86.useState();
|
|
@@ -265336,7 +264566,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265336
264566
|
toolCalls: toolCallsRef.current,
|
|
265337
264567
|
toolResults: toolResultsRef.current,
|
|
265338
264568
|
tokenUsage,
|
|
265339
|
-
energyState,
|
|
265340
264569
|
voiceState,
|
|
265341
264570
|
heartbeatState,
|
|
265342
264571
|
identityInfo,
|
|
@@ -265346,7 +264575,7 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265346
264575
|
lastWorkedFor
|
|
265347
264576
|
});
|
|
265348
264577
|
}
|
|
265349
|
-
}, [activeSessionId, messages2, tokenUsage,
|
|
264578
|
+
}, [activeSessionId, messages2, tokenUsage, voiceState, heartbeatState, identityInfo, processingStartTime, currentTurnTokens, error4, lastWorkedFor]);
|
|
265350
264579
|
const loadSessionState = import_react86.useCallback((sessionId) => {
|
|
265351
264580
|
const state = sessionUIStates.current.get(sessionId);
|
|
265352
264581
|
const askState = askUserStateRef.current.get(sessionId) || null;
|
|
@@ -265361,7 +264590,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265361
264590
|
toolResultsRef.current = state.toolResults;
|
|
265362
264591
|
setCurrentToolCall(undefined);
|
|
265363
264592
|
setTokenUsage(state.tokenUsage);
|
|
265364
|
-
setEnergyState(state.energyState);
|
|
265365
264593
|
setVoiceState(state.voiceState);
|
|
265366
264594
|
setHeartbeatState(state.heartbeatState);
|
|
265367
264595
|
setIdentityInfo(state.identityInfo);
|
|
@@ -265382,7 +264610,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265382
264610
|
toolResultsRef.current = [];
|
|
265383
264611
|
setCurrentToolCall(undefined);
|
|
265384
264612
|
setTokenUsage(undefined);
|
|
265385
|
-
setEnergyState(undefined);
|
|
265386
264613
|
setVoiceState(undefined);
|
|
265387
264614
|
setHeartbeatState(undefined);
|
|
265388
264615
|
setIdentityInfo(undefined);
|
|
@@ -265412,6 +264639,8 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265412
264639
|
return false;
|
|
265413
264640
|
const trimmed = command.trim();
|
|
265414
264641
|
const lower = trimmed.toLowerCase();
|
|
264642
|
+
if (/^\s*connectors\s+(install|add)\b/.test(lower))
|
|
264643
|
+
return true;
|
|
265415
264644
|
if (!lower.startsWith("bun "))
|
|
265416
264645
|
return false;
|
|
265417
264646
|
if (!/\bbun\s+(add|install|i)\b/.test(lower))
|
|
@@ -265442,7 +264671,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265442
264671
|
if (session) {
|
|
265443
264672
|
setIsProcessing(session.isProcessing);
|
|
265444
264673
|
isProcessingRef.current = session.isProcessing;
|
|
265445
|
-
setEnergyState(session.client.getEnergyState() ?? undefined);
|
|
265446
264674
|
setVoiceState(session.client.getVoiceState() ?? undefined);
|
|
265447
264675
|
setHeartbeatState(session.client.getHeartbeatState?.() ?? undefined);
|
|
265448
264676
|
setIdentityInfo(session.client.getIdentityInfo() ?? undefined);
|
|
@@ -265476,7 +264704,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265476
264704
|
loadSessionState(newSession.id);
|
|
265477
264705
|
setIsProcessing(false);
|
|
265478
264706
|
isProcessingRef.current = false;
|
|
265479
|
-
setEnergyState(newSession.client.getEnergyState() ?? undefined);
|
|
265480
264707
|
setVoiceState(newSession.client.getVoiceState() ?? undefined);
|
|
265481
264708
|
setHeartbeatState(newSession.client.getHeartbeatState?.() ?? undefined);
|
|
265482
264709
|
setIdentityInfo(newSession.client.getIdentityInfo() ?? undefined);
|
|
@@ -265506,7 +264733,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265506
264733
|
toolCalls: [],
|
|
265507
264734
|
toolResults: [],
|
|
265508
264735
|
tokenUsage: undefined,
|
|
265509
|
-
energyState: undefined,
|
|
265510
264736
|
voiceState: undefined,
|
|
265511
264737
|
heartbeatState: undefined,
|
|
265512
264738
|
identityInfo: undefined,
|
|
@@ -265582,7 +264808,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265582
264808
|
toolResultsRef.current = [];
|
|
265583
264809
|
setCurrentToolCall(undefined);
|
|
265584
264810
|
setTokenUsage(undefined);
|
|
265585
|
-
setEnergyState(undefined);
|
|
265586
264811
|
setVoiceState(undefined);
|
|
265587
264812
|
setHeartbeatState(undefined);
|
|
265588
264813
|
setIdentityInfo(undefined);
|
|
@@ -265772,7 +264997,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
265772
264997
|
const activeSession2 = registry3.getActiveSession();
|
|
265773
264998
|
if (activeSession2) {
|
|
265774
264999
|
setTokenUsage(activeSession2.client.getTokenUsage());
|
|
265775
|
-
setEnergyState(activeSession2.client.getEnergyState() ?? undefined);
|
|
265776
265000
|
setVoiceState(activeSession2.client.getVoiceState() ?? undefined);
|
|
265777
265001
|
setHeartbeatState(activeSession2.client.getHeartbeatState?.() ?? undefined);
|
|
265778
265002
|
setIdentityInfo(activeSession2.client.getIdentityInfo() ?? undefined);
|
|
@@ -266144,7 +265368,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
266144
265368
|
session.client.setAskUserHandler((request2) => beginAskUser(session.id, request2));
|
|
266145
265369
|
session.client.setInterviewHandler((request2) => beginInterview(session.id, request2));
|
|
266146
265370
|
await loadSessionMetadata(session);
|
|
266147
|
-
setEnergyState(session.client.getEnergyState() ?? undefined);
|
|
266148
265371
|
setVoiceState(session.client.getVoiceState() ?? undefined);
|
|
266149
265372
|
setHeartbeatState(session.client.getHeartbeatState?.() ?? undefined);
|
|
266150
265373
|
setIdentityInfo(session.client.getIdentityInfo() ?? undefined);
|
|
@@ -267010,7 +266233,6 @@ function App2({ cwd: cwd3, version: version4 }) {
|
|
|
267010
266233
|
toolCalls: [],
|
|
267011
266234
|
toolResults: [],
|
|
267012
266235
|
tokenUsage: { inputTokens: 0, outputTokens: 0, totalTokens: 0, maxContextTokens: tokenUsage?.maxContextTokens || 200000 },
|
|
267013
|
-
energyState,
|
|
267014
266236
|
voiceState,
|
|
267015
266237
|
heartbeatState,
|
|
267016
266238
|
identityInfo,
|
|
@@ -268960,7 +268182,6 @@ ${msg.body || msg.preview}`);
|
|
|
268960
268182
|
cwd: activeSession?.cwd || cwd3,
|
|
268961
268183
|
queueLength: activeQueue.length + inlineCount,
|
|
268962
268184
|
tokenUsage,
|
|
268963
|
-
energyState,
|
|
268964
268185
|
voiceState,
|
|
268965
268186
|
heartbeatState,
|
|
268966
268187
|
identityInfo,
|
|
@@ -269447,7 +268668,7 @@ process.on("unhandledRejection", (reason) => {
|
|
|
269447
268668
|
cleanup();
|
|
269448
268669
|
process.exit(1);
|
|
269449
268670
|
});
|
|
269450
|
-
var VERSION4 = "1.1.
|
|
268671
|
+
var VERSION4 = "1.1.71";
|
|
269451
268672
|
var SYNC_START = "\x1B[?2026h";
|
|
269452
268673
|
var SYNC_END = "\x1B[?2026l";
|
|
269453
268674
|
function enableSynchronizedOutput() {
|
|
@@ -269588,4 +268809,4 @@ export {
|
|
|
269588
268809
|
main
|
|
269589
268810
|
};
|
|
269590
268811
|
|
|
269591
|
-
//# debugId=
|
|
268812
|
+
//# debugId=8C3BA3A5477FA3B564756E2164756E21
|