nexus-agents 4.3.2 → 4.3.4
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-JTLIU3JR.js → child-mcp-config-6BPBGQB4.js} +2 -2
- package/dist/{chunk-4JKO5B7A.js → chunk-4OSPP2KN.js} +2 -2
- package/dist/{chunk-DL5RN53R.js → chunk-65DZ7WHY.js} +2 -2
- package/dist/{chunk-KIWPXWL7.js → chunk-6DLKK5R2.js} +4 -4
- package/dist/{chunk-H64DUJSZ.js → chunk-AVB5GOSW.js} +6 -6
- package/dist/{chunk-Z3QSRADW.js → chunk-C3VVVABX.js} +8 -8
- package/dist/{chunk-CXA4H3PZ.js → chunk-CFEZ2DG6.js} +8 -8
- package/dist/{chunk-5GUP54YH.js → chunk-DFCJUKGD.js} +2 -2
- package/dist/{chunk-B6JICUQ6.js → chunk-E6ET2WJI.js} +4 -4
- package/dist/{chunk-AQAGVYWS.js → chunk-EJLOD53Z.js} +2 -2
- package/dist/{chunk-5HHTFAHY.js → chunk-I27YOL3U.js} +35 -35
- package/dist/{chunk-5HHTFAHY.js.map → chunk-I27YOL3U.js.map} +1 -1
- package/dist/{chunk-MPEQHP4D.js → chunk-IXMTCWMN.js} +3 -3
- package/dist/{chunk-WX5TASVN.js → chunk-K2ZYZZNZ.js} +3 -3
- package/dist/{chunk-55XLIDEN.js → chunk-LPUJG7C6.js} +2 -2
- package/dist/{chunk-SF6KSPBW.js → chunk-NKTANKWH.js} +3 -3
- package/dist/{chunk-X57EI3U6.js → chunk-OPH5S776.js} +2 -2
- package/dist/{chunk-3K3VGOY4.js → chunk-PG563EVI.js} +2 -2
- package/dist/{chunk-CYCXJNPA.js → chunk-PZSPL5KN.js} +2 -2
- package/dist/{chunk-MLR4PF64.js → chunk-QGXA25PQ.js} +2 -2
- package/dist/{chunk-OYNZ6FCZ.js → chunk-QTP4AIVR.js} +7 -7
- package/dist/{chunk-MPCBYY4J.js → chunk-RUN6KRCP.js} +8 -8
- package/dist/{chunk-FHXDRCIW.js → chunk-SHG3MYMD.js} +2 -2
- package/dist/{chunk-TKA6653I.js → chunk-SPZOZGBS.js} +2 -2
- package/dist/{chunk-ROAVF3S5.js → chunk-SSPEB62Y.js} +5 -5
- package/dist/{chunk-JV5HRP3S.js → chunk-TKFWYFBD.js} +2 -2
- package/dist/{chunk-TMYLHKLJ.js → chunk-U4LM5Q2L.js} +4 -4
- package/dist/{chunk-2QYJ7IE2.js → chunk-UH4MK2N7.js} +10 -12
- package/dist/chunk-UH4MK2N7.js.map +1 -0
- package/dist/{chunk-XABDFFQV.js → chunk-UI3WYJSZ.js} +2 -2
- package/dist/{chunk-Y3WYSLFZ.js → chunk-VWXQHGQ2.js} +2 -2
- package/dist/{chunk-DVKS77O5.js → chunk-XIIUIBSX.js} +5 -1
- package/dist/{chunk-DVKS77O5.js.map → chunk-XIIUIBSX.js.map} +1 -1
- package/dist/{chunk-LGTY3B3Q.js → chunk-XJORRLQT.js} +5 -5
- package/dist/{chunk-3P6N3XZF.js → chunk-Y3UJ3VLA.js} +2 -2
- package/dist/{chunk-73U6W5ZU.js → chunk-YIV4GQHK.js} +2 -2
- package/dist/{chunk-U6NDB43U.js → chunk-YV7MHKY7.js} +5 -5
- package/dist/{chunk-A7DEF2I6.js → chunk-ZQWCL7YB.js} +3 -3
- package/dist/{cli-circuit-breaker-DG2L4C3C.js → cli-circuit-breaker-3CH36TPE.js} +3 -3
- package/dist/cli.js +42 -42
- package/dist/{composite-router-X5QU6XNZ.js → composite-router-QK4OPVDX.js} +2 -2
- package/dist/{consensus-vote-EOXPISAA.js → consensus-vote-DL4XNR7M.js} +17 -17
- package/dist/{context-retriever-CIFLPUJA.js → context-retriever-UPHWSEXA.js} +9 -9
- package/dist/{doctor-deep-FZGNQXDZ.js → doctor-deep-UHFL3AE4.js} +3 -3
- package/dist/{doctor-live-KGQWMYJY.js → doctor-live-2CGAFGFG.js} +9 -9
- package/dist/{expert-bridge-B6ZTEZNH.js → expert-bridge-KTKJTMMO.js} +4 -4
- package/dist/{factory-RLGGFLYD.js → factory-QQKY3UW4.js} +5 -5
- package/dist/{factory-5BEGXJVB.js → factory-SC3N2RMX.js} +9 -9
- package/dist/{improvement-review-52J36YLJ.js → improvement-review-I4WFQK25.js} +5 -5
- package/dist/index.d.ts +12 -2
- package/dist/index.js +31 -31
- package/dist/{init-opencode-JAJXMGOI.js → init-opencode-HTSSQOLE.js} +6 -6
- package/dist/issue-triage-SAS3D5K4.js +17 -0
- package/dist/{pr-reviewer-helpers-KZ4MNSUT.js → pr-reviewer-helpers-UOP4JVHI.js} +4 -4
- package/dist/{registry-command-AHGSBCNL.js → registry-command-EPG2X2ZI.js} +2 -2
- package/dist/{repo-security-plan-C4ZSWVY7.js → repo-security-plan-QYSW4MKN.js} +3 -3
- package/dist/{research-helpers-synthesize-C4GK3GU4.js → research-helpers-synthesize-YSYYUW5H.js} +4 -4
- package/dist/{routing-memory-WU4C63BA.js → routing-memory-BZ6IGNXN.js} +2 -2
- package/dist/{session-memory-LYX5N2IP.js → session-memory-GVOVQ3TV.js} +3 -3
- package/dist/{setup-command-GVDJEHTI.js → setup-command-H7FJXFMF.js} +14 -14
- package/dist/{setup-config-P722TC57.js → setup-config-Q2WGGIQT.js} +3 -3
- package/dist/{setup-custom-api-P7T5YKIK.js → setup-custom-api-GXF5MFBG.js} +4 -4
- package/dist/{tool-memory-AL5PXKB4.js → tool-memory-MHP37ASX.js} +6 -6
- package/dist/{tool-memory-registry-adapters-YQLOSV4S.js → tool-memory-registry-adapters-QEC3YHB2.js} +2 -2
- package/dist/{unified-registry-UM4GSYMB.js → unified-registry-WX3GDBCZ.js} +10 -10
- package/dist/{weather-report-QLHSZQOT.js → weather-report-YY7BO744.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2QYJ7IE2.js.map +0 -1
- package/dist/issue-triage-APE6L5YP.js +0 -17
- /package/dist/{child-mcp-config-JTLIU3JR.js.map → child-mcp-config-6BPBGQB4.js.map} +0 -0
- /package/dist/{chunk-4JKO5B7A.js.map → chunk-4OSPP2KN.js.map} +0 -0
- /package/dist/{chunk-DL5RN53R.js.map → chunk-65DZ7WHY.js.map} +0 -0
- /package/dist/{chunk-KIWPXWL7.js.map → chunk-6DLKK5R2.js.map} +0 -0
- /package/dist/{chunk-H64DUJSZ.js.map → chunk-AVB5GOSW.js.map} +0 -0
- /package/dist/{chunk-Z3QSRADW.js.map → chunk-C3VVVABX.js.map} +0 -0
- /package/dist/{chunk-CXA4H3PZ.js.map → chunk-CFEZ2DG6.js.map} +0 -0
- /package/dist/{chunk-5GUP54YH.js.map → chunk-DFCJUKGD.js.map} +0 -0
- /package/dist/{chunk-B6JICUQ6.js.map → chunk-E6ET2WJI.js.map} +0 -0
- /package/dist/{chunk-AQAGVYWS.js.map → chunk-EJLOD53Z.js.map} +0 -0
- /package/dist/{chunk-MPEQHP4D.js.map → chunk-IXMTCWMN.js.map} +0 -0
- /package/dist/{chunk-WX5TASVN.js.map → chunk-K2ZYZZNZ.js.map} +0 -0
- /package/dist/{chunk-55XLIDEN.js.map → chunk-LPUJG7C6.js.map} +0 -0
- /package/dist/{chunk-SF6KSPBW.js.map → chunk-NKTANKWH.js.map} +0 -0
- /package/dist/{chunk-X57EI3U6.js.map → chunk-OPH5S776.js.map} +0 -0
- /package/dist/{chunk-3K3VGOY4.js.map → chunk-PG563EVI.js.map} +0 -0
- /package/dist/{chunk-CYCXJNPA.js.map → chunk-PZSPL5KN.js.map} +0 -0
- /package/dist/{chunk-MLR4PF64.js.map → chunk-QGXA25PQ.js.map} +0 -0
- /package/dist/{chunk-OYNZ6FCZ.js.map → chunk-QTP4AIVR.js.map} +0 -0
- /package/dist/{chunk-MPCBYY4J.js.map → chunk-RUN6KRCP.js.map} +0 -0
- /package/dist/{chunk-FHXDRCIW.js.map → chunk-SHG3MYMD.js.map} +0 -0
- /package/dist/{chunk-TKA6653I.js.map → chunk-SPZOZGBS.js.map} +0 -0
- /package/dist/{chunk-ROAVF3S5.js.map → chunk-SSPEB62Y.js.map} +0 -0
- /package/dist/{chunk-JV5HRP3S.js.map → chunk-TKFWYFBD.js.map} +0 -0
- /package/dist/{chunk-TMYLHKLJ.js.map → chunk-U4LM5Q2L.js.map} +0 -0
- /package/dist/{chunk-XABDFFQV.js.map → chunk-UI3WYJSZ.js.map} +0 -0
- /package/dist/{chunk-Y3WYSLFZ.js.map → chunk-VWXQHGQ2.js.map} +0 -0
- /package/dist/{chunk-LGTY3B3Q.js.map → chunk-XJORRLQT.js.map} +0 -0
- /package/dist/{chunk-3P6N3XZF.js.map → chunk-Y3UJ3VLA.js.map} +0 -0
- /package/dist/{chunk-73U6W5ZU.js.map → chunk-YIV4GQHK.js.map} +0 -0
- /package/dist/{chunk-U6NDB43U.js.map → chunk-YV7MHKY7.js.map} +0 -0
- /package/dist/{chunk-A7DEF2I6.js.map → chunk-ZQWCL7YB.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-DG2L4C3C.js.map → cli-circuit-breaker-3CH36TPE.js.map} +0 -0
- /package/dist/{composite-router-X5QU6XNZ.js.map → composite-router-QK4OPVDX.js.map} +0 -0
- /package/dist/{consensus-vote-EOXPISAA.js.map → consensus-vote-DL4XNR7M.js.map} +0 -0
- /package/dist/{context-retriever-CIFLPUJA.js.map → context-retriever-UPHWSEXA.js.map} +0 -0
- /package/dist/{doctor-deep-FZGNQXDZ.js.map → doctor-deep-UHFL3AE4.js.map} +0 -0
- /package/dist/{doctor-live-KGQWMYJY.js.map → doctor-live-2CGAFGFG.js.map} +0 -0
- /package/dist/{expert-bridge-B6ZTEZNH.js.map → expert-bridge-KTKJTMMO.js.map} +0 -0
- /package/dist/{factory-5BEGXJVB.js.map → factory-QQKY3UW4.js.map} +0 -0
- /package/dist/{factory-RLGGFLYD.js.map → factory-SC3N2RMX.js.map} +0 -0
- /package/dist/{improvement-review-52J36YLJ.js.map → improvement-review-I4WFQK25.js.map} +0 -0
- /package/dist/{init-opencode-JAJXMGOI.js.map → init-opencode-HTSSQOLE.js.map} +0 -0
- /package/dist/{issue-triage-APE6L5YP.js.map → issue-triage-SAS3D5K4.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-KZ4MNSUT.js.map → pr-reviewer-helpers-UOP4JVHI.js.map} +0 -0
- /package/dist/{registry-command-AHGSBCNL.js.map → registry-command-EPG2X2ZI.js.map} +0 -0
- /package/dist/{repo-security-plan-C4ZSWVY7.js.map → repo-security-plan-QYSW4MKN.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-C4GK3GU4.js.map → research-helpers-synthesize-YSYYUW5H.js.map} +0 -0
- /package/dist/{routing-memory-WU4C63BA.js.map → routing-memory-BZ6IGNXN.js.map} +0 -0
- /package/dist/{session-memory-LYX5N2IP.js.map → session-memory-GVOVQ3TV.js.map} +0 -0
- /package/dist/{setup-command-GVDJEHTI.js.map → setup-command-H7FJXFMF.js.map} +0 -0
- /package/dist/{setup-config-P722TC57.js.map → setup-config-Q2WGGIQT.js.map} +0 -0
- /package/dist/{setup-custom-api-P7T5YKIK.js.map → setup-custom-api-GXF5MFBG.js.map} +0 -0
- /package/dist/{tool-memory-AL5PXKB4.js.map → tool-memory-MHP37ASX.js.map} +0 -0
- /package/dist/{tool-memory-registry-adapters-YQLOSV4S.js.map → tool-memory-registry-adapters-QEC3YHB2.js.map} +0 -0
- /package/dist/{unified-registry-UM4GSYMB.js.map → unified-registry-WX3GDBCZ.js.map} +0 -0
- /package/dist/{weather-report-QLHSZQOT.js.map → weather-report-YY7BO744.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createLogger,
|
|
3
3
|
err,
|
|
4
4
|
ok
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
6
6
|
|
|
7
7
|
// src/scm/token-resolver.ts
|
|
8
8
|
import { execFile } from "child_process";
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
hasToken,
|
|
88
88
|
getTokenEnvVars
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-UI3WYJSZ.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getErrorMessage,
|
|
9
9
|
ok,
|
|
10
10
|
parseBoolEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U4LM5Q2L.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-VWXQHGQ2.js.map
|
|
@@ -76,6 +76,10 @@ function extractCount(value) {
|
|
|
76
76
|
if (value !== null && typeof value === "object") {
|
|
77
77
|
const v = value;
|
|
78
78
|
if (v.ok === true && typeof v.value === "number") return v.value;
|
|
79
|
+
if (v.ok === false) {
|
|
80
|
+
const detail = v.error instanceof Error ? v.error.message : typeof v.error === "string" ? v.error : "unknown error";
|
|
81
|
+
throw new Error(`backend count() failed: ${detail}`);
|
|
82
|
+
}
|
|
79
83
|
}
|
|
80
84
|
return 0;
|
|
81
85
|
}
|
|
@@ -89,4 +93,4 @@ export {
|
|
|
89
93
|
StatsOnlyAdapter,
|
|
90
94
|
ensureSharedMemoryRegistry
|
|
91
95
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
96
|
+
//# sourceMappingURL=chunk-XIIUIBSX.js.map
|
|
@@ -1 +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
|
+
{"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; error?: unknown };\n if (v.ok === true && typeof v.value === 'number') return v.value;\n // #4827: a FAILED Result must NOT collapse to 0. Doing so made a corrupt\n // or locked backend report `{count: 0, error: null}` — byte-identical to a\n // healthy empty store — and left `collectRegistryStats`'s catch\n // (memory-stats.ts:213) unreachable, so `RegistryDomainStats.error`\n // documented a state nothing could produce. Throwing lets that catch,\n // which is already written and correct, do its job.\n if (v.ok === false) {\n const detail =\n v.error instanceof Error\n ? v.error.message\n : typeof v.error === 'string'\n ? v.error\n : 'unknown error';\n throw new Error(`backend count() failed: ${detail}`);\n }\n }\n // An unrecognised shape is genuinely unknown, not a reported failure — 0 is\n // the long-standing behaviour and callers have no error to surface.\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;AAO3D,QAAI,EAAE,OAAO,OAAO;AAClB,YAAM,SACJ,EAAE,iBAAiB,QACf,EAAE,MAAM,UACR,OAAO,EAAE,UAAU,WACjB,EAAE,QACF;AACR,YAAM,IAAI,MAAM,2BAA2B,MAAM,EAAE;AAAA,IACrD;AAAA,EACF;AAGA,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":[]}
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
loadPapersRegistry,
|
|
5
5
|
loadTechniquesRegistry,
|
|
6
6
|
savePapersRegistry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VWXQHGQ2.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveInsideRoot
|
|
10
10
|
} from "./chunk-NUBSJGQZ.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveToken
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UI3WYJSZ.js";
|
|
14
14
|
import {
|
|
15
15
|
getToolMemory
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UH4MK2N7.js";
|
|
17
17
|
import {
|
|
18
18
|
capitalizeWords,
|
|
19
19
|
truncateSentence
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
getTimeProvider,
|
|
39
39
|
ok,
|
|
40
40
|
registerPersistentDistillerFactory
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
42
42
|
import {
|
|
43
43
|
ensureLearningDir,
|
|
44
44
|
getRulesFile
|
|
@@ -4090,4 +4090,4 @@ export {
|
|
|
4090
4090
|
DEFAULT_CONTEXT_BUDGET_TOKENS,
|
|
4091
4091
|
getContextPromptPrefix
|
|
4092
4092
|
};
|
|
4093
|
-
//# sourceMappingURL=chunk-
|
|
4093
|
+
//# sourceMappingURL=chunk-XJORRLQT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDefaultRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
4
4
|
import {
|
|
5
5
|
getNexusDataDir
|
|
6
6
|
} from "./chunk-OQLFRJCW.js";
|
|
@@ -128,4 +128,4 @@ export {
|
|
|
128
128
|
loadUsageEvents,
|
|
129
129
|
rollupByModel
|
|
130
130
|
};
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-Y3UJ3VLA.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U4LM5Q2L.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-YIV4GQHK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runConfigInitSync
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YIV4GQHK.js";
|
|
4
4
|
import {
|
|
5
5
|
VERSION,
|
|
6
6
|
checkApiKeys,
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
checkSqlite,
|
|
9
9
|
defaultConfig,
|
|
10
10
|
initDataDirectories
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-C3VVVABX.js";
|
|
12
12
|
import {
|
|
13
13
|
BUILT_IN_EXPERTS
|
|
14
14
|
} from "./chunk-YPNQPT2F.js";
|
|
15
15
|
import {
|
|
16
16
|
probeAllClis
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RUN6KRCP.js";
|
|
18
18
|
import {
|
|
19
19
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
20
20
|
colors,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getErrorMessage,
|
|
26
26
|
getTimeProvider,
|
|
27
27
|
symbols
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
29
29
|
import {
|
|
30
30
|
ensureGitignored,
|
|
31
31
|
findRepoRoot
|
|
@@ -2001,4 +2001,4 @@ export {
|
|
|
2001
2001
|
setupCommand,
|
|
2002
2002
|
setupCommandAsync
|
|
2003
2003
|
};
|
|
2004
|
-
//# sourceMappingURL=chunk-
|
|
2004
|
+
//# sourceMappingURL=chunk-YV7MHKY7.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadPapersRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VWXQHGQ2.js";
|
|
4
4
|
import {
|
|
5
5
|
getErrorMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/research-helpers-synthesize.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -876,4 +876,4 @@ export {
|
|
|
876
876
|
AttributedInsightSchema,
|
|
877
877
|
synthesizeResearch
|
|
878
878
|
};
|
|
879
|
-
//# sourceMappingURL=chunk-
|
|
879
|
+
//# sourceMappingURL=chunk-ZQWCL7YB.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createCliCircuitBreakerIntegration,
|
|
4
4
|
getCliCircuitBreakerSnapshot,
|
|
5
5
|
getDefaultCliCircuitBreakerRegistry
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-4OSPP2KN.js";
|
|
7
|
+
import "./chunk-U4LM5Q2L.js";
|
|
8
8
|
import "./chunk-2HUC6NZN.js";
|
|
9
9
|
import "./chunk-OQLFRJCW.js";
|
|
10
10
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getCliCircuitBreakerSnapshot,
|
|
15
15
|
getDefaultCliCircuitBreakerRegistry
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=cli-circuit-breaker-
|
|
17
|
+
//# sourceMappingURL=cli-circuit-breaker-3CH36TPE.js.map
|
package/dist/cli.js
CHANGED
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
generateSummary,
|
|
14
14
|
parseFindings,
|
|
15
15
|
sumFindings
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-NKTANKWH.js";
|
|
17
|
+
import "./chunk-TKFWYFBD.js";
|
|
18
18
|
import {
|
|
19
19
|
setupCommandAsync,
|
|
20
20
|
verifyCommand
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-YV7MHKY7.js";
|
|
22
|
+
import "./chunk-YIV4GQHK.js";
|
|
23
23
|
import {
|
|
24
24
|
AuthHandler,
|
|
25
25
|
DEFAULT_EXPERTS,
|
|
@@ -139,8 +139,8 @@ import {
|
|
|
139
139
|
validateCommand,
|
|
140
140
|
validateWorkflow,
|
|
141
141
|
wrapInMarkdownFence
|
|
142
|
-
} from "./chunk-
|
|
143
|
-
import "./chunk-
|
|
142
|
+
} from "./chunk-I27YOL3U.js";
|
|
143
|
+
import "./chunk-SHG3MYMD.js";
|
|
144
144
|
import "./chunk-HFOQKCD2.js";
|
|
145
145
|
import "./chunk-RSMG2DPB.js";
|
|
146
146
|
import {
|
|
@@ -166,14 +166,14 @@ import {
|
|
|
166
166
|
loadConfig,
|
|
167
167
|
runDoctor,
|
|
168
168
|
validateNexusEnv
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-C3VVVABX.js";
|
|
170
170
|
import {
|
|
171
171
|
buildOpenAICompatAdapters,
|
|
172
172
|
readOpenAICompatEnv
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-SSPEB62Y.js";
|
|
174
174
|
import {
|
|
175
175
|
shutdownExpertBridge
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-QTP4AIVR.js";
|
|
177
177
|
import {
|
|
178
178
|
ConsensusVoteInputSchema,
|
|
179
179
|
DEFAULT_VOTE_TIMEOUT_MS,
|
|
@@ -183,29 +183,29 @@ import {
|
|
|
183
183
|
executeVoting,
|
|
184
184
|
mapOutcomeToDecision,
|
|
185
185
|
registerConsensusVoteTool
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-CFEZ2DG6.js";
|
|
187
187
|
import {
|
|
188
188
|
loadUsageEvents,
|
|
189
189
|
rollupByModel
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-Y3UJ3VLA.js";
|
|
191
191
|
import {
|
|
192
192
|
allOf,
|
|
193
193
|
anyOf
|
|
194
194
|
} from "./chunk-OQB3XC5O.js";
|
|
195
195
|
import {
|
|
196
196
|
synthesizeResearch
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-ZQWCL7YB.js";
|
|
198
198
|
import {
|
|
199
199
|
classifyTrust,
|
|
200
200
|
createFullGitHubProvider,
|
|
201
201
|
evaluatePolicy,
|
|
202
202
|
parsePRUrl
|
|
203
|
-
} from "./chunk-
|
|
204
|
-
import "./chunk-
|
|
203
|
+
} from "./chunk-AVB5GOSW.js";
|
|
204
|
+
import "./chunk-LPUJG7C6.js";
|
|
205
205
|
import {
|
|
206
206
|
ReputationCache,
|
|
207
207
|
sanitizeInput
|
|
208
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-EJLOD53Z.js";
|
|
209
209
|
import {
|
|
210
210
|
ImprovementReviewInputSchema,
|
|
211
211
|
calculateFitnessScore,
|
|
@@ -219,15 +219,15 @@ import {
|
|
|
219
219
|
registerImprovementReviewTool,
|
|
220
220
|
runImprovementReview,
|
|
221
221
|
scanForSecrets
|
|
222
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-IXMTCWMN.js";
|
|
223
223
|
import {
|
|
224
224
|
createDefaultPolicyFirewall
|
|
225
|
-
} from "./chunk-
|
|
226
|
-
import "./chunk-
|
|
225
|
+
} from "./chunk-K2ZYZZNZ.js";
|
|
226
|
+
import "./chunk-DFCJUKGD.js";
|
|
227
227
|
import {
|
|
228
228
|
createUnifiedRegistry,
|
|
229
229
|
getGlobalRegistry
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-E6ET2WJI.js";
|
|
231
231
|
import {
|
|
232
232
|
CodebaseIndexSchema,
|
|
233
233
|
PaperStatusSchema,
|
|
@@ -253,27 +253,27 @@ import {
|
|
|
253
253
|
loadSourcesRegistry,
|
|
254
254
|
rankDiscoveredItems,
|
|
255
255
|
saveSourcesRegistry
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-XJORRLQT.js";
|
|
257
257
|
import {
|
|
258
258
|
loadPapersRegistry,
|
|
259
259
|
loadTechniquesRegistry,
|
|
260
260
|
savePapersRegistry
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-VWXQHGQ2.js";
|
|
262
262
|
import "./chunk-NUBSJGQZ.js";
|
|
263
263
|
import {
|
|
264
264
|
resolveToken
|
|
265
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-UI3WYJSZ.js";
|
|
266
266
|
import {
|
|
267
267
|
MemoryError,
|
|
268
268
|
shutdownToolMemory
|
|
269
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-UH4MK2N7.js";
|
|
270
270
|
import {
|
|
271
271
|
capitalize,
|
|
272
272
|
capitalizeKebab
|
|
273
273
|
} from "./chunk-6T3EPABN.js";
|
|
274
|
-
import "./chunk-
|
|
274
|
+
import "./chunk-PG563EVI.js";
|
|
275
275
|
import "./chunk-YPNQPT2F.js";
|
|
276
|
-
import "./chunk-
|
|
276
|
+
import "./chunk-XIIUIBSX.js";
|
|
277
277
|
import "./chunk-KSQSWEFH.js";
|
|
278
278
|
import {
|
|
279
279
|
NEXUS_SUBPROCESS_DEPTH_ENV,
|
|
@@ -282,19 +282,19 @@ import {
|
|
|
282
282
|
isRecord,
|
|
283
283
|
probeAllClis,
|
|
284
284
|
readSubprocessDepth
|
|
285
|
-
} from "./chunk-
|
|
286
|
-
import "./chunk-
|
|
285
|
+
} from "./chunk-RUN6KRCP.js";
|
|
286
|
+
import "./chunk-QGXA25PQ.js";
|
|
287
287
|
import {
|
|
288
288
|
DEFAULTS
|
|
289
|
-
} from "./chunk-
|
|
290
|
-
import "./chunk-
|
|
289
|
+
} from "./chunk-65DZ7WHY.js";
|
|
290
|
+
import "./chunk-OPH5S776.js";
|
|
291
291
|
import {
|
|
292
292
|
nexusMkdtempSync
|
|
293
293
|
} from "./chunk-SNJNRDKZ.js";
|
|
294
|
-
import "./chunk-
|
|
294
|
+
import "./chunk-SPZOZGBS.js";
|
|
295
295
|
import "./chunk-QZUG667L.js";
|
|
296
|
-
import "./chunk-
|
|
297
|
-
import "./chunk-
|
|
296
|
+
import "./chunk-PZSPL5KN.js";
|
|
297
|
+
import "./chunk-4OSPP2KN.js";
|
|
298
298
|
import {
|
|
299
299
|
API_TIMEOUTS,
|
|
300
300
|
AgentCapability,
|
|
@@ -368,7 +368,7 @@ import {
|
|
|
368
368
|
validateTimeout,
|
|
369
369
|
writeEmptyLine,
|
|
370
370
|
writeLine
|
|
371
|
-
} from "./chunk-
|
|
371
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
372
372
|
import "./chunk-2HUC6NZN.js";
|
|
373
373
|
import {
|
|
374
374
|
applyPortableMode,
|
|
@@ -4126,7 +4126,7 @@ ${file.patch}
|
|
|
4126
4126
|
violations: policyResult.violations
|
|
4127
4127
|
});
|
|
4128
4128
|
}
|
|
4129
|
-
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-
|
|
4129
|
+
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-UOP4JVHI.js");
|
|
4130
4130
|
const body = formatReviewComment2(result);
|
|
4131
4131
|
const postResult = await provider.createReview(pr.prNumber, body, result.decision);
|
|
4132
4132
|
if (!postResult.ok) {
|
|
@@ -17532,7 +17532,7 @@ function startImprovementReviewScheduler(options) {
|
|
|
17532
17532
|
let running = false;
|
|
17533
17533
|
const runOnce = async () => {
|
|
17534
17534
|
try {
|
|
17535
|
-
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-
|
|
17535
|
+
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-I4WFQK25.js");
|
|
17536
17536
|
const input = ImprovementReviewInputSchema2.parse({ fileIssues });
|
|
17537
17537
|
const result = await runImprovementReview2(input, { logger: logger19 });
|
|
17538
17538
|
logger19.info("Scheduled improvement_review complete", {
|
|
@@ -19589,7 +19589,7 @@ function adaptConfigToLibrary(config) {
|
|
|
19589
19589
|
}
|
|
19590
19590
|
function createBeliefPromoter() {
|
|
19591
19591
|
return async (event) => {
|
|
19592
|
-
const { getToolMemory } = await import("./tool-memory-
|
|
19592
|
+
const { getToolMemory } = await import("./tool-memory-MHP37ASX.js");
|
|
19593
19593
|
const tm = getToolMemory();
|
|
19594
19594
|
await tm.recordBelief(
|
|
19595
19595
|
`skill:${event.name}`,
|
|
@@ -20776,7 +20776,7 @@ async function handleResearchCommand(args) {
|
|
|
20776
20776
|
}
|
|
20777
20777
|
}
|
|
20778
20778
|
async function handleRegistryCommand(args) {
|
|
20779
|
-
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-
|
|
20779
|
+
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-EPG2X2ZI.js");
|
|
20780
20780
|
const subcommand = args.subcommand;
|
|
20781
20781
|
if (!isValidRegistrySubcommand(subcommand)) {
|
|
20782
20782
|
process.stdout.write(`${formatRegistryUsage()}
|
|
@@ -20824,12 +20824,12 @@ async function handleVerifyCommand(args) {
|
|
|
20824
20824
|
async function handleDoctorCommand(args) {
|
|
20825
20825
|
const exitCode = await doctorCommand({ fix: args.options.fix });
|
|
20826
20826
|
if (args.options.deep) {
|
|
20827
|
-
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-
|
|
20827
|
+
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-UHFL3AE4.js");
|
|
20828
20828
|
const diag = runDeepDiagnostics2();
|
|
20829
20829
|
process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
|
|
20830
20830
|
}
|
|
20831
20831
|
if (args.options.live) {
|
|
20832
|
-
const { runLiveReadiness, formatLiveReadiness } = await import("./doctor-live-
|
|
20832
|
+
const { runLiveReadiness, formatLiveReadiness } = await import("./doctor-live-2CGAFGFG.js");
|
|
20833
20833
|
const report = await runLiveReadiness();
|
|
20834
20834
|
process.stdout.write(formatLiveReadiness(report) + "\n");
|
|
20835
20835
|
if (report.some((r) => r.levels.serves.status === "failed")) {
|
|
@@ -20882,7 +20882,7 @@ async function runInitPortableFlow(args) {
|
|
|
20882
20882
|
return cliExit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20883
20883
|
}
|
|
20884
20884
|
async function runInitOpencodeFlow(args) {
|
|
20885
|
-
const { runInitOpencode } = await import("./init-opencode-
|
|
20885
|
+
const { runInitOpencode } = await import("./init-opencode-HTSSQOLE.js");
|
|
20886
20886
|
const opencodePath = args.options.opencode;
|
|
20887
20887
|
if (opencodePath === void 0 || opencodePath === "") {
|
|
20888
20888
|
process.stderr.write("Error: --opencode requires a path argument.\n");
|
|
@@ -20908,7 +20908,7 @@ async function runInitOpencodeFlow(args) {
|
|
|
20908
20908
|
return cliExit(EXIT_CODES.SUCCESS);
|
|
20909
20909
|
}
|
|
20910
20910
|
async function renderOpencodeValidate(opencodePath) {
|
|
20911
|
-
const { runOpencodeValidate } = await import("./init-opencode-
|
|
20911
|
+
const { runOpencodeValidate } = await import("./init-opencode-HTSSQOLE.js");
|
|
20912
20912
|
const result = await runOpencodeValidate(opencodePath);
|
|
20913
20913
|
if (!result.ok) {
|
|
20914
20914
|
process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
|
|
@@ -20947,7 +20947,7 @@ async function handleSetupCommandAsync(args) {
|
|
|
20947
20947
|
return cliExitFromStatus(exitCode);
|
|
20948
20948
|
}
|
|
20949
20949
|
async function runCustomApiSetup(args) {
|
|
20950
|
-
const { configureCustomApi } = await import("./setup-custom-api-
|
|
20950
|
+
const { configureCustomApi } = await import("./setup-custom-api-GXF5MFBG.js");
|
|
20951
20951
|
const baseUrl = args.options.customApi;
|
|
20952
20952
|
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20953
20953
|
const input = {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
CompositeRoutingError,
|
|
5
5
|
DEFAULT_COMPOSITE_CONFIG,
|
|
6
6
|
createCompositeRouter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
8
8
|
import "./chunk-2HUC6NZN.js";
|
|
9
9
|
import "./chunk-OQLFRJCW.js";
|
|
10
10
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
DEFAULT_COMPOSITE_CONFIG,
|
|
16
16
|
createCompositeRouter
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=composite-router-
|
|
18
|
+
//# sourceMappingURL=composite-router-QK4OPVDX.js.map
|
|
@@ -11,27 +11,27 @@ import {
|
|
|
11
11
|
resetCorrelationTracker,
|
|
12
12
|
runConsensusForGoal,
|
|
13
13
|
unwrapVoteOrThrow
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-CFEZ2DG6.js";
|
|
15
|
+
import "./chunk-Y3UJ3VLA.js";
|
|
16
16
|
import "./chunk-OQB3XC5O.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-K2ZYZZNZ.js";
|
|
18
|
+
import "./chunk-DFCJUKGD.js";
|
|
19
|
+
import "./chunk-E6ET2WJI.js";
|
|
20
|
+
import "./chunk-UH4MK2N7.js";
|
|
21
21
|
import "./chunk-6T3EPABN.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-PG563EVI.js";
|
|
23
|
+
import "./chunk-XIIUIBSX.js";
|
|
24
24
|
import "./chunk-KSQSWEFH.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-RUN6KRCP.js";
|
|
26
|
+
import "./chunk-QGXA25PQ.js";
|
|
27
|
+
import "./chunk-65DZ7WHY.js";
|
|
28
|
+
import "./chunk-OPH5S776.js";
|
|
29
29
|
import "./chunk-SNJNRDKZ.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-SPZOZGBS.js";
|
|
31
31
|
import "./chunk-QZUG667L.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-PZSPL5KN.js";
|
|
33
|
+
import "./chunk-4OSPP2KN.js";
|
|
34
|
+
import "./chunk-U4LM5Q2L.js";
|
|
35
35
|
import "./chunk-2HUC6NZN.js";
|
|
36
36
|
import "./chunk-OQLFRJCW.js";
|
|
37
37
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
runConsensusForGoal,
|
|
50
50
|
unwrapVoteOrThrow
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=consensus-vote-
|
|
52
|
+
//# sourceMappingURL=consensus-vote-DL4XNR7M.js.map
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
inferTaskCategory,
|
|
7
7
|
selectRelevantResearch,
|
|
8
8
|
summarizeContextForPrompt
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-XJORRLQT.js";
|
|
10
|
+
import "./chunk-VWXQHGQ2.js";
|
|
11
11
|
import "./chunk-NUBSJGQZ.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-UI3WYJSZ.js";
|
|
13
|
+
import "./chunk-UH4MK2N7.js";
|
|
14
14
|
import "./chunk-6T3EPABN.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-PG563EVI.js";
|
|
16
|
+
import "./chunk-XIIUIBSX.js";
|
|
17
17
|
import "./chunk-KSQSWEFH.js";
|
|
18
18
|
import "./chunk-QZUG667L.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-PZSPL5KN.js";
|
|
20
|
+
import "./chunk-U4LM5Q2L.js";
|
|
21
21
|
import "./chunk-2HUC6NZN.js";
|
|
22
22
|
import "./chunk-OQLFRJCW.js";
|
|
23
23
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
selectRelevantResearch,
|
|
31
31
|
summarizeContextForPrompt
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=context-retriever-
|
|
33
|
+
//# sourceMappingURL=context-retriever-UPHWSEXA.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatDeepDiagnostics,
|
|
3
3
|
runDeepDiagnostics
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-TKFWYFBD.js";
|
|
5
|
+
import "./chunk-U4LM5Q2L.js";
|
|
6
6
|
import "./chunk-2HUC6NZN.js";
|
|
7
7
|
import "./chunk-OQLFRJCW.js";
|
|
8
8
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -10,4 +10,4 @@ export {
|
|
|
10
10
|
formatDeepDiagnostics,
|
|
11
11
|
runDeepDiagnostics
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=doctor-deep-
|
|
13
|
+
//# sourceMappingURL=doctor-deep-UHFL3AE4.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAllAdapters,
|
|
3
3
|
probeAllClis
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-RUN6KRCP.js";
|
|
5
|
+
import "./chunk-QGXA25PQ.js";
|
|
6
|
+
import "./chunk-65DZ7WHY.js";
|
|
7
|
+
import "./chunk-OPH5S776.js";
|
|
8
8
|
import "./chunk-SNJNRDKZ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SPZOZGBS.js";
|
|
10
10
|
import "./chunk-QZUG667L.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-PZSPL5KN.js";
|
|
12
|
+
import "./chunk-4OSPP2KN.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveClassGuardMs
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U4LM5Q2L.js";
|
|
16
16
|
import "./chunk-2HUC6NZN.js";
|
|
17
17
|
import "./chunk-OQLFRJCW.js";
|
|
18
18
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -146,4 +146,4 @@ export {
|
|
|
146
146
|
formatLiveReadiness,
|
|
147
147
|
runLiveReadiness
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=doctor-live-
|
|
149
|
+
//# sourceMappingURL=doctor-live-2CGAFGFG.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
shutdownExpertBridge,
|
|
4
4
|
tokenSplitFromUsage,
|
|
5
5
|
totalTokensFromUsage
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-QTP4AIVR.js";
|
|
7
|
+
import "./chunk-SPZOZGBS.js";
|
|
8
|
+
import "./chunk-U4LM5Q2L.js";
|
|
9
9
|
import "./chunk-2HUC6NZN.js";
|
|
10
10
|
import "./chunk-OQLFRJCW.js";
|
|
11
11
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
tokenSplitFromUsage,
|
|
16
16
|
totalTokensFromUsage
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=expert-bridge-
|
|
18
|
+
//# sourceMappingURL=expert-bridge-KTKJTMMO.js.map
|