> ## Documentation index
> Fetch the complete documentation index at: https://cynrath-agent-context-kit-git-feat-unified-local-toolkit-eedde3.docs7.io/llms.txt
> Ask it with GET https://cynrath-agent-context-kit-git-feat-unified-local-toolkit-eedde3.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Corrective inventory

# Corrective inventory: source capabilities vs integrated toolkit (TASK-0115)

Status: working reference for the corrective chain TASK-0115 → TASK-0116 →
TASK-0117 → TASK-0118 → TASK-0114 final gate. Supersedes the premature
"TASK-0112 complete" and "TASK-0113 optimized" claims for the criteria noted
below; archived TASK-0112/TASK-0113 records themselves are untouched.

Verification basis (read-only on source, no mutation):

- Destination branch `feat/unified-local-toolkit`, HEAD `f08bc11` (plan commit;
  prior integration HEAD `457513c`). Working tree clean except this task's
  drafting files.
- Source checkout revision `c399fd3`, status clean (`git status --short
  --branch` shows clean on `main`). No reset, no import of source history.
- Method: `mcp/src/server.ts` `allTools` registration + `local-policy.ts`
  (`nativeTools`, `isFileOperation`, legacy policy slot) + reachable
  `control/` imports and child executables; destination `git ls-files` +
  `src/mcp/managed*.ts` + `packages/local-tools/src/**` +
  `packages/desktop/src/**`.

## 1. Source tool registration (25 static + 1 legacy slot)

`mcp/src/server.ts` builds `allTools` with 25 named entries, then appends the
legacy policy-driven slot (`legacyToolDefinitions()`) and filters through
`shouldIncludeTool` (`isNativeTool`: 8 always-native reads/sessions +
`LOCAL_MCP_ENABLE_WRITE=1` mutations + `LOCAL_MCP_ENABLE_SEARCH=1` searches).
`track_ui_event` is handled in the `CallTool` switch but is not an advertised
tool (internal transport). Counts reconcile: 25 advertised + 1 legacy = 26
capability slots. The "26-tool" shorthand is retained only in this sense.

| # | Source capability | Destination integrated tool(s) | Status |
|---|---|---|---|
| 1 | `get_config` (read server config) | `ackit_doctor` (config-health subset) | Partial — live operator config surface intentionally not exposed |
| 2 | `set_config_value` (live operator mutation) | — | Intentionally excluded (ADR-0036: no untrusted-client config mutation) |
| 3 | `read_file` (text/xlsx/pdf/docx/images, offset/length, URL mode) | `ackit_text_read`, `ackit_fs_read_many`, `ackit_doc_read` | Partial — `READ_EXT` allowlist, approval per call, digest recheck; URL reads refused; images not rendered |
| 4 | `read_multiple_files` | `ackit_fs_read_many` | Implemented (max 16 files, same gates) |
| 5 | `write_file` (text + xlsx/json-array + docx-create) | `ackit_text_write`, `ackit_doc_write_xlsx`, `ackit_doc_write_docx` | Implemented (SHA-256 digest gate, atomic staging, original preserved on failure) |
| 6 | `write_pdf` (markdown→PDF, page ops, HTML/CSS/SVG, images) | `ackit_doc_write_pdf` | Partial — self-contained `pdf-lib` output only; no Chromium/`md-to-pdf` renderer download (ADR-0036); remote resources refused |
| 7 | `create_directory` | `ackit_fs_mkdir` | Implemented (parent must exist; `examples/` flat-fixture reservation) |
| 8 | `list_directory` (depth, 100-item nested cap) | `ackit_fs_list` | Implemented (paginated, cost-budgeted, approval-bound even for reads) |
| 9 | `move_file` | `ackit_fs_move` | Implemented (same extension, link-then-unlink atomicity, digest recheck) |
| 10 | `start_search` (persistent background session) | `ackit_search` | Partial — bounded one-shot literal search; no persistent sessions (see 11–13) |
| 11 | `get_more_search_results` (session pagination) | — | Intentionally excluded (no persistent search sessions; one-shot returns bounded set) |
| 12 | `stop_search` | — | Intentionally excluded (same reason) |
| 13 | `list_searches` | — | Intentionally excluded (same reason) |
| 14 | `get_file_info` (size/times/perms/sheets/lineCount) | `ackit_doc_read` | Partial — metadata for txt/xlsx/docx/pdf via `READ_EXT`; other extensions refused |
| 15 | `edit_block` (text find/replace, xlsx range, docx XML incl. headers/footers) | `ackit_text_write` (full-content digest gate), `ackit_doc_edit_docx` (all header/footer parts incl. `header4+`) | Implemented with deliberate difference (substring sessions replaced by digest-gated full-content writes) |
| 16 | `start_process` (shell/REPL/`node:local`, smart detection) | `ackit_process_start` | Partial — exact argv tokens only (`shell: false`, PATH-resolved program, controlled env, wait ceiling); no REPL discovery, no `node:local`, no shell heuristics |
| 17 | `read_process_output` (offset/length pagination, prompt detection) | `ackit_process_read` | Implemented (owned sessions only, paginated, origin revalidated) |
| 18 | `interact_with_process` (stdin, prompt wait, telemetry) | `ackit_process_interact` | Implemented (bounded input, permission rechecked, no shell; no telemetry) |
| 19 | `force_terminate` | `ackit_process_terminate` | Implemented (owned tree kill: taskkill /T /F, POSIX SIGTERM→SIGKILL; revoke disposes) |
| 20 | `list_sessions` | `ackit_process_list` | Implemented (owned sessions only) |
| 21 | `list_processes` (system-wide enumeration) | — | Intentionally excluded (enumeration risk; owned list covers retained need) |
| 22 | `kill_process` (arbitrary PID) | `ackit_process_kill` | Partial — owned sessions only; arbitrary-PID kill excluded as DoS surface |
| 23 | `get_usage_stats` (telemetry) | — | Intentionally excluded (ACKit evidence/audit logs are the project equivalent) |
| 24 | `get_recent_tool_calls` (operator history) | — | Intentionally excluded (same reason) |
| 25 | `give_feedback_to_desktop_commander` (upstream survey widget) | — | Intentionally excluded (upstream widget; no equivalent) |
| 26 | legacy policy-driven slot (`policy/tools`, `policy/extras`) | `ackit_workflow_advance`, `ackit_workflow_verify`, `ackit_task_doctor` | Implemented as typed canonical transitions (no force, no generic CLI bridge) |

