Skip to content

Commit e4630cd

Browse files
committed
chore(vendor): re-carry patches and adapt src to interchange 4cc6972
Verbatim adoptions of mime/mailbox/harness and workflow-host's narrow subset; types runtime split carried with ledger markers; inference's 9 commits merged with 3-way-resolved carries; storage-isogit e75eee2 verified safe (no first-party sync.request/statePushed/createStatePack/undeploy use); reasoning-effort c8be7e9 adopted; crypto/author/log unchanged. formatSafetyRatingText gains a ledgered compat re-export for the published @corbits/openai-responses dist, which still imports it from @intx/types/runtime.
1 parent 25d3daf commit e4630cd

24 files changed

Lines changed: 1388 additions & 148 deletions

File tree

‎bun.lock‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/VENDORING.md‎

Lines changed: 117 additions & 25 deletions
Large diffs are not rendered by default.

‎src/provider/inference-dependencies.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import {
2-
createDependencies,
3-
type Dependencies,
4-
type AdapterManifest,
5-
} from "@intx/inference";
1+
import { createDependencies, type Dependencies } from "@intx/inference";
62
import { loadAdapterRegistry } from "@intx/inference/providers";
3+
// AdapterManifest moved from the @intx/inference barrel to @intx/types at
4+
// upstream 4cc6972 (the inference barrel no longer re-exports it).
5+
import type { AdapterManifest } from "@intx/types";
76
import * as openaiCompatible from "./openai-compatible-adapter.js";
87
import * as opencodeGo from "./opencode-go-adapter.js";
98
import * as codexResponses from "./codex-responses.js";

