@jigyasudham/veto 2.8.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +52 -5
  2. package/dist/agents/development/performance.d.ts +2 -0
  3. package/dist/agents/development/performance.d.ts.map +1 -1
  4. package/dist/agents/development/performance.js +94 -0
  5. package/dist/agents/development/performance.js.map +1 -1
  6. package/dist/agents/executor.d.ts.map +1 -1
  7. package/dist/agents/executor.js +4 -0
  8. package/dist/agents/executor.js.map +1 -1
  9. package/dist/agents/manifest.js +4 -4
  10. package/dist/agents/manifest.js.map +1 -1
  11. package/dist/agents/quality/compatibility.d.ts +2 -0
  12. package/dist/agents/quality/compatibility.d.ts.map +1 -1
  13. package/dist/agents/quality/compatibility.js +110 -0
  14. package/dist/agents/quality/compatibility.js.map +1 -1
  15. package/dist/agents/security/auth.d.ts +2 -1
  16. package/dist/agents/security/auth.d.ts.map +1 -1
  17. package/dist/agents/security/auth.js +103 -0
  18. package/dist/agents/security/auth.js.map +1 -1
  19. package/dist/agents/security/privacy.d.ts +2 -1
  20. package/dist/agents/security/privacy.d.ts.map +1 -1
  21. package/dist/agents/security/privacy.js +130 -0
  22. package/dist/agents/security/privacy.js.map +1 -1
  23. package/dist/cli/statusline.d.ts +16 -1
  24. package/dist/cli/statusline.d.ts.map +1 -1
  25. package/dist/cli/statusline.js +94 -9
  26. package/dist/cli/statusline.js.map +1 -1
  27. package/dist/cli.js +135 -5
  28. package/dist/cli.js.map +1 -1
  29. package/dist/memory/config.d.ts +10 -0
  30. package/dist/memory/config.d.ts.map +1 -1
  31. package/dist/memory/config.js +48 -8
  32. package/dist/memory/config.js.map +1 -1
  33. package/dist/memory/local.d.ts +1 -0
  34. package/dist/memory/local.d.ts.map +1 -1
  35. package/dist/memory/local.js +54 -13
  36. package/dist/memory/local.js.map +1 -1
  37. package/dist/memory/schema.d.ts +1 -1
  38. package/dist/memory/schema.d.ts.map +1 -1
  39. package/dist/memory/schema.js +3 -2
  40. package/dist/memory/schema.js.map +1 -1
  41. package/dist/memory/sync.d.ts.map +1 -1
  42. package/dist/memory/sync.js +5 -5
  43. package/dist/memory/sync.js.map +1 -1
  44. package/dist/server/handlers/advisors.d.ts.map +1 -1
  45. package/dist/server/handlers/advisors.js +70 -61
  46. package/dist/server/handlers/advisors.js.map +1 -1
  47. package/dist/server/handlers/core.d.ts.map +1 -1
  48. package/dist/server/handlers/core.js +14 -1
  49. package/dist/server/handlers/core.js.map +1 -1
  50. package/dist/server/handlers/council.d.ts.map +1 -1
  51. package/dist/server/handlers/council.js +8 -3
  52. package/dist/server/handlers/council.js.map +1 -1
  53. package/dist/server/handlers/generators.d.ts.map +1 -1
  54. package/dist/server/handlers/generators.js +96 -86
  55. package/dist/server/handlers/generators.js.map +1 -1
  56. package/dist/server/handlers/git.d.ts.map +1 -1
  57. package/dist/server/handlers/git.js +21 -19
  58. package/dist/server/handlers/git.js.map +1 -1
  59. package/dist/server/handlers/session.d.ts.map +1 -1
  60. package/dist/server/handlers/session.js +51 -2
  61. package/dist/server/handlers/session.js.map +1 -1
  62. package/dist/server/scan-core.d.ts +34 -1
  63. package/dist/server/scan-core.d.ts.map +1 -1
  64. package/dist/server/scan-core.js +41 -0
  65. package/dist/server/scan-core.js.map +1 -1
  66. package/dist/server.d.ts.map +1 -1
  67. package/dist/server.js +16 -2
  68. package/dist/server.js.map +1 -1
  69. package/dist/tools/definitions.d.ts +102 -6
  70. package/dist/tools/definitions.d.ts.map +1 -1
  71. package/dist/tools/definitions.js +90 -6
  72. package/dist/tools/definitions.js.map +1 -1
  73. package/dist/transcripts/adapters/claude.d.ts +27 -0
  74. package/dist/transcripts/adapters/claude.d.ts.map +1 -0
  75. package/dist/transcripts/adapters/claude.js +194 -0
  76. package/dist/transcripts/adapters/claude.js.map +1 -0
  77. package/dist/transcripts/archive.d.ts +23 -0
  78. package/dist/transcripts/archive.d.ts.map +1 -0
  79. package/dist/transcripts/archive.js +101 -0
  80. package/dist/transcripts/archive.js.map +1 -0
  81. package/dist/transcripts/config.d.ts +52 -0
  82. package/dist/transcripts/config.d.ts.map +1 -0
  83. package/dist/transcripts/config.js +135 -0
  84. package/dist/transcripts/config.js.map +1 -0
  85. package/dist/transcripts/expand.d.ts +20 -0
  86. package/dist/transcripts/expand.d.ts.map +1 -0
  87. package/dist/transcripts/expand.js +97 -0
  88. package/dist/transcripts/expand.js.map +1 -0
  89. package/dist/transcripts/ingest.d.ts +17 -0
  90. package/dist/transcripts/ingest.d.ts.map +1 -0
  91. package/dist/transcripts/ingest.js +113 -0
  92. package/dist/transcripts/ingest.js.map +1 -0
  93. package/dist/transcripts/manage.d.ts +42 -0
  94. package/dist/transcripts/manage.d.ts.map +1 -0
  95. package/dist/transcripts/manage.js +117 -0
  96. package/dist/transcripts/manage.js.map +1 -0
  97. package/dist/transcripts/mapping.d.ts +23 -0
  98. package/dist/transcripts/mapping.d.ts.map +1 -0
  99. package/dist/transcripts/mapping.js +42 -0
  100. package/dist/transcripts/mapping.js.map +1 -0
  101. package/dist/transcripts/mask.d.ts +26 -0
  102. package/dist/transcripts/mask.d.ts.map +1 -0
  103. package/dist/transcripts/mask.js +121 -0
  104. package/dist/transcripts/mask.js.map +1 -0
  105. package/dist/transcripts/on-save.d.ts +12 -0
  106. package/dist/transcripts/on-save.d.ts.map +1 -0
  107. package/dist/transcripts/on-save.js +37 -0
  108. package/dist/transcripts/on-save.js.map +1 -0
  109. package/dist/transcripts/pyramid.d.ts +38 -0
  110. package/dist/transcripts/pyramid.d.ts.map +1 -0
  111. package/dist/transcripts/pyramid.js +113 -0
  112. package/dist/transcripts/pyramid.js.map +1 -0
  113. package/dist/transcripts/recall.d.ts +39 -0
  114. package/dist/transcripts/recall.d.ts.map +1 -0
  115. package/dist/transcripts/recall.js +85 -0
  116. package/dist/transcripts/recall.js.map +1 -0
  117. package/dist/transcripts/schema.d.ts +69 -0
  118. package/dist/transcripts/schema.d.ts.map +1 -0
  119. package/dist/transcripts/schema.js +146 -0
  120. package/dist/transcripts/schema.js.map +1 -0
  121. package/dist/transcripts/search.d.ts +22 -0
  122. package/dist/transcripts/search.d.ts.map +1 -0
  123. package/dist/transcripts/search.js +134 -0
  124. package/dist/transcripts/search.js.map +1 -0
  125. package/dist/transcripts/store.d.ts +21 -0
  126. package/dist/transcripts/store.d.ts.map +1 -0
  127. package/dist/transcripts/store.js +105 -0
  128. package/dist/transcripts/store.js.map +1 -0
  129. package/dist/transcripts/toc.d.ts +18 -0
  130. package/dist/transcripts/toc.d.ts.map +1 -0
  131. package/dist/transcripts/toc.js +96 -0
  132. package/dist/transcripts/toc.js.map +1 -0
  133. package/dist/transcripts/tokenize.d.ts +14 -0
  134. package/dist/transcripts/tokenize.d.ts.map +1 -0
  135. package/dist/transcripts/tokenize.js +70 -0
  136. package/dist/transcripts/tokenize.js.map +1 -0
  137. package/package.json +2 -2
  138. package/server.json +2 -2
