qlogicagent 2.18.1 → 2.18.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.
Files changed (91) hide show
  1. package/dist/agent.js +40 -22
  2. package/dist/cli.js +1 -1
  3. package/dist/index.js +528 -470
  4. package/dist/orchestration.js +11 -11
  5. package/dist/protocol.js +1 -1
  6. package/dist/skills/mcp/astraclaw-native-mcp-server.js +8 -6
  7. package/dist/types/agent/memory-recall-injection.d.ts +2 -1
  8. package/dist/types/agent/tool-loop/budget-continuation-policy.d.ts +4 -0
  9. package/dist/types/agent/tool-loop/completion-action-policy.d.ts +9 -1
  10. package/dist/types/agent/tool-loop/compression-pipeline.d.ts +2 -0
  11. package/dist/types/agent/tool-loop/loop-helpers.d.ts +1 -0
  12. package/dist/types/agent/tool-loop/tool-failure-policy.d.ts +13 -1
  13. package/dist/types/agent/tool-loop.d.ts +8 -0
  14. package/dist/types/agent/types.d.ts +2 -0
  15. package/dist/types/cli/credential-vault.d.ts +6 -0
  16. package/dist/types/cli/handlers/turn-handler.d.ts +50 -1
  17. package/dist/types/cli/handlers/workflow-handler.d.ts +1 -0
  18. package/dist/types/cli/memory-coordinator.d.ts +4 -0
  19. package/dist/types/cli/pet-runtime.d.ts +2 -0
  20. package/dist/types/cli/rpc-registry.d.ts +11 -0
  21. package/dist/types/cli/runtime-hook-bootstrap.d.ts +2 -0
  22. package/dist/types/cli/skill-tools-bootstrap.d.ts +5 -0
  23. package/dist/types/cli/stdio-acp-request-host.d.ts +2 -1
  24. package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +1 -0
  25. package/dist/types/cli/stdio-server.d.ts +4 -0
  26. package/dist/types/cli/task-distillation-coordinator.d.ts +79 -0
  27. package/dist/types/cli/tool-bootstrap-core-registration.d.ts +24 -0
  28. package/dist/types/cli/turn-core.d.ts +0 -6
  29. package/dist/types/cli/turn-project-router.d.ts +9 -0
  30. package/dist/types/contracts/hooks.d.ts +3 -0
  31. package/dist/types/contracts/turn-event.d.ts +8 -4
  32. package/dist/types/orchestration/agent-instance.d.ts +11 -1
  33. package/dist/types/orchestration/agent-roster.d.ts +12 -0
  34. package/dist/types/orchestration/context/reactive-compact.d.ts +4 -6
  35. package/dist/types/orchestration/dag-scheduler.d.ts +3 -0
  36. package/dist/types/orchestration/delegation-coordinator.d.ts +6 -1
  37. package/dist/types/orchestration/error-handling/retry-loop.d.ts +0 -22
  38. package/dist/types/orchestration/goal-loop-coordinator.d.ts +10 -1
  39. package/dist/types/orchestration/goal-mode-adapters.d.ts +23 -2
  40. package/dist/types/orchestration/goal-run-types.d.ts +12 -0
  41. package/dist/types/orchestration/product-budget.d.ts +13 -0
  42. package/dist/types/orchestration/product-planner.d.ts +7 -2
  43. package/dist/types/orchestration/product-run-coordinator.d.ts +1 -0
  44. package/dist/types/orchestration/skill-improvement.d.ts +7 -2
  45. package/dist/types/orchestration/workflow/budget-permission-gate.d.ts +9 -0
  46. package/dist/types/orchestration/workflow/node-schema.d.ts +4 -1
  47. package/dist/types/orchestration/workflow/run-history-store.d.ts +2 -0
  48. package/dist/types/orchestration/workflow/workflow-runtime.d.ts +8 -0
  49. package/dist/types/orchestration/workflow/workflow-trigger.d.ts +5 -1
  50. package/dist/types/protocol/wire/acp-agent-management.d.ts +3 -0
  51. package/dist/types/protocol/wire/agent-events.d.ts +2 -2
  52. package/dist/types/protocol/wire/gateway-rpc.d.ts +1 -0
  53. package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +3 -0
  54. package/dist/types/protocol/wire/notification-payloads.d.ts +27 -0
  55. package/dist/types/runtime/config/tunable-defaults.d.ts +6 -0
  56. package/dist/types/runtime/execution/memory-decay.d.ts +5 -1
  57. package/dist/types/runtime/execution/streaming-tool-executor.d.ts +2 -0
  58. package/dist/types/runtime/execution/tool-result-storage.d.ts +6 -4
  59. package/dist/types/runtime/hooks/context-compression.d.ts +5 -0
  60. package/dist/types/runtime/hooks/memory-hooks.d.ts +10 -0
  61. package/dist/types/runtime/infra/acp-detector.d.ts +8 -0
  62. package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +19 -1
  63. package/dist/types/runtime/infra/agent-process.d.ts +6 -0
  64. package/dist/types/runtime/infra/astraclaw-capabilities.d.ts +9 -0
  65. package/dist/types/runtime/infra/external-agent-pool.d.ts +12 -0
  66. package/dist/types/runtime/infra/working-materials-store.d.ts +8 -14
  67. package/dist/types/runtime/pet/pet-profile-service.d.ts +7 -0
  68. package/dist/types/runtime/pet/petdex-forge-service.d.ts +3 -1
  69. package/dist/types/runtime/ports/agent-runtime-ports.d.ts +4 -1
  70. package/dist/types/runtime/ports/memory-provider.d.ts +2 -0
  71. package/dist/types/runtime/ports/project-memory-store.d.ts +2 -0
  72. package/dist/types/runtime/prompt/environment-context.d.ts +25 -3
  73. package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +7 -2
  74. package/dist/types/runtime/prompt/instruction-loader.d.ts +0 -1
  75. package/dist/types/runtime/session/inbound-upload-persistence.d.ts +12 -0
  76. package/dist/types/runtime/session/session-catalog.d.ts +8 -0
  77. package/dist/types/runtime/session/session-resource-key.d.ts +28 -0
  78. package/dist/types/runtime/session/session-resume.d.ts +5 -0
  79. package/dist/types/runtime/session/session-transcript-store.d.ts +10 -1
  80. package/dist/types/runtime/session/session-types.d.ts +29 -0
  81. package/dist/types/skills/mcp/mcp-manager.d.ts +25 -1
  82. package/dist/types/skills/memory/local-memory-provider.d.ts +14 -0
  83. package/dist/types/skills/memory/local-store.d.ts +2 -0
  84. package/dist/types/skills/memory/memdir.d.ts +8 -0
  85. package/dist/types/skills/memory/task-distillation.d.ts +148 -0
  86. package/dist/types/skills/tools/search-tool.d.ts +6 -0
  87. package/dist/types/skills/tools/shell/task-output.d.ts +2 -0
  88. package/package.json +4 -3
  89. package/dist/types/agent/tool-loop/skill-instruction-policy.d.ts +0 -7
  90. package/dist/types/agent/tool-loop/tool-guardrails.d.ts +0 -24
  91. package/dist/types/cli/turn-skill-autopersist.d.ts +0 -22
