@wrongstack/core 0.155.0 → 0.250.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.
- package/dist/{agent-bridge-BbZU5TPN.d.ts → agent-bridge-4gc0vfW2.d.ts} +1 -1
- package/dist/{agent-subagent-runner-Bsueu0J2.d.ts → agent-subagent-runner-Dz-9kiE6.d.ts} +9 -8
- package/dist/{brain-CS_B0vIE.d.ts → brain-sCZ3lCjq.d.ts} +26 -2
- package/dist/{compactor-BueGt7LG.d.ts → compactor-BRfg3QPd.d.ts} +1 -1
- package/dist/{config-BaVThgnT.d.ts → config-eSsrto5d.d.ts} +8 -2
- package/dist/{context-C7G_MtLV.d.ts → context-CLz3z_E8.d.ts} +126 -2
- package/dist/coordination/index.d.ts +70 -13
- package/dist/coordination/index.js +1986 -146
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -26
- package/dist/defaults/index.js +1110 -296
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +45 -16
- package/dist/execution/index.js +229 -56
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +86 -0
- package/dist/execution/prompt-enhancer.js +125 -0
- package/dist/execution/prompt-enhancer.js.map +1 -0
- package/dist/extension/index.d.ts +6 -6
- package/dist/extension/index.js +3 -1
- package/dist/extension/index.js.map +1 -1
- package/dist/{goal-preamble-CbV8pXLD.d.ts → goal-preamble-BjJpnLW4.d.ts} +19 -10
- package/dist/{index-CI1hRfPt.d.ts → index-Dy8OwfBD.d.ts} +8 -8
- package/dist/{index-B5wz-GXm.d.ts → index-IehiNryU.d.ts} +7 -5
- package/dist/index.d.ts +438 -128
- package/dist/index.js +4989 -849
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +7 -7
- package/dist/infrastructure/index.js +61 -13
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js +7 -1
- package/dist/kernel/index.js.map +1 -1
- package/dist/{llm-selector-CP72f1lC.d.ts → llm-selector-D22R4AFz.d.ts} +2 -2
- package/dist/logger-DmmQhf4P.d.ts +65 -0
- package/dist/{mcp-servers-CPERR2De.d.ts → mcp-servers-DfXxCASH.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +89 -9
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-D90K9UnM.d.ts → models-registry-DpanBg8D.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-BSKSFNhv.d.ts → multi-agent-coordinator-CnbEqpv0.d.ts} +8 -8
- package/dist/{null-fleet-bus-CGOez8Le.d.ts → null-fleet-bus-Do1OLYpj.d.ts} +7 -7
- package/dist/observability/index.d.ts +2 -2
- package/dist/package-outdated-watcher-CA5GGB4C.d.ts +560 -0
- package/dist/{parallel-eternal-engine-CYoTKjsz.d.ts → parallel-eternal-engine-UZg1xOzE.d.ts} +13 -9
- package/dist/{path-resolver-DuhlmPil.d.ts → path-resolver-BaP06Owy.d.ts} +3 -3
- package/dist/{permission-B7nKnEvQ.d.ts → permission-DbWPbuoA.d.ts} +1 -1
- package/dist/{permission-policy-8-6zBmfA.d.ts → permission-policy-AOk0LVsV.d.ts} +2 -2
- package/dist/pipeline-D1n-gQI-.d.ts +493 -0
- package/dist/{plan-templates-DbH7lg-t.d.ts → plan-templates-BUVRY0pU.d.ts} +18 -7
- package/dist/{provider-runner-Cocq0O9E.d.ts → provider-runner-D0HgUqwV.d.ts} +3 -3
- package/dist/{retry-policy-rutAfVeR.d.ts → retry-policy-BVnkbMET.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/sdd/index.js +221 -87
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-w8MbUe2Q.d.ts → secret-vault-CeVNiy_f.d.ts} +3 -2
- package/dist/security/index.d.ts +5 -4
- package/dist/security/index.js +155 -13
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-4vDFZKt3.d.ts → selector-Cb4_9-hf.d.ts} +1 -1
- package/dist/{session-event-bridge-DWlvglC2.d.ts → session-event-bridge-BhtkkFFy.d.ts} +4 -2
- package/dist/{session-reader-BAtCxdaw.d.ts → session-reader-CCOssnBS.d.ts} +1 -1
- package/dist/skills/index.js +171 -21
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +150 -12
- package/dist/storage/index.js +1041 -214
- package/dist/storage/index.js.map +1 -1
- package/dist/types/index.d.ts +67 -20
- package/dist/types/index.js +562 -55
- package/dist/types/index.js.map +1 -1
- package/dist/utils/expect-defined.js +3 -1
- package/dist/utils/expect-defined.js.map +1 -1
- package/dist/utils/index.d.ts +25 -4
- package/dist/utils/index.js +45 -14
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-DD50Omgn.d.ts → wstack-paths-CJjEwPXn.d.ts} +14 -1
- package/package.json +7 -3
- package/skills/chimera/SKILL.md +105 -0
- package/skills/research-web/SKILL.md +342 -0
- package/dist/logger-B9J5puGM.d.ts +0 -32
- package/dist/pipeline-BG7UgbDc.d.ts +0 -239
package/dist/models/index.js
CHANGED
|
@@ -641,6 +641,77 @@ Remember: your job is to make the user a better developer, not just to complete
|
|
|
641
641
|
tags: ["teaching", "mentor", "learning"],
|
|
642
642
|
toolPreferences: ["read", "edit", "explain"],
|
|
643
643
|
suggestedSkills: ["prompt-engineering", "skill-creator", "node-modern", "typescript-strict"]
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
id: "research-web",
|
|
647
|
+
name: "Research Web",
|
|
648
|
+
description: "Current-data research \u2014 search web, verify, inject findings into context",
|
|
649
|
+
prompt: `## Research Web Mode
|
|
650
|
+
|
|
651
|
+
You are in research mode. Your role: find, verify, and incorporate
|
|
652
|
+
current web data. Your training data is stale \u2014 every factual claim
|
|
653
|
+
about version numbers, API surfaces, package status, or ecosystem
|
|
654
|
+
changes must be verified against live sources.
|
|
655
|
+
|
|
656
|
+
### When to research
|
|
657
|
+
- The user asks "is this still the case?", "what's current?", "latest version?"
|
|
658
|
+
- You're about to claim a version number, deprecation, or API change
|
|
659
|
+
- You're comparing tools, packages, or approaches released in the last 12 months
|
|
660
|
+
- You realize your knowledge may be >6 months old on a fast-moving topic
|
|
661
|
+
|
|
662
|
+
### Research methodology
|
|
663
|
+
1. **Search first, fetch selectively.** Use web_search with 5-8 results for
|
|
664
|
+
broad queries. Then web_fetch the 1-2 most authoritative results for detail.
|
|
665
|
+
Don't fetch every result \u2014 you'll burn tokens on noise.
|
|
666
|
+
2. **Cross-reference.** One source is a data point. Two sources that agree
|
|
667
|
+
is a signal. Three is confirmation. Flag single-source claims as tentative.
|
|
668
|
+
3. **Cite sources.** Every factual claim from web data must include where it
|
|
669
|
+
came from: domain name, and date if visible on the page.
|
|
670
|
+
4. **Know when to stop.** 2-3 searches + 1-2 fetches is usually sufficient.
|
|
671
|
+
If you're on your 5th search without a clear answer, pause and tell the user
|
|
672
|
+
what you've found and what's still unclear \u2014 let them decide to dig deeper.
|
|
673
|
+
5. **Inject findings for reuse.** After gathering current data, use
|
|
674
|
+
context_manager with add_note to inject a structured "Research Findings"
|
|
675
|
+
block into the conversation. Future turns see this and don't re-search.
|
|
676
|
+
|
|
677
|
+
### Self-injection pattern
|
|
678
|
+
When you discover current data mid-research, inject it so subsequent turns
|
|
679
|
+
benefit without re-searching:
|
|
680
|
+
|
|
681
|
+
web_search("Next.js middleware breaking changes 2025")
|
|
682
|
+
\u2192 Surfaced: Next.js 15.2 changed middleware runtime from edge to node
|
|
683
|
+
web_fetch("https://nextjs.org/docs/messages/middleware-upgrade-guide")
|
|
684
|
+
\u2192 Confirmed: middleware now runs on Node.js runtime by default
|
|
685
|
+
context_manager: add_note(
|
|
686
|
+
"## Research: Next.js middleware
|
|
687
|
+
- Next.js 15.2: middleware defaults to Node.js runtime (was edge)
|
|
688
|
+
- Breaking: edge-only APIs (crypto.subtle, WebSocket) no longer available
|
|
689
|
+
- Migration: use node:* equivalents or set runtime: 'edge' explicitly
|
|
690
|
+
- Source: nextjs.org/docs/messages/middleware-upgrade-guide"
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
The add_note persists in conversation \u2014 you won't re-search on the next turn.
|
|
694
|
+
|
|
695
|
+
### Anti-patterns
|
|
696
|
+
- Don't research things already in the conversation context (including
|
|
697
|
+
earlier add_note blocks you injected)
|
|
698
|
+
- Don't treat a single web search result as ground truth \u2014 cross-reference
|
|
699
|
+
- Don't inject raw JSON or search result dumps via add_note \u2014 summarize
|
|
700
|
+
- Don't research while the user is waiting for a quick code edit \u2014 toggle
|
|
701
|
+
research-web mode only during analysis/discussion phases
|
|
702
|
+
- Don't research-loop: 5+ searches on one topic \u2192 stop and ask the user
|
|
703
|
+
|
|
704
|
+
### Exiting research mode
|
|
705
|
+
When the user no longer needs current-data research, suggest switching back
|
|
706
|
+
to the previous mode. You stay in research mode until explicitly told to
|
|
707
|
+
switch \u2014 but don't force web searches on every turn. The methodology rules
|
|
708
|
+
above already gate when to actually search.
|
|
709
|
+
|
|
710
|
+
When you're done with research: suggest the user run \`/mode default\` or
|
|
711
|
+
their previous mode.`,
|
|
712
|
+
tags: ["research", "web", "current-data", "up-to-date"],
|
|
713
|
+
toolPreferences: ["web_search", "web_fetch", "search", "fetch", "context_manager"],
|
|
714
|
+
suggestedSkills: ["research-web", "tech-stack", "node-modern", "security-scanner", "react-modern"]
|
|
644
715
|
}
|
|
645
716
|
];
|
|
646
717
|
|
|
@@ -751,7 +822,9 @@ async function loadUserModes(modesDir) {
|
|
|
751
822
|
// src/utils/expect-defined.ts
|
|
752
823
|
function expectDefined(value, label) {
|
|
753
824
|
if (value === null || value === void 0) {
|
|
754
|
-
|
|
825
|
+
const err = new Error("Expected value to be defined");
|
|
826
|
+
err.name = "ExpectDefinedError";
|
|
827
|
+
throw err;
|
|
755
828
|
}
|
|
756
829
|
return value;
|
|
757
830
|
}
|
|
@@ -789,18 +862,25 @@ function estimateToolResultTokens(content) {
|
|
|
789
862
|
function estimateTextTokens(text) {
|
|
790
863
|
return RoughTokenEstimate(text);
|
|
791
864
|
}
|
|
865
|
+
function computeMessageTokens(msg) {
|
|
866
|
+
if (typeof msg.content === "string") return estimateTextTokens(msg.content);
|
|
867
|
+
let total = 0;
|
|
868
|
+
for (const b of msg.content) {
|
|
869
|
+
if (b.type === "text") total += estimateTextTokens(b.text);
|
|
870
|
+
else if (b.type === "tool_use") total += estimateToolInputTokens(b.input);
|
|
871
|
+
else if (b.type === "tool_result") total += estimateToolResultTokens(b.content);
|
|
872
|
+
else total += RoughTokenEstimate(JSON.stringify(b));
|
|
873
|
+
}
|
|
874
|
+
return total;
|
|
875
|
+
}
|
|
792
876
|
function estimateMessageTokens(messages) {
|
|
793
877
|
let total = 0;
|
|
794
878
|
for (const m of messages) {
|
|
795
|
-
if (typeof m.
|
|
796
|
-
total +=
|
|
797
|
-
|
|
798
|
-
for (const b of m.content) {
|
|
799
|
-
if (b.type === "text") total += estimateTextTokens(b.text);
|
|
800
|
-
else if (b.type === "tool_use") total += estimateToolInputTokens(b.input);
|
|
801
|
-
else if (b.type === "tool_result") total += estimateToolResultTokens(b.content);
|
|
802
|
-
}
|
|
879
|
+
if (typeof m._estTokens === "number" && m._estTokens > 0) {
|
|
880
|
+
total += m._estTokens;
|
|
881
|
+
continue;
|
|
803
882
|
}
|
|
883
|
+
total += computeMessageTokens(m);
|
|
804
884
|
}
|
|
805
885
|
return total;
|
|
806
886
|
}
|