funolio-agent 1.0.75 → 1.1.65
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/auth/credential-reader.d.ts.map +1 -1
- package/dist/auth/credential-reader.js +4 -3
- package/dist/auth/credential-reader.js.map +1 -1
- package/dist/auth/token-refresh.d.ts +8 -0
- package/dist/auth/token-refresh.d.ts.map +1 -1
- package/dist/auth/token-refresh.js +82 -52
- package/dist/auth/token-refresh.js.map +1 -1
- package/dist/auto-organizer.d.ts.map +1 -1
- package/dist/auto-organizer.js +6 -7
- package/dist/auto-organizer.js.map +1 -1
- package/dist/bench-prefix.d.ts +16 -0
- package/dist/bench-prefix.d.ts.map +1 -0
- package/dist/bench-prefix.js +25 -0
- package/dist/bench-prefix.js.map +1 -0
- package/dist/bot-manager.d.ts.map +1 -1
- package/dist/bot-manager.js +23 -14
- package/dist/bot-manager.js.map +1 -1
- package/dist/chat-sync.d.ts +42 -0
- package/dist/chat-sync.d.ts.map +1 -0
- package/dist/chat-sync.js +95 -0
- package/dist/chat-sync.js.map +1 -0
- package/dist/clerk-model.d.ts +7 -0
- package/dist/clerk-model.d.ts.map +1 -1
- package/dist/clerk-model.js +42 -8
- package/dist/clerk-model.js.map +1 -1
- package/dist/cli-bootstrap-history.d.ts +10 -0
- package/dist/cli-bootstrap-history.d.ts.map +1 -0
- package/dist/cli-bootstrap-history.js +112 -0
- package/dist/cli-bootstrap-history.js.map +1 -0
- package/dist/cli-models.d.ts +8 -0
- package/dist/cli-models.d.ts.map +1 -0
- package/dist/cli-models.js +91 -0
- package/dist/cli-models.js.map +1 -0
- package/dist/cli-session-epoch.d.ts +13 -3
- package/dist/cli-session-epoch.d.ts.map +1 -1
- package/dist/cli-session-epoch.js +53 -4
- package/dist/cli-session-epoch.js.map +1 -1
- package/dist/codex-app-server-manager.d.ts +64 -4
- package/dist/codex-app-server-manager.d.ts.map +1 -1
- package/dist/codex-app-server-manager.js +755 -55
- package/dist/codex-app-server-manager.js.map +1 -1
- package/dist/commands/pool.d.ts +32 -0
- package/dist/commands/pool.d.ts.map +1 -1
- package/dist/commands/pool.js +145 -66
- package/dist/commands/pool.js.map +1 -1
- package/dist/commands/start.d.ts +21 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +484 -63
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +5 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +170 -58
- package/dist/config.js.map +1 -1
- package/dist/context-window.d.ts +37 -1
- package/dist/context-window.d.ts.map +1 -1
- package/dist/context-window.js +202 -16
- package/dist/context-window.js.map +1 -1
- package/dist/live-activity.d.ts +3 -1
- package/dist/live-activity.d.ts.map +1 -1
- package/dist/live-activity.js.map +1 -1
- package/dist/local-chat-execution.d.ts +114 -0
- package/dist/local-chat-execution.d.ts.map +1 -0
- package/dist/local-chat-execution.js +349 -0
- package/dist/local-chat-execution.js.map +1 -0
- package/dist/local-cli-pty-manager.d.ts +138 -3
- package/dist/local-cli-pty-manager.d.ts.map +1 -1
- package/dist/local-cli-pty-manager.js +1415 -111
- package/dist/local-cli-pty-manager.js.map +1 -1
- package/dist/local-conversation-gateway.d.ts +110 -0
- package/dist/local-conversation-gateway.d.ts.map +1 -0
- package/dist/local-conversation-gateway.js +175 -0
- package/dist/local-conversation-gateway.js.map +1 -0
- package/dist/local-data.d.ts +235 -5
- package/dist/local-data.d.ts.map +1 -1
- package/dist/local-data.js +1066 -87
- package/dist/local-data.js.map +1 -1
- package/dist/local-db.d.ts +6 -0
- package/dist/local-db.d.ts.map +1 -1
- package/dist/local-db.js +376 -4
- package/dist/local-db.js.map +1 -1
- package/dist/local-funnel.d.ts.map +1 -1
- package/dist/local-funnel.js +6 -5
- package/dist/local-funnel.js.map +1 -1
- package/dist/local-server.d.ts +30 -0
- package/dist/local-server.d.ts.map +1 -1
- package/dist/local-server.js +2898 -319
- package/dist/local-server.js.map +1 -1
- package/dist/managed-process-registry.d.ts +59 -0
- package/dist/managed-process-registry.d.ts.map +1 -0
- package/dist/managed-process-registry.js +390 -0
- package/dist/managed-process-registry.js.map +1 -0
- package/dist/mcp/claude-config-writer.d.ts +5 -5
- package/dist/mcp/claude-config-writer.d.ts.map +1 -1
- package/dist/mcp/claude-config-writer.js +19 -11
- package/dist/mcp/claude-config-writer.js.map +1 -1
- package/dist/mcp/index.d.ts +4 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/sync-cli-config.d.ts +42 -4
- package/dist/mcp/sync-cli-config.d.ts.map +1 -1
- package/dist/mcp/sync-cli-config.js +497 -17
- package/dist/mcp/sync-cli-config.js.map +1 -1
- package/dist/message-loop.d.ts.map +1 -1
- package/dist/message-loop.js +43 -1
- package/dist/message-loop.js.map +1 -1
- package/dist/mqtt-client.d.ts +34 -0
- package/dist/mqtt-client.d.ts.map +1 -1
- package/dist/mqtt-client.js +270 -45
- package/dist/mqtt-client.js.map +1 -1
- package/dist/mqtt-data-relay.d.ts +44 -0
- package/dist/mqtt-data-relay.d.ts.map +1 -0
- package/dist/mqtt-data-relay.js +106 -0
- package/dist/mqtt-data-relay.js.map +1 -0
- package/dist/orchestration/capabilities.d.ts +13 -0
- package/dist/orchestration/capabilities.d.ts.map +1 -0
- package/dist/orchestration/capabilities.js +152 -0
- package/dist/orchestration/capabilities.js.map +1 -0
- package/dist/orchestration/dispatch-executor.d.ts +83 -0
- package/dist/orchestration/dispatch-executor.d.ts.map +1 -0
- package/dist/orchestration/dispatch-executor.js +266 -0
- package/dist/orchestration/dispatch-executor.js.map +1 -0
- package/dist/orchestration/dispatch-hint.d.ts +134 -0
- package/dist/orchestration/dispatch-hint.d.ts.map +1 -0
- package/dist/orchestration/dispatch-hint.js +247 -0
- package/dist/orchestration/dispatch-hint.js.map +1 -0
- package/dist/orchestration/dispatch-runner.d.ts +106 -0
- package/dist/orchestration/dispatch-runner.d.ts.map +1 -0
- package/dist/orchestration/dispatch-runner.js +604 -0
- package/dist/orchestration/dispatch-runner.js.map +1 -0
- package/dist/orchestration/dispatch-tools.d.ts +167 -0
- package/dist/orchestration/dispatch-tools.d.ts.map +1 -0
- package/dist/orchestration/dispatch-tools.js +328 -0
- package/dist/orchestration/dispatch-tools.js.map +1 -0
- package/dist/orchestration/front-door-policy.d.ts +35 -10
- package/dist/orchestration/front-door-policy.d.ts.map +1 -1
- package/dist/orchestration/front-door-policy.js +30 -267
- package/dist/orchestration/front-door-policy.js.map +1 -1
- package/dist/orchestration/orchestrator-dispatch-prompt.d.ts +43 -0
- package/dist/orchestration/orchestrator-dispatch-prompt.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-dispatch-prompt.js +267 -0
- package/dist/orchestration/orchestrator-dispatch-prompt.js.map +1 -0
- package/dist/orchestration/orchestrator-operating-prompt.d.ts +14 -0
- package/dist/orchestration/orchestrator-operating-prompt.d.ts.map +1 -1
- package/dist/orchestration/orchestrator-operating-prompt.js +157 -31
- package/dist/orchestration/orchestrator-operating-prompt.js.map +1 -1
- package/dist/orchestration/plan-import.d.ts +39 -0
- package/dist/orchestration/plan-import.d.ts.map +1 -0
- package/dist/orchestration/plan-import.js +547 -0
- package/dist/orchestration/plan-import.js.map +1 -0
- package/dist/orchestration/worker-operating-prompt.d.ts +2 -0
- package/dist/orchestration/worker-operating-prompt.d.ts.map +1 -1
- package/dist/orchestration/worker-operating-prompt.js +36 -46
- package/dist/orchestration/worker-operating-prompt.js.map +1 -1
- package/dist/orchestrator.d.ts +195 -3
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +1970 -432
- package/dist/orchestrator.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +8 -4
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/claude-cli.d.ts.map +1 -1
- package/dist/providers/claude-cli.js +28 -3
- package/dist/providers/claude-cli.js.map +1 -1
- package/dist/providers/codex-cli.d.ts +10 -6
- package/dist/providers/codex-cli.d.ts.map +1 -1
- package/dist/providers/codex-cli.js +190 -17
- package/dist/providers/codex-cli.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +15 -5
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/index.d.ts +15 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +13 -5
- package/dist/providers/openai.js.map +1 -1
- package/dist/server-adapter.d.ts +8 -0
- package/dist/server-adapter.d.ts.map +1 -1
- package/dist/server-adapter.js +7 -0
- package/dist/server-adapter.js.map +1 -1
- package/dist/service-mode.d.ts +1 -1
- package/dist/service-mode.d.ts.map +1 -1
- package/dist/service-mode.js +64 -1
- package/dist/service-mode.js.map +1 -1
- package/dist/service-setup-only.d.ts +8 -0
- package/dist/service-setup-only.d.ts.map +1 -0
- package/dist/service-setup-only.js +37 -0
- package/dist/service-setup-only.js.map +1 -0
- package/dist/slash-commands.d.ts +21 -0
- package/dist/slash-commands.d.ts.map +1 -0
- package/dist/slash-commands.js +99 -0
- package/dist/slash-commands.js.map +1 -0
- package/dist/subagent/index.d.ts +4 -2
- package/dist/subagent/index.d.ts.map +1 -1
- package/dist/subagent/index.js.map +1 -1
- package/dist/summarization-pipeline.d.ts.map +1 -1
- package/dist/summarization-pipeline.js +1 -9
- package/dist/summarization-pipeline.js.map +1 -1
- package/dist/token-counter.d.ts.map +1 -1
- package/dist/token-counter.js +11 -4
- package/dist/token-counter.js.map +1 -1
- package/dist/tool-filter.d.ts.map +1 -1
- package/dist/tool-filter.js +10 -6
- package/dist/tool-filter.js.map +1 -1
- package/dist/tools/admin-tools.d.ts.map +1 -1
- package/dist/tools/admin-tools.js +13 -4
- package/dist/tools/admin-tools.js.map +1 -1
- package/dist/tools/run-command.d.ts.map +1 -1
- package/dist/tools/run-command.js +5 -1
- package/dist/tools/run-command.js.map +1 -1
- package/dist/tools/search-conversation-history.d.ts.map +1 -1
- package/dist/tools/search-conversation-history.js +12 -2
- package/dist/tools/search-conversation-history.js.map +1 -1
- package/dist/tools/todo-tasks.d.ts.map +1 -1
- package/dist/tools/todo-tasks.js +77 -5
- package/dist/tools/todo-tasks.js.map +1 -1
- package/dist/usage-log.d.ts +62 -0
- package/dist/usage-log.d.ts.map +1 -0
- package/dist/usage-log.js +98 -0
- package/dist/usage-log.js.map +1 -0
- package/dist/wizard-state.d.ts +13 -0
- package/dist/wizard-state.d.ts.map +1 -1
- package/dist/wizard-state.js +61 -3
- package/dist/wizard-state.js.map +1 -1
- package/dist/wizard-support.d.ts.map +1 -1
- package/dist/wizard-support.js +27 -1
- package/dist/wizard-support.js.map +1 -1
- package/dist/workflow-engine.d.ts +40 -1
- package/dist/workflow-engine.d.ts.map +1 -1
- package/dist/workflow-engine.js +753 -93
- package/dist/workflow-engine.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CliModelOption {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
reasoningEfforts?: string[];
|
|
5
|
+
speedTiers?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function getCliModelOptions(provider: 'claude-cli' | 'codex-cli'): CliModelOption[];
|
|
8
|
+
//# sourceMappingURL=cli-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-models.d.ts","sourceRoot":"","sources":["../src/cli-models.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAkDD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,WAAW,GAAG,cAAc,EAAE,CASzF"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getCliModelOptions = getCliModelOptions;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const os = __importStar(require("os"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const config_1 = require("./config");
|
|
41
|
+
function fallbackModels(provider) {
|
|
42
|
+
return (config_1.WIZARD_PROVIDER_MODELS[provider] || []).map((entry) => ({
|
|
43
|
+
id: entry.id,
|
|
44
|
+
label: entry.label,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
function readCodexModelsCacheFile(filePath) {
|
|
48
|
+
try {
|
|
49
|
+
if (!fs.existsSync(filePath))
|
|
50
|
+
return null;
|
|
51
|
+
const parsed = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
52
|
+
const models = Array.isArray(parsed.models) ? parsed.models : [];
|
|
53
|
+
const normalized = models
|
|
54
|
+
.map((model) => {
|
|
55
|
+
const id = String(model.slug || '').trim();
|
|
56
|
+
if (!id)
|
|
57
|
+
return null;
|
|
58
|
+
const label = String(model.display_name || model.slug || '').trim() || id;
|
|
59
|
+
const reasoningEfforts = Array.isArray(model.supported_reasoning_levels)
|
|
60
|
+
? model.supported_reasoning_levels
|
|
61
|
+
.map((level) => String(level?.effort || '').trim())
|
|
62
|
+
.filter(Boolean)
|
|
63
|
+
: [];
|
|
64
|
+
const speedTiers = Array.isArray(model.additional_speed_tiers)
|
|
65
|
+
? model.additional_speed_tiers.map((tier) => String(tier || '').trim()).filter(Boolean)
|
|
66
|
+
: [];
|
|
67
|
+
return {
|
|
68
|
+
id,
|
|
69
|
+
label,
|
|
70
|
+
...(reasoningEfforts.length > 0 ? { reasoningEfforts } : {}),
|
|
71
|
+
...(speedTiers.length > 0 ? { speedTiers } : {}),
|
|
72
|
+
};
|
|
73
|
+
})
|
|
74
|
+
.filter((entry) => !!entry);
|
|
75
|
+
return normalized.length > 0 ? normalized : null;
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function getCliModelOptions(provider) {
|
|
82
|
+
if (provider === 'claude-cli') {
|
|
83
|
+
return fallbackModels('claude-cli');
|
|
84
|
+
}
|
|
85
|
+
const codexHome = process.env.CODEX_HOME?.trim() || path.join(os.homedir(), '.codex');
|
|
86
|
+
const cached = readCodexModelsCacheFile(path.join(codexHome, 'models_cache.json'));
|
|
87
|
+
if (cached)
|
|
88
|
+
return cached;
|
|
89
|
+
return fallbackModels('codex-cli');
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=cli-models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-models.js","sourceRoot":"","sources":["../src/cli-models.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,gDASC;AArED,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,qCAAkD;AAkBlD,SAAS,cAAc,CAAC,QAAoC;IAC1D,OAAO,CAAC,+BAAsB,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9D,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,wBAAwB,CAAC,QAAgB;IAChD,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAA2B,CAAC;QACxF,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,MAAM,UAAU,GAAG,MAAM;aACtB,GAAG,CAAC,CAA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AC,CAAC,CAAC,KAAK,CAAC,CAAC;QACvD,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAAC,QAAoC;IACrE,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC9B,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;IACtF,MAAM,MAAM,GAAG,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACnF,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import * as data from './local-data';
|
|
2
2
|
export declare const CLI_SESSION_EPOCH_MAX_TURNS = 20;
|
|
3
|
-
export declare const CLI_SESSION_EPOCH_MAX_INPUT_TOKENS
|
|
3
|
+
export declare const CLI_SESSION_EPOCH_MAX_INPUT_TOKENS: number;
|
|
4
|
+
export type CliSessionEpochResetReason = 'user_clear' | 'user_new' | 'user_compact' | 'turn_limit' | 'token_limit' | 'resume_failed' | 'provider_changed';
|
|
5
|
+
export type WarmSessionReuseOutcome = 'reuse' | 'cold_start' | 'epoch_reset';
|
|
6
|
+
export interface WarmSessionReuseResult {
|
|
7
|
+
outcome: WarmSessionReuseOutcome;
|
|
8
|
+
resumeSessionId: string | null;
|
|
9
|
+
resetReason: CliSessionEpochResetReason | null;
|
|
10
|
+
existing: data.CliSessionEpochRow | undefined;
|
|
11
|
+
topicId: string | null;
|
|
12
|
+
}
|
|
4
13
|
export declare function localTimestamp(): string;
|
|
5
|
-
export declare function selectCliSessionEpoch(conversationId: string, botId: string, providerName: string): {
|
|
14
|
+
export declare function selectCliSessionEpoch(conversationId: string, botId: string, providerName: string, forceNewEpoch?: CliSessionEpochResetReason, sessionScopeKey?: string | null): {
|
|
6
15
|
existing: data.CliSessionEpochRow | undefined;
|
|
7
16
|
resumeSessionId: string | null;
|
|
8
|
-
resetReason:
|
|
17
|
+
resetReason: CliSessionEpochResetReason | null;
|
|
9
18
|
};
|
|
19
|
+
export declare function evaluateWarmSessionReuse(conversationId: string, botId: string, providerName: string, forceNewEpoch?: CliSessionEpochResetReason, sessionScopeKey?: string | null): WarmSessionReuseResult;
|
|
10
20
|
//# sourceMappingURL=cli-session-epoch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-session-epoch.d.ts","sourceRoot":"","sources":["../src/cli-session-epoch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAErC,eAAO,MAAM,2BAA2B,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-session-epoch.d.ts","sourceRoot":"","sources":["../src/cli-session-epoch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAErC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAc9C,eAAO,MAAM,kCAAkC,QAAyC,CAAC;AAEzF,MAAM,MAAM,0BAA0B,GAClC,YAAY,GACZ,UAAU,GACV,cAAc,GACd,YAAY,GACZ,aAAa,GACb,eAAe,GACf,kBAAkB,CAAC;AAEvB,MAAM,MAAM,uBAAuB,GAC/B,OAAO,GACP,YAAY,GACZ,aAAa,CAAC;AAElB,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,uBAAuB,CAAC;IACjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAC/C,QAAQ,EAAE,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAC9C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,0BAA0B,EAC1C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B;IACD,QAAQ,EAAE,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAC9C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChD,CA2BA;AAED,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,0BAA0B,EAC1C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B,sBAAsB,CA2BxB"}
|
|
@@ -36,16 +36,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.CLI_SESSION_EPOCH_MAX_INPUT_TOKENS = exports.CLI_SESSION_EPOCH_MAX_TURNS = void 0;
|
|
37
37
|
exports.localTimestamp = localTimestamp;
|
|
38
38
|
exports.selectCliSessionEpoch = selectCliSessionEpoch;
|
|
39
|
+
exports.evaluateWarmSessionReuse = evaluateWarmSessionReuse;
|
|
39
40
|
const data = __importStar(require("./local-data"));
|
|
40
41
|
exports.CLI_SESSION_EPOCH_MAX_TURNS = 20;
|
|
41
|
-
|
|
42
|
+
const DEFAULT_CLI_SESSION_EPOCH_MAX_INPUT_TOKENS = 200000;
|
|
43
|
+
const CLI_SESSION_EPOCH_MAX_INPUT_TOKENS_ENV = 'FUNOLIO_CLI_SESSION_EPOCH_MAX_INPUT_TOKENS';
|
|
44
|
+
function resolveCliSessionEpochMaxInputTokens() {
|
|
45
|
+
const raw = process.env[CLI_SESSION_EPOCH_MAX_INPUT_TOKENS_ENV]?.trim();
|
|
46
|
+
if (!raw)
|
|
47
|
+
return DEFAULT_CLI_SESSION_EPOCH_MAX_INPUT_TOKENS;
|
|
48
|
+
const parsed = Number.parseInt(raw, 10);
|
|
49
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
50
|
+
return DEFAULT_CLI_SESSION_EPOCH_MAX_INPUT_TOKENS;
|
|
51
|
+
}
|
|
52
|
+
return parsed;
|
|
53
|
+
}
|
|
54
|
+
exports.CLI_SESSION_EPOCH_MAX_INPUT_TOKENS = resolveCliSessionEpochMaxInputTokens();
|
|
42
55
|
function localTimestamp() {
|
|
43
56
|
return new Date().toISOString().replace('T', ' ').replace('Z', '');
|
|
44
57
|
}
|
|
45
|
-
function selectCliSessionEpoch(conversationId, botId, providerName) {
|
|
46
|
-
const existing = data.getCliSessionEpoch(conversationId, botId);
|
|
58
|
+
function selectCliSessionEpoch(conversationId, botId, providerName, forceNewEpoch, sessionScopeKey) {
|
|
59
|
+
const existing = data.getCliSessionEpoch(conversationId, botId, sessionScopeKey);
|
|
47
60
|
if (!existing) {
|
|
48
|
-
return { existing: undefined, resumeSessionId: null, resetReason: null };
|
|
61
|
+
return { existing: undefined, resumeSessionId: null, resetReason: forceNewEpoch || null };
|
|
62
|
+
}
|
|
63
|
+
if (forceNewEpoch) {
|
|
64
|
+
return { existing, resumeSessionId: null, resetReason: forceNewEpoch };
|
|
49
65
|
}
|
|
50
66
|
if (existing.provider !== providerName) {
|
|
51
67
|
return { existing, resumeSessionId: null, resetReason: 'provider_changed' };
|
|
@@ -56,6 +72,39 @@ function selectCliSessionEpoch(conversationId, botId, providerName) {
|
|
|
56
72
|
if ((existing.last_input_tokens || 0) >= exports.CLI_SESSION_EPOCH_MAX_INPUT_TOKENS) {
|
|
57
73
|
return { existing, resumeSessionId: null, resetReason: 'token_limit' };
|
|
58
74
|
}
|
|
75
|
+
if (!String(existing.session_id || '').trim()
|
|
76
|
+
|| (existing.reset_reason === 'prewarm'
|
|
77
|
+
&& (existing.epoch_turn_count || 0) === 0)) {
|
|
78
|
+
return { existing, resumeSessionId: null, resetReason: null };
|
|
79
|
+
}
|
|
59
80
|
return { existing, resumeSessionId: existing.session_id, resetReason: null };
|
|
60
81
|
}
|
|
82
|
+
function evaluateWarmSessionReuse(conversationId, botId, providerName, forceNewEpoch, sessionScopeKey) {
|
|
83
|
+
const plan = selectCliSessionEpoch(conversationId, botId, providerName, forceNewEpoch, sessionScopeKey);
|
|
84
|
+
if (!plan.existing) {
|
|
85
|
+
return {
|
|
86
|
+
outcome: 'cold_start',
|
|
87
|
+
resumeSessionId: null,
|
|
88
|
+
resetReason: plan.resetReason,
|
|
89
|
+
existing: undefined,
|
|
90
|
+
topicId: null,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (plan.resumeSessionId) {
|
|
94
|
+
return {
|
|
95
|
+
outcome: 'reuse',
|
|
96
|
+
resumeSessionId: plan.resumeSessionId,
|
|
97
|
+
resetReason: null,
|
|
98
|
+
existing: plan.existing,
|
|
99
|
+
topicId: plan.existing.topic_id,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
outcome: plan.resetReason ? 'epoch_reset' : 'cold_start',
|
|
104
|
+
resumeSessionId: null,
|
|
105
|
+
resetReason: plan.resetReason,
|
|
106
|
+
existing: plan.existing,
|
|
107
|
+
topicId: plan.existing.topic_id,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
61
110
|
//# sourceMappingURL=cli-session-epoch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-session-epoch.js","sourceRoot":"","sources":["../src/cli-session-epoch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cli-session-epoch.js","sourceRoot":"","sources":["../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;IACxG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnB,OAAO;YACL,OAAO,EAAE,YAAY;YACrB,eAAe,EAAE,IAAI;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,SAAS;YACnB,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,OAAO;YACL,OAAO,EAAE,OAAO;YAChB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;SAChC,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY;QACxD,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,9 @@ import type { LLMMessage } from './providers/index';
|
|
|
4
4
|
type ProviderUsage = {
|
|
5
5
|
inputTokens: number;
|
|
6
6
|
outputTokens: number;
|
|
7
|
+
inputTokensFresh?: number;
|
|
8
|
+
inputTokensCacheCreation?: number;
|
|
9
|
+
inputTokensCacheRead?: number;
|
|
7
10
|
};
|
|
8
11
|
type OutboundCallback = (text: string) => Promise<void> | void;
|
|
9
12
|
type SpawnedProcess = ChildProcessWithoutNullStreams;
|
|
@@ -27,6 +30,15 @@ export interface CodexAppServerBotSettings {
|
|
|
27
30
|
sandboxPolicy?: string | null;
|
|
28
31
|
approvalPolicy?: string | null;
|
|
29
32
|
}
|
|
33
|
+
export interface CodexAppServerToolEvent {
|
|
34
|
+
kind: 'call' | 'result';
|
|
35
|
+
toolName: string;
|
|
36
|
+
toolCallId: string;
|
|
37
|
+
arguments?: Record<string, any>;
|
|
38
|
+
output?: string;
|
|
39
|
+
isError?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type CodexAppServerToolCallback = (event: CodexAppServerToolEvent) => Promise<void> | void;
|
|
30
42
|
export interface CodexAppServerTurnOptions {
|
|
31
43
|
runtimeMode?: AgentRuntimeMode | null;
|
|
32
44
|
conversationId: string;
|
|
@@ -43,8 +55,10 @@ export interface CodexAppServerTurnOptions {
|
|
|
43
55
|
codexSettings?: CodexAppServerBotSettings | null;
|
|
44
56
|
abortSignal?: AbortSignal;
|
|
45
57
|
onChunk?: OutboundCallback;
|
|
58
|
+
onCommentary?: OutboundCallback;
|
|
46
59
|
onThinkingChunk?: OutboundCallback;
|
|
47
60
|
onDetail?: OutboundCallback;
|
|
61
|
+
onToolEvent?: CodexAppServerToolCallback;
|
|
48
62
|
}
|
|
49
63
|
export interface CodexAppServerEventEntry {
|
|
50
64
|
ts: string;
|
|
@@ -64,20 +78,49 @@ export interface CodexAppServerTurnResult {
|
|
|
64
78
|
eventLog: CodexAppServerEventLog;
|
|
65
79
|
thinking?: string;
|
|
66
80
|
}
|
|
81
|
+
export interface CodexAppServerWarmOptions {
|
|
82
|
+
runtimeMode?: AgentRuntimeMode | null;
|
|
83
|
+
conversationId: string;
|
|
84
|
+
botId: string;
|
|
85
|
+
botName?: string | null;
|
|
86
|
+
cwd: string;
|
|
87
|
+
projectId?: string | number | null;
|
|
88
|
+
currentTodoTaskId?: string | number | null;
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Optional thread-bootstrap params. When provided, warmSession calls
|
|
92
|
+
* thread/start (or thread/resume) during warm so Send only has to do
|
|
93
|
+
* turn/start. Omitting them preserves the legacy "init handshake only"
|
|
94
|
+
* warm behavior, which is still useful as a mild pre-warm.
|
|
95
|
+
*/
|
|
96
|
+
systemPrompt?: string | null;
|
|
97
|
+
model?: string | null;
|
|
98
|
+
codexSettings?: CodexAppServerBotSettings | null;
|
|
99
|
+
resumeSessionId?: string | null;
|
|
100
|
+
primerMessages?: LLMMessage[] | null;
|
|
101
|
+
}
|
|
102
|
+
export interface CodexAppServerWarmResult {
|
|
103
|
+
reusedExistingSession: boolean;
|
|
104
|
+
readyAgeMs: number;
|
|
105
|
+
sessionId: string | null;
|
|
106
|
+
hiddenPrimerCompleted: boolean;
|
|
107
|
+
}
|
|
67
108
|
declare function delay(ms: number): Promise<void>;
|
|
68
109
|
declare function sessionKey(conversationId: string, botId: string): string;
|
|
69
110
|
declare function createEventLog(): CodexAppServerEventLog;
|
|
70
111
|
declare function serializeEventLog(eventLog: CodexAppServerEventLog): string;
|
|
71
|
-
declare function scrubCodexAppServerEnv(baseEnv: NodeJS.ProcessEnv, extraEnv: Record<string, string
|
|
112
|
+
declare function scrubCodexAppServerEnv(baseEnv: NodeJS.ProcessEnv, extraEnv: Record<string, string>, sessionKey?: string): Record<string, string>;
|
|
113
|
+
declare function computeEnvFingerprint(env: Record<string, string>): string;
|
|
72
114
|
declare function buildCodexAppServerToolEnv(input: {
|
|
73
115
|
botId: string;
|
|
74
116
|
botName?: string | null;
|
|
75
117
|
projectId?: string | number | null;
|
|
76
|
-
todoTaskId?: string | number | null;
|
|
77
118
|
}): Record<string, string>;
|
|
119
|
+
declare function buildTurnMcpToolEnv(sessionEnv: Record<string, string>, currentTodoTaskId?: string | number | null): Record<string, string>;
|
|
78
120
|
declare function buildCodexAppServerInput(messages: LLMMessage[]): Array<{
|
|
79
|
-
type:
|
|
80
|
-
text
|
|
121
|
+
type: string;
|
|
122
|
+
text?: string;
|
|
123
|
+
url?: string;
|
|
81
124
|
}>;
|
|
82
125
|
declare function buildTurnUsage(tokenUsage: any): ProviderUsage | undefined;
|
|
83
126
|
declare function buildApprovalResponse(method: string, params: any): any;
|
|
@@ -90,12 +133,26 @@ export declare class CodexAppServerManager {
|
|
|
90
133
|
private readonly logWarn;
|
|
91
134
|
private readonly clientInfo;
|
|
92
135
|
constructor(deps?: CodexAppServerManagerDeps);
|
|
136
|
+
warmSession(opts: CodexAppServerWarmOptions): Promise<CodexAppServerWarmResult>;
|
|
137
|
+
/**
|
|
138
|
+
* Issues thread/start (or thread/resume if resumeSessionId is provided)
|
|
139
|
+
* during warm-up, populating session.threadId so runTurn can skip the
|
|
140
|
+
* call. Failure leaves the session with no thread id — runTurn will
|
|
141
|
+
* retry from scratch via its normal path.
|
|
142
|
+
*/
|
|
143
|
+
private bootstrapWarmThread;
|
|
93
144
|
runTurn(opts: CodexAppServerTurnOptions): Promise<CodexAppServerTurnResult>;
|
|
145
|
+
hasActiveSession(conversationId: string, botId: string): boolean;
|
|
94
146
|
closeSessionByConversation(conversationId: string, botId: string): void;
|
|
147
|
+
closeSessionsByConversation(conversationId: string): number;
|
|
148
|
+
closeWarmSessionsByConversation(conversationId: string): number;
|
|
149
|
+
closeSessionsByBotId(botId: string): void;
|
|
95
150
|
closeAll(): void;
|
|
151
|
+
closeSessionByKey(key: string): void;
|
|
96
152
|
private closeSession;
|
|
97
153
|
private createSession;
|
|
98
154
|
private initializeSession;
|
|
155
|
+
private syncTurnMcpConfig;
|
|
99
156
|
private runTurnInternal;
|
|
100
157
|
private sendNotification;
|
|
101
158
|
private sendResponse;
|
|
@@ -108,6 +165,7 @@ export declare class CodexAppServerManager {
|
|
|
108
165
|
private handleProcessError;
|
|
109
166
|
private handleProcessClose;
|
|
110
167
|
private emitChunk;
|
|
168
|
+
private emitCommentary;
|
|
111
169
|
private emitThinkingChunk;
|
|
112
170
|
private emitDetail;
|
|
113
171
|
}
|
|
@@ -117,7 +175,9 @@ export declare const __codexAppServerTestUtils: {
|
|
|
117
175
|
LOCAL_ONLY_ERROR: string;
|
|
118
176
|
buildCodexAppServerInput: typeof buildCodexAppServerInput;
|
|
119
177
|
buildCodexAppServerToolEnv: typeof buildCodexAppServerToolEnv;
|
|
178
|
+
buildTurnMcpToolEnv: typeof buildTurnMcpToolEnv;
|
|
120
179
|
scrubCodexAppServerEnv: typeof scrubCodexAppServerEnv;
|
|
180
|
+
computeEnvFingerprint: typeof computeEnvFingerprint;
|
|
121
181
|
buildApprovalResponse: typeof buildApprovalResponse;
|
|
122
182
|
buildTurnUsage: typeof buildTurnUsage;
|
|
123
183
|
createEventLog: typeof createEventLog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-app-server-manager.d.ts","sourceRoot":"","sources":["../src/codex-app-server-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,8BAA8B,EAAE,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"codex-app-server-manager.d.ts","sourceRoot":"","sources":["../src/codex-app-server-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,8BAA8B,EAAE,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgBpD,KAAK,aAAa,GAAG;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IAKrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE/D,KAAK,cAAc,GAAG,8BAA8B,CAAC;AAErD,KAAK,YAAY,GAAG,CAClB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,wBAAwB,KAC9B,cAAc,CAAC;AAiGpB,MAAM,WAAW,yBAAyB;IACxC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB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