Skip to content

chore: make agent mistakes fail early - #26167

Merged
t3dotgg merged 6 commits into
mainfrom
t3/audit-agent-codebase-effectiveness
Oct 29, 2026
Merged

t3dotgg merged 6 commits into
mainfrom
t3/audit-agent-codebase-effectiveness

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Agents keep making mistakes in this repo that show up only in CI or in review. We audited recent PR reviews and failing CI runs, and fixed each mistake as high up as possible: in code or tooling first, prose last. This PR has the fixes that fit in one small change.

What changes

  1. The pre-commit hook lints and runs knip. Lint was the most common PR CI failure (13 of 40 sampled), but the hook only formatted. It now runs vp lint after vp fmt on staged files, which adds about 1s. When a commit has a JS/TS file, a package.json, or knip.jsonc, it also runs knip:check, the same script CI runs. That adds about 16s, and docs-only commits skip it.
  2. check:changed runs the checks it missed. It ran only the tests beside changed files, so these failed only in CI:
    • AgentContextBudget.test.ts now runs when the server is affected. Its local and CI failure messages say to run the evals for the text before you cut it to fit. Cuts made for size with no eval behind them caused the inline chart regression after #24850, fixed in #25766 and #25776.
    • React Compiler coverage runs only the cases for the changed web and mobile files, in one step. Mobile's checks that read more than one file always run.
    • Vitest steps run one after another. When the lockfile changes, vitest clears its cache on the next run, and two runs that start together race (ENOTEMPTY). The old script failed 2 of 3 runs after a lockfile change. The new one passed 4 of 4.
  3. One copy of the pending-input answer rules. Web and mobile each had their own code to turn question drafts into answers, and the two copies had drifted. The rules are now in @t3tools/client-runtime/state/pending-user-input, taken from mobile's stricter copy. Real input gives the same answers as before: the schema trims option labels, and both UIs store exact option values.

Since the first version, main made two items unnecessary, so I removed them:

  • #26161 replaced the React effect budget with a reason on every effect, so the item that made the budget exact is gone.
  • #26166 kept the test rules in both AGENTS.md and testing.md on purpose and added to them, so the item that moved them out of AGENTS.md is gone.

Proof: a staged file with text-[13px] is now blocked at commit, and so is a new unused file (knip: "Unused files (1)"). With three probe edits (a web try/finally compiler bailout, a deleted mobile file still in KNOWN_BAILOUTS, and a longer MCP tool description), the old check:changed caught none and the new one caught all three. The longer description fails with the eval pointer. On the rebased branch, vp run check:changed passes, and the compiler step runs 12 cases for 8 changed files.

Council review

Rounds: 3 (plan review, then build)

Delegate Round 1 Round 2 Round 3
Claude Opus 5.5 7/10 8.5/10 9.2/10
Muse Wonder Full 7/10 9/10 no score
Codex GPT-6.1 Sol 8.5/10 9.2/10 no score

Round 3 went only to the one reviewer still below 9.

Reviewed with sol-loop: 1 round with GPT-6.1 Sol, plus 1 round on the knip change. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (inside T3 Code).

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Oct 27, 2026
Comment thread scripts/check-changed.ts Resolved
@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c0a1350

Macroscope's review found this PR approvable — This change strengthens early developer checks and shares pending-input answer handling between web and mobile. The changes are bounded to validation tooling and client input preparation, with no material operational or product-default change identified.

You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 27, 2026
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 3c2e477 and fccafa9.

Files selected for processing: 10
  • AGENTS.md
  • apps/mobile/src/features/threads/PendingUserInputCard.tsx
  • apps/mobile/src/lib/threadActivity.test.ts
  • apps/mobile/src/lib/threadActivity.ts
  • apps/web/src/components/chat/ChatComposer.tsx
  • apps/web/src/pendingUserInput.test.ts
  • apps/web/src/pendingUserInput.ts
  • docs/operations/development.md
  • scripts/check-changed.ts
  • vite.config.ts
Files with no reviewable changes: 2
  • apps/mobile/src/lib/threadActivity.test.ts
  • apps/mobile/src/lib/threadActivity.ts
Files skipped from review as they are similar to previous changes: 2
  • docs/operations/development.md
  • AGENTS.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

Pending user-input answer logic is centralized in client-runtime and adopted by web and mobile callers. The changed-file check script adds targeted checks and sequential test execution. Staged-file linting and agent-context-budget guidance are also updated.

Changes: Pending user-input answer handling

