memhtml 0.4.0 → 0.5.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.
- package/dist/{dist-D73gfqLc.mjs → dist-D5DlgqH2.mjs} +226 -50
- package/dist/dist-D5DlgqH2.mjs.map +1 -0
- package/dist/memhtml-mcp.mjs +2 -2
- package/dist/memhtml-mcp.mjs.map +1 -1
- package/dist/memhtml.mjs +2 -2
- package/dist/memhtml.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/dist-D73gfqLc.mjs.map +0 -1
|
@@ -8267,12 +8267,23 @@ const EmbeddingsLive = Layer.effect(Embeddings, Effect.gen(function* () {
|
|
|
8267
8267
|
//#endregion
|
|
8268
8268
|
//#region packages/llm/dist/models.js
|
|
8269
8269
|
/**
|
|
8270
|
-
* The
|
|
8271
|
-
*
|
|
8272
|
-
*
|
|
8273
|
-
*
|
|
8270
|
+
* The models the sleep phases run on, and the wire rules that differ between them.
|
|
8271
|
+
*
|
|
8272
|
+
* Two providers, two call shapes, one decode. The Anthropic lane speaks the native
|
|
8273
|
+
* Messages body with a forced `emit` tool; the OpenAI lane speaks the chat-completions
|
|
8274
|
+
* body with `response_format: {type: "json_schema", strict: true}`. The OpenAI lane
|
|
8275
|
+
* exists for exactly one property the Anthropic lane cannot offer on Bedrock today:
|
|
8276
|
+
* constrained decoding, which makes an off-schema structured answer impossible at
|
|
8277
|
+
* generation time instead of repaired after (probed live 2026-08-22 — the Claude 5
|
|
8278
|
+
* models reject `strict` and `output_config.format` on every Bedrock surface, while
|
|
8279
|
+
* `global.openai.gpt-5.6-sol` honors strict JSON schema on InvokeModel). Both lanes
|
|
8280
|
+
* converge on the same response shape before `decodeToolInput`, so every phase and
|
|
8281
|
+
* every test sees one contract.
|
|
8282
|
+
*/
|
|
8283
|
+
/**
|
|
8284
|
+
* Reasoning effort. The Anthropic lane passes it as `output_config.effort`, the OpenAI
|
|
8285
|
+
* lane as `reasoning_effort`; both accept all four values (sol probed live 2026-08-22).
|
|
8274
8286
|
*/
|
|
8275
|
-
/** Reasoning effort, passed as `output_config.effort`. Accepted by all three models. */
|
|
8276
8287
|
const Effort = Schema.Literals([
|
|
8277
8288
|
"low",
|
|
8278
8289
|
"medium",
|
|
@@ -8282,27 +8293,39 @@ const Effort = Schema.Literals([
|
|
|
8282
8293
|
const ModelKey = Schema.Literals([
|
|
8283
8294
|
"sonnet-5",
|
|
8284
8295
|
"opus-5",
|
|
8285
|
-
"fable-5"
|
|
8296
|
+
"fable-5",
|
|
8297
|
+
"gpt-5.6-sol"
|
|
8286
8298
|
]);
|
|
8287
8299
|
/**
|
|
8288
8300
|
* Bedrock ids use the `global.` inference profiles, which makes them reachable from a
|
|
8289
|
-
* single region without provisioning per-region throughput.
|
|
8301
|
+
* single region without provisioning per-region throughput. The OpenAI models REQUIRE
|
|
8302
|
+
* the profile: the bare `openai.gpt-5.6-*` ids reject on-demand invocation outright
|
|
8303
|
+
* (probed live 2026-08-22).
|
|
8290
8304
|
*/
|
|
8291
8305
|
const MODELS = [
|
|
8292
8306
|
{
|
|
8293
8307
|
key: "sonnet-5",
|
|
8294
8308
|
label: "Claude Sonnet 5",
|
|
8295
|
-
modelId: "global.anthropic.claude-sonnet-5"
|
|
8309
|
+
modelId: "global.anthropic.claude-sonnet-5",
|
|
8310
|
+
provider: "anthropic"
|
|
8296
8311
|
},
|
|
8297
8312
|
{
|
|
8298
8313
|
key: "opus-5",
|
|
8299
8314
|
label: "Claude Opus 5",
|
|
8300
|
-
modelId: "global.anthropic.claude-opus-5"
|
|
8315
|
+
modelId: "global.anthropic.claude-opus-5",
|
|
8316
|
+
provider: "anthropic"
|
|
8301
8317
|
},
|
|
8302
8318
|
{
|
|
8303
8319
|
key: "fable-5",
|
|
8304
8320
|
label: "Claude Fable 5",
|
|
8305
|
-
modelId: "global.anthropic.claude-fable-5"
|
|
8321
|
+
modelId: "global.anthropic.claude-fable-5",
|
|
8322
|
+
provider: "anthropic"
|
|
8323
|
+
},
|
|
8324
|
+
{
|
|
8325
|
+
key: "gpt-5.6-sol",
|
|
8326
|
+
label: "GPT-5.6 Sol",
|
|
8327
|
+
modelId: "global.openai.gpt-5.6-sol",
|
|
8328
|
+
provider: "openai"
|
|
8306
8329
|
}
|
|
8307
8330
|
];
|
|
8308
8331
|
const BY_KEY = new Map(MODELS.map((model) => [model.key, model]));
|
|
@@ -8317,12 +8340,13 @@ const modelByKey = (key) => {
|
|
|
8317
8340
|
return found;
|
|
8318
8341
|
};
|
|
8319
8342
|
/**
|
|
8320
|
-
* The `thinking` object per model. Opus 5 and Fable 5 take `{type: "adaptive"}`
|
|
8321
|
-
* adaptive-only). Sonnet 5 reasons unconditionally and takes NO thinking key.
|
|
8322
|
-
* to Sonnet 5 raises a validation error instead of being ignored.
|
|
8343
|
+
* The `thinking` object per Anthropic model. Opus 5 and Fable 5 take `{type: "adaptive"}`
|
|
8344
|
+
* (Fable is adaptive-only). Sonnet 5 reasons unconditionally and takes NO thinking key.
|
|
8345
|
+
* Sending one to Sonnet 5 raises a validation error instead of being ignored. The OpenAI
|
|
8346
|
+
* lane never consults this: its reasoning dial is `reasoning_effort` alone.
|
|
8323
8347
|
*
|
|
8324
|
-
* Verified live 2026-08-02: all three accept this shape alongside a forced
|
|
8325
|
-
* so structured output and adaptive thinking compose.
|
|
8348
|
+
* Verified live 2026-08-02: all three Claude models accept this shape alongside a forced
|
|
8349
|
+
* `tool_choice`, so structured output and adaptive thinking compose.
|
|
8326
8350
|
*/
|
|
8327
8351
|
const thinkingFor = (key) => key === "opus-5" || key === "fable-5" ? { type: "adaptive" } : null;
|
|
8328
8352
|
|
|
@@ -8337,6 +8361,13 @@ const thinkingFor = (key) => key === "opus-5" || key === "fable-5" ? { type: "ad
|
|
|
8337
8361
|
* default for an omitted field, and no accepted extra key. Downstream code cannot tell a
|
|
8338
8362
|
* coerced object from a real one, and the phases that consume these objects archive and
|
|
8339
8363
|
* rewrite files.
|
|
8364
|
+
*
|
|
8365
|
+
* ONE repair is the exception, because it recovers the payload the model meant rather than
|
|
8366
|
+
* inventing one: a top-level field the schema declares as an array or object sometimes
|
|
8367
|
+
* arrives double-encoded as a JSON STRING. That string is parsed once and the SAME strict
|
|
8368
|
+
* decode re-runs on the result, so nothing an off-schema answer carries can slip through —
|
|
8369
|
+
* a payload the repair cannot make satisfy the schema still fails with the original
|
|
8370
|
+
* violation. See {@link decodeToolInput}.
|
|
8340
8371
|
*/
|
|
8341
8372
|
/** Cap on the raw payload carried on a violation, so a runaway response cannot bloat it. */
|
|
8342
8373
|
const MAX_RAW = 800;
|
|
@@ -8371,6 +8402,50 @@ const preview = (payload) => {
|
|
|
8371
8402
|
})();
|
|
8372
8403
|
return rendered.length <= 800 ? rendered : `${rendered.slice(0, 800)}…`;
|
|
8373
8404
|
};
|
|
8405
|
+
/** True when a property's derived JSON schema declares a container: an array, an object, or a
|
|
8406
|
+
* `$ref` (every hoisted definition is a struct). A string-typed property is NOT a container,
|
|
8407
|
+
* which is what keeps a field that legitimately holds JSON-looking text out of the repair. */
|
|
8408
|
+
const expectsContainer = (property) => {
|
|
8409
|
+
if (typeof property !== "object" || property === null) return false;
|
|
8410
|
+
const record = property;
|
|
8411
|
+
return typeof record.$ref === "string" || record.type === "array" || record.type === "object";
|
|
8412
|
+
};
|
|
8413
|
+
/**
|
|
8414
|
+
* Undo ONE level of JSON-string double-encoding on the top-level fields of a tool payload.
|
|
8415
|
+
*
|
|
8416
|
+
* The shape this repairs was observed on the wire: a field the schema declares as an array
|
|
8417
|
+
* arrives as `"{\"groups\":[…]}"` — the whole answer serialized as a string under its own
|
|
8418
|
+
* key — or as the array itself serialized. So a string sitting where the derived
|
|
8419
|
+
* `input_schema` declares a container is parsed once; when the parsed value is an object
|
|
8420
|
+
* carrying the SAME key, the value at that key is taken, otherwise the parsed value stands.
|
|
8421
|
+
*
|
|
8422
|
+
* Returns `undefined` when there is nothing to repair: no field qualified, or no parse
|
|
8423
|
+
* succeeded. The caller then reports the ORIGINAL violation, and a repaired payload still
|
|
8424
|
+
* re-runs the same strict decode, so this never widens what the schema accepts.
|
|
8425
|
+
*/
|
|
8426
|
+
const unwrapDoubleEncoded = (schema, input) => {
|
|
8427
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) return void 0;
|
|
8428
|
+
const properties = toInputSchema(schema).properties;
|
|
8429
|
+
if (properties === void 0) return void 0;
|
|
8430
|
+
let repairedAField = false;
|
|
8431
|
+
const repaired = {};
|
|
8432
|
+
for (const [key, received] of Object.entries(input)) {
|
|
8433
|
+
repaired[key] = received;
|
|
8434
|
+
if (typeof received !== "string" || !expectsContainer(properties[key])) continue;
|
|
8435
|
+
const parsed = (() => {
|
|
8436
|
+
try {
|
|
8437
|
+
return { value: JSON.parse(received) };
|
|
8438
|
+
} catch {
|
|
8439
|
+
return;
|
|
8440
|
+
}
|
|
8441
|
+
})();
|
|
8442
|
+
if (parsed === void 0) continue;
|
|
8443
|
+
const wrapper = typeof parsed.value === "object" && parsed.value !== null && !Array.isArray(parsed.value) ? parsed.value : void 0;
|
|
8444
|
+
repaired[key] = wrapper !== void 0 && key in wrapper ? wrapper[key] : parsed.value;
|
|
8445
|
+
repairedAField = true;
|
|
8446
|
+
}
|
|
8447
|
+
return repairedAField ? repaired : void 0;
|
|
8448
|
+
};
|
|
8374
8449
|
/**
|
|
8375
8450
|
* Decode a forced-tool payload against its schema.
|
|
8376
8451
|
*
|
|
@@ -8379,13 +8454,29 @@ const preview = (payload) => {
|
|
|
8379
8454
|
* would let a model answer a schema next to the one it was given and have the extra field
|
|
8380
8455
|
* vanish. croq's judge rules out the same drift by enumerating its allowed keys.
|
|
8381
8456
|
*
|
|
8457
|
+
* One failure shape is repaired before the violation is constructed: a top-level container
|
|
8458
|
+
* field double-encoded as a JSON string ({@link unwrapDoubleEncoded}). The repaired payload
|
|
8459
|
+
* goes through the SAME strict decode, and a repair that still does not satisfy the schema
|
|
8460
|
+
* reports the original payload's violation, so the repair cannot mask a genuinely off-schema
|
|
8461
|
+
* answer.
|
|
8462
|
+
*
|
|
8382
8463
|
* `undefined` input means the model produced no `emit` call at all. That is the same class
|
|
8383
8464
|
* of failure as a malformed one, and the reason text names it so a caller can tell the two
|
|
8384
8465
|
* apart in a log without a second error type.
|
|
8385
8466
|
*/
|
|
8386
8467
|
const decodeToolInput = (schema, input) => input === void 0 ? Effect.fail(LlmContractViolation.make({ reason: "model returned no tool_use block for the forced tool" })) : Effect.gen(function* () {
|
|
8387
|
-
const
|
|
8388
|
-
|
|
8468
|
+
const strictDecode = Schema.decodeUnknownEffect(schema, { onExcessProperty: "error" });
|
|
8469
|
+
const decoded = yield* Effect.result(strictDecode(input));
|
|
8470
|
+
if (Result.isSuccess(decoded)) return decoded.success;
|
|
8471
|
+
const repaired = unwrapDoubleEncoded(schema, input);
|
|
8472
|
+
if (repaired !== void 0) {
|
|
8473
|
+
const redecoded = yield* Effect.result(strictDecode(repaired));
|
|
8474
|
+
if (Result.isSuccess(redecoded)) {
|
|
8475
|
+
yield* Effect.logWarning("llm.structured repaired a double-encoded tool field before decoding");
|
|
8476
|
+
return redecoded.success;
|
|
8477
|
+
}
|
|
8478
|
+
}
|
|
8479
|
+
return yield* Effect.fail(LlmContractViolation.make({ reason: `tool payload does not satisfy its schema: ${String(decoded.failure)} (raw: ${preview(input)})` }));
|
|
8389
8480
|
});
|
|
8390
8481
|
|
|
8391
8482
|
//#endregion
|
|
@@ -8397,16 +8488,18 @@ const decodeToolInput = (schema, input) => input === void 0 ? Effect.fail(LlmCon
|
|
|
8397
8488
|
*/
|
|
8398
8489
|
const clampTokens = (requested) => Math.min(requested ?? 16384, MAX_TOKENS_CEILING);
|
|
8399
8490
|
/**
|
|
8400
|
-
* Build the request body. The `tool` argument selects the lane.
|
|
8401
|
-
* answers in prose. When it is present
|
|
8402
|
-
* `emit` call
|
|
8491
|
+
* Build the request body in the model's own dialect. The `tool` argument selects the lane.
|
|
8492
|
+
* When it is absent the model answers in prose. When it is present the request constrains
|
|
8493
|
+
* the model to exactly one schema-shaped answer: a forced `emit` tool call on the
|
|
8494
|
+
* Anthropic dialect, a strict `json_schema` response format on the OpenAI one.
|
|
8403
8495
|
*
|
|
8404
8496
|
* `system` is omitted rather than sent empty, because an empty system block is a distinct
|
|
8405
8497
|
* (and rejected) input from no system block at all. An omitted system also has nothing to cache, so
|
|
8406
8498
|
* `cacheSystem` over an absent or empty system emits no `system` key at all instead of an empty
|
|
8407
8499
|
* cached block.
|
|
8408
8500
|
*/
|
|
8409
|
-
const buildInvokeBody = (key, prompt, options, tool) =>
|
|
8501
|
+
const buildInvokeBody = (key, prompt, options, tool) => modelByKey(key).provider === "openai" ? buildOpenAiBody(prompt, options, tool) : buildAnthropicBody(key, prompt, options, tool);
|
|
8502
|
+
const buildAnthropicBody = (key, prompt, options, tool) => {
|
|
8410
8503
|
const body = {
|
|
8411
8504
|
anthropic_version: ANTHROPIC_VERSION,
|
|
8412
8505
|
max_tokens: clampTokens(options.maxTokens),
|
|
@@ -8437,6 +8530,51 @@ const buildInvokeBody = (key, prompt, options, tool) => {
|
|
|
8437
8530
|
return JSON.stringify(body);
|
|
8438
8531
|
};
|
|
8439
8532
|
/**
|
|
8533
|
+
* The OpenAI chat-completions body (probed live 2026-08-22 against
|
|
8534
|
+
* `global.openai.gpt-5.6-sol` — every field here is one the probe exercised).
|
|
8535
|
+
*
|
|
8536
|
+
* Differences from the Anthropic dialect, each one deliberate:
|
|
8537
|
+
*
|
|
8538
|
+
* - The token budget is `max_completion_tokens` and it bounds reasoning and answer
|
|
8539
|
+
* together, so the same clamp applies. 128k accepted at the ceiling.
|
|
8540
|
+
* - Effort is `reasoning_effort`, taking the same four values.
|
|
8541
|
+
* - `system` rides as a leading `{role: "system"}` message; there is no `system` field.
|
|
8542
|
+
* `cacheSystem` has no OpenAI-side marker — Bedrock reports `cache_write_tokens` in
|
|
8543
|
+
* this dialect's usage without an opt-in field — so the flag is accepted and unused
|
|
8544
|
+
* rather than rejected, keeping the option surface identical across lanes.
|
|
8545
|
+
* - The structured mechanism is `response_format.json_schema` with `strict: true`, named
|
|
8546
|
+
* `emit` so logs read the same across providers. `description` becomes the schema's
|
|
8547
|
+
* own `description`, the closest surface this dialect has to a tool description.
|
|
8548
|
+
*/
|
|
8549
|
+
const buildOpenAiBody = (prompt, options, tool) => {
|
|
8550
|
+
const messages = [];
|
|
8551
|
+
if (options.system !== void 0 && options.system.length > 0) messages.push({
|
|
8552
|
+
role: "system",
|
|
8553
|
+
content: options.system
|
|
8554
|
+
});
|
|
8555
|
+
messages.push({
|
|
8556
|
+
role: "user",
|
|
8557
|
+
content: prompt
|
|
8558
|
+
});
|
|
8559
|
+
const body = {
|
|
8560
|
+
max_completion_tokens: clampTokens(options.maxTokens),
|
|
8561
|
+
messages,
|
|
8562
|
+
reasoning_effort: options.effort
|
|
8563
|
+
};
|
|
8564
|
+
if (tool !== void 0) body.response_format = {
|
|
8565
|
+
type: "json_schema",
|
|
8566
|
+
json_schema: {
|
|
8567
|
+
name: STRUCTURED_TOOL_NAME,
|
|
8568
|
+
strict: true,
|
|
8569
|
+
schema: tool.description === void 0 ? tool.inputSchema : {
|
|
8570
|
+
description: tool.description,
|
|
8571
|
+
...tool.inputSchema
|
|
8572
|
+
}
|
|
8573
|
+
}
|
|
8574
|
+
};
|
|
8575
|
+
return JSON.stringify(body);
|
|
8576
|
+
};
|
|
8577
|
+
/**
|
|
8440
8578
|
* `stop_reason` values that mean the content is not a complete answer. Both become typed
|
|
8441
8579
|
* failures. A response cut off at `max_tokens` may never have reached the point that made
|
|
8442
8580
|
* it a judgment, and a refusal carries no judgment at all. Reading either as a finished
|
|
@@ -8445,6 +8583,55 @@ const buildInvokeBody = (key, prompt, options, tool) => {
|
|
|
8445
8583
|
const INCOMPLETE_STOP_REASONS = /* @__PURE__ */ new Set(["max_tokens", "refusal"]);
|
|
8446
8584
|
/** The parsed payload, read defensively, since every field on the wire is optional. */
|
|
8447
8585
|
const asResponseBody = (payload) => payload ?? {};
|
|
8586
|
+
/**
|
|
8587
|
+
* Fold an OpenAI chat-completions payload into {@link InvokeResponseBody}, so one read
|
|
8588
|
+
* side serves both dialects.
|
|
8589
|
+
*
|
|
8590
|
+
* `finish_reason` maps onto the Anthropic vocabulary this module already gates on:
|
|
8591
|
+
* `length` is `max_tokens` and `content_filter` is `refusal`, both of which
|
|
8592
|
+
* {@link INCOMPLETE_STOP_REASONS} already refuses; everything else passes through as a
|
|
8593
|
+
* complete answer. `structured` says how the caller asked, which decides how the content
|
|
8594
|
+
* is presented: a structured request's content is the schema-constrained JSON, parsed
|
|
8595
|
+
* here and presented as the `emit` tool's input, and a prose request's content is a text
|
|
8596
|
+
* block. Content that fails to parse on the structured path yields NO tool block, which
|
|
8597
|
+
* downstream reports as the existing "no tool_use block" violation — the right class,
|
|
8598
|
+
* since constrained decoding makes that a broken response rather than an off-schema one.
|
|
8599
|
+
*/
|
|
8600
|
+
const normalizeOpenAiResponse = (payload, structured) => {
|
|
8601
|
+
const body = payload ?? {};
|
|
8602
|
+
const choice = body.choices?.[0];
|
|
8603
|
+
const finish = choice?.finish_reason ?? null;
|
|
8604
|
+
const stopReason = finish === "length" ? "max_tokens" : finish === "content_filter" ? "refusal" : finish;
|
|
8605
|
+
const text = choice?.message?.content;
|
|
8606
|
+
const content = [];
|
|
8607
|
+
if (typeof text === "string" && text.length > 0) {
|
|
8608
|
+
if (structured) {
|
|
8609
|
+
const input = (() => {
|
|
8610
|
+
try {
|
|
8611
|
+
return { value: JSON.parse(text) };
|
|
8612
|
+
} catch {
|
|
8613
|
+
return;
|
|
8614
|
+
}
|
|
8615
|
+
})();
|
|
8616
|
+
if (input !== void 0) content.push({
|
|
8617
|
+
type: "tool_use",
|
|
8618
|
+
name: STRUCTURED_TOOL_NAME,
|
|
8619
|
+
input: input.value
|
|
8620
|
+
});
|
|
8621
|
+
} else content.push({
|
|
8622
|
+
type: "text",
|
|
8623
|
+
text
|
|
8624
|
+
});
|
|
8625
|
+
}
|
|
8626
|
+
return {
|
|
8627
|
+
stop_reason: stopReason,
|
|
8628
|
+
content,
|
|
8629
|
+
usage: {
|
|
8630
|
+
...body.usage?.prompt_tokens === void 0 ? {} : { input_tokens: body.usage.prompt_tokens },
|
|
8631
|
+
...body.usage?.completion_tokens === void 0 ? {} : { output_tokens: body.usage.completion_tokens }
|
|
8632
|
+
}
|
|
8633
|
+
};
|
|
8634
|
+
};
|
|
8448
8635
|
/** The incomplete `stop_reason`, or null when the response ran to a natural end. */
|
|
8449
8636
|
const incompleteReason = (parsed) => {
|
|
8450
8637
|
const stop = parsed.stop_reason ?? null;
|
|
@@ -8483,7 +8670,7 @@ const makeModelClient = (client) => {
|
|
|
8483
8670
|
description: tool.description
|
|
8484
8671
|
}));
|
|
8485
8672
|
const finished = yield* Effect.clockWith((clock) => clock.currentTimeMillis);
|
|
8486
|
-
const parsed = asResponseBody(payload);
|
|
8673
|
+
const parsed = model.provider === "openai" ? normalizeOpenAiResponse(payload, tool !== void 0) : asResponseBody(payload);
|
|
8487
8674
|
const incomplete = incompleteReason(parsed);
|
|
8488
8675
|
if (incomplete !== null) return yield* Effect.fail(ModelUnavailable.make({
|
|
8489
8676
|
modelId: model.modelId,
|
|
@@ -9341,7 +9528,16 @@ const datePlusDays = (date, days) => {
|
|
|
9341
9528
|
//#endregion
|
|
9342
9529
|
//#region packages/sleep/dist/env.js
|
|
9343
9530
|
/**
|
|
9344
|
-
* Model assignments per LLM phase
|
|
9531
|
+
* Model assignments per LLM phase.
|
|
9532
|
+
*
|
|
9533
|
+
* Every structured phase names `gpt-5.6-sol`, and the reason is one wire property rather
|
|
9534
|
+
* than a model-quality judgment: its strict `json_schema` mode does constrained decoding
|
|
9535
|
+
* on Bedrock today, so an off-schema answer — including the double-encoded-string shape
|
|
9536
|
+
* that skipped 13 batches in one Claude-5 run (issue #53) — cannot be generated at all.
|
|
9537
|
+
* The Claude 5 models reject `strict` and `output_config.format` on every Bedrock surface
|
|
9538
|
+
* (probed live 2026-08-22), so with them the schema is a request the decode enforces
|
|
9539
|
+
* after the fact, and a violated batch is work lost. When Claude 5 structured outputs
|
|
9540
|
+
* land on Bedrock, re-deciding this map is a quality question again; today it is not.
|
|
9345
9541
|
*
|
|
9346
9542
|
* `trace-consolidation` names `opus-5` and does not thereby choose it. The consolidator is an eve
|
|
9347
9543
|
* agent that pins its own model in `apps/consolidator/agent/agent.ts`, and this map cannot reach that
|
|
@@ -9350,33 +9546,13 @@ const datePlusDays = (date, days) => {
|
|
|
9350
9546
|
* the Bedrock global endpoint, high reasoning effort, no cost ceiling.)
|
|
9351
9547
|
*/
|
|
9352
9548
|
const DEFAULT_MODELS = {
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
* code afterwards. The strong model is spent where prose gets written.
|
|
9359
|
-
*/
|
|
9360
|
-
"dedup-merge": "sonnet-5",
|
|
9361
|
-
/**
|
|
9362
|
-
* Sonnet, and one or two calls a night: the whole of one entity type's name list goes in one call.
|
|
9363
|
-
* The question is a partition over short strings with their evidence inline, not a synthesis, so
|
|
9364
|
-
* the strong model would buy nothing the deterministic floors around the answer do not already
|
|
9365
|
-
* supply.
|
|
9366
|
-
*/
|
|
9367
|
-
"entity-resolution": "sonnet-5",
|
|
9368
|
-
"edge-typing": "sonnet-5",
|
|
9369
|
-
"arc-synthesis": "opus-5",
|
|
9370
|
-
compress: "sonnet-5",
|
|
9549
|
+
"dedup-merge": "gpt-5.6-sol",
|
|
9550
|
+
"entity-resolution": "gpt-5.6-sol",
|
|
9551
|
+
"edge-typing": "gpt-5.6-sol",
|
|
9552
|
+
"arc-synthesis": "gpt-5.6-sol",
|
|
9553
|
+
compress: "gpt-5.6-sol",
|
|
9371
9554
|
"trace-consolidation": "opus-5",
|
|
9372
|
-
|
|
9373
|
-
* Sonnet, for the same reason `dedup-merge` and the edge-typing judge name it: the question is an
|
|
9374
|
-
* extraction over text the model is shown — which of these memories carries an open commitment,
|
|
9375
|
-
* quote the sentence — and every consequence is decided afterwards by code. The sentence has to be
|
|
9376
|
-
* VERBATIM, which is copying rather than composing, and the confidence floor plus the verbatim
|
|
9377
|
-
* check are what a stronger model would otherwise be buying.
|
|
9378
|
-
*/
|
|
9379
|
-
"task-detection": "sonnet-5"
|
|
9555
|
+
"task-detection": "gpt-5.6-sol"
|
|
9380
9556
|
};
|
|
9381
9557
|
/** The model a phase calls: the caller's override, else {@link DEFAULT_MODELS}, else sonnet. */
|
|
9382
9558
|
const modelFor = (deps, phase) => deps.models?.[phase] ?? DEFAULT_MODELS[phase] ?? "sonnet-5";
|
|
@@ -16685,4 +16861,4 @@ const latest = (left, right) => left === null ? right : right === null ? left :
|
|
|
16685
16861
|
|
|
16686
16862
|
//#endregion
|
|
16687
16863
|
export { STATE_DB_PATH as $, IndexRecorder as A, IndexGit as B, ModelClient as C, EmbeddingsLive as D, Embeddings as E, makeRetrieval as F, MIGRATIONS_DIR as G, sanitizeFtsQuery as H, reinforce as I, Store as J, STATE_MIGRATIONS_DIR as K, Indexer as L, persistScanned as M, readWatermark as N, EMBED_DIM as O, Retrieval as P, SLEEP_REPORTS_DIR as Q, makeIndexer as R, runDiscrimination as S, wrapAsData as T, DatabaseService as U, makeGitPort as V, makeDatabase as W, makeStore as X, expandRoot as Y, INDEX_DB_PATH as Z, meta as _, parseSidecar as a, makeGit as at, isSleepPhase as b, generateArtifacts as c, setMeta as ct, allPaths as d, fenceOpeningOf as dt, STATE_SIDECAR_PATH as et, danglingEdges as f, REINFORCE_SIGNALS as ft, link as g, hrefFor as h, makeSleep as i, Git as it, makeIndexRecorder as j, EMBED_WATERMARK as k, DETECTION_PREFIX as l, isValidDatetime as lt, applyHeadEdits as m, scanTraceRoot as n, initRepo as nt, renderSidecar as o, commitSubject as ot, publishRows as p, frameKeyOf as pt, STATE_SCHEMA as q, Sleep as r, readFileOrNull as rt, archivedFormOf as s, checkMemory as st, mergeTailExtract as t, attemptIo as tt, accessRows as u, closesFence as ut, unlink as v, ModelClientLive as w, discriminationGate as x, SLEEP_PHASES as y, readIndexState as z };
|
|
16688
|
-
//# sourceMappingURL=dist-
|
|
16864
|
+
//# sourceMappingURL=dist-D5DlgqH2.mjs.map
|