Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/server/src/mcp/threadReference.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const here = EnvironmentId.make("environment-here");
const uuid = "5d0b4a3e-8c1f-4a52-9d37-2f6c7e1b9a04";
const mcpThread = ThreadId.make(`mcp:${uuid}`);
const launchThread = ThreadId.make(`mcp:launch:${"be52150e".repeat(8)}`);
const nativeThread = ThreadId.make("7e56b504-8739-4f3f-80e7-298410d87ec0");
const nativeThread = ThreadId.make("3f2e1d0c-9b8a-4c7d-8e6f-5a4b3c2d1e0f");
const deletedThread = ThreadId.make("mcp:0dd09096-12e3-4179-87d5-42fa45c77d5e");
// A deleted mcp: thread whose bare uuid is another, live thread.
const replacedUuid = "29b25a73-a7a7-4321-bef4-2b4eb4386aa8";
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/orchestration-v2/ProviderFailover.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import * as ServerSettings from "../serverSettings.ts";

const now = DateTime.makeUnsafe("2026-11-12T17:10:00Z");
const threadId = ThreadId.make("thread:failover");
const limited = { instanceId: ProviderInstanceId.make("codex_e6f5e4dd"), model: "gpt-5.5" };
const limited = { instanceId: ProviderInstanceId.make("codex_0a1b2c3d"), model: "gpt-5.5" };
const fallback = {
instanceId: ProviderInstanceId.make("claude"),
model: "claude-opus-5-5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import * as Orchestrator from "./Orchestrator.ts";
import * as ProjectionStore from "./ProjectionStore.ts";
import * as QueuedSendCancelNotice from "./QueuedSendCancelNotice.ts";

const recipient = ThreadId.make("mcp:82704295");
const sender = ThreadId.make("4e3f096d");
const recipient = ThreadId.make("mcp:11223344");
const sender = ThreadId.make("5a6b7c8d");
const now = DateTime.makeUnsafe("2026-11-13T01:13:10.000Z");
const instanceId = ProviderInstanceId.make("codex");

Expand Down Expand Up @@ -105,7 +105,7 @@ it.effect("tells the sender once when another thread's agent drops its queued me
assert.equal(notice.commandId, "server:queued-send-cancelled:run:78");
assert.equal(
notice.text,
"Your message to thread mcp:82704295 (run 78, request policy-6fd-review) was not delivered: it was removed from the queue before it started by an agent from thread mcp:82704295. Send it again if it is still needed.",
"Your message to thread mcp:11223344 (run 78, request policy-6fd-review) was not delivered: it was removed from the queue before it started by an agent from thread mcp:11223344. Send it again if it is still needed.",
);

// The sender withdrew it, it was delivered as a steer, or it was a server wake.
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/orchestration-v2/RunStop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ it("labels a restart cancel with the run that continued it", () => {
startedAt: null,
stop: {
reason: "queue_cancelled",
actor: { kind: "agent", sessionId: "ab3aa7f5", threadId: ThreadId.make("mcp:8270") },
actor: { kind: "agent", sessionId: "9c8d7e6f", threadId: ThreadId.make("mcp:1122") },
},
}),
[],
)?.label,
"removed from the queue before it started by an agent (session ab3aa7f5) from thread mcp:8270",
"removed from the queue before it started by an agent (session 9c8d7e6f) from thread mcp:1122",
);
assert.isUndefined(runStopDetail(run(77, { status: "completed" }), []));

Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/orchestration-v2/ThreadStop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ it.effect("a run Stop reached cannot delegate or start a watch, even after it en
});
yield* send(threadId, "queued", "queue_after_active");
const queued = (yield* orchestrator.getThreadProjection(threadId)).runs.at(-1)!;
const caller = { sessionId: "ab3aa7f5", threadId: ThreadId.make("thread:other-agent") };
const caller = { sessionId: "9c8d7e6f", threadId: ThreadId.make("thread:other-agent") };
yield* orchestrator
.dispatch({
type: "queued-run.cancel",
Expand Down
2 changes: 1 addition & 1 deletion docs/jarvis/GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A named ChatGPT assistant, such as Jarvis or Vision.
The connection through which an outside assistant works with T3 on Omarchy.

**work ledger**:
The shared record of work, its owners, progress, blockers, and next actions. Since 2026-11-14 it is kept in the dot-t3code-mcp sidecar (the `ledger` MCP server). T3's own ledger is frozen for work state, except work that needs a server-verified approval, which stays whole there ([0020](decisions/0020-ledger-of-record-is-the-sidecar.md)).
The shared record of work, its owners, progress, blockers, and next actions. Since 2026-11-14 it is kept in the connector sidecar (the `ledger` MCP server). T3's own ledger is frozen for work state, except work that needs a server-verified approval, which stays whole there ([0020](decisions/0020-ledger-of-record-is-the-sidecar.md)).

**work item**:
One outcome tracked in the work ledger under a stable key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Accepted 2026-11-12. Amended 2026-11-14 by [0020](0020-ledger-of-record-is-the-s

## Decision

The work ledger tracks all shared work. Since 2026-11-14 that is the dot-t3code-mcp sidecar (the `ledger` MCP server), except work that needs a server-verified approval, which stays whole on T3's ledger ([0020](0020-ledger-of-record-is-the-sidecar.md)). Before that it was the T3 fork's ledger. The Slack Bugs List mirrors the ledger and has one writer, the F01 thread.
The work ledger tracks all shared work. Since 2026-11-14 that is the connector sidecar (the `ledger` MCP server), except work that needs a server-verified approval, which stays whole on T3's ledger ([0020](0020-ledger-of-record-is-the-sidecar.md)). Before that it was the T3 fork's ledger. The Slack Bugs List mirrors the ledger and has one writer, the F01 thread.

At Chris's request on November 12, the audit owner maintains the [upgrade register](../upgrades.md) as a dated view of approved scope, owners, PRs and status. The ledger and GitHub remain authoritative for current work and PR state. Update the register from those sources; it does not replace them.

Expand Down
2 changes: 1 addition & 1 deletion docs/jarvis/decisions/0007-decisions-in-fork.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Keep decisions with the fork

Accepted 2026-11-12. **Superseded 2026-11-13:** these docs moved to the private dot-t3code-mcp repo, which is now their source of truth, because the fork is public and is being retired. Edit them there first; the fork's `docs/jarvis` is a mirror that serves Jarvis's playbook until the fork retires, and is updated from the connector copy.
Accepted 2026-11-12. **Superseded 2026-11-13:** these docs moved to a private connector repo, which is now their source of truth, because the fork is public and is being retired. Edit them there first; the fork's `docs/jarvis` is a mirror that serves Jarvis's playbook until the fork retires, and is updated from the connector copy.

## Decision

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ledger fields, history and portfolio

Accepted 2026-11-12. Since 2026-11-14 ([0020](0020-ledger-of-record-is-the-sidecar.md)) the ledger is the dot-t3code-mcp sidecar: wait reasons and history carry over, while run metadata and `portfolio_status` apply only to rows on T3's ledger: pre-switch rows, plus the post-switch work that needs a server-verified approval, which stays whole there. Sidecar rows are outside them. Sender provenance does not carry over to the sidecar: its history records `changedBy` from a caller label (`X-Caller`, or `DOT_T3CODE_MCP_CALLER` with the T3 thread id appended over stdio), which is not authenticated, and `changedByClient` is `null` for every entry the sidecar writes itself, which is all post-switch sidecar history. Treat that `changedBy` as a hint, not verified attribution. History imported from the fork at the switch keeps T3's server-recorded `changedByClient`, and so do rows that stay on T3's ledger after the switch, the approval-bearing work in 0020.
Accepted 2026-11-12. Since 2026-11-14 ([0020](0020-ledger-of-record-is-the-sidecar.md)) the ledger is the connector sidecar: wait reasons and history carry over, while run metadata and `portfolio_status` apply only to rows on T3's ledger: pre-switch rows, plus the post-switch work that needs a server-verified approval, which stays whole there. Sidecar rows are outside them. Sender provenance does not carry over to the sidecar: its history records `changedBy` from a caller label (`X-Caller`, or `DOT_T3CODE_MCP_CALLER` with the T3 thread id appended over stdio), which is not authenticated, and `changedByClient` is `null` for every entry the sidecar writes itself, which is all post-switch sidecar history. Treat that `changedBy` as a hint, not verified attribution. History imported from the fork at the switch keeps T3's server-recorded `changedByClient`, and so do rows that stay on T3's ledger after the switch, the approval-bearing work in 0020.

## Decision

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Exit zero; serving 07:37:22; Connect HTTP 200 07:37:57.
`continueThreadsAfterServerUpdate` was unset (default true). No pending approval,
secret or auth requests. Baseline: eight running, 59 queued, all with native references.

Continued once: Claude 2/2, Codex Revotech 4/4, Codex Pro 1/2.
Continued once: Claude 2/2, Codex (work account) 4/4, Codex Pro 1/2.
Seven retained provider, model/options, provider thread and restart notices.
Codex used native empty input; Claude used shared prompts, one with lost-work notes.

Expand Down
2 changes: 1 addition & 1 deletion docs/jarvis/decisions/0014-event-routing-and-hub-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ the residual it leaves is recorded there.

## Amendment, 2026-11-14: real receipt accepted

Chris chose "Accept real receipt" on 2026-11-14 (audit thread 7e56b504, item 7371). A verified real relay replaces the scripted scratch check, and the scratch run is dropped. The receipt is a 2026-11-13 source run that completed, the server-written relay message it produced in the pinned Jarvis inbox, and the inbox run that message started, with the matching event name, source run id and ledger key. Its exact run and message ids are recorded in this ADR in the private connector repo, which is the source of truth for these docs.
Chris chose "Accept real receipt" on 2026-11-14. A verified real relay replaces the scripted scratch check, and the scratch run is dropped. The receipt is a 2026-11-13 source run that completed, the server-written relay message it produced in the pinned Jarvis inbox, and the inbox run that message started, with the matching event name, source run id and ledger key. Its exact run and message ids are recorded in this ADR in the private connector repo, which is the source of truth for these docs.

**What this proves, and what it doesn't.** The chain proves the relay half: a genuine source run, a binding to the pinned inbox, a stored relay message, and a genuine inbox run started by it. Run 250's own reply was the inbox agent's "Queued for Jarvis" acknowledgement. The chain has no Jarvis-side receipt (Jarvis waking on that run's `thread.run.result` and reporting the source run). Chris accepted it as this ADR's acceptance anyway ("Accept real receipt": amend ADR 0014 to count it and close the routing work). The residual stays open separately: the inbox-to-Jarvis wake leg is unproven, and a normal-mode wake test on 2026-11-14 got no Jarvis reply. That is tracked as its own work on the wake path, recorded on the work ledger.
2 changes: 1 addition & 1 deletion docs/jarvis/decisions/0015-server-verified-approvals.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Accepted 2026-11-12. [0016](0016-no-human-in-the-loop.md) adds how intake answers authorize a task; this mechanism still carries every approval from T3 to Jarvis and every money go-ahead.

**Since 2026-11-14 ([0020](0020-ledger-of-record-is-the-sidecar.md)):** work state lives in the dot-t3code-mcp sidecar, except work that needs a server-verified approval. That work stays whole on T3's own ledger, so this mechanism applies unchanged.
**Since 2026-11-14 ([0020](0020-ledger-of-record-is-the-sidecar.md)):** work state lives in the connector sidecar, except work that needs a server-verified approval. That work stays whole on T3's own ledger, so this mechanism applies unchanged.

## Decision

Expand Down
6 changes: 3 additions & 3 deletions docs/jarvis/decisions/0020-ledger-of-record-is-the-sidecar.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# The ledger of record is the dot-t3code-mcp sidecar
# The ledger of record is the connector sidecar

Accepted 2026-11-14. Amends [0003](0003-ledger-and-single-slack-writer.md), [0012](0012-ledger-fields-history-and-portfolio.md) and the rollover playbook (`../COORDINATORS.md`). [0004](0004-approval-authority.md), [0015](0015-server-verified-approvals.md) and [0016](0016-no-human-in-the-loop.md) stay in force, with approvals carried on the fork ledger as below.

## Decision

- **The work ledger lives in this repo's sidecar.** It is the `ledger` MCP server from the private dot-t3code-mcp connector, on Omarchy (`ledger_query`, `ledger_upsert`, `ledger_history`), with its own SQLite database. Agents on Omarchy reach it over stdio. Other machines use the tailnet URL with a bearer token (the connector's `docs/sidecar.md`).
- **The work ledger lives in this repo's sidecar.** It is the `ledger` MCP server from the private connector, on Omarchy (`ledger_query`, `ledger_upsert`, `ledger_history`), with its own SQLite database. Agents on Omarchy reach it over stdio. Other machines use the tailnet URL with a bearer token (the connector's `docs/sidecar.md`).
- **The fork's ledger is frozen for work state**, with one exception (next bullet). After the cutover, status, blockers, next actions, owners and links are written only to the sidecar. The freeze is a rule in the global agent instructions, not new fork code. Reads stay open to recover pre-switch detail.
- **Work that needs a server-verified approval stays whole on T3's ledger for now.** That means a money go-ahead under [0016](0016-no-human-in-the-loop.md), or a grant passed from T3 to Jarvis under [0004](0004-approval-authority.md). Such an item is not migrated: its work state and its approval live together on one T3 row, so [0015](0015-server-verified-approvals.md) applies exactly as written. T3 withdraws the approval itself when the row changes, finishes or is revoked, and an answer is used once. If a sidecar row exists for the same key, its nextAction points at the T3 row and its work state is not edited in both places. These rows are exempt from the freeze and from the reconciliation sweep. Any sidecar-native replacement needs Chris's decision first (tracked in the private connector repo).
- **Jarvis reaches the ledger by asking a T3 thread.** It does not call T3's ledger tools. Agents on a machine without the `ledger` server do the same.
Expand All @@ -21,4 +21,4 @@ Accepted 2026-11-14. Amends [0003](0003-ledger-and-single-slack-writer.md), [001

## Why

Chris chose "Switch now" on 2026-11-14 (audit thread 7e56b504, item 7368). Moving the ledger is the main step toward retiring the fork, and it is reversible: copy sidecar changes made since the cutover back to T3's ledger, then point registrations and the supervisor back at it (`docs/sidecar.md`, "Rollback"). Chris's settled choices rule out a public endpoint or tunnel (tailnet-only Tailscale Serve is fine). Jarvis goes through a T3 thread. Ported approvals would need T3's database or a T3 change, which this repo's rules forbid. Keeping approval-bearing work whole on T3's ledger keeps today's control unchanged, with no new rules, until Chris picks a replacement. The migration is recorded on ledger row `jarvis-t3/fork-exit`.
Chris chose "Switch now" on 2026-11-14. Moving the ledger is the main step toward retiring the fork, and it is reversible: copy sidecar changes made since the cutover back to T3's ledger, then point registrations and the supervisor back at it (`docs/sidecar.md`, "Rollback"). Chris's settled choices rule out a public endpoint or tunnel (tailnet-only Tailscale Serve is fine). Jarvis goes through a T3 thread. Ported approvals would need T3's database or a T3 change, which this repo's rules forbid. Keeping approval-bearing work whole on T3's ledger keeps today's control unchanged, with no new rules, until Chris picks a replacement. The migration is recorded on the fork-exit ledger row.
Loading
Loading