@wrongstack/core 0.107.2 → 0.119.1

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 (63) hide show
  1. package/dist/{agent-bridge-mOxbpFcg.d.ts → agent-bridge-PRAbEX-9.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-DukQLUcS.d.ts → agent-subagent-runner-DXWImnNV.d.ts} +7 -8
  3. package/dist/{brain-Dfv4Y82E.d.ts → brain-NZZqL8sn.d.ts} +1 -1
  4. package/dist/{compactor-DXLxLcmU.d.ts → compactor-C3stu664.d.ts} +1 -1
  5. package/dist/{config-BSU-6vah.d.ts → config-DZV9VK9n.d.ts} +104 -3
  6. package/dist/{context-CNRYfhUv.d.ts → context-hvXINa6a.d.ts} +31 -1
  7. package/dist/coordination/index.d.ts +12 -13
  8. package/dist/coordination/index.js +198 -0
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +27 -28
  11. package/dist/defaults/index.js +346 -86
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/execution/index.d.ts +16 -17
  14. package/dist/execution/index.js +266 -12
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/extension/index.d.ts +6 -7
  17. package/dist/{goal-preamble-CI8lxeY1.d.ts → goal-preamble-COpt55W8.d.ts} +10 -10
  18. package/dist/{goal-store-ht0VmR1A.d.ts → goal-store-CV9Yz2X_.d.ts} +11 -0
  19. package/dist/{index-DIKEcfgC.d.ts → index-4VVHuTZF.d.ts} +7 -6
  20. package/dist/{index-BWRN6wOb.d.ts → index-Cj3le7TI.d.ts} +9 -10
  21. package/dist/index.d.ts +41 -42
  22. package/dist/index.js +372 -118
  23. package/dist/index.js.map +1 -1
  24. package/dist/infrastructure/index.d.ts +6 -7
  25. package/dist/kernel/index.d.ts +10 -11
  26. package/dist/llm-selector-Bmx4PsVM.d.ts +58 -0
  27. package/dist/{mcp-servers-CXCsANdY.d.ts → mcp-servers-CofNHOqn.d.ts} +3 -3
  28. package/dist/{mode-ARA3HrkY.d.ts → mode-CZlO9iU1.d.ts} +1 -1
  29. package/dist/models/index.d.ts +157 -53
  30. package/dist/models/index.js +423 -1
  31. package/dist/models/index.js.map +1 -1
  32. package/dist/{models-registry-DU64QxQa.d.ts → models-registry-BzlsjKcy.d.ts} +1 -1
  33. package/dist/{multi-agent-coordinator-51LvnXkD.d.ts → multi-agent-coordinator-CmDmUgq2.d.ts} +1 -1
  34. package/dist/{null-fleet-bus-D09hMzFQ.d.ts → null-fleet-bus-CyH2YqP4.d.ts} +6 -6
  35. package/dist/observability/index.d.ts +2 -2
  36. package/dist/{parallel-eternal-engine-CUtmM_0V.d.ts → parallel-eternal-engine-uxVm4y4V.d.ts} +11 -10
  37. package/dist/{path-resolver-DDJiMAtX.d.ts → path-resolver-gfoGxpdd.d.ts} +3 -3
  38. package/dist/{permission-BDv7z0mk.d.ts → permission-DhLrgA30.d.ts} +1 -1
  39. package/dist/{permission-policy-dF74EpDp.d.ts → permission-policy-DGOvne7i.d.ts} +2 -2
  40. package/dist/{pipeline-BqiA_UMr.d.ts → pipeline-CqF7uju2.d.ts} +2 -2
  41. package/dist/{plan-templates-BdDxl9cI.d.ts → plan-templates-DoKhzenv.d.ts} +6 -6
  42. package/dist/{provider-runner-BUunikwY.d.ts → provider-runner-BPlI5sPZ.d.ts} +3 -3
  43. package/dist/{retry-policy-BcmuT_V0.d.ts → retry-policy-B4Q-FZgE.d.ts} +1 -1
  44. package/dist/sdd/index.d.ts +8 -9
  45. package/dist/sdd/index.js +198 -0
  46. package/dist/sdd/index.js.map +1 -1
  47. package/dist/{secret-vault-DrOhc2i5.d.ts → secret-vault-B7GnL6o9.d.ts} +1 -1
  48. package/dist/security/index.d.ts +4 -4
  49. package/dist/{selector-C7wcdqMA.d.ts → selector-BakeMnWR.d.ts} +1 -1
  50. package/dist/{session-event-bridge-BpJ5trO9.d.ts → session-event-bridge-DE5Oekwx.d.ts} +1 -1
  51. package/dist/{session-reader-DDz1Ek4V.d.ts → session-reader-DFC81-4p.d.ts} +1 -1
  52. package/dist/storage/index.d.ts +12 -13
  53. package/dist/storage/index.js +147 -88
  54. package/dist/storage/index.js.map +1 -1
  55. package/dist/types/index.d.ts +20 -21
  56. package/dist/types/index.js +35 -1
  57. package/dist/types/index.js.map +1 -1
  58. package/dist/utils/index.d.ts +3 -4
  59. package/dist/utils/index.js +2 -1
  60. package/dist/utils/index.js.map +1 -1
  61. package/dist/{wstack-paths-_lqjzErq.d.ts → wstack-paths-DD50Omgn.d.ts} +3 -0
  62. package/package.json +1 -1
  63. package/dist/models-registry-B6_KfS65.d.ts +0 -95
