@wrongstack/core 0.277.1 → 0.280.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 (83) hide show
  1. package/dist/{agent-bridge-BFJ2ODzI.d.ts → agent-bridge-DXC6QDJ4.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-BimKihiC.d.ts → agent-subagent-runner-PoqNKiR4.d.ts} +563 -471
  3. package/dist/{compactor-D3BGw26y.d.ts → compactor-U3agvUIG.d.ts} +1 -1
  4. package/dist/{config-DAOjriz9.d.ts → config-Cr3312zc.d.ts} +102 -4
  5. package/dist/coordination/index.d.ts +1087 -998
  6. package/dist/coordination/index.js +12235 -12052
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +31 -30
  9. package/dist/defaults/index.js +403 -189
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{brain-CCfuEOdp.d.ts → events-Bs2fmldo.d.ts} +117 -112
  12. package/dist/execution/index.d.ts +27 -19
  13. package/dist/execution/index.js +216 -63
  14. package/dist/execution/index.js.map +1 -1
  15. package/dist/execution/prompt-enhancer.d.ts +1 -1
  16. package/dist/execution/prompt-enhancer.js.map +1 -1
  17. package/dist/extension/index.d.ts +8 -7
  18. package/dist/{global-mailbox-Dr4cTKqL.d.ts → global-mailbox-Ct7IorLJ.d.ts} +84 -6
  19. package/dist/{goal-store-C1uH4srH.d.ts → goal-store-C4F6DjC0.d.ts} +1 -1
  20. package/dist/hq/index.d.ts +504 -7
  21. package/dist/hq/index.js +1069 -20
  22. package/dist/hq/index.js.map +1 -1
  23. package/dist/{index-DJXj-dcr.d.ts → index-kidebiDh.d.ts} +8 -5
  24. package/dist/{index-cMEmzCVN.d.ts → index-nP09-oP2.d.ts} +2 -2
  25. package/dist/index.d.ts +153 -76
  26. package/dist/index.js +5791 -3163
  27. package/dist/index.js.map +1 -1
  28. package/dist/infrastructure/index.d.ts +7 -6
  29. package/dist/kernel/index.d.ts +14 -13
  30. package/dist/kernel/index.js +31 -15
  31. package/dist/kernel/index.js.map +1 -1
  32. package/dist/{mailbox-types-DTl7bRH3.d.ts → mailbox-types-BGZWrYTJ.d.ts} +38 -0
  33. package/dist/{mcp-servers-CFb60-pH.d.ts → mcp-servers-D910X5_r.d.ts} +3 -3
  34. package/dist/models/index.d.ts +5 -5
  35. package/dist/models/index.js.map +1 -1
  36. package/dist/{models-registry-5Ufn7f2m.d.ts → models-registry-CLkoOcHk.d.ts} +1 -1
  37. package/dist/{multi-agent-coordinator-CcrcncvG.d.ts → multi-agent-coordinator-CieyUoEL.d.ts} +1 -1
  38. package/dist/{null-fleet-bus-C9KsYyrI.d.ts → null-fleet-bus-DkdmZJ_W.d.ts} +464 -464
  39. package/dist/observability/index.d.ts +3 -2
  40. package/dist/{path-resolver-CEeX9I7O.d.ts → path-resolver-XfZ9eLxG.d.ts} +3 -3
  41. package/dist/{permission-DbsGOA1C.d.ts → permission-Dx6dIqS2.d.ts} +2 -7
  42. package/dist/{permission-policy-BpEea3r7.d.ts → permission-policy-C8vJcnX5.d.ts} +2 -2
  43. package/dist/{pipeline-CEjBjzVA.d.ts → pipeline-BwAP21_4.d.ts} +9 -4
  44. package/dist/{provider-model-resolve-BpfXp3Jj.d.ts → provider-model-resolve-CwQNZWt_.d.ts} +3 -3
  45. package/dist/{provider-runner-CnOSr5BN.d.ts → provider-runner-CYHFImzV.d.ts} +3 -3
  46. package/dist/{retry-policy-Git9WF6d.d.ts → retry-policy-D4feSLk3.d.ts} +1 -1
  47. package/dist/sdd/index.d.ts +11 -10
  48. package/dist/sdd/index.js +2 -2
  49. package/dist/sdd/index.js.map +1 -1
  50. package/dist/secret-scrubber-3MHDDAtm.d.ts +6 -0
  51. package/dist/{secret-vault-DDSMHqIm.d.ts → secret-vault-CImt2XrR.d.ts} +1 -1
  52. package/dist/security/index.d.ts +6 -5
  53. package/dist/security/index.js.map +1 -1
  54. package/dist/{selector-Cq72C0Oy.d.ts → selector-Dy-MzKp1.d.ts} +1 -1
  55. package/dist/{session-event-bridge-DG94B3Bk.d.ts → session-event-bridge-CqdiGnfU.d.ts} +1 -1
  56. package/dist/{session-reader-BzT-iMQT.d.ts → session-reader-Hk0WbNm9.d.ts} +1 -1
  57. package/dist/{skill-DGIXCtdv.d.ts → skill-DHniprNl.d.ts} +15 -1
  58. package/dist/skills/index.d.ts +472 -26
  59. package/dist/skills/index.js +872 -129
  60. package/dist/skills/index.js.map +1 -1
  61. package/dist/storage/index.d.ts +27 -14
  62. package/dist/storage/index.js +264 -85
  63. package/dist/storage/index.js.map +1 -1
  64. package/dist/{strategy-compactor-Bt_ZH6R0.d.ts → strategy-compactor-CQwhbErd.d.ts} +32 -17
  65. package/dist/{todos-checkpoint-CH1pcua9.d.ts → todos-checkpoint-Bk2uP7Ex.d.ts} +6 -6
  66. package/dist/{context-DPlA6kid.d.ts → tool-BkOgs_KL.d.ts} +306 -286
  67. package/dist/{tool-executor-SVFq7IOR.d.ts → tool-executor-SiE1wlZo.d.ts} +9 -9
  68. package/dist/tools/index.d.ts +2 -2
  69. package/dist/tools/index.js.map +1 -1
  70. package/dist/types/index.d.ts +22 -21
  71. package/dist/types/index.js +7 -9
  72. package/dist/types/index.js.map +1 -1
  73. package/dist/utils/index.d.ts +30 -4
  74. package/dist/utils/index.js +50 -1
  75. package/dist/utils/index.js.map +1 -1
  76. package/dist/{worktree-manager-C4YIf1Fa.d.ts → worktree-manager-BjOFF6bt.d.ts} +1 -1
  77. package/dist/{wstack-paths-_NrRovdr.d.ts → wstack-paths-CMl_cYgq.d.ts} +8 -0
  78. package/package.json +1 -1
  79. package/skills/mailbox-bridge/SKILL.md +1 -0
  80. package/skills/plugin-author/SKILL.md +350 -0
  81. package/skills/sdd/SKILL.md +134 -134
  82. package/skills/skill-creator/SKILL.md +45 -7
  83. package/skills/wrongstack-mailbox/SKILL.md +40 -21