@@ -3,7 +3,10 @@ export interface LeaderPort {
3
3
  deriveChecklist(goal: string): Promise<AcceptanceCriterion[]>;
4
4
  planPhase(goal: string, summary: string, drained: GoalQueuedMessage[], checklist: AcceptanceChecklist, agentPool: string[]): Promise<PhaseSpec>;
5
5
  critiquePlan(spec: PhaseSpec, goal: string, checklist: AcceptanceChecklist, agentPool: string[]): Promise<PhaseSpec>;
6
- assess(productId: string, checklist: AcceptanceChecklist): Promise<AcceptanceDelta[]>;
6
+ assess(productId: string, checklist: AcceptanceChecklist): Promise<{
7
+ deltas: AcceptanceDelta[];
8
+ producedFiles: boolean;
9
+ }>;
7
10
  compact(prevSummary: string, deltas: AcceptanceDelta[]): Promise<string>;
8
11
  }
9
12
  export interface PhaseRunnerPort {
@@ -57,6 +60,12 @@ export declare class GoalLoopCoordinator {
57
60
  * (finishPhase). Honest-fail ONLY if resume itself throws — a started phase is recovered, never lost,
58
61
  * but progress is never fabricated. Bounded by an abort handle so pause() can still drain it. */
59
62
  private recoverCrashedPhase;
63
+ /** #4: classify how an in-flight phase's throw should land. A user pause aborts the signal (whatever
64
+ * error then surfaces → "user_pause"); the adapter's GOAL_DRAIN_TIMEOUT_MS wall throws an AbortError
65
+ * WITHOUT the signal being aborted, tagged pauseReason="drain_timeout" (untagged AbortErrors from
66
+ * simpler runner ports default to drain_timeout — the only engine-side AbortError source). Anything
67
+ * else is a real failure → undefined (the caller honest-FAILs). */
68
+ private pauseReasonOf;
60
69
  /** I3: true when the loaded state shows a phase that started (currentProductId set) but never reached
61
70
  * its assessment/boundary — i.e. a process died mid-phase. Inspects the durable event log because
62
71
  * the snapshot alone can't distinguish "just started" from "started and crashed". */
@@ -3,6 +3,12 @@ import type { AcpDetector } from "../runtime/infra/acp-detector.js";
3
3
  import type { ProductOrchestrator } from "./agent-instance.js";
4
4
  import type { LeaderPort, PhaseRunnerPort } from "./goal-loop-coordinator.js";
5
5
  import { type AcceptanceCriterion, type AcceptanceDelta, type PhaseSpec } from "./goal-run-types.js";
6
+ /**
7
+ * #2 verify 输出的头尾截断:测试/构建命令的失败摘要通常在输出**末尾**(框架的 summary 行),裸
8
+ * slice(0,N) 保头丢尾会把真正的失败原因截掉,判官只能看到无关的开头。超限时保留头尾各半,并在
9
+ * 中间插入可见的省略注记(对齐 ASSESS 路径 "…(已截断)" 的风格 —— 截断必须留痕,不静默)。
10
+ */
11
+ export declare function capVerifyOutput(text: string, cap?: number): string;
6
12
  /**
7
13
  * Deterministic runtime verification — the cc/codex-style "the runner OBSERVES the result" applied to
8
14
  * the judge, run EVERY phase as a continuous regression gate (not a one-time entry ticket). For each
@@ -75,7 +81,9 @@ export interface PhaseRunnerAdapterDeps {
75
81
  };
76
82
  }
77
83
  export declare function createPhaseRunnerAdapter(deps: PhaseRunnerAdapterDeps): PhaseRunnerPort;
78
- export declare function parsePhaseSpec(reply: string, availableAgentIds: string[]): PhaseSpec;
84
+ export declare function parsePhaseSpec(reply: string, availableAgentIds: string[], log?: {
85
+ warn?(m: string): void;
86
+ }): PhaseSpec;
79
87
  /**
80
88
  * B (evidence-gating): goal-mode's assess() is the SOLE acceptance authority (Product's per-task judge
81
89
  * is a no-op for a session-less goal-mode run), so a criterion may only flip to `passed` when it is
@@ -86,9 +94,22 @@ export declare function parsePhaseSpec(reply: string, availableAgentIds: string[
86
94
  * - `passed` delta: keep only evidence items with a non-empty `source` AND non-empty `quote`, AND
87
95
  * whose `source` is PRIMARY — i.e. it matches one of the run's actual `changedFiles` (exact or
88
96
  * basename/suffix match, since the judge may cite a relative path) OR is the literal `"output"`.
89
- * If, after filtering, a passed delta has zero evidence items, DROP it (do not flip)and log.
97
+ * If, after filtering, a passed delta has zero evidence items, do NOT flip it demote it to a
98
+ * VISIBLE `pending` note delta (#1③: it reaches the phase_assessed event, the progress summary and
99
+ * the next phase's "受阻原因", instead of vanishing with only an engine log line).
90
100
  * - `failed` / other deltas: kept as-is (their reason is informational; failed needs no evidence).
91
101
  */
92
102
  export declare function validateAssessDeltas(rawDeltas: AcceptanceDelta[], changedFiles: string[], log?: {
93
103
  warn(msg: string): void;
94
104
  }): AcceptanceDelta[];
105
+ /**
106
+ * #1②: the judge-prompt view of this phase's project changed files. The PROMPT is windowed to stay
107
+ * bounded, but the truncation is DISCLOSED in-band — a hidden remainder must not read as "没有更多改动"
108
+ * (and the whitelist gate in assess() always uses the untruncated set, so citing an unlisted-but-real
109
+ * file still counts as primary evidence).
110
+ */
111
+ export declare const ASSESS_FILES_WINDOW = 50;
112
+ export declare function buildProjectFilesBlock(allFiles: string[], window?: number): string;
113
+ /** Build the evidence block for the judge from a live Product status (task outputs + changed files).
114
+ * Exported for the #3 regression test: the >ASSESS_MAX_TASKS window note must never silently vanish. */
115
+ export declare function buildEvidenceBlock(status: ReturnType<ProductOrchestrator["getStatus"]>): string;
@@ -1,9 +1,14 @@
1
1
  /** Loop tunables (single source of truth — I9). */
2
2
  export declare const GOAL_NO_PROGRESS_LIMIT = 3;
3
+ export declare const GOAL_SOFT_NO_PROGRESS_LIMIT = 8;
3
4
  export declare const GOAL_DRAIN_TIMEOUT_MS: number;
4
5
  export declare const GOAL_UNREACHABLE_MIN_STREAK = 2;
5
6
  export type GoalRunStatus = "running" | "ended";
6
7
  export type GoalPauseState = "running" | "draining" | "paused";
8
+ /** Why a run is paused: the user's explicit pause vs the engine's GOAL_DRAIN_TIMEOUT_MS wall expiring
9
+ * on its own. Carried on the `paused` event payload, the snapshot and goal.run_state_changed so an
10
+ * engine-imposed pause is never indistinguishable from a user action (限制必须可见,不静默)。 */
11
+ export type GoalPauseReason = "user_pause" | "drain_timeout";
7
12
  export type GoalEndReason = "done" | "stopped" | "failed";
8
13
  export type AcceptanceStatus = "pending" | "passed" | "failed" | "superseded";
9
14
  /** FINAL evidence type (I9 — not staged). source = file path / check name; quote = cited excerpt. */
@@ -43,6 +48,10 @@ export interface PhaseSpec {
43
48
  criterionId: string;
44
49
  reason: string;
45
50
  }[];
51
+ /** fail-open 打标:critique 判官坏 JSON 重试后仍失败,本计划未经精修直接执行。 */
52
+ critiqueSkipped?: boolean;
53
+ /** 截断收据:超 MAX_TASKS_PER_PHASE 被丢弃的任务数(其对应标准仍未通过,下一阶段会重新规划)。 */
54
+ droppedTaskCount?: number;
46
55
  }
47
56
  /** Output of assess() — one per criterion the phase touched. */
48
57
  export interface AcceptanceDelta {
@@ -76,6 +85,7 @@ export interface PersistedGoalRunState {
76
85
  pauseState: GoalPauseState;
77
86
  phaseIndex: number;
78
87
  noProgressCount: number;
88
+ noFlipStreak?: number;
79
89
  unreachableStreak?: Record<string, number>;
80
90
  progressSummary: string;
81
91
  acceptanceChecklist: AcceptanceChecklist;
@@ -83,6 +93,8 @@ export interface PersistedGoalRunState {
83
93
  agentPool: string[];
84
94
  wallClockStartedAt: string;
85
95
  pausedAt?: string;
96
+ /** #4: how the run became paused (user_pause / drain_timeout) — cleared on resume. */
97
+ pauseReason?: GoalPauseReason;
86
98
  stopReason?: string;
87
99
  endReason?: GoalEndReason;
88
100
  failedReason?: string;
@@ -43,6 +43,19 @@ export declare class ProductBudgetTracker {
43
43
  * - "exceeded": over 100%, should pause
44
44
  */
45
45
  check(): BudgetCheck;
46
+ /**
47
+ * Grant additional budget headroom — the escape hatch out of a budget-exhausted pause. Without it,
48
+ * resume just restores usedTokens (already >= max), re-checks, and immediately re-pauses forever
49
+ * (a permanent deadlock with no "add budget" entry). With no explicit amount, grants one more of the
50
+ * current quota's worth of headroom measured from where usage stands now; an explicit amount adds
51
+ * exactly that. Re-arms the 80% warning so the fresh quota warns again. Time budgets get a fresh
52
+ * window from now (elapsed already includes paused wall-clock, so extending the raw ceiling wouldn't
53
+ * help). The user's act of resuming a paused-at-budget run IS the decision to spend more.
54
+ */
55
+ raiseBudget(additional?: {
56
+ maxTotalTokens?: number;
57
+ maxDuration?: number;
58
+ }): void;
46
59
  /** Restore from persisted budget data. (input/output optional for back-compat with older snapshots.) */
47
60
  restore(data: {
48
61
  usedTokens: number;
@@ -165,8 +165,12 @@ export declare class ProductPlanner {
165
165
  listSessions(): PlanningSession[];
166
166
  /**
167
167
  * Ask the leader to judge whether a worker task's output satisfies its acceptanceCriteria.
168
- * Returns { pass: true } immediately when there is no leader session (fail-open).
169
- * If the response cannot be parsed at all, defaults to { pass: true } (lenient, like solo.specJudge).
168
+ *
169
+ * Distinguishes a VERIFIED pass (the judge ran and returned PASS) from an UNVERIFIED pass
170
+ * (`unverified: true`) — the run continues rather than blocking, but the caller must NOT report
171
+ * an unverified pass as if the work were checked. Unverified means we could not judge at all: no
172
+ * leader session, or the judge response was unparseable/errored. (The judging *prompt* itself is
173
+ * deliberately lenient/evidence-aware — that is a real PASS, not an unverified one.)
170
174
  */
171
175
  reviewTaskOutput(productId: string, review: {
172
176
  taskId: string;
@@ -177,6 +181,7 @@ export declare class ProductPlanner {
177
181
  }): Promise<{
178
182
  pass: boolean;
179
183
  feedback?: string;
184
+ unverified?: boolean;
180
185
  }>;
181
186
  /**
182
187
  * Ask leader to evaluate execution state and propose DAG mutations.
@@ -25,6 +25,7 @@ export interface ProductLeaderCoordinator {
25
25
  }): Promise<{
26
26
  pass: boolean;
27
27
  feedback?: string;
28
+ unverified?: boolean;
28
29
  }>;
29
30
  /** Snapshot the leader's PlanningSession for checkpoint persistence (durable execution). */
30
31
  serializeSession(productId: string): PlanningSession | null;
@@ -1,6 +1,11 @@
1
1
  /**
2
- * Skill self-learning: decides whether a completed turn should
3
- * trigger skill creation or improvement instructions.
2
+ * Task-pattern learning gates (R3 蒸馏管道的候选判定基建)。
3
+ *
4
+ * 原消费者(tool-loop 回合内即时产技能路径)已于 2026-07-07 整链废弃删除——
5
+ * 即时产出无法验证做法正确性,且其产物是用户永远看不见的默认禁用技能(死链)。
6
+ * 本模块的门槛判定/模式签名/冷却状态机保留,作为 R3 任务后蒸馏的候选采集核心
7
+ * (docs/memory-layering-and-distillation-spec.md):蒸馏产 procedure 记忆,
8
+ * 高复用 procedure 晋升为技能(默认启用——质量闸已前移到真实复用数据)。
4
9
  *
5
10
  * Guards against proliferation:
6
11
  * - Project-level pattern repetition: same workflow signature must appear
@@ -31,6 +31,15 @@ export type WorkflowTriggerKind = "manual" | "schedule" | "im-message" | "webhoo
31
31
  * (set / if / loop / merge / passthrough / trigger) are NOT here — they cannot escape the engine.
32
32
  */
33
33
  export declare const SENSITIVE_KINDS: ReadonlySet<string>;
34
+ /**
35
+ * The distinct sensitive (side-effecting) kinds present among these node kinds — i.e. the
36
+ * capabilities a workflow will need authorized to run unattended. Pure; drives upfront disclosure at
37
+ * ACTIVATION so the user authorizes these knowingly, instead of the first unattended run hard-failing
38
+ * at the gate (the old surprise: "activated fine, then the 3am schedule died at a channel send").
39
+ */
40
+ export declare function requiredUnattendedPermissions(nodeKinds: Iterable<string>): string[];
41
+ /** Required unattended permissions NOT yet granted — exactly what activation should ask to authorize. */
42
+ export declare function missingUnattendedAuthorizations(nodeKinds: Iterable<string>, granted: readonly string[] | undefined): string[];
34
43
  /** Hard, non-resumable denial: an unauthorized side-effecting kind under an unattended trigger. */
35
44
  export declare class WorkflowPermissionDenied extends Error {
36
45
  readonly nodeId: string;
@@ -207,8 +207,11 @@ export interface ApprovalHostRequest {
207
207
  workflowId?: string;
208
208
  /** Plain-language question shown to the owner (默认 "继续执行?"). */
209
209
  prompt?: string;
210
- /** Auto-deny deadline; default 24h. */
210
+ /** Deadline for a decision; default 24h. What happens at the deadline is timeoutAction (default reject). */
211
211
  timeoutMs?: number;
212
+ /** Timeout policy (default "reject"): "reject" fails the node but ANNOUNCES it (not a silent auto-deny);
213
+ * "approve" auto-continues; "keepPending" stays suspended (persisted; re-prompts on restart). */
214
+ timeoutAction?: "approve" | "reject" | "keepPending";
212
215
  input: DataItem[];
213
216
  signal?: AbortSignal;
214
217
  }
@@ -34,6 +34,8 @@ export interface RunNodeRecord {
34
34
  cacheHit?: boolean;
35
35
  /** Per-node disposition; "failed" with a surviving run = onError errorPort/continue (D32). */
36
36
  nodeStatus?: "completed" | "failed";
37
+ /** Engine-imposed limit surfaced on this node (e.g. a loop forced out at its iteration cap). */
38
+ warning?: string;
37
39
  }
38
40
  export interface RunHistoryEntry {
39
41
  runId: string;
@@ -59,6 +59,9 @@ export interface NodeRunStats {
59
59
  cacheHit: boolean;
60
60
  /** Final per-node disposition (errorPort/continue keep the run alive but mark failed). */
61
61
  status: "completed" | "failed";
62
+ /** Engine-imposed limit surfaced on this node (e.g. a loop forced out at its iteration cap) —
63
+ * rendered into the run history so caps are visible in the run record, never silent. */
64
+ warning?: string;
62
65
  }
63
66
  export interface RunResult {
64
67
  status: "completed" | "failed" | "paused";
@@ -156,6 +159,11 @@ export declare class WorkflowRuntime {
156
159
  /** Loop entry: fire the "loop" port once to kick the first iteration. */
157
160
  private enterLoop;
158
161
  private decideLoopBack;
162
+ /** A loop forced out at its maxIterations cap (the scheduler marks error="loop_cap_reached:N",
163
+ * which previously had NO consumer — the run just took the "done" port as if the loop finished
164
+ * naturally). Surface it as a node-level warning: a warn log line + a trace entry the run history
165
+ * renders (run-history-store.buildNodeRecords), so the engine-imposed cap is visible in the record. */
166
+ private surfaceLoopCap;
159
167
  /** Loop again? No condition → loop until the scheduler's maxIterations cap. */
160
168
  private evalLoopCondition;
161
169
  /** Collect inputs for a node from completed upstream outputs along forward data edges. */
@@ -28,7 +28,11 @@ export type TriggerDef = {
28
28
  aliases?: string[];
29
29
  /** 开启语义兜底(确定性未命中时一次 LLM 分类;有成本,默认关)。 */
30
30
  semantic?: boolean;
31
- /** 命中后是否弹确认(默认 true;关闭=说出即跑)。 */
31
+ /**
32
+ * 命中后是否弹确认。显式 true/false = 用户的判断,恒生效(false=说出即跑)。
33
+ * 缺省时由客户端按 intentIndex 的 sideEffectKinds 证据决定:无副作用节点→直接跑;
34
+ * 有副作用→弹确认(确认条上可选「总是直接运行」,持久化为 confirm:false)。
35
+ */
32
36
  confirm?: boolean;
33
37
  /** 生效界面;缺省 = 欢迎页+对话页都生效。 */
34
38
  surfaces?: ("welcome" | "chat")[];
@@ -243,6 +243,9 @@ export interface SoloSpecJudgeParams {
243
243
  export interface SoloSpecJudgeResult {
244
244
  ok: boolean;
245
245
  issues: string[];
246
+ /** True when ok=true came from a SKIPPED judgement (no LLM / judge call failed) — an unjudged
247
+ * soft-gate pass, not a real "spec reviewed OK". Fail-open stays, but honestly labeled. */
248
+ judgeSkipped?: boolean;
246
249
  }
247
250
  /** x/workflow.chat RPC params(M4 自动化页对话式搭图/改图)。history 含到本轮的完整对话;
248
251
  * currentWorkflow 为已有图的渲染文本(改图上下文,前端从 store 提供)。 */
@@ -13,7 +13,7 @@
13
13
  * Turn-lifecycle events relayed to the Control UI WebSocket.
14
14
  * These are the "chat session" events that every UI client needs.
15
15
  */
16
- export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested"];
16
+ export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut"];
17
17
  /**
18
18
  * Agent Team events (Solo Mode, Product Mode, Plan lifecycle).
19
19
  * Relayed to the UI's team/orchestration panel.
@@ -23,7 +23,7 @@ export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo
23
23
  * All agent notifications that Gateway should relay to WS clients.
24
24
  * Union of session events + team events.
25
25
  */
26
- export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated"];
26
+ export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated"];
27
27
  /** Type-level event name for session events. */
28
28
  export type AgentWsEventName = (typeof AGENT_WS_EVENT_NAMES)[number];
29
29
  /** Type-level event name for team events. */
@@ -241,6 +241,7 @@ export interface GatewayRpcMethodMap {
241
241
  result: {
242
242
  messages: unknown[];
243
243
  total: number;
244
+ corruptLines?: number;
244
245
  };
245
246
  };
246
247
  "project.list": {
@@ -58,6 +58,9 @@ export interface MemorySearchOptions {
58
58
  llmConfig?: MemoryLlmConfig;
59
59
  /** Categories to boost during reranking (e.g. ["lesson", "preference"]). */
60
60
  preferredCategories?: string[];
61
+ /** Drop hits whose tags contain ALL strings of any group (resident-layer exclusion:
62
+ * entries already injected verbatim via the global INDEX must not be recalled again). */
63
+ excludeTagGroups?: string[][];
61
64
  }
62
65
  export interface MemoryIngestOptions {
63
66
  llmConfig?: MemoryLlmConfig;
@@ -163,6 +163,22 @@ export interface TurnSuggestionsNotification {
163
163
  action?: string;
164
164
  }>;
165
165
  }
166
+ /** Memory recall visibility (Part B): fired when turn-time recall injected memories,
167
+ * so the UI can render a "based on N memories" disclosure row (recall was invisible before). */
168
+ export interface TurnMemoryRecallNotification {
169
+ sessionId: string;
170
+ turnId: string;
171
+ count: number;
172
+ /** Truncated texts of the memories actually injected (post-cap), for the expanded list. */
173
+ titles: string[];
174
+ }
175
+ /** Memory write visibility (Part B): fired on the synchronous agent-remember tool path.
176
+ * Dream/async consolidation deliberately does NOT emit this (it surfaces via next-turn recall). */
177
+ export interface TurnMemoryWrittenNotification {
178
+ items: Array<{
179
+ title: string;
180
+ }>;
181
+ }
166
182
  /** Sidechain started execution. */
167
183
  export interface TurnSidechainStartedNotification {
168
184
  turnId: string;
@@ -250,6 +266,15 @@ export interface TurnMediaPersistedNotification {
250
266
  bytes: number;
251
267
  mimeType: string;
252
268
  }>;
269
+ /**
270
+ * URLs that FAILED to persist locally this turn (result keeps the remote URL / dangling temp
271
+ * path, which may expire). Present only when at least one file failed — persistence stays
272
+ * fail-open, but the degradation is surfaced instead of silently swallowed.
273
+ */
274
+ failures?: Array<{
275
+ remoteUrl: string;
276
+ error?: string;
277
+ }>;
253
278
  }
254
279
  /** Task state change. */
255
280
  export interface TurnTaskUpdatedNotification {
@@ -1011,6 +1036,8 @@ export interface NotificationMethodMap {
1011
1036
  "turn.reasoning_delta": TurnReasoningDeltaNotification;
1012
1037
  "turn.plan_update": TurnPlanUpdateNotification;
1013
1038
  "turn.suggestions": TurnSuggestionsNotification;
1039
+ "turn.memory_recall": TurnMemoryRecallNotification;
1040
+ "turn.memory_written": TurnMemoryWrittenNotification;
1014
1041
  "turn.sidechain_started": TurnSidechainStartedNotification;
1015
1042
  "turn.subagent_delta": TurnSubagentDeltaNotification;
1016
1043
  "turn.sidechain_completed": TurnSidechainCompletedNotification;
@@ -143,6 +143,12 @@ export declare const TASK_PANEL_GRACE_MS = 30000;
143
143
  export declare const MEMORY_PREFETCH_MAX_SESSION_BYTES: number;
144
144
  /** Max results per memory recall query. */
145
145
  export declare const MEMORY_PREFETCH_LIMIT_PER_RECALL = 10;
146
+ /** Min hybrid score for recall injection. The old 0.1 default was a no-op filter —
147
+ * top-10 got injected wholesale and weak matches crowded the per-turn byte budget. */
148
+ export declare const MEMORY_RECALL_MIN_SCORE = 0.35;
149
+ /** Adaptive cliff cutoff: stop taking results when the next score drops by more than
150
+ * this ratio vs the previous one (2 relevant hits -> inject 2, don't pad to 10). */
151
+ export declare const MEMORY_RECALL_CLIFF_RATIO = 0.4;
146
152
  /** LRU dedup set size for surfaced memory entries. */
147
153
  export declare const MEMORY_MAX_SURFACED_ENTRIES = 100;
148
154
  /** Min hours between dream consolidation runs. */
@@ -49,8 +49,12 @@ export interface DecayCycleDeps {
49
49
  };
50
50
  }
51
51
  export interface DecayCycleResult {
52
- /** Whether decay actually ran (false = skipped by gate). */
52
+ /** Whether decay actually ran (false = skipped by gate OR failed — see `failed`). */
53
53
  ran: boolean;
54
+ /** True when the cycle was ATTEMPTED and errored — distinguishes a failure from a cooldown skip. */
55
+ failed?: boolean;
56
+ /** Failure reason, present when failed=true. */
57
+ error?: string;
54
58
  /** Number of memories whose importance was reduced. */
55
59
  decayed: number;
56
60
  /** Number of memories archived (below threshold). */
@@ -28,6 +28,8 @@ export interface StreamingToolExecutorConfig {
28
28
  toolInvoker: ToolInvoker;
29
29
  hooks?: HookRegistry;
30
30
  sessionId: string;
31
+ /** Turn workspace/cwd - routes oversized tool-result spillover to the session data dir. */
32
+ projectRoot?: string;
31
33
  turnId: string;
32
34
  log: AgentLogger;
33
35
  signal?: AbortSignal;
@@ -48,7 +48,7 @@ export declare function generatePreview(content: string, maxBytes: number): {
48
48
  preview: string;
49
49
  hasMore: boolean;
50
50
  };
51
- export declare function persistToolResult(content: string, toolCallId: string, sessionId: string): Promise<PersistedToolResult | null>;
51
+ export declare function persistToolResult(content: string, toolCallId: string, sessionId: string, projectRoot: string | undefined): Promise<PersistedToolResult | null>;
52
52
  /**
53
53
  * Build a reference message for large tool results (CC buildLargeToolResultMessage parity).
54
54
  */
@@ -58,7 +58,7 @@ export declare function buildLargeToolResultMessage(result: PersistedToolResult)
58
58
  * Falls back to hard truncation if persistence fails.
59
59
  * Called at tool execution time in streaming-tool-executor.ts.
60
60
  */
61
- export declare function maybePersistLargeToolResult(content: string, toolCallId: string, sessionId: string, threshold?: number): Promise<string>;
61
+ export declare function maybePersistLargeToolResult(content: string, toolCallId: string, sessionId: string, projectRoot: string | undefined, threshold?: number): Promise<string>;
62
62
  interface MessageLike {
63
63
  role: string;
64
64
  content?: string | unknown;
@@ -78,10 +78,12 @@ interface MessageLike {
78
78
  * replaced later (would break prompt cache).
79
79
  *
80
80
  * @param state — MUTATED in place (seenIds and replacements updated)
81
- * @returns messages with replacements applied + count of new replacements
81
+ * @returns messages with replacements applied + count of new replacements +
82
+ * total original bytes spilled this pass (so the caller can surface it)
82
83
  */
83
- export declare function enforceToolResultBudget(messages: MessageLike[], state: ContentReplacementState, sessionId: string, limit?: number): Promise<{
84
+ export declare function enforceToolResultBudget(messages: MessageLike[], state: ContentReplacementState, sessionId: string, projectRoot: string | undefined, limit?: number): Promise<{
84
85
  messages: MessageLike[];
85
86
  newlyReplacedCount: number;
87
+ newlyPersistedBytes: number;
86
88
  }>;
87
89
  export {};
@@ -8,6 +8,11 @@ export declare function estimateTokens(msg: CompressibleMessage): number;
8
8
  export declare function estimateTotalTokens(messages: CompressibleMessage[]): number;
9
9
  export declare function getCompressionMetrics(): import("../context/context-compression-strategies.js").CompressionMetricsSnapshot;
10
10
  export declare function getContextEngineRegistry(): ContextEngineRegistry;
11
+ /**
12
+ * Prefixed onto the sync fallback when the LLM summarize call failed — the model
13
+ * (and anyone reading the compressed history) must know this stretch is low-fidelity.
14
+ */
15
+ export declare const DEGRADED_SUMMARY_MARKER = "[summary degraded: LLM summarization failed]";
11
16
  /**
12
17
  * Create a summarization callback using an injected LLM transport.
13
18
  * For CLI mode: uses the same transport that powers the agent loop.
@@ -25,6 +25,16 @@ export interface MemoryHooksDeps {
25
25
  getLastAssistantMessage?: () => string | undefined;
26
26
  /** Background LLM for implicit extraction. If provided, enables Layer 2. */
27
27
  llmExtract?: (prompt: string) => Promise<string | null>;
28
+ /** Part B write visibility: forwards turn.memory_written on auto-extract commits. */
29
+ sendNotification?: (method: string, params: Record<string, unknown>) => void;
30
+ /** V3.2 usage 仪表:procedure 复用的 session 维度与负反馈计数落盘目录。 */
31
+ profileMemoryDir?: () => string;
32
+ /** V3.2: tag marking a distilled procedure memory (recall filter). cli injects so runtime never imports skills. */
33
+ procedureTag?: string;
34
+ /** V3.2: record distilled procedures recalled this turn (positive reuse signal). cli-injected. */
35
+ recordProcedureRecalls?: (procedureIds: string[], sessionId: string) => void;
36
+ /** V3.2: record negative feedback against distilled procedures (failed turn). cli-injected. */
37
+ recordProcedureNegatives?: (procedureIds: string[]) => void;
28
38
  }
29
39
  /** Session-scoped state for dedup and byte budget (CC parity). */
30
40
  export interface MemoryPrefetchState {
@@ -155,6 +155,9 @@ export declare function assembleBackendDescriptor(backend: AcpBackendConfig, cli
155
155
  export declare function assembleCustomAgentDescriptor(custom: CustomAgentDef, cliPath: string | null, hasConfig: boolean): AgentDescriptor;
156
156
  export declare class AcpDetector {
157
157
  private cache;
158
+ /** Last scan that COMPLETED, surviving clearCache() and failed rescans. list() prefers this
159
+ * over an empty [] so a transient probe failure never reads as "no agents installed". */
160
+ private lastGoodScan;
158
161
  private configStore;
159
162
  private keySources;
160
163
  /** Shared in-flight async scan so concurrent scanAsync() callers (startup warm + a racing RPC)
@@ -188,6 +191,11 @@ export declare class AcpDetector {
188
191
  * Return cached results without IO. 冷缓存时后台预热(scanAsync)并返回 [],
189
192
  * 绝不在 RPC 路径上同步 scan —— 同步探测(11-18s+)会饿死单线程引擎循环
190
193
  * (x/product.confirm 60s 超时的根因)。调用方按"稍后再查"处理空列表。
194
+ *
195
+ * A background-scan failure is reported (console.error), never swallowed: a swallowed
196
+ * failure made list() return [] forever and downstream (product planning) treated
197
+ * "scan failed" as "no agents installed". When the fresh cache is gone but an older
198
+ * scan succeeded, that stale-but-real result is returned instead of [].
191
199
  */
192
200
  list(): AgentDescriptor[];
193
201
  /** Clear the detection cache. */
@@ -16,6 +16,12 @@
16
16
  */
17
17
  import type { ChildProcess } from "node:child_process";
18
18
  import type { AcpInitializeResult, AcpSessionResult, AcpPromptResponse, McpServerConfig } from "../../protocol/wire/acp-agent-management.js";
19
+ interface AcpPromptTimeoutOptions {
20
+ timeoutMs?: number;
21
+ getLastActivityAt?: () => number | undefined;
22
+ checkIntervalMs?: number;
23
+ }
24
+ type AcpPromptTimeoutInput = number | AcpPromptTimeoutOptions;
19
25
  /**
20
26
  * Handler for agent→host requests (fs, terminal, permission, elicitation).
21
27
  * Host implementations should implement the methods they support. This is intentionally loose
@@ -108,6 +114,8 @@ export declare class AcpProtocolAdapter {
108
114
  private child;
109
115
  private onNotification;
110
116
  private hostHandler;
117
+ /** Sessions whose session/set_model FAILED — running on the agent's default model, not the managed one. */
118
+ private modelMismatches;
111
119
  /**
112
120
  * Attach to a child process's stdio for ACP communication.
113
121
  * Constructs the official ClientSideConnection over the child's stdin/stdout. The connection's
@@ -137,6 +145,7 @@ export declare class AcpProtocolAdapter {
137
145
  private requireConn;
138
146
  /** Race a connection call against a timeout; optionally run a side effect (e.g. cancel) on timeout. */
139
147
  private withTimeout;
148
+ private withActivityTimeout;
140
149
  /**
141
150
  * Perform the ACP initialize handshake. Sends standard clientInfo + clientCapabilities plus the
142
151
  * qlogicagent extension capability (forwarded verbatim by the SDK).
@@ -165,12 +174,20 @@ export declare class AcpProtocolAdapter {
165
174
  * error is the backstop). Uses the generic sendRequest because the SDK has no typed set_model yet.
166
175
  */
167
176
  private selectSessionModel;
177
+ /**
178
+ * The recorded session/set_model failure for a session, if any — the session is alive but on
179
+ * the agent's DEFAULT model instead of the managed/platform one (wrong vendor/billing/capability).
180
+ */
181
+ getModelMismatch(sessionId: string): {
182
+ desired: string;
183
+ error: string;
184
+ } | undefined;
168
185
  /**
169
186
  * Send a prompt to a running ACP session (session/prompt). Content streams back via session/update
170
187
  * notifications during execution; the response carries only { stopReason, usage? }. On timeout the
171
188
  * turn is cancelled (session/cancel) so the agent stops cleanly.
172
189
  */
173
- sendPrompt(_child: ChildProcess, sessionId: string, content: string, timeoutMs?: number): Promise<AcpPromptResponse>;
190
+ sendPrompt(_child: ChildProcess, sessionId: string, content: string, timeoutInput?: AcpPromptTimeoutInput): Promise<AcpPromptResponse>;
174
191
  /**
175
192
  * Resume an existing ACP session (session/load — replays history via notifications).
176
193
  * Only valid when the agent advertised the loadSession capability.
@@ -190,3 +207,4 @@ export declare class AcpProtocolAdapter {
190
207
  */
191
208
  static translateNotification(method: string, params: unknown): TranslatedNotification | null;
192
209
  }
210
+ export {};
@@ -291,6 +291,12 @@ export declare class AgentProcessManager {
291
291
  * Uses the ACP protocol adapter for lifecycle management.
292
292
  */
293
293
  private spawnAcpAgent;
294
+ /**
295
+ * Surface a recorded session/set_model failure: the session is alive but runs the agent's
296
+ * DEFAULT model instead of the managed/platform one (wrong vendor/billing/capability). Same
297
+ * agents.error channel as the other spawn/restart failures.
298
+ */
299
+ private reportModelMismatch;
294
300
  private syncNativeMcpConfig;
295
301
  /** Kill a specific child agent process. */
296
302
  kill(memberId: string): void;
@@ -8,6 +8,15 @@ export interface AstraClawCapabilityToolInput {
8
8
  availableToolNames?: Iterable<string>;
9
9
  currentEnvironment?: string;
10
10
  toolCatalog?: ToolCatalog;
11
+ /**
12
+ * Configured MCP servers serving NO tools this session (invalid config / connect failure).
13
+ * Disclosed in mcp_connectors_list so a failed server is visibly missing, not silently absent.
14
+ */
15
+ mcpServerFailures?: Array<{
16
+ name: string;
17
+ phase?: string;
18
+ error: string;
19
+ }>;
11
20
  }
12
21
  export type AstraClawCapabilityToolResult = {
13
22
  handled: false;
@@ -44,6 +44,18 @@ export declare function poolKey(agentId: string, cwd: string, sessionId?: string
44
44
  export declare function getAlivePooledAgent(key: string): PooledAgentEntry | undefined;
45
45
  /** Register a freshly-spawned entry, evicting any stale same-key entry and enforcing MAX_POOL. */
46
46
  export declare function registerPooledAgent(key: string, entry: PooledAgentEntry): void;
47
+ /**
48
+ * Move a live pooled entry from one key to another without disposing it — the same ACP process keeps
49
+ * running, only its pool key changes. Disposes any stale occupant of the destination key. Returns the
50
+ * moved entry, or undefined if `fromKey` has no live entry (a dead one is reaped). No-op returning the
51
+ * existing entry when the keys are equal.
52
+ *
53
+ * Merge note (session-identity-alignment): the second caller this was extracted for — the transient→native
54
+ * X→Y re-key after a native agent reported its own id — is GONE. Under canonical-id-stable, the frontend
55
+ * never converges to Y, so the pool key never changes mid-conversation; the sole caller is adoptWarmedAgent
56
+ * (warm → real session key). Kept as the general re-key primitive.
57
+ */
58
+ export declare function rekeyPooledAgent(fromKey: string, toKey: string): PooledAgentEntry | undefined;
47
59
  /**
48
60
  * Re-key a pre-warmed entry (spawned before a session existed, under WARM_SESSION) onto the real
49
61
  * session key, so the first turn adopts the warmed process and skips the cold start. Does not