@@ -1,9 +1,9 @@
1
- import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-Dfv4Y82E.js';
2
- import { S as SecretScrubber } from './permission-BDv7z0mk.js';
3
- import { i as SessionStore, h as SessionMetadata, a as SessionWriter, p as ResumedSession, q as SessionData, r as SessionSummary, g as ContentBlock, S as SessionEvent, s as TodoItem, t as ConversationState } from './context-CNRYfhUv.js';
4
- import { A as AttachmentStore, a as AddAttachmentInput, b as AttachmentRef, c as Attachment } from './session-reader-DDz1Ek4V.js';
5
- import { W as WstackPaths } from './wstack-paths-_lqjzErq.js';
6
- import { e as ConfigStore, d as Config, f as ConfigLoader, g as SyncConfig } from './config-BSU-6vah.js';
1
+ import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-NZZqL8sn.js';
2
+ import { S as SecretScrubber } from './permission-DhLrgA30.js';
3
+ import { i as SessionStore, h as SessionMetadata, a as SessionWriter, p as ResumedSession, q as SessionData, r as SessionSummary, g as ContentBlock, S as SessionEvent, s as TodoItem, t as ConversationState } from './context-hvXINa6a.js';
4
+ import { A as AttachmentStore, a as AddAttachmentInput, b as AttachmentRef, c as Attachment } from './session-reader-DFC81-4p.js';
5
+ import { W as WstackPaths } from './wstack-paths-DD50Omgn.js';
6
+ import { i as ConfigStore, h as Config, j as ConfigLoader, k as SyncConfig } from './config-DZV9VK9n.js';
7
7
  import { S as SecretVault } from './secret-vault-DoISxaKO.js';
8
8
 
