Commit 87846ef
Second of the cleanups proposed in #214 (Group A). Purely additive
field updates — no behavior changes. Brings `npm run check` from
53 -> 27 errors (closes 26).
## What was wrong
`SubAgentForm.svelte` reads and writes nine fields that the type
contracts never exposed. The reads/writes are correct — the data
round-trips through `settings.json`, the Rust `subagents` table (20
columns, all present in `subagents.rs` and `subagent_writer.rs`), and
Tauri — but `$lib/types` and `markdownParser` had drifted, so the
errors piled up silently.
## Changes
- `subagent.ts` — add `disallowedTools`, `maxTurns`, `memory`,
`background`, `effort`, `isolation`, `hooks`, `mcpServers`,
`initialPrompt` to both `SubAgent` (read via `Partial<SubAgent>` as
the form's `initialValues`) and `CreateSubAgentRequest` (the object
the form's `handleSubmit` builds). Types match the Rust struct:
string arrays, a numeric `maxTurns`, a boolean `background`, the
rest strings.
- `markdownParser.ts` — add the seven fields that `applyParsedSubAgent`
assigns to `ParsedSubAgent` (`hooks`/`mcpServers` excluded — the
paste/import path doesn't touch them).
## Maps to #214 groups
Closes group **A** (SubAgent / ParsedSubAgent type drift, 26 errors).
The remaining 27 errors fall into #214's groups B, D, E, H, K, M —
targets for follow-up PRs.
## Test plan
- [x] `npm run check` — 27 errors (down from 53 on `main`)
- [x] `npx vitest run` — 1565/1565 tests pass
- [x] Verified zero NEW errors (remaining 27 all pre-existing, map to
#214's other groups)
Co-authored-by: Tyler Gray <tylerg@emergentsoftware.net>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 85d9921 commit 87846ef
2 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
27 | 45 | | |
28 | 46 | | |
29 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
0 commit comments