@valerypopoff/rivet2-core 2.29.0 → 2.31.0

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.
@@ -85,3 +85,4 @@ export { WarningsPort } from './utils/symbols.js';
85
85
  import * as openai from './utils/openai.js';
86
86
  export { openai };
87
87
  export * from './model/LatestDebuggerProtocol.js';
88
+ export * from './model/ExecutorSessionProtocol.js';
@@ -0,0 +1,233 @@
1
+ /** Hosted executor transport, independent from the managed latest-debugger protocol. */
2
+ export const EXECUTOR_SESSION_V2 = 'rivet-session-v2';
3
+ // Preserve the ordinary WebSocket's 100 MiB message ceiling while chunking the wire payload.
4
+ // Published browser-storage RPC has separate limits and does not use this transport.
5
+ export const EXECUTOR_RELIABLE_MAX_BYTES = 100 * 1024 * 1024;
6
+ export const EXECUTOR_RELIABLE_SESSION_BYTES = 256 * 1024 * 1024;
7
+ export const EXECUTOR_RELIABLE_PROCESS_BYTES = 512 * 1024 * 1024;
8
+ export const EXECUTOR_RELIABLE_MAX_ITEMS = 4096;
9
+ export const EXECUTOR_TRANSFER_TIMEOUT_MS = 60_000;
10
+ // Exhaustive for current process events: additions must choose a delivery policy.
11
+ const deliveryPolicy = {
12
+ start: 'reliable',
13
+ done: 'reliable',
14
+ error: 'reliable',
15
+ abort: 'reliable',
16
+ graphOutputsReady: 'reliable',
17
+ webAppStoragePatch: 'reliable',
18
+ userInput: 'reliable',
19
+ pause: 'reliable',
20
+ resume: 'reliable',
21
+ codeConsole: 'diagnostic',
22
+ nodeStart: 'diagnostic',
23
+ nodeFinish: 'diagnostic',
24
+ nodeError: 'diagnostic',
25
+ nodeExcluded: 'diagnostic',
26
+ graphAbort: 'diagnostic',
27
+ graphStart: 'diagnostic',
28
+ graphFinish: 'diagnostic',
29
+ partialOutput: 'diagnostic',
30
+ progress: 'diagnostic',
31
+ llmCallFinished: 'diagnostic',
32
+ llmChatOutputSnapshot: 'diagnostic',
33
+ llmProfileAttempt: 'diagnostic',
34
+ toolCallFinished: 'diagnostic',
35
+ nodeOutputsCleared: 'diagnostic',
36
+ streamingOutputWatchSummary: 'diagnostic',
37
+ graphError: 'diagnostic',
38
+ trace: 'diagnostic',
39
+ };
40
+ const datasetMessages = {
41
+ 'datasets:get-metadata': true,
42
+ 'datasets:get-for-project': true,
43
+ 'datasets:get-data': true,
44
+ 'datasets:put-data': true,
45
+ 'datasets:put-row': true,
46
+ 'datasets:put-metadata': true,
47
+ 'datasets:clear-data': true,
48
+ 'datasets:delete': true,
49
+ 'datasets:knn': true,
50
+ 'datasets:export-for-project': true,
51
+ };
52
+ export function executorDeliveryPolicy(message) {
53
+ if (message === 'graph-upload-allowed' ||
54
+ message === 'executor-owner-retiring' ||
55
+ Object.hasOwn(datasetMessages, message))
56
+ return 'reliable';
57
+ if (Object.hasOwn(deliveryPolicy, message))
58
+ return deliveryPolicy[message];
59
+ throw new ExecutorRecoveryError('invalid-transfer');
60
+ }
61
+ // JSON escaping expands a UTF-16 code unit at most sixfold; frames stay below 64 KiB.
62
+ const CHUNK_CHARACTERS = 8192;
63
+ export class ExecutorRecoveryError extends Error {
64
+ reason;
65
+ constructor(reason) {
66
+ super(`Executor session could not be resumed (${reason}). Run outcome is unknown; it was not resubmitted.`);
67
+ this.reason = reason;
68
+ this.name = 'ExecutorRecoveryError';
69
+ }
70
+ }
71
+ const safeId = (value) => Number.isSafeInteger(value) && value > 0;
72
+ /** Retains each payload once; replay resets only its cursor. */
73
+ export class ExecutorReliableOutbox {
74
+ maxBytes;
75
+ reservedBytes;
76
+ #nextId = 0;
77
+ #items = new Map();
78
+ bytes = 0;
79
+ constructor(maxBytes = EXECUTOR_RELIABLE_SESSION_BYTES, reservedBytes = 0) {
80
+ this.maxBytes = maxBytes;
81
+ this.reservedBytes = reservedBytes;
82
+ if (!Number.isSafeInteger(maxBytes) ||
83
+ maxBytes < 1 ||
84
+ !Number.isSafeInteger(reservedBytes) ||
85
+ reservedBytes < 0 ||
86
+ reservedBytes >= maxBytes)
87
+ throw new Error('Invalid executor reliable retention limits');
88
+ }
89
+ get size() {
90
+ return this.#items.size;
91
+ }
92
+ add(text, order, emergency = false) {
93
+ const bytes = new TextEncoder().encode(text).byteLength;
94
+ if (bytes > EXECUTOR_RELIABLE_MAX_BYTES ||
95
+ this.bytes + bytes > this.maxBytes - (emergency ? 0 : this.reservedBytes) ||
96
+ this.size >= EXECUTOR_RELIABLE_MAX_ITEMS - (emergency || !this.reservedBytes ? 0 : 128))
97
+ throw new ExecutorRecoveryError('retention-limit');
98
+ const id = ++this.#nextId;
99
+ this.#items.set(id, { text, bytes, index: 0, order: order ?? id, sent: false });
100
+ this.bytes += bytes;
101
+ return id;
102
+ }
103
+ acknowledge(id) {
104
+ if (!safeId(id) || id > this.#nextId)
105
+ throw new ExecutorRecoveryError('invalid-transfer');
106
+ const item = this.#items.get(id);
107
+ if (!item)
108
+ return false;
109
+ if (!item.sent)
110
+ throw new ExecutorRecoveryError('invalid-transfer');
111
+ this.bytes -= item.bytes;
112
+ this.#items.delete(id);
113
+ return true;
114
+ }
115
+ replay() {
116
+ for (const item of this.#items.values())
117
+ item.index = 0;
118
+ }
119
+ peekOrder() {
120
+ for (const item of this.#items.values())
121
+ if (item.index < Math.max(1, Math.ceil(item.text.length / CHUNK_CHARACTERS)))
122
+ return item.order;
123
+ return undefined;
124
+ }
125
+ next() {
126
+ for (const [id, item] of this.#items) {
127
+ const count = Math.max(1, Math.ceil(item.text.length / CHUNK_CHARACTERS));
128
+ if (item.index >= count)
129
+ continue;
130
+ const index = item.index++;
131
+ if (item.index === count)
132
+ item.sent = true;
133
+ // Move a boundary before a surrogate pair, never through it. Adjacent chunks share the same boundary.
134
+ const boundary = (offset) => offset > 0 &&
135
+ offset < item.text.length &&
136
+ /[\uD800-\uDBFF]/.test(item.text[offset - 1]) &&
137
+ /[\uDC00-\uDFFF]/.test(item.text[offset])
138
+ ? offset - 1
139
+ : offset;
140
+ return {
141
+ id,
142
+ index,
143
+ count,
144
+ bytes: item.bytes,
145
+ text: item.text.slice(boundary(index * CHUNK_CHARACTERS), boundary(Math.min(item.text.length, (index + 1) * CHUNK_CHARACTERS))),
146
+ };
147
+ }
148
+ return undefined;
149
+ }
150
+ clear() {
151
+ this.#items.clear();
152
+ this.bytes = 0;
153
+ }
154
+ }
155
+ /** Ordered bounded reassembly. Consumed IDs survive transport replacement. */
156
+ export class ExecutorReliableInbox {
157
+ onExpiry;
158
+ budget;
159
+ #consumed = 0;
160
+ #transfer;
161
+ #timer;
162
+ constructor(onExpiry, budget) {
163
+ this.onExpiry = onExpiry;
164
+ this.budget = budget;
165
+ if (budget &&
166
+ (!Number.isSafeInteger(budget.bytes) ||
167
+ budget.bytes < 0 ||
168
+ !Number.isSafeInteger(budget.maxBytes ?? EXECUTOR_RELIABLE_PROCESS_BYTES) ||
169
+ (budget.maxBytes ?? EXECUTOR_RELIABLE_PROCESS_BYTES) < 1))
170
+ throw new Error('Invalid executor receive budget');
171
+ }
172
+ receive(value) {
173
+ if (!value || typeof value !== 'object')
174
+ throw new ExecutorRecoveryError('invalid-transfer');
175
+ const part = value;
176
+ if (!safeId(part.id) ||
177
+ !safeId(part.count) ||
178
+ part.count > Math.ceil(EXECUTOR_RELIABLE_MAX_BYTES / CHUNK_CHARACTERS) ||
179
+ !Number.isSafeInteger(part.index) ||
180
+ part.index < 0 ||
181
+ part.index >= part.count ||
182
+ !Number.isSafeInteger(part.bytes) ||
183
+ part.bytes < 0 ||
184
+ part.bytes > EXECUTOR_RELIABLE_MAX_BYTES ||
185
+ typeof part.text !== 'string' ||
186
+ part.text.length > CHUNK_CHARACTERS + 1)
187
+ throw new ExecutorRecoveryError('invalid-transfer');
188
+ if (part.id <= this.#consumed)
189
+ return { id: part.id };
190
+ if (!this.#transfer) {
191
+ if (this.budget) {
192
+ if (this.budget.bytes + part.bytes > (this.budget.maxBytes ?? EXECUTOR_RELIABLE_PROCESS_BYTES))
193
+ throw new ExecutorRecoveryError('retention-limit');
194
+ this.budget.bytes += part.bytes;
195
+ }
196
+ this.#transfer = { id: part.id, count: part.count, total: part.bytes, parts: [], bytes: 0 };
197
+ this.#timer = setTimeout(() => {
198
+ this.resetTransfer();
199
+ this.onExpiry?.();
200
+ }, EXECUTOR_TRANSFER_TIMEOUT_MS);
201
+ this.#timer.unref?.();
202
+ }
203
+ const transfer = this.#transfer;
204
+ if (transfer.id !== part.id ||
205
+ transfer.count !== part.count ||
206
+ transfer.total !== part.bytes ||
207
+ transfer.parts.length !== part.index)
208
+ throw new ExecutorRecoveryError('invalid-transfer');
209
+ transfer.bytes += new TextEncoder().encode(part.text).byteLength;
210
+ if (transfer.bytes > transfer.total)
211
+ throw new ExecutorRecoveryError('invalid-transfer');
212
+ transfer.parts.push(part.text);
213
+ if (transfer.parts.length !== transfer.count)
214
+ return;
215
+ if (transfer.bytes !== transfer.total)
216
+ throw new ExecutorRecoveryError('invalid-transfer');
217
+ const text = transfer.parts.join('');
218
+ this.resetTransfer();
219
+ this.#consumed = part.id;
220
+ return { id: part.id, text };
221
+ }
222
+ resetTransfer() {
223
+ if (this.#transfer && this.budget)
224
+ this.budget.bytes -= this.#transfer.total;
225
+ this.#transfer = undefined;
226
+ clearTimeout(this.#timer);
227
+ this.#timer = undefined;
228
+ }
229
+ clear() {
230
+ this.#consumed = 0;
231
+ this.resetTransfer();
232
+ }
233
+ }
@@ -184,18 +184,23 @@ export const perplexityClassifierProvider = createClassifierProvider({
184
184
  validateResponse: validateClassifierEvaluationResponse,
185
185
  });
186
186
  /** Current model catalog rate, not the older launch article's $0.05/MTok.
187
- * https://docs.subq.ai/using-the-api/models/ (verified 2026-10-24).
187
+ * https://docs.subq.ai/using-the-api/models/ (verified 2026-11-15).
188
188
  */
189
189
  export const subqClassifierProvider = createClassifierProvider({
190
190
  id: 'subq',
191
191
  label: 'SubQ',
192
- defaultModel: 'subq-snap-1.1',
193
- modelOptions: SUBQ_DECISION_MODELS.map((value) => ({ value, label: value, aggregateTokenUsageOnly: true })),
192
+ defaultModel: SUBQ_DECISION_MODELS[0].value,
193
+ modelOptions: SUBQ_DECISION_MODELS,
194
194
  credentialNames: SUBQ_DEFAULT_CREDENTIAL_NAMES,
195
195
  browserExecutionSupported: false,
196
196
  endpoint: SUBQ_DECISIONS_ENDPOINT,
197
- supportsImages: (model) => SUBQ_DECISION_MODELS.includes(model),
198
- modelPricing: [{ models: SUBQ_DECISION_MODELS, pricing: { inputPerMillionTokens: 0.04, outputPerMillionTokens: 0 } }],
197
+ supportsImages: (model) => SUBQ_DECISION_MODELS.some(({ value }) => value === model),
198
+ modelPricing: [
199
+ {
200
+ models: SUBQ_DECISION_MODELS.map(({ value }) => value),
201
+ pricing: { inputPerMillionTokens: 0.04, outputPerMillionTokens: 0 },
202
+ },
203
+ ],
199
204
  maxRequestBytes: 13 * 1024 * 1024,
200
205
  checkRequest: assertSubQDecisionLimits,
201
206
  buildRequest: ({ model, state, questions }) => ({
@@ -1,6 +1,9 @@
1
1
  import { systemOneState } from './state.js';
2
- /** https://docs.subq.ai/using-the-api/models/ (verified 2026-10-24). */
3
- export const SUBQ_DECISION_MODELS = ['subq-snap-1.1'];
2
+ /** Default first. https://docs.subq.ai/using-the-api/models/ (verified 2026-11-15). */
3
+ export const SUBQ_DECISION_MODELS = [
4
+ { value: 'subq-snap-1.2', label: 'Snap 1.2', aggregateTokenUsageOnly: true },
5
+ { value: 'subq-snap-1.1', label: 'Snap 1.1 (deprecated)', aggregateTokenUsageOnly: true },
6
+ ];
4
7
  /** SubQ separates images from State and requires typed, bare-base64 objects. */
5
8
  export function subqDecisionState(state) {
6
9
  if (state.kind === 'json')
@@ -10,11 +10,14 @@ import { nodeDefinition } from '../NodeDefinition.js';
10
10
  import { getInputOrData } from '../../utils/inputs.js';
11
11
  import { getNextVariadicPortIndex, parseVariadicPortIndex } from './variadicPortIndex.js';
12
12
  function isEmptyPromptMessage(message) {
13
- // Tool protocol messages remain meaningful even when their textual content is empty.
13
+ // Tool protocol and reasoning-continuity messages remain meaningful without text.
14
14
  if (message.type === 'function') {
15
15
  return false;
16
16
  }
17
- if (message.type === 'assistant' && (message.function_call != null || (message.function_calls?.length ?? 0) > 0)) {
17
+ if (message.type === 'assistant' &&
18
+ (message.function_call != null ||
19
+ (message.function_calls?.length ?? 0) > 0 ||
20
+ (message.openRouterReasoningDetails?.length ?? 0) > 0)) {
18
21
  return false;
19
22
  }
20
23
  const parts = Array.isArray(message.message) ? message.message : [message.message];
@@ -32,7 +35,7 @@ export class AssemblePromptNodeImpl extends NodeImpl {
32
35
  width: 250,
33
36
  },
34
37
  data: {
35
- filterEmptyPrompts: false,
38
+ filterEmptyPrompts: true,
36
39
  },
37
40
  };
38
41
  return chartNode;
@@ -85,6 +88,8 @@ export class AssemblePromptNodeImpl extends NodeImpl {
85
88
  The number of inputs is dynamic based on the number of connections.
86
89
 
87
90
  Strings are converted to User type chat messages.
91
+
92
+ Empty or whitespace-only text messages are filtered by default. Rich content, tool exchanges and reasoning continuity are preserved.
88
93
  `,
89
94
  infoBoxTitle: 'Assemble Prompt Node',
90
95
  contextMenuTitle: 'Assemble Prompt',
@@ -102,8 +107,8 @@ export class AssemblePromptNodeImpl extends NodeImpl {
102
107
  type: 'toggle',
103
108
  label: 'Filter empty prompts',
104
109
  dataKey: 'filterEmptyPrompts',
105
- defaultValue: false,
106
- helperMessage: 'Removes text-only messages whose content is empty or whitespace. Rich-content and tool-protocol messages are preserved.',
110
+ defaultValue: true,
111
+ helperMessage: 'Removes text-only messages whose content is empty or whitespace. Rich content, tool exchanges and reasoning continuity are preserved.',
107
112
  },
108
113
  {
109
114
  type: 'toggle',
@@ -116,7 +121,7 @@ export class AssemblePromptNodeImpl extends NodeImpl {
116
121
  }
117
122
  getBody() {
118
123
  return [
119
- this.data.filterEmptyPrompts ? 'Filter empty prompts: Enabled' : '',
124
+ this.data.filterEmptyPrompts !== false ? 'Filter empty prompts: Enabled' : '',
120
125
  this.data.useIsLastMessageCacheBreakpointInput
121
126
  ? 'Last message cache breakpoint: From input'
122
127
  : this.data.isLastMessageCacheBreakpoint
@@ -135,10 +140,15 @@ export class AssemblePromptNodeImpl extends NodeImpl {
135
140
  if (!inputMessage || inputMessage.type === 'control-flow-excluded' || !inputMessage.value) {
136
141
  continue;
137
142
  }
138
- const inMessages = arrayizeDataValue(unwrapDataValue(inputMessage));
143
+ const value = unwrapDataValue(inputMessage);
144
+ if (value.value == null)
145
+ continue;
146
+ const inMessages = arrayizeDataValue(value);
139
147
  for (const message of inMessages) {
148
+ if (message.value == null)
149
+ continue;
140
150
  const outMessage = message.type === 'chat-message' ? message.value : coerceType(message, 'chat-message');
141
- if (this.data.filterEmptyPrompts && isEmptyPromptMessage(outMessage)) {
151
+ if (this.data.filterEmptyPrompts !== false && isEmptyPromptMessage(outMessage)) {
142
152
  continue;
143
153
  }
144
154
  outMessages.push(outMessage);
@@ -225,7 +225,7 @@ function coerceToChatMessageRaw(value) {
225
225
  'type' in value.value &&
226
226
  'message' in value.value &&
227
227
  typeof value.value.type === 'string' &&
228
- typeof value.value.message === 'string') {
228
+ (typeof value.value.message === 'string' || Array.isArray(value.value.message))) {
229
229
  return value.value;
230
230
  }
231
231
  if (value.type === 'any') {
@@ -11,9 +11,16 @@ export function comparisonNodeIdentity(node, side, identity) {
11
11
  if (!value || typeof value !== 'object' || Array.isArray(value))
12
12
  return value;
13
13
  const record = value;
14
- return typeof record[field] === 'string'
15
- ? { ...record, [field]: comparisonProjectIdentity(record[field], side, identity) }
16
- : value;
14
+ if (typeof record[field] !== 'string')
15
+ return value;
16
+ const result = { ...record, [field]: comparisonProjectIdentity(record[field], side, identity) };
17
+ if (node.type === 'subGraph' &&
18
+ identity.pairs.some((p) => (side === 'before' ? p.beforeProjectId : p.afterProjectId) === record[field])) {
19
+ // Picker scope does not change an already-bound target. Missing version means latest.
20
+ delete result.targetScope;
21
+ result.targetVersion ??= 'latest';
22
+ }
23
+ return result;
17
24
  };
18
25
  return {
19
26
  ...node,
@@ -17,9 +17,19 @@ export function compareProjects(before, after, identity) {
17
17
  beforeProjectId: before.metadata.id,
18
18
  afterProjectId: after.metadata.id,
19
19
  metadataChanged: !areComparisonValuesEqual(identity
20
- ? { ...before.metadata, id: comparisonProjectIdentity(before.metadata.id, 'before', identity), path: undefined }
20
+ ? {
21
+ ...before.metadata,
22
+ id: comparisonProjectIdentity(before.metadata.id, 'before', identity),
23
+ path: undefined,
24
+ title: undefined,
25
+ }
21
26
  : before.metadata, identity
22
- ? { ...after.metadata, id: comparisonProjectIdentity(after.metadata.id, 'after', identity), path: undefined }
27
+ ? {
28
+ ...after.metadata,
29
+ id: comparisonProjectIdentity(after.metadata.id, 'after', identity),
30
+ path: undefined,
31
+ title: undefined,
32
+ }
23
33
  : after.metadata),
24
34
  graphs,
25
35
  nodePrefabs,
@@ -90,3 +90,4 @@ export { WarningsPort } from './utils/symbols.js';
90
90
  import * as openai from './utils/openai.js';
91
91
  export { openai };
92
92
  export * from './model/LatestDebuggerProtocol.js';
93
+ export * from './model/ExecutorSessionProtocol.js';
@@ -236,6 +236,9 @@ export type DatasetRequestMap = {
236
236
  k: number;
237
237
  vector: number[];
238
238
  };
239
+ 'datasets:export-for-project': {
240
+ projectId: ProjectId;
241
+ };
239
242
  };
240
243
  export type IncomingMessage = ProcessEventMessage | GraphUploadAllowedMessage | DatasetRequestMessage;
241
244
  export type OutgoingMessageMap = {
@@ -0,0 +1,56 @@
1
+ /** Hosted executor transport, independent from the managed latest-debugger protocol. */
2
+ export declare const EXECUTOR_SESSION_V2 = "rivet-session-v2";
3
+ export declare const EXECUTOR_RELIABLE_MAX_BYTES: number;
4
+ export declare const EXECUTOR_RELIABLE_SESSION_BYTES: number;
5
+ export declare const EXECUTOR_RELIABLE_PROCESS_BYTES: number;
6
+ export declare const EXECUTOR_RELIABLE_MAX_ITEMS = 4096;
7
+ export declare const EXECUTOR_TRANSFER_TIMEOUT_MS = 60000;
8
+ export declare function executorDeliveryPolicy(message: string): 'reliable' | 'diagnostic';
9
+ export type ExecutorRecoveryReason = 'identity-mismatch' | 'protocol-mismatch' | 'sequence-gap' | 'recovery-deadline' | 'observer-replaced' | 'owner-unavailable' | 'retention-limit' | 'invalid-transfer';
10
+ export declare class ExecutorRecoveryError extends Error {
11
+ readonly reason: ExecutorRecoveryReason;
12
+ constructor(reason: ExecutorRecoveryReason);
13
+ }
14
+ export type ExecutorReliableChunk = {
15
+ id: number;
16
+ index: number;
17
+ count: number;
18
+ bytes: number;
19
+ text: string;
20
+ };
21
+ export type ExecutorBufferBudget = {
22
+ bytes: number;
23
+ maxBytes?: number;
24
+ };
25
+ export type ExecutorRequestPhase = {
26
+ requestId: string;
27
+ phase: 'accepted' | 'running' | 'outputs-ready' | 'settled';
28
+ };
29
+ /** Retains each payload once; replay resets only its cursor. */
30
+ export declare class ExecutorReliableOutbox {
31
+ #private;
32
+ readonly maxBytes: number;
33
+ readonly reservedBytes: number;
34
+ bytes: number;
35
+ constructor(maxBytes?: number, reservedBytes?: number);
36
+ get size(): number;
37
+ add(text: string, order?: number, emergency?: boolean): number;
38
+ acknowledge(id: unknown): boolean;
39
+ replay(): void;
40
+ peekOrder(): number | undefined;
41
+ next(): ExecutorReliableChunk | undefined;
42
+ clear(): void;
43
+ }
44
+ /** Ordered bounded reassembly. Consumed IDs survive transport replacement. */
45
+ export declare class ExecutorReliableInbox {
46
+ #private;
47
+ private readonly onExpiry?;
48
+ private readonly budget?;
49
+ constructor(onExpiry?: (() => void) | undefined, budget?: ExecutorBufferBudget | undefined);
50
+ receive(value: unknown): {
51
+ id: number;
52
+ text?: string;
53
+ } | undefined;
54
+ resetTransfer(): void;
55
+ clear(): void;
56
+ }
@@ -158,7 +158,7 @@ export declare const openaiClassifierProvider: ClassifierProvider;
158
158
  /** https://docs.perplexity.ai/docs/decisions/quickstart */
159
159
  export declare const perplexityClassifierProvider: ClassifierProvider;
160
160
  /** Current model catalog rate, not the older launch article's $0.05/MTok.
161
- * https://docs.subq.ai/using-the-api/models/ (verified 2026-10-24).
161
+ * https://docs.subq.ai/using-the-api/models/ (verified 2026-11-15).
162
162
  */
163
163
  export declare const subqClassifierProvider: ClassifierProvider;
164
164
  /** Native Baseten API reference uses Bearer authentication (not dedicated-deployment Api-Key). */
@@ -1,7 +1,15 @@
1
1
  import type { PreparedClassifierEvaluation } from './providers.js';
2
2
  import { type PreparedClassifierState } from './state.js';
3
- /** https://docs.subq.ai/using-the-api/models/ (verified 2026-10-24). */
4
- export declare const SUBQ_DECISION_MODELS: string[];
3
+ /** Default first. https://docs.subq.ai/using-the-api/models/ (verified 2026-11-15). */
4
+ export declare const SUBQ_DECISION_MODELS: readonly [{
5
+ readonly value: "subq-snap-1.2";
6
+ readonly label: "Snap 1.2";
7
+ readonly aggregateTokenUsageOnly: true;
8
+ }, {
9
+ readonly value: "subq-snap-1.1";
10
+ readonly label: "Snap 1.1 (deprecated)";
11
+ readonly aggregateTokenUsageOnly: true;
12
+ }];
5
13
  /** SubQ separates images from State and requires typed, bare-base64 objects. */
6
14
  export declare function subqDecisionState(state: PreparedClassifierState): Record<string, unknown>;
7
15
  /** Capability failures allow profile fallback without silently dropping/splitting evidence. */
@@ -6,7 +6,7 @@ import type { InternalProcessContext } from '../ProcessContext.js';
6
6
  export type AssemblePromptNode = ChartNode<'assemblePrompt', AssemblePromptNodeData>;
7
7
  export type AssemblePromptNodeData = {
8
8
  computeTokenCount?: boolean;
9
- /** Remove messages that contain no meaningful text or rich content. */
9
+ /** Remove messages without meaningful content. Enabled unless explicitly disabled. */
10
10
  filterEmptyPrompts?: boolean;
11
11
  isLastMessageCacheBreakpoint?: boolean;
12
12
  useIsLastMessageCacheBreakpointInput?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valerypopoff/rivet2-core",
3
- "version": "2.29.0",
3
+ "version": "2.31.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/cjs/bundle.cjs",
6
6
  "module": "dist/esm/index.js",