negotium 0.16.1 → 0.16.3
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/agent-helpers.js +340 -258
- package/dist/agent-helpers.js.map +4 -4
- package/dist/background-bash.js +2 -2
- package/dist/background-bash.js.map +3 -3
- package/dist/browser-runtime.js +2 -18
- package/dist/browser-runtime.js.map +3 -3
- package/dist/canonical-mcp-bridge.js +1 -1
- package/dist/{chunk-syp92qdd.js → chunk-2xcqbd94.js} +3 -3
- package/dist/{chunk-syp92qdd.js.map → chunk-2xcqbd94.js.map} +3 -3
- package/dist/{chunk-s2gez3wg.js → chunk-r0xs3t81.js} +3 -18
- package/dist/{chunk-s2gez3wg.js.map → chunk-r0xs3t81.js.map} +2 -2
- package/dist/{chunk-emzrsg4j.js → chunk-v18s6bj4.js} +3 -2
- package/dist/{chunk-emzrsg4j.js.map → chunk-v18s6bj4.js.map} +2 -2
- package/dist/{chunk-ezfxb5ad.js → chunk-yf3nnkc1.js} +4 -19
- package/dist/{chunk-ezfxb5ad.js.map → chunk-yf3nnkc1.js.map} +3 -3
- package/dist/hosted-agent.js +4 -5
- package/dist/hosted-agent.js.map +4 -4
- package/dist/main.js +784 -596
- package/dist/main.js.map +4 -4
- package/dist/mcp-catalog.js.map +1 -1
- package/dist/mcp-factories.js +315 -241
- package/dist/mcp-factories.js.map +4 -4
- package/dist/media.js +2 -2
- package/dist/media.js.map +3 -3
- package/dist/outbox.js.map +1 -1
- package/dist/platform-runtime.js.map +1 -1
- package/dist/prompts.js +2 -2
- package/dist/prompts.js.map +3 -3
- package/dist/query-runtime.js +2 -18
- package/dist/query-runtime.js.map +3 -3
- package/dist/registry.js +4 -5
- package/dist/registry.js.map +2 -2
- package/dist/rollout.js +2 -2
- package/dist/runtime/src/platform/config.ts +1 -1
- package/dist/runtime/src/version.ts +1 -1
- package/dist/runtime-gateway.js.map +1 -1
- package/dist/runtime-helpers.js +2 -18
- package/dist/runtime-helpers.js.map +3 -3
- package/dist/sqlite.js +1 -17
- package/dist/sqlite.js.map +2 -2
- package/dist/storage.js +6 -17
- package/dist/storage.js.map +2 -2
- package/dist/types/packages/core/src/platform/config.d.ts +1 -1
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/dist/vault.js +2 -18
- package/dist/vault.js.map +3 -3
- package/install-browser-rs.mjs +4 -4
- package/package.json +1 -1
package/dist/agent-helpers.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
2
|
var __defProp = Object.defineProperty;
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
-
for (let key of __getOwnPropNames(mod))
|
|
11
|
-
if (!__hasOwnProp.call(to, key))
|
|
12
|
-
__defProp(to, key, {
|
|
13
|
-
get: () => mod[key],
|
|
14
|
-
enumerable: true
|
|
15
|
-
});
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
3
|
+
var __returnValue = (v) => v;
|
|
4
|
+
function __exportSetter(name, newValue) {
|
|
5
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
+
}
|
|
18
7
|
var __export = (target, all) => {
|
|
19
8
|
for (var name in all)
|
|
20
9
|
__defProp(target, name, {
|
|
21
10
|
get: all[name],
|
|
22
11
|
enumerable: true,
|
|
23
12
|
configurable: true,
|
|
24
|
-
set: (
|
|
13
|
+
set: __exportSetter.bind(all, name)
|
|
25
14
|
});
|
|
26
15
|
};
|
|
27
16
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
17
|
+
var __promiseAll = (args) => Promise.all(args);
|
|
28
18
|
var __require = import.meta.require;
|
|
29
19
|
|
|
30
20
|
// ../../packages/core/src/platform/paths.ts
|
|
@@ -372,7 +362,7 @@ function resolveWhisperBackend() {
|
|
|
372
362
|
function codexAuthFilePath() {
|
|
373
363
|
return process.env.NEGOTIUM_CODEX_AUTH_FILE || join(process.env.CODEX_HOME || join(homedir(), ".codex"), "auth.json");
|
|
374
364
|
}
|
|
375
|
-
var HOME, PROJECT_ROOT, STATE_DIR, WORKSPACE_DIR, TOPIC_WORKSPACE_DIR, SHARED_WIKI_DIR, CRON_WORKSPACE_DIR, BROWSER_DIR, BROWSER_PROFILES_DIR, BINARIES_DIR, SECRETS_DIR, DM_WORKSPACE_DIR, SESSION_WORKSPACE_DIR, CLAUDE_EXECUTABLE_ENV, CLAUDE_EXECUTABLE, DEFAULT_OUTPUT_LANGUAGE = "English", BINARY_EXTENSION, BROWSER_RS_VERSION = "v0.
|
|
365
|
+
var HOME, PROJECT_ROOT, STATE_DIR, WORKSPACE_DIR, TOPIC_WORKSPACE_DIR, SHARED_WIKI_DIR, CRON_WORKSPACE_DIR, BROWSER_DIR, BROWSER_PROFILES_DIR, BINARIES_DIR, SECRETS_DIR, DM_WORKSPACE_DIR, SESSION_WORKSPACE_DIR, CLAUDE_EXECUTABLE_ENV, CLAUDE_EXECUTABLE, DEFAULT_OUTPUT_LANGUAGE = "English", BINARY_EXTENSION, BROWSER_RS_VERSION = "v0.6.0", BROWSER_RS_MIN_SECURE_VERSION = "0.2.1", BROWSER_RS_VERSION_PROBE_TIMEOUT_MS = 15000, SNIPPETS_API_URL, BROWSER_RS_BIN, BASH_RS_VERSION = "v0.1.10", BASH_RS_BIN, PLAYWRIGHT_MCP_BIN, TSX_BIN, TSX_LOADER_PATH, TSX_LOADER, TSCONFIG_PATH, SESSION_COMM_SERVER, TASK_SERVER, DECISION_SERVER, CANONICAL_MCP_PROXY_SERVER, WIKI_SERVER, TOKEN_STATS_SERVER, COMPACTION_LOG_SERVER, SYSTEM_HEALTH_SERVER, AGENT_HEALTH_SERVER, VAULT_SERVER, BG_BASH_BASE_PORT, BG_BASH_MAX_PORT, RUNTIME_MCP_SECRET, NODE_CONTROL_TOKEN, NODE_ID, VAULT_MASTER_KEY, NEGOTIUM_PORT, hostname, DATA_DIR, LOG_DIR, UPLOADS_DIR, VAULT_DIR, SESSIONS_DB, DEBUG_FILE, USERS_LOG_DIR, RUN_DIR, PROGRESS_DIR, DM_CMD_DIR, DM_RESP_DIR, SESSION_INBOX_DIR, SESSION_ASKS_DIR, BASHRS_SPILL_ROOT, PLAYWRIGHT_BASE_PORT, PLAYWRIGHT_MAX_PORT, PLAYWRIGHT_PORTS_DIR, ACTIVE_QUERY_STALE_MS, AGENTS_PROMPTS_DIR, RESOURCES_DIR, ABSOLUTE_PATH_PREFIX, FILE_EXTENSIONS_REGEX, FILE_TAG_REGEX, MODEL_SONNET = "claude-sonnet-5", MODEL_OPUS = "claude-opus-5", MODEL_FABLE = "claude-fable-5-1", FALLBACK_AGENT, FALLBACK_MODEL, DEFAULT_TOPIC_EFFORT, FFMPEG_BIN, FFPROBE_BIN, PYTHON_BIN, FASTER_WHISPER_WRAPPER, WHISPER_MODEL, TESSERACT_BIN, PDFTOTEXT_BIN, WHISPER_BACKEND, MLX_WHISPER_BIN, WHISPER_MODEL_MLX, _envMaxTellDepth, MAX_TELL_DEPTH;
|
|
376
366
|
var init_config = __esm(() => {
|
|
377
367
|
init_config_helpers();
|
|
378
368
|
init_logger();
|
|
@@ -1924,9 +1914,11 @@ function redactVaultSecrets(userId, text) {
|
|
|
1924
1914
|
var vaultDb, vaultMasterKey, VAULT_VALUE_MAX_BYTES;
|
|
1925
1915
|
var init_vault = __esm(async () => {
|
|
1926
1916
|
init_config();
|
|
1927
|
-
await init_sqlite();
|
|
1928
|
-
await init_storage_host();
|
|
1929
1917
|
init_vault_crypto();
|
|
1918
|
+
await __promiseAll([
|
|
1919
|
+
init_sqlite(),
|
|
1920
|
+
init_storage_host()
|
|
1921
|
+
]);
|
|
1930
1922
|
vaultMasterKey = VAULT_MASTER_KEY;
|
|
1931
1923
|
VAULT_VALUE_MAX_BYTES = 64 * 1024;
|
|
1932
1924
|
});
|
|
@@ -3118,14 +3110,14 @@ function formatDateBucket(d) {
|
|
|
3118
3110
|
}
|
|
3119
3111
|
var _shellCache = null, MAX_DAY_SPAN = 30, DAY_MS = 86400000, LOCAL_DATE_SKEW_DAYS = 1;
|
|
3120
3112
|
var init_codex = __esm(async () => {
|
|
3121
|
-
await init_execution_host();
|
|
3122
3113
|
init_shared();
|
|
3123
3114
|
init_jsonl();
|
|
3124
3115
|
init_logger();
|
|
3116
|
+
await init_execution_host();
|
|
3125
3117
|
});
|
|
3126
3118
|
|
|
3127
3119
|
// ../../packages/core/src/version.ts
|
|
3128
|
-
var NEGOTIUM_VERSION = "0.16.
|
|
3120
|
+
var NEGOTIUM_VERSION = "0.16.3";
|
|
3129
3121
|
|
|
3130
3122
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
3131
3123
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -3460,8 +3452,10 @@ async function forkCodexSession(parentThreadId) {
|
|
|
3460
3452
|
var forkCodexThread;
|
|
3461
3453
|
var init_codex_app_server = __esm(async () => {
|
|
3462
3454
|
init_codex_native_multi_agent();
|
|
3463
|
-
await
|
|
3464
|
-
|
|
3455
|
+
await __promiseAll([
|
|
3456
|
+
init_execution_host(),
|
|
3457
|
+
init_codex()
|
|
3458
|
+
]);
|
|
3465
3459
|
forkCodexThread = createCodexAppServerForker({
|
|
3466
3460
|
spawnServer() {
|
|
3467
3461
|
return spawn3(process.execPath, [codexCliScriptPath(), "app-server", "--stdio"], {
|
|
@@ -3480,10 +3474,12 @@ import { existsSync as existsSync7, unlinkSync as unlinkSync6 } from "fs";
|
|
|
3480
3474
|
import { join as join8 } from "path";
|
|
3481
3475
|
var VALID_EFFORTS2, codexRegistry, codexRegistryOperations;
|
|
3482
3476
|
var init_codex_registry = __esm(async () => {
|
|
3483
|
-
await init_execution_host();
|
|
3484
|
-
await init_codex();
|
|
3485
3477
|
init_logger();
|
|
3486
3478
|
init_types();
|
|
3479
|
+
await __promiseAll([
|
|
3480
|
+
init_execution_host(),
|
|
3481
|
+
init_codex()
|
|
3482
|
+
]);
|
|
3487
3483
|
VALID_EFFORTS2 = new Set(CODEX_EFFORT_VALUES);
|
|
3488
3484
|
codexRegistry = {
|
|
3489
3485
|
kind: "codex",
|
|
@@ -3710,8 +3706,8 @@ function getRegistryOperations(agent) {
|
|
|
3710
3706
|
var REGISTRIES, OPERATIONS;
|
|
3711
3707
|
var init_registry = __esm(async () => {
|
|
3712
3708
|
init_claude_registry();
|
|
3713
|
-
await init_codex_registry();
|
|
3714
3709
|
init_maestro_registry();
|
|
3710
|
+
await init_codex_registry();
|
|
3715
3711
|
REGISTRIES = {
|
|
3716
3712
|
claude: claudeRegistry,
|
|
3717
3713
|
codex: codexRegistry,
|
|
@@ -4616,10 +4612,10 @@ async function* claudeProvider(opts) {
|
|
|
4616
4612
|
var CLAUDE_DEFAULT_DISALLOWED_TOOLS, CLAUDE_NATIVE_AGENT_TOOLS, CLAUDE_IMAGE_MAX_BYTES, CLAUDE_IMAGE_MIME_TYPES, CLAUDE_ABORT_SIGKILL_DELAY_MS = 2500, claudeProcessExitListeners;
|
|
4617
4613
|
var init_claude_provider = __esm(async () => {
|
|
4618
4614
|
init_claude_registry();
|
|
4619
|
-
await init_execution_host();
|
|
4620
4615
|
init_vault_tool_policy();
|
|
4621
4616
|
init_file_events();
|
|
4622
4617
|
init_logger();
|
|
4618
|
+
await init_execution_host();
|
|
4623
4619
|
CLAUDE_DEFAULT_DISALLOWED_TOOLS = [
|
|
4624
4620
|
"AskUserQuestion",
|
|
4625
4621
|
"Workflow",
|
|
@@ -5039,9 +5035,9 @@ async function createCodexVaultHookBridge(userId) {
|
|
|
5039
5035
|
var MAX_HOOK_REQUEST_BYTES, SENSITIVE_STORAGE_DENIAL = "Runtime secret storage access is not permitted", HOOK_SOCKET_ENV = "NEGOTIUM_CODEX_VAULT_HOOK_SOCKET", HOOK_TOKEN_ENV = "NEGOTIUM_CODEX_VAULT_HOOK_TOKEN", WINDOWS_BRIDGE_UNSUPPORTED;
|
|
5040
5036
|
var init_codex_vault_hook_bridge = __esm(async () => {
|
|
5041
5037
|
init_codex_native_multi_agent();
|
|
5042
|
-
await init_execution_host();
|
|
5043
5038
|
init_vault_tool_policy();
|
|
5044
5039
|
init_ipc();
|
|
5040
|
+
await init_execution_host();
|
|
5045
5041
|
MAX_HOOK_REQUEST_BYTES = 1024 * 1024;
|
|
5046
5042
|
WINDOWS_BRIDGE_UNSUPPORTED = "Codex Vault hooks are not available on Windows: the hook-trust bypass can only be passed " + "through a wrapper executable, and the Codex SDK spawns the override without a shell, so a " + ".cmd wrapper cannot run. Use the Claude or Maestro backend on this host.";
|
|
5047
5043
|
});
|
|
@@ -6255,13 +6251,15 @@ var CODEX_HOOK_TRUST_BYPASS_NOTICE = "`--dangerously-bypass-hook-trust` is enabl
|
|
|
6255
6251
|
var init_codex_provider = __esm(async () => {
|
|
6256
6252
|
init_codex_native_multi_agent();
|
|
6257
6253
|
init_codex_tree_kill();
|
|
6258
|
-
await init_codex_vault_hook_bridge();
|
|
6259
|
-
await init_execution_host();
|
|
6260
|
-
await init_codex();
|
|
6261
6254
|
init_tool_format();
|
|
6262
6255
|
init_file_events();
|
|
6263
6256
|
init_logger();
|
|
6264
6257
|
init_mcp_config();
|
|
6258
|
+
await __promiseAll([
|
|
6259
|
+
init_codex_vault_hook_bridge(),
|
|
6260
|
+
init_execution_host(),
|
|
6261
|
+
init_codex()
|
|
6262
|
+
]);
|
|
6265
6263
|
CODEX_MCP_SERVER_NAME_OVERRIDES = {
|
|
6266
6264
|
playwright: "otium_playwright",
|
|
6267
6265
|
"cua-rs": "otium_cua_rs"
|
|
@@ -6379,10 +6377,12 @@ function maestroProvider(opts) {
|
|
|
6379
6377
|
var MAESTRO_DEFAULT_MAX_TOKENS = 32768, PROVIDER_ASK_USER_TOOL = "AskUserQuestion", MAESTRO_PROVIDER_OWNED_TOOL_SET, DEFAULT_MAESTRO_DISALLOWED_TOOLS, MAESTRO_ALL_BUILTIN_TOOLS, MAESTRO_TOOL_OUTPUT_DIR;
|
|
6380
6378
|
var init_maestro_provider = __esm(async () => {
|
|
6381
6379
|
init_maestro_bootstrap_env();
|
|
6382
|
-
await init_execution_host();
|
|
6383
6380
|
init_vault_tool_policy();
|
|
6384
6381
|
init_config();
|
|
6385
|
-
await
|
|
6382
|
+
await __promiseAll([
|
|
6383
|
+
init_execution_host(),
|
|
6384
|
+
init_vault()
|
|
6385
|
+
]);
|
|
6386
6386
|
MAESTRO_PROVIDER_OWNED_TOOL_SET = new Set([PROVIDER_ASK_USER_TOOL]);
|
|
6387
6387
|
DEFAULT_MAESTRO_DISALLOWED_TOOLS = [PROVIDER_ASK_USER_TOOL];
|
|
6388
6388
|
MAESTRO_ALL_BUILTIN_TOOLS = [
|
|
@@ -6513,13 +6513,15 @@ async function* runAgent(opts) {
|
|
|
6513
6513
|
}
|
|
6514
6514
|
var loadClaudeProvider, loadCodexProvider, loadMaestroProvider;
|
|
6515
6515
|
var init_agents = __esm(async () => {
|
|
6516
|
-
await init_execution_host();
|
|
6517
|
-
await init_registry();
|
|
6518
6516
|
init_claude();
|
|
6519
|
-
await init_task_events();
|
|
6520
6517
|
init_logger();
|
|
6521
|
-
await init_conversations();
|
|
6522
6518
|
init_types();
|
|
6519
|
+
await __promiseAll([
|
|
6520
|
+
init_execution_host(),
|
|
6521
|
+
init_registry(),
|
|
6522
|
+
init_task_events(),
|
|
6523
|
+
init_conversations()
|
|
6524
|
+
]);
|
|
6523
6525
|
loadClaudeProvider = memoizeImport(() => init_claude_provider().then(() => exports_claude_provider));
|
|
6524
6526
|
loadCodexProvider = memoizeImport(() => init_codex_provider().then(() => exports_codex_provider));
|
|
6525
6527
|
loadMaestroProvider = memoizeImport(() => init_maestro_provider().then(() => exports_maestro_provider));
|
|
@@ -6844,8 +6846,10 @@ function listRuntimeEventsAfter(seq, limit = 500) {
|
|
|
6844
6846
|
}
|
|
6845
6847
|
var RUNTIME_EVENT_TYPES, types;
|
|
6846
6848
|
var init_runtime_events = __esm(async () => {
|
|
6847
|
-
await
|
|
6848
|
-
|
|
6849
|
+
await __promiseAll([
|
|
6850
|
+
init_forum_db(),
|
|
6851
|
+
init_storage_host()
|
|
6852
|
+
]);
|
|
6849
6853
|
RUNTIME_EVENT_TYPES = [
|
|
6850
6854
|
"message",
|
|
6851
6855
|
"message-updated",
|
|
@@ -7715,8 +7719,10 @@ function getMessagesForTopicAfterRowid(topicId, afterRowid) {
|
|
|
7715
7719
|
}
|
|
7716
7720
|
var appendHooks;
|
|
7717
7721
|
var init_api_messages = __esm(async () => {
|
|
7718
|
-
await
|
|
7719
|
-
|
|
7722
|
+
await __promiseAll([
|
|
7723
|
+
init_forum_db(),
|
|
7724
|
+
init_storage_host()
|
|
7725
|
+
]);
|
|
7720
7726
|
registerStorageSchemaInitializer(initializeApiMessagesSchema, 30);
|
|
7721
7727
|
appendHooks = new Set;
|
|
7722
7728
|
});
|
|
@@ -7806,9 +7812,11 @@ function deleteTopicBrief(topicId) {
|
|
|
7806
7812
|
db.query("DELETE FROM api_topic_brief WHERE topic_id = ?").run(topicId);
|
|
7807
7813
|
}
|
|
7808
7814
|
var init_api_topic_brief = __esm(async () => {
|
|
7809
|
-
await init_forum_db();
|
|
7810
|
-
await init_storage_host();
|
|
7811
7815
|
init_wiki_summary_names();
|
|
7816
|
+
await __promiseAll([
|
|
7817
|
+
init_forum_db(),
|
|
7818
|
+
init_storage_host()
|
|
7819
|
+
]);
|
|
7812
7820
|
registerStorageSchemaInitializer((database) => {
|
|
7813
7821
|
database.exec(`
|
|
7814
7822
|
CREATE TABLE IF NOT EXISTS api_topic_brief (
|
|
@@ -8465,8 +8473,10 @@ var init_api_topics = __esm(async () => {
|
|
|
8465
8473
|
init_config_helpers();
|
|
8466
8474
|
init_constants();
|
|
8467
8475
|
init_logger();
|
|
8468
|
-
await
|
|
8469
|
-
|
|
8476
|
+
await __promiseAll([
|
|
8477
|
+
init_forum_db(),
|
|
8478
|
+
init_storage_host()
|
|
8479
|
+
]);
|
|
8470
8480
|
registerStorageSchemaInitializer(initializeApiTopicsSchema, 20);
|
|
8471
8481
|
});
|
|
8472
8482
|
|
|
@@ -8591,8 +8601,10 @@ function deleteApiTopicConfig(topicId) {
|
|
|
8591
8601
|
db.query("DELETE FROM api_topic_config WHERE topic_id = ?").run(topicId);
|
|
8592
8602
|
}
|
|
8593
8603
|
var init_api_topic_config = __esm(async () => {
|
|
8594
|
-
await
|
|
8595
|
-
|
|
8604
|
+
await __promiseAll([
|
|
8605
|
+
init_forum_db(),
|
|
8606
|
+
init_storage_host()
|
|
8607
|
+
]);
|
|
8596
8608
|
registerStorageSchemaInitializer(initializeApiTopicConfigSchema, 40);
|
|
8597
8609
|
});
|
|
8598
8610
|
|
|
@@ -8640,11 +8652,13 @@ function isLegacySharedGeneral(topicId) {
|
|
|
8640
8652
|
var LEGACY_PERSONAL_GENERAL_DESCRIPTION = "\uB098\uB9CC\uC758 \uAC1C\uC778 \uACF5\uAC04\uC774\uC5D0\uC694. \uB300\uD654\uC640 AI \uC791\uC5C5\uC740 \uB2E4\uB978 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uACF5\uAC1C\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.", PERSONAL_GENERAL_DESCRIPTION = "Your private General. Messages and membership are visible only to you. Workspace memory, wiki, and skills are shared with your workspace.";
|
|
8641
8653
|
var init_personal_general = __esm(async () => {
|
|
8642
8654
|
init_model_catalog();
|
|
8643
|
-
await init_registry();
|
|
8644
8655
|
init_config();
|
|
8645
8656
|
init_constants();
|
|
8646
|
-
await
|
|
8647
|
-
|
|
8657
|
+
await __promiseAll([
|
|
8658
|
+
init_registry(),
|
|
8659
|
+
init_api_topic_config(),
|
|
8660
|
+
init_api_topics()
|
|
8661
|
+
]);
|
|
8648
8662
|
});
|
|
8649
8663
|
|
|
8650
8664
|
// ../../packages/core/src/agents/archiver.ts
|
|
@@ -8982,21 +8996,23 @@ function runArchiverTurn(params) {
|
|
|
8982
8996
|
}
|
|
8983
8997
|
var MAX_BRIEF_ENTRIES = 8, defaultArchiverRuntime;
|
|
8984
8998
|
var init_archiver = __esm(async () => {
|
|
8985
|
-
await init_agents();
|
|
8986
8999
|
init_model_catalog();
|
|
8987
|
-
await init_registry();
|
|
8988
9000
|
init_tool_format();
|
|
8989
|
-
await init_bus();
|
|
8990
9001
|
init_config();
|
|
8991
9002
|
init_logger();
|
|
8992
9003
|
init_builders();
|
|
8993
9004
|
init_background_session_policy();
|
|
8994
|
-
await init_api_messages();
|
|
8995
|
-
await init_api_topic_brief();
|
|
8996
|
-
await init_api_topics();
|
|
8997
|
-
await init_wiki();
|
|
8998
9005
|
init_wiki_summary_names();
|
|
8999
|
-
await
|
|
9006
|
+
await __promiseAll([
|
|
9007
|
+
init_agents(),
|
|
9008
|
+
init_registry(),
|
|
9009
|
+
init_bus(),
|
|
9010
|
+
init_api_messages(),
|
|
9011
|
+
init_api_topic_brief(),
|
|
9012
|
+
init_api_topics(),
|
|
9013
|
+
init_wiki(),
|
|
9014
|
+
init_personal_general()
|
|
9015
|
+
]);
|
|
9000
9016
|
defaultArchiverRuntime = createArchiverRuntime({
|
|
9001
9017
|
storage: {
|
|
9002
9018
|
getWikiDir: getSharedWikiDir,
|
|
@@ -9179,8 +9195,8 @@ function cleanupAgentFork(handle) {
|
|
|
9179
9195
|
}
|
|
9180
9196
|
var defaultForkHelpers;
|
|
9181
9197
|
var init_fork = __esm(async () => {
|
|
9182
|
-
await init_registry();
|
|
9183
9198
|
init_logger();
|
|
9199
|
+
await init_registry();
|
|
9184
9200
|
defaultForkHelpers = createAgentForkHelpers({
|
|
9185
9201
|
forkSession: (agent, options) => getRegistryOperations(agent).forkSession(options),
|
|
9186
9202
|
exists: existsSync17,
|
|
@@ -9299,8 +9315,10 @@ function beginRuntimeTopicMaintenance(topicId, options = {}) {
|
|
|
9299
9315
|
}
|
|
9300
9316
|
var TOPIC_MAINTENANCE_STALE_MS = 30000, TOPIC_MAINTENANCE_HEARTBEAT_MS = 1000;
|
|
9301
9317
|
var init_runtime_topic_state = __esm(async () => {
|
|
9302
|
-
await
|
|
9303
|
-
|
|
9318
|
+
await __promiseAll([
|
|
9319
|
+
init_forum_db(),
|
|
9320
|
+
init_storage_host()
|
|
9321
|
+
]);
|
|
9304
9322
|
registerStorageSchemaInitializer((database) => {
|
|
9305
9323
|
database.exec(`
|
|
9306
9324
|
CREATE TABLE IF NOT EXISTS runtime_topic_state (
|
|
@@ -9397,9 +9415,11 @@ function releaseRuntimeTurnLease(topicId, queryId, ownerId = RUNTIME_INSTANCE_ID
|
|
|
9397
9415
|
}
|
|
9398
9416
|
var RUNTIME_INSTANCE_ID, TURN_LEASE_STALE_MS = 1e4;
|
|
9399
9417
|
var init_runtime_leases = __esm(async () => {
|
|
9400
|
-
await
|
|
9401
|
-
|
|
9402
|
-
|
|
9418
|
+
await __promiseAll([
|
|
9419
|
+
init_forum_db(),
|
|
9420
|
+
init_runtime_topic_state(),
|
|
9421
|
+
init_storage_host()
|
|
9422
|
+
]);
|
|
9403
9423
|
RUNTIME_INSTANCE_ID = `${process.pid}-${randomUUID8()}`;
|
|
9404
9424
|
registerStorageSchemaInitializer((database) => {
|
|
9405
9425
|
database.exec(`
|
|
@@ -9774,10 +9794,10 @@ function wsAbortReason(reason) {
|
|
|
9774
9794
|
var roomQueryRegistry, interSessionQueue;
|
|
9775
9795
|
var init_active_rooms = __esm(async () => {
|
|
9776
9796
|
init_logger();
|
|
9777
|
-
await init_runtime_leases();
|
|
9778
9797
|
init_room_query_registry();
|
|
9779
9798
|
init_types2();
|
|
9780
9799
|
init_room_query_registry();
|
|
9800
|
+
await init_runtime_leases();
|
|
9781
9801
|
roomQueryRegistry = createRoomQueryRegistry({
|
|
9782
9802
|
instanceId: RUNTIME_INSTANCE_ID,
|
|
9783
9803
|
internalAbortReason: "internal" /* Internal */,
|
|
@@ -9956,9 +9976,11 @@ function archiveConversationEvents(topicId, topicTitle, userId, options = {}) {
|
|
|
9956
9976
|
}
|
|
9957
9977
|
var init_topic_archive = __esm(async () => {
|
|
9958
9978
|
init_logger();
|
|
9959
|
-
await
|
|
9960
|
-
|
|
9961
|
-
|
|
9979
|
+
await __promiseAll([
|
|
9980
|
+
init_api_messages(),
|
|
9981
|
+
init_conversations(),
|
|
9982
|
+
init_wiki()
|
|
9983
|
+
]);
|
|
9962
9984
|
});
|
|
9963
9985
|
|
|
9964
9986
|
// ../../packages/core/src/storage/topic-archive-state.ts
|
|
@@ -10071,8 +10093,10 @@ function deleteTopicArchiveState(topicId) {
|
|
|
10071
10093
|
}
|
|
10072
10094
|
var ARCHIVE_JOB_STALE_MS;
|
|
10073
10095
|
var init_topic_archive_state = __esm(async () => {
|
|
10074
|
-
await
|
|
10075
|
-
|
|
10096
|
+
await __promiseAll([
|
|
10097
|
+
init_forum_db(),
|
|
10098
|
+
init_storage_host()
|
|
10099
|
+
]);
|
|
10076
10100
|
registerStorageSchemaInitializer((database) => {
|
|
10077
10101
|
database.exec(`
|
|
10078
10102
|
CREATE TABLE IF NOT EXISTS api_topic_archive_state (
|
|
@@ -10249,13 +10273,15 @@ function archiveActiveTopicForMemory(topicId, userId, options) {
|
|
|
10249
10273
|
}
|
|
10250
10274
|
var DEFAULT_IDLE_DELAY_MS, DEFAULT_MIN_MESSAGES = 8, timers;
|
|
10251
10275
|
var init_idle_archiver = __esm(async () => {
|
|
10252
|
-
await init_archiver();
|
|
10253
10276
|
init_logger();
|
|
10254
|
-
await
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10277
|
+
await __promiseAll([
|
|
10278
|
+
init_archiver(),
|
|
10279
|
+
init_active_rooms(),
|
|
10280
|
+
init_api_messages(),
|
|
10281
|
+
init_api_topics(),
|
|
10282
|
+
init_topic_archive(),
|
|
10283
|
+
init_topic_archive_state()
|
|
10284
|
+
]);
|
|
10259
10285
|
DEFAULT_IDLE_DELAY_MS = 6 * 60 * 60 * 1000;
|
|
10260
10286
|
timers = new Map;
|
|
10261
10287
|
});
|
|
@@ -10470,8 +10496,10 @@ function cancelAskUserGate(topicId, messageId, ownerId, now = new Date().toISOSt
|
|
|
10470
10496
|
}).immediate();
|
|
10471
10497
|
}
|
|
10472
10498
|
var init_ask_user_gates = __esm(async () => {
|
|
10473
|
-
await
|
|
10474
|
-
|
|
10499
|
+
await __promiseAll([
|
|
10500
|
+
init_forum_db(),
|
|
10501
|
+
init_storage_host()
|
|
10502
|
+
]);
|
|
10475
10503
|
registerStorageSchemaInitializer(initializeAskUserGateSchema, 31);
|
|
10476
10504
|
});
|
|
10477
10505
|
|
|
@@ -10590,9 +10618,11 @@ function acquireRuntimeProcessLease(role, options = {}) {
|
|
|
10590
10618
|
}
|
|
10591
10619
|
var PROCESS_LEASE_STALE_MS = 5000, PROCESS_LEASE_HEARTBEAT_MS = 1000;
|
|
10592
10620
|
var init_runtime_process_leases = __esm(async () => {
|
|
10593
|
-
await
|
|
10594
|
-
|
|
10595
|
-
|
|
10621
|
+
await __promiseAll([
|
|
10622
|
+
init_forum_db(),
|
|
10623
|
+
init_runtime_leases(),
|
|
10624
|
+
init_storage_host()
|
|
10625
|
+
]);
|
|
10596
10626
|
registerStorageSchemaInitializer((database) => {
|
|
10597
10627
|
database.exec(`
|
|
10598
10628
|
CREATE TABLE IF NOT EXISTS runtime_process_leases (
|
|
@@ -10912,12 +10942,14 @@ function cancelPendingAskUserQuestions(topicId, queryId) {
|
|
|
10912
10942
|
var MAX_QUESTION_CHARS = 2000, MAX_CHOICE_LABEL_CHARS = 128, MAX_CHOICE_DESCRIPTION_CHARS = 500, MAX_CHOICES = 12, MAX_IDEMPOTENCY_KEY_CHARS = 200, ASK_GATE_OWNER_ID, ASK_GATE_LEASE_ROLE_PREFIX = "ask-user-gate:", defaultAskUserDurabilityHost, defaultAskUserRuntime;
|
|
10913
10943
|
var init_ask_user = __esm(async () => {
|
|
10914
10944
|
init_common();
|
|
10915
|
-
await
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10945
|
+
await __promiseAll([
|
|
10946
|
+
init_bus(),
|
|
10947
|
+
init_api_messages(),
|
|
10948
|
+
init_api_topic_config(),
|
|
10949
|
+
init_api_topics(),
|
|
10950
|
+
init_ask_user_gates(),
|
|
10951
|
+
init_runtime_process_leases()
|
|
10952
|
+
]);
|
|
10921
10953
|
ASK_GATE_OWNER_ID = `ask-user-${process.pid}-${randomUUID9()}`;
|
|
10922
10954
|
defaultAskUserDurabilityHost = {
|
|
10923
10955
|
gates: {
|
|
@@ -11022,10 +11054,12 @@ function deleteSelfSchedulesForTopic(topicId) {
|
|
|
11022
11054
|
return Number(result.changes ?? 0);
|
|
11023
11055
|
}
|
|
11024
11056
|
var init_self_schedules = __esm(async () => {
|
|
11025
|
-
await
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11057
|
+
await __promiseAll([
|
|
11058
|
+
init_forum_db(),
|
|
11059
|
+
init_runtime_leases(),
|
|
11060
|
+
init_runtime_topic_state(),
|
|
11061
|
+
init_storage_host()
|
|
11062
|
+
]);
|
|
11029
11063
|
registerStorageSchemaInitializer((database) => {
|
|
11030
11064
|
database.exec(`
|
|
11031
11065
|
CREATE TABLE IF NOT EXISTS runtime_self_schedules (
|
|
@@ -11383,8 +11417,8 @@ var init_transport_probe = __esm(() => {
|
|
|
11383
11417
|
|
|
11384
11418
|
// ../../packages/core/src/storage/vault-public.ts
|
|
11385
11419
|
var init_vault_public = __esm(async () => {
|
|
11386
|
-
await init_vault();
|
|
11387
11420
|
init_vault_crypto();
|
|
11421
|
+
await init_vault();
|
|
11388
11422
|
});
|
|
11389
11423
|
|
|
11390
11424
|
// ../../packages/core/src/platform/playwright/vault-broker.ts
|
|
@@ -11662,8 +11696,10 @@ function assignTopicBrowserProfile(opts) {
|
|
|
11662
11696
|
}
|
|
11663
11697
|
var DEFAULT_BROWSER_PROFILE = "default";
|
|
11664
11698
|
var init_browser_profiles = __esm(async () => {
|
|
11665
|
-
await
|
|
11666
|
-
|
|
11699
|
+
await __promiseAll([
|
|
11700
|
+
init_forum_db(),
|
|
11701
|
+
init_storage_host()
|
|
11702
|
+
]);
|
|
11667
11703
|
registerStorageSchemaInitializer((database) => {
|
|
11668
11704
|
database.exec(`
|
|
11669
11705
|
CREATE TABLE IF NOT EXISTS browser_profiles (
|
|
@@ -12307,15 +12343,17 @@ var CHILD_ENVIRONMENT_KEYS, WINDOWS_CHILD_ENVIRONMENT_KEYS, defaultManagerHost,
|
|
|
12307
12343
|
var init_manager2 = __esm(async () => {
|
|
12308
12344
|
init_config();
|
|
12309
12345
|
init_logger();
|
|
12310
|
-
await init_browser_processes();
|
|
12311
12346
|
init_headed_launch();
|
|
12312
12347
|
init_transport_probe();
|
|
12313
|
-
await init_vault_broker();
|
|
12314
|
-
await init_browser_profiles();
|
|
12315
12348
|
init_manager_utils();
|
|
12316
|
-
await init_browser_processes();
|
|
12317
12349
|
init_transport_probe();
|
|
12318
12350
|
init_manager_utils();
|
|
12351
|
+
await __promiseAll([
|
|
12352
|
+
init_browser_processes(),
|
|
12353
|
+
init_vault_broker(),
|
|
12354
|
+
init_browser_profiles(),
|
|
12355
|
+
init_browser_processes()
|
|
12356
|
+
]);
|
|
12319
12357
|
CHILD_ENVIRONMENT_KEYS = [
|
|
12320
12358
|
"HOME",
|
|
12321
12359
|
"PATH",
|
|
@@ -12691,8 +12729,10 @@ var TOKEN_PRICES;
|
|
|
12691
12729
|
var init_token_stats = __esm(async () => {
|
|
12692
12730
|
init_jsonl();
|
|
12693
12731
|
init_logger();
|
|
12694
|
-
await
|
|
12695
|
-
|
|
12732
|
+
await __promiseAll([
|
|
12733
|
+
init_api_topics(),
|
|
12734
|
+
init_storage_host()
|
|
12735
|
+
]);
|
|
12696
12736
|
TOKEN_PRICES = {
|
|
12697
12737
|
"codex:gpt-6-astra": { input: 10, cacheWrite: 12.5, cacheRead: 1, output: 50 },
|
|
12698
12738
|
"codex:gpt-5.6-sol": { input: 5, cacheRead: 0.5, output: 30 },
|
|
@@ -12856,10 +12896,12 @@ async function runIdleCompactForTopic(topicId, userId, options = {}) {
|
|
|
12856
12896
|
var DEFAULT_IDLE_DELAY_MS2, DEFAULT_CONTEXT_LIMIT_DELAY_MS = 1000, CONTEXT_LIMIT_COMPACT_PERCENT = 90, DEFAULT_MIN_CONTEXT_PERCENT = 50, timers2, contextLimitTimers;
|
|
12857
12897
|
var init_idle_compact = __esm(async () => {
|
|
12858
12898
|
init_logger();
|
|
12859
|
-
await
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12899
|
+
await __promiseAll([
|
|
12900
|
+
init_active_rooms(),
|
|
12901
|
+
init_api_topics(),
|
|
12902
|
+
init_runtime_leases(),
|
|
12903
|
+
init_token_stats()
|
|
12904
|
+
]);
|
|
12863
12905
|
DEFAULT_IDLE_DELAY_MS2 = 6 * 60 * 60 * 1000;
|
|
12864
12906
|
timers2 = new Map;
|
|
12865
12907
|
contextLimitTimers = new Map;
|
|
@@ -12984,10 +13026,12 @@ function createTopicLogMaintenance(host) {
|
|
|
12984
13026
|
}
|
|
12985
13027
|
var defaultTopicLogMaintenance, cleanupTopicRollouts, cleanupTopicRolloutsFromEntries, rotateTopicLogs, purgeTopicLogs;
|
|
12986
13028
|
var init_topic_cleanup = __esm(async () => {
|
|
12987
|
-
await init_agents();
|
|
12988
|
-
await init_registry();
|
|
12989
13029
|
init_logger();
|
|
12990
|
-
await
|
|
13030
|
+
await __promiseAll([
|
|
13031
|
+
init_agents(),
|
|
13032
|
+
init_registry(),
|
|
13033
|
+
init_conversations()
|
|
13034
|
+
]);
|
|
12991
13035
|
defaultTopicLogMaintenance = createTopicLogMaintenance({
|
|
12992
13036
|
agents: SUPPORTED_AGENTS,
|
|
12993
13037
|
readActiveConversation: readConversation,
|
|
@@ -13070,12 +13114,14 @@ function text(value, maxLen) {
|
|
|
13070
13114
|
}
|
|
13071
13115
|
var providers2, transientSessions;
|
|
13072
13116
|
var init_background_sessions = __esm(async () => {
|
|
13073
|
-
await init_archiver();
|
|
13074
13117
|
init_tool_format();
|
|
13075
|
-
await init_api_topics();
|
|
13076
|
-
await init_runtime_events();
|
|
13077
|
-
await init_runtime_leases();
|
|
13078
13118
|
init_background_session_policy();
|
|
13119
|
+
await __promiseAll([
|
|
13120
|
+
init_archiver(),
|
|
13121
|
+
init_api_topics(),
|
|
13122
|
+
init_runtime_events(),
|
|
13123
|
+
init_runtime_leases()
|
|
13124
|
+
]);
|
|
13079
13125
|
providers2 = new Set;
|
|
13080
13126
|
transientSessions = new Map;
|
|
13081
13127
|
});
|
|
@@ -13385,10 +13431,12 @@ function getRuntimeUserTurnRequest(topicId) {
|
|
|
13385
13431
|
var REQUEST_CLAIM_STALE_MS;
|
|
13386
13432
|
var init_runtime_turn_requests = __esm(async () => {
|
|
13387
13433
|
init_user_turn_envelope();
|
|
13388
|
-
await
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
|
|
13434
|
+
await __promiseAll([
|
|
13435
|
+
init_forum_db(),
|
|
13436
|
+
init_runtime_leases(),
|
|
13437
|
+
init_runtime_topic_state(),
|
|
13438
|
+
init_storage_host()
|
|
13439
|
+
]);
|
|
13392
13440
|
REQUEST_CLAIM_STALE_MS = TURN_LEASE_STALE_MS;
|
|
13393
13441
|
registerStorageSchemaInitializer((database) => ensureRuntimeUserTurnRequestsSchema(database));
|
|
13394
13442
|
});
|
|
@@ -14130,31 +14178,33 @@ async function compactTopicSession(topicId, userId, reason = "topic-session-comp
|
|
|
14130
14178
|
var RESET_TURN_WAIT_MS = 5000, RESET_MEMORY_ARCHIVE_WAIT_MS, COMPACTION_INLINE_CHARS = 1e5, COMPACTION_SOURCE_CHARS, COMPACTION_MEMORY_CHARS = 80000, COMPACTION_OUTPUT_CHARS = 30000, COMPACTION_RETAINED_TAIL_TOKENS = 64000, COMPACTION_TIMEOUT_MS, COMPACTION_LOG_TIMEOUT_MS, COMPACTION_LOG_MAX_CALLS = 12, COMPACTION_LOG_MAX_TOTAL_BYTES, COMPACTION_LOG_MAX_CHUNK_BYTES, COMPACT_CONTEXT_MARKER = "[Negotium compacted context]", AUTO_FORK_COMPACTION_TOKENS = 28000;
|
|
14131
14179
|
var init_session = __esm(async () => {
|
|
14132
14180
|
init_compaction_tool_projection();
|
|
14133
|
-
await init_idle_archiver();
|
|
14134
|
-
await init_idle_compact();
|
|
14135
|
-
await init_agents();
|
|
14136
14181
|
init_model_catalog();
|
|
14137
|
-
await init_registry();
|
|
14138
14182
|
init_shared();
|
|
14139
|
-
await init_topic_cleanup();
|
|
14140
|
-
await init_bus();
|
|
14141
14183
|
init_config();
|
|
14142
14184
|
init_config_helpers();
|
|
14143
14185
|
init_logger();
|
|
14144
14186
|
init_mcp_config();
|
|
14145
|
-
await init_active_rooms();
|
|
14146
|
-
await init_background_sessions();
|
|
14147
14187
|
init_usage_alert();
|
|
14148
|
-
await
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14188
|
+
await __promiseAll([
|
|
14189
|
+
init_idle_archiver(),
|
|
14190
|
+
init_idle_compact(),
|
|
14191
|
+
init_agents(),
|
|
14192
|
+
init_registry(),
|
|
14193
|
+
init_topic_cleanup(),
|
|
14194
|
+
init_bus(),
|
|
14195
|
+
init_active_rooms(),
|
|
14196
|
+
init_background_sessions(),
|
|
14197
|
+
init_api_messages(),
|
|
14198
|
+
init_api_topic_brief(),
|
|
14199
|
+
init_api_topic_config(),
|
|
14200
|
+
init_api_topics(),
|
|
14201
|
+
init_conversations(),
|
|
14202
|
+
init_runtime_leases(),
|
|
14203
|
+
init_runtime_topic_state(),
|
|
14204
|
+
init_runtime_turn_requests(),
|
|
14205
|
+
init_topic_archive(),
|
|
14206
|
+
init_personal_general()
|
|
14207
|
+
]);
|
|
14158
14208
|
RESET_MEMORY_ARCHIVE_WAIT_MS = 5 * 60 * 1000;
|
|
14159
14209
|
COMPACTION_SOURCE_CHARS = 512 * 1024;
|
|
14160
14210
|
COMPACTION_TIMEOUT_MS = 2 * 60000;
|
|
@@ -14491,22 +14541,24 @@ async function createDerivedTopicImpl(topic, sourceTopicId, userId, copyHistory,
|
|
|
14491
14541
|
}
|
|
14492
14542
|
var TopicTitleConflictError, TopicDeriveBusyError, TopicForkCompactionError;
|
|
14493
14543
|
var init_derive = __esm(async () => {
|
|
14494
|
-
await init_fork();
|
|
14495
14544
|
init_model_catalog();
|
|
14496
|
-
await init_registry();
|
|
14497
|
-
await init_bus();
|
|
14498
14545
|
init_config();
|
|
14499
14546
|
init_logger();
|
|
14500
|
-
await
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14547
|
+
await __promiseAll([
|
|
14548
|
+
init_fork(),
|
|
14549
|
+
init_registry(),
|
|
14550
|
+
init_bus(),
|
|
14551
|
+
init_manager2(),
|
|
14552
|
+
init_active_rooms(),
|
|
14553
|
+
init_api_messages(),
|
|
14554
|
+
init_api_topic_config(),
|
|
14555
|
+
init_api_topics(),
|
|
14556
|
+
init_conversations(),
|
|
14557
|
+
init_forum_db(),
|
|
14558
|
+
init_runtime_topic_state(),
|
|
14559
|
+
init_personal_general(),
|
|
14560
|
+
init_session()
|
|
14561
|
+
]);
|
|
14510
14562
|
TopicTitleConflictError = class TopicTitleConflictError extends Error {
|
|
14511
14563
|
title;
|
|
14512
14564
|
constructor(title) {
|
|
@@ -14561,9 +14613,11 @@ function deleteSessionInboxForTopic(topicId) {
|
|
|
14561
14613
|
return Number(db.run("DELETE FROM session_inbox WHERE topic_id = ?", [topicId]).changes ?? 0);
|
|
14562
14614
|
}
|
|
14563
14615
|
var init_session_inbox = __esm(async () => {
|
|
14564
|
-
await init_forum_db();
|
|
14565
14616
|
init_session_inbox_signal();
|
|
14566
|
-
await
|
|
14617
|
+
await __promiseAll([
|
|
14618
|
+
init_forum_db(),
|
|
14619
|
+
init_storage_host()
|
|
14620
|
+
]);
|
|
14567
14621
|
registerStorageSchemaInitializer((database) => {
|
|
14568
14622
|
database.exec(`
|
|
14569
14623
|
CREATE TABLE IF NOT EXISTS session_inbox (
|
|
@@ -15207,9 +15261,11 @@ async function failInterruptedRemoteAskCallbacks() {
|
|
|
15207
15261
|
}
|
|
15208
15262
|
var pendingAsks, MAX_ASK_AGE_MS;
|
|
15209
15263
|
var init_ask_callbacks = __esm(async () => {
|
|
15210
|
-
await
|
|
15211
|
-
|
|
15212
|
-
|
|
15264
|
+
await __promiseAll([
|
|
15265
|
+
init_forum_db(),
|
|
15266
|
+
init_session_asks(),
|
|
15267
|
+
init_storage_host()
|
|
15268
|
+
]);
|
|
15213
15269
|
registerStorageSchemaInitializer((database) => {
|
|
15214
15270
|
database.exec(`
|
|
15215
15271
|
CREATE TABLE IF NOT EXISTS remote_ask_callbacks (
|
|
@@ -15435,8 +15491,10 @@ paint();document.body.appendChild(b)}
|
|
|
15435
15491
|
if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",init);else init()})();
|
|
15436
15492
|
</script>`;
|
|
15437
15493
|
var init_visual_store = __esm(async () => {
|
|
15438
|
-
await
|
|
15439
|
-
|
|
15494
|
+
await __promiseAll([
|
|
15495
|
+
init_forum_db(),
|
|
15496
|
+
init_storage_host()
|
|
15497
|
+
]);
|
|
15440
15498
|
registerStorageSchemaInitializer((database) => {
|
|
15441
15499
|
database.exec(`
|
|
15442
15500
|
CREATE TABLE IF NOT EXISTS api_topic_visuals (
|
|
@@ -15805,39 +15863,41 @@ async function deleteTopicCascadeImpl(topic, userId, options, deletingAncestorId
|
|
|
15805
15863
|
}
|
|
15806
15864
|
var DELETE_TURN_WAIT_MS = 5000, TopicArchiveRequiredError, TopicTurnStillActiveError, TopicCleanupRequiredError;
|
|
15807
15865
|
var init_lifecycle = __esm(async () => {
|
|
15808
|
-
await init_archiver();
|
|
15809
|
-
await init_idle_archiver();
|
|
15810
|
-
await init_idle_compact();
|
|
15811
|
-
await init_spawn_subagent();
|
|
15812
|
-
await init_topic_cleanup();
|
|
15813
|
-
await init_bus();
|
|
15814
15866
|
init_manager();
|
|
15815
15867
|
init_config();
|
|
15816
15868
|
init_constants();
|
|
15817
15869
|
init_logger();
|
|
15818
|
-
await init_manager2();
|
|
15819
|
-
await init_active_rooms();
|
|
15820
|
-
await init_session_inbox_cleanup();
|
|
15821
15870
|
init_state();
|
|
15822
|
-
await init_ask_callbacks();
|
|
15823
15871
|
init_file_hooks();
|
|
15824
15872
|
init_usage_alert();
|
|
15825
|
-
await
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15873
|
+
await __promiseAll([
|
|
15874
|
+
init_archiver(),
|
|
15875
|
+
init_idle_archiver(),
|
|
15876
|
+
init_idle_compact(),
|
|
15877
|
+
init_spawn_subagent(),
|
|
15878
|
+
init_topic_cleanup(),
|
|
15879
|
+
init_bus(),
|
|
15880
|
+
init_manager2(),
|
|
15881
|
+
init_active_rooms(),
|
|
15882
|
+
init_session_inbox_cleanup(),
|
|
15883
|
+
init_ask_callbacks(),
|
|
15884
|
+
init_visual_store(),
|
|
15885
|
+
init_api_messages(),
|
|
15886
|
+
init_api_topic_brief(),
|
|
15887
|
+
init_api_topic_config(),
|
|
15888
|
+
init_api_topics(),
|
|
15889
|
+
init_browser_profiles(),
|
|
15890
|
+
init_runtime_leases(),
|
|
15891
|
+
init_runtime_topic_state(),
|
|
15892
|
+
init_runtime_turn_requests(),
|
|
15893
|
+
init_self_schedules(),
|
|
15894
|
+
init_session_asks(),
|
|
15895
|
+
init_token_stats(),
|
|
15896
|
+
init_topic_archive(),
|
|
15897
|
+
init_topic_archive_state(),
|
|
15898
|
+
init_topic_host_mcp_grants(),
|
|
15899
|
+
init_topic_tool_capabilities()
|
|
15900
|
+
]);
|
|
15841
15901
|
TopicArchiveRequiredError = class TopicArchiveRequiredError extends Error {
|
|
15842
15902
|
code = "TOPIC_ARCHIVE_FAILED";
|
|
15843
15903
|
topicId;
|
|
@@ -16199,8 +16259,8 @@ function abortPlaywrightTurns(instanceKey, failure) {
|
|
|
16199
16259
|
var turnsByInstance;
|
|
16200
16260
|
var init_playwright_turn_abort = __esm(async () => {
|
|
16201
16261
|
init_logger();
|
|
16202
|
-
await init_manager2();
|
|
16203
16262
|
init_types2();
|
|
16263
|
+
await init_manager2();
|
|
16204
16264
|
turnsByInstance = new Map;
|
|
16205
16265
|
onPlaywrightFailure(abortPlaywrightTurns);
|
|
16206
16266
|
});
|
|
@@ -16277,8 +16337,10 @@ function upsertTaskPanelMessage(topicId, queryId, tasks, lastRenderedText) {
|
|
|
16277
16337
|
return text2;
|
|
16278
16338
|
}
|
|
16279
16339
|
var init_tasks2 = __esm(async () => {
|
|
16280
|
-
await
|
|
16281
|
-
|
|
16340
|
+
await __promiseAll([
|
|
16341
|
+
init_bus(),
|
|
16342
|
+
init_api_messages()
|
|
16343
|
+
]);
|
|
16282
16344
|
});
|
|
16283
16345
|
|
|
16284
16346
|
// ../../packages/core/src/runtime/visual-html.ts
|
|
@@ -16576,10 +16638,12 @@ var init_visuals = __esm(async () => {
|
|
|
16576
16638
|
init_paths();
|
|
16577
16639
|
init_attachments();
|
|
16578
16640
|
init_file_hooks();
|
|
16579
|
-
await init_visual_store();
|
|
16580
16641
|
init_sensitive_path();
|
|
16581
|
-
await init_api_messages();
|
|
16582
16642
|
init_visual_html();
|
|
16643
|
+
await __promiseAll([
|
|
16644
|
+
init_visual_store(),
|
|
16645
|
+
init_api_messages()
|
|
16646
|
+
]);
|
|
16583
16647
|
});
|
|
16584
16648
|
|
|
16585
16649
|
// ../../packages/core/src/runtime/turn-event-stream.ts
|
|
@@ -17199,31 +17263,33 @@ ${JSON.stringify(event.input ?? {})}`);
|
|
|
17199
17263
|
return outcome;
|
|
17200
17264
|
}
|
|
17201
17265
|
var init_turn_event_stream = __esm(async () => {
|
|
17202
|
-
await init_fork();
|
|
17203
|
-
await init_idle_archiver();
|
|
17204
|
-
await init_idle_compact();
|
|
17205
|
-
await init_ask_user();
|
|
17206
|
-
await init_spawn_subagent();
|
|
17207
17266
|
init_model_catalog();
|
|
17208
|
-
await init_registry();
|
|
17209
17267
|
init_tool_format();
|
|
17210
|
-
await init_bus();
|
|
17211
17268
|
init_logger();
|
|
17212
|
-
await init_active_rooms();
|
|
17213
17269
|
init_state();
|
|
17214
17270
|
init_types2();
|
|
17215
17271
|
init_attachments();
|
|
17216
17272
|
init_errors();
|
|
17217
|
-
await init_tasks2();
|
|
17218
|
-
await init_topic_config();
|
|
17219
17273
|
init_usage_alert();
|
|
17220
|
-
await init_visual_store();
|
|
17221
|
-
await init_visuals();
|
|
17222
17274
|
init_sensitive_path();
|
|
17223
|
-
await
|
|
17224
|
-
|
|
17225
|
-
|
|
17226
|
-
|
|
17275
|
+
await __promiseAll([
|
|
17276
|
+
init_fork(),
|
|
17277
|
+
init_idle_archiver(),
|
|
17278
|
+
init_idle_compact(),
|
|
17279
|
+
init_ask_user(),
|
|
17280
|
+
init_spawn_subagent(),
|
|
17281
|
+
init_registry(),
|
|
17282
|
+
init_bus(),
|
|
17283
|
+
init_active_rooms(),
|
|
17284
|
+
init_tasks2(),
|
|
17285
|
+
init_topic_config(),
|
|
17286
|
+
init_visual_store(),
|
|
17287
|
+
init_visuals(),
|
|
17288
|
+
init_api_messages(),
|
|
17289
|
+
init_api_topics(),
|
|
17290
|
+
init_runtime_turn_requests(),
|
|
17291
|
+
init_token_stats()
|
|
17292
|
+
]);
|
|
17227
17293
|
});
|
|
17228
17294
|
|
|
17229
17295
|
// ../../packages/core/src/runtime/turn-session.ts
|
|
@@ -17255,10 +17321,12 @@ function resolveInitialTurnSessionId(topicId, requestedSessionId, isolated) {
|
|
|
17255
17321
|
}
|
|
17256
17322
|
var init_turn_session = __esm(async () => {
|
|
17257
17323
|
init_model_catalog();
|
|
17258
|
-
await init_registry();
|
|
17259
17324
|
init_config_helpers();
|
|
17260
|
-
await
|
|
17261
|
-
|
|
17325
|
+
await __promiseAll([
|
|
17326
|
+
init_registry(),
|
|
17327
|
+
init_topic_config(),
|
|
17328
|
+
init_api_topics()
|
|
17329
|
+
]);
|
|
17262
17330
|
});
|
|
17263
17331
|
|
|
17264
17332
|
// ../../packages/core/src/storage/app-settings.ts
|
|
@@ -18703,51 +18771,53 @@ function triggerTopicAiTurn(topicId, userId, prompt, agentType, opts) {
|
|
|
18703
18771
|
}
|
|
18704
18772
|
var PLAYWRIGHT_UNAVAILABLE_NOTICE_COOLDOWN_MS, ASK_REPLY_INJECT_BATCH_MS = 500, playwrightUnavailableNoticeAt, askReplyInjectBatcher, remoteInjectWaiters, durableTurnWorker = null, durableTurnWorkerBusy = false;
|
|
18705
18773
|
var init_turn_runner = __esm(async () => {
|
|
18706
|
-
await init_fork();
|
|
18707
|
-
await init_agents();
|
|
18708
|
-
await init_spawn_subagent();
|
|
18709
|
-
await init_registry();
|
|
18710
|
-
await init_bus();
|
|
18711
18774
|
init_manager();
|
|
18712
18775
|
init_constants();
|
|
18713
18776
|
init_logger();
|
|
18714
18777
|
init_mcp_config();
|
|
18715
|
-
await init_manager2();
|
|
18716
18778
|
init_builders();
|
|
18717
|
-
await init_active_rooms();
|
|
18718
18779
|
init_state();
|
|
18719
18780
|
init_types2();
|
|
18720
18781
|
init_attachments();
|
|
18721
|
-
await init_channel_context();
|
|
18722
18782
|
init_errors();
|
|
18723
|
-
await init_playwright_turn_abort();
|
|
18724
|
-
await init_topic_config();
|
|
18725
|
-
await init_turn_event_stream();
|
|
18726
|
-
await init_turn_session();
|
|
18727
18783
|
init_user_turn_envelope();
|
|
18728
|
-
await init_visual_store();
|
|
18729
|
-
await init_visuals();
|
|
18730
|
-
await init_api_messages();
|
|
18731
|
-
await init_api_topic_brief();
|
|
18732
|
-
await init_api_topics();
|
|
18733
|
-
await init_app_settings();
|
|
18734
|
-
await init_browser_profiles();
|
|
18735
|
-
await init_conversations();
|
|
18736
|
-
await init_runtime_leases();
|
|
18737
|
-
await init_runtime_topic_state();
|
|
18738
|
-
await init_runtime_turn_requests();
|
|
18739
|
-
await init_topic_host_mcp_grants();
|
|
18740
|
-
await init_topic_tool_capabilities();
|
|
18741
|
-
await init_wiki();
|
|
18742
18784
|
init_wiki_summary_names();
|
|
18743
|
-
|
|
18785
|
+
init_user_turn_envelope();
|
|
18786
|
+
await __promiseAll([
|
|
18787
|
+
init_fork(),
|
|
18788
|
+
init_agents(),
|
|
18789
|
+
init_spawn_subagent(),
|
|
18790
|
+
init_registry(),
|
|
18791
|
+
init_bus(),
|
|
18792
|
+
init_manager2(),
|
|
18793
|
+
init_active_rooms(),
|
|
18794
|
+
init_channel_context(),
|
|
18795
|
+
init_playwright_turn_abort(),
|
|
18796
|
+
init_topic_config(),
|
|
18797
|
+
init_turn_event_stream(),
|
|
18798
|
+
init_turn_session(),
|
|
18799
|
+
init_visual_store(),
|
|
18800
|
+
init_visuals(),
|
|
18801
|
+
init_api_messages(),
|
|
18802
|
+
init_api_topic_brief(),
|
|
18803
|
+
init_api_topics(),
|
|
18804
|
+
init_app_settings(),
|
|
18805
|
+
init_browser_profiles(),
|
|
18806
|
+
init_conversations(),
|
|
18807
|
+
init_runtime_leases(),
|
|
18808
|
+
init_runtime_topic_state(),
|
|
18809
|
+
init_runtime_turn_requests(),
|
|
18810
|
+
init_topic_host_mcp_grants(),
|
|
18811
|
+
init_topic_tool_capabilities(),
|
|
18812
|
+
init_wiki(),
|
|
18813
|
+
init_derive()
|
|
18814
|
+
]);
|
|
18744
18815
|
init_model_catalog();
|
|
18745
18816
|
init_attachments();
|
|
18746
18817
|
init_channel_context();
|
|
18747
18818
|
init_errors();
|
|
18748
18819
|
init_tasks2();
|
|
18749
18820
|
init_turn_session();
|
|
18750
|
-
init_user_turn_envelope();
|
|
18751
18821
|
init_visuals();
|
|
18752
18822
|
PLAYWRIGHT_UNAVAILABLE_NOTICE_COOLDOWN_MS = 5 * 60000;
|
|
18753
18823
|
playwrightUnavailableNoticeAt = new Map;
|
|
@@ -19451,14 +19521,16 @@ function processOwnerIsAlive(ownerId) {
|
|
|
19451
19521
|
var MAX_TASK_CHARS = 8000, MAX_NAME_CHARS = 80, MAX_LIVE_CHILDREN_PER_PARENT = 5, MAX_PREPARED_CHILDREN_PER_PARENT = 10, MAX_SUBAGENT_DEPTH = 2, RESULT_SUMMARY_CHARS = 300, defaultSubagentLifecycleHost, defaultSubagentLifecycle, computeSubagentDepth, canSpawnSubagentsFromTopic, takeSubagentWatch, cancelSubagentWatchForDeletedTopic, settleSubagentSuccess, settleSubagentFailure, sweepStaleSubagentCards, subagentReportMode, createSubagentManagementToolDefinitions, createSpawnSubagentToolDefinition, createPrepareSubagentToolDefinition;
|
|
19452
19522
|
var init_spawn_subagent = __esm(async () => {
|
|
19453
19523
|
init_common();
|
|
19454
|
-
await init_bus();
|
|
19455
19524
|
init_logger();
|
|
19456
|
-
await init_api_messages();
|
|
19457
|
-
await init_api_topics();
|
|
19458
|
-
await init_runtime_leases();
|
|
19459
|
-
await init_runtime_turn_requests();
|
|
19460
19525
|
init_wiki_summary_names();
|
|
19461
19526
|
init_types();
|
|
19527
|
+
await __promiseAll([
|
|
19528
|
+
init_bus(),
|
|
19529
|
+
init_api_messages(),
|
|
19530
|
+
init_api_topics(),
|
|
19531
|
+
init_runtime_leases(),
|
|
19532
|
+
init_runtime_turn_requests()
|
|
19533
|
+
]);
|
|
19462
19534
|
defaultSubagentLifecycleHost = {
|
|
19463
19535
|
storage: {
|
|
19464
19536
|
getTopic,
|
|
@@ -19593,12 +19665,14 @@ var init_spawn_subagent = __esm(async () => {
|
|
|
19593
19665
|
});
|
|
19594
19666
|
|
|
19595
19667
|
// ../../packages/core/src/agents/public-helpers.ts
|
|
19596
|
-
await init_archiver();
|
|
19597
|
-
await init_auth_check();
|
|
19598
19668
|
init_codex_tree_kill();
|
|
19599
|
-
await
|
|
19600
|
-
|
|
19601
|
-
|
|
19669
|
+
await __promiseAll([
|
|
19670
|
+
init_archiver(),
|
|
19671
|
+
init_auth_check(),
|
|
19672
|
+
init_fork(),
|
|
19673
|
+
init_idle_archiver(),
|
|
19674
|
+
init_ask_user()
|
|
19675
|
+
]);
|
|
19602
19676
|
|
|
19603
19677
|
// ../../packages/core/src/agents/mcp-tools/publish-html.ts
|
|
19604
19678
|
init_common();
|
|
@@ -19851,13 +19925,15 @@ init_common();
|
|
|
19851
19925
|
import { z as z3 } from "zod";
|
|
19852
19926
|
|
|
19853
19927
|
// ../../packages/core/src/agents/api-topic-agent-switch.ts
|
|
19854
|
-
await init_auth_check();
|
|
19855
19928
|
init_model_catalog();
|
|
19856
|
-
await init_registry();
|
|
19857
19929
|
init_logger();
|
|
19858
|
-
await
|
|
19859
|
-
|
|
19860
|
-
|
|
19930
|
+
await __promiseAll([
|
|
19931
|
+
init_auth_check(),
|
|
19932
|
+
init_registry(),
|
|
19933
|
+
init_api_topic_config(),
|
|
19934
|
+
init_api_topics(),
|
|
19935
|
+
init_conversations()
|
|
19936
|
+
]);
|
|
19861
19937
|
import { unlinkSync as unlinkSync9 } from "fs";
|
|
19862
19938
|
function commitApiTopicSwitch(opts, bridgedSessionId) {
|
|
19863
19939
|
const registry = getRegistry(opts.agent);
|
|
@@ -19957,15 +20033,17 @@ function switchApiTopicAgent(opts) {
|
|
|
19957
20033
|
}
|
|
19958
20034
|
|
|
19959
20035
|
// ../../packages/core/src/agents/self-config-core.ts
|
|
19960
|
-
await init_auth_check();
|
|
19961
20036
|
init_model_catalog();
|
|
19962
|
-
await init_registry();
|
|
19963
|
-
await init_bus();
|
|
19964
20037
|
init_config();
|
|
19965
20038
|
init_config_helpers();
|
|
19966
|
-
await
|
|
19967
|
-
|
|
19968
|
-
|
|
20039
|
+
await __promiseAll([
|
|
20040
|
+
init_auth_check(),
|
|
20041
|
+
init_registry(),
|
|
20042
|
+
init_bus(),
|
|
20043
|
+
init_api_topic_config(),
|
|
20044
|
+
init_api_topics(),
|
|
20045
|
+
init_self_schedules()
|
|
20046
|
+
]);
|
|
19969
20047
|
|
|
19970
20048
|
// ../../packages/core/src/topics/links.ts
|
|
19971
20049
|
function topicAppLink(topicId) {
|
|
@@ -20620,20 +20698,24 @@ var otiumVisualToolDefinitions = [
|
|
|
20620
20698
|
];
|
|
20621
20699
|
|
|
20622
20700
|
// ../../packages/core/src/agents/public-helpers.ts
|
|
20623
|
-
await init_task_events();
|
|
20624
20701
|
init_tool_format();
|
|
20625
|
-
await
|
|
20702
|
+
await __promiseAll([
|
|
20703
|
+
init_task_events(),
|
|
20704
|
+
init_topic_cleanup()
|
|
20705
|
+
]);
|
|
20626
20706
|
|
|
20627
20707
|
// ../../packages/core/src/agents/topic-defaults.ts
|
|
20628
20708
|
init_model_catalog();
|
|
20629
|
-
await init_registry();
|
|
20630
20709
|
init_config();
|
|
20631
20710
|
init_logger();
|
|
20711
|
+
await init_registry();
|
|
20632
20712
|
|
|
20633
20713
|
// ../../packages/core/src/storage/topic-default-assignments.ts
|
|
20634
|
-
await init_forum_db();
|
|
20635
|
-
await init_storage_host();
|
|
20636
20714
|
init_wiki_summary_names();
|
|
20715
|
+
await __promiseAll([
|
|
20716
|
+
init_forum_db(),
|
|
20717
|
+
init_storage_host()
|
|
20718
|
+
]);
|
|
20637
20719
|
registerStorageSchemaInitializer((database) => {
|
|
20638
20720
|
database.exec(`
|
|
20639
20721
|
CREATE TABLE IF NOT EXISTS topic_default_assignments (
|
|
@@ -20804,4 +20886,4 @@ export {
|
|
|
20804
20886
|
DEFAULT_SELF_CONFIG_PRODUCT
|
|
20805
20887
|
};
|
|
20806
20888
|
|
|
20807
|
-
//# debugId=
|
|
20889
|
+
//# debugId=45EDD0169F537C9E64756E2164756E21
|