Commit Graph
12 Commits
Author SHA1 Message Date
Kaede Akino ba46e90e30 Format with swift-format
`swift-format lint --strict --recursive Termind TermindTests
TermindMCPBridge` is in the contribution instructions but had never been
run to completion: 4133 violations across 141 files, most of them
indentation and line breaking the pretty-printer would have settled on
its own.

`swift-format format -i` accounts for all but five. The rest are
lint-only rules it will not rewrite for you:

- `SSHKeyMaterial` declared its libssh2 entry point in the C symbol's
  own spelling. `@_silgen_name` already carries the linkage name, so the
  Swift side is free to be `libssh2PublicKeyFromPrivateMemory`.
- Four `.forEach { ... }` calls become for-in loops, two in
  `PortForwardingController` and two in tests.

Formatting only, and checked as such rather than assumed: all 5409
string literals under `Termind` are byte-identical across the change, so
no localization key moved. Comparing whitespace-stripped token streams
leaves 43 files with any real change, and each is one of the rules
above, a dropped semicolon, a `case a, b` split onto separate lines with
its raw values kept explicit, or a file-scope `private` respelled
`fileprivate` — which is the same access level in that position.

Builds, and the suite stays at 975 of 975.
2026-09-02 18:09:30 +08:00
Kaede Akino cdd8fe0668 Extract the agent runtime as AgentKit
The loop, the approval gate, the provider adapters, the MCP client, and the
tools with no opinion about transports now live in a package and are consumed
from it. Termind keeps everything that reaches a machine or a person: the SSH
and SFTP tools, the connection pool, the Vault resolver, scratch_pull and
scratch_push, the SwiftData store, and every view.

They meet at four seams. TermindAgentTools registers our tools alongside the
built-in groups; AgentToolServices carries the SSH credential prompt to them
without that prompt appearing in a runtime protocol; TermindAgentPolicy owns the
system prompt, the plan contract, and the ssh_exec plan-mode rule the runtime
cannot write for us; TermindAgentPresentation extends the card vocabulary with
our own semantics.

ChatPermissionMode becomes AgentPermissionMode and moves out of the conversation
model — who authorizes an action is a property of the run, not of a view.
AgentRunRequest takes the session context as rendered text rather than our
SessionContext, because the runtime does nothing with it but insert it in front
of the turn it describes.

Termind's system prompt and plan contract are byte-identical to what shipped.
Every provider cache is a prefix cache, so editing a word there would miss the
cache on every replayed conversation at once.
2026-09-02 13:58:35 +08:00
Kaede Akino 12afb7295a Fix Assistant transcript scroll restoration 2026-08-30 12:43:54 +08:00
Kaede Akino 2597745544 fix terminal suggetion 2026-08-29 23:44:03 +08:00
Kaede Akino d95a070163 Fix adaptive app appearance 2026-08-29 23:41:57 +08:00
Kaede Akino e744ab8a67 Rename SSH connection journey 2026-08-29 22:30:51 +08:00
Kaede Akino f5e240ea1b Appkit Transcript 2026-08-29 21:35:13 +08:00
Kaede Akino 77391d73d9 Fix duplicate New Chat empty state 2026-08-29 10:52:22 +08:00
Kaede Akino b1a4d9cc69 Fix assistant transcript row sizing 2026-08-29 03:24:17 +08:00
Kaede Akino eee35f764f Refine transcript elasticity scope 2026-08-28 16:19:32 +08:00
Kaede Akino acbc488d51 Refine assistant transcript behavior 2026-08-28 16:19:31 +08:00
Kaede Akino 75a23ebe7f Adopt ListViewKit for assistant transcript 2026-08-28 16:18:44 +08:00