@wrongstack/core 0.267.0 → 0.269.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-STJ3JwwK.d.ts → agent-bridge-PcHQl_UQ.d.ts} +1 -1
- package/dist/{agent-subagent-runner-CzPGP3jA.d.ts → agent-subagent-runner-SHJW7t8q.d.ts} +8 -8
- package/dist/{brain-Cdg77tVN.d.ts → brain-BYcK__Ym.d.ts} +1 -1
- package/dist/{compactor-iMZ84CXq.d.ts → compactor-C2RKEBtC.d.ts} +1 -1
- package/dist/{config-Du3pYYln.d.ts → config-C_ae2k86.d.ts} +79 -2
- package/dist/{context-dT5Ueund.d.ts → context-Dp87Bcaq.d.ts} +47 -1
- package/dist/coordination/index.d.ts +62 -160
- package/dist/coordination/index.js +566 -149
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -25
- package/dist/defaults/index.js +366 -137
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +72 -16
- package/dist/execution/index.js +267 -55
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/extension/index.d.ts +7 -6
- package/dist/global-mailbox-Bvrz1P3f.d.ts +664 -0
- package/dist/{goal-preamble-SulMTowG.d.ts → goal-preamble-CA_4yiGQ.d.ts} +9 -9
- package/dist/{goal-store-CABDwdFE.d.ts → goal-store-DhuJoUNG.d.ts} +1 -1
- package/dist/hq/index.d.ts +204 -0
- package/dist/hq/index.js +1931 -0
- package/dist/hq/index.js.map +1 -0
- package/dist/{index-DtCVWel4.d.ts → index-CZQ6Pwbs.d.ts} +8 -8
- package/dist/{index-Bms0m4oy.d.ts → index-W4VJCzHa.d.ts} +5 -5
- package/dist/{index-IEuxQd-E.d.ts → index-whDfTANu.d.ts} +2 -2
- package/dist/index.d.ts +46 -42
- package/dist/index.js +3472 -1651
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +48 -21
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +10 -9
- package/dist/{pipeline-BfD2k1rT.d.ts → mailbox-types-Ct2hJq0P.d.ts} +1 -244
- package/dist/{mcp-servers-C2cBTxUR.d.ts → mcp-servers-DJdZiRcv.d.ts} +10 -4
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +4 -3
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-BqGZNJQ-.d.ts → models-registry-C3a-2-Yd.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-B8R43uPz.d.ts → multi-agent-coordinator-CJSpTe5O.d.ts} +1 -1
- package/dist/{null-fleet-bus-CnXa5oTH.d.ts → null-fleet-bus-QVshIsDx.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-DdNnw9BQ.d.ts → parallel-eternal-engine-D9y5Pkcc.d.ts} +9 -15
- package/dist/{path-resolver-COIMLCQL.d.ts → path-resolver-CnQ8SIfh.d.ts} +4 -3
- package/dist/{permission-B75JAi3-.d.ts → permission-CvYQNUqZ.d.ts} +1 -1
- package/dist/{permission-policy-DlR9eJAM.d.ts → permission-policy-D5Ss8j4B.d.ts} +2 -3
- package/dist/pipeline-l_zzFRh3.d.ts +245 -0
- package/dist/{plan-templates-DSIKCXZN.d.ts → plan-templates-NtPgyeJA.d.ts} +6 -5
- package/dist/{provider-model-resolve-BNRsNuJx.d.ts → provider-model-resolve-d5poT5y0.d.ts} +3 -3
- package/dist/{provider-runner-CX7iIvox.d.ts → provider-runner-gkctlQV_.d.ts} +3 -3
- package/dist/{retry-policy-BilV1ujH.d.ts → retry-policy-CtFhfwa8.d.ts} +1 -1
- package/dist/sdd/index.d.ts +9 -8
- package/dist/sdd/index.js +33 -3
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-gkvEZZfE.d.ts → secret-vault-BLsVmTIK.d.ts} +1 -1
- package/dist/security/index.d.ts +5 -5
- package/dist/security/index.js +39 -29
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-Bc7eWtT3.d.ts → selector-CXl2_y9W.d.ts} +1 -1
- package/dist/{session-event-bridge-D-araDEz.d.ts → session-event-bridge-Ccud20CC.d.ts} +1 -1
- package/dist/{session-reader-D7Dapswh.d.ts → session-reader-ZeXQmsmE.d.ts} +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +16 -12
- package/dist/storage/index.js +273 -100
- package/dist/storage/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +166 -31
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +22 -21
- package/dist/types/index.js +178 -70
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +22 -3
- package/dist/utils/index.js +197 -25
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -1
- package/skills/chimera/SKILL.md +1 -1
- package/skills/typescript-strict/SKILL.md +3 -3
- package/skills/typescript-strict/SKILL.save.md +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { D as DefaultLogger, a as DefaultLoggerOptions, L as LogFormat } from '../logger-DmmQhf4P.js';
|
|
2
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
3
|
-
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, p as playwrightServer, s as sentinelServer, q as slackServer, z as zaiVisionServer } from '../mcp-servers-
|
|
2
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-CnQ8SIfh.js';
|
|
3
|
+
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, p as playwrightServer, s as sentinelServer, q as slackServer, r as sshManagerServer, z as zaiVisionServer } from '../mcp-servers-DJdZiRcv.js';
|
|
4
4
|
import '../logger-B63L5bTg.js';
|
|
5
|
-
import '../brain-
|
|
6
|
-
import '../context-
|
|
7
|
-
import '../config-
|
|
5
|
+
import '../brain-BYcK__Ym.js';
|
|
6
|
+
import '../context-Dp87Bcaq.js';
|
|
7
|
+
import '../config-C_ae2k86.js';
|
|
8
8
|
import '../path-resolver-CPRj4bFY.js';
|
|
9
|
-
import '../compactor-
|
|
9
|
+
import '../compactor-C2RKEBtC.js';
|
|
@@ -287,11 +287,10 @@ var DefaultTokenCounter = class {
|
|
|
287
287
|
const price = model ? this.priceCache.get(model) : void 0;
|
|
288
288
|
if (price) {
|
|
289
289
|
this.applyPrice(usage, price);
|
|
290
|
-
this.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
} else if (this.registry && this.providerId && model) {
|
|
290
|
+
this.emitAccounted();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (this.registry && this.providerId && model) {
|
|
295
294
|
if (this.priceCache.size >= PRICE_CACHE_MAX_SIZE) {
|
|
296
295
|
const keys = [...this.priceCache.keys()];
|
|
297
296
|
this.priceCache.delete(keys[0] ?? "");
|
|
@@ -301,16 +300,16 @@ var DefaultTokenCounter = class {
|
|
|
301
300
|
const p = priceFromModel(m);
|
|
302
301
|
this.priceCache.set(model, p);
|
|
303
302
|
this.applyPrice(usage, p);
|
|
304
|
-
this.events?.emit("token.accounted", {
|
|
305
|
-
usage: this.total(),
|
|
306
|
-
cost: { input: this.costInput, output: this.costOutput, total: this.costInput + this.costOutput }
|
|
307
|
-
});
|
|
308
303
|
}
|
|
304
|
+
this.emitAccounted();
|
|
309
305
|
}).catch(() => {
|
|
310
306
|
this.events?.emit("token.cost_estimate_unavailable", { model: model ?? "<unknown>" });
|
|
307
|
+
this.emitAccounted();
|
|
311
308
|
return void 0;
|
|
312
309
|
});
|
|
310
|
+
return;
|
|
313
311
|
}
|
|
312
|
+
this.emitAccounted();
|
|
314
313
|
}
|
|
315
314
|
/** Synchronous variant for code paths that have already resolved the model. */
|
|
316
315
|
accountWithModel(usage, resolved) {
|
|
@@ -327,10 +326,7 @@ var DefaultTokenCounter = class {
|
|
|
327
326
|
}
|
|
328
327
|
this.priceCache.set(resolved.modelId, price);
|
|
329
328
|
this.applyPrice(usage, price);
|
|
330
|
-
this.
|
|
331
|
-
usage: this.total(),
|
|
332
|
-
cost: { input: this.costInput, output: this.costOutput, total: this.costInput + this.costOutput }
|
|
333
|
-
});
|
|
329
|
+
this.emitAccounted();
|
|
334
330
|
}
|
|
335
331
|
total() {
|
|
336
332
|
return {
|
|
@@ -363,6 +359,12 @@ var DefaultTokenCounter = class {
|
|
|
363
359
|
invalidateCache() {
|
|
364
360
|
this.priceCache.clear();
|
|
365
361
|
}
|
|
362
|
+
emitAccounted() {
|
|
363
|
+
this.events?.emit("token.accounted", {
|
|
364
|
+
usage: this.total(),
|
|
365
|
+
cost: { input: this.costInput, output: this.costOutput, total: this.costInput + this.costOutput }
|
|
366
|
+
});
|
|
367
|
+
}
|
|
366
368
|
reset() {
|
|
367
369
|
this.input = 0;
|
|
368
370
|
this.output = 0;
|
|
@@ -370,6 +372,9 @@ var DefaultTokenCounter = class {
|
|
|
370
372
|
this.cacheWrite = 0;
|
|
371
373
|
this.costInput = 0;
|
|
372
374
|
this.costOutput = 0;
|
|
375
|
+
this.lastInput = 0;
|
|
376
|
+
this.lastCacheRead = 0;
|
|
377
|
+
this.emitAccounted();
|
|
373
378
|
}
|
|
374
379
|
applyPrice(usage, price) {
|
|
375
380
|
if (price.input) this.costInput += usage.input / 1e6 * price.input;
|
|
@@ -377,8 +382,14 @@ var DefaultTokenCounter = class {
|
|
|
377
382
|
if (usage.cacheRead && price.cacheRead) {
|
|
378
383
|
this.costInput += usage.cacheRead / 1e6 * price.cacheRead;
|
|
379
384
|
}
|
|
380
|
-
|
|
381
|
-
|
|
385
|
+
const hasCacheWriteSplit = usage.cacheWrite5m !== void 0 || usage.cacheWrite1h !== void 0;
|
|
386
|
+
const cacheWrite5m = usage.cacheWrite5m ?? (hasCacheWriteSplit ? 0 : usage.cacheWrite);
|
|
387
|
+
const cacheWrite1h = usage.cacheWrite1h ?? 0;
|
|
388
|
+
if (cacheWrite5m && (price.cacheWrite5m ?? price.cacheWrite)) {
|
|
389
|
+
this.costInput += cacheWrite5m / 1e6 * (price.cacheWrite5m ?? price.cacheWrite ?? 0);
|
|
390
|
+
}
|
|
391
|
+
if (cacheWrite1h && (price.cacheWrite1h ?? price.cacheWrite)) {
|
|
392
|
+
this.costInput += cacheWrite1h / 1e6 * (price.cacheWrite1h ?? price.cacheWrite ?? 0);
|
|
382
393
|
}
|
|
383
394
|
}
|
|
384
395
|
};
|
|
@@ -387,7 +398,9 @@ function priceFromModel(m) {
|
|
|
387
398
|
input: m.cost?.input,
|
|
388
399
|
output: m.cost?.output,
|
|
389
400
|
cacheRead: m.cost?.cache_read,
|
|
390
|
-
cacheWrite: m.cost?.cache_write
|
|
401
|
+
cacheWrite: m.cost?.cache_write,
|
|
402
|
+
cacheWrite5m: m.cost?.cache_write_5m ?? m.cost?.cache_write,
|
|
403
|
+
cacheWrite1h: m.cost?.cache_write_1h ?? (m.cost?.input !== void 0 ? m.cost.input * 2 : void 0)
|
|
391
404
|
};
|
|
392
405
|
}
|
|
393
406
|
function round4(n) {
|
|
@@ -513,6 +526,19 @@ var miniMaxVisionServer = () => ({
|
|
|
513
526
|
allowedTools: ["understand_image"],
|
|
514
527
|
permission: "auto"
|
|
515
528
|
});
|
|
529
|
+
var sshManagerServer = () => ({
|
|
530
|
+
name: "ssh",
|
|
531
|
+
description: "Remote SSH management \u2014 execute commands, transfer files, tunnels, health checks (mcp-ssh-manager)",
|
|
532
|
+
transport: "stdio",
|
|
533
|
+
command: "npx",
|
|
534
|
+
args: ["-y", "mcp-ssh-manager"],
|
|
535
|
+
env: {
|
|
536
|
+
MCP_SSH_COMPACT_JSON: "true",
|
|
537
|
+
MCP_SSH_DEFAULT_TIMEOUT: "120000"
|
|
538
|
+
},
|
|
539
|
+
permission: "confirm",
|
|
540
|
+
requestTimeoutMs: 18e4
|
|
541
|
+
});
|
|
516
542
|
var allServers = () => ({
|
|
517
543
|
filesystem: { ...filesystemServer(), enabled: false },
|
|
518
544
|
github: { ...githubServer(), enabled: false },
|
|
@@ -526,7 +552,8 @@ var allServers = () => ({
|
|
|
526
552
|
sentinel: { ...sentinelServer(), enabled: false },
|
|
527
553
|
"zai-vision": { ...zaiVisionServer(), enabled: false },
|
|
528
554
|
"minimax-vision": { ...miniMaxVisionServer(), enabled: false },
|
|
529
|
-
playwright: { ...playwrightServer(), enabled: false }
|
|
555
|
+
playwright: { ...playwrightServer(), enabled: false },
|
|
556
|
+
ssh: { ...sshManagerServer(), enabled: false }
|
|
530
557
|
});
|
|
531
558
|
|
|
532
559
|
// src/utils/expect-defined.ts
|
|
@@ -601,7 +628,7 @@ function hasToolResult(msg) {
|
|
|
601
628
|
}
|
|
602
629
|
function toolUseIds(msg) {
|
|
603
630
|
const ids = /* @__PURE__ */ new Set();
|
|
604
|
-
if (
|
|
631
|
+
if (msg?.role !== "assistant") return ids;
|
|
605
632
|
for (const block of contentBlocks(msg)) {
|
|
606
633
|
if (block.type === "tool_use") ids.add(block.id);
|
|
607
634
|
}
|
|
@@ -609,7 +636,7 @@ function toolUseIds(msg) {
|
|
|
609
636
|
}
|
|
610
637
|
function toolResultIds(msg) {
|
|
611
638
|
const ids = /* @__PURE__ */ new Set();
|
|
612
|
-
if (
|
|
639
|
+
if (msg?.role !== "user") return ids;
|
|
613
640
|
for (const block of contentBlocks(msg)) {
|
|
614
641
|
if (block.type === "tool_result") ids.add(block.tool_use_id);
|
|
615
642
|
}
|
|
@@ -714,7 +741,7 @@ function calState(key) {
|
|
|
714
741
|
return state;
|
|
715
742
|
}
|
|
716
743
|
var ESTIMATE_CACHE = /* @__PURE__ */ new Map();
|
|
717
|
-
var ESTIMATE_CACHE_MAX_SIZE =
|
|
744
|
+
var ESTIMATE_CACHE_MAX_SIZE = 5e4;
|
|
718
745
|
function getCachedEstimate(key, compute) {
|
|
719
746
|
const existing = ESTIMATE_CACHE.get(key);
|
|
720
747
|
if (existing !== void 0) return existing;
|
|
@@ -1080,6 +1107,6 @@ function createContextManagerTool(opts = {}) {
|
|
|
1080
1107
|
}
|
|
1081
1108
|
var contextManagerTool = createContextManagerTool();
|
|
1082
1109
|
|
|
1083
|
-
export { DefaultLogger, DefaultPathResolver, DefaultTokenCounter, allServers, awsServer, blockServer, braveSearchServer, context7Server, contextManagerTool, createContextManagerTool, everArtServer, filesystemServer, githubServer, googleMapsServer, miniMaxVisionServer, playwrightServer, sentinelServer, slackServer, zaiVisionServer };
|
|
1110
|
+
export { DefaultLogger, DefaultPathResolver, DefaultTokenCounter, allServers, awsServer, blockServer, braveSearchServer, context7Server, contextManagerTool, createContextManagerTool, everArtServer, filesystemServer, githubServer, googleMapsServer, miniMaxVisionServer, playwrightServer, sentinelServer, slackServer, sshManagerServer, zaiVisionServer };
|
|
1084
1111
|
//# sourceMappingURL=index.js.map
|
|
1085
1112
|
//# sourceMappingURL=index.js.map
|