nexus-agents 2.134.0 → 2.136.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/{child-mcp-config-TWHH63UK.js → child-mcp-config-TM6OCARU.js} +4 -3
- package/dist/{child-mcp-config-TWHH63UK.js.map → child-mcp-config-TM6OCARU.js.map} +1 -1
- package/dist/{chunk-E64SZTEP.js → chunk-257QMFTM.js} +3 -3
- package/dist/{chunk-PQHVC4BD.js → chunk-2XRPKJKX.js} +23 -12
- package/dist/chunk-2XRPKJKX.js.map +1 -0
- package/dist/{chunk-FUJ3XR7T.js → chunk-3AAJWZCR.js} +4 -4
- package/dist/{chunk-Z6DXZ6AS.js → chunk-3JSDOBOA.js} +2 -2
- package/dist/{chunk-FPMQ2JAK.js → chunk-3QH2KWLH.js} +2 -2
- package/dist/{chunk-7TQZR5VU.js → chunk-3WBEEYCS.js} +116 -22
- package/dist/chunk-3WBEEYCS.js.map +1 -0
- package/dist/{chunk-UDB5NHJI.js → chunk-4GVPON4W.js} +3 -3
- package/dist/{chunk-QZUT22LP.js → chunk-5546JU53.js} +8 -8
- package/dist/chunk-5SXGPX34.js +44 -0
- package/dist/chunk-5SXGPX34.js.map +1 -0
- package/dist/{chunk-7GSYICTL.js → chunk-66TXNH4S.js} +14 -12
- package/dist/{chunk-7GSYICTL.js.map → chunk-66TXNH4S.js.map} +1 -1
- package/dist/{chunk-76R5ES6Z.js → chunk-6JOXXQK2.js} +191 -132
- package/dist/chunk-6JOXXQK2.js.map +1 -0
- package/dist/{chunk-ZMDOGN33.js → chunk-7E5UXA4U.js} +2 -2
- package/dist/{chunk-F74ZGHAP.js → chunk-7G63H7ZT.js} +2 -2
- package/dist/{chunk-FVSZLVMR.js → chunk-CQDGPGTL.js} +3 -3
- package/dist/{chunk-33MFMXBQ.js → chunk-ESP6U3LW.js} +13 -81
- package/dist/chunk-ESP6U3LW.js.map +1 -0
- package/dist/{chunk-MY52DFXC.js → chunk-FHFEC2XM.js} +2 -2
- package/dist/{chunk-ORQAFTAZ.js → chunk-FIQSOSQU.js} +2 -2
- package/dist/{chunk-EHLJLIHS.js → chunk-FSUZIIOJ.js} +2 -2
- package/dist/{chunk-3EYXPV5F.js → chunk-GWOXPCIF.js} +13 -13
- package/dist/{chunk-WYJJUF6N.js → chunk-HMZT2SJK.js} +4 -4
- package/dist/{chunk-OCKZ6F5O.js → chunk-JK4L2TQ6.js} +3 -3
- package/dist/{chunk-6UCWR3DS.js → chunk-JVZ7FGWR.js} +3 -3
- package/dist/{chunk-PFBV5FCT.js → chunk-KOVTOPEQ.js} +2 -2
- package/dist/{chunk-GZ4NF4ZW.js → chunk-L4QFWOOQ.js} +63 -92
- package/dist/chunk-L4QFWOOQ.js.map +1 -0
- package/dist/{chunk-6LMZ7HFU.js → chunk-LCSGGLZZ.js} +2 -2
- package/dist/{chunk-IWQH6TP7.js → chunk-MTE7THMR.js} +6 -6
- package/dist/{chunk-DLUFDKPA.js → chunk-N67LHY47.js} +89 -32
- package/dist/chunk-N67LHY47.js.map +1 -0
- package/dist/{chunk-DBDWMHUL.js → chunk-OCJEYHUQ.js} +18 -10
- package/dist/chunk-OCJEYHUQ.js.map +1 -0
- package/dist/chunk-UGAKYSDO.js +92 -0
- package/dist/chunk-UGAKYSDO.js.map +1 -0
- package/dist/{chunk-VI7LELES.js → chunk-UH3F4RZB.js} +7 -7
- package/dist/{chunk-COJOUIO2.js → chunk-VN3CKPEF.js} +3 -3
- package/dist/{chunk-FSFF7EFR.js → chunk-VVBKPRLI.js} +2 -2
- package/dist/{chunk-OU2NQVKD.js → chunk-VY4FZNZA.js} +2 -2
- package/dist/{chunk-BTYYZ6VU.js → chunk-WOE5J5M6.js} +4 -4
- package/dist/{chunk-B26FGLIJ.js → chunk-ZHCEOIEQ.js} +2 -2
- package/dist/{chunk-WFKVUZ3O.js → chunk-ZII5MDUO.js} +2 -2
- package/dist/{chunk-CLRSNWRQ.js → chunk-ZLENFXL5.js} +4 -4
- package/dist/cli-circuit-breaker-HFFMCA43.js +14 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +68 -66
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-E6FXXMMR.js → composite-router-PS42433A.js} +4 -3
- package/dist/consensus-vote-K2SHY4TC.js +39 -0
- package/dist/{consensus-vote-types-CYBHW8vY.d.ts → consensus-vote-types-Dx4pf3YW.d.ts} +16 -0
- package/dist/{context-retriever-I4NEOUEV.js → context-retriever-NIFXFYPQ.js} +12 -10
- package/dist/{dist-C4457XNQ.js → dist-KGTVHDVC.js} +4 -2
- package/dist/doctor-deep-VQQNT7VN.js +13 -0
- package/dist/{expert-bridge-GMB5IHHF.js → expert-bridge-NY6FAFQH.js} +6 -5
- package/dist/factory-6A26HIWS.js +15 -0
- package/dist/factory-GGSACEWN.js +22 -0
- package/dist/{improvement-review-77BKIQGN.js → improvement-review-JDSRWFHM.js} +8 -5
- package/dist/index.d.ts +27 -20
- package/dist/index.js +64 -62
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-4H2VPN23.js → init-opencode-C7U6ZQK3.js} +8 -7
- package/dist/{init-opencode-4H2VPN23.js.map → init-opencode-C7U6ZQK3.js.map} +1 -1
- package/dist/issue-triage-7RN74LBU.js +17 -0
- package/dist/{learning-persistence-2KO4CXNL.js → learning-persistence-EHTHKWR5.js} +3 -2
- package/dist/{pr-reviewer-helpers-F3SHCHNV.js → pr-reviewer-helpers-D47TVXFX.js} +6 -5
- package/dist/{registry-command-VFCSMHME.js → registry-command-PVC47NSQ.js} +4 -3
- package/dist/{registry-command-VFCSMHME.js.map → registry-command-PVC47NSQ.js.map} +1 -1
- package/dist/{repo-security-plan-U2ZIFW53.js → repo-security-plan-76IXMJNC.js} +5 -4
- package/dist/research-helpers-synthesize-WH4IC36H.js +15 -0
- package/dist/{routing-memory-VVLJL3MG.js → routing-memory-RAYIYIUP.js} +4 -3
- package/dist/{session-memory-GMQYZLJE.js → session-memory-WZCS7WDH.js} +5 -4
- package/dist/{setup-command-IMAX6EAO.js → setup-command-O62DVQ2U.js} +13 -12
- package/dist/setup-config-KEBEUMC3.js +11 -0
- package/dist/{setup-custom-api-NJGCRIRO.js → setup-custom-api-2PQP6UOT.js} +5 -4
- package/dist/{setup-custom-api-NJGCRIRO.js.map → setup-custom-api-2PQP6UOT.js.map} +1 -1
- package/dist/tool-memory-RAQWOUXV.js +22 -0
- package/dist/tool-memory-registry-adapters-Y4EGADHN.js +12 -0
- package/dist/unified-registry-L5PGLSEI.js +25 -0
- package/dist/{weather-report-OU65NJS3.js → weather-report-TEBEALS7.js} +4 -3
- package/dist/weather-report-TEBEALS7.js.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-33MFMXBQ.js.map +0 -1
- package/dist/chunk-76R5ES6Z.js.map +0 -1
- package/dist/chunk-7TQZR5VU.js.map +0 -1
- package/dist/chunk-DBDWMHUL.js.map +0 -1
- package/dist/chunk-DLUFDKPA.js.map +0 -1
- package/dist/chunk-GZ4NF4ZW.js.map +0 -1
- package/dist/chunk-PQHVC4BD.js.map +0 -1
- package/dist/cli-circuit-breaker-VXBDCAD7.js +0 -13
- package/dist/consensus-vote-R6X5IL57.js +0 -37
- package/dist/doctor-deep-CZXN4YD6.js +0 -12
- package/dist/factory-WR62MEIJ.js +0 -14
- package/dist/factory-ZBQGA373.js +0 -21
- package/dist/issue-triage-NJB6SL4S.js +0 -16
- package/dist/research-helpers-synthesize-5TLNHT3I.js +0 -14
- package/dist/setup-config-2ZSJ3HNE.js +0 -10
- package/dist/tool-memory-TSYJXGOV.js +0 -20
- package/dist/unified-registry-IMAL3SY6.js +0 -24
- /package/dist/{chunk-E64SZTEP.js.map → chunk-257QMFTM.js.map} +0 -0
- /package/dist/{chunk-FUJ3XR7T.js.map → chunk-3AAJWZCR.js.map} +0 -0
- /package/dist/{chunk-Z6DXZ6AS.js.map → chunk-3JSDOBOA.js.map} +0 -0
- /package/dist/{chunk-FPMQ2JAK.js.map → chunk-3QH2KWLH.js.map} +0 -0
- /package/dist/{chunk-UDB5NHJI.js.map → chunk-4GVPON4W.js.map} +0 -0
- /package/dist/{chunk-QZUT22LP.js.map → chunk-5546JU53.js.map} +0 -0
- /package/dist/{chunk-ZMDOGN33.js.map → chunk-7E5UXA4U.js.map} +0 -0
- /package/dist/{chunk-F74ZGHAP.js.map → chunk-7G63H7ZT.js.map} +0 -0
- /package/dist/{chunk-FVSZLVMR.js.map → chunk-CQDGPGTL.js.map} +0 -0
- /package/dist/{chunk-MY52DFXC.js.map → chunk-FHFEC2XM.js.map} +0 -0
- /package/dist/{chunk-ORQAFTAZ.js.map → chunk-FIQSOSQU.js.map} +0 -0
- /package/dist/{chunk-EHLJLIHS.js.map → chunk-FSUZIIOJ.js.map} +0 -0
- /package/dist/{chunk-3EYXPV5F.js.map → chunk-GWOXPCIF.js.map} +0 -0
- /package/dist/{chunk-WYJJUF6N.js.map → chunk-HMZT2SJK.js.map} +0 -0
- /package/dist/{chunk-OCKZ6F5O.js.map → chunk-JK4L2TQ6.js.map} +0 -0
- /package/dist/{chunk-6UCWR3DS.js.map → chunk-JVZ7FGWR.js.map} +0 -0
- /package/dist/{chunk-PFBV5FCT.js.map → chunk-KOVTOPEQ.js.map} +0 -0
- /package/dist/{chunk-6LMZ7HFU.js.map → chunk-LCSGGLZZ.js.map} +0 -0
- /package/dist/{chunk-IWQH6TP7.js.map → chunk-MTE7THMR.js.map} +0 -0
- /package/dist/{chunk-VI7LELES.js.map → chunk-UH3F4RZB.js.map} +0 -0
- /package/dist/{chunk-COJOUIO2.js.map → chunk-VN3CKPEF.js.map} +0 -0
- /package/dist/{chunk-FSFF7EFR.js.map → chunk-VVBKPRLI.js.map} +0 -0
- /package/dist/{chunk-OU2NQVKD.js.map → chunk-VY4FZNZA.js.map} +0 -0
- /package/dist/{chunk-BTYYZ6VU.js.map → chunk-WOE5J5M6.js.map} +0 -0
- /package/dist/{chunk-B26FGLIJ.js.map → chunk-ZHCEOIEQ.js.map} +0 -0
- /package/dist/{chunk-WFKVUZ3O.js.map → chunk-ZII5MDUO.js.map} +0 -0
- /package/dist/{chunk-CLRSNWRQ.js.map → chunk-ZLENFXL5.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-VXBDCAD7.js.map → cli-circuit-breaker-HFFMCA43.js.map} +0 -0
- /package/dist/{composite-router-E6FXXMMR.js.map → composite-router-PS42433A.js.map} +0 -0
- /package/dist/{consensus-vote-R6X5IL57.js.map → consensus-vote-K2SHY4TC.js.map} +0 -0
- /package/dist/{context-retriever-I4NEOUEV.js.map → context-retriever-NIFXFYPQ.js.map} +0 -0
- /package/dist/{dist-C4457XNQ.js.map → dist-KGTVHDVC.js.map} +0 -0
- /package/dist/{doctor-deep-CZXN4YD6.js.map → doctor-deep-VQQNT7VN.js.map} +0 -0
- /package/dist/{expert-bridge-GMB5IHHF.js.map → expert-bridge-NY6FAFQH.js.map} +0 -0
- /package/dist/{factory-WR62MEIJ.js.map → factory-6A26HIWS.js.map} +0 -0
- /package/dist/{factory-ZBQGA373.js.map → factory-GGSACEWN.js.map} +0 -0
- /package/dist/{improvement-review-77BKIQGN.js.map → improvement-review-JDSRWFHM.js.map} +0 -0
- /package/dist/{issue-triage-NJB6SL4S.js.map → issue-triage-7RN74LBU.js.map} +0 -0
- /package/dist/{learning-persistence-2KO4CXNL.js.map → learning-persistence-EHTHKWR5.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-F3SHCHNV.js.map → pr-reviewer-helpers-D47TVXFX.js.map} +0 -0
- /package/dist/{repo-security-plan-U2ZIFW53.js.map → repo-security-plan-76IXMJNC.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-5TLNHT3I.js.map → research-helpers-synthesize-WH4IC36H.js.map} +0 -0
- /package/dist/{routing-memory-VVLJL3MG.js.map → routing-memory-RAYIYIUP.js.map} +0 -0
- /package/dist/{session-memory-GMQYZLJE.js.map → session-memory-WZCS7WDH.js.map} +0 -0
- /package/dist/{setup-command-IMAX6EAO.js.map → setup-command-O62DVQ2U.js.map} +0 -0
- /package/dist/{setup-config-2ZSJ3HNE.js.map → setup-config-KEBEUMC3.js.map} +0 -0
- /package/dist/{tool-memory-TSYJXGOV.js.map → tool-memory-RAQWOUXV.js.map} +0 -0
- /package/dist/{unified-registry-IMAL3SY6.js.map → tool-memory-registry-adapters-Y4EGADHN.js.map} +0 -0
- /package/dist/{weather-report-OU65NJS3.js.map → unified-registry-L5PGLSEI.js.map} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MemoryRegistry,
|
|
3
|
+
hasMemoryRegistry,
|
|
4
|
+
setMemoryRegistry
|
|
5
|
+
} from "./chunk-2XRPKJKX.js";
|
|
6
|
+
import {
|
|
7
|
+
nexusDataPath
|
|
8
|
+
} from "./chunk-L4QFWOOQ.js";
|
|
9
|
+
|
|
10
|
+
// src/mcp/tools/tool-memory-registry-adapters.ts
|
|
11
|
+
var DEFAULT_SEARCH_LIMIT = 10;
|
|
12
|
+
function extractSearchText(filter) {
|
|
13
|
+
const where = filter?.where;
|
|
14
|
+
if (where === null || where === void 0 || typeof where !== "object") return null;
|
|
15
|
+
if (!("text" in where)) return null;
|
|
16
|
+
const candidate = where.text;
|
|
17
|
+
return typeof candidate === "string" && candidate !== "" ? candidate : null;
|
|
18
|
+
}
|
|
19
|
+
var StatsOnlyAdapter = class {
|
|
20
|
+
domain;
|
|
21
|
+
backend;
|
|
22
|
+
constructor(domain, backend) {
|
|
23
|
+
this.domain = domain;
|
|
24
|
+
this.backend = backend;
|
|
25
|
+
}
|
|
26
|
+
read(_key) {
|
|
27
|
+
return Promise.resolve(void 0);
|
|
28
|
+
}
|
|
29
|
+
write(_key, _value, _meta) {
|
|
30
|
+
return Promise.reject(
|
|
31
|
+
new Error(
|
|
32
|
+
`nexus-memory: domain "${this.domain}" is attached as stats-only; write through the underlying backend instead`
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Phase 1 of #2792: real query fan-out via the backend's native search.
|
|
38
|
+
* Honors the free-text convention `filter.where.text`. Without a search
|
|
39
|
+
* callback on the underlying backend (or without a text term), returns
|
|
40
|
+
* `[]` — consumers that need full coverage must wire `search()` on every
|
|
41
|
+
* backend they attach. Search exceptions are swallowed; the registry's
|
|
42
|
+
* `memory_stats` consumer relies on `query()` never throwing.
|
|
43
|
+
*/
|
|
44
|
+
async query(filter) {
|
|
45
|
+
if (this.backend.search === void 0) return [];
|
|
46
|
+
const text = extractSearchText(filter);
|
|
47
|
+
if (text === null) return [];
|
|
48
|
+
const limit = filter?.limit ?? DEFAULT_SEARCH_LIMIT;
|
|
49
|
+
try {
|
|
50
|
+
return await this.backend.search(text, limit);
|
|
51
|
+
} catch {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
delete(_key) {
|
|
56
|
+
return Promise.resolve(false);
|
|
57
|
+
}
|
|
58
|
+
async stats() {
|
|
59
|
+
const rawCount = await Promise.resolve(this.backend.count());
|
|
60
|
+
const count = extractCount(rawCount);
|
|
61
|
+
return {
|
|
62
|
+
domain: this.domain,
|
|
63
|
+
count,
|
|
64
|
+
oldestTimestamp: null,
|
|
65
|
+
newestTimestamp: null
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
async close() {
|
|
69
|
+
if (this.backend.close !== void 0) {
|
|
70
|
+
await Promise.resolve(this.backend.close());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
function extractCount(value) {
|
|
75
|
+
if (typeof value === "number") return value;
|
|
76
|
+
if (value !== null && typeof value === "object") {
|
|
77
|
+
const v = value;
|
|
78
|
+
if (v.ok === true && typeof v.value === "number") return v.value;
|
|
79
|
+
}
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
function ensureSharedMemoryRegistry() {
|
|
83
|
+
if (hasMemoryRegistry()) return;
|
|
84
|
+
const dbPath = nexusDataPath("memory", "memory.db");
|
|
85
|
+
setMemoryRegistry(new MemoryRegistry({ dbPath }));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
StatsOnlyAdapter,
|
|
90
|
+
ensureSharedMemoryRegistry
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=chunk-UGAKYSDO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mcp/tools/tool-memory-registry-adapters.ts"],"sourcesContent":["/**\n * Phase 5 of #2766 — thin {@link IMemoryBackend} adapters for tool-memory\n * backends so each one becomes discoverable through `getMemoryRegistry()`.\n *\n * Scope is intentionally narrow: each adapter exposes the underlying\n * backend's row count via `stats()` so `memory_stats` can read all four\n * domains from the unified registry. `read`/`write`/`query`/`delete` are\n * left as escape hatches — callers wanting CRUD continue to use the\n * underlying backend directly (HybridMemoryBackend, AgenticMemoryBackend,\n * etc.). Fully folding the storage into nexus-memory's SqliteBackend is\n * a follow-up Phase 5.1.\n *\n * @module mcp/tools/tool-memory-registry-adapters\n */\n\nimport { MemoryRegistry, hasMemoryRegistry, setMemoryRegistry } from 'nexus-memory';\nimport type { BackendStats, CliName, IMemoryBackend, QueryFilter, WriteMeta } from 'nexus-memory';\n\nimport { nexusDataPath } from '../../config/nexus-data-dir.js';\n\n/** Default cap when a consumer omits `limit` in `query()`. */\nconst DEFAULT_SEARCH_LIMIT = 10;\n\n/**\n * Pull the free-text search term out of a {@link QueryFilter}. Returns\n * `null` when the filter doesn't carry one, so callers can skip the search\n * dispatch entirely. The convention is `filter.where.text` — see\n * docs/architecture/memory-context-retrieval.md (Phase 1 of #2792).\n */\nfunction extractSearchText(filter?: QueryFilter<unknown>): string | null {\n const where: unknown = filter?.where;\n if (where === null || where === undefined || typeof where !== 'object') return null;\n if (!('text' in where)) return null;\n const candidate = where.text;\n return typeof candidate === 'string' && candidate !== '' ? candidate : null;\n}\n\n/** Minimal \"count + close\" shape every tool-memory backend implements. */\nexport interface CountableBackend {\n /** Returns total row count (the heart of `memory_stats`). */\n count(): unknown;\n /** Idempotent close. */\n close?(): Promise<void> | void;\n /**\n * Optional native search surface used by {@link StatsOnlyAdapter.query}\n * (Phase 1 of #2792). When attached from `tool-memory.ts`, each backend\n * wires this to its idiomatic search call — `recallBySubject` for\n * beliefs, `searchAgentic` for A-MEM, `retrieveByPriority` for adaptive,\n * etc. Returns a flat array; the adapter is responsible for unwrapping\n * Result types and projecting to a useful shape (typically the raw\n * entry object, since consumers will project further).\n */\n search?(query: string, limit: number): Promise<readonly unknown[]>;\n}\n\n/**\n * Adapter that surfaces `count()` from an arbitrary tool-memory backend\n * as an `IMemoryBackend`. Methods other than `stats()` and `close()`\n * delegate to no-ops or rejections — call sites doing actual CRUD must\n * keep using the underlying backend directly until a deeper migration\n * folds the storage in.\n */\nexport class StatsOnlyAdapter implements IMemoryBackend<string, unknown> {\n readonly domain: string;\n private readonly backend: CountableBackend;\n\n constructor(domain: string, backend: CountableBackend) {\n this.domain = domain;\n this.backend = backend;\n }\n\n read(_key: string): Promise<unknown> {\n // Reads through the unified registry aren't wired yet. Callers wanting\n // actual data should fetch via the underlying backend.\n return Promise.resolve(undefined);\n }\n\n write(_key: string, _value: unknown, _meta?: WriteMeta): Promise<void> {\n return Promise.reject(\n new Error(\n `nexus-memory: domain \"${this.domain}\" is attached as stats-only; ` +\n `write through the underlying backend instead`\n )\n );\n }\n\n /**\n * Phase 1 of #2792: real query fan-out via the backend's native search.\n * Honors the free-text convention `filter.where.text`. Without a search\n * callback on the underlying backend (or without a text term), returns\n * `[]` — consumers that need full coverage must wire `search()` on every\n * backend they attach. Search exceptions are swallowed; the registry's\n * `memory_stats` consumer relies on `query()` never throwing.\n */\n async query(filter?: QueryFilter<unknown>): Promise<readonly unknown[]> {\n if (this.backend.search === undefined) return [];\n const text = extractSearchText(filter);\n if (text === null) return [];\n const limit = filter?.limit ?? DEFAULT_SEARCH_LIMIT;\n try {\n return await this.backend.search(text, limit);\n } catch {\n return [];\n }\n }\n\n delete(_key: string): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n async stats(): Promise<BackendStats> {\n const rawCount = await Promise.resolve(this.backend.count());\n const count = extractCount(rawCount);\n return {\n domain: this.domain,\n count,\n oldestTimestamp: null,\n newestTimestamp: null,\n };\n }\n\n async close(): Promise<void> {\n if (this.backend.close !== undefined) {\n await Promise.resolve(this.backend.close());\n }\n }\n}\n\n/**\n * Normalize different backend `count()` return shapes:\n * - `number` (e.g., `MobiMem.profile.getEntryCount()`)\n * - `Result<number, MemoryError>` (HybridMemoryBackend)\n * - `Promise<number | Result<number, MemoryError>>` (after await)\n * Anything unrecognized falls back to 0 — the adapter must never throw on\n * a stats read because that would break `memory_stats` for the whole pipeline.\n */\nfunction extractCount(value: unknown): number {\n if (typeof value === 'number') return value;\n if (value !== null && typeof value === 'object') {\n const v = value as { ok?: boolean; value?: unknown };\n if (v.ok === true && typeof v.value === 'number') return v.value;\n }\n return 0;\n}\n\n/** Convenience tag the adapter passes to `WriteMeta.cli` for future writes. */\nexport type AdapterCli = CliName;\n\n// ============================================================================\n// Shared MemoryRegistry path injection (#3995)\n// ============================================================================\n\n/**\n * Ensure the process-wide shared {@link MemoryRegistry} is constructed with\n * the canonical nexus-agents data path (#3995).\n *\n * nexus-memory ships a dep-free `resolveDefaultDbPath()` fallback that\n * re-implements `~/.nexus-agents/memory/memory.db` inline so the package stays\n * free of inter-package imports (it is reused by `nexus-eval-*`). In\n * production nexus-agents we want the canonical {@link nexusDataPath} resolver\n * instead — it adds sandbox detection, the per-repo/cross-repo split, the\n * homedir-unwritable fallback, and `.gitignore` auto-wiring that the dep-free\n * fallback cannot know about. We keep nexus-memory dep-free by doing the\n * resolution HERE (on the nexus-agents side) and injecting the resolved path\n * as a plain string via `setMemoryRegistry`.\n *\n * No-op when a registry is already present (`hasMemoryRegistry()`): that means\n * either a test injected an in-memory registry, or a prior call already wired\n * the canonical path. Checking presence — rather than calling\n * `getMemoryRegistry()` — is what lets us win the race against nexus-memory's\n * lazy default-path initialization without ever triggering it. Call this\n * before the first `getMemoryRegistry()` in any production path that attaches\n * a backend.\n */\nexport function ensureSharedMemoryRegistry(): void {\n if (hasMemoryRegistry()) return;\n // `memory` is intentionally cross-repo (not in PER_REPO_SUBDIRS), so this\n // resolves to `~/.nexus-agents/memory/memory.db` on a normal machine and to\n // the sandbox / per-repo-fallback root under those modes.\n const dbPath = nexusDataPath('memory', 'memory.db');\n setMemoryRegistry(new MemoryRegistry({ dbPath }));\n}\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,uBAAuB;AAQ7B,SAAS,kBAAkB,QAA8C;AACvE,QAAM,QAAiB,QAAQ;AAC/B,MAAI,UAAU,QAAQ,UAAU,UAAa,OAAO,UAAU,SAAU,QAAO;AAC/E,MAAI,EAAE,UAAU,OAAQ,QAAO;AAC/B,QAAM,YAAY,MAAM;AACxB,SAAO,OAAO,cAAc,YAAY,cAAc,KAAK,YAAY;AACzE;AA2BO,IAAM,mBAAN,MAAkE;AAAA,EAC9D;AAAA,EACQ;AAAA,EAEjB,YAAY,QAAgB,SAA2B;AACrD,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AAAA,EAEA,KAAK,MAAgC;AAGnC,WAAO,QAAQ,QAAQ,MAAS;AAAA,EAClC;AAAA,EAEA,MAAM,MAAc,QAAiB,OAAkC;AACrE,WAAO,QAAQ;AAAA,MACb,IAAI;AAAA,QACF,yBAAyB,KAAK,MAAM;AAAA,MAEtC;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,MAAM,QAA4D;AACtE,QAAI,KAAK,QAAQ,WAAW,OAAW,QAAO,CAAC;AAC/C,UAAM,OAAO,kBAAkB,MAAM;AACrC,QAAI,SAAS,KAAM,QAAO,CAAC;AAC3B,UAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAI;AACF,aAAO,MAAM,KAAK,QAAQ,OAAO,MAAM,KAAK;AAAA,IAC9C,QAAQ;AACN,aAAO,CAAC;AAAA,IACV;AAAA,EACF;AAAA,EAEA,OAAO,MAAgC;AACrC,WAAO,QAAQ,QAAQ,KAAK;AAAA,EAC9B;AAAA,EAEA,MAAM,QAA+B;AACnC,UAAM,WAAW,MAAM,QAAQ,QAAQ,KAAK,QAAQ,MAAM,CAAC;AAC3D,UAAM,QAAQ,aAAa,QAAQ;AACnC,WAAO;AAAA,MACL,QAAQ,KAAK;AAAA,MACb;AAAA,MACA,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,MAAM,QAAuB;AAC3B,QAAI,KAAK,QAAQ,UAAU,QAAW;AACpC,YAAM,QAAQ,QAAQ,KAAK,QAAQ,MAAM,CAAC;AAAA,IAC5C;AAAA,EACF;AACF;AAUA,SAAS,aAAa,OAAwB;AAC5C,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;AAC/C,UAAM,IAAI;AACV,QAAI,EAAE,OAAO,QAAQ,OAAO,EAAE,UAAU,SAAU,QAAO,EAAE;AAAA,EAC7D;AACA,SAAO;AACT;AA+BO,SAAS,6BAAmC;AACjD,MAAI,kBAAkB,EAAG;AAIzB,QAAM,SAAS,cAAc,UAAU,WAAW;AAClD,oBAAkB,IAAI,eAAe,EAAE,OAAO,CAAC,CAAC;AAClD;","names":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveCliSlot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KOVTOPEQ.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
getTimeProvider,
|
|
7
7
|
isRateLimitText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
9
9
|
|
|
10
10
|
// src/pipeline/expert-bridge.ts
|
|
11
11
|
function resolveCliFromModelString(model) {
|
|
@@ -21,7 +21,7 @@ async function getMcpConfigPath() {
|
|
|
21
21
|
if (cachedMcpConfigPath !== null) return cachedMcpConfigPath;
|
|
22
22
|
mcpConfigInitPromise ??= (async () => {
|
|
23
23
|
try {
|
|
24
|
-
const { generateMcpConfig } = await import("./child-mcp-config-
|
|
24
|
+
const { generateMcpConfig } = await import("./child-mcp-config-TM6OCARU.js");
|
|
25
25
|
const config = await generateMcpConfig();
|
|
26
26
|
cachedMcpConfigPath = config.configPath;
|
|
27
27
|
cachedMcpConfigCleanup = config.cleanup;
|
|
@@ -93,8 +93,8 @@ var routerInitPromise = null;
|
|
|
93
93
|
async function getRouter() {
|
|
94
94
|
if (cachedRouter !== null) return cachedRouter;
|
|
95
95
|
routerInitPromise ??= (async () => {
|
|
96
|
-
const { createAllAdapters } = await import("./factory-
|
|
97
|
-
const { createCompositeRouter } = await import("./composite-router-
|
|
96
|
+
const { createAllAdapters } = await import("./factory-GGSACEWN.js");
|
|
97
|
+
const { createCompositeRouter } = await import("./composite-router-PS42433A.js");
|
|
98
98
|
const adapters = createAllAdapters();
|
|
99
99
|
if (adapters.size === 0) {
|
|
100
100
|
routerInitPromise = null;
|
|
@@ -102,7 +102,7 @@ async function getRouter() {
|
|
|
102
102
|
}
|
|
103
103
|
cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
|
|
104
104
|
try {
|
|
105
|
-
const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-
|
|
105
|
+
const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-HFFMCA43.js");
|
|
106
106
|
cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
|
|
107
107
|
} catch (error) {
|
|
108
108
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
tokenSplitFromUsage,
|
|
214
214
|
executeExpert
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-UH3F4RZB.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lookupInTreeCapability
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
4
4
|
import {
|
|
5
5
|
getNexusDataDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L4QFWOOQ.js";
|
|
7
7
|
|
|
8
8
|
// src/learning/usage-log.ts
|
|
9
9
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync } from "fs";
|
|
@@ -123,4 +123,4 @@ export {
|
|
|
123
123
|
loadUsageEvents,
|
|
124
124
|
rollupByModel
|
|
125
125
|
};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
126
|
+
//# sourceMappingURL=chunk-VN3CKPEF.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
err,
|
|
5
5
|
getErrorMessage,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
8
8
|
|
|
9
9
|
// src/scm/types.ts
|
|
10
10
|
var ScmError = class extends Error {
|
|
@@ -263,4 +263,4 @@ export {
|
|
|
263
263
|
ScmError,
|
|
264
264
|
GitHubProvider
|
|
265
265
|
};
|
|
266
|
-
//# sourceMappingURL=chunk-
|
|
266
|
+
//# sourceMappingURL=chunk-VVBKPRLI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/setup-config.ts
|
|
6
6
|
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
|
|
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
|
|
|
77
77
|
export {
|
|
78
78
|
runConfigInitSync
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-VY4FZNZA.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenAIAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-257QMFTM.js";
|
|
4
4
|
import {
|
|
5
5
|
computeCostUSD,
|
|
6
6
|
recordUsageEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VN3CKPEF.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfigError,
|
|
10
10
|
createLogger,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getErrorMessage,
|
|
13
13
|
getTimeProvider,
|
|
14
14
|
ok
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
16
16
|
|
|
17
17
|
// src/config/opencode-bridge.ts
|
|
18
18
|
import { readFileSync } from "fs";
|
|
@@ -191,4 +191,4 @@ export {
|
|
|
191
191
|
discoverModels,
|
|
192
192
|
buildOpenAICompatAdapters
|
|
193
193
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
194
|
+
//# sourceMappingURL=chunk-WOE5J5M6.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getErrorMessage,
|
|
9
9
|
ok,
|
|
10
10
|
parseBoolEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
12
12
|
|
|
13
13
|
// src/cli/research-helpers-io.ts
|
|
14
14
|
import * as fs2 from "fs/promises";
|
|
@@ -146,4 +146,4 @@ export {
|
|
|
146
146
|
loadPapersRegistry,
|
|
147
147
|
savePapersRegistry
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
149
|
+
//# sourceMappingURL=chunk-ZHCEOIEQ.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getTokenEstimator,
|
|
11
11
|
isRateLimitLikeError,
|
|
12
12
|
ok
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
14
14
|
|
|
15
15
|
// src/adapters/base-adapter.ts
|
|
16
16
|
var AdapterModelError = class extends ModelError {
|
|
@@ -707,4 +707,4 @@ export {
|
|
|
707
707
|
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
708
708
|
collectStream
|
|
709
709
|
};
|
|
710
|
-
//# sourceMappingURL=chunk-
|
|
710
|
+
//# sourceMappingURL=chunk-ZII5MDUO.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VVBKPRLI.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FHFEC2XM.js";
|
|
8
8
|
import {
|
|
9
9
|
err,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
12
12
|
|
|
13
13
|
// src/scm/factory.ts
|
|
14
14
|
async function createScmProvider(config) {
|
|
@@ -41,4 +41,4 @@ export {
|
|
|
41
41
|
createScmProvider,
|
|
42
42
|
createGitHubProvider
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-ZLENFXL5.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CliCircuitBreakerIntegration,
|
|
3
|
+
createCliCircuitBreakerIntegration
|
|
4
|
+
} from "./chunk-CQDGPGTL.js";
|
|
5
|
+
import "./chunk-7G63H7ZT.js";
|
|
6
|
+
import "./chunk-OCJEYHUQ.js";
|
|
7
|
+
import "./chunk-5SXGPX34.js";
|
|
8
|
+
import "./chunk-L4QFWOOQ.js";
|
|
9
|
+
import "./chunk-ZPWHCABL.js";
|
|
10
|
+
export {
|
|
11
|
+
CliCircuitBreakerIntegration,
|
|
12
|
+
createCliCircuitBreakerIntegration
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=cli-circuit-breaker-HFFMCA43.js.map
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as CliNameLiteral, e as VoteThreshold, E as ErrorPolicy } from './consensus-vote-types-
|
|
2
|
+
import { C as CliNameLiteral, e as VoteThreshold, E as ErrorPolicy } from './consensus-vote-types-Dx4pf3YW.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
buildOpenAICompatAdapters,
|
|
4
|
+
readOpenAICompatEnv
|
|
5
|
+
} from "./chunk-WOE5J5M6.js";
|
|
2
6
|
import {
|
|
3
7
|
calculateConsensus,
|
|
4
8
|
countByCategory,
|
|
@@ -13,17 +17,13 @@ import {
|
|
|
13
17
|
generateSummary,
|
|
14
18
|
parseFindings,
|
|
15
19
|
sumFindings
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
buildOpenAICompatAdapters,
|
|
20
|
-
readOpenAICompatEnv
|
|
21
|
-
} from "./chunk-BTYYZ6VU.js";
|
|
20
|
+
} from "./chunk-JK4L2TQ6.js";
|
|
21
|
+
import "./chunk-LCSGGLZZ.js";
|
|
22
22
|
import {
|
|
23
23
|
setupCommandAsync,
|
|
24
24
|
verifyCommand
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-MTE7THMR.js";
|
|
26
|
+
import "./chunk-VY4FZNZA.js";
|
|
27
27
|
import {
|
|
28
28
|
AuthHandler,
|
|
29
29
|
DEFAULT_EXPERTS,
|
|
@@ -142,18 +142,39 @@ import {
|
|
|
142
142
|
validateCommand,
|
|
143
143
|
validateWorkflow,
|
|
144
144
|
wrapInMarkdownFence
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-
|
|
145
|
+
} from "./chunk-6JOXXQK2.js";
|
|
146
|
+
import "./chunk-257QMFTM.js";
|
|
147
|
+
import "./chunk-3JSDOBOA.js";
|
|
148
|
+
import "./chunk-HFOQKCD2.js";
|
|
147
149
|
import "./chunk-3ACDP4E6.js";
|
|
148
150
|
import {
|
|
149
151
|
CATEGORY_DISPLAY_NAMES,
|
|
150
152
|
DEFAULT_PR_REVIEW_CONFIG
|
|
151
153
|
} from "./chunk-WAYGXUSM.js";
|
|
152
|
-
import
|
|
153
|
-
|
|
154
|
+
import {
|
|
155
|
+
CustomExpertDefinitionSchema,
|
|
156
|
+
DATA_SUBDIRECTORIES,
|
|
157
|
+
MAX_SYSTEM_PROMPT_LENGTH,
|
|
158
|
+
VALID_EXPERT_DOMAINS,
|
|
159
|
+
VALID_EXPERT_TIERS,
|
|
160
|
+
VERSION,
|
|
161
|
+
adaptRoutingConfig,
|
|
162
|
+
closeServer,
|
|
163
|
+
connectTransport,
|
|
164
|
+
createServer,
|
|
165
|
+
doctorCommand,
|
|
166
|
+
getConfig,
|
|
167
|
+
getConfigManager,
|
|
168
|
+
initDataDirectories,
|
|
169
|
+
levenshtein,
|
|
170
|
+
loadConfig,
|
|
171
|
+
runDoctor,
|
|
172
|
+
validateNexusEnv
|
|
173
|
+
} from "./chunk-66TXNH4S.js";
|
|
174
|
+
import "./chunk-CQDGPGTL.js";
|
|
154
175
|
import {
|
|
155
176
|
shutdownExpertBridge
|
|
156
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-UH3F4RZB.js";
|
|
157
178
|
import {
|
|
158
179
|
ConsensusVoteInputSchema,
|
|
159
180
|
DEFAULT_VOTE_TIMEOUT_MS,
|
|
@@ -162,25 +183,25 @@ import {
|
|
|
162
183
|
VoteThresholdSchema,
|
|
163
184
|
executeVoting,
|
|
164
185
|
registerConsensusVoteTool
|
|
165
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-N67LHY47.js";
|
|
166
187
|
import {
|
|
167
188
|
loadUsageEvents,
|
|
168
189
|
rollupByModel
|
|
169
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-VN3CKPEF.js";
|
|
170
191
|
import {
|
|
171
192
|
synthesizeResearch
|
|
172
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-4GVPON4W.js";
|
|
173
194
|
import {
|
|
174
195
|
classifyTrust,
|
|
175
196
|
createFullGitHubProvider,
|
|
176
197
|
evaluatePolicy,
|
|
177
198
|
parsePRUrl
|
|
178
|
-
} from "./chunk-
|
|
179
|
-
import "./chunk-
|
|
199
|
+
} from "./chunk-3AAJWZCR.js";
|
|
200
|
+
import "./chunk-VVBKPRLI.js";
|
|
180
201
|
import {
|
|
181
202
|
ReputationCache,
|
|
182
203
|
sanitizeInput
|
|
183
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-FSUZIIOJ.js";
|
|
184
205
|
import {
|
|
185
206
|
ImprovementReviewInputSchema,
|
|
186
207
|
calculateFitnessScore,
|
|
@@ -194,11 +215,10 @@ import {
|
|
|
194
215
|
registerImprovementReviewTool,
|
|
195
216
|
runImprovementReview,
|
|
196
217
|
scanForSecrets
|
|
197
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-3WBEEYCS.js";
|
|
198
219
|
import {
|
|
199
220
|
createDefaultPolicyFirewall
|
|
200
|
-
} from "./chunk-
|
|
201
|
-
import "./chunk-HFOQKCD2.js";
|
|
221
|
+
} from "./chunk-JVZ7FGWR.js";
|
|
202
222
|
import {
|
|
203
223
|
PaperStatusSchema,
|
|
204
224
|
createResearchIssue,
|
|
@@ -221,64 +241,45 @@ import {
|
|
|
221
241
|
loadSourcesRegistry,
|
|
222
242
|
rankDiscoveredItems,
|
|
223
243
|
saveSourcesRegistry
|
|
224
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-5546JU53.js";
|
|
225
245
|
import {
|
|
226
246
|
resolveToken
|
|
227
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-FHFEC2XM.js";
|
|
228
248
|
import {
|
|
229
249
|
loadPapersRegistry,
|
|
230
250
|
loadTechniquesRegistry,
|
|
231
251
|
savePapersRegistry
|
|
232
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-ZHCEOIEQ.js";
|
|
253
|
+
import "./chunk-NUBSJGQZ.js";
|
|
233
254
|
import {
|
|
234
255
|
MemoryError,
|
|
235
256
|
shutdownToolMemory
|
|
236
|
-
} from "./chunk-
|
|
237
|
-
import "./chunk-FPMQ2JAK.js";
|
|
238
|
-
import {
|
|
239
|
-
CustomExpertDefinitionSchema,
|
|
240
|
-
DATA_SUBDIRECTORIES,
|
|
241
|
-
MAX_SYSTEM_PROMPT_LENGTH,
|
|
242
|
-
VALID_EXPERT_DOMAINS,
|
|
243
|
-
VALID_EXPERT_TIERS,
|
|
244
|
-
VERSION,
|
|
245
|
-
adaptRoutingConfig,
|
|
246
|
-
closeServer,
|
|
247
|
-
connectTransport,
|
|
248
|
-
createServer,
|
|
249
|
-
doctorCommand,
|
|
250
|
-
getConfig,
|
|
251
|
-
getConfigManager,
|
|
252
|
-
initDataDirectories,
|
|
253
|
-
levenshtein,
|
|
254
|
-
loadConfig,
|
|
255
|
-
runDoctor,
|
|
256
|
-
validateNexusEnv
|
|
257
|
-
} from "./chunk-7GSYICTL.js";
|
|
258
|
-
import "./chunk-NUBSJGQZ.js";
|
|
257
|
+
} from "./chunk-ESP6U3LW.js";
|
|
259
258
|
import {
|
|
260
259
|
capitalize,
|
|
261
260
|
capitalizeKebab,
|
|
262
261
|
truncateSentence
|
|
263
262
|
} from "./chunk-6T3EPABN.js";
|
|
263
|
+
import "./chunk-3QH2KWLH.js";
|
|
264
264
|
import "./chunk-ZM4O442V.js";
|
|
265
|
-
import "./chunk-
|
|
265
|
+
import "./chunk-UGAKYSDO.js";
|
|
266
|
+
import "./chunk-2XRPKJKX.js";
|
|
266
267
|
import {
|
|
267
268
|
createUnifiedRegistry
|
|
268
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-HMZT2SJK.js";
|
|
269
270
|
import {
|
|
270
271
|
createAllAdapters,
|
|
271
272
|
getAvailableClis,
|
|
272
273
|
isRecord,
|
|
273
274
|
probeAllClis
|
|
274
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-GWOXPCIF.js";
|
|
276
|
+
import "./chunk-ZII5MDUO.js";
|
|
275
277
|
import {
|
|
276
278
|
DEFAULTS
|
|
277
|
-
} from "./chunk-
|
|
278
|
-
import "./chunk-
|
|
279
|
-
import "./chunk-
|
|
280
|
-
import "./chunk-
|
|
281
|
-
import "./chunk-ORQAFTAZ.js";
|
|
279
|
+
} from "./chunk-7E5UXA4U.js";
|
|
280
|
+
import "./chunk-7G63H7ZT.js";
|
|
281
|
+
import "./chunk-KOVTOPEQ.js";
|
|
282
|
+
import "./chunk-FIQSOSQU.js";
|
|
282
283
|
import {
|
|
283
284
|
API_TIMEOUTS,
|
|
284
285
|
AgentCapability,
|
|
@@ -352,7 +353,8 @@ import {
|
|
|
352
353
|
validateTimeout,
|
|
353
354
|
writeEmptyLine,
|
|
354
355
|
writeLine
|
|
355
|
-
} from "./chunk-
|
|
356
|
+
} from "./chunk-OCJEYHUQ.js";
|
|
357
|
+
import "./chunk-5SXGPX34.js";
|
|
356
358
|
import {
|
|
357
359
|
applyPortableMode,
|
|
358
360
|
detectSandbox,
|
|
@@ -361,7 +363,7 @@ import {
|
|
|
361
363
|
nexusDataPath,
|
|
362
364
|
nexusSharedPath,
|
|
363
365
|
sessionsDbPath
|
|
364
|
-
} from "./chunk-
|
|
366
|
+
} from "./chunk-L4QFWOOQ.js";
|
|
365
367
|
import "./chunk-ZPWHCABL.js";
|
|
366
368
|
|
|
367
369
|
// src/cli/cli-log-bootstrap.ts
|
|
@@ -4024,7 +4026,7 @@ ${file.patch}
|
|
|
4024
4026
|
violations: policyResult.violations
|
|
4025
4027
|
});
|
|
4026
4028
|
}
|
|
4027
|
-
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-
|
|
4029
|
+
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-D47TVXFX.js");
|
|
4028
4030
|
const body = formatReviewComment2(result);
|
|
4029
4031
|
const postResult = await provider.createReview(pr.prNumber, body, result.decision);
|
|
4030
4032
|
if (!postResult.ok) {
|
|
@@ -17797,7 +17799,7 @@ function startImprovementReviewScheduler(options) {
|
|
|
17797
17799
|
let running = false;
|
|
17798
17800
|
const runOnce = async () => {
|
|
17799
17801
|
try {
|
|
17800
|
-
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-
|
|
17802
|
+
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-JDSRWFHM.js");
|
|
17801
17803
|
const input = ImprovementReviewInputSchema2.parse({ fileIssues });
|
|
17802
17804
|
const result = await runImprovementReview2(input, { logger: logger19 });
|
|
17803
17805
|
logger19.info("Scheduled improvement_review complete", {
|
|
@@ -19740,7 +19742,7 @@ function adaptConfigToLibrary(config) {
|
|
|
19740
19742
|
}
|
|
19741
19743
|
function createBeliefPromoter() {
|
|
19742
19744
|
return async (event) => {
|
|
19743
|
-
const { getToolMemory } = await import("./tool-memory-
|
|
19745
|
+
const { getToolMemory } = await import("./tool-memory-RAQWOUXV.js");
|
|
19744
19746
|
const tm = getToolMemory();
|
|
19745
19747
|
await tm.recordBelief(
|
|
19746
19748
|
`skill:${event.name}`,
|
|
@@ -20593,7 +20595,7 @@ async function handleResearchCommand(args) {
|
|
|
20593
20595
|
}
|
|
20594
20596
|
}
|
|
20595
20597
|
async function handleRegistryCommand(args) {
|
|
20596
|
-
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-
|
|
20598
|
+
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-PVC47NSQ.js");
|
|
20597
20599
|
const subcommand = args.subcommand;
|
|
20598
20600
|
if (!isValidRegistrySubcommand(subcommand)) {
|
|
20599
20601
|
process.stdout.write(`${formatRegistryUsage()}
|
|
@@ -20641,7 +20643,7 @@ async function handleVerifyCommand(args) {
|
|
|
20641
20643
|
async function handleDoctorCommand(args) {
|
|
20642
20644
|
const exitCode = await doctorCommand({ fix: args.options.fix });
|
|
20643
20645
|
if (args.options.deep) {
|
|
20644
|
-
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-
|
|
20646
|
+
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-VQQNT7VN.js");
|
|
20645
20647
|
const diag = runDeepDiagnostics2();
|
|
20646
20648
|
process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
|
|
20647
20649
|
}
|
|
@@ -20691,7 +20693,7 @@ async function runInitPortableFlow(args) {
|
|
|
20691
20693
|
return cliExit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20692
20694
|
}
|
|
20693
20695
|
async function runInitOpencodeFlow(args) {
|
|
20694
|
-
const { runInitOpencode } = await import("./init-opencode-
|
|
20696
|
+
const { runInitOpencode } = await import("./init-opencode-C7U6ZQK3.js");
|
|
20695
20697
|
const opencodePath = args.options.opencode;
|
|
20696
20698
|
if (opencodePath === void 0 || opencodePath === "") {
|
|
20697
20699
|
process.stderr.write("Error: --opencode requires a path argument.\n");
|
|
@@ -20717,7 +20719,7 @@ async function runInitOpencodeFlow(args) {
|
|
|
20717
20719
|
return cliExit(EXIT_CODES.SUCCESS);
|
|
20718
20720
|
}
|
|
20719
20721
|
async function renderOpencodeValidate(opencodePath) {
|
|
20720
|
-
const { runOpencodeValidate } = await import("./init-opencode-
|
|
20722
|
+
const { runOpencodeValidate } = await import("./init-opencode-C7U6ZQK3.js");
|
|
20721
20723
|
const result = await runOpencodeValidate(opencodePath);
|
|
20722
20724
|
if (!result.ok) {
|
|
20723
20725
|
process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
|
|
@@ -20756,7 +20758,7 @@ async function handleSetupCommandAsync(args) {
|
|
|
20756
20758
|
return cliExitFromStatus(exitCode);
|
|
20757
20759
|
}
|
|
20758
20760
|
async function runCustomApiSetup(args) {
|
|
20759
|
-
const { configureCustomApi } = await import("./setup-custom-api-
|
|
20761
|
+
const { configureCustomApi } = await import("./setup-custom-api-2PQP6UOT.js");
|
|
20760
20762
|
const baseUrl = args.options.customApi;
|
|
20761
20763
|
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20762
20764
|
const input = {
|