‎vendor/intx-agent/PATCHES.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ test files into the new `testing/reactor-waiters.ts` (exported from
2626
`loadErrors` hooks and the FORBIDDEN_DEPS credential-failure companion
2727
suite re-carried onto the new shapes.
2828

29+
### 2026-10-14 re-sync to `4cc6972` (CL-10656, HEAD drift 0.4.0 → base)
30+
31+
All three entries re-carried; none dropped (`loadErrors` and error-seq
32+
resumption still absent upstream in this range). Upstream touched
33+
`agent.ts` (`d1835b` per-send `deliver` options adopted upstream, `660ef8`
34+
signature reflow); `agent.ts` three-way merged cleanly with zero
35+
adaptation — no upstream change intersects the two patch sites. New
36+
upstream files `authoring.ts` (authoring-only subpath barrel) and the
37+
`canonicalize.ts` helpers carried verbatim, with the `./authoring` and
38+
`./canonicalize` subpath exports wired into the vendored `package.json`
39+
(the inert `vendor/intx-workflow-host/workflow-definition-loader.ts` copy
40+
imports `./authoring` at its new pin). Upstream also deleted no vendored
41+
files and changed `testing/` not at all.
42+
2943
## agent-ts-resume-error-seq
3044

3145
`agent.ts` — `createAgent` resumes `errorSeq` from `auditStore.loadErrors`

‎vendor/intx-agent/package.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
"./testing": {
1212
"types": "./src/testing/index.ts",
1313
"default": "./src/testing/index.ts"
14+
},
15+
"./authoring": {
16+
"types": "./src/authoring.ts",
17+
"default": "./src/authoring.ts"
18+
},
19+
"./canonicalize": {
20+
"types": "./src/canonicalize.ts",
21+
"default": "./src/canonicalize.ts"
1422
}
1523
},
1624
"dependencies": {

‎vendor/intx-agent/src/agent.ts‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import type {
6161
ConversationTurn,
6262
InboundMessage,
6363
InferenceSource,
64+
PerCallInferenceOptions,
6465
ReactorDirector,
6566
ToolCall,
6667
ToolDefinition,
@@ -114,6 +115,16 @@ export type SendOptions = {
114115
signal?: AbortSignal;
115116
/** Override the default "from" header on the synthetic inbound message. */
116117
from?: string;
118+
/**
119+
* Inference options for the model calls this send drives. Applies to this
120+
* send alone; a key the director names outright still wins.
121+
*/
122+
inference?: PerCallInferenceOptions;
123+
};
124+
125+
type QueuedSend = {
126+
message: InboundMessage;
127+
inference: PerCallInferenceOptions | undefined;
117128
};
118129

119130
export type SendResult =
@@ -477,7 +488,7 @@ export async function createAgent<EnvReq extends BaseEnv>(
477488
// the language allows; the comment block above is what makes
478489
// the "assigned before any reachable read" invariant explicit.
479490
// eslint-disable-next-line prefer-const -- forward declaration; const cannot express this ordering
480-
let sendQueue: SendQueue<InboundMessage, SendResult>;
491+
let sendQueue: SendQueue<QueuedSend, SendResult>;
481492

482493
// shutdownComplete resolves from the assembly's onShutdown hook
483494
// (composed after audit flush by the assembly) or, as a fallback, from
@@ -770,11 +781,11 @@ export async function createAgent<EnvReq extends BaseEnv>(
770781
...(env.compactors !== undefined ? { compactors: env.compactors } : {}),
771782
});
772783

773-
sendQueue = createSendQueue<InboundMessage, SendResult>({
784+
sendQueue = createSendQueue<QueuedSend, SendResult>({
774785
maxDepth: env.sendQueueMax ?? DEFAULT_SEND_QUEUE_MAX,
775-
start: (message) => {
786+
start: ({ message, inference }) => {
776787
activeCycle = { lastAssistantTurn: undefined };
777-
reactor.deliver(message);
788+
reactor.deliver(message, inference !== undefined ? { inference } : {});
778789
},
779790
});
780791

@@ -813,7 +824,10 @@ export async function createAgent<EnvReq extends BaseEnv>(
813824
// and per the design must fail loud.
814825
if (closed) return Promise.reject(new AgentClosedError());
815826
const message = buildInboundMessage(content, opts);
816-
return sendQueue.enqueue(message, opts?.signal);
827+
return sendQueue.enqueue(
828+
{ message, inference: opts?.inference },
829+
opts?.signal,
830+
);
817831
}
818832

819833
function stream(): AsyncIterable<ReactorEmittedEvent> {

‎vendor/intx-inference/PATCHES.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,51 @@ spot-checks at the recorded positions are unchanged for the same reason
185185
reason now gains an in-tree companion test (added this sync) and is
186186
exercised on the abort paths of `e2e/reactor-approval-acceptance.test.ts`.
187187

188+
### 2026-10-14 re-sync to `4cc6972` (CL-10656, HEAD drift 0.4.0 → base)
189+
190+
Every entry re-carried against the pristine `4cc6972` tree; none dropped as
191+
upstream-absorbed (grep of the pristine tree: `isStreamTerminal`,
192+
`isPollOnlyPendingBatch`, `ephemeralTurns`, `loadErrors`, `turnsRevision`/
193+
`deepFreeze`, `isCommitting`, `MAX_LINE_LENGTH` — all still absent).
194+
Nine upstream commits touch this package (`0f72f95`, `1ff8805`, `a0be30`,
195+
`660ef8`, `d1e05e`, `cb61da`, `d1835b`, `c8be7e`, `2d973a`). Adaptation
196+
surface: 22 upstream-changed files; 9 vendored files carry local content
197+
and were three-way merged (`git merge-file`, ours/base/theirs), the rest
198+
copied verbatim.
199+
200+
- `errors.ts` conflict: upstream `c8be7e` added
201+
`classifyRequestBuildError` between `classifyNetworkError` and the
202+
patched `classifyAbortError(reason?)`; both kept (upstream function
203+
adopted, patch re-carried with its `ClassifiedAbortRaw` type).
204+
- `reactor.ts` two conflicts: (1) `d1835b` added
205+
`mergeInferenceOptions`/`PerCallInferenceOptions` strip-copy beside the
206+
patched `ExtendedInferenceOptions` (`ephemeralTurns`) — both kept; (2)
207+
`d1835b`/`0f72f95` restructured `processDelivery` (per-send `deliver`
208+
options, `deliveredInference` adoption, `expectedFrom` removal) inside
209+
the atomic-acceptance critical section — the upstream adoption block
210+
was re-slit above the patched `disposition` declaration, and the
211+
`reactor-ts-atomic-approval-acceptance` `try/finally` boundary is
212+
intact.
213+
- Clean three-way merges on patched files: `assembly.ts`,
214+
`correlation.ts`, `errors.test.ts`, `harness.ts`, `index.ts`,
215+
`providers/anthropic.ts`, `providers/google-genai.ts`,
216+
`providers/openai.ts`, `reactor.test.ts`; patch hunks carry with zero
217+
adaptation (`providers-ts-openai-exclusive-cache-usage`,
218+
`inference-ts-cl-7783-truncated-tool-call` stop-reason chain verified
219+
against the new `@intx/types` `inference-events.ts` sites and
220+
`providers/anthropic.ts`). The vendored `index.ts` merged with
221+
upstream's barrel: upstream moved the `AdapterManifest` export to
222+
`@intx/types` (`adapter-manifest.ts`); first-party
223+
`src/provider/inference-dependencies.ts` imports it there now.
224+
- `effort.ts`/`effort.test.ts` (`c8be7e` reasoning-effort mapping) and
225+
`manifest.ts`'s new callers (`2d973a` adapter manifest) adopted
226+
verbatim; the vendored `package.json` gains the upstream `./manifest`
227+
and `./default-director` subpath exports.
228+
- Post-merge divergence proof: `bin/vendor-patch-diff` against the
229+
recorded SHA prints the same +/− line multiset as the pre-sync ledger
230+
diff (1324 + / 230 − for this package), i.e. no patch content lost and
231+
no unledgered divergence gained.
232+
188233
## adapter-ts-stream-terminal-detector
189234

190235
`adapter.ts` — Adds `StreamTerminalDetector`/`ProviderAdapter.isStreamTerminal`.

‎vendor/intx-inference/src/assembly.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
type ToolDefinition,
2424
type ToolResultTransform,
2525
type ToolRunner,
26-
} from "@intx/types/runtime";
26+
} from "@intx/types/runtime-core";
2727

2828
import { createAuditCollector, type AuditCollector } from "./audit-collector";
2929
import {

‎vendor/intx-inference/src/correlation.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import type { InboundMessage, PendingOperation } from "@intx/types/runtime";
1111
* Validates whether an inbound message is an authentic response to a
1212
* registered pending operation. Consumers provide this at reactor construction
1313
* time to enforce sender identity and signature checks.
14+
*
15+
* The reactor performs no sender check of its own, so a composition that
16+
* supplies no validator resolves a pending operation for any message bearing a
17+
* registered correlation ID. See MESSAGE.md (Correlation Security).
1418
*/
1519
export interface CorrelationValidator {
1620
/**

‎vendor/intx-inference/src/errors.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { describe, test, expect } from "bun:test";
22
import {
33
classifyHTTPError,
44
classifyNetworkError,
5+
classifyRequestBuildError,
56
classifyAbortError,
67
classifyStreamError,
78
classifyProtocolMismatch,
@@ -82,6 +83,16 @@ describe("classifyNetworkError", () => {
8283
});
8384
});
8485

86+
describe("classifyRequestBuildError", () => {
87+
test("Error instance → fatal with message", () => {
88+
const cause = new Error("set maxTokens above 8192.");
89+
const err = classifyRequestBuildError(cause);
90+
expect(err.category).toBe("fatal");
91+
expect(err.message).toBe("set maxTokens above 8192.");
92+
expect(err.raw).toBe(cause);
93+
});
94+
});
95+
8596
describe("classifyAbortError", () => {
8697
test("always returns aborted category", () => {
8798
const err = classifyAbortError();

0 commit comments

Comments
 (0)