package/README.md CHANGED
@@ -37,7 +37,7 @@ The two are independent by design. `veto init` writes MCP configs that launch th
37
37
  **No API keys, zero extra cost.** Every worker agent is a deterministic expert module at its core, with two optional layers of LLM reasoning on top — all of it delegated to the AI you're already paying for.
38
38
 
39
39
  ### Default — Deterministic expert modules
40
- Out of the box, each of the 42 worker agents runs as a hand-written expert module (`plan()` / `analyze()` in `src/agents/`) — **not** an LLM. They always run, work offline, and cost zero tokens. Their depth varies by design: analysis agents (security scanner, secrets, dependency audit, clone detector) apply real algorithms — regex/AST detection, OWASP/CWE rules, hash-based clone matching — while planning agents (coder, debugger, tester, …) are structured expert playbooks: curated steps, checklists, and pitfalls for the task category, built to be reasoned over by the AI you already pay for rather than to reason themselves.
40
+ Out of the box, each of the 42 worker agents runs as a hand-written expert module (`plan()` / `analyze()` in `src/agents/`) — **not** an LLM. They always run, work offline, and cost zero tokens. Their depth varies by design: analysis agents (security scanner, secrets, dependency audit, clone detector, privacy, auth, performance, compatibility, …) apply real algorithms — regex/AST detection, OWASP/CWE rules, hash-based clone matching — while planning agents (coder, debugger, tester, …) are structured expert playbooks: curated steps, checklists, and pitfalls for the task category, built to be reasoned over by the AI you already pay for rather than to reason themselves.
41
41
 
42
42
  ### Path A — Agentic loop (most clients: Claude Code, Cursor, Windsurf)
43
43
  Veto returns the specialist's role, rubric, and an output contract as an `llm_upgrade` prompt. The host AI reasons as the specialist and passes structured JSON back to complete the operation. This is the primary path — it costs nothing beyond your existing subscription and works on every client.
@@ -76,7 +76,7 @@ The 7-agent **Council** is LLM-first — its value is the multi-agent debate —
76
76
 
77
77
  ---
78
78
 