Layer / File(s) Summary
Shared answer helpers
packages/client-runtime/src/state/pendingUserInput.ts, packages/client-runtime/src/state/pendingUserInput.test.ts, packages/client-runtime/package.json
Client-runtime adds shared types and helpers for normalizing drafts, resolving answers, updating selections, and building answer maps. Tests cover answer resolution and selection cases. The package exports the new module.
Web and mobile adoption
apps/web/src/pendingUserInput.ts, apps/web/src/pendingUserInput.test.ts, apps/web/src/components/chat/*, apps/mobile/src/lib/threadActivity.ts, apps/mobile/src/lib/threadActivity.test.ts, apps/mobile/src/features/threads/*, apps/mobile/src/state/use-selected-thread-requests.ts
Web progress derivation normalizes selections against the active question and uses shared answer types. Web and mobile callers import shared helpers. The local answer-processing implementations and their related tests are removed.

Changed-file checks and verification guidance

Layer / File(s) Summary
Changed-file check selection and execution
scripts/check-changed.ts, docs/operations/development.md, AGENTS.md
check:changed selects Agent Context Budget coverage when t3 is affected and filtered React Compiler coverage for changed web and mobile source files. Test steps run sequentially. Documentation describes the added checks.
Staged lint and budget guidance
vite.config.ts, .github/workflows/agent-context-budget.yml, apps/server/src/provider/AgentContextBudget.test.ts
The staged-file task runs formatting followed by linting. Agent-context-budget failure messages direct contributors to update the budget and run the referenced evals.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to fccaf

No merge-blocking issue was identified; normal checks remain appropriate.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: catching common agent mistakes earlier through local tooling and checks.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description clearly explains the problems, changes, verification results, affected workflows, and implementation context. It does not use the template headings and does not provide an explicit mai…
Full details: Description check

Explanation

The description clearly explains the problems, changes, verification results, affected workflows, and implementation context. It does not use the template headings and does not provide an explicit maintainer approval link for scope, but it is sufficiently complete and relevant.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB −6 B (−0.1%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.2 KiB −6 B (−0.5%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.6 KiB 21.6 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.1 KiB +6 B (+0.1%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB +6 B (+0.5%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 6d82a22 · PR result: c0a1350 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@t3dotgg
t3dotgg force-pushed the t3/audit-agent-codebase-effectiveness branch from 8ed06f3 to 3c2e477 Compare October 27, 2026 23:09
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 27, 2026 23:09

Dismissing prior approval to re-evaluate 3c2e477

@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Oct 27, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 27, 2026
@t3dotgg
t3dotgg force-pushed the t3/audit-agent-codebase-effectiveness branch from 3c2e477 to fccafa9 Compare October 29, 2026 01:24
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 29, 2026 01:26

Dismissing prior approval to re-evaluate fccafa9

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 29, 2026

@juliusmarminge juliusmarminge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for theo's agent:

Comment thread vite.config.ts Resolved
t3dotgg and others added 6 commits October 29, 2026 01:43
Lint failures were the most common PR CI failure while the hook only
formatted. The hook now runs lint after format on staged files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Web and mobile each had their own rules for turning question drafts into
answers, and the two had drifted. The rules now live in client-runtime,
taken from mobile's stricter copy, and both clients import them directly.
Web's progress helpers use the shared normalizer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The size budget fails when model-facing text grows, and its messages said
to cut text. Cuts with no eval behind them caused the inline chart
regression after #24850. Now that check:changed runs the budget locally,
both messages say to run the evals that cover the text before cutting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@t3dotgg
t3dotgg force-pushed the t3/audit-agent-codebase-effectiveness branch from fccafa9 to c0a1350 Compare October 29, 2026 08:46
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 29, 2026 08:46

Dismissing prior approval to re-evaluate c0a1350

@t3dotgg
t3dotgg merged commit da1eab0 into main Oct 29, 2026
32 of 34 checks passed
@t3dotgg
t3dotgg deleted the t3/audit-agent-codebase-effectiveness branch October 29, 2026 08:51
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…quest, queue and events

Root decision 0210, addendum 3: Buddy, and with it every agent in an
Environment, works with T3's threads as their owner. It reads and summarizes
them, launches, messages, steers and stops them, answers their questions,
decides their permission requests and follows their changes, through `t3
thread`, `t3 request`, `t3 queue` and `t3 events`. Each command is a thin
client of the running server: T3's own MCP tools where one exists, the
person's client surface only where none does.

On v0.1.3 upstream merged its thread tools into action tools (pingdotgg#25423). The
commands keep their surface, sessions, labels and exit codes; only their MCP
calls move: `t3 queue *` calls t3_queue with list, read, edit, cancel,
reorder or promote_to_steer, `t3 request respond` calls t3_pending_request
with respond, and `t3 thread fork` calls t3_thread_transfer with fork. The
tool names are strings the compiler cannot check, so agentCli.test.ts gains a
case that drives every queue action and the fork through the real thread
toolkit; with the old names it and the respond case fail. Upstream's shell
snapshot now takes a query (pingdotgg#24648, pingdotgg#24723) and a WebSocket upgrade names its route
(pingdotgg#24554), so the connection passes an empty query and the test's /ws passes
"rpc". `send --wait` uses Effect.filterOrElse for the new
flatMapConditionalToFilterOrFail diagnostic, and the long header comments are
cut to four lines (pingdotgg#21514).

On v0.1.4: listItemFromShell takes the caller's scope for each thread's link (pingdotgg#26239, pingdotgg#26642), so t3 events passes this Environment's id and its lines carry the same t3-thread:// link as t3 thread list. mcpClientScopes comes from @t3tools/contracts, and the tests stand in for the linked-environment services and server settings that upstream's orchestrator handlers now need (pingdotgg#17129). The fake t3_thread_launch stamps linked callers as upstream's does.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
requestCommand, queueCommand and eventsCommand, which only agentCli.ts
uses, are module-private.

On v0.1.6 upstream adds top-level t3 up and t3 status (pingdotgg#27996); they sit
beside the overlay's t3 thread in binCli.ts. Upstream also keeps config
resolution's logs off standard output for t3 auth --json (pingdotgg#27817): every
agent command prints its result there, so withAgentCliConnection resolves
with quietLogs as well, and a test with an abandoned upload, as upstream's,
checks that t3 thread list --json prints only its one line. t3 thread list
leaves out side chats (pingdotgg#26901) as upstream's list does, and t3 events
--subagents follows delegated threads but no side chat, as that list.

On v0.1.7 effect/Crypto is gone: a decision's command id comes from
effect/crypto/SecureRandom. layerMcpTransport now takes the tool
registrations as its argument, so the live-server test passes them in,
and the tests provide NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
Root decision 0211: an agent asks the person through the question tool, not
only in prose. Codex offers request_user_input in Default mode only with its
feature default_mode_request_user_input; T3 turns it on for the app-servers
it starts for its threads (-c ahead of the launch arguments, so their own -c
or --disable still wins), and every turn's additional context tells the
agent to ask with it. The user's ~/.codex/config.toml is not touched (0161).

Shrunk on v0.1.3: upstream now uses Codex's native collaboration modes
(pingdotgg#24737) and deleted T3's mode texts with buildCodexDeveloperInstructions, so
the overlay's edit of the Default-mode text is gone. Codex's own Default text
keeps the tool for optional questions and asks required ones in plain text,
so the lazurio_questions entry now says explicitly that it overrides the
collaboration mode's instructions on asking. It stays the last entry of
buildCodexAdditionalContext, under upstream's per-entry size cap.
questionTool.test.ts drops the cases on T3's mode texts, checks the override
and that a Default-mode turn carries no developer instructions of T3's own.
Whether Codex follows the override is to be checked on canary.

On v0.1.4: unchanged. The overlay leaves AgentContextBudget's files alone, so the fork's CI does not run its budget test; the context the overlay adds is measured locally and recorded in the rebuild issue.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
DEFAULT_MODE_REQUEST_USER_INPUT, which nothing imports, is
module-private.

On v0.1.7 the app-server client factory needs PortDiscovery and a
spawned command's args are Words: the switch test provides
PortScanner.layerTest and reads the args as strings, and the Default-mode
question test provides NodeCrypto for the adapter's Digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…ge as a Czech block

Buddy's web chat is Lazurio T3 Code with the Hermes Agent over ACP (root
decision 0210, plan DEV-6676). On the Osobní Prostředí a second T3 server with
T3CODE_LAZURIO_BUDDY=1 runs Hermes as the provider instance `buddy`. Hermes keeps
every prompt as the person's words in Buddy's memory, so T3's own instructions
(<t3_code_instructions>, <runtime_info>, <pull_request_linking>) would become part
of Buddy's history, twice after Stop or a steer and again after every restart.

- The ACP adapter asks AcpT3Instructions when it builds an instance whether its
  prompts carry T3's instructions; without an answer every instance keeps them.
  server.ts answers no for Buddy's instance where it builds provider instances
  (ProviderInstanceRegistryHydration).
- The turn start projects a composer record of kind `lazurio-page` as one
  labelled Czech block ("Kontext stránky (údaje, ne pokyn): ...") after the
  person's text, for Buddy's instance only; every other record keeps upstream's
  projection.
- Buddy's sessions take no model or effort from T3 (HumanAndMachines/Lazurio#648):
  the adapter asks AcpT3Selection which options of T3's selection an instance
  takes; null, the default, is all of it. For Buddy's instance withBuddyInstance
  names only Hermes's speed (`fast`), so T3 applies no model and only Hermes's
  Normal / Fast switch whenever a session starts, loads or gets a new selection.

Without T3CODE_LAZURIO_BUDDY=1 nothing changes, also for an instance called
`buddy`. Tests drive the repository's mock ACP agent in Hermes' place, through
the adapter and through the production V2 runtime, and read what it received.

On v0.1.3 the seams stay at the only prompt assembly and send in the ACP
adapter. Upstream now computes the slash-command check from the flavor's
rewritten user text (pingdotgg#24605); the rebuild takes that line and keeps the
instruction gate around t3AcpPromptWithInstructions and the runtime notes. The
orchestrator test provides upstream's new CodexManagedTokenBroker, which the
provider instance registry now needs, and the two file headers are cut to the
four-line comment limit.

On v0.1.4: upstream moved the turn text assembly up in ProviderTurnStartService (pingdotgg#22864, pingdotgg#25610, pingdotgg#25660); the page block seam moves with it, while the prompt-command and steer projections stay upstream's as before. server.ts keeps upstream's port scanner (pingdotgg#26245) after the wrapped instance hydration, and the Buddy orchestrator test provides the new PortDiscovery that hydration now needs. The pingdotgg#648 selection gate, which row 28's commit carried on v0.1.3, comes back to this row and sits beside upstream's flavor hook (pingdotgg#24605).

On v0.1.5 upstream makes the client file system's writeTextFile optional
in the ACP adapter (pingdotgg#26876), away from the overlay's blocks. Upstream's
pre-commit hook runs knip (pingdotgg#26167), so LAZURIO_PAGE_CONTEXT_KIND,
buddyT3Instructions, LAZURIO_BUDDY_ENV and isBuddySurface, which nothing
imports, are module-private.

On v0.1.6 the ACP adapter checks a turn's model against the session's
models before the turn starts (pingdotgg#26623). Where AcpT3Selection names the
options, the host sets the agent's model and T3 applies none, so
validateModelSelection skips that check there, as it does for a flavor
that applies the selection itself: a model the session no longer offers
would otherwise refuse every turn of Buddy's. The V2 adapter test sends
such a model and the turn runs. The adapter test imports upstream's
acpPerTurnPromptUsage beside AcpT3Selection.

On v0.1.7 the ACP adapter filters T3's options through the flavor's own
options and a runtime-mode ceiling (flatMap); the AcpT3Selection gate is
one more early return there, after the flavor's owned options and before
the ceiling. The runtime notes, which upstream now builds from the active
session setup, stay behind sendsT3Instructions. Effect 4.1.2 dropped
effect/Crypto, so the adapter imports Context beside upstream's
SecureRandom, and the Buddy tests provide NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…ds Buddy's thread

budíček wakes Buddy with a message into Buddy's T3 thread (root decision 0210,
plan DEV-6676) and sends it again after a crash. It needs the send to happen once
per wake, to know which thread is Buddy's, and to tell a final refusal from one
worth retrying.

- `t3 thread send --idempotency-key <key>` passes T3 a SHA-256 digest of the key
  with the thread and the sender (T3CODE_ACTING_SENDER and T3CODE_ACTING_FOR of
  the "Buddy za …" trace) as the MCP tool's clientRequestId. T3 derives the
  command and message ids from it within the MCP client's request namespace. A
  decorator where server.ts provides the MCP client authenticator puts the agent
  commands' sessions (label "t3 agent cli") in one namespace, so the same key
  names the same command across commands, sessions and restarts, and T3's
  command receipt runs it once. Every other MCP client keeps upstream's
  namespace.
- After a keyed send the command reads what became of it through
  POST /api/lazurio/agent-cli/send-state (orchestration:read): T3's receipt of
  the key's command and the message it made. A repeat prints the first send's
  result with its commandId; the same key with another message fails with
  `idempotency_conflict` and sends nothing; a key T3 rejected fails with
  `command_rejected` and stays rejected; a repeat T3 cannot replay because it
  checks the thread first (archived since) prints `"delivery": "delivered"`
  with the message's id, run and commandId. The conflict check compares the
  trimmed text, as T3's tool trims the message it decodes. Other failures keep
  their codes and are worth sending again with the same key.
- `POST /api/lazurio/buddy/thread` finds or makes Buddy's one thread: thread
  `buddy` on the instance `buddy` in Buddy's project (~/Lazurio/.agents/buddy),
  made by a fixed command so two first asks make one thread, and brought back if
  it was archived. A thread `buddy` in another project or on another instance
  is never taken: the route answers 409 `thread-conflict`. 404 outside Buddy's
  T3 Code, 409 without Buddy's project. `t3 lazurio buddy thread --json` asks it
  as an agent command.
- `t3 lazurio capabilities` says so with "threadSendIdempotency",
  "threadSendOutcome" and "buddyThread".

The "budíček" label on the message is a claim of the "Buddy za ..." trace and
not part of this change. The end-to-end test runs separate `t3 thread send`
commands against T3's own MCP tool over the production runtime; with the raw
key, without the shared namespace, or without the conflict, rejection or
delivered branches, it fails.

On v0.1.3 the key keeps its place in row 21's `send`: the key is evaluated
first, then the message is sent through `t3_thread_send`, and `--wait` waits
only on the run of that send or of the receipt T3 replays. That replaces the
rebuilt row 21's `Effect.filterOrElse` around the send. Command ids still come
from the MCP client's request namespace and the key (stableCommandId is
unchanged), and `t3_thread_send`'s new `link` field (pingdotgg#24784) is ignored by the
result schema. The namespace decorator's `authenticate` is an `Effect.fn`, as
upstream's McpOAuth.authenticate now is (pingdotgg#25099, effectFnOpportunity is an
error), the Buddy test runtime provides upstream's new CodexManagedTokenBroker,
and the file headers are cut to the four-line comment limit.

On v0.1.4: upstream gives every outside MCP client a web origin for its thread links (pingdotgg#26642); the agent commands' sessions drop it in agentCliRequestScope, so their links stay t3-thread:// links T3 Code's chat opens, as on v0.1.3, and the namespace test asserts both sides. The Buddy test runtime wraps provider hydration with withBuddyInstance as server.ts does (row 23) and provides upstream's new PortDiscovery, and the agent CLI tests provide RemoteDelegation, the peer services and the server settings T3's thread tools now need.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
agentCliRequestScope, which nothing imports, is module-private.

On v0.1.6 upstream's projects carry pinnedAt and archivedAt (pingdotgg#26154), so the
Buddy thread test's project sets both to null.

On v0.1.7 effect/Crypto is gone: the send key hashes with
effect/crypto/Digest (sha256), and the Buddy surface testkit provides
NodeCrypto beside NodeServices. Upstream renamed the MCP client's
webOrigin to hostedAppUrl, so the agent commands' scope strips
hostedAppUrl to keep their thread links `t3-thread://`; any other MCP
client keeps the hosted app link McpOAuth sets. The CLI test checks that
link against McpOAuth's own value, so a rewrite of it fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
… the bubble

Root decision 0210, plan DEV-6676 (row 25). With T3CODE_LAZURIO_BUDDY=1 the web
client is Buddy's surface: a header with Mattyčus, the conversation's days in a
pane where the window has room and a date line above each day's first message,
and no thread list, new thread, fork, rollback or thread details card. `/`
opens Buddy's one thread through the thread route, and a message sent during a
turn steers it; queueing is the explicit alternative. In Buddy's bubble the
surface speaks the frame's side of lazurio.buddy.* v1, written from the
protocol's description: it says it is ready, keeps the last valid page context
from its parent on the host's exact origin, and asks for its window's size from
its header and on Escape, which asks for the panel unless a dialog, menu or
list is open in the surface or something inside stopped the key (the editor
marks every Escape as handled). A day in the pane turns off following the end
first, as the timeline's minimap does, so the jump stays. In the bubble the
surface wears the host page's appearance through T3's own appearance
preference; where T3 cannot wear it (storage blocked, or a saved
single-appearance theme), the document wears T3's standard palette in the
host's appearance (request of 2026-10-25).

The server holds the same for every client and agent. Decorators where
it builds the orchestrator and the checkpoint store refuse forks,
rollbacks, other threads and deleting Buddy's thread, and take no
checkpoints in Buddy's project, which is the managed Folder's
(T3CODE_LAZURIO_FOLDER=<Folder>/.agents/buddy) and else
~/Lazurio/.agents/buddy. A thread.create with Buddy's thread id passes
only while Buddy's thread route makes the thread (MakingBuddysThread),
so a client cannot spend the route's fixed command on a thread of its
own. A startup phase before recovery turns off continuing threads after
an update, the agent browser, and Codex and Claude, once, recorded in
<state>/lazurio/buddy-surface.json so that later choices stay. `GET
/api/lazurio/buddy/days` lists the conversation's days for the pane. The
day lines and the day jump check Buddy mode once per timeline, for the
timeline's own Environment, and the rows read it from the timeline's
shared state, so no other Environment's timeline does that work or takes
a jump.

On v0.1.3 two web seams are rebuilt and one server refusal is added.

- Upstream installs the chat route's shortcuts once at app start (pingdotgg#25366
  removed ChatRouteGlobalShortcuts), so Buddy's condition joins their `when`
  in shortcuts/chatRouteCommands.ts: `isBuddySurfaceNow()` reads the primary
  server config from the app's atom registry when a key is pressed. Without it
  Shift+Mod+N on Buddy's surface would try a new thread that the server then
  refuses.
- The timeline no longer takes onManualNavigation (pingdotgg#25463); the day jump is
  called below the timeline's own navigateTimeline and passes it, and the day
  line sits beside upstream's AudioPreviewUnmountContext (pingdotgg#21363).
- Upstream's guest share of a thread (pingdotgg#24104) is refused in Buddy's T3 Code:
  thread.guest-share.open, .redeem and thread.guest-message.submit fail in the
  command guard, because Buddy's conversation belongs to a Personalspace, which
  is never shared (root decision 0091); closing a share stays possible. The
  root renders no GuestShareDialogHost on Buddy's surface. A test drives a
  guest share of Buddy's thread through the server's orchestrator.

Settings and Usage are modals over the thread now (pingdotgg#24847); the prompt-link
draft stays off Buddy's surface inside the rewritten ChatRouteLayout, and the
first-run gate stays off on NEW's slimmer root. The guards are Effect.fn
decorators (effectFnOpportunity), the two effects of BuddySurface.tsx carry
justified react-effect-budget suppressions, and the file headers are cut to
the four-line comment limit.

Any other thread of Buddy's Environment, opened by a link or a typed address,
leads to Buddy's thread as `/` does: the chat layout shows BuddySurfaceIndex,
which asks the server for Buddy's thread and replaces the address, so that
thread never renders under Buddy's presentation. A thread of another
Environment stays T3's, and ChatView and the thread details ask about the
thread's own Environment. A browser test opens such an address directly.

On v0.1.4: the root keeps upstream's local-Environment switch beside the
Buddy surface check (pingdotgg#26207); the timeline finds upstream's unmatched
pending approvals (pingdotgg#26255) after the day lines and adds the day keys to
upstream's list data next to its new footer. ThreadDetailsPanel no
longer exports its props type (pingdotgg#26238), so Buddy's panel takes
ComponentProps of it, and the effect suppressions use the renamed lint
rule t3code/no-unreasoned-state-sync (pingdotgg#26161). The host appearance,
which row 28's commit carried on v0.1.3, comes back to this row: T3 no
longer re-applies its theme from useTheme's effect (pingdotgg#25007, pingdotgg#25461), so
the stand-in follows every application of T3's saved theme through
subscribeRenderedAppearance, and the theme tests apply T3's stored
appearance as app start does. Upstream's linked Environments
(pingdotgg#16655, pingdotgg#16684, pingdotgg#17129) let a peer read and send into this server's threads; a
Personalspace is never shared (0091), so withoutLinkedEnvironments reads
linkedEnvironmentsEnabled as false in Buddy's T3 Code whatever is
stored, which turns off every upstream gate that reads it (peer-link
OAuth, a linked client's /mcp, outbound links, link requests, remote
tasks). Every settings write through it also stores the switch off, the
startup's Buddy defaults included, so a value stored before Buddy is
read as off and the next settings write through it stores it off (the
settings file's own migration write at load keeps what is stored, which
every read still masks); `t3 environment
link`, which builds its own settings (cli/environment.ts), takes the
same guard, so a command run without T3CODE_LAZURIO_BUDDY reads what
Buddy's server stored.

On v0.1.5 the imports in runtimeLayer.ts and ws.ts sit next to
ScratchThreadPromotion (pingdotgg#26767). Upstream's pre-commit hook runs knip
(pingdotgg#26167), so BUDDY_DAYS_ROUTE, withBuddyDefaults and
buddySurfaceProtocol.ts's constants and helpers that only that file uses
are module-private.

On v0.1.6 a side chat (pingdotgg#26901) renders ChatView embedded, without the
header, the branch restore host or the thread details; Buddy's hidden
header and BuddyThreadDetailsPanel sit inside upstream's new embedded
branches. Buddy's one conversation offers no side chat: sideChatsOffered
is false on Buddy's surface, so neither the panel nor the slash menu offer
one, and a typed /side or /btw gets "Buddy's conversation has no side
chats." as the reason instead of reaching Buddy as text (the server would
refuse its thread.fork anyway). The timeline's day lines sit before
upstream's new set of matched approval requests (pingdotgg#27420).

On v0.1.7: upstream now gives the CLI's settings layer the managed policy
(`ManagedPolicy.layer`). The CLI keeps the Buddy guard around
`ServerSettings.layer` and provides `ManagedPolicy.layer` beside the
secret store and persistence. The startup test provides
`ManagedPolicy.layerTest()` and `NodeCrypto.layer`, which Effect 4.1.2 no
longer brings with `NodeServices.layer`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…r decided a request

Root decision 0210, evening addendum, point 5 (plan DEV-6676, row 27): what
Buddy writes or decides in a thread carries the visible mark „Buddy za <user>“
("Buddy for <user>"). Delegace's wake in Buddy's own thread is not shown at all,
as on Telegram (decided 2026-10-22), so the person sees only Buddy's reply.

Who a session acts as is a claim signed into its token beside the runtime-mode
ceiling (`act`), from a closed set of kinds: buddy with the user's name, or
delegace; budicek is no alias. The agent commands issue their sessions with it
when T3CODE_ACTING_SENDER (with T3CODE_ACTING_FOR and
T3CODE_ACTING_FOR_ACCUSATIVE) names one, and refuse any other value before they
read anything. The server reads it from the session alone: an MCP client's
invocation carries it, the client surface runs a dispatch as its session, and a
decorator of the orchestrator records the message or the request's resolution
in a file per thread in the T3 home, only when its own dispatch committed that
step. A replayed command id, an overlapping dispatch of the same id or a retry
takes no one else's step, and a step's first record stands. The web reads
/api/lazurio/acting-senders. The thread's rows leave out Delegace's wake and
hold an agent's message from outside the thread until the answer covers it,
five seconds at most; a server without the route, or an error, shows the thread
at once as upstream does. Buddy's message and a request Buddy decided show
„Buddy za …“. The person's own steps, T3's messages, automations and other
threads' agents get no mark and never wait. Tests: rejections before
successes, the real CLI against /mcp and the client surface through to the
route the web reads, replays on upstream's own orchestrator, the claim in the
token, and the web's label, parse and loader.

On v0.1.3 three small conflicts are resolved by intent. Upstream computes the
folded agent message's sender label once (pingdotgg#24104) and also reads it out in
the accessible heading (pingdotgg#23780); the overlay wraps that senderLabel in
LazurioActingSenderLabel on the visible fold, which is the one place the
mark goes. McpOAuth's authenticate is upstream's Effect.fn now (pingdotgg#25099), and
the client gets the one actingSender spread line there. EnvironmentAuth keeps
row 20's MCP_CLIENT_SUBJECT export. Upstream's guest attribution (pingdotgg#24104)
is a message-context record of its own and does not mark who acted for a
person, so the overlay's session claim stays. The orchestrator decorator's
dispatch is an Effect.fn (effectFnOpportunity), the two effects that ask
the server's record carry justified react-effect-budget suppressions
(now t3code/no-unreasoned-state-sync), the agent CLI test keeps row 21's
queue and fork case beside this row's cases, and long comments are cut to
the four-line limit.

Buddy's day pane counts the messages the timeline shows: the server's day list
(buddySurfaceDays.ts) leaves out Delegace's wake and an agent's message the
record has not answered yet, by the predicate in actingSenderVisibility.ts,
which the server and the web hold as one identical file that the release
contract test keeps equal. A day that opens with a wake jumps to the person's
first message, and a day of wakes alone is not listed.

On v0.1.4: the acting sender sits beside upstream's peer link (pingdotgg#16695) in the session, its signed claims, the MCP client and its caller, next to upstream's narrowed modes and web origin (pingdotgg#16653, pingdotgg#26642); the test takes mcpClientScopes from contracts, where upstream moved it.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
ACTING_SENDER_NAME_MAX_LENGTH, ClientSurfaceActingSender,
actingSenders.ts's make and ACTING_SENDERS_ROUTE, which nothing imports,
are module-private. actingSenderVisibility.ts must stay the same file on
the server and in the web, and each side uses part of it, so its
functions keep their exports and are @public to knip.

On v0.1.7: upstream renamed the MCP caller's `webOrigin` to
`hostedAppUrl` and sets it in the OAuth authenticator for every client
that is not a peer link. The acting sender rides beside it unchanged. The
auth tests provide `ManagedPolicy.layerTest()`, which `EnvironmentAuth`
now needs, and `NodeCrypto.layer`, which Effect 4.1.2 no longer brings
with `NodeServices.layer`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
The distribution's files on the new base, upstream T3 Code v0.1.7
(322f654), last in the stack: CI, the
CLI archive, release and upstream watch workflows, the image, the issue
form, README, SECURITY.md, the runbook, the overlay spec, the contract
test, the release version check and the rebuild's skill. They are
main's files, made current for v0.1.7 (#172). Main's base
is v0.1.6 (#148); the notes for v0.1.4 to v0.1.6 below are
kept from that rebuild, which brought v0.1.4's and v0.1.5's changes to
main.

On v0.1.4:

- The allowlist gains five files: chat/ThreadServersPanel.tsx, where a
  click on a thread's server opens it in the Environment browser (row 9);
  sidebar/UpdateEverythingDialog.tsx and updateEverything.logic.test.ts,
  for the per-server target and the continuation gate of v0.1.4's update
  dialog (row 4); upstream's installer test install.test.ts, whose fixture
  needs upstream's repository named (row 4); and cli/environment.ts, whose
  settings take Buddy's linked-Environments guard (row 25).
  ServerEnvironment.test.ts keeps the update-check guard (row 4).
- The contract test's pins follow the seams that moved: upstream deleted
  LegacySidebar.tsx (pingdotgg#21039), so the shell slot's column
  head is pinned in the thread sidebar only; the sidebar reads
  useDelegatedUnderParent before the managed check; the empty panel and
  Nová karta carry the workspace focus default; the MCP session issue
  calls mcpClientScopes directly; an agent command's scope drops the
  session's web origin so its thread links stay t3-thread:// links; the
  Buddy composer hook takes only the environment, since v0.1.4's resting
  composer has no strip of its own; the timeline has no paint-only gate
  (pingdotgg#25787); the steer guard returns through
  stopRunForQueuedCommand and also holds a delegated task's completion
  wake; the Servers panel's click opens the Environment browser; and
  Buddy's server settings layer turns linked Environments off.
- Rows 30, 32 and 33, which main carried as commits after row 31, now
  sit in their rows; row 28's addenda are back in rows 7, 23 and 25.
  Upstream renamed the lint rule react-effect-budget to
  t3code/no-unreasoned-state-sync (pingdotgg#26161).
- The skill's inventory groups cover rows 23 to 33.
- Tests, fixtures and docs of rows 9, 10, 21, 23, 25, 26 and 27 name
  only fictional people and hosts (Alena, Bob, example-person,
  vm-0x.example.lazurio.io), since the repository is public.

On v0.1.5:

- CI and the contract test pin v0.1.5 and build 0.1.5-lazurio.0; the
  issue form's version example is 0.1.5-lazurio.1. Node 26.12.1 and pnpm
  12.14.0 are unchanged, so the toolchain pins hold. SECURITY.md's
  upstream section equals the new tag's policy.
- The Linux CLI archive now ships lib/libatomic.so.1 and patchelf sets
  t3's RUNPATH to it (pingdotgg#26912, pingdotgg#26932), so
  lazurio-cli-archives.yml installs patchelf before the build, the way
  upstream's release-desktop.yml does; the contract test pins the order.
- useUpdateEverything.ts leaves the allowlist: row 4 now keeps a
  server's advertised release out of waitForNpm in
  updateEverything.logic.ts (pingdotgg#26917), and the contract
  test pins that seam there. The fixed test gate is unchanged, and every
  gated path exists at v0.1.5.
- The contract test's pairing pins follow the constants that knip made
  module-private (upstream's pre-commit hook runs knip:check since
  pingdotgg#26167).
- The runbook's Overlay table describes every row on v0.1.5, the Cílový
  stack names each row's new commit, the swap step names the workflows
  to disable after the swap from the v0.1.3 base (agent-context-budget.yml,
  mobile-fingerprint-label.yml; v0.1.5 adds none), and stage 3 and the
  skill say to replay with --no-verify and run knip over the finished
  stack.

On v0.1.6:

- CI and the contract test pin v0.1.6 and build 0.1.6-lazurio.0; the
  issue form's version example is 0.1.6-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
- The allowlist is unchanged. Its comments say why ServerEnvironment.ts
  and server.ts offer and build no triage on a Lazurio Environment
  (row 15, #147), why ws.ts runs no ChatGPT handoff there
  and the web starts none through a Lazurio primary (row 18,
  #145), that useComposerSend.ts counts a prompt toward
  upstream's star request (pingdotgg#27832) only outside a Lazurio
  Environment (row 16), and that no update waits on npm since
  pingdotgg#27847 (row 4).
- The contract test pins those seams: the triage guard and its one
  construction, the star prompt's check and its one call, the handoff
  route, reconnectProfile and the web's routing, and on Buddy's surface
  the inline mask over useThreadLifecycle's attentionNow and workNow,
  every line of it (React Compiler, #135), the items'
  counts in useThreadLifecycle.tsx and its one caller, the promise
  ChatView hands Nová karta for a side chat (row 13), and that Buddy's
  surface offers no side chat (row 25). It also follows
  the seams upstream moved: no waitForNpm left in the update dialog's
  logic, the palette's addProjectAction, the sidebar's pickable project
  groups (pingdotgg#26154), and an embedded side chat
  (pingdotgg#26901) without thread tabs, terminal drawers or the
  right panel. Claude's mcp-elicitation requests and the agent scope's
  kill are covered by rows 30 and 8's own tests.
- The runbook's Overlay table describes every row on v0.1.6, the Cílový
  stack names each row's new commit and the files rows 13, 15, 16 and 18
  now change, and the swap step adds mobile-eas-preview-fork.yml to the
  workflows to disable after the swap. The runbook and the skill say to
  address a fix written over the finished stack to the row that added
  the place it changes.

On v0.1.7:

- CI and the contract test pin v0.1.7 and build 0.1.7-lazurio.0; the
  issue form's version example is 0.1.7-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
  v0.1.7 adds no workflow, so the swap step's list is unchanged.
- The allowlist gains toolkits/preview/handlers.ts and its test: since
  v0.1.7 preview_open takes a dev-server target (pingdotgg#28027),
  and upstream's handler answered an open with a target with the
  navigate result alone; row 10 keeps the open answer underneath, so the
  Environment browser's view stays. The fixed test gate is unchanged.
- The contract test follows the seams that moved: the settings writer
  takes the client's patch for the managed policy
  (updateAndPersistSettings, pingdotgg#27197), Hermes's runtime
  notes come from the active session setup, the MCP caller's webOrigin
  is now hostedAppUrl, the steer guard's waitsOnPendingRequest also
  holds a delegated task's question (pingdotgg#29909), and the
  ACP adapter filters T3's options through a flatMap.
- Stage 3's checkout command names the release version check's script
  and test (#165), which the v0.1.6 runbook left out.
- The runbook's Overlay table describes every row on v0.1.7, and the
  Cílový stack names each row's new commit. Main's Cílový stack still
  named older hashes from row 10 on, so the runbook and the skill now say
  to take each row's commit from main's log by subject. The runbook also
  records the Effect 4.1.2 test recipe (NodeCrypto beside NodeServices,
  ManagedPolicy.layerTest()) and that the overlay's settings writes go
  through updateSettingsWith, so the managed policy vets them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
The Admin's decision of 2026-10-17: a page without a T3 session asks its own
origin for a pairing credential (GET /.lazurio/chat/pairing), which the
Launchpad issues with `t3 lazurio pairing` and the operator's scopes (T3's
standard client scopes without relay:write), and exchanges it, so the person
never sees a token and a deep link keeps its place.

On v0.1.3 the row applies cleanly: bootstrapServerAuth keeps its order of
credential sources (only comments changed, pingdotgg#21514), and the scope literals,
AuthStandardClientScopes and sessionHasLegacyPermissions are identical, so
no browser paired on v0.1.2 pairs again. WebSocket tickets now name their
route (pingdotgg#24554), which pairing does not touch. The overlay's comments are cut
to the four-line limit.

On v0.1.4: unchanged.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
OPERATOR_PAIRING_SCOPES and ENVIRONMENT_PAIRING_PATH, which nothing
imports, are module-private.

On v0.1.6 `t3 auth pairing create --json` resolves its config with
quietLogs (pingdotgg#27817), because removing expired attachment uploads logs
to stdout. `t3 lazurio pairing`, which the Launchpad reads the same
way, now does too, so it prints only the token.

On v0.1.7 the crypto services left NodeServices, so the pairing test
provides NodeCrypto beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…quest, queue and events

Root decision 0210, addendum 3: Buddy, and with it every agent in an
Environment, works with T3's threads as their owner. It reads and summarizes
them, launches, messages, steers and stops them, answers their questions,
decides their permission requests and follows their changes, through `t3
thread`, `t3 request`, `t3 queue` and `t3 events`. Each command is a thin
client of the running server: T3's own MCP tools where one exists, the
person's client surface only where none does.

On v0.1.3 upstream merged its thread tools into action tools (pingdotgg#25423). The
commands keep their surface, sessions, labels and exit codes; only their MCP
calls move: `t3 queue *` calls t3_queue with list, read, edit, cancel,
reorder or promote_to_steer, `t3 request respond` calls t3_pending_request
with respond, and `t3 thread fork` calls t3_thread_transfer with fork. The
tool names are strings the compiler cannot check, so agentCli.test.ts gains a
case that drives every queue action and the fork through the real thread
toolkit; with the old names it and the respond case fail. Upstream's shell
snapshot now takes a query (pingdotgg#24648, pingdotgg#24723) and a WebSocket upgrade names its route
(pingdotgg#24554), so the connection passes an empty query and the test's /ws passes
"rpc". `send --wait` uses Effect.filterOrElse for the new
flatMapConditionalToFilterOrFail diagnostic, and the long header comments are
cut to four lines (pingdotgg#21514).

On v0.1.4: listItemFromShell takes the caller's scope for each thread's link (pingdotgg#26239, pingdotgg#26642), so t3 events passes this Environment's id and its lines carry the same t3-thread:// link as t3 thread list. mcpClientScopes comes from @t3tools/contracts, and the tests stand in for the linked-environment services and server settings that upstream's orchestrator handlers now need (pingdotgg#17129). The fake t3_thread_launch stamps linked callers as upstream's does.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
requestCommand, queueCommand and eventsCommand, which only agentCli.ts
uses, are module-private.

On v0.1.6 upstream adds top-level t3 up and t3 status (pingdotgg#27996); they sit
beside the overlay's t3 thread in binCli.ts. Upstream also keeps config
resolution's logs off standard output for t3 auth --json (pingdotgg#27817): every
agent command prints its result there, so withAgentCliConnection resolves
with quietLogs as well, and a test with an abandoned upload, as upstream's,
checks that t3 thread list --json prints only its one line. t3 thread list
leaves out side chats (pingdotgg#26901) as upstream's list does, and t3 events
--subagents follows delegated threads but no side chat, as that list.

On v0.1.7 effect/Crypto is gone: a decision's command id comes from
effect/crypto/SecureRandom. layerMcpTransport now takes the tool
registrations as its argument, so the live-server test passes them in,
and the tests provide NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
Root decision 0211: an agent asks the person through the question tool, not
only in prose. Codex offers request_user_input in Default mode only with its
feature default_mode_request_user_input; T3 turns it on for the app-servers
it starts for its threads (-c ahead of the launch arguments, so their own -c
or --disable still wins), and every turn's additional context tells the
agent to ask with it. The user's ~/.codex/config.toml is not touched (0161).

Shrunk on v0.1.3: upstream now uses Codex's native collaboration modes
(pingdotgg#24737) and deleted T3's mode texts with buildCodexDeveloperInstructions, so
the overlay's edit of the Default-mode text is gone. Codex's own Default text
keeps the tool for optional questions and asks required ones in plain text,
so the lazurio_questions entry now says explicitly that it overrides the
collaboration mode's instructions on asking. It stays the last entry of
buildCodexAdditionalContext, under upstream's per-entry size cap.
questionTool.test.ts drops the cases on T3's mode texts, checks the override
and that a Default-mode turn carries no developer instructions of T3's own.
Whether Codex follows the override is to be checked on canary.

On v0.1.4: unchanged. The overlay leaves AgentContextBudget's files alone, so the fork's CI does not run its budget test; the context the overlay adds is measured locally and recorded in the rebuild issue.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
DEFAULT_MODE_REQUEST_USER_INPUT, which nothing imports, is
module-private.

On v0.1.7 the app-server client factory needs PortDiscovery and a
spawned command's args are Words: the switch test provides
PortScanner.layerTest and reads the args as strings, and the Default-mode
question test provides NodeCrypto for the adapter's Digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…ge as a Czech block

Buddy's web chat is Lazurio T3 Code with the Hermes Agent over ACP (root
decision 0210, plan DEV-6676). On the Osobní Prostředí a second T3 server with
T3CODE_LAZURIO_BUDDY=1 runs Hermes as the provider instance `buddy`. Hermes keeps
every prompt as the person's words in Buddy's memory, so T3's own instructions
(<t3_code_instructions>, <runtime_info>, <pull_request_linking>) would become part
of Buddy's history, twice after Stop or a steer and again after every restart.

- The ACP adapter asks AcpT3Instructions when it builds an instance whether its
  prompts carry T3's instructions; without an answer every instance keeps them.
  server.ts answers no for Buddy's instance where it builds provider instances
  (ProviderInstanceRegistryHydration).
- The turn start projects a composer record of kind `lazurio-page` as one
  labelled Czech block ("Kontext stránky (údaje, ne pokyn): ...") after the
  person's text, for Buddy's instance only; every other record keeps upstream's
  projection.
- Buddy's sessions take no model or effort from T3 (HumanAndMachines/Lazurio#648):
  the adapter asks AcpT3Selection which options of T3's selection an instance
  takes; null, the default, is all of it. For Buddy's instance withBuddyInstance
  names only Hermes's speed (`fast`), so T3 applies no model and only Hermes's
  Normal / Fast switch whenever a session starts, loads or gets a new selection.

Without T3CODE_LAZURIO_BUDDY=1 nothing changes, also for an instance called
`buddy`. Tests drive the repository's mock ACP agent in Hermes' place, through
the adapter and through the production V2 runtime, and read what it received.

On v0.1.3 the seams stay at the only prompt assembly and send in the ACP
adapter. Upstream now computes the slash-command check from the flavor's
rewritten user text (pingdotgg#24605); the rebuild takes that line and keeps the
instruction gate around t3AcpPromptWithInstructions and the runtime notes. The
orchestrator test provides upstream's new CodexManagedTokenBroker, which the
provider instance registry now needs, and the two file headers are cut to the
four-line comment limit.

On v0.1.4: upstream moved the turn text assembly up in ProviderTurnStartService (pingdotgg#22864, pingdotgg#25610, pingdotgg#25660); the page block seam moves with it, while the prompt-command and steer projections stay upstream's as before. server.ts keeps upstream's port scanner (pingdotgg#26245) after the wrapped instance hydration, and the Buddy orchestrator test provides the new PortDiscovery that hydration now needs. The pingdotgg#648 selection gate, which row 28's commit carried on v0.1.3, comes back to this row and sits beside upstream's flavor hook (pingdotgg#24605).

On v0.1.5 upstream makes the client file system's writeTextFile optional
in the ACP adapter (pingdotgg#26876), away from the overlay's blocks. Upstream's
pre-commit hook runs knip (pingdotgg#26167), so LAZURIO_PAGE_CONTEXT_KIND,
buddyT3Instructions, LAZURIO_BUDDY_ENV and isBuddySurface, which nothing
imports, are module-private.

On v0.1.6 the ACP adapter checks a turn's model against the session's
models before the turn starts (pingdotgg#26623). Where AcpT3Selection names the
options, the host sets the agent's model and T3 applies none, so
validateModelSelection skips that check there, as it does for a flavor
that applies the selection itself: a model the session no longer offers
would otherwise refuse every turn of Buddy's. The V2 adapter test sends
such a model and the turn runs. The adapter test imports upstream's
acpPerTurnPromptUsage beside AcpT3Selection.

On v0.1.7 the ACP adapter filters T3's options through the flavor's own
options and a runtime-mode ceiling (flatMap); the AcpT3Selection gate is
one more early return there, after the flavor's owned options and before
the ceiling. The runtime notes, which upstream now builds from the active
session setup, stay behind sendsT3Instructions. Effect 4.1.2 dropped
effect/Crypto, so the adapter imports Context beside upstream's
SecureRandom, and the Buddy tests provide NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…ds Buddy's thread

budíček wakes Buddy with a message into Buddy's T3 thread (root decision 0210,
plan DEV-6676) and sends it again after a crash. It needs the send to happen once
per wake, to know which thread is Buddy's, and to tell a final refusal from one
worth retrying.

- `t3 thread send --idempotency-key <key>` passes T3 a SHA-256 digest of the key
  with the thread and the sender (T3CODE_ACTING_SENDER and T3CODE_ACTING_FOR of
  the "Buddy za …" trace) as the MCP tool's clientRequestId. T3 derives the
  command and message ids from it within the MCP client's request namespace. A
  decorator where server.ts provides the MCP client authenticator puts the agent
  commands' sessions (label "t3 agent cli") in one namespace, so the same key
  names the same command across commands, sessions and restarts, and T3's
  command receipt runs it once. Every other MCP client keeps upstream's
  namespace.
- After a keyed send the command reads what became of it through
  POST /api/lazurio/agent-cli/send-state (orchestration:read): T3's receipt of
  the key's command and the message it made. A repeat prints the first send's
  result with its commandId; the same key with another message fails with
  `idempotency_conflict` and sends nothing; a key T3 rejected fails with
  `command_rejected` and stays rejected; a repeat T3 cannot replay because it
  checks the thread first (archived since) prints `"delivery": "delivered"`
  with the message's id, run and commandId. The conflict check compares the
  trimmed text, as T3's tool trims the message it decodes. Other failures keep
  their codes and are worth sending again with the same key.
- `POST /api/lazurio/buddy/thread` finds or makes Buddy's one thread: thread
  `buddy` on the instance `buddy` in Buddy's project (~/Lazurio/.agents/buddy),
  made by a fixed command so two first asks make one thread, and brought back if
  it was archived. A thread `buddy` in another project or on another instance
  is never taken: the route answers 409 `thread-conflict`. 404 outside Buddy's
  T3 Code, 409 without Buddy's project. `t3 lazurio buddy thread --json` asks it
  as an agent command.
- `t3 lazurio capabilities` says so with "threadSendIdempotency",
  "threadSendOutcome" and "buddyThread".

The "budíček" label on the message is a claim of the "Buddy za ..." trace and
not part of this change. The end-to-end test runs separate `t3 thread send`
commands against T3's own MCP tool over the production runtime; with the raw
key, without the shared namespace, or without the conflict, rejection or
delivered branches, it fails.

On v0.1.3 the key keeps its place in row 21's `send`: the key is evaluated
first, then the message is sent through `t3_thread_send`, and `--wait` waits
only on the run of that send or of the receipt T3 replays. That replaces the
rebuilt row 21's `Effect.filterOrElse` around the send. Command ids still come
from the MCP client's request namespace and the key (stableCommandId is
unchanged), and `t3_thread_send`'s new `link` field (pingdotgg#24784) is ignored by the
result schema. The namespace decorator's `authenticate` is an `Effect.fn`, as
upstream's McpOAuth.authenticate now is (pingdotgg#25099, effectFnOpportunity is an
error), the Buddy test runtime provides upstream's new CodexManagedTokenBroker,
and the file headers are cut to the four-line comment limit.

On v0.1.4: upstream gives every outside MCP client a web origin for its thread links (pingdotgg#26642); the agent commands' sessions drop it in agentCliRequestScope, so their links stay t3-thread:// links T3 Code's chat opens, as on v0.1.3, and the namespace test asserts both sides. The Buddy test runtime wraps provider hydration with withBuddyInstance as server.ts does (row 23) and provides upstream's new PortDiscovery, and the agent CLI tests provide RemoteDelegation, the peer services and the server settings T3's thread tools now need.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
agentCliRequestScope, which nothing imports, is module-private.

On v0.1.6 upstream's projects carry pinnedAt and archivedAt (pingdotgg#26154), so the
Buddy thread test's project sets both to null.

On v0.1.7 effect/Crypto is gone: the send key hashes with
effect/crypto/Digest (sha256), and the Buddy surface testkit provides
NodeCrypto beside NodeServices. Upstream renamed the MCP client's
webOrigin to hostedAppUrl, so the agent commands' scope strips
hostedAppUrl to keep their thread links `t3-thread://`; any other MCP
client keeps the hosted app link McpOAuth sets. The CLI test checks that
link against McpOAuth's own value, so a rewrite of it fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
… the bubble

Root decision 0210, plan DEV-6676 (row 25). With T3CODE_LAZURIO_BUDDY=1 the web
client is Buddy's surface: a header with Mattyčus, the conversation's days in a
pane where the window has room and a date line above each day's first message,
and no thread list, new thread, fork, rollback or thread details card. `/`
opens Buddy's one thread through the thread route, and a message sent during a
turn steers it; queueing is the explicit alternative. In Buddy's bubble the
surface speaks the frame's side of lazurio.buddy.* v1, written from the
protocol's description: it says it is ready, keeps the last valid page context
from its parent on the host's exact origin, and asks for its window's size from
its header and on Escape, which asks for the panel unless a dialog, menu or
list is open in the surface or something inside stopped the key (the editor
marks every Escape as handled). A day in the pane turns off following the end
first, as the timeline's minimap does, so the jump stays. In the bubble the
surface wears the host page's appearance through T3's own appearance
preference; where T3 cannot wear it (storage blocked, or a saved
single-appearance theme), the document wears T3's standard palette in the
host's appearance (request of 2026-10-25).

The server holds the same for every client and agent. Decorators where
it builds the orchestrator and the checkpoint store refuse forks,
rollbacks, other threads and deleting Buddy's thread, and take no
checkpoints in Buddy's project, which is the managed Folder's
(T3CODE_LAZURIO_FOLDER=<Folder>/.agents/buddy) and else
~/Lazurio/.agents/buddy. A thread.create with Buddy's thread id passes
only while Buddy's thread route makes the thread (MakingBuddysThread),
so a client cannot spend the route's fixed command on a thread of its
own. A startup phase before recovery turns off continuing threads after
an update, the agent browser, and Codex and Claude, once, recorded in
<state>/lazurio/buddy-surface.json so that later choices stay. `GET
/api/lazurio/buddy/days` lists the conversation's days for the pane. The
day lines and the day jump check Buddy mode once per timeline, for the
timeline's own Environment, and the rows read it from the timeline's
shared state, so no other Environment's timeline does that work or takes
a jump.

On v0.1.3 two web seams are rebuilt and one server refusal is added.

- Upstream installs the chat route's shortcuts once at app start (pingdotgg#25366
  removed ChatRouteGlobalShortcuts), so Buddy's condition joins their `when`
  in shortcuts/chatRouteCommands.ts: `isBuddySurfaceNow()` reads the primary
  server config from the app's atom registry when a key is pressed. Without it
  Shift+Mod+N on Buddy's surface would try a new thread that the server then
  refuses.
- The timeline no longer takes onManualNavigation (pingdotgg#25463); the day jump is
  called below the timeline's own navigateTimeline and passes it, and the day
  line sits beside upstream's AudioPreviewUnmountContext (pingdotgg#21363).
- Upstream's guest share of a thread (pingdotgg#24104) is refused in Buddy's T3 Code:
  thread.guest-share.open, .redeem and thread.guest-message.submit fail in the
  command guard, because Buddy's conversation belongs to a Personalspace, which
  is never shared (root decision 0091); closing a share stays possible. The
  root renders no GuestShareDialogHost on Buddy's surface. A test drives a
  guest share of Buddy's thread through the server's orchestrator.

Settings and Usage are modals over the thread now (pingdotgg#24847); the prompt-link
draft stays off Buddy's surface inside the rewritten ChatRouteLayout, and the
first-run gate stays off on NEW's slimmer root. The guards are Effect.fn
decorators (effectFnOpportunity), the two effects of BuddySurface.tsx carry
justified react-effect-budget suppressions, and the file headers are cut to
the four-line comment limit.

Any other thread of Buddy's Environment, opened by a link or a typed address,
leads to Buddy's thread as `/` does: the chat layout shows BuddySurfaceIndex,
which asks the server for Buddy's thread and replaces the address, so that
thread never renders under Buddy's presentation. A thread of another
Environment stays T3's, and ChatView and the thread details ask about the
thread's own Environment. A browser test opens such an address directly.

On v0.1.4: the root keeps upstream's local-Environment switch beside the
Buddy surface check (pingdotgg#26207); the timeline finds upstream's unmatched
pending approvals (pingdotgg#26255) after the day lines and adds the day keys to
upstream's list data next to its new footer. ThreadDetailsPanel no
longer exports its props type (pingdotgg#26238), so Buddy's panel takes
ComponentProps of it, and the effect suppressions use the renamed lint
rule t3code/no-unreasoned-state-sync (pingdotgg#26161). The host appearance,
which row 28's commit carried on v0.1.3, comes back to this row: T3 no
longer re-applies its theme from useTheme's effect (pingdotgg#25007, pingdotgg#25461), so
the stand-in follows every application of T3's saved theme through
subscribeRenderedAppearance, and the theme tests apply T3's stored
appearance as app start does. Upstream's linked Environments
(pingdotgg#16655, pingdotgg#16684, pingdotgg#17129) let a peer read and send into this server's threads; a
Personalspace is never shared (0091), so withoutLinkedEnvironments reads
linkedEnvironmentsEnabled as false in Buddy's T3 Code whatever is
stored, which turns off every upstream gate that reads it (peer-link
OAuth, a linked client's /mcp, outbound links, link requests, remote
tasks). Every settings write through it also stores the switch off, the
startup's Buddy defaults included, so a value stored before Buddy is
read as off and the next settings write through it stores it off (the
settings file's own migration write at load keeps what is stored, which
every read still masks); `t3 environment
link`, which builds its own settings (cli/environment.ts), takes the
same guard, so a command run without T3CODE_LAZURIO_BUDDY reads what
Buddy's server stored.

On v0.1.5 the imports in runtimeLayer.ts and ws.ts sit next to
ScratchThreadPromotion (pingdotgg#26767). Upstream's pre-commit hook runs knip
(pingdotgg#26167), so BUDDY_DAYS_ROUTE, withBuddyDefaults and
buddySurfaceProtocol.ts's constants and helpers that only that file uses
are module-private.

On v0.1.6 a side chat (pingdotgg#26901) renders ChatView embedded, without the
header, the branch restore host or the thread details; Buddy's hidden
header and BuddyThreadDetailsPanel sit inside upstream's new embedded
branches. Buddy's one conversation offers no side chat: sideChatsOffered
is false on Buddy's surface, so neither the panel nor the slash menu offer
one, and a typed /side or /btw gets "Buddy's conversation has no side
chats." as the reason instead of reaching Buddy as text (the server would
refuse its thread.fork anyway). The timeline's day lines sit before
upstream's new set of matched approval requests (pingdotgg#27420).

On v0.1.7: upstream now gives the CLI's settings layer the managed policy
(`ManagedPolicy.layer`). The CLI keeps the Buddy guard around
`ServerSettings.layer` and provides `ManagedPolicy.layer` beside the
secret store and persistence. The startup test provides
`ManagedPolicy.layerTest()` and `NodeCrypto.layer`, which Effect 4.1.2 no
longer brings with `NodeServices.layer`. ServerSettingsService on v0.1.7
also carries the managed policy summary (managedPolicy), which clients read
to lock their controls; withoutLinkedEnvironments passes it on, and
buddySurfaceGuards.test.ts fails without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
…r decided a request

Root decision 0210, evening addendum, point 5 (plan DEV-6676, row 27): what
Buddy writes or decides in a thread carries the visible mark „Buddy za <user>“
("Buddy for <user>"). Delegace's wake in Buddy's own thread is not shown at all,
as on Telegram (decided 2026-10-22), so the person sees only Buddy's reply.

Who a session acts as is a claim signed into its token beside the runtime-mode
ceiling (`act`), from a closed set of kinds: buddy with the user's name, or
delegace; budicek is no alias. The agent commands issue their sessions with it
when T3CODE_ACTING_SENDER (with T3CODE_ACTING_FOR and
T3CODE_ACTING_FOR_ACCUSATIVE) names one, and refuse any other value before they
read anything. The server reads it from the session alone: an MCP client's
invocation carries it, the client surface runs a dispatch as its session, and a
decorator of the orchestrator records the message or the request's resolution
in a file per thread in the T3 home, only when its own dispatch committed that
step. A replayed command id, an overlapping dispatch of the same id or a retry
takes no one else's step, and a step's first record stands. The web reads
/api/lazurio/acting-senders. The thread's rows leave out Delegace's wake and
hold an agent's message from outside the thread until the answer covers it,
five seconds at most; a server without the route, or an error, shows the thread
at once as upstream does. Buddy's message and a request Buddy decided show
„Buddy za …“. The person's own steps, T3's messages, automations and other
threads' agents get no mark and never wait. Tests: rejections before
successes, the real CLI against /mcp and the client surface through to the
route the web reads, replays on upstream's own orchestrator, the claim in the
token, and the web's label, parse and loader.

On v0.1.3 three small conflicts are resolved by intent. Upstream computes the
folded agent message's sender label once (pingdotgg#24104) and also reads it out in
the accessible heading (pingdotgg#23780); the overlay wraps that senderLabel in
LazurioActingSenderLabel on the visible fold, which is the one place the
mark goes. McpOAuth's authenticate is upstream's Effect.fn now (pingdotgg#25099), and
the client gets the one actingSender spread line there. EnvironmentAuth keeps
row 20's MCP_CLIENT_SUBJECT export. Upstream's guest attribution (pingdotgg#24104)
is a message-context record of its own and does not mark who acted for a
person, so the overlay's session claim stays. The orchestrator decorator's
dispatch is an Effect.fn (effectFnOpportunity), the two effects that ask
the server's record carry justified react-effect-budget suppressions
(now t3code/no-unreasoned-state-sync), the agent CLI test keeps row 21's
queue and fork case beside this row's cases, and long comments are cut to
the four-line limit.

Buddy's day pane counts the messages the timeline shows: the server's day list
(buddySurfaceDays.ts) leaves out Delegace's wake and an agent's message the
record has not answered yet, by the predicate in actingSenderVisibility.ts,
which the server and the web hold as one identical file that the release
contract test keeps equal. A day that opens with a wake jumps to the person's
first message, and a day of wakes alone is not listed.

On v0.1.4: the acting sender sits beside upstream's peer link (pingdotgg#16695) in the session, its signed claims, the MCP client and its caller, next to upstream's narrowed modes and web origin (pingdotgg#16653, pingdotgg#26642); the test takes mcpClientScopes from contracts, where upstream moved it.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
ACTING_SENDER_NAME_MAX_LENGTH, ClientSurfaceActingSender,
actingSenders.ts's make and ACTING_SENDERS_ROUTE, which nothing imports,
are module-private. actingSenderVisibility.ts must stay the same file on
the server and in the web, and each side uses part of it, so its
functions keep their exports and are @public to knip.

On v0.1.7: upstream renamed the MCP caller's `webOrigin` to
`hostedAppUrl` and sets it in the OAuth authenticator for every client
that is not a peer link. The acting sender rides beside it unchanged. The
auth tests provide `ManagedPolicy.layerTest()`, which `EnvironmentAuth`
now needs, and `NodeCrypto.layer`, which Effect 4.1.2 no longer brings
with `NodeServices.layer`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 4, 2026
The distribution's files on the new base, upstream T3 Code v0.1.7
(322f654), last in the stack: CI, the
CLI archive, release and upstream watch workflows, the image, the issue
form, README, SECURITY.md, the runbook, the overlay spec, the contract
test, the release version check and the rebuild's skill. They are
main's files, made current for v0.1.7 (#172). Main's base
is v0.1.6 (#148); the notes for v0.1.4 to v0.1.6 below are
kept from that rebuild, which brought v0.1.4's and v0.1.5's changes to
main.

On v0.1.4:

- The allowlist gains five files: chat/ThreadServersPanel.tsx, where a
  click on a thread's server opens it in the Environment browser (row 9);
  sidebar/UpdateEverythingDialog.tsx and updateEverything.logic.test.ts,
  for the per-server target and the continuation gate of v0.1.4's update
  dialog (row 4); upstream's installer test install.test.ts, whose fixture
  needs upstream's repository named (row 4); and cli/environment.ts, whose
  settings take Buddy's linked-Environments guard (row 25).
  ServerEnvironment.test.ts keeps the update-check guard (row 4).
- The contract test's pins follow the seams that moved: upstream deleted
  LegacySidebar.tsx (pingdotgg#21039), so the shell slot's column
  head is pinned in the thread sidebar only; the sidebar reads
  useDelegatedUnderParent before the managed check; the empty panel and
  Nová karta carry the workspace focus default; the MCP session issue
  calls mcpClientScopes directly; an agent command's scope drops the
  session's web origin so its thread links stay t3-thread:// links; the
  Buddy composer hook takes only the environment, since v0.1.4's resting
  composer has no strip of its own; the timeline has no paint-only gate
  (pingdotgg#25787); the steer guard returns through
  stopRunForQueuedCommand and also holds a delegated task's completion
  wake; the Servers panel's click opens the Environment browser; and
  Buddy's server settings layer turns linked Environments off.
- Rows 30, 32 and 33, which main carried as commits after row 31, now
  sit in their rows; row 28's addenda are back in rows 7, 23 and 25.
  Upstream renamed the lint rule react-effect-budget to
  t3code/no-unreasoned-state-sync (pingdotgg#26161).
- The skill's inventory groups cover rows 23 to 33.
- Tests, fixtures and docs of rows 9, 10, 21, 23, 25, 26 and 27 name
  only fictional people and hosts (Alena, Bob, example-person,
  vm-0x.example.lazurio.io), since the repository is public.

On v0.1.5:

- CI and the contract test pin v0.1.5 and build 0.1.5-lazurio.0; the
  issue form's version example is 0.1.5-lazurio.1. Node 26.12.1 and pnpm
  12.14.0 are unchanged, so the toolchain pins hold. SECURITY.md's
  upstream section equals the new tag's policy.
- The Linux CLI archive now ships lib/libatomic.so.1 and patchelf sets
  t3's RUNPATH to it (pingdotgg#26912, pingdotgg#26932), so
  lazurio-cli-archives.yml installs patchelf before the build, the way
  upstream's release-desktop.yml does; the contract test pins the order.
- useUpdateEverything.ts leaves the allowlist: row 4 now keeps a
  server's advertised release out of waitForNpm in
  updateEverything.logic.ts (pingdotgg#26917), and the contract
  test pins that seam there. The fixed test gate is unchanged, and every
  gated path exists at v0.1.5.
- The contract test's pairing pins follow the constants that knip made
  module-private (upstream's pre-commit hook runs knip:check since
  pingdotgg#26167).
- The runbook's Overlay table describes every row on v0.1.5, the Cílový
  stack names each row's new commit, the swap step names the workflows
  to disable after the swap from the v0.1.3 base (agent-context-budget.yml,
  mobile-fingerprint-label.yml; v0.1.5 adds none), and stage 3 and the
  skill say to replay with --no-verify and run knip over the finished
  stack.

On v0.1.6:

- CI and the contract test pin v0.1.6 and build 0.1.6-lazurio.0; the
  issue form's version example is 0.1.6-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
- The allowlist is unchanged. Its comments say why ServerEnvironment.ts
  and server.ts offer and build no triage on a Lazurio Environment
  (row 15, #147), why ws.ts runs no ChatGPT handoff there
  and the web starts none through a Lazurio primary (row 18,
  #145), that useComposerSend.ts counts a prompt toward
  upstream's star request (pingdotgg#27832) only outside a Lazurio
  Environment (row 16), and that no update waits on npm since
  pingdotgg#27847 (row 4).
- The contract test pins those seams: the triage guard and its one
  construction, the star prompt's check and its one call, the handoff
  route, reconnectProfile and the web's routing, and on Buddy's surface
  the inline mask over useThreadLifecycle's attentionNow and workNow,
  every line of it (React Compiler, #135), the items'
  counts in useThreadLifecycle.tsx and its one caller, the promise
  ChatView hands Nová karta for a side chat (row 13), and that Buddy's
  surface offers no side chat (row 25). It also follows
  the seams upstream moved: no waitForNpm left in the update dialog's
  logic, the palette's addProjectAction, the sidebar's pickable project
  groups (pingdotgg#26154), and an embedded side chat
  (pingdotgg#26901) without thread tabs, terminal drawers or the
  right panel. Claude's mcp-elicitation requests and the agent scope's
  kill are covered by rows 30 and 8's own tests.
- The runbook's Overlay table describes every row on v0.1.6, the Cílový
  stack names each row's new commit and the files rows 13, 15, 16 and 18
  now change, and the swap step adds mobile-eas-preview-fork.yml to the
  workflows to disable after the swap. The runbook and the skill say to
  address a fix written over the finished stack to the row that added
  the place it changes.

On v0.1.7:

- CI and the contract test pin v0.1.7 and build 0.1.7-lazurio.0; the
  issue form's version example is 0.1.7-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
  v0.1.7 adds no workflow, so the swap step's list is unchanged.
- The allowlist gains toolkits/preview/handlers.ts and its test: since
  v0.1.7 preview_open takes a dev-server target (pingdotgg#28027),
  and upstream's handler answered an open with a target with the
  navigate result alone; row 10 keeps the open answer underneath, so the
  Environment browser's view stays. The fixed test gate is unchanged.
- The contract test follows the seams that moved: the settings writer
  takes the client's patch for the managed policy
  (updateAndPersistSettings, pingdotgg#27197), Hermes's runtime
  notes come from the active session setup, the MCP caller's webOrigin
  is now hostedAppUrl, the steer guard's waitsOnPendingRequest also
  holds a delegated task's question (pingdotgg#29909), and the
  ACP adapter filters T3's options through a flatMap.
- The allowlist gains components/ChatView.logic.ts and its test for
  row 30. The contract test pins that the web keeps auto input auto
  while the run is set up, and that a running update takes the thread
  lock on its provider turn's first report or while a follow-up waits,
  then checks again under the lock.
- Stage 3's checkout command names the release version check's script
  and test (#165), which the v0.1.6 runbook left out.
- The runbook's Overlay table describes every row on v0.1.7, and the
  Cílový stack names each row's new commit. Main's Cílový stack still
  named older hashes from row 10 on, so the runbook and the skill now say
  to take each row's commit from main's log by subject. The runbook also
  records the Effect 4.1.2 test recipe (NodeCrypto beside NodeServices,
  ManagedPolicy.layerTest()) and that the overlay's settings writes go
  through updateSettingsWith, so the managed policy vets them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
The Admin's decision of 2026-10-17: a page without a T3 session asks its own
origin for a pairing credential (GET /.lazurio/chat/pairing), which the
Launchpad issues with `t3 lazurio pairing` and the operator's scopes (T3's
standard client scopes without relay:write), and exchanges it, so the person
never sees a token and a deep link keeps its place.

On v0.1.3 the row applies cleanly: bootstrapServerAuth keeps its order of
credential sources (only comments changed, pingdotgg#21514), and the scope literals,
AuthStandardClientScopes and sessionHasLegacyPermissions are identical, so
no browser paired on v0.1.2 pairs again. WebSocket tickets now name their
route (pingdotgg#24554), which pairing does not touch. The overlay's comments are cut
to the four-line limit.

On v0.1.4: unchanged.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
OPERATOR_PAIRING_SCOPES and ENVIRONMENT_PAIRING_PATH, which nothing
imports, are module-private.

On v0.1.6 `t3 auth pairing create --json` resolves its config with
quietLogs (pingdotgg#27817), because removing expired attachment uploads logs
to stdout. `t3 lazurio pairing`, which the Launchpad reads the same
way, now does too, so it prints only the token.

On v0.1.7 the crypto services left NodeServices, so the pairing test
provides NodeCrypto beside it.

The pairing test gets its auth from the test managed policy as well
(layerAuth in cli.test.ts); with a policy that allows only the desktop
client it fails, so the test reads that policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…quest, queue and events

Root decision 0210, addendum 3: Buddy, and with it every agent in an
Environment, works with T3's threads as their owner. It reads and summarizes
them, launches, messages, steers and stops them, answers their questions,
decides their permission requests and follows their changes, through `t3
thread`, `t3 request`, `t3 queue` and `t3 events`. Each command is a thin
client of the running server: T3's own MCP tools where one exists, the
person's client surface only where none does.

On v0.1.3 upstream merged its thread tools into action tools (pingdotgg#25423). The
commands keep their surface, sessions, labels and exit codes; only their MCP
calls move: `t3 queue *` calls t3_queue with list, read, edit, cancel,
reorder or promote_to_steer, `t3 request respond` calls t3_pending_request
with respond, and `t3 thread fork` calls t3_thread_transfer with fork. The
tool names are strings the compiler cannot check, so agentCli.test.ts gains a
case that drives every queue action and the fork through the real thread
toolkit; with the old names it and the respond case fail. Upstream's shell
snapshot now takes a query (pingdotgg#24648, pingdotgg#24723) and a WebSocket upgrade names its route
(pingdotgg#24554), so the connection passes an empty query and the test's /ws passes
"rpc". `send --wait` uses Effect.filterOrElse for the new
flatMapConditionalToFilterOrFail diagnostic, and the long header comments are
cut to four lines (pingdotgg#21514).

On v0.1.4: listItemFromShell takes the caller's scope for each thread's link (pingdotgg#26239, pingdotgg#26642), so t3 events passes this Environment's id and its lines carry the same t3-thread:// link as t3 thread list. mcpClientScopes comes from @t3tools/contracts, and the tests stand in for the linked-environment services and server settings that upstream's orchestrator handlers now need (pingdotgg#17129). The fake t3_thread_launch stamps linked callers as upstream's does.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
requestCommand, queueCommand and eventsCommand, which only agentCli.ts
uses, are module-private.

On v0.1.6 upstream adds top-level t3 up and t3 status (pingdotgg#27996); they sit
beside the overlay's t3 thread in binCli.ts. Upstream also keeps config
resolution's logs off standard output for t3 auth --json (pingdotgg#27817): every
agent command prints its result there, so withAgentCliConnection resolves
with quietLogs as well, and a test with an abandoned upload, as upstream's,
checks that t3 thread list --json prints only its one line. t3 thread list
leaves out side chats (pingdotgg#26901) as upstream's list does, and t3 events
--subagents follows delegated threads but no side chat, as that list.

On v0.1.7 effect/Crypto is gone: a decision's command id comes from
effect/crypto/SecureRandom. layerMcpTransport now takes the tool
registrations as its argument, so the live-server test passes them in,
and the tests provide NodeCrypto beside NodeServices.

The live-server test and the sessions check build auth on
ManagedPolicy.layerTest() in place of EnvironmentAuth.layerRuntime, which
reads the host's policy file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
Root decision 0211: an agent asks the person through the question tool, not
only in prose. Codex offers request_user_input in Default mode only with its
feature default_mode_request_user_input; T3 turns it on for the app-servers
it starts for its threads (-c ahead of the launch arguments, so their own -c
or --disable still wins), and every turn's additional context tells the
agent to ask with it. The user's ~/.codex/config.toml is not touched (0161).

Shrunk on v0.1.3: upstream now uses Codex's native collaboration modes
(pingdotgg#24737) and deleted T3's mode texts with buildCodexDeveloperInstructions, so
the overlay's edit of the Default-mode text is gone. Codex's own Default text
keeps the tool for optional questions and asks required ones in plain text,
so the lazurio_questions entry now says explicitly that it overrides the
collaboration mode's instructions on asking. It stays the last entry of
buildCodexAdditionalContext, under upstream's per-entry size cap.
questionTool.test.ts drops the cases on T3's mode texts, checks the override
and that a Default-mode turn carries no developer instructions of T3's own.
Whether Codex follows the override is to be checked on canary.

On v0.1.4: unchanged. The overlay leaves AgentContextBudget's files alone, so the fork's CI does not run its budget test; the context the overlay adds is measured locally and recorded in the rebuild issue.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
DEFAULT_MODE_REQUEST_USER_INPUT, which nothing imports, is
module-private.

On v0.1.7 the app-server client factory needs PortDiscovery and a
spawned command's args are Words: the switch test provides
PortScanner.layerTest and reads the args as strings, and the Default-mode
question test provides NodeCrypto for the adapter's Digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…ge as a Czech block

Buddy's web chat is Lazurio T3 Code with the Hermes Agent over ACP (root
decision 0210, plan DEV-6676). On the Osobní Prostředí a second T3 server with
T3CODE_LAZURIO_BUDDY=1 runs Hermes as the provider instance `buddy`. Hermes keeps
every prompt as the person's words in Buddy's memory, so T3's own instructions
(<t3_code_instructions>, <runtime_info>, <pull_request_linking>) would become part
of Buddy's history, twice after Stop or a steer and again after every restart.

- The ACP adapter asks AcpT3Instructions when it builds an instance whether its
  prompts carry T3's instructions; without an answer every instance keeps them.
  server.ts answers no for Buddy's instance where it builds provider instances
  (ProviderInstanceRegistryHydration).
- The turn start projects a composer record of kind `lazurio-page` as one
  labelled Czech block ("Kontext stránky (údaje, ne pokyn): ...") after the
  person's text, for Buddy's instance only; every other record keeps upstream's
  projection.
- Buddy's sessions take no model or effort from T3 (HumanAndMachines/Lazurio#648):
  the adapter asks AcpT3Selection which options of T3's selection an instance
  takes; null, the default, is all of it. For Buddy's instance withBuddyInstance
  names only Hermes's speed (`fast`), so T3 applies no model and only Hermes's
  Normal / Fast switch whenever a session starts, loads or gets a new selection.

Without T3CODE_LAZURIO_BUDDY=1 nothing changes, also for an instance called
`buddy`. Tests drive the repository's mock ACP agent in Hermes' place, through
the adapter and through the production V2 runtime, and read what it received.

On v0.1.3 the seams stay at the only prompt assembly and send in the ACP
adapter. Upstream now computes the slash-command check from the flavor's
rewritten user text (pingdotgg#24605); the rebuild takes that line and keeps the
instruction gate around t3AcpPromptWithInstructions and the runtime notes. The
orchestrator test provides upstream's new CodexManagedTokenBroker, which the
provider instance registry now needs, and the two file headers are cut to the
four-line comment limit.

On v0.1.4: upstream moved the turn text assembly up in ProviderTurnStartService (pingdotgg#22864, pingdotgg#25610, pingdotgg#25660); the page block seam moves with it, while the prompt-command and steer projections stay upstream's as before. server.ts keeps upstream's port scanner (pingdotgg#26245) after the wrapped instance hydration, and the Buddy orchestrator test provides the new PortDiscovery that hydration now needs. The pingdotgg#648 selection gate, which row 28's commit carried on v0.1.3, comes back to this row and sits beside upstream's flavor hook (pingdotgg#24605).

On v0.1.5 upstream makes the client file system's writeTextFile optional
in the ACP adapter (pingdotgg#26876), away from the overlay's blocks. Upstream's
pre-commit hook runs knip (pingdotgg#26167), so LAZURIO_PAGE_CONTEXT_KIND,
buddyT3Instructions, LAZURIO_BUDDY_ENV and isBuddySurface, which nothing
imports, are module-private.

On v0.1.6 the ACP adapter checks a turn's model against the session's
models before the turn starts (pingdotgg#26623). Where AcpT3Selection names the
options, the host sets the agent's model and T3 applies none, so
validateModelSelection skips that check there, as it does for a flavor
that applies the selection itself: a model the session no longer offers
would otherwise refuse every turn of Buddy's. The V2 adapter test sends
such a model and the turn runs. The adapter test imports upstream's
acpPerTurnPromptUsage beside AcpT3Selection.

On v0.1.7 the ACP adapter filters T3's options through the flavor's own
options and a runtime-mode ceiling (flatMap); the AcpT3Selection gate is
one more early return there, after the flavor's owned options and before
the ceiling. The runtime notes, which upstream now builds from the active
session setup, stay behind sendsT3Instructions. Effect 4.1.2 dropped
effect/Crypto, so the adapter imports Context beside upstream's
SecureRandom, and the Buddy tests provide NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…ds Buddy's thread

budíček wakes Buddy with a message into Buddy's T3 thread (root decision 0210,
plan DEV-6676) and sends it again after a crash. It needs the send to happen once
per wake, to know which thread is Buddy's, and to tell a final refusal from one
worth retrying.

- `t3 thread send --idempotency-key <key>` passes T3 a SHA-256 digest of the key
  with the thread and the sender (T3CODE_ACTING_SENDER and T3CODE_ACTING_FOR of
  the "Buddy za …" trace) as the MCP tool's clientRequestId. T3 derives the
  command and message ids from it within the MCP client's request namespace. A
  decorator where server.ts provides the MCP client authenticator puts the agent
  commands' sessions (label "t3 agent cli") in one namespace, so the same key
  names the same command across commands, sessions and restarts, and T3's
  command receipt runs it once. Every other MCP client keeps upstream's
  namespace.
- After a keyed send the command reads what became of it through
  POST /api/lazurio/agent-cli/send-state (orchestration:read): T3's receipt of
  the key's command and the message it made. A repeat prints the first send's
  result with its commandId; the same key with another message fails with
  `idempotency_conflict` and sends nothing; a key T3 rejected fails with
  `command_rejected` and stays rejected; a repeat T3 cannot replay because it
  checks the thread first (archived since) prints `"delivery": "delivered"`
  with the message's id, run and commandId. The conflict check compares the
  trimmed text, as T3's tool trims the message it decodes. Other failures keep
  their codes and are worth sending again with the same key.
- `POST /api/lazurio/buddy/thread` finds or makes Buddy's one thread: thread
  `buddy` on the instance `buddy` in Buddy's project (~/Lazurio/.agents/buddy),
  made by a fixed command so two first asks make one thread, and brought back if
  it was archived. A thread `buddy` in another project or on another instance
  is never taken: the route answers 409 `thread-conflict`. 404 outside Buddy's
  T3 Code, 409 without Buddy's project. `t3 lazurio buddy thread --json` asks it
  as an agent command.
- `t3 lazurio capabilities` says so with "threadSendIdempotency",
  "threadSendOutcome" and "buddyThread".

The "budíček" label on the message is a claim of the "Buddy za ..." trace and
not part of this change. The end-to-end test runs separate `t3 thread send`
commands against T3's own MCP tool over the production runtime; with the raw
key, without the shared namespace, or without the conflict, rejection or
delivered branches, it fails.

On v0.1.3 the key keeps its place in row 21's `send`: the key is evaluated
first, then the message is sent through `t3_thread_send`, and `--wait` waits
only on the run of that send or of the receipt T3 replays. That replaces the
rebuilt row 21's `Effect.filterOrElse` around the send. Command ids still come
from the MCP client's request namespace and the key (stableCommandId is
unchanged), and `t3_thread_send`'s new `link` field (pingdotgg#24784) is ignored by the
result schema. The namespace decorator's `authenticate` is an `Effect.fn`, as
upstream's McpOAuth.authenticate now is (pingdotgg#25099, effectFnOpportunity is an
error), the Buddy test runtime provides upstream's new CodexManagedTokenBroker,
and the file headers are cut to the four-line comment limit.

On v0.1.4: upstream gives every outside MCP client a web origin for its thread links (pingdotgg#26642); the agent commands' sessions drop it in agentCliRequestScope, so their links stay t3-thread:// links T3 Code's chat opens, as on v0.1.3, and the namespace test asserts both sides. The Buddy test runtime wraps provider hydration with withBuddyInstance as server.ts does (row 23) and provides upstream's new PortDiscovery, and the agent CLI tests provide RemoteDelegation, the peer services and the server settings T3's thread tools now need.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
agentCliRequestScope, which nothing imports, is module-private.

On v0.1.6 upstream's projects carry pinnedAt and archivedAt (pingdotgg#26154), so the
Buddy thread test's project sets both to null.

On v0.1.7 effect/Crypto is gone: the send key hashes with
effect/crypto/Digest (sha256), and the Buddy surface testkit provides
NodeCrypto beside NodeServices. Upstream renamed the MCP client's
webOrigin to hostedAppUrl, so the agent commands' scope strips
hostedAppUrl to keep their thread links `t3-thread://`; any other MCP
client keeps the hosted app link McpOAuth sets. The CLI test checks that
link against McpOAuth's own value, so a rewrite of it fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
… the bubble

Root decision 0210, plan DEV-6676 (row 25). With T3CODE_LAZURIO_BUDDY=1 the web
client is Buddy's surface: a header with Mattyčus, the conversation's days in a
pane where the window has room and a date line above each day's first message,
and no thread list, new thread, fork, rollback or thread details card. `/`
opens Buddy's one thread through the thread route, and a message sent during a
turn steers it; queueing is the explicit alternative. In Buddy's bubble the
surface speaks the frame's side of lazurio.buddy.* v1, written from the
protocol's description: it says it is ready, keeps the last valid page context
from its parent on the host's exact origin, and asks for its window's size from
its header and on Escape, which asks for the panel unless a dialog, menu or
list is open in the surface or something inside stopped the key (the editor
marks every Escape as handled). A day in the pane turns off following the end
first, as the timeline's minimap does, so the jump stays. In the bubble the
surface wears the host page's appearance through T3's own appearance
preference; where T3 cannot wear it (storage blocked, or a saved
single-appearance theme), the document wears T3's standard palette in the
host's appearance (request of 2026-10-25).

The server holds the same for every client and agent. Decorators where
it builds the orchestrator and the checkpoint store refuse forks,
rollbacks, other threads and deleting Buddy's thread, and take no
checkpoints in Buddy's project, which is the managed Folder's
(T3CODE_LAZURIO_FOLDER=<Folder>/.agents/buddy) and else
~/Lazurio/.agents/buddy. A thread.create with Buddy's thread id passes
only while Buddy's thread route makes the thread (MakingBuddysThread),
so a client cannot spend the route's fixed command on a thread of its
own. A startup phase before recovery turns off continuing threads after
an update, the agent browser, and Codex and Claude, once, recorded in
<state>/lazurio/buddy-surface.json so that later choices stay. `GET
/api/lazurio/buddy/days` lists the conversation's days for the pane. The
day lines and the day jump check Buddy mode once per timeline, for the
timeline's own Environment, and the rows read it from the timeline's
shared state, so no other Environment's timeline does that work or takes
a jump.

On v0.1.3 two web seams are rebuilt and one server refusal is added.

- Upstream installs the chat route's shortcuts once at app start (pingdotgg#25366
  removed ChatRouteGlobalShortcuts), so Buddy's condition joins their `when`
  in shortcuts/chatRouteCommands.ts: `isBuddySurfaceNow()` reads the primary
  server config from the app's atom registry when a key is pressed. Without it
  Shift+Mod+N on Buddy's surface would try a new thread that the server then
  refuses.
- The timeline no longer takes onManualNavigation (pingdotgg#25463); the day jump is
  called below the timeline's own navigateTimeline and passes it, and the day
  line sits beside upstream's AudioPreviewUnmountContext (pingdotgg#21363).
- Upstream's guest share of a thread (pingdotgg#24104) is refused in Buddy's T3 Code:
  thread.guest-share.open, .redeem and thread.guest-message.submit fail in the
  command guard, because Buddy's conversation belongs to a Personalspace, which
  is never shared (root decision 0091); closing a share stays possible. The
  root renders no GuestShareDialogHost on Buddy's surface. A test drives a
  guest share of Buddy's thread through the server's orchestrator.

Settings and Usage are modals over the thread now (pingdotgg#24847); the prompt-link
draft stays off Buddy's surface inside the rewritten ChatRouteLayout, and the
first-run gate stays off on NEW's slimmer root. The guards are Effect.fn
decorators (effectFnOpportunity), the two effects of BuddySurface.tsx carry
justified react-effect-budget suppressions, and the file headers are cut to
the four-line comment limit.

Any other thread of Buddy's Environment, opened by a link or a typed address,
leads to Buddy's thread as `/` does: the chat layout shows BuddySurfaceIndex,
which asks the server for Buddy's thread and replaces the address, so that
thread never renders under Buddy's presentation. A thread of another
Environment stays T3's, and ChatView and the thread details ask about the
thread's own Environment. A browser test opens such an address directly.

On v0.1.4: the root keeps upstream's local-Environment switch beside the
Buddy surface check (pingdotgg#26207); the timeline finds upstream's unmatched
pending approvals (pingdotgg#26255) after the day lines and adds the day keys to
upstream's list data next to its new footer. ThreadDetailsPanel no
longer exports its props type (pingdotgg#26238), so Buddy's panel takes
ComponentProps of it, and the effect suppressions use the renamed lint
rule t3code/no-unreasoned-state-sync (pingdotgg#26161). The host appearance,
which row 28's commit carried on v0.1.3, comes back to this row: T3 no
longer re-applies its theme from useTheme's effect (pingdotgg#25007, pingdotgg#25461), so
the stand-in follows every application of T3's saved theme through
subscribeRenderedAppearance, and the theme tests apply T3's stored
appearance as app start does. Upstream's linked Environments
(pingdotgg#16655, pingdotgg#16684, pingdotgg#17129) let a peer read and send into this server's threads; a
Personalspace is never shared (0091), so withoutLinkedEnvironments reads
linkedEnvironmentsEnabled as false in Buddy's T3 Code whatever is
stored, which turns off every upstream gate that reads it (peer-link
OAuth, a linked client's /mcp, outbound links, link requests, remote
tasks). Every settings write through it also stores the switch off, the
startup's Buddy defaults included, so a value stored before Buddy is
read as off and the next settings write through it stores it off (the
settings file's own migration write at load keeps what is stored, which
every read still masks); `t3 environment
link`, which builds its own settings (cli/environment.ts), takes the
same guard, so a command run without T3CODE_LAZURIO_BUDDY reads what
Buddy's server stored.

On v0.1.5 the imports in runtimeLayer.ts and ws.ts sit next to
ScratchThreadPromotion (pingdotgg#26767). Upstream's pre-commit hook runs knip
(pingdotgg#26167), so BUDDY_DAYS_ROUTE, withBuddyDefaults and
buddySurfaceProtocol.ts's constants and helpers that only that file uses
are module-private.

On v0.1.6 a side chat (pingdotgg#26901) renders ChatView embedded, without the
header, the branch restore host or the thread details; Buddy's hidden
header and BuddyThreadDetailsPanel sit inside upstream's new embedded
branches. Buddy's one conversation offers no side chat: sideChatsOffered
is false on Buddy's surface, so neither the panel nor the slash menu offer
one, and a typed /side or /btw gets "Buddy's conversation has no side
chats." as the reason instead of reaching Buddy as text (the server would
refuse its thread.fork anyway). The timeline's day lines sit before
upstream's new set of matched approval requests (pingdotgg#27420).

On v0.1.7: upstream now gives the CLI's settings layer the managed policy
(`ManagedPolicy.layer`). The CLI keeps the Buddy guard around
`ServerSettings.layer` and provides `ManagedPolicy.layer` beside the
secret store and persistence. The startup test provides
`ManagedPolicy.layerTest()` and `NodeCrypto.layer`, which Effect 4.1.2 no
longer brings with `NodeServices.layer`. ServerSettingsService on v0.1.7
also carries the managed policy summary (managedPolicy), which clients read
to lock their controls; withoutLinkedEnvironments passes it on, and
buddySurfaceGuards.test.ts fails without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…r decided a request

Root decision 0210, evening addendum, point 5 (plan DEV-6676, row 27): what
Buddy writes or decides in a thread carries the visible mark „Buddy za <user>“
("Buddy for <user>"). Delegace's wake in Buddy's own thread is not shown at all,
as on Telegram (decided 2026-10-22), so the person sees only Buddy's reply.

Who a session acts as is a claim signed into its token beside the runtime-mode
ceiling (`act`), from a closed set of kinds: buddy with the user's name, or
delegace; budicek is no alias. The agent commands issue their sessions with it
when T3CODE_ACTING_SENDER (with T3CODE_ACTING_FOR and
T3CODE_ACTING_FOR_ACCUSATIVE) names one, and refuse any other value before they
read anything. The server reads it from the session alone: an MCP client's
invocation carries it, the client surface runs a dispatch as its session, and a
decorator of the orchestrator records the message or the request's resolution
in a file per thread in the T3 home, only when its own dispatch committed that
step. A replayed command id, an overlapping dispatch of the same id or a retry
takes no one else's step, and a step's first record stands. The web reads
/api/lazurio/acting-senders. The thread's rows leave out Delegace's wake and
hold an agent's message from outside the thread until the answer covers it,
five seconds at most; a server without the route, or an error, shows the thread
at once as upstream does. Buddy's message and a request Buddy decided show
„Buddy za …“. The person's own steps, T3's messages, automations and other
threads' agents get no mark and never wait. Tests: rejections before
successes, the real CLI against /mcp and the client surface through to the
route the web reads, replays on upstream's own orchestrator, the claim in the
token, and the web's label, parse and loader.

On v0.1.3 three small conflicts are resolved by intent. Upstream computes the
folded agent message's sender label once (pingdotgg#24104) and also reads it out in
the accessible heading (pingdotgg#23780); the overlay wraps that senderLabel in
LazurioActingSenderLabel on the visible fold, which is the one place the
mark goes. McpOAuth's authenticate is upstream's Effect.fn now (pingdotgg#25099), and
the client gets the one actingSender spread line there. EnvironmentAuth keeps
row 20's MCP_CLIENT_SUBJECT export. Upstream's guest attribution (pingdotgg#24104)
is a message-context record of its own and does not mark who acted for a
person, so the overlay's session claim stays. The orchestrator decorator's
dispatch is an Effect.fn (effectFnOpportunity), the two effects that ask
the server's record carry justified react-effect-budget suppressions
(now t3code/no-unreasoned-state-sync), the agent CLI test keeps row 21's
queue and fork case beside this row's cases, and long comments are cut to
the four-line limit.

Buddy's day pane counts the messages the timeline shows: the server's day list
(buddySurfaceDays.ts) leaves out Delegace's wake and an agent's message the
record has not answered yet, by the predicate in actingSenderVisibility.ts,
which the server and the web hold as one identical file that the release
contract test keeps equal. A day that opens with a wake jumps to the person's
first message, and a day of wakes alone is not listed.

On v0.1.4: the acting sender sits beside upstream's peer link (pingdotgg#16695) in the session, its signed claims, the MCP client and its caller, next to upstream's narrowed modes and web origin (pingdotgg#16653, pingdotgg#26642); the test takes mcpClientScopes from contracts, where upstream moved it.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
ACTING_SENDER_NAME_MAX_LENGTH, ClientSurfaceActingSender,
actingSenders.ts's make and ACTING_SENDERS_ROUTE, which nothing imports,
are module-private. actingSenderVisibility.ts must stay the same file on
the server and in the web, and each side uses part of it, so its
functions keep their exports and are @public to knip.

On v0.1.7: upstream renamed the MCP caller's `webOrigin` to
`hostedAppUrl` and sets it in the OAuth authenticator for every client
that is not a peer link. The acting sender rides beside it unchanged. The
auth tests provide `ManagedPolicy.layerTest()`, which `EnvironmentAuth`
now needs, and `NodeCrypto.layer`, which Effect 4.1.2 no longer brings
with `NodeServices.layer`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
The distribution's files on the new base, upstream T3 Code v0.1.7
(322f654), last in the stack: CI, the
CLI archive, release and upstream watch workflows, the image, the issue
form, README, SECURITY.md, the runbook, the overlay spec, the contract
test, the release version check and the rebuild's skill. They are
main's files, made current for v0.1.7 (#172). Main's base
is v0.1.6 (#148); the notes for v0.1.4 to v0.1.6 below are
kept from that rebuild, which brought v0.1.4's and v0.1.5's changes to
main.

On v0.1.4:

- The allowlist gains five files: chat/ThreadServersPanel.tsx, where a
  click on a thread's server opens it in the Environment browser (row 9);
  sidebar/UpdateEverythingDialog.tsx and updateEverything.logic.test.ts,
  for the per-server target and the continuation gate of v0.1.4's update
  dialog (row 4); upstream's installer test install.test.ts, whose fixture
  needs upstream's repository named (row 4); and cli/environment.ts, whose
  settings take Buddy's linked-Environments guard (row 25).
  ServerEnvironment.test.ts keeps the update-check guard (row 4).
- The contract test's pins follow the seams that moved: upstream deleted
  LegacySidebar.tsx (pingdotgg#21039), so the shell slot's column
  head is pinned in the thread sidebar only; the sidebar reads
  useDelegatedUnderParent before the managed check; the empty panel and
  Nová karta carry the workspace focus default; the MCP session issue
  calls mcpClientScopes directly; an agent command's scope drops the
  session's web origin so its thread links stay t3-thread:// links; the
  Buddy composer hook takes only the environment, since v0.1.4's resting
  composer has no strip of its own; the timeline has no paint-only gate
  (pingdotgg#25787); the steer guard returns through
  stopRunForQueuedCommand and also holds a delegated task's completion
  wake; the Servers panel's click opens the Environment browser; and
  Buddy's server settings layer turns linked Environments off.
- Rows 30, 32 and 33, which main carried as commits after row 31, now
  sit in their rows; row 28's addenda are back in rows 7, 23 and 25.
  Upstream renamed the lint rule react-effect-budget to
  t3code/no-unreasoned-state-sync (pingdotgg#26161).
- The skill's inventory groups cover rows 23 to 33.
- Tests, fixtures and docs of rows 9, 10, 21, 23, 25, 26 and 27 name
  only fictional people and hosts (Alena, Bob, example-person,
  vm-0x.example.lazurio.io), since the repository is public.

On v0.1.5:

- CI and the contract test pin v0.1.5 and build 0.1.5-lazurio.0; the
  issue form's version example is 0.1.5-lazurio.1. Node 26.12.1 and pnpm
  12.14.0 are unchanged, so the toolchain pins hold. SECURITY.md's
  upstream section equals the new tag's policy.
- The Linux CLI archive now ships lib/libatomic.so.1 and patchelf sets
  t3's RUNPATH to it (pingdotgg#26912, pingdotgg#26932), so
  lazurio-cli-archives.yml installs patchelf before the build, the way
  upstream's release-desktop.yml does; the contract test pins the order.
- useUpdateEverything.ts leaves the allowlist: row 4 now keeps a
  server's advertised release out of waitForNpm in
  updateEverything.logic.ts (pingdotgg#26917), and the contract
  test pins that seam there. The fixed test gate is unchanged, and every
  gated path exists at v0.1.5.
- The contract test's pairing pins follow the constants that knip made
  module-private (upstream's pre-commit hook runs knip:check since
  pingdotgg#26167).
- The runbook's Overlay table describes every row on v0.1.5, the Cílový
  stack names each row's new commit, the swap step names the workflows
  to disable after the swap from the v0.1.3 base (agent-context-budget.yml,
  mobile-fingerprint-label.yml; v0.1.5 adds none), and stage 3 and the
  skill say to replay with --no-verify and run knip over the finished
  stack.

On v0.1.6:

- CI and the contract test pin v0.1.6 and build 0.1.6-lazurio.0; the
  issue form's version example is 0.1.6-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
- The allowlist is unchanged. Its comments say why ServerEnvironment.ts
  and server.ts offer and build no triage on a Lazurio Environment
  (row 15, #147), why ws.ts runs no ChatGPT handoff there
  and the web starts none through a Lazurio primary (row 18,
  #145), that useComposerSend.ts counts a prompt toward
  upstream's star request (pingdotgg#27832) only outside a Lazurio
  Environment (row 16), and that no update waits on npm since
  pingdotgg#27847 (row 4).
- The contract test pins those seams: the triage guard and its one
  construction, the star prompt's check and its one call, the handoff
  route, reconnectProfile and the web's routing, and on Buddy's surface
  the inline mask over useThreadLifecycle's attentionNow and workNow,
  every line of it (React Compiler, #135), the items'
  counts in useThreadLifecycle.tsx and its one caller, the promise
  ChatView hands Nová karta for a side chat (row 13), and that Buddy's
  surface offers no side chat (row 25). It also follows
  the seams upstream moved: no waitForNpm left in the update dialog's
  logic, the palette's addProjectAction, the sidebar's pickable project
  groups (pingdotgg#26154), and an embedded side chat
  (pingdotgg#26901) without thread tabs, terminal drawers or the
  right panel. Claude's mcp-elicitation requests and the agent scope's
  kill are covered by rows 30 and 8's own tests.
- The runbook's Overlay table describes every row on v0.1.6, the Cílový
  stack names each row's new commit and the files rows 13, 15, 16 and 18
  now change, and the swap step adds mobile-eas-preview-fork.yml to the
  workflows to disable after the swap. The runbook and the skill say to
  address a fix written over the finished stack to the row that added
  the place it changes.

On v0.1.7:

- CI and the contract test pin v0.1.7 and build 0.1.7-lazurio.0; the
  issue form's version example is 0.1.7-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
  v0.1.7 adds no workflow, so the swap step's list is unchanged.
- The allowlist gains toolkits/preview/handlers.ts and its test: since
  v0.1.7 preview_open takes a dev-server target (pingdotgg#28027),
  and upstream's handler answered an open with a target with the
  navigate result alone; row 10 keeps the open answer underneath, so the
  Environment browser's view stays. The fixed test gate is unchanged.
- The contract test follows the seams that moved: the settings writer
  takes the client's patch for the managed policy
  (updateAndPersistSettings, pingdotgg#27197), Hermes's runtime
  notes come from the active session setup, the MCP caller's webOrigin
  is now hostedAppUrl, the steer guard's waitsOnPendingRequest also
  holds a delegated task's question (pingdotgg#29909), and the
  ACP adapter filters T3's options through a flatMap.
- For row 30 the allowlist gains apps/web's components/ChatView.logic.ts
  and its test and components/chat/composerCommandKey.ts,
  client-runtime's state/composerDispatch.ts and its test, and
  contracts' orchestrationV2.ts: eight files with the two above. The
  contract test pins that the web keeps auto input auto while the run is
  set up; that /compact and /logout wait for no turn; that a running
  update takes the thread lock on its provider turn's first report or
  while a follow-up waits, then checks again under the lock; and that
  each follow-up gets one promotion, so a held one, one already promoted
  and a refused one stay queued without holding back the next.
- Stage 3's checkout command names the release version check's script
  and test (#165), which the v0.1.6 runbook left out.
- The runbook's Overlay table describes every row on v0.1.7, and the
  Cílový stack names each row's new commit. Main's Cílový stack still
  named older hashes from row 10 on, so the runbook and the skill now say
  to take each row's commit from main's log by subject. The runbook also
  records the Effect 4.1.2 test recipe (NodeCrypto beside NodeServices,
  ManagedPolicy.layerTest()) and that the overlay's settings writes go
  through updateSettingsWith, so the managed policy vets them.
- The runbook records what the independent check of this rebuild found:
  Codex 0.166.0, T3's managed runtime since v0.1.7, still has
  default_mode_request_user_input off by default (row 22); mcp-client
  sessions get hosted thread links on the external origin (row 20);
  upstream's star prompt now stars through the Environment's account
  (row 16); the policy lock reads the macOS and Windows sources too
  (row 18); two upstream policy paths in the update flow do not follow
  row 4's target and are offered upstream; row 30's refused promotion,
  /goal and cold-start steer; and row 33's steer page block. The overlay
  CLI tests build auth on the test managed policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
The distribution's files on the new base, upstream T3 Code v0.1.7
(322f654), last in the stack: CI, the
CLI archive, release and upstream watch workflows, the image, the issue
form, README, SECURITY.md, the runbook, the overlay spec, the contract
test, the release version check and the rebuild's skill. They are
main's files, made current for v0.1.7 (#172). Main's base
is v0.1.6 (#148); the notes for v0.1.4 to v0.1.6 below are
kept from that rebuild, which brought v0.1.4's and v0.1.5's changes to
main.

On v0.1.4:

- The allowlist gains five files: chat/ThreadServersPanel.tsx, where a
  click on a thread's server opens it in the Environment browser (row 9);
  sidebar/UpdateEverythingDialog.tsx and updateEverything.logic.test.ts,
  for the per-server target and the continuation gate of v0.1.4's update
  dialog (row 4); upstream's installer test install.test.ts, whose fixture
  needs upstream's repository named (row 4); and cli/environment.ts, whose
  settings take Buddy's linked-Environments guard (row 25).
  ServerEnvironment.test.ts keeps the update-check guard (row 4).
- The contract test's pins follow the seams that moved: upstream deleted
  LegacySidebar.tsx (pingdotgg#21039), so the shell slot's column
  head is pinned in the thread sidebar only; the sidebar reads
  useDelegatedUnderParent before the managed check; the empty panel and
  Nová karta carry the workspace focus default; the MCP session issue
  calls mcpClientScopes directly; an agent command's scope drops the
  session's web origin so its thread links stay t3-thread:// links; the
  Buddy composer hook takes only the environment, since v0.1.4's resting
  composer has no strip of its own; the timeline has no paint-only gate
  (pingdotgg#25787); the steer guard returns through
  stopRunForQueuedCommand and also holds a delegated task's completion
  wake; the Servers panel's click opens the Environment browser; and
  Buddy's server settings layer turns linked Environments off.
- Rows 30, 32 and 33, which main carried as commits after row 31, now
  sit in their rows; row 28's addenda are back in rows 7, 23 and 25.
  Upstream renamed the lint rule react-effect-budget to
  t3code/no-unreasoned-state-sync (pingdotgg#26161).
- The skill's inventory groups cover rows 23 to 33.
- Tests, fixtures and docs of rows 9, 10, 21, 23, 25, 26 and 27 name
  only fictional people and hosts (Alena, Bob, example-person,
  vm-0x.example.lazurio.io), since the repository is public.

On v0.1.5:

- CI and the contract test pin v0.1.5 and build 0.1.5-lazurio.0; the
  issue form's version example is 0.1.5-lazurio.1. Node 26.12.1 and pnpm
  12.14.0 are unchanged, so the toolchain pins hold. SECURITY.md's
  upstream section equals the new tag's policy.
- The Linux CLI archive now ships lib/libatomic.so.1 and patchelf sets
  t3's RUNPATH to it (pingdotgg#26912, pingdotgg#26932), so
  lazurio-cli-archives.yml installs patchelf before the build, the way
  upstream's release-desktop.yml does; the contract test pins the order.
- useUpdateEverything.ts leaves the allowlist: row 4 now keeps a
  server's advertised release out of waitForNpm in
  updateEverything.logic.ts (pingdotgg#26917), and the contract
  test pins that seam there. The fixed test gate is unchanged, and every
  gated path exists at v0.1.5.
- The contract test's pairing pins follow the constants that knip made
  module-private (upstream's pre-commit hook runs knip:check since
  pingdotgg#26167).
- The runbook's Overlay table describes every row on v0.1.5, the Cílový
  stack names each row's new commit, the swap step names the workflows
  to disable after the swap from the v0.1.3 base (agent-context-budget.yml,
  mobile-fingerprint-label.yml; v0.1.5 adds none), and stage 3 and the
  skill say to replay with --no-verify and run knip over the finished
  stack.

On v0.1.6:

- CI and the contract test pin v0.1.6 and build 0.1.6-lazurio.0; the
  issue form's version example is 0.1.6-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
- The allowlist is unchanged. Its comments say why ServerEnvironment.ts
  and server.ts offer and build no triage on a Lazurio Environment
  (row 15, #147), why ws.ts runs no ChatGPT handoff there
  and the web starts none through a Lazurio primary (row 18,
  #145), that useComposerSend.ts counts a prompt toward
  upstream's star request (pingdotgg#27832) only outside a Lazurio
  Environment (row 16), and that no update waits on npm since
  pingdotgg#27847 (row 4).
- The contract test pins those seams: the triage guard and its one
  construction, the star prompt's check and its one call, the handoff
  route, reconnectProfile and the web's routing, and on Buddy's surface
  the inline mask over useThreadLifecycle's attentionNow and workNow,
  every line of it (React Compiler, #135), the items'
  counts in useThreadLifecycle.tsx and its one caller, the promise
  ChatView hands Nová karta for a side chat (row 13), and that Buddy's
  surface offers no side chat (row 25). It also follows
  the seams upstream moved: no waitForNpm left in the update dialog's
  logic, the palette's addProjectAction, the sidebar's pickable project
  groups (pingdotgg#26154), and an embedded side chat
  (pingdotgg#26901) without thread tabs, terminal drawers or the
  right panel. Claude's mcp-elicitation requests and the agent scope's
  kill are covered by rows 30 and 8's own tests.
- The runbook's Overlay table describes every row on v0.1.6, the Cílový
  stack names each row's new commit and the files rows 13, 15, 16 and 18
  now change, and the swap step adds mobile-eas-preview-fork.yml to the
  workflows to disable after the swap. The runbook and the skill say to
  address a fix written over the finished stack to the row that added
  the place it changes.

On v0.1.7:

- CI and the contract test pin v0.1.7 and build 0.1.7-lazurio.0; the
  issue form's version example is 0.1.7-lazurio.1. The toolchain pins
  hold, and SECURITY.md's upstream section equals the new tag's policy.
  v0.1.7 adds no workflow, so the swap step's list is unchanged.
- The allowlist gains toolkits/preview/handlers.ts and its test: since
  v0.1.7 preview_open takes a dev-server target (pingdotgg#28027),
  and upstream's handler answered an open with a target with the
  navigate result alone; row 10 keeps the open answer underneath, so the
  Environment browser's view stays. The fixed test gate is unchanged.
- The contract test follows the seams that moved: the settings writer
  takes the client's patch for the managed policy
  (updateAndPersistSettings, pingdotgg#27197), Hermes's runtime
  notes come from the active session setup, the MCP caller's webOrigin
  is now hostedAppUrl, the steer guard's waitsOnPendingRequest also
  holds a delegated task's question (pingdotgg#29909), and the
  ACP adapter filters T3's options through a flatMap.
- For row 30 the allowlist gains apps/web's components/ChatView.logic.ts
  and its test and components/chat/composerCommandKey.ts,
  client-runtime's state/composerDispatch.ts and its test, and
  contracts' orchestrationV2.ts: eight files with the two above. The
  contract test pins that the web keeps auto input auto while the run is
  set up; that /compact and /logout wait for no turn; that a running
  update takes the thread lock on its provider turn's first report or
  while a follow-up waits, then checks again under the lock; and that
  each follow-up gets one promotion, so a held one, one already promoted
  and a refused one stay queued without holding back the next.
- Stage 3's checkout command names the release version check's script
  and test (#165), which the v0.1.6 runbook left out.
- The runbook's Overlay table describes every row on v0.1.7, and the
  Cílový stack names each row's new commit. Main's Cílový stack still
  named older hashes from row 10 on, so the runbook and the skill now say
  to take each row's commit from main's log by subject. The runbook also
  records the Effect 4.1.2 test recipe (NodeCrypto beside NodeServices,
  ManagedPolicy.layerTest()) and that the overlay's settings writes go
  through updateSettingsWith, so the managed policy vets them.
- The runbook records what the independent check of this rebuild found:
  Codex 0.166.0, T3's managed runtime since v0.1.7, still has
  default_mode_request_user_input off by default (row 22); mcp-client
  sessions get hosted thread links on the external origin (row 20);
  upstream's star prompt now stars through the Environment's account
  (row 16); the policy lock reads the macOS and Windows sources too
  (row 18); two upstream policy paths in the update flow do not follow
  row 4's target and are offered upstream; row 30's refused promotion,
  /goal and cold-start steer; and row 33's steer page block. The overlay
  CLI tests build auth on the test managed policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
On a Lazurio Environment (marked by T3CODE_LAZURIO_FOLDER) T3's own browser
tools drive the Environment browser, the one shared Chromium the agents
already use through agent-browser, through a host that registers with the
preview broker under upstream's server-browser client id once the Environment
declares its browser. Upstream's server browser is never built there (a gate
in server.ts) and the descriptor omits capabilities.serverBrowser, so clients
open no server tabs. preview_open answers with the view of the tab, the
address where a person sees it; another Environment's view is never loaded
here, only handed to the person's panel.

On v0.1.3 the broker protocol and the page engine's exports are unchanged;
upstream (pingdotgg#25423) merged eight action tools into preview_act, which maps to the same
broker operations, so the host needs no change. ServerBrowser.layer now needs
PreviewAgentActivity (pingdotgg#25184), so the gate wraps
ServerBrowser.layer.pipe(Layer.provide(Layer.merge(DesktopBrowserChannel.layer,
PreviewAgentActivity.layer))) under upstream's memoization comment. The
preview_open description takes upstream's shortened text (pingdotgg#24850) plus the
overlay's view sentence. serverBrowser.test.ts gives its DesktopBrowserChannel
mock the new `turn` and provides PreviewAgentActivity. The disabled server
browser uses Effect.fn and liveTab uses Effect.undefined, for the new Effect
diagnostics; overlay comments are cut to the four-line limit. The host imports
row 11's threadTabs.ts, so this row alone does not typecheck.

On v0.1.4: upstream added peerLinks, mcpModeLimitHeader and linkFence to the environment capabilities (pingdotgg#16655, pingdotgg#16695); they stay beside the overlay's serverBrowser gate. The row's later test change (agent-turn activity of the gated server browser) is folded in. EnvironmentBrowserPages.open gives the Servers panel (row 9) a new window of this Environment's browser in the thread's strip; it refuses another Environment's address and answers unavailable without a declared browser.

On v0.1.5 ServerEnvironment.ts gains desktopAppChannelSwitch and
threadProjectFromScratch (pingdotgg#26288, pingdotgg#26767) next to the overlay's import;
serverBrowser is still left out only on a Lazurio Environment.
Upstream's pre-commit hook now runs knip over the repository (pingdotgg#26167),
so ENVIRONMENT_BROWSER_ENDPOINT, which nothing imports, is
module-private.
EnvironmentBrowserPages.open now holds the new window in the thread's
strip before it records it, and closes the window again when the strip
refuses the hold (too many tabs, a holder file it cannot write): the open
fails with the strip's reason instead of answering with a window no
thread holds. The connection gains closeWindow (Target.closeTarget).

On v0.1.6 upstream's server browser keeps each client's reported browser
profiles apart (pingdotgg#21745): ws.ts takes a profileReporter for every
WebSocket session instead of calling reportProfiles. The disabled server
browser hands out a reporter that keeps nothing, and its test reports
through one.

On v0.1.7 preview_open takes a dev-server `target` (pingdotgg#28027): the
description keeps upstream's sentence beside the overlay's view sentence,
and the parameters are upstream's. The Environment browser answers open
with the tab's view, and upstream's handler answered an open with a target
with the navigate result alone; it now adds the open answer's view to the
navigate result, so the view stays and nothing else of the open answer (a
dialog it saw, for one) replaces what navigate reports. A test fails
without either. The Environment browser
resolves the port target to localhost, which is where its own Environment's
dev server is. Effect 4.1.2 moved SecureRandom out of NodeServices, so the
server browser gate test also provides NodeCrypto.

On v0.1.7 the host also keeps LazurioPlatform F50 point 2 for every
view host (the contract's isViewHost): `browser.` and a name in
`lazurio.io`, in any case and with the DNS root's trailing dot, this
Environment's own host included, never loads in this browser. preview_open
and EnvironmentBrowserPages.open of this Environment's own view take the
tab it shows instead of loading it, and preview_navigate to a view host,
like any other address on one, fails. Before, the trailing dot let
another Environment's view through, and this Environment's own view
loaded in the thread's window (review of #174). The tests
of both fail without the change; browserView.ts, the contract's copy,
is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…file

Each T3 Code thread keeps its tabs of the Environment browser only in its
holder file, $XDG_RUNTIME_DIR/lazurio-browser/holders/t3-<thread>.json, the
file the view's hub reads to keep a remote tab alive. The server reconciles
every file with the hub's list of live tabs (at start, on change, every 30 s
and before every write), serializes writes through one queue and never
overwrites a file it cannot read, so a restart finds the tabs intact and T3's
database stays upstream's. The web reaches a thread's tabs through
/api/lazurio/thread-tabs (snapshot, event stream, hold, release) under
upstream's preview scopes. holders.ts copies the Platform's holder helpers,
and holders.test.ts runs the Platform's vectors against the copy. One line in
server.ts joins the overlay's layer into layerMakeRoutes, where it shares the
routes' one preview broker.

On v0.1.3 the row merges cleanly: layerMakeRoutes gained GuestHttp (pingdotgg#24104)
and the PreviewAgentActivity provide (pingdotgg#25184), and the overlay line still sits
before the preview broker. Guest tokens never reach this route. ThreadTabs'
methods use Effect.fn for the new Effect diagnostics, and comments are cut to
the four-line limit; the holders.ts provenance line the contract pins stays.
threadTabs.ts and the overlay layer import row 12's threadLifecycle.ts, so
this row alone does not typecheck.

On v0.1.4: upstream added the RemoteDelegation starter to the route layers (pingdotgg#16719); the overlay's layer follows it. POST /api/lazurio/thread-tabs/open, under the preview open scope, opens a page for the Servers panel (row 9) through row 10's EnvironmentBrowserPages, which overlay.ts now provides to the route.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
agentBrowserShutdownAction, which nothing imports, is module-private.

On v0.1.7 EnvironmentAuth.layer needs ManagedPolicy and the crypto
services left NodeServices, so the route test provides
ManagedPolicy.layerTest() and NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
The Admin's decision of 2026-10-17: a page without a T3 session asks its own
origin for a pairing credential (GET /.lazurio/chat/pairing), which the
Launchpad issues with `t3 lazurio pairing` and the operator's scopes (T3's
standard client scopes without relay:write), and exchanges it, so the person
never sees a token and a deep link keeps its place.

On v0.1.3 the row applies cleanly: bootstrapServerAuth keeps its order of
credential sources (only comments changed, pingdotgg#21514), and the scope literals,
AuthStandardClientScopes and sessionHasLegacyPermissions are identical, so
no browser paired on v0.1.2 pairs again. WebSocket tickets now name their
route (pingdotgg#24554), which pairing does not touch. The overlay's comments are cut
to the four-line limit.

On v0.1.4: unchanged.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
OPERATOR_PAIRING_SCOPES and ENVIRONMENT_PAIRING_PATH, which nothing
imports, are module-private.

On v0.1.6 `t3 auth pairing create --json` resolves its config with
quietLogs (pingdotgg#27817), because removing expired attachment uploads logs
to stdout. `t3 lazurio pairing`, which the Launchpad reads the same
way, now does too, so it prints only the token.

On v0.1.7 the crypto services left NodeServices, so the pairing test
provides NodeCrypto beside it.

The pairing test gets its auth from the test managed policy as well
(layerAuth in cli.test.ts); with a policy that allows only the desktop
client it fails, so the test reads that policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…quest, queue and events

Root decision 0210, addendum 3: Buddy, and with it every agent in an
Environment, works with T3's threads as their owner. It reads and summarizes
them, launches, messages, steers and stops them, answers their questions,
decides their permission requests and follows their changes, through `t3
thread`, `t3 request`, `t3 queue` and `t3 events`. Each command is a thin
client of the running server: T3's own MCP tools where one exists, the
person's client surface only where none does.

On v0.1.3 upstream merged its thread tools into action tools (pingdotgg#25423). The
commands keep their surface, sessions, labels and exit codes; only their MCP
calls move: `t3 queue *` calls t3_queue with list, read, edit, cancel,
reorder or promote_to_steer, `t3 request respond` calls t3_pending_request
with respond, and `t3 thread fork` calls t3_thread_transfer with fork. The
tool names are strings the compiler cannot check, so agentCli.test.ts gains a
case that drives every queue action and the fork through the real thread
toolkit; with the old names it and the respond case fail. Upstream's shell
snapshot now takes a query (pingdotgg#24648, pingdotgg#24723) and a WebSocket upgrade names its route
(pingdotgg#24554), so the connection passes an empty query and the test's /ws passes
"rpc". `send --wait` uses Effect.filterOrElse for the new
flatMapConditionalToFilterOrFail diagnostic, and the long header comments are
cut to four lines (pingdotgg#21514).

On v0.1.4: listItemFromShell takes the caller's scope for each thread's link (pingdotgg#26239, pingdotgg#26642), so t3 events passes this Environment's id and its lines carry the same t3-thread:// link as t3 thread list. mcpClientScopes comes from @t3tools/contracts, and the tests stand in for the linked-environment services and server settings that upstream's orchestrator handlers now need (pingdotgg#17129). The fake t3_thread_launch stamps linked callers as upstream's does.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
requestCommand, queueCommand and eventsCommand, which only agentCli.ts
uses, are module-private.

On v0.1.6 upstream adds top-level t3 up and t3 status (pingdotgg#27996); they sit
beside the overlay's t3 thread in binCli.ts. Upstream also keeps config
resolution's logs off standard output for t3 auth --json (pingdotgg#27817): every
agent command prints its result there, so withAgentCliConnection resolves
with quietLogs as well, and a test with an abandoned upload, as upstream's,
checks that t3 thread list --json prints only its one line. t3 thread list
leaves out side chats (pingdotgg#26901) as upstream's list does, and t3 events
--subagents follows delegated threads but no side chat, as that list.

On v0.1.7 effect/Crypto is gone: a decision's command id comes from
effect/crypto/SecureRandom. layerMcpTransport now takes the tool
registrations as its argument, so the live-server test passes them in,
and the tests provide NodeCrypto beside NodeServices.

The live-server test and the sessions check build auth on
ManagedPolicy.layerTest() in place of EnvironmentAuth.layerRuntime, which
reads the host's policy file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
Root decision 0211: an agent asks the person through the question tool, not
only in prose. Codex offers request_user_input in Default mode only with its
feature default_mode_request_user_input; T3 turns it on for the app-servers
it starts for its threads (-c ahead of the launch arguments, so their own -c
or --disable still wins), and every turn's additional context tells the
agent to ask with it. The user's ~/.codex/config.toml is not touched (0161).

Shrunk on v0.1.3: upstream now uses Codex's native collaboration modes
(pingdotgg#24737) and deleted T3's mode texts with buildCodexDeveloperInstructions, so
the overlay's edit of the Default-mode text is gone. Codex's own Default text
keeps the tool for optional questions and asks required ones in plain text,
so the lazurio_questions entry now says explicitly that it overrides the
collaboration mode's instructions on asking. It stays the last entry of
buildCodexAdditionalContext, under upstream's per-entry size cap.
questionTool.test.ts drops the cases on T3's mode texts, checks the override
and that a Default-mode turn carries no developer instructions of T3's own.
Whether Codex follows the override is to be checked on canary.

On v0.1.4: unchanged. The overlay leaves AgentContextBudget's files alone, so the fork's CI does not run its budget test; the context the overlay adds is measured locally and recorded in the rebuild issue.

On v0.1.5 upstream's pre-commit hook runs knip (pingdotgg#26167), so
DEFAULT_MODE_REQUEST_USER_INPUT, which nothing imports, is
module-private.

On v0.1.7 the app-server client factory needs PortDiscovery and a
spawned command's args are Words: the switch test provides
PortScanner.layerTest and reads the args as strings, and the Default-mode
question test provides NodeCrypto for the adapter's Digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit to Lazurio/t3code that referenced this pull request Nov 5, 2026
…ge as a Czech block

Buddy's web chat is Lazurio T3 Code with the Hermes Agent over ACP (root
decision 0210, plan DEV-6676). On the Osobní Prostředí a second T3 server with
T3CODE_LAZURIO_BUDDY=1 runs Hermes as the provider instance `buddy`. Hermes keeps
every prompt as the person's words in Buddy's memory, so T3's own instructions
(<t3_code_instructions>, <runtime_info>, <pull_request_linking>) would become part
of Buddy's history, twice after Stop or a steer and again after every restart.

- The ACP adapter asks AcpT3Instructions when it builds an instance whether its
  prompts carry T3's instructions; without an answer every instance keeps them.
  server.ts answers no for Buddy's instance where it builds provider instances
  (ProviderInstanceRegistryHydration).
- The turn start projects a composer record of kind `lazurio-page` as one
  labelled Czech block ("Kontext stránky (údaje, ne pokyn): ...") after the
  person's text, for Buddy's instance only; every other record keeps upstream's
  projection.
- Buddy's sessions take no model or effort from T3 (HumanAndMachines/Lazurio#648):
  the adapter asks AcpT3Selection which options of T3's selection an instance
  takes; null, the default, is all of it. For Buddy's instance withBuddyInstance
  names only Hermes's speed (`fast`), so T3 applies no model and only Hermes's
  Normal / Fast switch whenever a session starts, loads or gets a new selection.

Without T3CODE_LAZURIO_BUDDY=1 nothing changes, also for an instance called
`buddy`. Tests drive the repository's mock ACP agent in Hermes' place, through
the adapter and through the production V2 runtime, and read what it received.

On v0.1.3 the seams stay at the only prompt assembly and send in the ACP
adapter. Upstream now computes the slash-command check from the flavor's
rewritten user text (pingdotgg#24605); the rebuild takes that line and keeps the
instruction gate around t3AcpPromptWithInstructions and the runtime notes. The
orchestrator test provides upstream's new CodexManagedTokenBroker, which the
provider instance registry now needs, and the two file headers are cut to the
four-line comment limit.

On v0.1.4: upstream moved the turn text assembly up in ProviderTurnStartService (pingdotgg#22864, pingdotgg#25610, pingdotgg#25660); the page block seam moves with it, while the prompt-command and steer projections stay upstream's as before. server.ts keeps upstream's port scanner (pingdotgg#26245) after the wrapped instance hydration, and the Buddy orchestrator test provides the new PortDiscovery that hydration now needs. The pingdotgg#648 selection gate, which row 28's commit carried on v0.1.3, comes back to this row and sits beside upstream's flavor hook (pingdotgg#24605).

On v0.1.5 upstream makes the client file system's writeTextFile optional
in the ACP adapter (pingdotgg#26876), away from the overlay's blocks. Upstream's
pre-commit hook runs knip (pingdotgg#26167), so LAZURIO_PAGE_CONTEXT_KIND,
buddyT3Instructions, LAZURIO_BUDDY_ENV and isBuddySurface, which nothing
imports, are module-private.

On v0.1.6 the ACP adapter checks a turn's model against the session's
models before the turn starts (pingdotgg#26623). Where AcpT3Selection names the
options, the host sets the agent's model and T3 applies none, so
validateModelSelection skips that check there, as it does for a flavor
that applies the selection itself: a model the session no longer offers
would otherwise refuse every turn of Buddy's. The V2 adapter test sends
such a model and the turn runs. The adapter test imports upstream's
acpPerTurnPromptUsage beside AcpT3Selection.

On v0.1.7 the ACP adapter filters T3's options through the flavor's own
options and a runtime-mode ceiling (flatMap); the AcpT3Selection gate is
one more early return there, after the flavor's owned options and before
the ceiling. The runtime notes, which upstream now builds from the active
session setup, stay behind sendsT3Instructions. Effect 4.1.2 dropped
effect/Crypto, so the adapter imports Context beside upstream's
SecureRandom, and the Buddy tests provide NodeCrypto beside NodeServices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants