@wrongstack/core 0.280.1 → 0.281.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.
- package/dist/{agent-subagent-runner-PoqNKiR4.d.ts → agent-subagent-runner-DyOSK2Wy.d.ts} +39 -8
- package/dist/{compactor-U3agvUIG.d.ts → compactor-BxddyCFu.d.ts} +1 -1
- package/dist/{config-Cr3312zc.d.ts → config-CN-vdDEI.d.ts} +82 -2
- package/dist/coordination/index.d.ts +203 -20
- package/dist/coordination/index.js +981 -52
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -30
- package/dist/defaults/index.js +382 -30
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-Bs2fmldo.d.ts → events-C5hLU0AT.d.ts} +38 -2
- package/dist/execution/index.d.ts +16 -16
- package/dist/execution/index.js +161 -18
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/execution/prompt-enhancer.js +12 -3
- package/dist/execution/prompt-enhancer.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{global-mailbox-Ct7IorLJ.d.ts → global-mailbox-CHM1QkCi.d.ts} +5 -2
- package/dist/{goal-store-C4F6DjC0.d.ts → goal-store-BLGZq16t.d.ts} +1 -1
- package/dist/hq/index.d.ts +6 -6
- package/dist/hq/index.js +35 -13
- package/dist/hq/index.js.map +1 -1
- package/dist/{index-nP09-oP2.d.ts → index-BEFWNZYs.d.ts} +1 -2
- package/dist/{index-kidebiDh.d.ts → index-C1E-_71T.d.ts} +6 -6
- package/dist/index.d.ts +44 -48
- package/dist/index.js +14855 -13944
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +60 -8
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +11 -11
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-D910X5_r.d.ts → mcp-servers-EKRAcJDi.d.ts} +97 -4
- package/dist/models/index.d.ts +4 -5
- package/dist/models/index.js +22 -5
- package/dist/models/index.js.map +1 -1
- package/dist/{multi-agent-coordinator-CieyUoEL.d.ts → multi-agent-coordinator-IpHCuHUa.d.ts} +29 -1
- package/dist/{null-fleet-bus-DkdmZJ_W.d.ts → null-fleet-bus-ZBkKGR9j.d.ts} +105 -7
- package/dist/observability/index.d.ts +3 -3
- package/dist/{tool-executor-SiE1wlZo.d.ts → parallel-eternal-engine-Cc2CNgmv.d.ts} +6 -202
- package/dist/path-resolver-CMS5307d.d.ts +13 -0
- package/dist/{permission-Dx6dIqS2.d.ts → permission-B6YAtNFz.d.ts} +1 -1
- package/dist/{pipeline-BwAP21_4.d.ts → pipeline-E7_jqGyV.d.ts} +2 -2
- package/dist/{provider-model-resolve-CwQNZWt_.d.ts → provider-model-resolve-KgIdiEQ6.d.ts} +118 -5
- package/dist/{provider-runner-CYHFImzV.d.ts → provider-runner-DxWXNHL1.d.ts} +3 -3
- package/dist/{retry-policy-D4feSLk3.d.ts → retry-policy-V67lBOJz.d.ts} +2 -2
- package/dist/sdd/index.d.ts +9 -9
- package/dist/sdd/index.js +94 -10
- package/dist/sdd/index.js.map +1 -1
- package/dist/{permission-policy-C8vJcnX5.d.ts → secret-vault-D7jeyXUQ.d.ts} +119 -3
- package/dist/security/index.d.ts +5 -6
- package/dist/security/index.js +4 -1
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-Dy-MzKp1.d.ts → selector-Bx2HgUkU.d.ts} +1 -1
- package/dist/{session-event-bridge-CqdiGnfU.d.ts → session-event-bridge-vA2fLV58.d.ts} +1 -1
- package/dist/{session-reader-Hk0WbNm9.d.ts → session-reader-B-Fi9L6I.d.ts} +1 -1
- package/dist/session-registry-Dvg7i_IA.d.ts +129 -0
- package/dist/storage/index.d.ts +71 -142
- package/dist/storage/index.js +161 -13
- package/dist/storage/index.js.map +1 -1
- package/dist/{todos-checkpoint-Bk2uP7Ex.d.ts → todos-checkpoint-B1QVkoa8.d.ts} +23 -5
- package/dist/{tool-BkOgs_KL.d.ts → tool-LVSLiE1s.d.ts} +18 -4
- package/dist/{strategy-compactor-CQwhbErd.d.ts → tool-executor-BWtYwuPI.d.ts} +210 -12
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +17 -41
- package/dist/types/index.js +182 -5085
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +6 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{worktree-manager-BjOFF6bt.d.ts → worktree-manager-C6CIilTT.d.ts} +1 -1
- package/dist/{wstack-paths-CMl_cYgq.d.ts → wstack-paths-C3K40Qst.d.ts} +2 -0
- package/instructions/agents/shadow-agent.md +23 -84
- package/instructions/coordination/director-preamble.md +12 -3
- package/instructions/coordination/subagent-baseline.md +39 -46
- package/instructions/leader-after-task.md +10 -28
- package/instructions/llm/llm-selector.md +1 -2
- package/instructions/modes/brief-system.md +7 -33
- package/instructions/modes/brief.md +5 -20
- package/instructions/modes/teach-system.md +12 -72
- package/instructions/modes/teach.md +12 -49
- package/instructions/sections/tool/commit-hygiene.md +5 -5
- package/instructions/sections/tool/context-management-full.md +6 -6
- package/instructions/sections/tool/delegation-compact.md +1 -1
- package/instructions/sections/tool/delegation-full.md +19 -23
- package/instructions/sections/tool/mailbox-full.md +11 -31
- package/instructions/sections/tool/mcp-full-control.md +5 -7
- package/instructions/sections/tool/mcp-full-use.md +7 -7
- package/instructions/system.md +22 -38
- package/package.json +1 -29
- package/dist/agent-bridge-DXC6QDJ4.d.ts +0 -35
- package/dist/logger-D3lV0cUZ.d.ts +0 -101
- package/dist/models-registry-CLkoOcHk.d.ts +0 -108
- package/dist/path-resolver-XfZ9eLxG.d.ts +0 -67
- package/dist/secret-vault-CImt2XrR.d.ts +0 -118
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { C as Compactor } from './compactor-
|
|
2
|
-
import { M as Message,
|
|
3
|
-
import {
|
|
1
|
+
import { C as Compactor } from './compactor-BxddyCFu.js';
|
|
2
|
+
import { M as Message, g as Tool } from './tool-LVSLiE1s.js';
|
|
3
|
+
import { L as Logger, a as LogLevel } from './logger-B63L5bTg.js';
|
|
4
|
+
import { b as MCPServerConfig } from './config-CN-vdDEI.js';
|
|
4
5
|
|
|
5
6
|
type ContextManagerAction = 'check' | 'summary' | 'prune' | 'add_note' | 'compact' | 'repair';
|
|
6
7
|
interface ContextManagerInput {
|
|
@@ -81,6 +82,98 @@ declare function createContextManagerTool(opts?: ContextManagerToolOptions): Too
|
|
|
81
82
|
/** Pre-built instance with no compactor — compact action will return an error. */
|
|
82
83
|
declare const contextManagerTool: Tool<ContextManagerInput, ContextManagerResult>;
|
|
83
84
|
|
|
85
|
+
type LogFormat = 'pretty' | 'json';
|
|
86
|
+
interface DefaultLoggerOptions {
|
|
87
|
+
level?: LogLevel | undefined;
|
|
88
|
+
file?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated Use `format: 'json'` instead. Kept for backward compat
|
|
91
|
+
* with existing callers but has no effect on output — the `format`
|
|
92
|
+
* option controls whether stderr receives pretty-printed or JSON lines.
|
|
93
|
+
*/
|
|
94
|
+
pretty?: boolean | undefined;
|
|
95
|
+
/** Output format for stderr. `pretty` (colored, human-readable) or `json` (machine-parseable). Defaults to `WRONGSTACK_LOG_FORMAT` env var, falling back to `pretty`. */
|
|
96
|
+
format?: LogFormat | undefined;
|
|
97
|
+
bindings?: Record<string, unknown>;
|
|
98
|
+
/**
|
|
99
|
+
* When false, suppress stderr output entirely — only write to the log
|
|
100
|
+
* file (if configured). Use this in TUI mode so plugin/library log
|
|
101
|
+
* messages don't interleave with Ink's terminal rendering.
|
|
102
|
+
* Default: true (stderr output is enabled).
|
|
103
|
+
*/
|
|
104
|
+
stderr?: boolean | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Rotate the log file once it exceeds this many bytes: the current file is
|
|
107
|
+
* renamed to `<file>.1` (replacing any previous one) and a fresh file
|
|
108
|
+
* starts. Bounds total disk to ~2× this value. Default 10 MB.
|
|
109
|
+
*/
|
|
110
|
+
maxFileBytes?: number | undefined;
|
|
111
|
+
}
|
|
112
|
+
declare class DefaultLogger implements Logger {
|
|
113
|
+
/** How many file writes between rotation size checks (statSync is not free). */
|
|
114
|
+
private static readonly ROTATE_CHECK_EVERY;
|
|
115
|
+
level: LogLevel;
|
|
116
|
+
private file?;
|
|
117
|
+
private bindings;
|
|
118
|
+
private format;
|
|
119
|
+
private stderr;
|
|
120
|
+
private maxFileBytes;
|
|
121
|
+
private writesSinceRotateCheck;
|
|
122
|
+
/**
|
|
123
|
+
* Serialized async tail for file writes. Every appendFile (and any
|
|
124
|
+
* chained rotation) is awaited through this promise so file I/O
|
|
125
|
+
* never overlaps itself — preserving the per-line ordering the
|
|
126
|
+
* sync version had, but without blocking the caller thread. Any
|
|
127
|
+
* rejection is swallowed (`catch(() => {})`) because logging must
|
|
128
|
+
* never crash the host.
|
|
129
|
+
*
|
|
130
|
+
* Children share the parent's tail: `child.tail === parent.tail`
|
|
131
|
+
* for the lifetime of the chain. Read/write access goes through
|
|
132
|
+
* `_tail` so that, when a child has been wired to a parent, both
|
|
133
|
+
* `enqueueRotate` and `log` always observe the parent's current tail
|
|
134
|
+
* rather than a stale snapshot taken at `child()` time.
|
|
135
|
+
*/
|
|
136
|
+
private tail;
|
|
137
|
+
private parent;
|
|
138
|
+
/**
|
|
139
|
+
* Resolve the current tail. For the root logger this is the field;
|
|
140
|
+
* for a child logger we always read through the parent so that a
|
|
141
|
+
* child's appends land on the parent's most recent tail, and a
|
|
142
|
+
* parent's `flush()` waits for everything the child chained.
|
|
143
|
+
*/
|
|
144
|
+
private get _tail();
|
|
145
|
+
private set _tail(value);
|
|
146
|
+
constructor(opts?: DefaultLoggerOptions);
|
|
147
|
+
error(msg: string, ctx?: unknown): void;
|
|
148
|
+
warn(msg: string, ctx?: unknown): void;
|
|
149
|
+
info(msg: string, ctx?: unknown): void;
|
|
150
|
+
debug(msg: string, ctx?: unknown): void;
|
|
151
|
+
trace(msg: string, ctx?: unknown): void;
|
|
152
|
+
child(bindings: Record<string, unknown>): Logger;
|
|
153
|
+
/**
|
|
154
|
+
* Wait until all queued file writes (and any pending rotation) have
|
|
155
|
+
* completed. `log()` is fire-and-forget by design — the caller never
|
|
156
|
+
* blocks on disk — so tests, shutdown handlers, and processes that
|
|
157
|
+
* need a deterministic "everything is on disk now" guarantee should
|
|
158
|
+
* `await logger.flush()` before reading the file or exiting.
|
|
159
|
+
*/
|
|
160
|
+
flush(): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Size-based rotation: when the file outgrows `maxFileBytes`, rename it to
|
|
163
|
+
* `<file>.1` (dropping the previous `.1`) so the live file restarts empty.
|
|
164
|
+
* Checked on the first write and every ROTATE_CHECK_EVERY writes after.
|
|
165
|
+
* Best-effort: a rename can fail on Windows while another process holds
|
|
166
|
+
* the file — the next check retries. Multiple processes appending to the
|
|
167
|
+
* same log all run this check; whoever crosses the threshold first wins.
|
|
168
|
+
*
|
|
169
|
+
* Async: the rotation runs on the file-write tail (so its writes don't
|
|
170
|
+
* interleave with the next append), and the caller never blocks on a
|
|
171
|
+
* statSync / renameSync syscall on the hot log path.
|
|
172
|
+
*/
|
|
173
|
+
private enqueueRotate;
|
|
174
|
+
private log;
|
|
175
|
+
}
|
|
176
|
+
|
|
84
177
|
/**
|
|
85
178
|
* Built-in MCP server presets available to all WrongStack users out of the box.
|
|
86
179
|
* These servers must be explicitly enabled in config (disabled by default).
|
|
@@ -163,4 +256,4 @@ declare const sshManagerServer: () => MCPServerConfig;
|
|
|
163
256
|
/** Everything bundled — full set of built-in servers. Useful for `wstack mcp add --all`. */
|
|
164
257
|
declare const allServers: () => Record<string, MCPServerConfig>;
|
|
165
258
|
|
|
166
|
-
export { type ContextManagerAction as C, type ContextManagerInput as a, type ContextManagerResult as b, type ContextManagerToolOptions as c,
|
|
259
|
+
export { type ContextManagerAction as C, DefaultLogger as D, type LogFormat as L, type ContextManagerInput as a, type ContextManagerResult as b, type ContextManagerToolOptions as c, type DefaultLoggerOptions as d, allServers as e, awsServer as f, blockServer as g, braveSearchServer as h, context7Server as i, contextManagerTool as j, createContextManagerTool as k, everArtServer as l, filesystemServer as m, githubServer as n, googleMapsServer as o, miniMaxVisionServer as p, playwrightServer as q, slackServer as r, sentinelServer as s, sshManagerServer as t, zaiVisionServer as z };
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { D as DefaultModelsRegistry,
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import '../
|
|
5
|
-
import '../selector-Dy-MzKp1.js';
|
|
1
|
+
export { C as CODEX_MODELS, a as CodexModelMeta, D as DefaultModeStore, b as DefaultModelsRegistry, c as DefaultModelsRegistryOptions, L as LLMSelector, d as LLMSelectorOptions, M as ModeLoaderOptions, P as ProviderModelDescriptor, e as classifyFamily, f as codexModelMeta, g as describeCatalogModel, l as loadProjectModes, h as loadUserModes, r as resolveProviderModelList } from '../provider-model-resolve-KgIdiEQ6.js';
|
|
2
|
+
import { a as ModelMatrixEntry, P as ProviderConfig } from '../config-CN-vdDEI.js';
|
|
3
|
+
import '../tool-LVSLiE1s.js';
|
|
4
|
+
import '../selector-Bx2HgUkU.js';
|
|
6
5
|
import '../mode-CZlO9iU1.js';
|
|
7
6
|
|
|
8
7
|
/**
|
package/dist/models/index.js
CHANGED
|
@@ -833,23 +833,32 @@ async function loadUserModes(modesDir) {
|
|
|
833
833
|
function isTextBlock(b) {
|
|
834
834
|
return b.type === "text";
|
|
835
835
|
}
|
|
836
|
+
var textCache = /* @__PURE__ */ new Map();
|
|
837
|
+
var rootCandidates;
|
|
836
838
|
function readBundledInstructionText(relativePath) {
|
|
839
|
+
const cached = textCache.get(relativePath);
|
|
840
|
+
if (cached !== void 0) return cached;
|
|
841
|
+
let resolved = "";
|
|
837
842
|
for (const root of instructionRootCandidates()) {
|
|
838
843
|
try {
|
|
839
|
-
|
|
844
|
+
resolved = readFileSync(path4.join(root, relativePath), "utf8").trimEnd();
|
|
845
|
+
break;
|
|
840
846
|
} catch {
|
|
841
847
|
}
|
|
842
848
|
}
|
|
843
|
-
|
|
849
|
+
textCache.set(relativePath, resolved);
|
|
850
|
+
return resolved;
|
|
844
851
|
}
|
|
845
852
|
function instructionRootCandidates() {
|
|
853
|
+
if (rootCandidates !== void 0) return rootCandidates;
|
|
846
854
|
const here = path4.dirname(fileURLToPath(import.meta.url));
|
|
847
855
|
const candidates = [
|
|
848
856
|
path4.resolve(here, "../../instructions"),
|
|
849
857
|
path4.resolve(here, "../instructions"),
|
|
850
858
|
path4.resolve(here, "instructions")
|
|
851
859
|
];
|
|
852
|
-
|
|
860
|
+
rootCandidates = candidates.sort((a, b) => Number(!isDirectory2(a)) - Number(!isDirectory2(b)));
|
|
861
|
+
return rootCandidates;
|
|
853
862
|
}
|
|
854
863
|
function isDirectory2(candidate) {
|
|
855
864
|
try {
|
|
@@ -1076,7 +1085,7 @@ function describeCatalogModel(m) {
|
|
|
1076
1085
|
]
|
|
1077
1086
|
};
|
|
1078
1087
|
}
|
|
1079
|
-
function resolveProviderModelList(savedModels, catalog) {
|
|
1088
|
+
function resolveProviderModelList(savedModels, catalog, providerHint) {
|
|
1080
1089
|
if (savedModels && savedModels.length > 0) {
|
|
1081
1090
|
const byId = new Map((catalog?.models ?? []).map((m) => [m.id, m]));
|
|
1082
1091
|
return savedModels.map((id) => {
|
|
@@ -1092,7 +1101,15 @@ function resolveProviderModelList(savedModels, catalog) {
|
|
|
1092
1101
|
return { id, name: id, capabilities: [] };
|
|
1093
1102
|
});
|
|
1094
1103
|
}
|
|
1095
|
-
if (catalog) return catalog.models.map(describeCatalogModel);
|
|
1104
|
+
if (catalog && catalog.models.length > 0) return catalog.models.map(describeCatalogModel);
|
|
1105
|
+
if (providerHint === "openai-codex") {
|
|
1106
|
+
return CODEX_MODELS.map((m) => ({
|
|
1107
|
+
id: m.id,
|
|
1108
|
+
name: m.name,
|
|
1109
|
+
description: m.description,
|
|
1110
|
+
capabilities: []
|
|
1111
|
+
}));
|
|
1112
|
+
}
|
|
1096
1113
|
return [];
|
|
1097
1114
|
}
|
|
1098
1115
|
|