@@ -1,4 +1,4 @@
1
- import { C as Context } from './context-DPlA6kid.js';
1
+ import { C as Context } from './tool-BkOgs_KL.js';
2
2
 
3
3
  interface CompactRepairReport {
4
4
  removedToolUses: string[];
@@ -1,4 +1,4 @@
1
- import { a as ReasoningConfig, o as Capabilities, h as Permission, p as ReasoningEffort, q as CacheTtl } from './context-DPlA6kid.js';
1
+ import { a as ReasoningConfig, p as ReasoningEffort, q as CacheTtl, r as Capabilities, e as Permission } from './tool-BkOgs_KL.js';
2
2
 
3
3
  type ContextWindowModeId = 'balanced' | 'frugal' | 'deep' | 'archival';
4
4
  type ContextWindowAggressiveOn = 'hard' | 'soft' | 'warn';
@@ -493,6 +493,33 @@ interface ExecToolConfig {
493
493
  * removing a command can only narrow what runs, so it is always safe.
494
494
  */
495
495
  deny?: string[] | undefined;
496
+ /**
497
+ * Per-rule bypass for the heuristic danger detector. Each entry is a
498
+ * stable `matchedRule` id (e.g. `rm-recursive`, `git-push-force`); a
499
+ * matched rule whose id is in this list is suppressed.
500
+ *
501
+ * Use case: a project that legitimately runs `rm -rf ./build` on every
502
+ * CI run can add `"rm-recursive"` to bypass so the detector stops
503
+ * emitting banners for that one rule — without disabling it for every
504
+ * other `rm -rf` invocation.
505
+ *
506
+ * **Trusted sources only.** Bypassing a danger rule means the user
507
+ * agreed to a specific destructive pattern; in-project repo config
508
+ * could otherwise be used to silently opt everyone in. The boot path
509
+ * strips this field from `<project>/.wrongstack/config.json` the
510
+ * same way it strips `allow`.
511
+ */
512
+ danger?: ExecDangerConfig | undefined;
513
+ }
514
+ interface ExecDangerConfig {
515
+ /**
516
+ * List of danger rule ids to skip. Each id corresponds to a rule in
517
+ * `@wrongstack/tools/src/_danger-detect.ts` (e.g. `rm-recursive`,
518
+ * `git-push-force`, `inline-eval`, `sudo`). Unknown ids are ignored
519
+ * (forward-compat: a rule added in a future version can be referenced
520
+ * before the user upgrades).
521
+ */
522
+ bypass?: string[] | undefined;
496
523
  }
497
524
  type ToolDescriptionMode = 'extend' | 'simple';
498
525
  type ToolDescriptionModeConfig = Record<string, ToolDescriptionMode | undefined>;
@@ -624,6 +651,13 @@ interface ModelMatrixEntry {
624
651
  provider?: string | undefined;
625
652
  /** Model id to run for the matched role/phase/default. */
626
653
  model?: string | undefined;
654
+ /**
655
+ * Runtime request overrides for subagents matched by this entry. This is
656
+ * intentionally scoped to subagents: leader requests keep using top-level
657
+ * `Config.modelRuntime`, while a role/phase can opt into its own reasoning
658
+ * effort, cache TTL, or gated generation parameters.
659
+ */
660
+ modelRuntime?: ModelRuntimeConfig | undefined;
627
661
  /**
628
662
  * Named fallback profile to use for the matched role/phase/default. When
629
663
  * `model` is omitted, the first model in the profile becomes the primary and
@@ -873,6 +907,59 @@ interface CustomModelDefinition {
873
907
  */
874
908
  maxOutput?: number | undefined;
875
909
  }
910
+ /**
911
+ * Skill subsystem configuration. All fields optional; the subsystem itself is
912
+ * gated by `features.skills`. Honored from the user's `~/.wrongstack/config.json`;
913
+ * in the repo-committed in-project config the `extraDirs` field is stripped
914
+ * (arbitrary directories are a prompt-injection vector) — only `readClaudeSkills`
915
+ * and `mode` survive there.
916
+ */
917
+ interface SkillsConfig {
918
+ /**
919
+ * Read skills from foreign coding-agent directories (`<project>/.claude/skills`
920
+ * and `~/.claude/skills`). Default `true`. Lets Claude Code / Codex / Gemini /
921
+ * `asm` / `gh skill` skills be used without copying them.
922
+ */
923
+ readClaudeSkills?: boolean | undefined;
924
+ /**
925
+ * Scan OTHER coding agents' skill directories (`~/.codex/skills`,
926
+ * `~/.cursor/skills`, `~/.agents/skills`, `~/.qwen/skills`,
927
+ * `~/.trae/skills`, … + their `<project>/.<tool>/…` equivalents). Default
928
+ * `true` (all known tools); pass a tool-id list to restrict, or `false` to
929
+ * disable. Non-existent dirs are skipped. Unknown ids in the list (likely
930
+ * typos) are dropped and surfaced via a config warning.
931
+ */
932
+ foreignSources?: boolean | string[] | undefined;
933
+ /**
934
+ * How skill bodies reach the system prompt.
935
+ * - `'eager'` (default): inject every discovered skill body into the prompt.
936
+ * - `'progressive'`: inject only the metadata manifest; the agent loads a
937
+ * skill body on demand via the `skill` tool (the agentskills.io model).
938
+ */
939
+ mode?: 'eager' | 'progressive' | undefined;
940
+ /**
941
+ * Extra skill directories to scan (lowest priority, after the `.claude`
942
+ * layers). Honored only from the user config; stripped from in-project config.
943
+ */
944
+ extraDirs?: string[] | undefined;
945
+ /**
946
+ * In eager mode, the maximum total chars of skill bodies injected into the
947
+ * prompt (highest-priority skills first; the rest are listed as a manifest the
948
+ * agent loads via the `skill` tool). Bounds prompt cost when many skills are
949
+ * discovered. Default 24000 (~6k tokens). Set very high to disable. Ignored in
950
+ * progressive mode (which injects only the manifest anyway).
951
+ */
952
+ eagerMaxChars?: number | undefined;
953
+ /**
954
+ * Base URL of the skill registry used by `/skill-search` and
955
+ * `/skill-install <registry>:<id>`. Default `https://skills.sh` (the open
956
+ * marketplace backed by mastra-ai/skills-api). Honored only from the user
957
+ * config; stripped from in-project config (a repo-committed override would be
958
+ * an SSRF / prompt-injection vector — the registry response is parsed into the
959
+ * prompt). Set to a self-hosted skills-api instance to use a private catalog.
960
+ */
961
+ registryUrl?: string | undefined;
962
+ }
876
963
  interface Config {
877
964
  version: 1;
878
965
  provider: string;
@@ -886,6 +973,14 @@ interface Config {
886
973
  * CLI flag. Change at runtime with /fleet concurrency <n>.
887
974
  */
888
975
  maxConcurrent?: number | undefined;
976
+ /**
977
+ * Display language for the UI chrome (WebUI + desktop shell). A BCP-47-ish
978
+ * code from SUPPORTED_LOCALES (en/tr/de/fr/it/es/pt-BR). Persisted here so a
979
+ * change in one surface propagates to all others via the shared machine
980
+ * config; each surface may keep a local cache for instant reactivity. When
981
+ * unset, surfaces fall back to their own browser/system detection.
982
+ */
983
+ uiLocale?: string | undefined;
889
984
  providers?: Record<string, ProviderConfig>;
890
985
  /**
891
986
  * Top-level custom models (maps modelId → definition). Merged with
@@ -935,8 +1030,9 @@ interface Config {
935
1030
  * Ordered list of fallback model references tried, in order, when the
936
1031
  * primary model is overloaded (HTTP 429/529/5xx) and its own retries are
937
1032
  * exhausted. Each entry is a model reference: a bare model id (same
938
- * provider), `provider/model`, or `provider model`. The primary is always
939
- * re-tried first at the start of every user turn. See `createFallbackModelExtension`.
1033
+ * provider), `provider/model`, or `provider model`. After a fallback hop,
1034
+ * the primary is retried only after its cooldown expires. See
1035
+ * `createFallbackModelExtension`.
940
1036
  */
941
1037
  fallbackModels?: string[] | undefined;
942
1038
  /**
@@ -961,6 +1057,8 @@ interface Config {
961
1057
  plugins?: (string | PluginConfig)[] | undefined;
962
1058
  log: LogConfig;
963
1059
  features: FeaturesConfig;
1060
+ /** Skill subsystem options (readClaudeSkills / mode / extraDirs). */
1061
+ skills?: SkillsConfig | undefined;
964
1062
  yolo?: boolean | undefined;
965
1063
  /** When true, show lightweight LLM-predicted next steps after each turn (/next). */
966
1064
  nextPrediction?: boolean | undefined;
@@ -1067,4 +1165,4 @@ interface ConfigStore {
1067
1165
  watch(cb: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
1068
1166
  }
1069
1167
 
1070
- export { type ToolDescriptionModeConfig as $, type AdaptiveConcurrencyConfig as A, type IndexingConfig as B, type Config as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, type ExecToolConfig as E, type FeaturesConfig as F, type LogConfig as G, type HookEvent as H, type InProcessHook as I, MAX_TUI_THINKING_WORD_LENGTH as J, type ModelRuntimeCacheConfig as K, type LaunchConfig as L, type ModelsRegistry as M, type ModelRuntimeConfig as N, type ModelRuntimeParametersConfig as O, type ProviderConfig as P, type ModelRuntimeReasoningConfig as Q, type ResolvedProvider as R, type ShellHook as S, type ToolResultRenderMode as T, type ModelsDevProvider as U, type PluginConfig as V, type WireFamily as W, type ProviderApiKey as X, type SessionLoggingConfig as Y, type SyncCategory as Z, type ToolDescriptionMode as _, type ModelsDevPayload as a, type ToolResultRenderModeConfig as a0, type ToolsConfig as a1, formatContextWindowModeList as a2, getContextWindowMode as a3, isContextWindowModeId as a4, listContextWindowModes as a5, normalizeTokenSavingTier as a6, normalizeTuiThinkingWord as a7, resolveContextWindowPolicy as a8, type ResolvedModel as b, type MCPServerConfig as c, type ModelMatrixEntry as d, type ModelsDevModel as e, type HookMatcher as f, type HookEntry as g, type ContextWindowAggressiveOn as h, type ContextWindowPolicy as i, type ConfigLoader as j, type SyncConfig as k, type ConfigStore as l, type HookInput as m, type HookOutcome as n, type TokenSavingTier as o, type AutonomyConfig as p, CONTEXT_WINDOW_MODES as q, type CircuitBreakerRuntimeConfig as r, type ContextConfig as s, type ContextWindowConfigLike as t, type ContextWindowMode as u, type ContextWindowModeId as v, type ContextWindowThresholds as w, type CustomModelDefinition as x, DEFAULT_TUI_THINKING_WORD as y, type HqClientConfig as z };
1168
+ export { type SyncCategory as $, type AdaptiveConcurrencyConfig as A, type ExecToolConfig as B, type Config as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, type ExecDangerConfig as E, type FeaturesConfig as F, type HqClientConfig as G, type HookEvent as H, type InProcessHook as I, type IndexingConfig as J, type LogConfig as K, type LaunchConfig as L, type ModelsRegistry as M, MAX_TUI_THINKING_WORD_LENGTH as N, type ModelRuntimeCacheConfig as O, type ProviderConfig as P, type ModelRuntimeParametersConfig as Q, type ResolvedProvider as R, type ShellHook as S, type ToolResultRenderMode as T, type ModelRuntimeReasoningConfig as U, type ModelsDevProvider as V, type WireFamily as W, type PluginConfig as X, type ProviderApiKey as Y, type SessionLoggingConfig as Z, type SkillsConfig as _, type ModelsDevPayload as a, type ToolDescriptionMode as a0, type ToolDescriptionModeConfig as a1, type ToolResultRenderModeConfig as a2, type ToolsConfig as a3, formatContextWindowModeList as a4, getContextWindowMode as a5, isContextWindowModeId as a6, listContextWindowModes as a7, normalizeTokenSavingTier as a8, normalizeTuiThinkingWord as a9, resolveContextWindowPolicy as aa, type ResolvedModel as b, type MCPServerConfig as c, type ModelMatrixEntry as d, type ModelsDevModel as e, type HookMatcher as f, type HookEntry as g, type ModelRuntimeConfig as h, type ContextWindowAggressiveOn as i, type ContextWindowPolicy as j, type ConfigLoader as k, type SyncConfig as l, type ConfigStore as m, type HookInput as n, type HookOutcome as o, type TokenSavingTier as p, type AutonomyConfig as q, CONTEXT_WINDOW_MODES as r, type CircuitBreakerRuntimeConfig as s, type ContextConfig as t, type ContextWindowConfigLike as u, type ContextWindowMode as v, type ContextWindowModeId as w, type ContextWindowThresholds as x, type CustomModelDefinition as y, DEFAULT_TUI_THINKING_WORD as z };