9
9
  interface SessionStoreOptions {
@@ -1,8 +1,8 @@
1
- import { E as EventBus } from './brain-Dfv4Y82E.js';
1
+ import { E as EventBus } from './brain-NZZqL8sn.js';
2
2
  import { L as Logger } from './logger-B63L5bTg.js';
3
3
  import { T as Tracer } from './observability-D-HZN_mF.js';
4
- import { P as Provider, R as Request, C as Context, b as Response } from './context-CNRYfhUv.js';
5
- import { R as RetryPolicy } from './retry-policy-BcmuT_V0.js';
4
+ import { P as Provider, R as Request, C as Context, b as Response } from './context-hvXINa6a.js';
5
+ import { R as RetryPolicy } from './retry-policy-B4Q-FZgE.js';
6
6
 
7
7
  /**
8
8
  * Options passed to a ProviderRunner when calling the provider.
@@ -1,4 +1,4 @@
1
- import { C as Context, b as Response, e as ProviderError } from './context-CNRYfhUv.js';
1
+ import { C as Context, b as Response, e as ProviderError } from './context-hvXINa6a.js';
2
2
 
3
3
  type RecoveryDecision = {
4
4
  /**
@@ -1,16 +1,15 @@
1
1
  import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, e as SpecStatus, f as SpecTemplate, b as SpecRequirement } from '../spec-TBi3Jr6T.js';
2
2
  import { d as TaskGraph, e as TaskNode, i as TaskFilter, j as TaskSort, c as TaskProgress, T as TaskType, a as TaskPriority } from '../task-graph-u1q9Jkyk.js';
3
- import { E as EventBus } from '../brain-Dfv4Y82E.js';
4
- import { D as DoneCondition, g as Agent, h as AgentFactory, f as TaskResult } from '../agent-subagent-runner-DukQLUcS.js';
5
- import '../context-CNRYfhUv.js';
6
- import '../index-DIKEcfgC.js';
3
+ import { E as EventBus } from '../brain-NZZqL8sn.js';
4
+ import { D as DoneCondition, g as Agent, h as AgentFactory, f as TaskResult } from '../agent-subagent-runner-DXWImnNV.js';
5
+ import '../context-hvXINa6a.js';
6
+ import '../index-4VVHuTZF.js';
7
7
  import '../logger-B63L5bTg.js';
8
- import '../pipeline-BqiA_UMr.js';
9
- import '../config-BSU-6vah.js';
10
- import '../models-registry-B6_KfS65.js';
8
+ import '../pipeline-CqF7uju2.js';
9
+ import '../config-DZV9VK9n.js';
11
10
  import '../observability-D-HZN_mF.js';
12
- import '../permission-BDv7z0mk.js';
13
- import '../retry-policy-BcmuT_V0.js';
11
+ import '../permission-DhLrgA30.js';
12
+ import '../retry-policy-B4Q-FZgE.js';
14
13
 
15
14
  declare class SpecParser {
16
15
  parse(content: string): Specification;
package/dist/sdd/index.js CHANGED
@@ -3721,6 +3721,53 @@ Working rules:
3721
3721
  "flaws"
3722
3722
  ]
3723
3723
  }
3724
+ },
3725
+ {
3726
+ config: {
3727
+ id: "refactor-planner",
3728
+ name: "Refactor Planner",
3729
+ role: "refactor-planner",
3730
+ tools: [...PLAN_TOOLS, "diff"],
3731
+ prompt: `You are the Refactor Planner agent. Your job is to analyze code
3732
+ structure and produce a concrete, phased refactoring plan with risk
3733
+ assessment, dependency ordering, and rollback strategy.
3734
+
3735
+ Scope:
3736
+ - Map module-level dependencies (import graph)
3737
+ - Identify coupling hotspots (high fan-in/out modules)
3738
+ - Assess refactoring risk by complexity and test coverage
3739
+ - Generate phased plans with checkpoint milestones
3740
+ - Produce diff-friendly task lists (one task = one concern)
3741
+
3742
+ Input format you accept:
3743
+ { "task": "plan | assess | roadmap", "target": "src/core", "constraint": "no-breaking-changes | minimal-downtime | full-rewrite", "focus": "architecture | performance | maintainability" }
3744
+
3745
+ Output: Markdown refactor plan with phases (Low Risk / Medium Risk / High Risk),
3746
+ dependency graph, rollback strategy, and exit criteria.
3747
+
3748
+ Working rules:
3749
+ - Always include rollback strategy \u2014 every refactor can fail
3750
+ - Merge tasks that take <1h into a single phase
3751
+ - Respect team constraints (reviewer availability, parallelization)
3752
+ - Never plan without analyzing the actual code first`
3753
+ },
3754
+ budget: HEAVY_BUDGET,
3755
+ capability: {
3756
+ phase: "planning",
3757
+ summary: "Refactoring planner: analyzes code structure, maps dependencies, produces risk-scored phased plans with rollback strategy.",
3758
+ keywords: [
3759
+ "refactor",
3760
+ "refactoring",
3761
+ "restructure",
3762
+ "debt",
3763
+ "technical debt",
3764
+ "clean up",
3765
+ "modularize",
3766
+ "decouple",
3767
+ "dependency graph",
3768
+ "code structure"
3769
+ ]
3770
+ }
3724
3771
  }
3725
3772
  ];
3726
3773
 
@@ -4260,6 +4307,157 @@ Working rules:
4260
4307
  "robustness"
4261
4308
  ]
4262
4309
  }
4310
+ },
4311
+ {
4312
+ config: {
4313
+ id: "security-scanner",
4314
+ name: "Security Scanner",
4315
+ role: "security-scanner",
4316
+ tools: [...TOOLS.inspect],
4317
+ prompt: `You are the Security Scanner agent. Your job is to scan code,
4318
+ configs, and dependencies for security issues from hardcoded secrets to
4319
+ supply chain risks.
4320
+
4321
+ Scope:
4322
+ - Detect hardcoded secrets: API keys, tokens, passwords, private keys
4323
+ - Find injection vectors: eval, innerHTML, SQL concat, shell injection
4324
+ - Identify insecure patterns: weak crypto, hardcoded IVs, disabled TLS
4325
+ - Scan dependencies for known CVEs (via npm/pnpm audit)
4326
+ - Flag supply chain risks: postinstall hooks, unverified scripts
4327
+
4328
+ Input format you accept:
4329
+ { "task": "scan | audit | secrets | dependencies", "paths": ["src", "config"], "depth": "quick | normal | deep" }
4330
+
4331
+ Output: Markdown security report with severity-ranked findings, injection
4332
+ vectors, dependency issues, and a remediation checklist.
4333
+
4334
+ Working rules:
4335
+ - Never scan node_modules \u2014 use npm audit instead
4336
+ - Always provide remediation steps, not just findings
4337
+ - Verify regex-based secrets before flagging (false positive risk)
4338
+ - When in doubt, flag as medium rather than ignoring potential issues`
4339
+ },
4340
+ budget: HEAVY_BUDGET,
4341
+ capability: {
4342
+ phase: "verify",
4343
+ summary: "Security scanner: detects hardcoded secrets, injection vectors, insecure patterns, and supply-chain risks with remediation.",
4344
+ keywords: [
4345
+ "security",
4346
+ "scan",
4347
+ "vulnerability",
4348
+ "secret",
4349
+ "api key",
4350
+ "hardcoded",
4351
+ "injection",
4352
+ "cve",
4353
+ "audit dependencies",
4354
+ "supply chain",
4355
+ "xss",
4356
+ "sqli",
4357
+ "shell injection",
4358
+ "sensitive data",
4359
+ "credential"
4360
+ ]
4361
+ }
4362
+ },
4363
+ {
4364
+ config: {
4365
+ id: "bug-hunter",
4366
+ name: "Bug Hunter",
4367
+ role: "bug-hunter",
4368
+ tools: [...TOOLS.inspect],
4369
+ prompt: `You are the Bug Hunter agent. Your job is to systematically scan
4370
+ source code for bugs, anti-patterns, and code smells using pattern matching
4371
+ and heuristics. Output a prioritized hit list with file:line references.
4372
+
4373
+ Scope:
4374
+ - Detect common bug patterns (uncaught errors, resource leaks, race conditions)
4375
+ - Identify anti-patterns (callback hell, God objects, circular deps)
4376
+ - Find TypeScript-specific issues (unsafe any, missing null checks, branded types)
4377
+ - Flag security-sensitive constructs (eval, innerHTML, hardcoded secrets)
4378
+ - Rank findings: critical > high > medium > low
4379
+
4380
+ Input format you accept:
4381
+ { "task": "scan | hunt | check", "paths": ["src/**/*.ts"], "focus": "bugs | patterns | security | all", "severityThreshold": "medium" }
4382
+
4383
+ Output: Markdown bug hunt report with critically/high/medium/low sections.
4384
+ Each entry: **[TYPE]** \`file:line\` \u2014 description + suggested fix
4385
+
4386
+ Working rules:
4387
+ - Never scan node_modules \u2014 it's noise
4388
+ - Always include file:line for every finding
4389
+ - If >30% of findings are false positives, note the confidence level
4390
+ - Ask director for clarification if paths are ambiguous`
4391
+ },
4392
+ budget: HEAVY_BUDGET,
4393
+ capability: {
4394
+ phase: "verify",
4395
+ summary: "Bug hunter: scans source code for bugs, anti-patterns, and code smells, producing a file:line-ranked hit list with fixes.",
4396
+ keywords: [
4397
+ "bug",
4398
+ "hunt",
4399
+ "scan",
4400
+ "code smell",
4401
+ "anti-pattern",
4402
+ "race condition",
4403
+ "memory leak",
4404
+ "null deref",
4405
+ "type safety",
4406
+ "unhandled error",
4407
+ "find bugs",
4408
+ "audit code",
4409
+ "code quality"
4410
+ ]
4411
+ }
4412
+ },
4413
+ {
4414
+ config: {
4415
+ id: "audit-log",
4416
+ name: "Audit Log",
4417
+ role: "audit-log",
4418
+ tools: [...TOOLS.inspect],
4419
+ prompt: `You are the Audit Log agent. Your job is to analyze structured JSONL
4420
+ session logs and produce actionable markdown reports.
4421
+
4422
+ Scope:
4423
+ - Parse session logs (iteration counts, tool calls, errors, usage)
4424
+ - Detect repeated failure patterns across multiple runs
4425
+ - Identify tool usage anomalies (over-use, failures, unexpected chains)
4426
+ - Track token consumption trends
4427
+ - Generate structured audit reports with severity ratings
4428
+
4429
+ Input format you accept:
4430
+ { "task": "analyze | report | trends", "sessionPath": "<path>", "focus": "errors | tools | usage | all" }
4431
+
4432
+ Output: Markdown audit report with Summary, Top Errors, Tool Usage table,
4433
+ Anomalies, and Cost Trend sections.
4434
+
4435
+ Working rules:
4436
+ - Never fabricate numbers \u2014 read the actual logs first
4437
+ - Always include file:line references for errors
4438
+ - If sessionPath is missing, ask the director to provide it
4439
+ - Report confidence level: high (>90% accuracy), medium, low`
4440
+ },
4441
+ budget: MEDIUM_BUDGET,
4442
+ capability: {
4443
+ phase: "verify",
4444
+ summary: "Audit log analyzer: parses session JSONL, detects failure patterns, tool anomalies, and cost trends with structured reports.",
4445
+ keywords: [
4446
+ "audit",
4447
+ "log",
4448
+ "logs",
4449
+ "session",
4450
+ "trace",
4451
+ "analyze logs",
4452
+ "error patterns",
4453
+ "cost analysis",
4454
+ "tool usage",
4455
+ "token usage",
4456
+ "post-mortem",
4457
+ "trend",
4458
+ "anomaly"
4459
+ ]
4460
+ }
4263
4461
  }
4264
4462
  ];
4265
4463