Skip to content

Commit 6a28715

Browse files
Merge pull request #1431 from corbitsdev/cl-10656-intx-triage-adopt-upstream-head-drift-mimemail
chore(vendor): adopt interchange 4cc6972 drift in vendored trees
2 parents 737c359 + 314fba5 commit 6a28715

121 files changed

Lines changed: 13336 additions & 3768 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎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 & 24 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";

‎src/session/runtime-assembly.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ describe("buildCompactionContinuationMessage", () => {
12181218
expect(message.ref).toEqual({ uid: 0, mailbox: "system" });
12191219
expect(message.headers.from).toBe("user@local");
12201220
expect(message.headers.to).toEqual(["agent@local"]);
1221-
expect(message.headers.messageId.startsWith("compact-continue-")).toBe(
1221+
expect(message.headers.messageId?.startsWith("compact-continue-")).toBe(
12221222
true,
12231223
);
12241224
});
@@ -1251,6 +1251,6 @@ describe("buildMailboxMailMessage", () => {
12511251
expect(message.ref).toEqual({ uid: 0, mailbox: "system" });
12521252
expect(message.headers.from).toBe("user@local");
12531253
expect(message.headers.to).toEqual(["agent@local"]);
1254-
expect(message.headers.messageId.startsWith("mailbox-mail-")).toBe(true);
1254+
expect(message.headers.messageId?.startsWith("mailbox-mail-")).toBe(true);
12551255
});
12561256
});

‎src/tui/queued-input-chrome.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,8 @@ test("mid-run steer paints QUEUED INPUT until the real director reads it", async
718718
deliver: (text, pending, settle) => {
719719
const message = userInboundMessage(text, pending);
720720
const messageId = message.headers.messageId;
721+
if (messageId === undefined)
722+
throw new Error("userInboundMessage set no messageId");
721723
steerMessageId.current = messageId;
722724
bridge.beginQueuedInputDelivery(messageId);
723725
void deliverAgentMessage({

‎src/tui/runner/submit.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ export function createDeliverRouting(
581581
() => targetAgent.deliver(message),
582582
(result) => {
583583
if (result.status === "accepted" && isOperatorMessage) {
584-
state.acceptedInputObserver?.(message.headers.messageId);
584+
state.acceptedInputObserver?.(messageId);
585585
} else if (isOperatorMessage) {
586586
state.discardAcceptedInputObserver?.(messageId);
587587
}

‎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/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ In-process agent runtime built on `createReactorAssembly` from
44
`@intx/inference`. Construct an agent, `send()` it a message,
55
get a reply.
66

7+
Workflow packages can import `defineAgent`, tool and director declarations,
8+
and director registries from `@intx/agent/authoring`. That entry point keeps
9+
the reactor and agent execution runtime out of definition loading.
10+
11+
`@intx/agent/canonicalize` exports `canonicalizeForHash` and
12+
`CanonicalizationError` for deterministic serialization of deploy-hash inputs
13+
without loading the agent execution runtime.
14+
715
Use this package when you want an agent you can drive from inside
816
your own program — a CLI, a worker, a test, an embedded assistant.
917
If you want an agent that lives behind a mailbox instead, see

‎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> {

0 commit comments

Comments
 (0)