@wrongstack/core 0.267.0 → 0.268.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-UhojbpWx.d.ts} +1 -1
- package/dist/{agent-subagent-runner-CzPGP3jA.d.ts → agent-subagent-runner-Bvtf1o9K.d.ts} +7 -7
- package/dist/{brain-Cdg77tVN.d.ts → brain-69wzMKp1.d.ts} +1 -1
- package/dist/{compactor-iMZ84CXq.d.ts → compactor-CBQAJoDc.d.ts} +1 -1
- package/dist/{config-Du3pYYln.d.ts → config-VKfOZ-6X.d.ts} +70 -2
- package/dist/{context-dT5Ueund.d.ts → context-C0U8B9NF.d.ts} +24 -1
- package/dist/coordination/index.d.ts +56 -160
- package/dist/coordination/index.js +333 -63
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -25
- package/dist/defaults/index.js +94 -68
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +72 -16
- package/dist/execution/index.js +151 -36
- 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-KByEFFBa.d.ts +663 -0
- package/dist/{goal-preamble-SulMTowG.d.ts → goal-preamble-CrYjmdw4.d.ts} +9 -9
- package/dist/{goal-store-CABDwdFE.d.ts → goal-store-Y_zdLZ3q.d.ts} +1 -1
- package/dist/hq/index.d.ts +195 -0
- package/dist/hq/index.js +1884 -0
- package/dist/hq/index.js.map +1 -0
- package/dist/{index-IEuxQd-E.d.ts → index-BfaS-f_m.d.ts} +2 -2
- package/dist/{index-DtCVWel4.d.ts → index-CtQnmkaS.d.ts} +8 -8
- package/dist/{index-Bms0m4oy.d.ts → index-gCv830d7.d.ts} +5 -5
- package/dist/index.d.ts +46 -42
- package/dist/index.js +2955 -1498
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +45 -18
- 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-HT3Fi7Bl.d.ts} +10 -4
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +3 -2
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-BqGZNJQ-.d.ts → models-registry-Bvcl3Vaa.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-B8R43uPz.d.ts → multi-agent-coordinator-BACjsmkC.d.ts} +1 -1
- package/dist/{null-fleet-bus-CnXa5oTH.d.ts → null-fleet-bus-DA7fvhUg.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-DdNnw9BQ.d.ts → parallel-eternal-engine-Ci71gYu_.d.ts} +9 -15
- package/dist/{path-resolver-COIMLCQL.d.ts → path-resolver-O1IJnmKE.d.ts} +4 -3
- package/dist/{permission-B75JAi3-.d.ts → permission-Bd-57Lbl.d.ts} +1 -1
- package/dist/{permission-policy-DlR9eJAM.d.ts → permission-policy-uNXC6Kge.d.ts} +2 -3
- package/dist/pipeline-BDNvENyV.d.ts +245 -0
- package/dist/{plan-templates-DSIKCXZN.d.ts → plan-templates-EMsalEtN.d.ts} +5 -5
- package/dist/{provider-model-resolve-BNRsNuJx.d.ts → provider-model-resolve-CEb9x886.d.ts} +3 -3
- package/dist/{provider-runner-CX7iIvox.d.ts → provider-runner-DWJbpo70.d.ts} +3 -3
- package/dist/{retry-policy-BilV1ujH.d.ts → retry-policy-C3s_lvdK.d.ts} +1 -1
- package/dist/sdd/index.d.ts +9 -8
- package/dist/sdd/index.js +32 -2
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-gkvEZZfE.d.ts → secret-vault-Cgduf5xL.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-47LBnBVk.d.ts} +1 -1
- package/dist/{session-event-bridge-D-araDEz.d.ts → session-event-bridge-Cw7oqmW2.d.ts} +1 -1
- package/dist/{session-reader-D7Dapswh.d.ts → session-reader-DD4v2Obw.d.ts} +1 -1
- package/dist/storage/index.d.ts +14 -12
- package/dist/storage/index.js +63 -36
- 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 +20 -19
- package/dist/types/index.js +68 -51
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +22 -3
- package/dist/utils/index.js +139 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -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-O1IJnmKE.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-HT3Fi7Bl.js';
|
|
4
4
|
import '../logger-B63L5bTg.js';
|
|
5
|
-
import '../brain-
|
|
6
|
-
import '../context-
|
|
7
|
-
import '../config-
|
|
5
|
+
import '../brain-69wzMKp1.js';
|
|
6
|
+
import '../context-C0U8B9NF.js';
|
|
7
|
+
import '../config-VKfOZ-6X.js';
|
|
8
8
|
import '../path-resolver-CPRj4bFY.js';
|
|
9
|
-
import '../compactor-
|
|
9
|
+
import '../compactor-CBQAJoDc.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
|
|
@@ -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
|