@addai/node 0.30.16-msp.0 → 0.30.16-msp.10

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.
@@ -1,4 +1,7 @@
1
+ import { type ClaudePrintHandle } from './claude-print';
1
2
  import { type EntityboxQueueServices } from './entitybox-queue-request';
3
+ import { type InstallResult } from './install';
4
+ import { fetchMemoryPack } from './memory-pack';
2
5
  import { type MspDecision } from './model-selector';
3
6
  import type { RuntimePermissionMode, RuntimeEffortLevel } from './types';
4
7
  /** Shape of a row returned by runtime_pick_next_request. */
@@ -124,10 +127,18 @@ export interface RuntimeRequestRow {
124
127
  memoryV2Flagged?: boolean;
125
128
  /** Model Selector Protocol — NOT a DB column. Started by runRequest() as
126
129
  * soon as the run is accepted, so the selector's second or so overlaps the
127
- * cwd/install/memory-pack setup; awaited by runClaudePrint() just before
130
+ * cwd/install/memory-pack setup; awaited by applyModelSelection() just before
128
131
  * the spawn. Resolves null for every entity without MSP switched on, and
129
132
  * is undefined for runs it can't apply to. See model-selector.ts. */
130
133
  mspDecision?: Promise<MspDecision | null>;
134
+ /** NOT a DB column. What applyModelSelection decided: it publishes, so it
135
+ * runs once however many steps ask. */
136
+ mspApplied?: Promise<MspDecision | null>;
137
+ /** NOT a DB column. A CLI startClaudeEarly has running, waiting for its prompt. */
138
+ earlyStart?: {
139
+ handle: ClaudePrintHandle;
140
+ at: number;
141
+ };
131
142
  }
132
143
  export declare function notifyFlowsIfFlowRequest(requestId: string): Promise<void>;
133
144
  export declare function notifyWidgetstudioIfWidgetRequest(requestId: string): Promise<void>;
@@ -143,4 +154,17 @@ export declare function notifySelfImproveIfEnabled(requestId: string): Promise<v
143
154
  *
144
155
  * Exported for tests. */
145
156
  export declare function resumeSessionIsVoid(workingDirectory: string | null | undefined, resumeSessionId: string | null | undefined, cwdSubstituted: boolean): boolean;
157
+ /** The selector's early_start setting, on a turn it can work for. A new session
158
+ * carries its memories in the system prompt, so that can't start before they land. */
159
+ export declare function earlyStartWanted(req: Pick<RuntimeRequestRow, 'agent' | 'mode' | 'prompt' | 'resume_session_id' | 'entitybox_file_request'>, config: unknown): boolean;
160
+ type MemoryPack = Awaited<ReturnType<typeof fetchMemoryPack>>;
161
+ /**
162
+ * Setup for a turn with the model selector on. It does what the block in
163
+ * runRequest does, without the wait: the Drive listing and memory pack run side
164
+ * by side, and neither holds the spawn back when its answer can't change the
165
+ * turn. Claude reuses a resumed session's first system prompt, so its memory
166
+ * pack and pointer there are only read again after a compaction.
167
+ */
168
+ export declare function prepareFastSetup(req: RuntimeRequestRow, cwd: string, installed: InstallResult, pack: Promise<MemoryPack>, startedAt: number, onSystemPromptReady?: () => Promise<void>): Promise<void>;
146
169
  export declare function runRequest(req: RuntimeRequestRow, entitybox?: EntityboxQueueServices): Promise<void>;
170
+ export {};