qlogicagent 2.5.0 → 2.6.1
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.js +9 -9
- package/dist/cli.js +215 -215
- package/dist/contracts.js +0 -1
- package/dist/index.js +181 -181
- package/dist/types/agent/runtime-vars.d.ts +48 -0
- package/dist/types/cli/stdio-server.d.ts +1 -14
- package/dist/types/cli/tool-bootstrap.d.ts +0 -2
- package/dist/types/contracts/index.d.ts +1 -4
- package/dist/types/protocol/methods.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/agent/constants.d.ts +0 -8
- package/dist/types/contracts/todo.d.ts +0 -10
- package/dist/types/runtime/execution/dream-category-context.test.d.ts +0 -1
- package/dist/types/runtime/execution/memory-decay.test.d.ts +0 -1
- package/dist/types/runtime/infra/acp-detector.test.d.ts +0 -1
- package/dist/types/runtime/infra/acp-protocol-adapter.test.d.ts +0 -1
- package/dist/types/runtime/infra/acp-usage-tracker.test.d.ts +0 -1
- package/dist/types/runtime/infra/agent-config-store.test.d.ts +0 -1
- package/dist/types/runtime/infra/agent-process.test.d.ts +0 -1
- package/dist/types/runtime/infra/mcp-bridge.test.d.ts +0 -1
- package/dist/types/runtime/infra/model-id-translator.test.d.ts +0 -1
- package/dist/types/runtime/infra/skill-injector.test.d.ts +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RuntimeVars — Unified mutable runtime variables for the agent server.
|
|
3
|
+
*
|
|
4
|
+
* All tunable/configurable runtime state that can be changed via RPC
|
|
5
|
+
* (config.updateTunable) or internal logic should live here. This avoids
|
|
6
|
+
* scattering mutable state as private fields across stdio-server.ts.
|
|
7
|
+
*
|
|
8
|
+
* Categories:
|
|
9
|
+
* 1. Budget — aggregate token usage tracking and limits
|
|
10
|
+
* 2. Dream — idle dream scheduling parameters
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* import { runtimeVars } from "../agent/runtime-vars.js";
|
|
14
|
+
* runtimeVars.teamTokensUsed += tokens;
|
|
15
|
+
* if (runtimeVars.isTeamBudgetExceeded()) { ... }
|
|
16
|
+
*/
|
|
17
|
+
export interface TeamBudgetState {
|
|
18
|
+
/** Total tokens consumed by all forked sub-agents (accumulated). */
|
|
19
|
+
tokensUsed: number;
|
|
20
|
+
/** Maximum total tokens allowed across all forks. 0 = unlimited. */
|
|
21
|
+
budgetTokens: number;
|
|
22
|
+
}
|
|
23
|
+
export interface DreamState {
|
|
24
|
+
/** Idle threshold before triggering dream (minutes). */
|
|
25
|
+
idleMinutes: number;
|
|
26
|
+
/** Whether idle dream is enabled. */
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
/** Last dream timestamp (ms since epoch). */
|
|
29
|
+
lastDreamAt: number;
|
|
30
|
+
/** Cooldown between dreams (ms). */
|
|
31
|
+
cooldownMs: number;
|
|
32
|
+
/** Max duration for a single dream run (ms). */
|
|
33
|
+
maxDurationMs: number;
|
|
34
|
+
}
|
|
35
|
+
export declare class RuntimeVars {
|
|
36
|
+
readonly teamBudget: TeamBudgetState;
|
|
37
|
+
/** Check if team aggregate budget is exceeded. */
|
|
38
|
+
isTeamBudgetExceeded(): boolean;
|
|
39
|
+
/** Record token consumption from a fork and return updated total. */
|
|
40
|
+
recordForkTokens(tokens: number): number;
|
|
41
|
+
/** Format budget-exceeded error message. */
|
|
42
|
+
teamBudgetExceededError(): string;
|
|
43
|
+
readonly dream: DreamState;
|
|
44
|
+
/** Reset all accumulated state (e.g. on session end). */
|
|
45
|
+
resetAccumulators(): void;
|
|
46
|
+
}
|
|
47
|
+
/** Singleton instance — shared across the server lifetime. */
|
|
48
|
+
export declare const runtimeVars: RuntimeVars;
|
|
@@ -67,27 +67,14 @@ export declare class StdioServer {
|
|
|
67
67
|
/** Process managers for solo/product (stored for agents.processes/kill). */
|
|
68
68
|
private soloProcessManager;
|
|
69
69
|
private productProcessManager;
|
|
70
|
-
/** Team aggregate budget — tracks total tokens spent across all forked sub-agents. */
|
|
71
|
-
private teamTokensUsed;
|
|
72
|
-
/** Team aggregate budget limit (0 = unlimited). Set via config.updateTunable. */
|
|
73
|
-
private teamBudgetTokens;
|
|
74
70
|
/** ACP Server instance — handles ACP protocol alongside legacy protocol. */
|
|
75
71
|
private acpServer;
|
|
76
72
|
/** Idle dream timer — fires after configurable idle period to trigger memory consolidation. */
|
|
77
73
|
private idleDreamTimer;
|
|
78
|
-
/** Idle dream config (minutes). Default: 30 min idle = trigger dream. */
|
|
79
|
-
private idleDreamMinutes;
|
|
80
|
-
/** Whether idle dream is enabled. Requires LLM config + memory root to be set. */
|
|
81
|
-
private idleDreamEnabled;
|
|
82
|
-
/** Last dream timestamp to enforce cooldown. */
|
|
83
|
-
private lastDreamAt;
|
|
84
|
-
/** Dream cooldown (ms). Default: 4 hours. */
|
|
85
|
-
private dreamCooldownMs;
|
|
86
|
-
/** Max dream duration (ms). Default: 5 minutes. */
|
|
87
|
-
private dreamMaxDurationMs;
|
|
88
74
|
constructor(config: StdioServerConfig);
|
|
89
75
|
start(): void;
|
|
90
76
|
stop(): void;
|
|
77
|
+
private readonly methodHandlers;
|
|
91
78
|
private handleMessage;
|
|
92
79
|
/**
|
|
93
80
|
* `initialize` — the sole handshake handler.
|
|
@@ -56,8 +56,6 @@ export interface BootstrapConfig {
|
|
|
56
56
|
* @alias initToolDeps — kept for backward compat with existing call sites.
|
|
57
57
|
*/
|
|
58
58
|
export declare function getAllBaseTools(config?: BootstrapConfig): PortableTool[];
|
|
59
|
-
/** @deprecated Use getAllBaseTools() instead. */
|
|
60
|
-
export declare const initToolDeps: typeof getAllBaseTools;
|
|
61
59
|
/**
|
|
62
60
|
* Update the working directory for all local tool deps.
|
|
63
61
|
* Called when Gateway sends a new workdir via config.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Reference: Codex app-server RPC, Claude Code JSON-RPC, GitHub Copilot Agent API.
|
|
8
8
|
*/
|
|
9
9
|
import type { ChatMessage, ToolDefinition } from "../agent/types.js";
|
|
10
|
-
import type { TodoItem } from "../
|
|
10
|
+
import type { TaskItem as TodoItem } from "../skills/tools/task-tool.js";
|
|
11
11
|
import type { AgentDescriptor, AgentConfig, GatewayRpcMethodMap, RpcProjectInfo, RpcProjectType, RpcProjectStatus, SoloStatus, ProductStatus, ProductSummary } from "./wire/index.js";
|
|
12
12
|
import type { AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStartParams, SoloIdParams, SoloSelectParams, SoloDeleteParams, ProductCreateParams, ProductIdParams, ProductDeleteParams } from "../runtime/infra/acp-types.js";
|
|
13
13
|
export interface InitializeParams {
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centralized agent configuration constants.
|
|
3
|
-
*
|
|
4
|
-
* Re-exports from `tunable-defaults.ts` which is the single source of truth.
|
|
5
|
-
* This file exists for backward compatibility — new consumers should import
|
|
6
|
-
* from `./tunable-defaults.js` directly.
|
|
7
|
-
*/
|
|
8
|
-
export { MAX_ROUNDS_LIMIT, DEFAULT_MAX_ROUNDS, DEFAULT_TEMPERATURE, MAX_TOOL_BUDGET_CAP, DEFAULT_TOOL_BUDGET, MAX_CONSECUTIVE_FAILURES, MAX_IDENTICAL_CALL_REPEATS, DEFAULT_CONTEXT_WINDOW_TOKENS, RESPONSE_BUFFER_TOKENS, DEFAULT_MAX_OUTPUT_TOKENS, DEFAULT_MODEL_MAX_OUTPUT_TOKENS, MAX_OUTPUT_TOKENS_RECOVERY_LIMIT, ESCALATED_MAX_OUTPUT_TOKENS, DIMINISHING_RETURNS_THRESHOLD, DIMINISHING_RETURNS_MIN_CONTINUATIONS, DEFAULT_MAX_RESULT_SIZE_CHARS, MAX_TOOL_RESULTS_PER_MESSAGE_CHARS, TOOL_RESULT_PREVIEW_BYTES, HEARTBEAT_INTERVAL_MS, MAX_529_RETRIES, MAX_API_RETRIES, } from "./tunable-defaults.js";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TaskItem, TaskListSummary } from "../skills/tools/task-tool.js";
|
|
2
|
-
import { summarizeTaskList } from "../skills/tools/task-tool.js";
|
|
3
|
-
export declare const TODO_ITEM_STATUS_VALUES: readonly ["not-started", "in-progress", "completed"];
|
|
4
|
-
export type TodoItemStatus = (typeof TODO_ITEM_STATUS_VALUES)[number];
|
|
5
|
-
/** @deprecated Use TaskItem from task-tool.ts */
|
|
6
|
-
export type TodoItem = TaskItem;
|
|
7
|
-
/** @deprecated Use TaskListSummary from task-tool.ts */
|
|
8
|
-
export type TodoListSummary = TaskListSummary;
|
|
9
|
-
/** @deprecated Use summarizeTaskList from task-tool.ts */
|
|
10
|
-
export declare const summarizeTodoList: typeof summarizeTaskList;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|