79
- ## MCP Tools (92)
79
+ ## MCP Tools (93)
80
80
 
81
81
  | Category | Tools |
82
82
  |---|---|
@@ -90,7 +90,7 @@ The 7-agent **Council** is LLM-first — its value is the multi-agent debate —
90
90
  | **Quality** | `veto_clone_detector` · `veto_lint_rules` · `veto_api_contract` · `veto_a11y_advisor` · `veto_type_coverage` · `veto_test_gaps` |
91
91
  | **Advisors** | `veto_dep_advisor` · `veto_dep_verify` · `veto_query_advisor` · `veto_bundle_advisor` · `veto_dead_code` · `veto_hitl_checkpoint` · `veto_drift_check` |
92
92
  | **Watching** | `veto_watch` · `veto_watch_poll` · `veto_watch_stop` |
93
- | **Memory** | `veto_memory_store` · `veto_memory_search` · `veto_memory_delete` · `veto_project_map_update` · `veto_project_map_get` · `veto_pattern_store` · `veto_patterns_list` · `veto_memory_export` · `veto_memory_import` |
93
+ | **Memory** | `veto_memory_store` · `veto_memory_search` · `veto_memory_delete` · `veto_decisions` · `veto_project_map_update` · `veto_project_map_get` · `veto_pattern_store` · `veto_patterns_list` · `veto_memory_export` · `veto_memory_import` |
94
94
  | **Learning** | `veto_record_outcome` · `veto_learning_stats` · `veto_learning_apply` |
95
95
  | **Handoff** | `veto_handoff` · `veto_continue` · `veto_platform_setup` |
96
96
  | **Observability** | `veto_usage_status` · `veto_audit_log` · `veto_health` · `veto_metrics` · `veto_snapshot` |
@@ -238,6 +238,8 @@ veto patterns [prefix] # List learned agent/routing patterns
238
238
  veto tools [filter] # List all 93 MCP tools (--json for machine output)
239
239
  veto agents [filter] # List all 49 specialists — workers + council (--json)
240
240
  veto routing [status|log|reset] # Inspect the opt-in routing feedback loop
241
+ veto transcripts <sub> # Opt-in transcript capture (off by default) —
242
+ # enable|status|list|show|purge|disable
241
243
  veto hook install # Install pre-commit secrets scan hook
242
244
  veto hook remove # Remove the veto pre-commit hook
243
245
  veto check # Scan staged changes for secrets (used by hook)
@@ -252,7 +254,7 @@ veto doctor
252
254
 
253
255
  Veto Doctor — system health check
254
256
  ─────────────────────────────────────────────────────
255
- ✓ Node.js v22.5.0
257
+ ✓ Node.js v22.13.0
256
258
  ✓ ~/.veto exists
257
259
  ✓ Database ~/.veto/veto.db
258
260
  17 sessions · 12 memories · 3 patterns
@@ -441,8 +443,53 @@ Platform switching is manual — Veto surfaces which platform has budget remaini
441
443
 
442
444
  ---
443
445
 
446
+ ## Session Transcript Capture (opt-in)
447
+
448
+ `veto_session_save` writes a ~1k-token summary. That is enough to resume, but not enough to answer *"three weeks ago, what exactly did we conclude, and when?"* Transcript capture keeps the detail a summary throws away and makes it searchable — with no embeddings, no model downloads, and no API keys. It is a metadata table-of-contents plus SQLite FTS5/BM25, with your AI as the reranker, and it adds zero new runtime dependencies.
449
+
450
+ > ### ⚠️ Read this before you enable it
451
+ >
452
+ > **Veto copies your AI client's own conversation memory.** On save, Veto archives a byte-for-byte copy of the host CLI's transcript file — every message you sent, every reply, and all tool activity — into its own local store.
453
+ >
454
+ > - **The copy is independent.** The original file is never modified, but Veto's copy outlives it. Clearing your AI client's history, or the client rotating its own logs, will **not** remove the archive. Only `veto transcripts purge` or the retention window does.
455
+ > - **It inherits whatever was in the session.** Secrets, customer data, third parties' information — if you pasted it, it is in the archive. Detected secrets are masked everywhere an AI can read them, but the raw archive on disk is private data. Treat it like your shell history.
456
+ > - **Local only.** Nothing is uploaded or shared. The archive directory deliberately avoids cloud-synced folders, and a sync path is flagged if one is detected.
457
+ > - **Off until you say so.** Capture is disabled by default. `veto transcripts enable` prints this disclosure in full and records versioned consent; if the disclosure materially changes, you are re-prompted.
458
+
459
+ ```bash
460
+ veto transcripts enable # Opt in — prints what/where/retention, records consent
461
+ veto transcripts status # State, archive dir, retention, disk usage
462
+ veto transcripts list # Archived sessions
463
+ veto transcripts show <id> # One session's table-of-contents + facts
464
+ veto transcripts purge <id> # Delete an archive (also --project=<dir> | --all)
465
+ veto transcripts disable # Stop capturing (existing archives are kept)
466
+ ```
467
+
468
+ Recall runs through `veto_session_replay` as a two-call loop — search, then expand:
469
+
470
+ ```
471
+ { query: "npm E404 publish" } → table-of-contents + top BM25 hits with snippets
472
+ { expand: { event_id: 412 } } → the exact lines, masked, with a turn + timestamp citation
473
+ ```
474
+
475
+ Claude Code is the only adapter in 3.0.0; Codex and Gemini follow.
476
+
477
+ ---
478
+
444
479
  ## Release Notes
