@wrongstack/core 0.307.0 → 0.308.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.
@@ -1361,6 +1361,7 @@ var RUNTIME_CAPABILITY_MANIFEST = [
1361
1361
  "codebase-skeleton",
1362
1362
  "codebase-repo-map",
1363
1363
  "codebase-impact-analysis",
1364
+ "codebase-invariant-check",
1364
1365
  "dead-code-scan",
1365
1366
  "diff",
1366
1367
  "json",
@@ -3684,13 +3685,50 @@ var HEAVY_BUDGET = {
3684
3685
  maxIterations: 8e3,
3685
3686
  maxToolCalls: 2e4
3686
3687
  };
3688
+ var INDEX_READ = [
3689
+ "codebase-stats",
3690
+ "codebase-search",
3691
+ "codebase-skeleton",
3692
+ "codebase-repo-map",
3693
+ "codebase-incoming-calls",
3694
+ "codebase-outgoing-calls"
3695
+ ];
3687
3696
  var TOOLS = {
3697
+ /** Index-backed code discovery. Spread onto code-facing presets, not browser. */
3698
+ index: INDEX_READ,
3688
3699
  /** Pure read/inspect — safe for analysis and review agents. */
3689
3700
  read: ["read", "grep", "glob", "search", "tree", "mailbox"],
3690
3701
  /** Read + structured inspection (logs, diffs, json, dependency audit). */
3691
- inspect: ["read", "grep", "glob", "search", "tree", "json", "diff", "logs", "audit", "mailbox"],
3702
+ inspect: [
3703
+ "read",
3704
+ "grep",
3705
+ "glob",
3706
+ "search",
3707
+ "tree",
3708
+ ...INDEX_READ,
3709
+ "json",
3710
+ "diff",
3711
+ "logs",
3712
+ "audit",
3713
+ "mailbox"
3714
+ ],
3692
3715
  /** Read + edit (no shell). For agents that write code/docs but don't run it. */
3693
- write: ["read", "grep", "glob", "search", "tree", "write", "edit", "replace", "patch", "mailbox"],
3716
+ write: [
3717
+ "read",
3718
+ "grep",
3719
+ "glob",
3720
+ "search",
3721
+ "tree",
3722
+ ...INDEX_READ,
3723
+ "codebase-impact-analysis",
3724
+ "codebase-ast-replace",
3725
+ "codebase-invariant-check",
3726
+ "write",
3727
+ "edit",
3728
+ "replace",
3729
+ "patch",
3730
+ "mailbox"
3731
+ ],
3694
3732
  /** Full build loop: edit + run (lint/format/typecheck/test/bash). */
3695
3733
  build: [
3696
3734
  "read",
@@ -3698,6 +3736,11 @@ var TOOLS = {
3698
3736
  "glob",
3699
3737
  "search",
3700
3738
  "tree",
3739
+ ...INDEX_READ,
3740
+ "codebase-impact-analysis",
3741
+ "codebase-ast-replace",
3742
+ "codebase-invariant-check",
3743
+ "codebase-targeted-test",
3701
3744
  "diff",
3702
3745
  "write",
3703
3746
  "edit",
@@ -3724,7 +3767,18 @@ var TOOLS = {
3724
3767
  /** Dependency management + CVE audit. */
3725
3768
  deps: ["read", "grep", "glob", "install", "outdated", "audit", "json", "mailbox"],
3726
3769
  /** Documentation authoring. */
3727
- docs: ["read", "grep", "glob", "search", "tree", "write", "edit", "document", "mailbox"],
3770
+ docs: [
3771
+ "read",
3772
+ "grep",
3773
+ "glob",
3774
+ "search",
3775
+ "tree",
3776
+ ...INDEX_READ,
3777
+ "write",
3778
+ "edit",
3779
+ "document",
3780
+ "mailbox"
3781
+ ],
3728
3782
  /** Web research. */
3729
3783
  research: ["read", "grep", "glob", "search", "fetch", "mailbox"]
3730
3784
  };
@@ -3741,7 +3795,7 @@ var DISCOVERY_AGENTS = [
3741
3795
  id: "explore",
3742
3796
  name: "Explore",
3743
3797
  role: "explore",
3744
- tools: [...TOOLS.read],
3798
+ tools: [...TOOLS.read, ...TOOLS.index],
3745
3799
  prompt: agentPrompt("explore")
3746
3800
  },
3747
3801
  budget: MEDIUM_BUDGET,
@@ -3769,7 +3823,7 @@ var DISCOVERY_AGENTS = [
3769
3823
  id: "search",
3770
3824
  name: "Search",
3771
3825
  role: "search",
3772
- tools: [...TOOLS.read, "codebase-search"],
3826
+ tools: [...TOOLS.read, ...TOOLS.index],
3773
3827
  prompt: agentPrompt("search")
3774
3828
  },
3775
3829
  budget: MEDIUM_BUDGET,
@@ -3820,7 +3874,7 @@ var DISCOVERY_AGENTS = [
3820
3874
  ];
3821
3875
 
3822
3876
  // src/coordination/agents/phase2-planning.ts
3823
- var PLAN_TOOLS = [...TOOLS.read, "plan", "todo"];
3877
+ var PLAN_TOOLS = [...TOOLS.read, ...TOOLS.index, "plan", "todo"];
3824
3878
  var PLANNING_AGENTS = [
3825
3879
  {
3826
3880
  config: {
@@ -77,20 +77,17 @@ export interface AgentDefinition {
77
77
  export declare const LIGHT_BUDGET: AgentBudgetTier;
78
78
  export declare const MEDIUM_BUDGET: AgentBudgetTier;
79
79
  export declare const HEAVY_BUDGET: AgentBudgetTier;
80
- /**
81
- * Tool allowlist presets. Agents pass the smallest set that covers their job —
82
- * a planning agent should not hold `write`/`bash`, a reviewer should be
83
- * read-only. Spread + extend per-agent where a role needs one extra tool.
84
- */
85
80
  export declare const TOOLS: {
81
+ /** Index-backed code discovery. Spread onto code-facing presets, not browser. */
82
+ readonly index: readonly ["codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls"];
86
83
  /** Pure read/inspect — safe for analysis and review agents. */
87
84
  readonly read: readonly ["read", "grep", "glob", "search", "tree", "mailbox"];
88
85
  /** Read + structured inspection (logs, diffs, json, dependency audit). */
89
- readonly inspect: readonly ["read", "grep", "glob", "search", "tree", "json", "diff", "logs", "audit", "mailbox"];
86
+ readonly inspect: readonly ["read", "grep", "glob", "search", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls", "json", "diff", "logs", "audit", "mailbox"];
90
87
  /** Read + edit (no shell). For agents that write code/docs but don't run it. */
91
- readonly write: readonly ["read", "grep", "glob", "search", "tree", "write", "edit", "replace", "patch", "mailbox"];
88
+ readonly write: readonly ["read", "grep", "glob", "search", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls", "codebase-impact-analysis", "codebase-ast-replace", "codebase-invariant-check", "write", "edit", "replace", "patch", "mailbox"];
92
89
  /** Full build loop: edit + run (lint/format/typecheck/test/bash). */
93
- readonly build: readonly ["read", "grep", "glob", "search", "tree", "diff", "write", "edit", "replace", "patch", "bash", "exec", "lint", "format", "typecheck", "test", "mailbox"];
90
+ readonly build: readonly ["read", "grep", "glob", "search", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls", "codebase-impact-analysis", "codebase-ast-replace", "codebase-invariant-check", "codebase-targeted-test", "diff", "write", "edit", "replace", "patch", "bash", "exec", "lint", "format", "typecheck", "test", "mailbox"];
94
91
  /**
95
92
  * Version control.
96
93
  *
@@ -104,7 +101,7 @@ export declare const TOOLS: {
104
101
  /** Dependency management + CVE audit. */
105
102
  readonly deps: readonly ["read", "grep", "glob", "install", "outdated", "audit", "json", "mailbox"];
106
103
  /** Documentation authoring. */
107
- readonly docs: readonly ["read", "grep", "glob", "search", "tree", "write", "edit", "document", "mailbox"];
104
+ readonly docs: readonly ["read", "grep", "glob", "search", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls", "write", "edit", "document", "mailbox"];
108
105
  /** Web research. */
109
106
  readonly research: readonly ["read", "grep", "glob", "search", "fetch", "mailbox"];
110
107
  };
@@ -2626,6 +2626,7 @@ var RUNTIME_CAPABILITY_MANIFEST = [
2626
2626
  "codebase-skeleton",
2627
2627
  "codebase-repo-map",
2628
2628
  "codebase-impact-analysis",
2629
+ "codebase-invariant-check",
2629
2630
  "dead-code-scan",
2630
2631
  "diff",
2631
2632
  "json",
@@ -4782,13 +4783,50 @@ var HEAVY_BUDGET = {
4782
4783
  maxIterations: 8e3,
4783
4784
  maxToolCalls: 2e4
4784
4785
  };
4786
+ var INDEX_READ = [
4787
+ "codebase-stats",
4788
+ "codebase-search",
4789
+ "codebase-skeleton",
4790
+ "codebase-repo-map",
4791
+ "codebase-incoming-calls",
4792
+ "codebase-outgoing-calls"
4793
+ ];
4785
4794
  var TOOLS = {
4795
+ /** Index-backed code discovery. Spread onto code-facing presets, not browser. */
4796
+ index: INDEX_READ,
4786
4797
  /** Pure read/inspect — safe for analysis and review agents. */
4787
4798
  read: ["read", "grep", "glob", "search", "tree", "mailbox"],
4788
4799
  /** Read + structured inspection (logs, diffs, json, dependency audit). */
4789
- inspect: ["read", "grep", "glob", "search", "tree", "json", "diff", "logs", "audit", "mailbox"],
4800
+ inspect: [
4801
+ "read",
4802
+ "grep",
4803
+ "glob",
4804
+ "search",
4805
+ "tree",
4806
+ ...INDEX_READ,
4807
+ "json",
4808
+ "diff",
4809
+ "logs",
4810
+ "audit",
4811
+ "mailbox"
4812
+ ],
4790
4813
  /** Read + edit (no shell). For agents that write code/docs but don't run it. */
4791
- write: ["read", "grep", "glob", "search", "tree", "write", "edit", "replace", "patch", "mailbox"],
4814
+ write: [
4815
+ "read",
4816
+ "grep",
4817
+ "glob",
4818
+ "search",
4819
+ "tree",
4820
+ ...INDEX_READ,
4821
+ "codebase-impact-analysis",
4822
+ "codebase-ast-replace",
4823
+ "codebase-invariant-check",
4824
+ "write",
4825
+ "edit",
4826
+ "replace",
4827
+ "patch",
4828
+ "mailbox"
4829
+ ],
4792
4830
  /** Full build loop: edit + run (lint/format/typecheck/test/bash). */
4793
4831
  build: [
4794
4832
  "read",
@@ -4796,6 +4834,11 @@ var TOOLS = {
4796
4834
  "glob",
4797
4835
  "search",
4798
4836
  "tree",
4837
+ ...INDEX_READ,
4838
+ "codebase-impact-analysis",
4839
+ "codebase-ast-replace",
4840
+ "codebase-invariant-check",
4841
+ "codebase-targeted-test",
4799
4842
  "diff",
4800
4843
  "write",
4801
4844
  "edit",
@@ -4822,7 +4865,18 @@ var TOOLS = {
4822
4865
  /** Dependency management + CVE audit. */
4823
4866
  deps: ["read", "grep", "glob", "install", "outdated", "audit", "json", "mailbox"],
4824
4867
  /** Documentation authoring. */
4825
- docs: ["read", "grep", "glob", "search", "tree", "write", "edit", "document", "mailbox"],
4868
+ docs: [
4869
+ "read",
4870
+ "grep",
4871
+ "glob",
4872
+ "search",
4873
+ "tree",
4874
+ ...INDEX_READ,
4875
+ "write",
4876
+ "edit",
4877
+ "document",
4878
+ "mailbox"
4879
+ ],
4826
4880
  /** Web research. */
4827
4881
  research: ["read", "grep", "glob", "search", "fetch", "mailbox"]
4828
4882
  };
@@ -4839,7 +4893,7 @@ var DISCOVERY_AGENTS = [
4839
4893
  id: "explore",
4840
4894
  name: "Explore",
4841
4895
  role: "explore",
4842
- tools: [...TOOLS.read],
4896
+ tools: [...TOOLS.read, ...TOOLS.index],
4843
4897
  prompt: agentPrompt("explore")
4844
4898
  },
4845
4899
  budget: MEDIUM_BUDGET,
@@ -4867,7 +4921,7 @@ var DISCOVERY_AGENTS = [
4867
4921
  id: "search",
4868
4922
  name: "Search",
4869
4923
  role: "search",
4870
- tools: [...TOOLS.read, "codebase-search"],
4924
+ tools: [...TOOLS.read, ...TOOLS.index],
4871
4925
  prompt: agentPrompt("search")
4872
4926
  },
4873
4927
  budget: MEDIUM_BUDGET,
@@ -4918,7 +4972,7 @@ var DISCOVERY_AGENTS = [
4918
4972
  ];
4919
4973
 
4920
4974
  // src/coordination/agents/phase2-planning.ts
4921
- var PLAN_TOOLS = [...TOOLS.read, "plan", "todo"];
4975
+ var PLAN_TOOLS = [...TOOLS.read, ...TOOLS.index, "plan", "todo"];
4922
4976
  var PLANNING_AGENTS = [
4923
4977
  {
4924
4978
  config: {