nexus-agents 2.83.0 → 2.84.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-XVPIO5HV.js → child-mcp-config-VSGPMVLL.js} +3 -3
- package/dist/{chunk-5T6SYCH2.js → chunk-2PKAWFEU.js} +3 -2
- package/dist/chunk-2PKAWFEU.js.map +1 -0
- package/dist/{chunk-I2HMWH4R.js → chunk-2WCYG75B.js} +13 -2
- package/dist/chunk-2WCYG75B.js.map +1 -0
- package/dist/{chunk-PMLVZXAE.js → chunk-3PFESR6I.js} +1864 -1633
- package/dist/chunk-3PFESR6I.js.map +1 -0
- package/dist/{chunk-54UXPJVM.js → chunk-4IXQ6IXI.js} +2 -2
- package/dist/{chunk-FI77TGBY.js → chunk-5LFUZ5IC.js} +2 -2
- package/dist/{chunk-633WH2ML.js → chunk-6T3EPABN.js} +1 -1
- package/dist/chunk-6T3EPABN.js.map +1 -0
- package/dist/{chunk-ZM5JKJHI.js → chunk-BX3MUA26.js} +2 -2
- package/dist/{chunk-3ASED5PR.js → chunk-CJHIKBWI.js} +4 -4
- package/dist/{chunk-Z64MSLEK.js → chunk-D5BKSM6H.js} +2 -2
- package/dist/{chunk-3WUVWZUC.js → chunk-GBGMTN7O.js} +2 -2
- package/dist/{chunk-RXVH52UI.js → chunk-HLNMWGW3.js} +27 -4
- package/dist/chunk-HLNMWGW3.js.map +1 -0
- package/dist/{chunk-3GJAAENS.js → chunk-I3O5WOGW.js} +4 -4
- package/dist/{chunk-AFPHR72D.js → chunk-KK2RZVPU.js} +2 -2
- package/dist/{chunk-PPBZQKRP.js → chunk-KRRBRT7B.js} +6 -6
- package/dist/{chunk-YO27YAEX.js → chunk-KVYQOOML.js} +8 -24
- package/dist/chunk-KVYQOOML.js.map +1 -0
- package/dist/{chunk-BZUEUD4G.js → chunk-MBD5EJBO.js} +3 -3
- package/dist/{chunk-FHGDJKCZ.js → chunk-OE7OL2BE.js} +155 -47
- package/dist/chunk-OE7OL2BE.js.map +1 -0
- package/dist/{chunk-WJFUTRHX.js → chunk-OROUYVUX.js} +2 -2
- package/dist/{chunk-RVRXKNND.js → chunk-QIRZSDJK.js} +2 -2
- package/dist/{chunk-L362KRSU.js → chunk-REH5BB67.js} +78 -63
- package/dist/chunk-REH5BB67.js.map +1 -0
- package/dist/{chunk-NLPMYBIV.js → chunk-RZVEVT3M.js} +7 -7
- package/dist/{chunk-WGSRH5EQ.js → chunk-T6B6CKU6.js} +4 -4
- package/dist/chunk-T6B6CKU6.js.map +1 -0
- package/dist/{chunk-Q6PZMGLU.js → chunk-UJMIGLZI.js} +2 -2
- package/dist/{chunk-ZIWEEVMI.js → chunk-V35FWPHD.js} +2 -2
- package/dist/{chunk-4BXQ2OZY.js → chunk-V7RC2PIY.js} +20 -38
- package/dist/chunk-V7RC2PIY.js.map +1 -0
- package/dist/{chunk-AINOJRZX.js → chunk-VQIWH6X4.js} +9 -9
- package/dist/{chunk-2W4QJ27D.js → chunk-VXHDZULO.js} +3 -3
- package/dist/{chunk-U6LDVJS7.js → chunk-XK523BNC.js} +2 -2
- package/dist/chunk-YVG32OQF.js +27 -0
- package/dist/chunk-YVG32OQF.js.map +1 -0
- package/dist/{chunk-6WDJ3IE4.js → chunk-ZJGCOJC6.js} +4 -4
- package/dist/{cli-circuit-breaker-Y26NPPNO.js → cli-circuit-breaker-6EQKYNAA.js} +5 -5
- package/dist/cli.js +37 -34
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-X2ZYIEHH.js → composite-router-SA4XHXA3.js} +3 -3
- package/dist/consensus-vote-QKUHNHS4.js +31 -0
- package/dist/context-retriever-XX4TQBIB.js +19 -0
- package/dist/{doctor-deep-2E2GBMYR.js → doctor-deep-NB7IDWJE.js} +4 -4
- package/dist/expert-bridge-4MHM77VW.js +13 -0
- package/dist/{factory-STNVY3Y3.js → factory-FKOPQXRS.js} +6 -5
- package/dist/factory-UHH4ZZ64.js +14 -0
- package/dist/index.d.ts +114 -149
- package/dist/index.js +63 -128
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-6LVZ4CAQ.js → init-opencode-AVYAC33Q.js} +6 -6
- package/dist/issue-triage-7PYND7PY.js +15 -0
- package/dist/{learning-persistence-NX2KHL5T.js → learning-persistence-5ALG6XRC.js} +2 -2
- package/dist/{registry-command-P5VIAEOL.js → registry-command-7SFNZRG5.js} +3 -3
- package/dist/{repo-security-plan-RHSLO7H6.js → repo-security-plan-MTVL5B73.js} +4 -4
- package/dist/{research-helpers-synthesize-PVP6JRZV.js → research-helpers-synthesize-6CJ5P4WL.js} +4 -4
- package/dist/{routing-memory-QRIJPRVD.js → routing-memory-Y577PXFP.js} +3 -3
- package/dist/{session-memory-WARRGYY7.js → session-memory-6YFGMEMP.js} +4 -4
- package/dist/{setup-command-GMP5FI7F.js → setup-command-YBTD6D53.js} +13 -12
- package/dist/setup-config-BQYLUJHY.js +10 -0
- package/dist/{setup-custom-api-B63X7ISD.js → setup-custom-api-ZB7LOQC5.js} +5 -5
- package/dist/{tool-memory-E7JW4YLT.js → tool-memory-GFYQFRQI.js} +7 -6
- package/dist/{weather-report-RACZWJQL.js → weather-report-CN6WPJI4.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-4BXQ2OZY.js.map +0 -1
- package/dist/chunk-5T6SYCH2.js.map +0 -1
- package/dist/chunk-633WH2ML.js.map +0 -1
- package/dist/chunk-FHGDJKCZ.js.map +0 -1
- package/dist/chunk-I2HMWH4R.js.map +0 -1
- package/dist/chunk-L362KRSU.js.map +0 -1
- package/dist/chunk-PMLVZXAE.js.map +0 -1
- package/dist/chunk-RXVH52UI.js.map +0 -1
- package/dist/chunk-WGSRH5EQ.js.map +0 -1
- package/dist/chunk-YO27YAEX.js.map +0 -1
- package/dist/consensus-vote-KZ6UURUI.js +0 -30
- package/dist/context-retriever-QY4FNTDZ.js +0 -18
- package/dist/expert-bridge-FHPWDFJX.js +0 -13
- package/dist/factory-W6KROBFN.js +0 -14
- package/dist/issue-triage-Y77JI7WF.js +0 -15
- package/dist/setup-config-G3KKZM7O.js +0 -10
- /package/dist/{child-mcp-config-XVPIO5HV.js.map → child-mcp-config-VSGPMVLL.js.map} +0 -0
- /package/dist/{chunk-54UXPJVM.js.map → chunk-4IXQ6IXI.js.map} +0 -0
- /package/dist/{chunk-FI77TGBY.js.map → chunk-5LFUZ5IC.js.map} +0 -0
- /package/dist/{chunk-ZM5JKJHI.js.map → chunk-BX3MUA26.js.map} +0 -0
- /package/dist/{chunk-3ASED5PR.js.map → chunk-CJHIKBWI.js.map} +0 -0
- /package/dist/{chunk-Z64MSLEK.js.map → chunk-D5BKSM6H.js.map} +0 -0
- /package/dist/{chunk-3WUVWZUC.js.map → chunk-GBGMTN7O.js.map} +0 -0
- /package/dist/{chunk-3GJAAENS.js.map → chunk-I3O5WOGW.js.map} +0 -0
- /package/dist/{chunk-AFPHR72D.js.map → chunk-KK2RZVPU.js.map} +0 -0
- /package/dist/{chunk-PPBZQKRP.js.map → chunk-KRRBRT7B.js.map} +0 -0
- /package/dist/{chunk-BZUEUD4G.js.map → chunk-MBD5EJBO.js.map} +0 -0
- /package/dist/{chunk-WJFUTRHX.js.map → chunk-OROUYVUX.js.map} +0 -0
- /package/dist/{chunk-RVRXKNND.js.map → chunk-QIRZSDJK.js.map} +0 -0
- /package/dist/{chunk-NLPMYBIV.js.map → chunk-RZVEVT3M.js.map} +0 -0
- /package/dist/{chunk-Q6PZMGLU.js.map → chunk-UJMIGLZI.js.map} +0 -0
- /package/dist/{chunk-ZIWEEVMI.js.map → chunk-V35FWPHD.js.map} +0 -0
- /package/dist/{chunk-AINOJRZX.js.map → chunk-VQIWH6X4.js.map} +0 -0
- /package/dist/{chunk-2W4QJ27D.js.map → chunk-VXHDZULO.js.map} +0 -0
- /package/dist/{chunk-U6LDVJS7.js.map → chunk-XK523BNC.js.map} +0 -0
- /package/dist/{chunk-6WDJ3IE4.js.map → chunk-ZJGCOJC6.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-Y26NPPNO.js.map → cli-circuit-breaker-6EQKYNAA.js.map} +0 -0
- /package/dist/{composite-router-X2ZYIEHH.js.map → composite-router-SA4XHXA3.js.map} +0 -0
- /package/dist/{consensus-vote-KZ6UURUI.js.map → consensus-vote-QKUHNHS4.js.map} +0 -0
- /package/dist/{context-retriever-QY4FNTDZ.js.map → context-retriever-XX4TQBIB.js.map} +0 -0
- /package/dist/{doctor-deep-2E2GBMYR.js.map → doctor-deep-NB7IDWJE.js.map} +0 -0
- /package/dist/{expert-bridge-FHPWDFJX.js.map → expert-bridge-4MHM77VW.js.map} +0 -0
- /package/dist/{factory-STNVY3Y3.js.map → factory-FKOPQXRS.js.map} +0 -0
- /package/dist/{factory-W6KROBFN.js.map → factory-UHH4ZZ64.js.map} +0 -0
- /package/dist/{init-opencode-6LVZ4CAQ.js.map → init-opencode-AVYAC33Q.js.map} +0 -0
- /package/dist/{issue-triage-Y77JI7WF.js.map → issue-triage-7PYND7PY.js.map} +0 -0
- /package/dist/{learning-persistence-NX2KHL5T.js.map → learning-persistence-5ALG6XRC.js.map} +0 -0
- /package/dist/{registry-command-P5VIAEOL.js.map → registry-command-7SFNZRG5.js.map} +0 -0
- /package/dist/{repo-security-plan-RHSLO7H6.js.map → repo-security-plan-MTVL5B73.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-PVP6JRZV.js.map → research-helpers-synthesize-6CJ5P4WL.js.map} +0 -0
- /package/dist/{routing-memory-QRIJPRVD.js.map → routing-memory-Y577PXFP.js.map} +0 -0
- /package/dist/{session-memory-WARRGYY7.js.map → session-memory-6YFGMEMP.js.map} +0 -0
- /package/dist/{setup-command-GMP5FI7F.js.map → setup-command-YBTD6D53.js.map} +0 -0
- /package/dist/{setup-config-G3KKZM7O.js.map → setup-config-BQYLUJHY.js.map} +0 -0
- /package/dist/{setup-custom-api-B63X7ISD.js.map → setup-custom-api-ZB7LOQC5.js.map} +0 -0
- /package/dist/{tool-memory-E7JW4YLT.js.map → tool-memory-GFYQFRQI.js.map} +0 -0
- /package/dist/{weather-report-RACZWJQL.js.map → weather-report-CN6WPJI4.js.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getTokenEstimator,
|
|
11
11
|
isRateLimitLikeError,
|
|
12
12
|
ok
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HLNMWGW3.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-4IXQ6IXI.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
TASK_CATEGORIES,
|
|
3
3
|
getAdaptiveBonus,
|
|
4
4
|
getOutcomeStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HLNMWGW3.js";
|
|
6
6
|
|
|
7
7
|
// src/cli/doctor-deep.ts
|
|
8
8
|
var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
runDeepDiagnostics,
|
|
107
107
|
formatDeepDiagnostics
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-5LFUZ5IC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/text-utils.ts"],"sourcesContent":["/**\n * nexus-agents/utils - Text Processing Utilities\n *\n * Shared utility functions for text tokenization and processing.\n * Consolidates duplicate code from multiple modules per ADR-0013.\n *\n * Used by:\n * - context/agentic-memory-extraction.ts\n * - context/adaptive-memory-helpers.ts\n * - cli-adapters/agreement-cascade-helpers.ts\n *\n * @module utils/text-utils\n * @see docs/adr/0013-memory-helpers-consolidation.md\n */\n\n// ============================================================================\n// Stopwords\n// ============================================================================\n\n/**\n * Common English stopwords to filter from keyword extraction.\n */\nexport const STOPWORDS = new Set([\n 'a',\n 'an',\n 'and',\n 'are',\n 'as',\n 'at',\n 'be',\n 'by',\n 'for',\n 'from',\n 'has',\n 'he',\n 'in',\n 'is',\n 'it',\n 'its',\n 'of',\n 'on',\n 'or',\n 'that',\n 'the',\n 'to',\n 'was',\n 'were',\n 'will',\n 'with',\n 'this',\n 'but',\n 'they',\n 'have',\n 'had',\n 'what',\n 'when',\n 'where',\n 'who',\n 'which',\n 'why',\n 'how',\n 'all',\n 'each',\n 'every',\n 'both',\n 'few',\n 'more',\n 'most',\n 'other',\n 'some',\n 'such',\n 'no',\n 'nor',\n 'not',\n 'only',\n 'own',\n 'same',\n 'so',\n 'than',\n 'too',\n 'very',\n 'can',\n 'just',\n 'should',\n 'now',\n 'i',\n 'you',\n 'we',\n 'me',\n 'my',\n 'your',\n 'our',\n 'their',\n 'him',\n 'her',\n 'them',\n 'his',\n 'hers',\n 'able',\n]);\n\n// ============================================================================\n// Tokenization\n// ============================================================================\n\n/**\n * Tokenize text into normalized words.\n *\n * Process:\n * 1. Convert to lowercase\n * 2. Replace non-alphanumeric characters with spaces\n * 3. Split on whitespace\n * 4. Filter tokens by minimum length\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Array of normalized tokens\n */\nexport function tokenize(text: string, minLength = 2): string[] {\n return text\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, ' ')\n .split(/\\s+/)\n .filter((t) => t.length >= minLength);\n}\n\n/**\n * Tokenize text and return as a Set for fast lookups.\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Set of normalized tokens\n */\nexport function tokenizeToSet(text: string, minLength = 2): Set<string> {\n return new Set(tokenize(text, minLength));\n}\n\n/**\n * Tokenize text with stopword filtering.\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Array of tokens with stopwords removed\n */\nexport function tokenizeFiltered(text: string, minLength = 2): string[] {\n return tokenize(text, minLength).filter((t) => !STOPWORDS.has(t));\n}\n\n// ============================================================================\n// Value Stringification\n// ============================================================================\n\n/**\n * Convert a value to string for text processing.\n *\n * @param value - Value to stringify\n * @returns String representation\n */\nexport function stringifyValue(value: unknown): string {\n if (typeof value === 'string') return value;\n if (value === null || value === undefined) return '';\n return JSON.stringify(value);\n}\n\n// ============================================================================\n// String Capitalization\n// ============================================================================\n\n/**\n * Capitalize the first character of a string.\n *\n * @param str - Input string\n * @returns String with first character uppercased\n * @example capitalize('hello') // 'Hello'\n */\nexport function capitalize(str: string): string {\n if (str.length === 0) return str;\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n/**\n * Capitalize the first character of each word in a string.\n *\n * @param str - Input string\n * @returns String with each word capitalized\n * @example capitalizeWords('hello world') // 'Hello World'\n */\nexport function capitalizeWords(str: string): string {\n return str\n .split(' ')\n .map((word) => capitalize(word))\n .join(' ');\n}\n\n/**\n * Convert a kebab-case string to Title Case.\n *\n * @param str - Kebab-case string\n * @returns Title Case string with hyphens replaced by spaces\n * @example capitalizeKebab('hello-world') // 'Hello World'\n */\nexport function capitalizeKebab(str: string): string {\n return str\n .split('-')\n .map((word) => capitalize(word))\n .join(' ');\n}\n\n// ============================================================================\n// Text Truncation\n// ============================================================================\n\n/**\n * Truncate text to a maximum length with a suffix.\n *\n * @param text - Input text\n * @param maxLength - Maximum length including suffix\n * @param suffix - Suffix to append when truncated (default: '...')\n * @returns Truncated text with suffix if needed\n * @example truncateText('hello world', 8) // 'hello...'\n */\nexport function truncateText(text: string, maxLength: number, suffix = '...'): string {\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength - suffix.length) + suffix;\n}\n\n/**\n * Truncate text and include byte count information.\n * Commonly used for output truncation in CLI tools.\n *\n * @param text - Input text\n * @param maxLength - Maximum length before truncation marker\n * @returns Truncated text with byte count info\n * @example truncateWithInfo('hello world...', 5) // 'hello\\n... [truncated 9 bytes]'\n */\nexport function truncateWithInfo(text: string, maxLength: number): string {\n if (text.length <= maxLength) return text;\n const truncatedBytes = text.length - maxLength;\n return `${text.slice(0, maxLength)}\\n... [truncated ${String(truncatedBytes)} bytes]`;\n}\n\n/**\n * Truncate to the first sentence or a maximum length.\n * Useful for extracting descriptions from longer text.\n *\n * @param text - Input text\n * @param maxLength - Maximum length (default: 150)\n * @returns First sentence or truncated text\n * @example truncateSentence('Hello world. More text.', 150) // 'Hello world.'\n */\nexport function truncateSentence(text: string, maxLength = 150): string {\n // Find first sentence ending\n const sentenceEnd = text.search(/[.!?](?:\\s|$)/);\n if (sentenceEnd !== -1 && sentenceEnd < maxLength) {\n return text.slice(0, sentenceEnd + 1).trim();\n }\n // Fall back to truncation\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength).trim() + '...';\n}\n\n// ============================================================================\n// Line Splitting\n// ============================================================================\n\n/**\n * Split text into lines.\n * Handles both Unix (\\n) and Windows (\\r\\n) line endings.\n *\n * @param text - Input text to split\n * @returns Array of lines (may include empty strings)\n * @example splitLines('a\\nb\\nc') // ['a', 'b', 'c']\n * @example splitLines('a\\n\\nb') // ['a', '', 'b']\n */\nexport function splitLines(text: string): string[] {\n return text.split(/\\r?\\n/);\n}\n\n/**\n * Split text into non-empty lines.\n * Filters out empty lines and whitespace-only lines.\n *\n * @param text - Input text to split\n * @returns Array of non-empty lines\n * @example splitNonEmptyLines('a\\n\\nb\\n \\nc') // ['a', 'b', 'c']\n */\nexport function splitNonEmptyLines(text: string): string[] {\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n}\n\n/**\n * Split text into trimmed lines, preserving empty lines.\n * Trims each line but keeps empty lines in the output.\n *\n * @param text - Input text to split\n * @returns Array of trimmed lines\n * @example splitTrimmedLines(' a \\n\\n b ') // ['a', '', 'b']\n */\nexport function splitTrimmedLines(text: string): string[] {\n return text.split(/\\r?\\n/).map((line) => line.trim());\n}\n\n// ============================================================================\n// Sentence/Word Splitting\n// ============================================================================\n\n/**\n * Count the number of sentences in text.\n * Counts sentence-ending punctuation followed by space or end of string.\n *\n * @param text - Input text\n * @returns Number of sentences\n * @example countSentences('Hello world. How are you?') // 2\n */\nexport function countSentences(text: string): number {\n const matches = text.match(/[.!?]+(?:\\s|$)/g);\n return matches !== null ? matches.length : 0;\n}\n\n/**\n * Split text into sentences.\n * Splits on sentence-ending punctuation followed by space.\n *\n * @param text - Input text\n * @returns Array of sentences (trimmed)\n * @example splitSentences('Hello world. How are you?') // ['Hello world.', 'How are you?']\n */\nexport function splitSentences(text: string): string[] {\n // Split on sentence endings followed by space, keeping the punctuation\n return text\n .split(/(?<=[.!?])\\s+/)\n .map((s) => s.trim())\n .filter((s) => s.length > 0);\n}\n\n/**\n * Count the number of words in text.\n * Splits on whitespace and counts non-empty tokens.\n *\n * @param text - Input text\n * @returns Number of words\n * @example countWords('Hello world') // 2\n */\nexport function countWords(text: string): number {\n return text\n .trim()\n .split(/\\s+/)\n .filter((w) => w.length > 0).length;\n}\n"],"mappings":";AAsBO,IAAM,YAAY,oBAAI,IAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAmBM,SAAS,SAAS,MAAc,YAAY,GAAa;AAC9D,SAAO,KACJ,YAAY,EACZ,QAAQ,gBAAgB,GAAG,EAC3B,MAAM,KAAK,EACX,OAAO,CAAC,MAAM,EAAE,UAAU,SAAS;AACxC;AAoBO,SAAS,iBAAiB,MAAc,YAAY,GAAa;AACtE,SAAO,SAAS,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;AAClE;AAYO,SAAS,eAAe,OAAwB;AACrD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,KAAK,UAAU,KAAK;AAC7B;AAaO,SAAS,WAAW,KAAqB;AAC9C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AAClD;AASO,SAAS,gBAAgB,KAAqB;AACnD,SAAO,IACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAC9B,KAAK,GAAG;AACb;AASO,SAAS,gBAAgB,KAAqB;AACnD,SAAO,IACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAC9B,KAAK,GAAG;AACb;AA6BO,SAAS,iBAAiB,MAAc,WAA2B;AACxE,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,QAAM,iBAAiB,KAAK,SAAS;AACrC,SAAO,GAAG,KAAK,MAAM,GAAG,SAAS,CAAC;AAAA,iBAAoB,OAAO,cAAc,CAAC;AAC9E;AAWO,SAAS,iBAAiB,MAAc,YAAY,KAAa;AAEtE,QAAM,cAAc,KAAK,OAAO,eAAe;AAC/C,MAAI,gBAAgB,MAAM,cAAc,WAAW;AACjD,WAAO,KAAK,MAAM,GAAG,cAAc,CAAC,EAAE,KAAK;AAAA,EAC7C;AAEA,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,SAAO,KAAK,MAAM,GAAG,SAAS,EAAE,KAAK,IAAI;AAC3C;","names":[]}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
MCP_TIMEOUTS,
|
|
6
6
|
TEST_TIMEOUTS,
|
|
7
7
|
WORKFLOW_TIMEOUTS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HLNMWGW3.js";
|
|
9
9
|
|
|
10
10
|
// src/config/defaults-env.ts
|
|
11
11
|
function parseIntEnv(envKey, fallback) {
|
|
@@ -348,4 +348,4 @@ export {
|
|
|
348
348
|
CUSTOM_API_DEFAULT_MODEL,
|
|
349
349
|
DEFAULTS
|
|
350
350
|
};
|
|
351
|
-
//# sourceMappingURL=chunk-
|
|
351
|
+
//# sourceMappingURL=chunk-BX3MUA26.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveToken
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D5BKSM6H.js";
|
|
4
4
|
import {
|
|
5
5
|
GitHubProvider,
|
|
6
6
|
ScmError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-REH5BB67.js";
|
|
8
8
|
import {
|
|
9
9
|
err,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HLNMWGW3.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-CJHIKBWI.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createLogger,
|
|
3
3
|
err,
|
|
4
4
|
ok
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HLNMWGW3.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-D5BKSM6H.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_MODEL_PER_CLI,
|
|
3
3
|
getTimeProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HLNMWGW3.js";
|
|
5
5
|
|
|
6
6
|
// src/config/model-availability.ts
|
|
7
7
|
var DEFAULT_TTL_MS = 6e4;
|
|
@@ -133,4 +133,4 @@ export {
|
|
|
133
133
|
resetAvailabilityCache,
|
|
134
134
|
filterAvailableModels
|
|
135
135
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
136
|
+
//# sourceMappingURL=chunk-GBGMTN7O.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPersistenceEnabled,
|
|
3
3
|
nexusDataPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2WCYG75B.js";
|
|
5
5
|
import {
|
|
6
6
|
__require
|
|
7
7
|
} from "./chunk-PR4QN5HX.js";
|
|
@@ -10997,7 +10997,7 @@ var CompositeRouter = class _CompositeRouter {
|
|
|
10997
10997
|
*/
|
|
10998
10998
|
async consultUnifiedContext(task) {
|
|
10999
10999
|
try {
|
|
11000
|
-
const { getContextForTask, inferTaskCategory } = await import("./context-retriever-
|
|
11000
|
+
const { getContextForTask, inferTaskCategory } = await import("./context-retriever-XX4TQBIB.js");
|
|
11001
11001
|
const ctx = await getContextForTask({
|
|
11002
11002
|
task: task.content,
|
|
11003
11003
|
category: inferTaskCategory(task.content),
|
|
@@ -11953,6 +11953,23 @@ var RoutingMemory = class {
|
|
|
11953
11953
|
cacheHits = 0;
|
|
11954
11954
|
cacheMisses = 0;
|
|
11955
11955
|
recommendationsMade = 0;
|
|
11956
|
+
/**
|
|
11957
|
+
* Per-taskType cache of `getPreferences()` results (#2955 site 4).
|
|
11958
|
+
*
|
|
11959
|
+
* Pre-fix, every `getPreferences()` call did N=`CLI_NAMES.length`
|
|
11960
|
+
* MobiMem profile lookups followed by an in-place sort, on every
|
|
11961
|
+
* CompositeRouter `route()` invocation. With `enableRoutingMemory=true`
|
|
11962
|
+
* (default with persistence on), most calls produced empty results
|
|
11963
|
+
* after the N lookups — pure waste on the routing hot path.
|
|
11964
|
+
*
|
|
11965
|
+
* The cache stores the sorted preference array per taskType and is
|
|
11966
|
+
* invalidated by `storePreference(_, taskType, _)` writes. MobiMem
|
|
11967
|
+
* mutations performed by other RoutingMemory instances or prior
|
|
11968
|
+
* sessions are not detected; the cache is only correct within a
|
|
11969
|
+
* single instance's lifetime, which matches CompositeRouter's
|
|
11970
|
+
* usage pattern (singleton per process).
|
|
11971
|
+
*/
|
|
11972
|
+
preferencesCache = /* @__PURE__ */ new Map();
|
|
11956
11973
|
constructor(config, mobimem) {
|
|
11957
11974
|
this.config = { ...DEFAULT_ROUTING_MEMORY_CONFIG, ...config };
|
|
11958
11975
|
this.logger = this.config.logger ?? createLogger({ component: "RoutingMemory" });
|
|
@@ -11970,6 +11987,7 @@ var RoutingMemory = class {
|
|
|
11970
11987
|
performance: performance2,
|
|
11971
11988
|
updatedAt: getTimeProvider().nowIso()
|
|
11972
11989
|
});
|
|
11990
|
+
this.preferencesCache.delete(taskType);
|
|
11973
11991
|
this.logger.debug("Stored model preference", {
|
|
11974
11992
|
model,
|
|
11975
11993
|
taskType,
|
|
@@ -11978,6 +11996,8 @@ var RoutingMemory = class {
|
|
|
11978
11996
|
});
|
|
11979
11997
|
}
|
|
11980
11998
|
getPreferences(taskType) {
|
|
11999
|
+
const cached = this.preferencesCache.get(taskType);
|
|
12000
|
+
if (cached !== void 0) return cached;
|
|
11981
12001
|
const preferenceKey = `model_preference:${taskType}`;
|
|
11982
12002
|
const preferences = [];
|
|
11983
12003
|
for (const model of CLI_NAMES) {
|
|
@@ -11993,7 +12013,10 @@ var RoutingMemory = class {
|
|
|
11993
12013
|
});
|
|
11994
12014
|
}
|
|
11995
12015
|
}
|
|
11996
|
-
|
|
12016
|
+
preferences.sort((a, b) => b.strength - a.strength);
|
|
12017
|
+
const result = Object.freeze([...preferences]);
|
|
12018
|
+
this.preferencesCache.set(taskType, result);
|
|
12019
|
+
return result;
|
|
11997
12020
|
}
|
|
11998
12021
|
recordExperience(workflow, models, success, metrics2) {
|
|
11999
12022
|
const contextSignature = models.join("->");
|
|
@@ -12295,4 +12318,4 @@ export {
|
|
|
12295
12318
|
ParseError,
|
|
12296
12319
|
OrchestratorError
|
|
12297
12320
|
};
|
|
12298
|
-
//# sourceMappingURL=chunk-
|
|
12321
|
+
//# sourceMappingURL=chunk-HLNMWGW3.js.map
|