445
480
 
481
+ ### 3.0.0
482
+ - **Never lose a session again — opt-in transcript capture with vectorless recall.** A saved session has always carried a ~1k-token summary, which is enough to resume but cannot answer "what exactly did we conclude three weeks ago, and when?" Veto can now archive a copy of your host CLI's own conversation transcript and build a memory pyramid over it — the raw gzipped original, deterministic facts, the conversation spine, and the existing summary — then search it with a metadata table-of-contents plus SQLite FTS5/BM25. No embeddings, no model downloads, no API keys, no new runtime dependencies. Recall is a two-call loop through `veto_session_replay`: query for a table-of-contents and ranked snippets, then expand a hit into the exact source lines with a turn-and-timestamp citation. Validated against a real 784-line session, where recall pinpointed a conclusion the summary could not reconstruct. Claude Code is the only adapter in this release.
483
+ - **Capture is off until you turn it on, and it tells you exactly what it takes.** `veto transcripts enable` prints a plain-language disclosure — that Veto copies the AI client's own session memory, that the copy outlives the client's own history, that the archive inherits the sensitivity of anything you pasted, and where on disk it lands — then records versioned consent, re-prompting if that disclosure ever materially changes. Archives stay on your machine, are kept out of cloud-synced directories, are pruned on a configurable retention window, and are removed by `veto transcripts purge` as a true cascade with no orphan rows.
484
+ - **Secrets cannot transit into an AI context.** Detected credentials are masked to `REDACTED[sha256:…]` on the way into every derived layer *and* again on every byte range served back out of the raw archive — so a secret sitting in an untouched original still cannot reach a model through recall. Recalled content is returned as data-not-instructions, and tool results are treated as untrusted input.
485
+ - **`veto.db` is untouched.** All capture state lives in a sidecar `transcripts.db`, leaving the VS Code HUD's read-contract unaffected.
486
+
487
+ ### 2.9.0
488
+ - **Four more agents do real analysis.** The privacy, performance, auth, and compatibility agents were structured playbooks; they are now dual-mode analyzers with hand-written deterministic checks — PII/PHI handling, runtime anti-patterns, auth defects (e.g. JWT `alg: none`), and outdated-API usage — growing the analyze-capable roster from 8 to 12. Each is scoped to avoid duplicating the security scanner's and secrets agent's findings, and all keep their LLM upgrade path.
489
+ - **Agent-backed tools can now complete the LLM upgrade round-trip.** All 19 agent-backed advisor, generator, and git tools used to emit an `llm_upgrade` prompt with no way to hand the reasoning back. Each now accepts an `agent_response` parameter: call the tool, reason as the specialist, then call again with the structured JSON to get the upgraded result. The deterministic answer is always returned either way — the upgrade attaches alongside it, never replaces it.
490
+ - **Council verdicts are scoped to the project.** The latest-verdict shown in the VS Code HUD and the CLI status line used to be the globally-newest council debate, so it could display a result from a different workspace. Council outcomes now carry a `project_dir` (a one-time idempotent migration adds the column and backfills existing rows from their linked session), the status line scopes the verdict to the active workspace, and a debate run without an explicit `project_dir` falls back to the active project instead of being stored unscoped. When a project has no debate yet, the verdict segment simply drops rather than borrowing another folder's.
491
+ - **Veto tools are called, not re-implemented.** Weaker models (e.g. Gemini Flash) sometimes read a bare `veto_*` command as a task to do by hand — reverse-engineering the tool from source, writing throwaway scripts, and poking the database directly, which produced fabricated, wrongly-scoped results. An always-present usage directive plus explicit triggers on `veto_continue` / `veto_handoff` / `veto_session_save` now tell every client to invoke the live MCP tools directly.
492
+
446
493
  ### 2.8.0
447
494
  - **Deterministic council verdicts are honest again.** When the council runs without an LLM-backed path, each specialist used to emit canned, task-irrelevant "topic" warnings — broad keyword matches (a task mentioning "test" or "plan") produced boilerplate concerns that piled up and forced YELLOW verdicts with no real signal. Those topic insights are now **non-voting advice**: the agent votes approve and surfaces the guidance as a 💡 `[advisory]` note that never moves the verdict. The Devil's Advocate still always challenges, but its topic probes no longer escalate. Concrete rule matches (hardcoded secrets, `localStorage` tokens, GPL licenses, missing rate limits, …) escalate exactly as before.