Prior mapping claim "16 full + 2 partial, 8 excluded, 0 pending" is superseded
by the table above: 25 + 1 rows are now explicit, partials are named (1, 3, 6,
10, 14, 16, 22), and each exclusion carries its design reason. Any capability
restored in TASK-0117 updates this table; exclusions without a visible
product-decision record remain open findings, not silent drops.

ACKit-native additions (no source equivalent, preferred agent surface): 22
direct project tools (scan/doctor/pack/instruction-graph/skills/tasks/policy/
workspaces/readiness/diagnostics plus 6 compact queries) — unchanged, CLI
remains the fallback.

## 2. Native/desktop surface (the implementation gap)

Source `control/` files vs destination `packages/desktop/` (9 tracked files:
LICENSE, README, THIRD-PARTY-NOTICES, `assets/locales/catalog.json`,
`package.json`, `src/broker.ts`, `src/index.ts`, `src/locale.ts`,
`tsconfig.json`):

| Source helper | Destination | Status |
|---|---|---|
| `control/windows/Approval.cs` (WinForms approval window, Ctrl+Alt+Enter once-only hotkey, chime, DPAPI vault modes, themes/i18n/responsive layout) | — | **Missing** — TASK-0116 ports to `packages/desktop/native/` with ACKit brand/namespace |
| `control/windows/approval.manifest` | — | **Missing** — port with the C# source (digest-pinned) |
| `control/native-approval.mjs` (spawn protocol, NATIVE_SHOWN/HOTKEY markers, expiry kill, notifier) | `src/broker.ts` 17-line contract only | **Missing** — TASK-0116 `src/native-approval.ts` |
| `control/native-build.mjs` (digest pin, isolated compile, GUI-subsystem validation, arch fallback) | — | **Missing** — TASK-0116 `src/native-build.ts` |
| `control/tray.mjs` + `tray-windows.ps1` + `tray-macos.swift` + `tray-linux.js` | — | **Missing** — TASK-0116 `src/tray.ts` + platform helpers |
| `control/policy.mjs` (DPAPI protect/unprotect via verified helper, user-scoped vault, `noLinks`, atomic write, zeroized buffers) | — | **Missing** — TASK-0116 `src/vault.ts` (ACKit state namespace; never reads live standalone secrets in tests) |
| `control/operator.mjs` (panel + runtime + tray + update wiring, lifecycle) | — | **Missing** — TASK-0116 `src/lifecycle.ts` + `ackit desktop` commands |
| `control/runtime.mjs`, `control/start.mjs`, `control/manage.mjs` | — | **Missing** — folded into lifecycle/CLI in TASK-0116 |
| `control/update-controller.mjs`, `update-transaction.mjs`, `update-lock.mjs`, `update-state.mjs`, `update-git.mjs`, `updater.mjs` | — | **Missing** — TASK-0116 transactional prepare/update/rollback (explicit local artifacts; no silent network checks) |
| `control/server.mjs` + `index.html` + `style.css` (web management panel) | — | Intentionally excluded (web panel; settings surface ships via native tray in TASK-0116) |
| `control/i18n.mjs` + `control/locales/catalog.json` | `src/locale.ts` + `assets/locales/catalog.json` | Implemented (TR/EN/DE preserved; 26 tunnel/hosted labels excluded by ADR-0036) |
| `control/test-*.mjs`, `test-policy.mjs`, `test-runtime*.mjs` | task-scoped suites under `tests/` | Partial — headless suites exist; visible-UI tests land in TASK-0116 |
| `control/daemon.mjs`, `autostart.mjs`, `app.js` | — | Missing — autostart/daemon decided in TASK-0116 (opt-in, owned state only) |

