Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
458 commits
Select commit Hold shift + click to select a range
1cb8ba3
feat(beads): run closed-issue cleanup in background with WS progress
inercia Jun 25, 2026
8b6fe6c
feat(conversation): add structured logging to model preference selection
inercia Jun 25, 2026
60317c9
docs(web): add REST API conventions + current→target mapping (mitto-a…
inercia Jun 25, 2026
f930dab
refactor(web): extract flat API routes into a declarative route table…
inercia Jun 25, 2026
f8ab024
refactor(web): migrate workspace-detail dispatch to method+pattern ro…
inercia Jun 25, 2026
72e6c68
refactor(web): peel session leaf sub-resources into method+pattern ro…
inercia Jun 25, 2026
848a781
refactor(web): peel session media/queue/periodic sub-resources into m…
inercia Jun 25, 2026
c27a721
refactor(web): migrate base session routes + ws to method+pattern, re…
inercia Jun 25, 2026
2d5ee63
fix(web): use authFetch for /api/config reconnect probes (mitto-ank.8)
inercia Jun 25, 2026
ef6de5d
fix(web): send credentials + handle 401 on viewer.html read fetches (…
inercia Jun 25, 2026
ae41977
fix(web): route SettingsDialog authenticated fetches through authFetc…
inercia Jun 25, 2026
b9df1d3
feat(web): adopt canonical nested error response envelope
inercia Jun 26, 2026
7b596bb
feat(web): add HTTP status→error-code policy helper (mitto-ank.5)
inercia Jun 26, 2026
46f3099
feat(web): migrate session-settings errors to JSON envelope + FE pars…
inercia Jun 26, 2026
4eb862b
feat(web): migrate workspace-metadata/user-data-schema errors to JSON…
inercia Jun 26, 2026
b85637e
feat(web): migrate queue errors to JSON envelope + FE parsing (mitto-…
inercia Jun 26, 2026
b9a2186
feat(web): migrate parseJSONBody errors to JSON envelope (mitto-ank.5)
inercia Jun 26, 2026
ecb9c9e
feat(web): migrate methodNotAllowed 405 to JSON envelope (mitto-ank.5)
inercia Jun 26, 2026
60079f2
feat(web): migrate session get/update/delete errors to JSON envelope …
inercia Jun 26, 2026
d626d85
feat(web): migrate periodic handler errors to JSON envelope (mitto-an…
inercia Jun 26, 2026
39029a9
feat(web): migrate /api/sessions collection errors to JSON envelope +…
inercia Jun 26, 2026
b80ff16
feat(web): migrate ui_preferences + external_status errors to JSON en…
inercia Jun 26, 2026
5296e0d
feat(web): migrate agent_discovery errors to JSON envelope (mitto-ank.5)
inercia Jun 26, 2026
d5828c2
feat(web): migrate workspace_detail errors to JSON envelope + pair FE…
inercia Jun 26, 2026
1866005
feat(web): migrate workspaces.go errors to JSON envelope + pair FE co…
inercia Jun 26, 2026
47d0bcb
feat(web): migrate workspace_processors.go errors to JSON envelope + …
inercia Jun 26, 2026
d0908fc
feat(web): migrate workspace_mcp.go errors to JSON envelope + pair FE…
inercia Jun 26, 2026
ad1cfa4
feat(web): migrate workspace_prompts.go errors to JSON envelope + pai…
inercia Jun 26, 2026
82fb90e
feat(web): migrate POST /api/config errors to JSON envelope + pair FE…
inercia Jun 26, 2026
3cb48dd
feat(web): migrate queue_message.go errors to JSON envelope (mitto-an…
inercia Jun 26, 2026
63cf865
feat(web): migrate user_data.go errors to JSON envelope + pair FE con…
inercia Jun 26, 2026
07bda34
feat(web): migrate improve_prompt.go errors to JSON envelope + pair F…
inercia Jun 26, 2026
7909263
feat(web): migrate beads.go validation errors to JSON envelope + norm…
inercia Jun 26, 2026
cdc7150
feat(web): migrate beads_config.go errors to JSON envelope + normaliz…
inercia Jun 26, 2026
5494610
feat(web): migrate beads_crud.go errors to JSON envelope + strengthen…
inercia Jun 26, 2026
1d20987
feat(web): migrate file/image handlers to JSON error envelope + pair …
inercia Jun 26, 2026
1a60163
feat(web): migrate session/callback handlers to JSON error envelope (…
inercia Jun 26, 2026
f749e4c
feat(web): migrate save_file handlers to JSON error envelope + pair S…
inercia Jun 26, 2026
e794e09
feat(web): migrate badge_click handler to JSON error envelope + pair …
inercia Jun 26, 2026
34cd9be
feat(web): migrate cross-cutting middleware errors to JSON envelope (…
inercia Jun 26, 2026
1d9f345
feat(web): add shared errorMessageFromData helper, consolidate FE err…
inercia Jun 26, 2026
5cb4412
refactor(web): route remaining FE error parsing through shared errorM…
inercia Jun 26, 2026
d088502
test(web): add API contract scaffolding (route-table reachability, 40…
inercia Jun 26, 2026
e01119f
fix(web): qualify /api/sessions/running as GET to resolve Go 1.22 mux…
inercia Jun 26, 2026
7b286a0
test(web): register full route table on one mux as conflict/drift gua…
inercia Jun 26, 2026
afc272c
feat(web): migrate /api/workspace-metadata to /api/workspaces/{uuid}/…
inercia Jun 26, 2026
857543d
feat(web): migrate /api/workspace/user-data-schema to /api/workspaces…
inercia Jun 26, 2026
5a898ff
feat(web): migrate /api/workspace-processors to /api/workspaces/{uuid…
inercia Jun 26, 2026
8ec966d
feat(web): migrate /api/workspace-mcp-* to /api/workspaces/{uuid}/mcp…
inercia Jun 26, 2026
7e7a6ee
feat(web): migrate /api/folder-group to /api/workspaces/{uuid}/folder…
inercia Jun 26, 2026
badc247
fix(web): load viewer images/downloads via credentialed fetch to fix …
inercia Jun 26, 2026
95a86dc
refactor(web): migrate beads command-failure responses to the standar…
inercia Jun 26, 2026
a7944a7
docs(web): rewrite accurate REST API reference from route table (mitt…
inercia Jun 26, 2026
7bfb11e
docs(api): resolve workspace-prompts path-shape — Design B (flat + wo…
inercia Jun 26, 2026
b2b999c
refactor(web): workspace-prompts use working_dir param + PATCH for en…
inercia Jun 26, 2026
9effb43
refactor(web): migrate /api/agent-types -> /api/agents/types (mitto-a…
inercia Jun 26, 2026
ad80f53
refactor(web): rename ?dir= to ?working_dir= on workspace DELETE (mit…
inercia Jun 26, 2026
936c54a
docs(api): rewrite §5 405-handling to current reality + intentional p…
inercia Jun 26, 2026
15ab0a0
docs(api): record Decision #12 — flat /api/issues?working_dir= (Desig…
inercia Jun 26, 2026
78664c0
refactor(web): migrate beads read endpoints to RESTful /api/issues (m…
inercia Jun 26, 2026
072a386
feat(web): migrate beads CRUD endpoints to RESTful /api/issues
inercia Jun 26, 2026
f80f381
feat(web): migrate beads comment & dependency endpoints to RESTful /a…
inercia Jun 26, 2026
5851695
feat(web): migrate beads config & upstream endpoints to RESTful /api/…
inercia Jun 26, 2026
d74d79d
feat(web): migrate beads sync/cleanup/status actions to RESTful /api/…
inercia Jun 26, 2026
1d7f62f
test(ui): migrate beads Playwright mocks to RESTful /api/issues
inercia Jun 26, 2026
61bb32a
docs(web): migrate beads endpoint table to RESTful /api/issues
inercia Jun 26, 2026
42c3a67
fix(web): route queue reorder sub-action so /queue/{msgId}/move works
inercia Jun 26, 2026
81ff7df
feat(web): add centralized API endpoint registry (scaffolding)
inercia Jun 26, 2026
a371d85
refactor(web): route issues API calls through the endpoint registry
inercia Jun 26, 2026
308578d
refactor(web): route sessions API calls through the endpoint registry
inercia Jun 26, 2026
dd870ee
refactor(web): route agents API calls through the endpoint registry
inercia Jun 26, 2026
316298d
refactor(web): route workspaces API calls through the endpoint registry
inercia Jun 26, 2026
859a429
refactor(web): route workspace-prompts API calls through the endpoint…
inercia Jun 26, 2026
d61dcc8
refactor(web): route config API calls through the endpoint registry
inercia Jun 26, 2026
9b6936c
refactor(web): route remaining misc API calls through the endpoint re…
inercia Jun 26, 2026
52824a7
refactor(web): normalize GET reads to authFetch and route csrf-token …
inercia Jun 26, 2026
336711a
refactor(web): route WebSocket endpoints through the endpoint registry
inercia Jun 26, 2026
ffce865
refactor(web): route workspace-prompts queries through the endpoint r…
inercia Jun 26, 2026
962cb9c
refactor(web): add sessions.image builder and route image URL through…
inercia Jun 26, 2026
9b5e6f6
refactor(web): route csrf-token fetch through endpoint registry
inercia Jun 26, 2026
4a0f294
test(web): add table-wide 405 contract guard across full route table
inercia Jun 26, 2026
fdd2741
test(web): broaden error-envelope contract guard to non-session resou…
inercia Jun 26, 2026
f580608
feat(processors): prompt-mode processor parameters with mandatory def…
inercia Jun 26, 2026
50de29c
feat(web): Processors tab argument overrides and load-error badges
inercia Jun 26, 2026
b82cc2d
docs(processors): document parameters, persistence and substitution +…
inercia Jun 26, 2026
3f074c1
feat(config): add cache block to prompt parameters with validation
inercia Jun 26, 2026
b95051d
fix(web): stop periodic loop authoritatively on archive (mitto-efnb)
inercia Jun 26, 2026
ef36560
feat(conversation): add per-conversation prompt argument cache store
inercia Jun 26, 2026
1cbaa71
feat(web): add prompt-arg-cache status endpoint
inercia Jun 27, 2026
d0d2004
perf(web): memoize Message component to skip re-render of unchanged m…
inercia Jun 27, 2026
cd5b8f5
feat(conversation): wire prompt-arg cache into dispatch (read/merge +…
inercia Jun 27, 2026
644f315
perf(web): stabilize active-session derived state refs to isolate bac…
inercia Jun 27, 2026
1f5c5f4
perf(web): memoize MessageList render list, precompute retry map, sta…
inercia Jun 27, 2026
dc89818
perf(web): disable Tailwind spin/pulse + improving-overlay blur under…
inercia Jun 27, 2026
92a1397
feat(web): cache-aware skip of prompt parameter dialog (mitto-pchx.5)
inercia Jun 27, 2026
1957d85
test(web): integration test + docs for prompt-arg caching (mitto-pchx.6)
inercia Jun 27, 2026
d7a3f07
feat(web): seed agent metadata defaults into ACP server settings at d…
inercia Jun 27, 2026
f3e2be6
feat(web): surface agent defaults in discovery dialog and send dir_na…
inercia Jun 27, 2026
9463531
docs(agents): document predefined agent defaults + add edge-case/over…
inercia Jun 27, 2026
c3c0c61
fix(web): guard periodic-config fetch against non-JSON responses (mit…
inercia Jun 27, 2026
e8856f5
chore(web): log rejected workspace-prompts GET shape to diagnose stal…
inercia Jun 27, 2026
bea511d
fix(acpproc): escalating saturation cooldown + single-attempt probe (…
inercia Jun 27, 2026
837d82d
feat(web): show compact run-count badge (N/M) on small screens
inercia Jun 27, 2026
e079bea
fix(acpproc): size set_model attempt-1 deadline to cold warm-up p95 (…
inercia Jun 27, 2026
09bdba3
fix(web): return fast retryable 503 on aux/bd endpoint timeouts
inercia Jun 27, 2026
e94c0a3
fix(mcp): make STDIO->HTTP proxy concurrent to avoid keepalive starva…
inercia Jun 27, 2026
a28bd13
fix(web): show throttled progress toasts during beads closed-issue cl…
inercia Jun 27, 2026
d9dddf6
test(web): cover beads cleanup progress-toast throttle/replace logic
inercia Jun 28, 2026
a14bc3b
fix(web): bound periodic/run-now to avoid 30s opaque 503
inercia Jun 28, 2026
b4f01f5
feat(config): expose MCP server settings (enabled/host/port) in the UI
inercia Jun 28, 2026
f4784b1
feat(config): per-ACP-server context-flush command + seed default (mi…
inercia Jun 28, 2026
61d7460
feat(conversation): expose Iteration.IsUninterrupted for periodic con…
inercia Jun 28, 2026
f7683f0
feat(prompts): use Iteration.IsUninterrupted for compact periodic con…
inercia Jun 28, 2026
db063b9
feat(web): wire ContextFlushCommand runtime flush action (UI + API)
inercia Jun 28, 2026
2b1246b
chore: update agent rules and UI improvements
inercia Jun 28, 2026
6000c37
refactor(mcp): always enable MCP server; remove enable/disable toggle
inercia Jun 28, 2026
1761dc8
fix(web): coalesce macOS active+visible wake into single reconnect
inercia Jun 28, 2026
3ecdfe3
fix(conversation): fail-closed on broken templates for automated disp…
inercia Jun 28, 2026
28fd1c5
feat(web): show per-prompt model override chip in prompts dropup (mit…
inercia Jun 28, 2026
21ec1f0
fix(web): show only the lightning chip for model override, drop model…
inercia Jun 28, 2026
87c8e75
feat(web): replace UI prompt bubble toggle with stop button
inercia Jun 28, 2026
a0544f2
style(web): match UI prompt stop button to streaming stop button
inercia Jun 28, 2026
a561514
feat(conversation): show timeline pill on transient per-prompt model …
inercia Jun 28, 2026
99a4a56
fix(session): use unique temp filenames to prevent concurrent rename …
inercia Jun 28, 2026
063e318
feat(web): round-trip model profiles through config GET + save (mitto…
inercia Jun 28, 2026
5df17eb
feat(web): add Models settings tab for model profiles (mitto-rf4g.4)
inercia Jun 28, 2026
704635b
feat(config): land model-profile data model, Go API, and Settings rou…
inercia Jun 28, 2026
0cc3703
docs(config): document model profiles (YAML + internal Go API, interf…
inercia Jun 28, 2026
caf404a
test(web): add Models settings tab transform tests (mitto-rf4g.5)
inercia Jun 28, 2026
d27291a
feat(config): add Model(tag) predicate for templates & CEL (mitto-i5sr)
inercia Jun 28, 2026
4e90cee
feat(config): seed well-known model profiles in default config (mitto…
inercia Jun 28, 2026
cbabf32
feat(web): surface MCP bind failure as persistent UI badge
inercia Jun 28, 2026
6c17b83
refactor(web): improve periodic UI prompt selector
inercia Jun 28, 2026
dad531a
docs: simplify workspace RC documentation
inercia Jun 28, 2026
ab79145
chore: run gofmt on codebase
inercia Jun 28, 2026
4fec69c
chore: regenerate tailwind CSS
inercia Jun 28, 2026
9bd94f8
feat(conversation): in-place context flush for periodic FreshContext …
inercia Jun 28, 2026
653a94e
feat(prompts): use Go templates only for argument substitution
inercia Jun 29, 2026
b0fadf8
feat(prompts): migrate built-in prompts to Go-template args
inercia Jun 29, 2026
0f6bf67
docs: document removal of legacy dollar-brace VAR prompt args
inercia Jun 29, 2026
df68445
fix(hooks): resilient tunnel monitor and quiet down-hook (mitto-csx)
inercia Jun 29, 2026
bb3f150
fix(mcpserver): keep SSE stream alive during long-blocking tool calls
inercia Jun 29, 2026
0b31363
fix(web): back off periodic schedule on transient delivery failures
inercia Jun 29, 2026
22a7d3e
fix(acpproc): bound NewSession total time and log rpc_code (mitto-8d7)
inercia Jun 29, 2026
a66ef1a
fix(conversation): pause prompt inactivity watchdog during in-flight …
inercia Jun 29, 2026
835c271
feat(config): add item.Labels field to CEL context for beads prompts
inercia Jun 30, 2026
5aee677
chore(prompts): add analyze-logs and github-post-merge-cleanup prompt…
inercia Jun 30, 2026
c9b6b96
docs: update agent rules and prompt documentation
inercia Jun 30, 2026
4e1e265
feat(web): add edit-arguments button for periodic prompts (mitto-2eu)
inercia Jun 30, 2026
3f74a55
test(web): add Jest tests for PromptParameterDialog initialValues see…
inercia Jun 30, 2026
7898f4e
test(ui): add Playwright E2E test for periodic edit-arguments button
inercia Jun 30, 2026
4de193d
chore: apply Prettier formatting and gofmt across codebase
inercia Jun 30, 2026
7f0068f
feat(prompts): add multiLine flag for multi-line text inputs (mitto-34p)
inercia Jun 30, 2026
fe91cc0
feat(processors): make memorize-preferences destination file configur…
inercia Jun 30, 2026
ce729cc
feat(beads): stamp bd writes with mitto actor for attribution (mitto-…
inercia Jun 30, 2026
13a2098
fix(frontend): preserve load-more button on startup sync
inercia Jun 30, 2026
0de6ab8
feat(prompts): support !menu exclusion syntax in prompt front-matter …
inercia Jun 30, 2026
146b1cb
feat(prompts): exclude one-shot builtins from periodic selector (mitt…
inercia Jun 30, 2026
8223f12
feat(beads): auto-refresh Tasks view on .beads changes via fsnotify (…
inercia Jun 30, 2026
71661f6
feat(config): tri-state delete-conversation confirmation (mitto-c8r)
inercia Jun 30, 2026
b27e496
feat(config): add folder shortcuts configuration and persistence
inercia Jun 30, 2026
214cae8
feat(web): add folder shortcuts API endpoints
inercia Jun 30, 2026
04402cb
feat(frontend): add IconPicker component
inercia Jun 30, 2026
299a9c4
feat(frontend): add Shortcuts tab to Workspaces Dialog
inercia Jun 30, 2026
24cbd81
feat(agents): improve Augment MCP server detection
inercia Jun 30, 2026
9f1b31b
fix(conversation): prevent duplicate model-change pills on session re…
inercia Jun 30, 2026
c6e4ba3
test(ui): add Playwright tests for Cmd+W close-conversation confirmation
inercia Jun 30, 2026
bb5e55f
feat(prompts): add optional Repository parameter to GitHub babysit pr…
inercia Jun 30, 2026
20d2164
fix(web): gate Restart ACP button on live shared ACP process
inercia Jun 30, 2026
4d0ca7c
feat(prompts): add optional Repository parameter to babysit-my-prs pr…
inercia Jun 30, 2026
3c5c890
feat(config): cap beads watcher debounce with a maxWait bound
inercia Jun 30, 2026
62a4763
feat(config): add mode + default to PromptPeriodic for per-send perio…
inercia Jun 30, 2026
88cd998
feat(web): add periodic mode/default/toggleable prompt helpers (mitto…
inercia Jun 30, 2026
8450e06
feat(web): thread per-send asPeriodic override through prompt dispatc…
inercia Jun 30, 2026
d459419
feat(web): beadsList per-item periodic toggle vs locked badge (mitto-…
inercia Jun 30, 2026
f923fc6
feat(prompts): apply periodic mode/default flags to builtin prompts (…
inercia Jun 30, 2026
b7975ee
feat(web): mode-aware periodic toggle in context menus + prompts drop…
inercia Jun 30, 2026
4933b42
feat(config): add singleton attribute to prompt model (mitto-4mb.1)
inercia Jun 30, 2026
575cb85
feat(session): track origin prompt name on conversations (mitto-4mb.2)
inercia Jun 30, 2026
d9ad282
feat(web): backend find-or-route logic for singleton prompts (mitto-4…
inercia Jun 30, 2026
94dfcd3
feat(web): honor singleton reused response with focus + toast (mitto-…
inercia Jun 30, 2026
89de50e
feat(prompts): mark builtin beads overview/maintenance prompts single…
inercia Jun 30, 2026
7966419
fix(web): don't clobber session state when singleton create is reused…
inercia Jun 30, 2026
6f82d1b
test(ui): Playwright E2E for singleton prompt reuse (mitto-4mb.5)
inercia Jun 30, 2026
789948d
test(integration): singleton busy-reuse does not duplicate prompt (mi…
inercia Jun 30, 2026
87fd282
feat(config): carry singleton and tags on inline config.yaml prompts …
inercia Jun 30, 2026
9338823
refactor(session): extract shared FindSingletonCandidate scanner (mit…
inercia Jun 30, 2026
ede9dae
feat(session): add onTasks periodic trigger types and validation
inercia Jul 1, 2026
1d411bf
feat(config): add CEL evaluator for tasks condition with snapshot/diff
inercia Jul 1, 2026
9313ab9
feat(web): wire onTasks runner with watcher and loop prevention
inercia Jul 1, 2026
7f1e886
feat(api): add onTasks REST and MCP surface
inercia Jul 1, 2026
a3ab6fb
feat(ui): add On tasks trigger tab with CEL condition editor
inercia Jul 1, 2026
044a8f0
test: add onTasks e2e integration tests
inercia Jul 1, 2026
e74ac34
docs: document onTasks trigger and loop prevention
inercia Jul 1, 2026
4af0504
chore: clean up user preferences
inercia Jul 1, 2026
21ef081
feat(mcp): singleton find-or-route in mitto_conversation_new (mitto-4…
inercia Jul 1, 2026
b4eb7d8
feat: add beads self-suppression to prevent spurious UI updates
inercia Jul 1, 2026
38c8341
refactor: remove periodic config from beads prompts
inercia Jul 1, 2026
3b5c6d8
docs: clarify memorize-preferences captures personal user prefs only
inercia Jul 1, 2026
682758e
refactor: remove unused Dashboard view component
inercia Jul 1, 2026
ac8b439
fix: use explicit Fragment component instead of shorthand
inercia Jul 1, 2026
387ea12
test: update prompt template test expectations
inercia Jul 1, 2026
c5f19a5
fix(ui): prevent spurious "Discard changes?" after save in beads panel
inercia Jul 1, 2026
c9c7780
fix(ui): add preventDefault to Escape key handlers
inercia Jul 1, 2026
074cc0b
refactor(ui): update periodic prompt UI presentation
inercia Jul 1, 2026
629ff2a
fix(hooks): kill process group on down-hook timeout
inercia Jul 1, 2026
ba14c9e
fix(beads): return 404 instead of 500 for missing issue
inercia Jul 1, 2026
d67f879
chore(conversation): remove unused bgsession_* delegators
inercia Jul 1, 2026
a9b747a
fix(acpproc): reduce SetSessionModel retry log noise
inercia Jul 1, 2026
0a78834
test(acpproc): add test for setModelFailureIsTerminal
inercia Jul 1, 2026
c3896fb
feat(ui): add workspace file link navigation in beads viewer
inercia Jul 1, 2026
f954980
refactor(ui): replace select with daisyUI dropdown for chat config op…
inercia Jul 1, 2026
44fc246
fix(css): use double-colon pseudo-element notation for tooltip
inercia Jul 1, 2026
19e2cf3
fix(lint): remove stale react-hooks eslint-disable comments
inercia Jul 1, 2026
43a25f9
feat(config): add Session.HasMessages CEL variable for prompt gating
inercia Jul 1, 2026
b3bd6bc
feat(config): add Git status CEL/template functions (GitFileModified,…
inercia Jul 1, 2026
03807f9
feat(processors): add argument interpolation support for processors
inercia Jul 1, 2026
6f6ba12
feat(ui): add reusable ConfigOptionSelect component for session confi…
inercia Jul 1, 2026
5fda12f
feat(ui): enhance SettingsDialog with ConfigOptionSelect integration
inercia Jul 1, 2026
b3ef1cb
feat(api): add config_options endpoint for session configuration meta…
inercia Jul 1, 2026
e45797a
refactor(prompts): update builtin prompts to use new CEL variables an…
inercia Jul 1, 2026
7832932
refactor(processors): update builtin processors for new argument syntax
inercia Jul 1, 2026
c90dbb2
test(integration): fix 8 failing integration tests
inercia Jul 1, 2026
56524bb
test(config): add comprehensive tests for new template functions
inercia Jul 1, 2026
c173877
feat(prompts): add reproduce-bug builtin prompt
inercia Jul 1, 2026
83dafd5
refactor(config): rename Git CEL functions for consistency
inercia Jul 1, 2026
892a785
feat(conversation): add agent-working heartbeat for silent tool calls…
inercia Jul 1, 2026
253d955
fix(mcp): downgrade children-wait timeout WARN to DEBUG for still-pro…
inercia Jul 1, 2026
ac9510a
Track UI test fixtures under tests/fixtures/**/.mitto/ (mitto-ggd)
inercia Jul 1, 2026
f1853a2
feat(config): add named Model profiles for session & auxiliary model …
inercia Jul 1, 2026
b43b108
feat(web): expose model_profile in config API handlers
inercia Jul 1, 2026
7542256
feat(ui): add ModelProfileSelect and wire profiles into Settings/Work…
inercia Jul 1, 2026
146d207
fix(config): round-trip prompt Tags in ToWebPrompt
inercia Jul 1, 2026
aeec831
feat(prompts): reference global model profiles in preferredModels (mi…
inercia Jul 1, 2026
32f6d60
test(integration): wait on terminal restart message to include backof…
inercia Jul 1, 2026
3a77ff1
feat(prompts): add gear button in prompts menu to open Workspaces on …
inercia Jul 1, 2026
03c24c9
feat(prompts): add 'Iterate fixing bug' periodic label-state-machine …
inercia Jul 1, 2026
eb5cbdf
feat(prompts): add 'Iterate implementing feature' periodic label-stat…
inercia Jul 1, 2026
403a537
feat(prompts): per-phase model tiering for 'Iterate fixing bug' (mitt…
inercia Jul 1, 2026
305a5fb
fix(fmt): gofmt prompt_dispatcher.go/_test.go; make git template-func…
inercia Jul 1, 2026
6d568d4
docs(rules): add periodic-prompt design patterns; tidy 07-prompts (mi…
inercia Jul 1, 2026
e180292
feat(prompts): per-phase model tiering for feature flow (mitto-gap.5)
inercia Jul 1, 2026
3aae6d4
feat(prompts): add Iterate fixing bugs beadsList orchestrator (mitto-…
inercia Jul 1, 2026
7a984b9
feat(prompts): add Iterate implementing features beadsList orchestrat…
inercia Jul 1, 2026
a6b4811
docs: add label-as-state-machine pattern guide for periodic beads pro…
inercia Jul 1, 2026
27dfdca
feat(prompts): add Publish post blog-label state-machine builtin (mit…
inercia Jul 1, 2026
220e924
feat(prompts): add Triage untriaged bugs beadsList orchestrator built…
inercia Jul 1, 2026
60b0b3a
fix(fmt): gofmt internal/config/prompt_template_test.go
inercia Jul 1, 2026
985f8ee
chore(hooks): add pre-commit gofmt guard (make install-hooks)
inercia Jul 1, 2026
b7897ad
fix(mitto-dl2): complete deferred ACP handshake before template render
inercia Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .augment/rules/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ internal/processors/ → Command processors (pre/post processing via external c
internal/runner/ → Restricted runner, sandbox execution (go-restricted-runner)
internal/secrets/ → Secure credential storage (Keychain on macOS)
internal/session/ → Session persistence (Store/Recorder/Player/Lock/Queue/Flags)
internal/web/ → Web interface server (HTTP, WebSocket, MarkdownBuffer)
internal/conversation/→ Runtime conversation domain: BackgroundSession, SessionManager, QueueTitleWorker, streaming buffers, domain interfaces (never imports internal/web)
internal/web/ → HTTP/WebSocket delivery + infrastructure layer; wires and serves the conversation domain (depends on internal/conversation)
web/static/ → Frontend (Preact/HTM)
├── components/ → UI components (ChatInput, QueueDropdown, Message, etc.)
├── hooks/ → Custom hooks (useWebSocket, useSwipeNavigation, useResizeHandle)
Expand Down
65 changes: 35 additions & 30 deletions .augment/rules/01-go-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,31 @@ keywords:

## Callback Patterns

### Consistent Parameter Ordering

When callbacks need ordering/tracking info, put it first:

Ordering/tracking info first:
```go
OnAgentMessage func(seq int64, html string)
OnToolCall func(seq int64, id, title, status string)
```

### Passing Data Through Buffers

When buffering content that needs metadata (like seq), track it in the buffer:

For buffered content with metadata, track in buffer:
```go
type Buffer struct {
content strings.Builder
pendingSeq int64 // Metadata from first write
}

func (b *Buffer) Write(seq int64, data string) {
if b.content.Len() == 0 {
b.pendingSeq = seq // First write's metadata wins
}
b.content.WriteString(data)
}

func (b *Buffer) Flush() {
seq := b.pendingSeq // Capture before reset
seq := b.pendingSeq
b.pendingSeq = 0
b.onFlush(seq, b.content.String())
}
```

## Interface-Based Decoupling

Define interface where it's USED, not where it's implemented:

Define interface where it's USED:
```go
type SeqProvider interface {
GetNextSeq() int64
}

type WebClient struct {
seqProvider SeqProvider
}

func (bs *BackgroundSession) GetNextSeq() int64 {
return bs.getNextSeq()
}
type SeqProvider interface { GetNextSeq() int64 }
type WebClient struct { seqProvider SeqProvider }
```

## Deadlock Prevention
Expand All @@ -76,6 +52,35 @@ r.mu.Lock(); defer r.mu.Unlock(); r.recordEvent(...)
r.mu.Lock(); defer r.mu.Unlock(); r.store.AppendEvent(...)
```

## Bounded Deadline Context in Retry Loops

When a retry loop has no parent deadline (deadline-less or very generous context), each per-attempt timeout consumes wall-clock time independently, burning all attempts even on hung transport.

**Pattern** (mitto-8d7): Derive a `budgetCtx` that caps the *entire sequence*:

```go
const totalBudget = 60 * time.Second

budgetCtx := ctx
if dl, ok := ctx.Deadline(); !ok || time.Until(dl) > totalBudget {
var budgetCancel context.CancelFunc
budgetCtx, budgetCancel = context.WithTimeout(ctx, totalBudget)
defer budgetCancel()
}

// Use budgetCtx inside the loop (never extend caller's deadline)
for attempt := 1; attempt <= maxAttempts; attempt++ {
if budgetCtx.Err() != nil {
return nil, fmt.Errorf("context cancelled before attempt %d", attempt)
}
attemptCtx, cancel := context.WithTimeout(budgetCtx, perAttemptTimeout)
// ... attempt logic ...
cancel()
}
```

**Key principle**: Only *tighten* deadlines, never extend. `shouldFailFastCreateAttempt` bails when remaining budget < per-attempt timeout.

## Explicit Lock Management in Retry Loops

`defer mu.Unlock()` does **not** compose safely with manual unlock + retry. If the locked variable is reassigned during retry, defer fires on the wrong object → double-unlock panic.
Expand Down
47 changes: 29 additions & 18 deletions .augment/rules/02-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@ func (bs *BackgroundSession) onAgentMessage(seq int64, html string) {
}
```

### Event.Meta: Generic Metadata Bag

Attach optional metadata to events using `RecordOption` during persistence:

```go
// Persist with metadata
recorder.RecordEventWithSeq(event,
session.WithMeta(session.EventMeta{
WorkingDir: "/path/to/dir",
TaskID: "task-123",
}),
)
```

**Key patterns**:
- `Event.Meta` is a generic map (`map[string]interface{}`), size-capped at 64 KB
- Metadata is **not persisted to events.jsonl** — stored separately in `event_meta.jsonl`
- On event read, metadata is attached if a corresponding entry exists
- Use `WithMeta()` `RecordOption` to inject metadata during `RecordEventWithSeq()`
- Observers notified via `EventMetaObserver` interface (see `11-web-backend-sequences.md`)

### MaxSeq Tracking

The `Metadata.MaxSeq` field tracks the highest persisted sequence number. `ACPStartFailureCount` persists cold-start failure state across app restarts — `session_manager.go` increments it on exhausted retries and auto-archives when it reaches 3:
Expand Down Expand Up @@ -98,26 +119,16 @@ lock.SetWaitingPermission("File write") // During permission request

## Periodic Prompts (PeriodicStore)

Stored in `periodic.json` per session. API: `GET/PUT/PATCH/DELETE /api/sessions/{id}/periodic`, `POST /api/sessions/{id}/periodic/run-now`.

```go
ps := store.Periodic(sessionID)
ps.Set(&session.PeriodicPrompt{Prompt: "...", Frequency: ..., Enabled: true})
ps.Update(prompt, promptName, frequency, enabled, freshContext, maxIterations) // partial update (pointer args, nil = no-op)
ps.RecordSent() // increments iteration_count + updates last_sent_at + next_scheduled_at
ps.TriggerNow(sessionID, resetTimer) // immediate delivery via periodicRunner
```
Stored in `periodic.json`. Only top-level sessions may have periodic prompts (child → 400).

**Max iterations / auto-stop** (`PeriodicPrompt` fields):
- `MaxIterations` (json `max_iterations`, 0/absent = unlimited) — per-conversation cap on scheduled runs.
- `IterationCount` (json `iteration_count`) — runs delivered so far; incremented **only** by `RecordSent` (never by `Update`/`Set`, which preserve it).
- `ReachedMaxIterations()` → true when `MaxIterations > 0 && IterationCount >= MaxIterations`.
- **Auto-stop**: in `periodic_runner.go` `deliverPrompt`'s `OnComplete`, after `RecordSent` the runner compares `IterationCount` against `config.EffectiveMaxPeriodicIterations(promptMax, configMax)` (smallest positive of prompt cap, config `max_periodic_iterations` default 100, hardcoded `GlobalMaxPeriodicIterations`=1000). When reached it **disables** the periodic (`Update(enabled=false)`) — it is **not** archived/deleted — and broadcasts via the `onPeriodicAutoStopped` callback.
**Key fields**:
- `PromptName` — references workspace prompt by name (resolved at send time via cache)
- `MaxIterations` — cap on runs (0 = unlimited). Auto-disables when reached.
- `Trigger` — `schedule` (default) or `onCompletion` (event-driven)
- `DelaySeconds` — wait after agent idle before firing (onCompletion only)
- `MaxDurationSeconds` — wall-clock cap since first run

**Key rules**:
- Only top-level/parent sessions may have periodic prompts (child sessions return 400)
- `PromptName` references a named workspace prompt by name instead of embedding full text. `Validate()` accepts empty `Prompt` when `PromptName` is set. The periodic runner resolves the name to text at send time via the prompts cache.
- **Caller update required**: Changing `PeriodicStore.Update()` signature requires updating **both** `internal/web/session_periodic_api.go` (PATCH handler) AND `internal/mcpserver/server.go` (MCP tool handler) — both call `Update()`.
**Critical**: Changing `PeriodicStore.Update()` signature requires updating BOTH `session_periodic_api.go` (PATCH handler) AND `mcpserver/server.go` (MCP tool) — both call `Update()`.

## Auxiliary Package

Expand Down
128 changes: 42 additions & 86 deletions .augment/rules/03-cli-acp.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,67 +18,26 @@ keywords:

## CLI Patterns

### Cobra Command Structure
Multi-workspace: `mitto web --dir auggie:/path/to/project1 --dir claude-code:/path/to/project2`

```go
var cliCmd = &cobra.Command{
Use: "cli",
Short: "One-line description",
RunE: runCLI,
}
```

### User Feedback

```go
fmt.Printf("🚀 Starting ACP server: %s\n", server.Name)
fmt.Printf("✅ Connected (protocol v%v)\n", version)
```

### Multi-Workspace CLI Usage

```bash
mitto web --dir /path/to/project1 --dir /path/to/project2
mitto web --dir auggie:/path/to/project1 --dir claude-code:/path/to/project2
```

### `--host` Flag (Security-Sensitive)

`mitto web --host 0.0.0.0` binds to all interfaces (needed for Docker). Default is `127.0.0.1`.

**Security**: The local listener runs without authentication. When `--host` is not a loopback address, a runtime warning is printed. Never expose to untrusted networks.
`--host 0.0.0.0` (Docker) vs `127.0.0.1` (default). No authentication on local listener; warn if exposed.

## ACP Protocol

### SDK: `github.com/coder/acp-go-sdk`

- The `Client` struct implements `acp.Client` interface
- Use `acp.ClientSideConnection` for protocol handling
- JSON-RPC 2.0 over stdin/stdout of the agent subprocess

### ContentBlock — Discriminated Union
SDK: `github.com/coder/acp-go-sdk` over JSON-RPC 2.0 stdin/stdout.

**ContentBlock** (discriminated union): Check type via nil-pointer checks, NOT `Type()`:
```go
// Check type via nil pointer checks (NOT a Type() method):
if block.Image != nil { /* block.Image.Data, block.Image.MimeType */ }
else if block.Text != nil { /* block.Text.Text */ }

// Create blocks via helpers:
acp.TextBlock("hello")
acp.ImageBlock(base64Data, "image/png")
if block.Image != nil { use block.Image.Data }
else if block.Text != nil { use block.Text.Text }
```

**Anti-pattern**: `block.Type()`, `acp.ContentBlockTypeImage` do NOT exist.

### Connection Lifecycle

**Connection lifecycle**:
```go
conn, err := acp.NewConnection(ctx, command, autoApprove, output, logger)
defer conn.Close()

conn.Initialize(ctx) // Returns AgentCapabilities
conn.NewSession(ctx, cwd) // Returns SessionID + Modes
conn.Prompt(ctx, message) // Streaming response via callbacks
conn, err := acp.NewConnection(ctx, cmd, autoApprove, output, logger)
conn.Initialize(ctx) // AgentCapabilities
conn.NewSession(ctx, cwd) // SessionID + Modes
conn.Prompt(ctx, msg) // Streaming via callbacks
```

### Agent Capabilities
Expand All @@ -88,6 +47,32 @@ caps := resp.AgentCapabilities
bs.agentSupportsImages = caps.PromptCapabilities.Image
```

### Error Code Extraction & Logging

Wrap `*acp.RequestError` extraction in a helper for structured logging (mitto-8d7):

```go
// rpcErrorCode extracts the JSON-RPC error code from err when it (or any error it
// wraps) is an *acp.RequestError. Used to surface a structured, queryable rpc_code
// field in addition to the full error string.
func rpcErrorCode(err error) (int, bool) {
var re *acp.RequestError
if errors.As(err, &re) && re != nil {
return re.Code, true
}
return 0, false
}

// Log both code and message:
rpcCode, _ := rpcErrorCode(err)
logger.Warn("NewSession failed",
"rpc_code", rpcCode,
"error", err.Error(),
)
```

This decouples error-code queries (e.g., alerting on `-32603` internal server errors) from full error strings.

### Permission Handling

```go
Expand All @@ -104,38 +89,9 @@ resp := CancelledPermissionResponse()

## Agent Definitions

Agents are defined in `config/agents/builtin/<agent>/` (shipped) or `MITTO_DIR/agents/custom/<agent>/` (user-created).

### Key Types (`internal/agents/types.go`)

| Type | Purpose |
|------|---------|
| `AgentMetadata` | Parsed from `metadata.yaml` |
| `MCPMetadata` | MCP scope capabilities (`Scopes []string`) |
| `MCPInstallInput` | JSON input to `mcp-install.sh` (includes `Scope` field) |
| `AgentDefinition` | Resolved agent with metadata + filesystem location |

### metadata.yaml structure

```yaml
name: claude-code
displayName: Claude Code
acpId: claude
mcp:
scopes: ["user", "project", "local"] # supported scopes
install:
method: npx
package: "@anthropic-ai/claude-code"
```

**MCP scope values**: `user` (global config), `project` (per-repo), `local` (local-only, not committed).

### Agent Commands

- `CommandMCPList` (via `mcp-list.sh`) — List MCP servers
- `CommandMCPInstall` (via `mcp-install.sh`) — Install MCP server
- `CommandMCPRemove` (via `mcp-remove.sh`) — Remove MCP server (scope must match metadata)

### Adding Agents
Located in `config/agents/builtin/<agent>/` (shipped) or `MITTO_DIR/agents/custom/<agent>/` (custom).

Create `config/agents/builtin/<name>/metadata.yaml` + scripts (`install.sh`, `mcp-list.sh`, `mcp-install.sh`, `mcp-remove.sh`). Set `mcp.scopes` in metadata.
**metadata.yaml**: Defines agent, MCP scopes, install method, default env/constraints/tags.
**MCP scopes**: `user` (global), `project` (per-repo), `local` (uncommitted).
**Agent defaults** (seeded at discovery): Pre-fill ACP server settings. Request-wins: user values take precedence.
**Commands**: `mcp-list.sh`, `mcp-install.sh`, `mcp-remove.sh` (scope must match metadata).
Loading
Loading