448
495
  - **VS Code HUD now finds sessions and memory on every workspace.** Sessions and memory are matched to a workspace by `project_dir`, but it was stored with whatever drive-letter case the caller passed (usually uppercase `D:\`), while the extension queries with VS Code's `fsPath` (lowercase drive, case-sensitive) — so the HUD showed "No active session" / "0 memory entries" even after a successful save. `project_dir` is now canonicalized (lowercase Windows drive letter) at every read and write, with a one-time idempotent migration that fixes existing rows on next start.
@@ -530,7 +577,7 @@ Every handler module is importable in isolation, so behaviour is covered by `tes
530
577
  ## Tech Stack
531
578
 
532
579
  - **Language:** TypeScript (strict mode)
533
- - **Runtime:** Node.js 22.5+ (built-in `node:sqlite` — no native compilation)
580
+ - **Runtime:** Node.js 22.13+ or 23.4+ (built-in `node:sqlite` — no native compilation). It exists from 22.5 but only behind `--experimental-sqlite`, so 22.13 is the real floor.
534
581
  - **Dependencies:** `@modelcontextprotocol/sdk` only — one package, zero native addons
535
582
  - **Memory:** Local SQLite — zero config, works offline, portable via JSON export
536
583
  - **Platforms:** Claude Code · Gemini CLI · Antigravity CLI · Codex CLI · Cursor · Windsurf · Zed
@@ -1,3 +1,5 @@
1
1
  import { AgentPlan } from '../types.js';
2
+ import type { AgentAnalysis } from '../types.js';
2
3
  export declare function plan(task: string, context?: string): AgentPlan;
4
+ export declare function analyze(code: string, context?: string): AgentAnalysis;
3
5
  //# sourceMappingURL=performance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../src/agents/development/performance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AAuBzD,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAwH9D"}
1
+ {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../src/agents/development/performance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,aAAa,CAAC;AAuBhF,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAwH9D;AAsED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAmDrE"}
@@ -139,4 +139,98 @@ export function plan(task, context) {
139
139
  duration_estimate: '4-8 hours',
140
140
  };
141
141
  }
142
+ const CHECKS = [
143
+ // await inside a for/while body — serialises I/O that is often parallelisable (N+1).
144
+ {
145
+ regex: /\b(?:for|while)\s*\([^)]*\)\s*\{[^}]*\bawait\b/,
146
+ severity: 'medium',
147
+ category: 'Serial Await in Loop',
148
+ description: 'await inside a loop runs iterations one at a time — a common N+1 / serial-I/O bottleneck.',
149
+ fix: 'If iterations are independent, collect the promises and await Promise.all() to run them concurrently (bound the concurrency for large inputs).',
150
+ },
151
+ // async callback passed to forEach/map — forEach ignores the promise; map needs Promise.all.
152
+ {
153
+ regex: /\.(?:forEach|map)\s*\(\s*async\b/,
154
+ severity: 'medium',
155
+ category: 'Async Callback in forEach/map',
156
+ description: 'An async callback in forEach is not awaited at all; in map it produces an array of unawaited promises.',
157
+ fix: 'Use `for…of` with await for sequential work, or `await Promise.all(arr.map(async …))` for concurrent work.',
158
+ },
159
+ // Inner search inside an outer iteration — quadratic O(n·m) lookup.
160
+ {
161
+ regex: /\.(?:map|forEach|filter|reduce)\s*\([^)]*=>[^)]*\.(?:find|includes|indexOf|filter|some|every)\s*\(/,
162
+ severity: 'medium',
163
+ category: 'Nested Iteration O(n²)',
164
+ description: 'A linear search (find/includes/…) runs inside an outer iteration — cost grows as O(n·m) and degrades sharply with size.',
165
+ fix: 'Build a Map/Set from the inner collection once, then do O(1) lookups inside the loop.',
166
+ },
167
+ // SELECT * — fetches every column, defeats covering indexes, bloats payloads.
168
+ {
169
+ regex: /\bSELECT\s+\*/i,
170
+ severity: 'low',
171
+ category: 'Unbounded Column Selection',
172
+ description: 'SELECT * fetches every column, prevents index-only scans, and grows silently as the schema changes.',
173
+ fix: 'Select only the columns the code actually uses.',
174
+ },
175
+ // Synchronous fs/exec — blocks the event loop if it runs in a request path.
176
+ {
177
+ regex: /\b(?:readFileSync|writeFileSync|readdirSync|appendFileSync|execSync)\b/,
178
+ severity: 'low',
179
+ category: 'Synchronous I/O',
180
+ description: 'Synchronous I/O blocks the event loop — acceptable at startup, but a throughput killer inside a request handler.',
181
+ fix: 'Use the async fs.promises API (or exec) in any code path that serves requests.',
182
+ },
183
+ // JSON round-trip deep clone — slow and lossy (drops Dates, Maps, undefined).
184
+ {
185
+ regex: /JSON\.parse\s*\(\s*JSON\.stringify\s*\(/,
186
+ severity: 'low',
187
+ category: 'Inefficient Deep Clone',
188
+ description: 'JSON.parse(JSON.stringify(x)) is a slow deep clone that silently drops Dates, Maps, Sets and undefined values.',
189
+ fix: 'Use structuredClone(x) (Node 17+) or a purpose-built clone.',
190
+ },
191
+ ];
192
+ // ─── Analysis API ──────────────────────────────────────────────────────────
193
+ export function analyze(code, context) {
194
+ const findings = [];
195
+ const lines = code.split('\n');
196
+ for (let i = 0; i < lines.length; i++) {
197
+ const line = lines[i];
198
+ for (const check of CHECKS) {
199
+ if (check.regex.test(line)) {
200
+ findings.push({
201
+ severity: check.severity,
202
+ category: check.category,
203
+ description: check.description,
204
+ fix: check.fix,
205
+ location: `line ${i + 1}`,
206
+ });
207
+ break; // one finding per line — highest-priority check wins
208
+ }
209
+ }
210
+ }
211
+ const critical = findings.filter(f => f.severity === 'critical').length;
212
+ const high = findings.filter(f => f.severity === 'high').length;
213
+ const medium = findings.filter(f => f.severity === 'medium').length;
214
+ const low = findings.filter(f => f.severity === 'low').length;
215
+ const raw = 100 - (critical * 25 + high * 10 + medium * 5 + low * 2);
216
+ const score = Math.max(0, raw);
217
+ const verdict = score >= 90 ? 'approved'
218
+ : score >= 70 ? 'approved_with_warnings'
219
+ : score >= 50 ? 'needs_revision'
220
+ : 'rejected';
221
+ const subject = context ?? 'provided code';
222
+ const summary = findings.length === 0
223
+ ? `No runtime performance anti-patterns detected in ${subject}. Score: ${score}/100.`
224
+ : `Found ${findings.length} performance issue(s) in ${subject}: ${medium} medium, ${low} low. Score: ${score}/100 — ${verdict.replace(/_/g, ' ')}.`;
225
+ return {
226
+ agent: 'performance',
227
+ subject,
228
+ findings,
229
+ score,
230
+ verdict,
231
+ summary,
232
+ critical_count: critical,
233
+ high_count: high,
234
+ };
235
+ }
142
236
  //# sourceMappingURL=performance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"performance.js","sourceRoot":"","sources":["../../../src/agents/development/performance.ts"],"names":[],"mappings":"AAIA,SAAS,YAAY,CAAC,IAAY,EAAE,OAAgB;IAClD,MAAM,QAAQ,GAAG,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9D,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;IAC9K,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC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ts","sourceRoot":"","sources":["../../src/agents/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAA0D,MAAM,YAAY,CAAC;AAI5G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQxE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAElD;AA+JD,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CA4EtE;AAED,wBAAsB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAEhF"}
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/agents/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAA0D,MAAM,YAAY,CAAC;AAI5G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQxE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAElD;AAmKD,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CA4EtE;AAED,wBAAsB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAEhF"}
@@ -62,10 +62,14 @@ const ANALYZE_CAPABLE = new Set([
62
62
  'reviewer',
63
63
  'security-scanner',
64
64
  'secrets',
65
+ 'privacy',
66
+ 'performance',
67
+ 'auth',
65
68
  'dependency-audit',
66
69
  'code-quality',
67
70
  'documentation',
68
71
  'accessibility',
72
+ 'compatibility',
69
73
  'error-handling',
70
74
  ]);
71
75
  function resolveAgent(agentType) {
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/agents/executor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CA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CAAC,CAAC;YACnE,MAAM,IAAI,GAAG,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;YACvD,OAAO;gBACL,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI;gBACJ,MAAM,EAAE,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;gBACrC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;gBAC/B,UAAU,EAAE,KAAK;aAClB,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChG,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAClG,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;YAC/B,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC;SACnB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAAkB;IACtD,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC"}
@@ -10,12 +10,12 @@ export const AGENT_MANIFEST = [
10
10
  { id: 'frontend', role: 'Builds UI components and client-side logic. Plans component hierarchy, state management, and accessibility requirements.', output_type: 'plan', domain: 'development' },
11
11
  { id: 'backend', role: 'Implements server-side services, business logic, and data layers. Advises on architecture patterns and dependency injection.', output_type: 'plan', domain: 'development' },
12
12
  { id: 'devops', role: 'Plans CI/CD pipelines, containerization, and deployment strategies. Covers infrastructure-as-code, monitoring, and rollback procedures.', output_type: 'plan', domain: 'development' },
13
- { id: 'performance', role: 'Identifies bottlenecks and plans optimization work. Prioritizes by impact-to-effort ratio and recommends profiling and benchmarking approaches.', output_type: 'plan', domain: 'development' },
13
+ { id: 'performance', role: 'Identifies bottlenecks and plans optimization work. Prioritizes by impact-to-effort ratio and recommends profiling and benchmarking approaches.', output_type: 'analysis', domain: 'development' },
14
14
  { id: 'migration', role: 'Plans safe data and schema migrations. Sequences steps to avoid downtime and designs rollback strategies for production environments.', output_type: 'plan', domain: 'development' },
15
15
  // Security
16
16
  { id: 'security-scanner', role: 'Scans code for OWASP Top 10 and CWE-mapped vulnerabilities including injection, broken auth, and insecure deserialization. Returns severity-scored findings.', output_type: 'analysis', domain: 'security' },
17
- { id: 'auth', role: 'Reviews authentication and authorization implementations. Plans secure token handling, session management, and role-based access control.', output_type: 'plan', domain: 'security' },
18
- { id: 'privacy', role: 'Audits data handling for GDPR, CCPA, and privacy best practices. Flags PII exposure risks and recommends data minimization and retention strategies.', output_type: 'plan', domain: 'security' },
17
+ { id: 'auth', role: 'Reviews authentication and authorization implementations. Plans secure token handling, session management, and role-based access control.', output_type: 'analysis', domain: 'security' },
18
+ { id: 'privacy', role: 'Audits data handling for GDPR, CCPA, and privacy best practices. Flags PII exposure risks and recommends data minimization and retention strategies.', output_type: 'analysis', domain: 'security' },
19
19
  { id: 'secrets', role: 'Detects hardcoded secrets, API keys, and credentials in code and config files. Returns severity-scored findings with remediation steps.', output_type: 'analysis', domain: 'security' },
20
20
  { id: 'dependency-audit', role: 'Audits third-party dependencies for known CVEs and outdated packages. Returns severity-scored findings with upgrade and patching recommendations.', output_type: 'analysis', domain: 'security' },
21
21
  { id: 'penetration', role: 'Plans penetration testing scenarios and attack surface analysis. Identifies entry points, trust boundaries, and likely exploit paths.', output_type: 'plan', domain: 'security' },
@@ -37,7 +37,7 @@ export const AGENT_MANIFEST = [
37
37
  { id: 'code-quality', role: 'Audits code for complexity, duplication, and maintainability anti-patterns. Returns scored findings with targeted refactoring suggestions.', output_type: 'analysis', domain: 'quality' },
38
38
  { id: 'documentation', role: 'Reviews documentation coverage for APIs, modules, and workflows. Identifies gaps and returns findings with structured improvement recommendations.', output_type: 'analysis', domain: 'quality' },
39
39
  { id: 'accessibility', role: 'Audits UI code for WCAG 2.1 compliance and screen reader compatibility. Returns findings with specific ARIA and semantic HTML fix recommendations.', output_type: 'analysis', domain: 'quality' },
40
- { id: 'compatibility', role: 'Checks code for browser, runtime, and platform compatibility issues. Plans polyfills, feature detection, and graceful degradation strategies.', output_type: 'plan', domain: 'quality' },
40
+ { id: 'compatibility', role: 'Checks code for browser, runtime, and platform compatibility issues. Plans polyfills, feature detection, and graceful degradation strategies.', output_type: 'analysis', domain: 'quality' },
41
41
  { id: 'error-handling', role: 'Reviews error handling coverage and propagation paths. Flags swallowed exceptions, missing guards, and unhelpful error messages.', output_type: 'analysis', domain: 'quality' },
42
42
  // Workflow
43
43
  { id: 'task-planner', role: 'Breaks high-level goals into ordered, actionable tasks with clear acceptance criteria. Produces a dependency-aware execution plan.', output_type: 'plan', domain: 'workflow' },
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/agents/manifest.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,cAAc;IACd,EAAE,EAAE,EAAE,OAAO,EAAQ,IAAI,EAAE,qJAAqJ,EAAgB,WAAW,EAAE,MAAM,EAAM,MAAM,EAAE,aAAa,EAAE;IAChP,EAAE,EAAE,EAAE,UAAU,EAAK,IAAI,EAAE,8IAA8I,EAAwB,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE;IACjP,EAAE,E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Ac,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CACnC,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,EAAmB;IAClD,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC"}
@@ -1,3 +1,5 @@
1
1
  import { AgentPlan } from '../types.js';
2
+ import type { AgentAnalysis } from '../types.js';
2
3
  export declare function plan(task: string, context?: string): AgentPlan;
4
+ export declare function analyze(code: string, context?: string): AgentAnalysis;
3
5
  //# sourceMappingURL=compatibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../src/agents/quality/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AAEzD,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAuD9D"}
1
+ {"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../src/agents/quality/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,aAAa,CAAC;AAEhF,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAuD9D;AAsFD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAmDrE"}
@@ -52,4 +52,114 @@ export function plan(task, context) {
52
52
  duration_estimate: '1-3 hours',
53
53
  };
54
54
  }
55
+ const CHECKS = [
56
+ // ES2022 — structuredClone (Node 17+, no legacy browsers).
57
+ {
58
+ regex: /\bstructuredClone\s*\(/,
59
+ severity: 'medium',
60
+ category: 'Unguarded Modern API',
61
+ description: 'structuredClone() requires Node 17+ / a modern browser — it throws ReferenceError on older targets.',
62
+ fix: 'Confirm your minimum target supports it, or feature-detect and fall back to a deep-clone polyfill.',
63
+ },
64
+ // ES2022 — Object.hasOwn.
65
+ {
66
+ regex: /\bObject\.hasOwn\s*\(/,
67
+ severity: 'medium',
68
+ category: 'Unguarded Modern API',
69
+ description: 'Object.hasOwn() is ES2022 (Node 16.9+ / recent browsers) — unavailable on older runtimes.',
70
+ fix: 'Raise the target, or use Object.prototype.hasOwnProperty.call(obj, key).',
71
+ },
72
+ // ES2023 — Array findLast / findLastIndex.
73
+ {
74
+ regex: /\.(?:findLast|findLastIndex)\s*\(/,
75
+ severity: 'medium',
76
+ category: 'Unguarded Modern API',
77
+ description: 'Array.prototype.findLast/findLastIndex is ES2023 (Node 18+ / Safari 15.4+) — undefined on older engines.',
78
+ fix: 'Verify the minimum target, or iterate in reverse manually.',
79
+ },
80
+ // ES2023 — immutable array methods (Node 20+).
81
+ {
82
+ regex: /\.(?:toSorted|toReversed|toSpliced)\s*\(/,
83
+ severity: 'medium',
84
+ category: 'Unguarded Modern API',
85
+ description: 'toSorted/toReversed/toSpliced are ES2023 (Node 20+ / 2023 browsers) — unavailable on common LTS floors.',
86
+ fix: 'Confirm the target, or copy first (e.g. [...arr].sort()).',
87
+ },
88
+ // ES2021 — String.prototype.replaceAll (Node 15+).
89
+ {
90
+ regex: /\.replaceAll\s*\(/,
91
+ severity: 'low',
92
+ category: 'Modern API',
93
+ description: 'String.prototype.replaceAll is ES2021 (Node 15+) — verify it against your minimum runtime.',
94
+ fix: 'If targeting older runtimes, use .replace(/pattern/g, …).',
95
+ },
96
+ // ES2021 — Promise.any.
97
+ {
98
+ regex: /\bPromise\.any\s*\(/,
99
+ severity: 'low',
100
+ category: 'Modern API',
101
+ description: 'Promise.any is ES2021 (Node 15+ / no legacy browsers).',
102
+ fix: 'Confirm the target supports it, or polyfill.',
103
+ },
104
+ // ES2021 — logical assignment operators (parser-level; breaks pre-ES2021 transpile targets).
105
+ {
106
+ regex: /(?:\?\?=|\|\|=|&&=)/,
107
+ severity: 'low',
108
+ category: 'Modern Syntax',
109
+ description: 'Logical assignment (??= / ||= / &&=) is ES2021 syntax — a parse error for tools targeting an older ECMAScript version.',
110
+ fix: 'Ensure your tsconfig target / Babel preset is ES2021+, or expand to an explicit assignment.',
111
+ },
112
+ // Modern CSS features embedded in selector/style strings.
113
+ {
114
+ regex: /:has\(|\bsubgrid\b/i,
115
+ severity: 'low',
116
+ category: 'Modern CSS Feature',
117
+ description: 'The :has() selector / grid subgrid require Safari 15.4+ / recent Chromium — older browsers ignore them.',
118
+ fix: 'Use @supports for progressive enhancement, or provide a non-:has()/non-subgrid fallback.',
119
+ },
120
+ ];
121
+ // ─── Analysis API ──────────────────────────────────────────────────────────
122
+ export function analyze(code, context) {
123
+ const findings = [];
124
+ const lines = code.split('\n');
125
+ for (let i = 0; i < lines.length; i++) {
126
+ const line = lines[i];
127
+ for (const check of CHECKS) {
128
+ if (check.regex.test(line)) {
129
+ findings.push({
130
+ severity: check.severity,
131
+ category: check.category,
132
+ description: check.description,
133
+ fix: check.fix,
134
+ location: `line ${i + 1}`,
135
+ });
136
+ break; // one finding per line — highest-priority check wins
137
+ }
138
+ }
139
+ }
140
+ const critical = findings.filter(f => f.severity === 'critical').length;
141
+ const high = findings.filter(f => f.severity === 'high').length;
142
+ const medium = findings.filter(f => f.severity === 'medium').length;
143
+ const low = findings.filter(f => f.severity === 'low').length;
144
+ const raw = 100 - (critical * 25 + high * 10 + medium * 5 + low * 2);
145
+ const score = Math.max(0, raw);
146
+ const verdict = score >= 90 ? 'approved'
147
+ : score >= 70 ? 'approved_with_warnings'
148
+ : score >= 50 ? 'needs_revision'
149
+ : 'rejected';
150
+ const subject = context ?? 'provided code';
151
+ const summary = findings.length === 0
152
+ ? `No portability concerns detected in ${subject}. Score: ${score}/100.`
153
+ : `Found ${findings.length} compatibility concern(s) in ${subject}: ${medium} medium, ${low} low. Verify against your minimum target. Score: ${score}/100 — ${verdict.replace(/_/g, ' ')}.`;
154
+ return {
155
+ agent: 'compatibility',
156
+ subject,
157
+ findings,
158
+ score,
159
+ verdict,
160
+ summary,
161
+ critical_count: critical,
162
+ high_count: high,
163
+ };
164
+ }
55
165
  //# sourceMappingURL=compatibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../../../src/agents/quality/compatibility.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,IAAI,CAAC,IAAY,EAAE,OAAgB;IACjD,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,MAAM,SAAS,GAAG,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxI,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7G,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEhH,MAAM,QAAQ,GAAG,SAAS;QACxB,CAAC,CAAC,+PAA+P;QACjQ,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,iOAAiO;YACnO,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,iOA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C;IAE9D,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,GAAG,EAAE,GAAG,MAAM,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAE/B,MAAM,OAAO,GACX,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU;QACxB,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,wBAAwB;YACxC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,gBAAgB;gBAChC,CAAC,CAAC,UAAU,CAAC;IAEf,MAAM,OAAO,GAAG,OAAO,IAAI,eAAe,CAAC;IAE3C,MAAM,OAAO,GACX,QAAQ,CAAC,MAAM,KAAK,CAAC;QACnB,CAAC,CAAC,uCAAuC,OAAO,YAAY,KAAK,OAAO;QACxE,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,gCAAgC,OAAO,KAAK,MAAM,YAAY,GAAG,oDAAoD,KAAK,UAAU,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC;IAEhM,OAAO;QACL,KAAK,EAAE,eAAe;QACtB,OAAO;QACP,QAAQ;QACR,KAAK;QACL,OAAO;QACP,OAAO;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC"}
@@ -1,3 +1,4 @@
1
- import type { AgentPlan } from '../types.js';
1
+ import type { AgentPlan, AgentAnalysis } from '../types.js';
2
2
  export declare function plan(task: string, context?: string): AgentPlan;
3
+ export declare function analyze(code: string, context?: string): AgentAnalysis;
3
4
  //# sourceMappingURL=auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/agents/security/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0P7C,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAoC9D"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/agents/security/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAiC,MAAM,aAAa,CAAC;AA0P3F,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAoC9D;AA6ED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,CAqDrE"}