Conclusion: the "headless broker contract" is a boundary definition, not a
port. TASK-0112 AC-001 ("native preparation") is marked **superseded** for
the native half: broker contract + locale verified headless, but no native
helper, lifecycle, or installer exists. TASK-0116 must create them; TASK-0114
AC-001 stays unverified until then.

## 3. Policy/module surface

| Source module | Destination | Status |
|---|---|---|
| `mcp/src/policy/core.ts` (+ `files.ts`, `commands.ts`, `extras.ts`, `settings.ts`) | `packages/local-tools/src/policy/` (`core.ts`, `files.ts`, `commands.ts`, `settings.ts`, `index.ts`) | Implemented — adversarial review in TASK-0117 |
| `mcp/src/local-file-operations.ts` | `src/mcp/managed-fileops.ts` + local-tools file policy | Implemented — same review |
| `mcp/src/search-manager.ts` (persistent sessions, ranking) | `ackit_search` one-shot | Partial — truncation/resume semantics under test in TASK-0117 |
| `mcp/src/terminal-manager.ts` (shell/REPL/process tree) | `packages/local-tools/src/process/` (`manager.ts`, `tree.ts`) + `src/mcp/managed-process.ts` | Implemented (owned sessions) — ownership/escape review in TASK-0117 |
| `mcp/src/command-manager.ts`, `config-manager.ts`, `local-activity.ts`, `local-environment.ts`, `local-network.ts` | — | Intentionally excluded (live config/telemetry/network; ACKit stores are the equivalent) |
| `mcp/src/tools/{filesystem,edit,config,process,improved-process-tools,fuzzySearch*,prompts,schemas,pdf/*,usage}` + `handlers/*` | managed tools above | Mapped per §1 — behavior deltas under test in TASK-0117 |

Zod 3 (source) vs Zod 4 (destination) schema boundaries are validated
per-boundary in TASK-0117; no blanket type replacement, no `any`/ignore.

## 4. Context baseline (TASK-0113 correction)

Recorded local estimates (same deterministic estimator, fixed corpus + fixed
fact queries; not hosted or billing tokens):

- TASK-0108 baseline: 53 files, 291591 B, 72505 est. tokens, 4/6 anchors,
  3200-token pack 3199 tokens, 1007 manifest records, 270622 JSON B.
- TASK-0113 outcome: 57 files, 319216 B, 79405 est. tokens (+9.5%), 6/6
  anchors, 3200-token pack 3198 tokens, 1076 records, 350143 JSON B (+29.4%).

No real reduction was delivered; the broader token goal is unmet. TASK-0118
re-runs the fixed-corpus benchmark fairly, reduces eligible-scope bloat,
fixes the manifest-overhead gap (content budget vs serialized envelope
reported separately), and keeps 6/6 facts plus new desktop
install/approval/root/rollback/security facts. Facts are never removed to
lower a number.

## 5. Supersession record

- TASK-0112 AC-001 native half: **superseded** — see §2. Document/tool-gating
  half stands and is re-verified in TASK-0117 against this table.
- TASK-0112 AC-002/AC-003: stand as observed for the pre-native tree; reused
  only where state-bound, re-run where the implementation changes them.
- TASK-0113 AC-002 (context efficiency): **superseded** — growth recorded, no
  reduction; TASK-0118 must deliver measured improvement.
- TASK-0114 2/3 evidence: AC-002/AC-003 remain verified for the recorded
  state; AC-001 correctly unverified and now blocked on TASK-0115→0118.

No archived record is edited. New evidence is recorded only under
TASK-0115+ (this file is TASK-0115 AC-001 proof input, not a completion
claim by itself).
