@happyvertical/smrt-core 0.51.37 → 0.51.38
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/agents/build-knowledge.md +25 -0
- package/agents/generators.md +27 -0
- package/dist/consumer-plugin/artifact-publication.d.ts +2 -0
- package/dist/consumer-plugin/artifact-publication.d.ts.map +1 -1
- package/dist/consumer-plugin/artifact-publication.js +15 -1
- package/dist/consumer-plugin/artifact-publication.js.map +1 -1
- package/dist/consumer-plugin/index.d.ts.map +1 -1
- package/dist/consumer-plugin/index.js +3 -3
- package/dist/consumer-plugin/index.js.map +1 -1
- package/dist/generators/mcp-runtime-template.d.ts +17 -0
- package/dist/generators/mcp-runtime-template.d.ts.map +1 -1
- package/dist/generators/mcp-runtime-template.js +27 -19
- package/dist/generators/mcp-runtime-template.js.map +1 -1
- package/dist/generators/mcp-tool-name.d.ts +17 -0
- package/dist/generators/mcp-tool-name.d.ts.map +1 -0
- package/dist/generators/mcp-tool-name.js +33 -0
- package/dist/generators/mcp-tool-name.js.map +1 -0
- package/dist/generators/mcp.d.ts +46 -1
- package/dist/generators/mcp.d.ts.map +1 -1
- package/dist/generators/mcp.js +105 -53
- package/dist/generators/mcp.js.map +1 -1
- package/dist/generators/tool-schema.d.ts +6 -0
- package/dist/generators/tool-schema.d.ts.map +1 -1
- package/dist/generators/tool-schema.js +8 -3
- package/dist/generators/tool-schema.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/knowledge.d.ts +2 -0
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +3 -1
- package/dist/knowledge.js.map +1 -1
- package/dist/manifest/discover-base-classes.js +2 -2
- package/dist/manifest/discover-base-classes.js.map +1 -1
- package/dist/manifest/discover-smrt-packages.d.ts.map +1 -1
- package/dist/manifest/discover-smrt-packages.js +3 -2
- package/dist/manifest/discover-smrt-packages.js.map +1 -1
- package/dist/manifest/generator.d.ts +7 -0
- package/dist/manifest/generator.d.ts.map +1 -1
- package/dist/manifest/generator.js +30 -15
- package/dist/manifest/generator.js.map +1 -1
- package/dist/manifest/manager.d.ts.map +1 -1
- package/dist/manifest/manager.js +6 -2
- package/dist/manifest/manager.js.map +1 -1
- package/dist/manifest/static-manifest.js +1 -1
- package/dist/manifest/static-manifest.js.map +1 -1
- package/dist/manifest/store.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/node_modules/.pnpm/{brace-expansion@5.0.9 → brace-expansion@5.0.11}/node_modules/brace-expansion/dist/esm/index.js +32 -19
- package/dist/node_modules/.pnpm/brace-expansion@5.0.11/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
- package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js +1 -1
- package/dist/scanner/types.d.ts +2 -0
- package/dist/scanner/types.d.ts.map +1 -1
- package/dist/scanner/types.js.map +1 -1
- package/dist/scripts/generate-manifest.js +44 -44
- package/dist/scripts/generate-test-manifest.js +49 -2
- package/dist/smrt-knowledge.json +7 -7
- package/dist/vite-plugin/index.d.ts.map +1 -1
- package/dist/vite-plugin/index.js +16 -6
- package/dist/vite-plugin/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/node_modules/.pnpm/brace-expansion@5.0.9/node_modules/brace-expansion/dist/esm/index.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { balanced } from "../../../../../balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/brace-expansion@5.0.
|
|
2
|
+
//#region ../../node_modules/.pnpm/brace-expansion@5.0.11/node_modules/brace-expansion/dist/esm/index.js
|
|
3
3
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
4
4
|
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
5
5
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
@@ -17,6 +17,7 @@ var commaPattern = /\\,/g;
|
|
|
17
17
|
var periodPattern = /\\\./g;
|
|
18
18
|
var EXPANSION_MAX = 1e5;
|
|
19
19
|
var EXPANSION_MAX_LENGTH = 4e6;
|
|
20
|
+
var EXPANSION_MAX_DEPTH = 1e3;
|
|
20
21
|
function numeric(str) {
|
|
21
22
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
22
23
|
}
|
|
@@ -26,32 +27,43 @@ function escapeBraces(str) {
|
|
|
26
27
|
function unescapeBraces(str) {
|
|
27
28
|
return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
|
|
28
29
|
}
|
|
30
|
+
function pushAll(target, items) {
|
|
31
|
+
for (let i = 0; i < items.length; i++) target.push(items[i]);
|
|
32
|
+
}
|
|
29
33
|
/**
|
|
30
34
|
* Basically just str.split(","), but handling cases
|
|
31
35
|
* where we have nested braced sections, which should be
|
|
32
36
|
* treated as individual members, like {a,{b,c},d}
|
|
33
37
|
*/
|
|
34
38
|
function parseCommaParts(str) {
|
|
35
|
-
if (!str) return [""];
|
|
36
39
|
const parts = [];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
let carry = "";
|
|
41
|
+
for (;;) {
|
|
42
|
+
const m = balanced("{", "}", str);
|
|
43
|
+
if (!m) {
|
|
44
|
+
const tail = str.split(",");
|
|
45
|
+
tail[0] = carry + tail[0];
|
|
46
|
+
pushAll(parts, tail);
|
|
47
|
+
return parts;
|
|
48
|
+
}
|
|
49
|
+
const { pre, body, post } = m;
|
|
50
|
+
const p = pre.split(",");
|
|
51
|
+
p[0] = carry + p[0];
|
|
52
|
+
p[p.length - 1] += "{" + body + "}";
|
|
53
|
+
if (!post.length) {
|
|
54
|
+
pushAll(parts, p);
|
|
55
|
+
return parts;
|
|
56
|
+
}
|
|
57
|
+
carry = p.pop();
|
|
58
|
+
pushAll(parts, p);
|
|
59
|
+
str = post;
|
|
46
60
|
}
|
|
47
|
-
parts.push.apply(parts, p);
|
|
48
|
-
return parts;
|
|
49
61
|
}
|
|
50
62
|
function expand(str, options = {}) {
|
|
51
63
|
if (!str) return [];
|
|
52
|
-
const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options;
|
|
64
|
+
const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH } = options;
|
|
53
65
|
if (str.slice(0, 2) === "{}") str = "\\{\\}" + str.slice(2);
|
|
54
|
-
return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
|
|
66
|
+
return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, true).map(unescapeBraces);
|
|
55
67
|
}
|
|
56
68
|
function embrace(str) {
|
|
57
69
|
return "{" + str + "}";
|
|
@@ -117,7 +129,8 @@ function expandSequence(body, isAlphaSequence, max, maxLength) {
|
|
|
117
129
|
}
|
|
118
130
|
return N;
|
|
119
131
|
}
|
|
120
|
-
function expand_(str, max, maxLength, isTop) {
|
|
132
|
+
function expand_(str, max, maxLength, maxDepth, depth, isTop) {
|
|
133
|
+
if (depth > maxDepth) return [str];
|
|
121
134
|
let acc = [""];
|
|
122
135
|
let dropEmpties = false;
|
|
123
136
|
let firstGroup = true;
|
|
@@ -153,7 +166,7 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
153
166
|
else {
|
|
154
167
|
let n = parseCommaParts(m.body);
|
|
155
168
|
if (n.length === 1 && n[0] !== void 0) {
|
|
156
|
-
n = expand_(n[0], max, maxLength, false).map(embrace);
|
|
169
|
+
n = expand_(n[0], max, maxLength, maxDepth, depth + 1, false).map(embrace);
|
|
157
170
|
/* c8 ignore start */
|
|
158
171
|
if (n.length === 1) {
|
|
159
172
|
acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
|
|
@@ -167,7 +180,7 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
167
180
|
values = [];
|
|
168
181
|
let valuesLength = 0;
|
|
169
182
|
outer: for (let j = 0; j < n.length; j++) {
|
|
170
|
-
const expanded = expand_(n[j], max, maxLength, false);
|
|
183
|
+
const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, false);
|
|
171
184
|
for (let k = 0; k < expanded.length; k++) {
|
|
172
185
|
const v = expanded[k];
|
|
173
186
|
if (dropsEmpties && !v) continue;
|
|
@@ -184,6 +197,6 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
184
197
|
return acc;
|
|
185
198
|
}
|
|
186
199
|
//#endregion
|
|
187
|
-
export { EXPANSION_MAX, EXPANSION_MAX_LENGTH, expand };
|
|
200
|
+
export { EXPANSION_MAX, EXPANSION_MAX_DEPTH, EXPANSION_MAX_LENGTH, expand };
|
|
188
201
|
|
|
189
202
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/brace-expansion@5.0.11/node_modules/brace-expansion/dist/esm/index.js"],"sourcesContent":["import { balanced } from 'balanced-match';\nconst escSlash = '\\0SLASH' + Math.random() + '\\0';\nconst escOpen = '\\0OPEN' + Math.random() + '\\0';\nconst escClose = '\\0CLOSE' + Math.random() + '\\0';\nconst escComma = '\\0COMMA' + Math.random() + '\\0';\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0';\nconst escSlashPattern = new RegExp(escSlash, 'g');\nconst escOpenPattern = new RegExp(escOpen, 'g');\nconst escClosePattern = new RegExp(escClose, 'g');\nconst escCommaPattern = new RegExp(escComma, 'g');\nconst escPeriodPattern = new RegExp(escPeriod, 'g');\nconst slashPattern = /\\\\\\\\/g;\nconst openPattern = /\\\\{/g;\nconst closePattern = /\\\\}/g;\nconst commaPattern = /\\\\,/g;\nconst periodPattern = /\\\\\\./g;\nexport const EXPANSION_MAX = 100_000;\n// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An\n// input like `'{a,b}'.repeat(1500)` stays under that count - its output is\n// truncated to 100k results - while making every result ~1500 characters\n// long. The result set, and the intermediate arrays built while combining\n// brace sets, then grow large enough to exhaust memory and crash the process\n// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of\n// characters the accumulator may hold at any point, so memory stays flat no\n// matter how many brace groups are chained. The limit sits well above any\n// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M\n// characters) so legitimate input is unaffected.\nexport const EXPANSION_MAX_LENGTH = 4_000_000;\n// `expand_` recurses once per level of brace *nesting* - both when expanding a\n// set's comma members and when re-wrapping a set whose body is a single part.\n// The CVE-2026-14257 fix made the *tail* iterative (recursion on `m.post`, one\n// level per chained group), which left nesting depth unbounded: about 3,100\n// levels of `{{{...a,b...}}}` - only ~6KB of input - exhausted the native stack\n// and crashed the process. `EXPANSION_MAX_DEPTH` bounds how deep the parser\n// will follow nesting. It sits far above any realistic pattern and well below\n// the depth at which the stack runs out.\nexport const EXPANSION_MAX_DEPTH = 1_000;\nfunction numeric(str) {\n return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);\n}\nfunction escapeBraces(str) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod);\n}\nfunction unescapeBraces(str) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.');\n}\n// Like `target.push(...items)` but doesn't overflow the stack\nfunction pushAll(target, items) {\n for (let i = 0; i < items.length; i++) {\n target.push(items[i]);\n }\n}\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str) {\n const parts = [];\n // Walk the brace groups iteratively. Recursing on `post` once per group let a\n // chain of them exhaust the stack - the parsing-side counterpart to\n // the `expand_` overflow fixed for CVE-2026-14257, and not something `max` or\n // `maxLength` can bound, since it happens before expansion.\n //\n // The part the next chunk continues\n let carry = '';\n for (;;) {\n const m = balanced('{', '}', str);\n if (!m) {\n const tail = str.split(',');\n tail[0] = carry + tail[0];\n pushAll(parts, tail);\n return parts;\n }\n const { pre, body, post } = m;\n const p = pre.split(',');\n p[0] = carry + p[0];\n p[p.length - 1] += '{' + body + '}';\n if (!post.length) {\n pushAll(parts, p);\n return parts;\n }\n carry = p.pop();\n pushAll(parts, p);\n str = post;\n }\n}\nexport function expand(str, options = {}) {\n if (!str) {\n return [];\n }\n const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH, } = options;\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2);\n }\n return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, true).map(unescapeBraces);\n}\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n// Build `{ acc[a] + pre + values[v] }` for every combination, capping the\n// number of results at `max` and the total number of characters at `maxLength`.\n// This is the one place output grows, so bounding it here keeps the single\n// accumulator - and therefore memory - flat regardless of how many brace groups\n// are combined (CVE-2026-14257).\nfunction combine(acc, pre, values, max, maxLength, dropEmpties) {\n const out = [];\n let length = 0;\n for (let a = 0; a < acc.length; a++) {\n for (let v = 0; v < values.length; v++) {\n if (out.length >= max)\n return out;\n const expansion = acc[a] + pre + values[v];\n // Bash drops empty results at the top level. Skip them before they count\n // against `max`, so `max` bounds the number of *kept* results.\n if (dropEmpties && !expansion)\n continue;\n if (length + expansion.length > maxLength)\n return out;\n out.push(expansion);\n length += expansion.length;\n }\n }\n return out;\n}\n// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`)\n// sequence body.\nfunction expandSequence(body, isAlphaSequence, max, maxLength) {\n const n = body.split(/\\.\\./);\n const N = [];\n // A sequence body always splits into two or three parts, but the compiler\n // can't know that.\n /* c8 ignore start */\n if (n[0] === undefined || n[1] === undefined) {\n return N;\n }\n /* c8 ignore stop */\n const x = numeric(n[0]);\n const y = numeric(n[1]);\n const width = Math.max(n[0].length, n[1].length);\n let incr = n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1;\n let test = lte;\n const reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n const pad = n.some(isPadded);\n let length = 0;\n for (let i = x; test(i, y) && N.length < max; i += incr) {\n let c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\') {\n c = '';\n }\n }\n else {\n c = String(i);\n if (pad) {\n const need = width - c.length;\n if (need > 0) {\n const z = new Array(need + 1).join('0');\n if (i < 0) {\n c = '-' + z + c.slice(1);\n }\n else {\n c = z + c;\n }\n }\n }\n }\n if (length + c.length > maxLength)\n break;\n N.push(c);\n length += c.length;\n }\n return N;\n}\nfunction expand_(str, max, maxLength, maxDepth, depth, isTop) {\n // Too deeply nested to keep following: treat the rest as literal, the same\n // way a group that cannot expand is already handled. Truncating rather than\n // throwing keeps `expand` total, matching `max` and `maxLength`.\n if (depth > maxDepth) {\n return [str];\n }\n // Consume the string's top-level brace groups left to right, threading a\n // running set of combined prefixes (`acc`). Expanding the tail iteratively -\n // rather than recursing on `m.post` once per group - keeps the native stack\n // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no\n // longer overflow the stack, and leaves a single accumulator whose size\n // `maxLength` bounds directly (CVE-2026-14257).\n let acc = [''];\n // Bash drops empty results, but only when the *first* top-level group is a\n // comma set - a sequence like `{a..\\}` may legitimately yield ''. The drop\n // is on the final strings, so it is applied to whichever `combine` produces\n // them (the one with no brace set left in the tail).\n let dropEmpties = false;\n let firstGroup = true;\n for (;;) {\n const m = balanced('{', '}', str);\n // No brace set left: the rest of the string is literal.\n if (!m) {\n return combine(acc, str, [''], max, maxLength, dropEmpties);\n }\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre;\n if (/\\$$/.test(pre)) {\n acc = combine(acc, pre + '{' + m.body + '}', [''], max, maxLength, dropEmpties && !m.post.length);\n firstGroup = false;\n if (!m.post.length)\n break;\n str = m.post;\n continue;\n }\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n const isSequence = isNumericSequence || isAlphaSequence;\n const isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n isTop = true;\n continue;\n }\n // Nothing here expands, so the whole remaining string is literal.\n return combine(acc, pre + '{' + m.body + '}' + m.post, [''], max, maxLength, dropEmpties);\n }\n if (firstGroup) {\n dropEmpties = isTop && !isSequence;\n firstGroup = false;\n }\n let values;\n if (isSequence) {\n values = expandSequence(m.body, isAlphaSequence, max, maxLength);\n }\n else {\n let n = parseCommaParts(m.body);\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, maxLength, maxDepth, depth + 1, false).map(embrace);\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n acc = combine(acc, pre + n[0], [''], max, maxLength, dropEmpties && !m.post.length);\n if (!m.post.length)\n break;\n str = m.post;\n continue;\n }\n /* c8 ignore stop */\n }\n // Values that `combine` is going to drop as empty produce no result, so\n // they must not count against `max` - otherwise `{a,,b}` with `max: 2`\n // would stop at `['a', '']` and yield one result instead of two. Skipping\n // them outright keeps `values` bounded while leaving `max` a bound on\n // *kept* results.\n let dropsEmpties = dropEmpties && !m.post.length && !pre;\n for (let d = 0; dropsEmpties && d < acc.length; d++) {\n if (acc[d]) {\n dropsEmpties = false;\n }\n }\n values = [];\n let valuesLength = 0;\n outer: for (let j = 0; j < n.length; j++) {\n const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, false);\n for (let k = 0; k < expanded.length; k++) {\n const v = expanded[k];\n if (dropsEmpties && !v)\n continue;\n if (values.length >= max ||\n valuesLength + v.length > maxLength) {\n break outer;\n }\n values.push(v);\n valuesLength += v.length;\n }\n }\n }\n acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);\n if (!m.post.length)\n break;\n str = m.post;\n }\n return acc;\n}\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAM,WAAW,YAAY,KAAK,OAAO,IAAI;AAC7C,IAAM,UAAU,WAAW,KAAK,OAAO,IAAI;AAC3C,IAAM,WAAW,YAAY,KAAK,OAAO,IAAI;AAC7C,IAAM,WAAW,YAAY,KAAK,OAAO,IAAI;AAC7C,IAAM,YAAY,aAAa,KAAK,OAAO,IAAI;AAC/C,IAAM,kBAAkB,IAAI,OAAO,UAAU,GAAG;AAChD,IAAM,iBAAiB,IAAI,OAAO,SAAS,GAAG;AAC9C,IAAM,kBAAkB,IAAI,OAAO,UAAU,GAAG;AAChD,IAAM,kBAAkB,IAAI,OAAO,UAAU,GAAG;AAChD,IAAM,mBAAmB,IAAI,OAAO,WAAW,GAAG;AAClD,IAAM,eAAe;AACrB,IAAM,cAAc;AACpB,IAAM,eAAe;AACrB,IAAM,eAAe;AACrB,IAAM,gBAAgB;AACtB,IAAa,gBAAgB;AAW7B,IAAa,uBAAuB;AASpC,IAAa,sBAAsB;AACnC,SAAS,QAAQ,KAAK;CAClB,OAAO,CAAC,MAAM,GAAG,IAAI,SAAS,KAAK,EAAE,IAAI,IAAI,WAAW,CAA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,KAAK;IACtC,MAAM,WAAW,QAAQ,EAAE,IAAI,KAAK,WAAW,UAAU,QAAQ,GAAG,KAAK;IACzE,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;KACtC,MAAM,IAAI,SAAS;KACnB,IAAI,gBAAgB,CAAC,GACjB;KACJ,IAAI,OAAO,UAAU,OACjB,eAAe,EAAE,SAAS,WAC1B,MAAM;KAEV,OAAO,KAAK,CAAC;KACb,gBAAgB,EAAE;IACtB;GACJ;EACJ;EACA,MAAM,QAAQ,KAAK,KAAK,QAAQ,KAAK,WAAW,eAAe,CAAC,EAAE,KAAK,MAAM;EAC7E,IAAI,CAAC,EAAE,KAAK,QACR;EACJ,MAAM,EAAE;CACZ;CACA,OAAO;AACX"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { expand } from "../../../../../brace-expansion@5.0.
|
|
1
|
+
import { expand } from "../../../../../brace-expansion@5.0.11/node_modules/brace-expansion/dist/esm/index.js";
|
|
2
2
|
import { assertValidPattern } from "./assert-valid-pattern.js";
|
|
3
3
|
import { unescape } from "./unescape.js";
|
|
4
4
|
import { AST } from "./ast.js";
|
package/dist/scanner/types.d.ts
CHANGED
|
@@ -511,6 +511,8 @@ export interface SmartObjectManifest {
|
|
|
511
511
|
* Key is string for backward compatibility, but should be QualifiedClassName format.
|
|
512
512
|
*/
|
|
513
513
|
objects: Record<string, SmartObjectDefinition>;
|
|
514
|
+
/** Test artifacts must not become dependency providers during discovery. */
|
|
515
|
+
artifactPurpose?: 'runtime' | 'test';
|
|
514
516
|
moduleType?: string;
|
|
515
517
|
smrtDependencies?: string[];
|
|
516
518
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scanner/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,kBAA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IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,MAAM,EAAE,KAAK,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,WAAW;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/scanner/types.ts"],"sourcesContent":["/**\n * Type definitions for AST scanning and manifest generation\n */\n\nimport type { SmartObjectConfig } from '../registry.js';\n\n/**\n * Qualified class name in format \"@package/name:ClassName\"\n * Example: \"@happyvertical/smrt-core:Product\"\n */\nexport type QualifiedClassName = `${string}:${string}`;\n\n/**\n * Static per-field UI hints authored via `@field({ ui })` (#2046).\n *\n * A pure presentation seed for the field-policy rail (epic #2045): it rides the\n * manifest under the field's `_meta.ui` (never promoted to a top-level\n * `FieldDefinition` key), reaches runtime at `field._meta.ui` via\n * `ObjectRegistry.getAllFields()`, and is emitted to the browser in generated\n * web-collection definitions. It has NO schema, persistence, or security\n * effect — `sensitive`/`readPermission` remain the security rail.\n */\nexport interface FieldUIHints {\n /**\n * Seed the field into the \"basic\" visibility tier (shown before the\n * advanced disclosure). Unmarked fields default per the cold-start rule:\n * an object with no basic markers renders everything basic; once any field\n * is marked, unmarked fields default to advanced.\n */\n basic?: boolean;\n /** Grouping key for form section/grouping (consumer-defined label). */\n group?: string;\n /** Relative sort order within the form/group (ascending). */\n order?: number;\n /**\n * Seed the field's policy as locked: org/user policy tiers may not\n * override it unless an org admin explicitly unlocks it.\n */\n locked?: boolean;\n}\n\n/**\n * Structured metadata attached to a field definition under `_meta`.\n *\n * Captures the field-helper options the scanner and schema/manifest\n * generators read off a field (`sqlType`, `nullable`, `__tenancy`, …). The\n * index signature keeps the bag open for forward-compatible keys without\n * forcing every consumer through `any`.\n */\nexport interface FieldMeta {\n /** Explicit SQL type override (e.g. 'UUID') applied during schema generation. */\n sqlType?: string;\n /** Storage type for cross-package reference ids ('text' forces TEXT). */\n idType?: 'uuid' | 'text';\n /** When true, the column is nullable regardless of `required`. */\n nullable?: boolean;\n /** Mirror of the field's required flag captured at registration. */\n required?: boolean;\n /** Default value carried in metadata for runtime-registry generation. */\n default?: unknown;\n /** Per-row SQL backfill for adding/tightening a required column (#3008). */\n backfill?: string;\n /** Marks the field as the primary key column. */\n primaryKey?: boolean;\n /** Marks the column as unique. */\n unique?: boolean;\n /** Column description carried into generated schema. */\n description?: string;\n /** Static per-field UI hints authored via `@field({ ui })` (#2046). */\n ui?: FieldUIHints;\n /** Opt-in column/JSON-path indexing flag. */\n indexed?: boolean;\n /** Foreign-key delete action carried in metadata. */\n onDelete?: 'CASCADE' | 'SET NULL' | 'RESTRICT' | 'NO ACTION';\n /** Configures physical DDL while retaining FK relationship metadata. */\n constraint?:\n | boolean\n | { engines: Array<'postgres' | 'sqlite' | 'duckdb' | 'json'> };\n /** Excludes the field from persistence when true. */\n transient?: boolean;\n /** Numeric/length validation bounds and pattern. */\n min?: number;\n max?: number;\n minLength?: number;\n maxLength?: number;\n /**\n * Validation regex. A string source, a `RegExp`, or — when a manifest was\n * JSON-serialized and a `RegExp` collapsed to `{}` — an opaque object. Read\n * sites must narrow before accessing `.source`.\n */\n pattern?: unknown;\n /** Tenancy metadata injected for tenant-scoped models. */\n __tenancy?: {\n isTenantIdField?: boolean;\n /** Populated by the tenancy beforeSave interceptor when enabled. */\n autoPopulate?: boolean;\n [key: string]: unknown;\n };\n /** Report-aggregate metadata injected by the report normalizer. */\n __report?: {\n kind?: string;\n [key: string]: unknown;\n };\n [key: string]: unknown;\n}\n\n/**\n * Controls how a class is exposed in manifests and across packages\n */\nexport type SmrtVisibility =\n | 'public' // Included in published manifest, available to all consumers\n | 'internal' // Package-only, excluded from published manifest\n | 'test'; // Test-only, never in any published manifest\n\nexport interface FieldDefinition {\n type:\n | 'text'\n | 'decimal'\n | 'boolean'\n | 'integer'\n | 'datetime'\n | 'json'\n | 'foreignKey'\n | 'crossPackageRef' // Cross-package reference — UUID id column by default, no DDL FK\n | 'oneToMany'\n | 'manyToMany'\n | 'meta'; // STI meta fields (_meta_type, _meta_data)\n required?: boolean;\n default?: unknown;\n min?: number;\n max?: number;\n maxLength?: number;\n minLength?: number;\n related?: string; // For foreignKey, crossPackageRef, oneToMany, manyToMany\n description?: string;\n _meta?: FieldMeta;\n transient?: boolean; // Field not persisted to database\n /**\n * Sensitive value (API secrets, credentials, tax IDs). Still persisted, but\n * excluded from `toPublicJSON()` (generated REST/MCP/SvelteKit responses) and\n * rejected as a `where` filter key.\n */\n sensitive?: boolean;\n /**\n * Read-only over generated write surfaces. Stripped from create/update\n * request bodies so callers cannot mass-assign it.\n */\n readonly?: boolean;\n /**\n * Permission slug required to include this field in public/read responses.\n * Omitted unless the serializer is given a resolved permission set that\n * includes this slug. `sensitive` still wins and hides the field for all\n * callers.\n */\n readPermission?: string;\n /**\n * Controls whether the field is included in JSON exports.\n * - `true`: Always exported (unless site explicitly excludes it)\n * - `false`: Never exported (cannot be overridden by site config)\n * - `undefined`: Uses site's fieldExportDefault setting\n */\n exported?: boolean;\n}\n\nexport interface MethodParameterDefinition {\n name: string;\n type: string;\n optional: boolean;\n default?: unknown;\n /**\n * The declared annotation -- or a member of an inline object literal inside\n * it -- was syntax the scanner could not express as a string (intersection,\n * tuple, conditional, mapped, `typeof`, indexed access).\n *\n * `type` still reads `'any'` for compatibility, so this flag is the ONLY\n * thing separating \"the author wrote `any`\" from \"the scanner gave up\".\n * Anything that must fail closed on an uncertain type -- notably the API\n * wire-ability gate in `generators/custom-action.ts` -- reads this (#2686).\n */\n typeUnresolved?: boolean;\n /**\n * Resolved member types of an INLINE object-literal annotation, flattened\n * across nested literals, arrays, unions, and type arguments.\n *\n * The manifest records an inline literal as the single string `'object'`,\n * which hides exactly the members that decide whether the bag can cross a\n * wire (a callback, a model instance). NAMED bags -- an interface, type\n * alias, `Partial<>`/`Pick<>` -- are deliberately absent here and accepted\n * heuristically instead; expanding them needs cross-file type resolution the\n * AST scanner does not perform (#2686).\n */\n memberTypes?: string[];\n /**\n * For a top-level UNION, each branch with the inline members IT declared.\n *\n * `memberTypes` above flattens across branches, which lets one branch veto\n * another: `{ callback: () => void } | string` is wire-able through its\n * string branch, but the flattened `Function` rejected the whole parameter.\n * A consumer that understands this field MUST prefer it over `memberTypes`\n * for unions. Absent on a non-union parameter and on manifests generated\n * before #2686.\n */\n unionBranches?: ParameterTypeBranch[];\n}\n\n/** One branch of a top-level union parameter type (#2686). */\nexport interface ParameterTypeBranch {\n /** The branch's own type name, e.g. `string` or `object`. */\n type: string;\n /** Inline object members declared by THIS branch only. */\n memberTypes?: string[];\n}\n\nexport interface MethodDefinition {\n name: string;\n async: boolean;\n parameters: MethodParameterDefinition[];\n returnType: string;\n description?: string;\n isStatic: boolean;\n isPublic: boolean;\n /**\n * Config object of an `@method()` decorator declared on this method.\n *\n * `{}` for a bare `@method()`; absent when the method carries no `@method()`\n * at all. Typed loosely on purpose: this is SCANNED config that reached the\n * manifest as JSON, so consumers narrow it defensively through\n * `readMethodDecoratorConfig` in `generators/custom-action.ts` rather than\n * trusting a compile-time shape. The authoring type is `MethodOptions` in\n * `decorators/index.ts` (#2686).\n */\n decoratorConfig?: Record<string, unknown>;\n}\n\n/**\n * Pre-generated schema column definition for manifest\n */\nexport interface ManifestColumnDefinition {\n type: string; // SQL type: TEXT, INTEGER, DECIMAL, BOOLEAN, DATETIME, JSON\n primaryKey?: boolean;\n /**\n * Non-DDL marker for SMRT-owned identifier/reference columns.\n */\n referenceKind?: 'id' | 'foreignKey' | 'crossPackageRef' | 'tenantId';\n notNull?: boolean;\n unique?: boolean;\n default?: unknown;\n /** Same-package FK only. Cross-package references never populate this. */\n foreignKey?: import('../schema/types.js').ColumnDefinition['foreignKey'];\n}\n\n/**\n * Pre-generated schema index definition for manifest\n */\nexport interface ManifestIndexDefinition {\n name: string;\n columns: string[];\n unique?: boolean;\n /** SMRT-owned nullable upsert identity; PostgreSQL 15+ uses NULLS NOT DISTINCT. */\n nullsNotDistinct?: boolean;\n where?: string;\n /**\n * Expression-based index target — when set, the DDL strategy renders the\n * index over a JSON path inside `column` (dialect-specific syntax).\n */\n jsonPath?: {\n column: string;\n path: string;\n };\n}\n\n/**\n * Pre-generated schema for efficient external package consumption\n * Generated at build time by ManifestGenerator, stored in manifest.json\n */\nexport interface ManifestSchema {\n tableName: string;\n /**\n * Engine-neutral CREATE TABLE preview. Not executable as-is: no indexes,\n * abstract SQL types. Consumers render `columns` + `indexes` through the\n * engine DDL strategy (see `schema/manifest-schema.ts`, #2358).\n */\n ddl: string;\n columns: Record<string, ManifestColumnDefinition>;\n indexes: ManifestIndexDefinition[];\n version: string; // Hash of schema definition for migration tracking\n}\n\n/**\n * Validation rule type for pre-computed validators\n * These are serializable rules extracted from field definitions at build time,\n * eliminating the need to compile validator closures at runtime.\n */\nexport type ValidationRuleType =\n | 'required'\n | 'min'\n | 'max'\n | 'minLength'\n | 'maxLength'\n | 'pattern';\n\n/**\n * Pre-computed validation rule for a field\n * Generated at build time by ManifestGenerator, stored in manifest.json\n *\n * These rules are evaluated at runtime without creating closure functions,\n * significantly reducing CLI startup time for projects with many SMRT objects.\n */\nexport interface ValidationRule {\n /** Field name to validate */\n field: string;\n /** Type of validation rule */\n rule: ValidationRuleType;\n /** Value for the rule (number for min/max/minLength/maxLength, string for pattern) */\n value?: number | string;\n /** Field type for context (text, integer, decimal, etc.) */\n fieldType?: string;\n}\n\n// ── Agent manifest types ────────────────────────────────────────────────\n\n/**\n * Permission declared by an agent\n * Generated from uiSlots (manage:*) and CLI/MCP methods (execute:*)\n */\nexport interface AgentPermission {\n id: string;\n label: string;\n category: 'slot' | 'method';\n defaultGranted?: boolean;\n}\n\n/**\n * Feature declared by an agent\n */\nexport interface AgentFeature {\n id: string;\n label: string;\n description?: string;\n type: 'slot' | 'method';\n}\n\n/**\n * Menu item derived from agent uiSlots\n */\nexport interface AgentMenuItem {\n id: string;\n label: string;\n icon?: string;\n order: number;\n path: string;\n requiredPermission?: string;\n}\n\n/**\n * Component export declaration derived from package.json exports\n */\nexport interface AgentComponentDeclaration {\n exportPath: string;\n type: string;\n}\n\n/**\n * UI slot definition captured from static uiSlots on Agent subclasses\n */\nexport interface AgentUISlotManifest {\n id: string;\n label: string;\n description?: string;\n icon?: string;\n order?: number;\n disabled?: boolean;\n /** Durable owner for settings written through this slot. */\n scope?: 'agent' | 'persona';\n /** Optional fallback form contract for host applications. */\n settingsSchema?: {\n version: number;\n fields: Array<{\n id: string;\n label: string;\n type: 'string' | 'number' | 'boolean' | 'select' | 'textarea' | 'json';\n description?: string;\n required?: boolean;\n default?: unknown;\n placeholder?: string;\n options?: Array<{ value: string; label: string }>;\n min?: number;\n max?: number;\n }>;\n };\n}\n\n/**\n * Admin route declared by an agent via static adminRoutes\n * Consumed by vitePluginAgentRoutes to register admin routes with SvelteKit\n */\nexport interface AgentAdminRouteManifest {\n /** Route path relative to agent root (e.g., 'sources/[sourceId]') */\n path: string;\n /** Component export name from the agent's admin entry point */\n component: string;\n /** Optional: export name for server load function */\n load?: string;\n}\n\n/**\n * Auto-generated agent manifest section\n * Produced by the manifest build pipeline for any class with `agent` decorator config\n */\nexport interface AgentManifest {\n name: string;\n slug: string;\n icon?: string;\n tier: 'free' | 'standard' | 'premium';\n description?: string;\n uiSlots: Record<string, AgentUISlotManifest>;\n adminRoutes?: AgentAdminRouteManifest[];\n /** Default signal subscriptions declared by this agent */\n signalSubscriptions?: string[];\n permissions: AgentPermission[];\n features: AgentFeature[];\n menuItems: AgentMenuItem[];\n components: AgentComponentDeclaration[];\n}\n\n// ── Core manifest types ─────────────────────────────────────────────────\n\nexport interface SmartObjectDefinition {\n /**\n * Qualified name in format \"@package/name:ClassName\"\n * This is the PRIMARY KEY for manifest lookups.\n * Example: \"@happyvertical/smrt-core:Product\"\n *\n * Optional during transition - will be required in future versions.\n */\n qualifiedName?: QualifiedClassName;\n\n /**\n * Simple class name (PascalCase)\n * Example: \"Product\"\n */\n className: string;\n\n /**\n * Package name where this class is defined.\n * Example: \"@happyvertical/smrt-core\"\n *\n * Optional during transition - will be required in future versions.\n */\n packageName?: string;\n\n /**\n * Visibility control for manifest inclusion\n * - 'public': Included in published manifest (default)\n * - 'internal': Package-only, excluded from published manifest\n * - 'test': Test-only, never in any published manifest\n *\n * Defaults to 'public' if not specified.\n */\n visibility?: SmrtVisibility;\n\n /**\n * @deprecated Use qualifiedName instead. Kept for transition period.\n * Lowercase class name, formerly used as manifest key.\n */\n name: string;\n\n collection: string; // Pluralized name for endpoints\n filePath: string;\n packageVersion?: string; // Package version for external manifest loading\n importPath?: string; // Import path for dynamic loading (e.g., \"@pkg/objects\")\n modulePath?: string; // Relative module path within package\n exportName?: string; // Named export to use (defaults to className)\n collectionExportName?: string; // Collection class export name\n fields: Record<string, FieldDefinition>;\n methods: Record<string, MethodDefinition>;\n decoratorConfig: SmartObjectConfig;\n extends?: string; // Base class name (simple name, not qualified)\n extendsQualified?: string; // Base class qualified name\n extendsTypeArg?: string; // Generic type argument (e.g., \"Meeting\" from \"SmrtCollection<Meeting>\")\n tools?: Array<{\n type: 'function';\n function: {\n name: string;\n description?: string;\n parameters?: Record<string, unknown>;\n };\n }>;\n /**\n * Pre-generated schema for efficient external package consumption\n * Generated at build time by ManifestGenerator (smrt scan)\n *\n * When present, consumers can use this pre-computed schema directly\n * without calling generateSchema() at runtime, eliminating latency.\n */\n schema?: ManifestSchema;\n\n /**\n * Pre-computed validation rules for efficient runtime validation\n * Generated at build time by ManifestGenerator (smrt scan)\n *\n * When present, the registry uses these rules instead of compiling\n * validator closures at runtime, significantly reducing startup time.\n *\n * @see ValidationRule\n */\n validationRules?: ValidationRule[];\n\n /**\n * Static properties captured from the class definition\n * Currently used for `static uiSlots` on Agent subclasses\n */\n staticProperties?: Record<string, unknown>;\n\n /**\n * Auto-generated agent manifest\n * Only present for classes with `agent` in their decorator config\n * Generated at build time by ManifestGenerator fifth pass\n */\n agent?: AgentManifest;\n}\n\n/**\n * Fixed `timestamp` for every manifest that can reach build output.\n *\n * Manifests are inlined into bundles (`registerPackageManifest(JSON.parse(...))`),\n * so a wall-clock value changes the emitted bytes on every build. That changes\n * Vite's content hash, which changes `dist/`, which invalidates every\n * downstream package through `dependsOn: ['^build']` — one rebuilt package\n * churned 202 of 245 task hashes, and `typecheck` never reused a cache entry\n * across runs (#2223).\n *\n * Nothing reads the field: `getManifestTimestampsHash` invalidates on\n * filesystem mtimes, and `normalizeManifestForHash` deletes it before\n * comparing. A fixed value therefore costs no information.\n *\n * Genuine runtime caches that expire on elapsed time — the discovery cache in\n * `manifest/discover-smrt-packages.ts` — keep using the clock; they never\n * reach build output.\n */\nexport const MANIFEST_TIMESTAMP = 0;\n\n/**\n * Fixed `generatedAt` for knowledge artifacts emitted into `dist/`.\n *\n * Same reasoning as {@link MANIFEST_TIMESTAMP}: build output is compared\n * byte-for-byte, so it cannot carry the clock. The Unix epoch is used rather\n * than `0` because the field is an ISO-8601 string, and a parseable value\n * keeps any consumer that formats it working.\n *\n * The working copy under `.smrt/` keeps a real timestamp — it is useful to a\n * human there, and `preserveKnowledgeGeneratedAt` already stops it churning\n * across incremental rebuilds.\n */\nexport const DETERMINISTIC_GENERATED_AT = '1970-01-01T00:00:00.000Z';\n\nexport interface SmartObjectManifest {\n version: string;\n /** Always {@link MANIFEST_TIMESTAMP} for build-output manifests. */\n timestamp: number;\n packageName?: string; // Root package name (should be set for all new manifests)\n packageVersion?: string; // Root package version\n /**\n * Objects keyed by qualified name (e.g., \"@happyvertical/smrt-core:Product\")\n * Key is string for backward compatibility, but should be QualifiedClassName format.\n */\n objects: Record<string, SmartObjectDefinition>;\n moduleType?: string; // Module type identifier (e.g., \"smrt\") for package discovery\n smrtDependencies?: string[]; // Discovered SMRT packages from dependency tree\n}\n\nexport interface ScanResult {\n filePath: string;\n objects: SmartObjectDefinition[];\n errors: Array<{\n message: string;\n line?: number;\n column?: number;\n }>;\n}\n\nexport interface ScanOptions {\n includePrivateMethods?: boolean;\n includeStaticMethods?: boolean;\n followImports?: boolean;\n baseClasses?: string[]; // Classes to consider as SMRT base classes\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4hBA,IAAa,qBAAqB;;;;;;;;;;;;;AAclC,IAAa,6BAA6B"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/scanner/types.ts"],"sourcesContent":["/**\n * Type definitions for AST scanning and manifest generation\n */\n\nimport type { SmartObjectConfig } from '../registry.js';\n\n/**\n * Qualified class name in format \"@package/name:ClassName\"\n * Example: \"@happyvertical/smrt-core:Product\"\n */\nexport type QualifiedClassName = `${string}:${string}`;\n\n/**\n * Static per-field UI hints authored via `@field({ ui })` (#2046).\n *\n * A pure presentation seed for the field-policy rail (epic #2045): it rides the\n * manifest under the field's `_meta.ui` (never promoted to a top-level\n * `FieldDefinition` key), reaches runtime at `field._meta.ui` via\n * `ObjectRegistry.getAllFields()`, and is emitted to the browser in generated\n * web-collection definitions. It has NO schema, persistence, or security\n * effect — `sensitive`/`readPermission` remain the security rail.\n */\nexport interface FieldUIHints {\n /**\n * Seed the field into the \"basic\" visibility tier (shown before the\n * advanced disclosure). Unmarked fields default per the cold-start rule:\n * an object with no basic markers renders everything basic; once any field\n * is marked, unmarked fields default to advanced.\n */\n basic?: boolean;\n /** Grouping key for form section/grouping (consumer-defined label). */\n group?: string;\n /** Relative sort order within the form/group (ascending). */\n order?: number;\n /**\n * Seed the field's policy as locked: org/user policy tiers may not\n * override it unless an org admin explicitly unlocks it.\n */\n locked?: boolean;\n}\n\n/**\n * Structured metadata attached to a field definition under `_meta`.\n *\n * Captures the field-helper options the scanner and schema/manifest\n * generators read off a field (`sqlType`, `nullable`, `__tenancy`, …). The\n * index signature keeps the bag open for forward-compatible keys without\n * forcing every consumer through `any`.\n */\nexport interface FieldMeta {\n /** Explicit SQL type override (e.g. 'UUID') applied during schema generation. */\n sqlType?: string;\n /** Storage type for cross-package reference ids ('text' forces TEXT). */\n idType?: 'uuid' | 'text';\n /** When true, the column is nullable regardless of `required`. */\n nullable?: boolean;\n /** Mirror of the field's required flag captured at registration. */\n required?: boolean;\n /** Default value carried in metadata for runtime-registry generation. */\n default?: unknown;\n /** Per-row SQL backfill for adding/tightening a required column (#3008). */\n backfill?: string;\n /** Marks the field as the primary key column. */\n primaryKey?: boolean;\n /** Marks the column as unique. */\n unique?: boolean;\n /** Column description carried into generated schema. */\n description?: string;\n /** Static per-field UI hints authored via `@field({ ui })` (#2046). */\n ui?: FieldUIHints;\n /** Opt-in column/JSON-path indexing flag. */\n indexed?: boolean;\n /** Foreign-key delete action carried in metadata. */\n onDelete?: 'CASCADE' | 'SET NULL' | 'RESTRICT' | 'NO ACTION';\n /** Configures physical DDL while retaining FK relationship metadata. */\n constraint?:\n | boolean\n | { engines: Array<'postgres' | 'sqlite' | 'duckdb' | 'json'> };\n /** Excludes the field from persistence when true. */\n transient?: boolean;\n /** Numeric/length validation bounds and pattern. */\n min?: number;\n max?: number;\n minLength?: number;\n maxLength?: number;\n /**\n * Validation regex. A string source, a `RegExp`, or — when a manifest was\n * JSON-serialized and a `RegExp` collapsed to `{}` — an opaque object. Read\n * sites must narrow before accessing `.source`.\n */\n pattern?: unknown;\n /** Tenancy metadata injected for tenant-scoped models. */\n __tenancy?: {\n isTenantIdField?: boolean;\n /** Populated by the tenancy beforeSave interceptor when enabled. */\n autoPopulate?: boolean;\n [key: string]: unknown;\n };\n /** Report-aggregate metadata injected by the report normalizer. */\n __report?: {\n kind?: string;\n [key: string]: unknown;\n };\n [key: string]: unknown;\n}\n\n/**\n * Controls how a class is exposed in manifests and across packages\n */\nexport type SmrtVisibility =\n | 'public' // Included in published manifest, available to all consumers\n | 'internal' // Package-only, excluded from published manifest\n | 'test'; // Test-only, never in any published manifest\n\nexport interface FieldDefinition {\n type:\n | 'text'\n | 'decimal'\n | 'boolean'\n | 'integer'\n | 'datetime'\n | 'json'\n | 'foreignKey'\n | 'crossPackageRef' // Cross-package reference — UUID id column by default, no DDL FK\n | 'oneToMany'\n | 'manyToMany'\n | 'meta'; // STI meta fields (_meta_type, _meta_data)\n required?: boolean;\n default?: unknown;\n min?: number;\n max?: number;\n maxLength?: number;\n minLength?: number;\n related?: string; // For foreignKey, crossPackageRef, oneToMany, manyToMany\n description?: string;\n _meta?: FieldMeta;\n transient?: boolean; // Field not persisted to database\n /**\n * Sensitive value (API secrets, credentials, tax IDs). Still persisted, but\n * excluded from `toPublicJSON()` (generated REST/MCP/SvelteKit responses) and\n * rejected as a `where` filter key.\n */\n sensitive?: boolean;\n /**\n * Read-only over generated write surfaces. Stripped from create/update\n * request bodies so callers cannot mass-assign it.\n */\n readonly?: boolean;\n /**\n * Permission slug required to include this field in public/read responses.\n * Omitted unless the serializer is given a resolved permission set that\n * includes this slug. `sensitive` still wins and hides the field for all\n * callers.\n */\n readPermission?: string;\n /**\n * Controls whether the field is included in JSON exports.\n * - `true`: Always exported (unless site explicitly excludes it)\n * - `false`: Never exported (cannot be overridden by site config)\n * - `undefined`: Uses site's fieldExportDefault setting\n */\n exported?: boolean;\n}\n\nexport interface MethodParameterDefinition {\n name: string;\n type: string;\n optional: boolean;\n default?: unknown;\n /**\n * The declared annotation -- or a member of an inline object literal inside\n * it -- was syntax the scanner could not express as a string (intersection,\n * tuple, conditional, mapped, `typeof`, indexed access).\n *\n * `type` still reads `'any'` for compatibility, so this flag is the ONLY\n * thing separating \"the author wrote `any`\" from \"the scanner gave up\".\n * Anything that must fail closed on an uncertain type -- notably the API\n * wire-ability gate in `generators/custom-action.ts` -- reads this (#2686).\n */\n typeUnresolved?: boolean;\n /**\n * Resolved member types of an INLINE object-literal annotation, flattened\n * across nested literals, arrays, unions, and type arguments.\n *\n * The manifest records an inline literal as the single string `'object'`,\n * which hides exactly the members that decide whether the bag can cross a\n * wire (a callback, a model instance). NAMED bags -- an interface, type\n * alias, `Partial<>`/`Pick<>` -- are deliberately absent here and accepted\n * heuristically instead; expanding them needs cross-file type resolution the\n * AST scanner does not perform (#2686).\n */\n memberTypes?: string[];\n /**\n * For a top-level UNION, each branch with the inline members IT declared.\n *\n * `memberTypes` above flattens across branches, which lets one branch veto\n * another: `{ callback: () => void } | string` is wire-able through its\n * string branch, but the flattened `Function` rejected the whole parameter.\n * A consumer that understands this field MUST prefer it over `memberTypes`\n * for unions. Absent on a non-union parameter and on manifests generated\n * before #2686.\n */\n unionBranches?: ParameterTypeBranch[];\n}\n\n/** One branch of a top-level union parameter type (#2686). */\nexport interface ParameterTypeBranch {\n /** The branch's own type name, e.g. `string` or `object`. */\n type: string;\n /** Inline object members declared by THIS branch only. */\n memberTypes?: string[];\n}\n\nexport interface MethodDefinition {\n name: string;\n async: boolean;\n parameters: MethodParameterDefinition[];\n returnType: string;\n description?: string;\n isStatic: boolean;\n isPublic: boolean;\n /**\n * Config object of an `@method()` decorator declared on this method.\n *\n * `{}` for a bare `@method()`; absent when the method carries no `@method()`\n * at all. Typed loosely on purpose: this is SCANNED config that reached the\n * manifest as JSON, so consumers narrow it defensively through\n * `readMethodDecoratorConfig` in `generators/custom-action.ts` rather than\n * trusting a compile-time shape. The authoring type is `MethodOptions` in\n * `decorators/index.ts` (#2686).\n */\n decoratorConfig?: Record<string, unknown>;\n}\n\n/**\n * Pre-generated schema column definition for manifest\n */\nexport interface ManifestColumnDefinition {\n type: string; // SQL type: TEXT, INTEGER, DECIMAL, BOOLEAN, DATETIME, JSON\n primaryKey?: boolean;\n /**\n * Non-DDL marker for SMRT-owned identifier/reference columns.\n */\n referenceKind?: 'id' | 'foreignKey' | 'crossPackageRef' | 'tenantId';\n notNull?: boolean;\n unique?: boolean;\n default?: unknown;\n /** Same-package FK only. Cross-package references never populate this. */\n foreignKey?: import('../schema/types.js').ColumnDefinition['foreignKey'];\n}\n\n/**\n * Pre-generated schema index definition for manifest\n */\nexport interface ManifestIndexDefinition {\n name: string;\n columns: string[];\n unique?: boolean;\n /** SMRT-owned nullable upsert identity; PostgreSQL 15+ uses NULLS NOT DISTINCT. */\n nullsNotDistinct?: boolean;\n where?: string;\n /**\n * Expression-based index target — when set, the DDL strategy renders the\n * index over a JSON path inside `column` (dialect-specific syntax).\n */\n jsonPath?: {\n column: string;\n path: string;\n };\n}\n\n/**\n * Pre-generated schema for efficient external package consumption\n * Generated at build time by ManifestGenerator, stored in manifest.json\n */\nexport interface ManifestSchema {\n tableName: string;\n /**\n * Engine-neutral CREATE TABLE preview. Not executable as-is: no indexes,\n * abstract SQL types. Consumers render `columns` + `indexes` through the\n * engine DDL strategy (see `schema/manifest-schema.ts`, #2358).\n */\n ddl: string;\n columns: Record<string, ManifestColumnDefinition>;\n indexes: ManifestIndexDefinition[];\n version: string; // Hash of schema definition for migration tracking\n}\n\n/**\n * Validation rule type for pre-computed validators\n * These are serializable rules extracted from field definitions at build time,\n * eliminating the need to compile validator closures at runtime.\n */\nexport type ValidationRuleType =\n | 'required'\n | 'min'\n | 'max'\n | 'minLength'\n | 'maxLength'\n | 'pattern';\n\n/**\n * Pre-computed validation rule for a field\n * Generated at build time by ManifestGenerator, stored in manifest.json\n *\n * These rules are evaluated at runtime without creating closure functions,\n * significantly reducing CLI startup time for projects with many SMRT objects.\n */\nexport interface ValidationRule {\n /** Field name to validate */\n field: string;\n /** Type of validation rule */\n rule: ValidationRuleType;\n /** Value for the rule (number for min/max/minLength/maxLength, string for pattern) */\n value?: number | string;\n /** Field type for context (text, integer, decimal, etc.) */\n fieldType?: string;\n}\n\n// ── Agent manifest types ────────────────────────────────────────────────\n\n/**\n * Permission declared by an agent\n * Generated from uiSlots (manage:*) and CLI/MCP methods (execute:*)\n */\nexport interface AgentPermission {\n id: string;\n label: string;\n category: 'slot' | 'method';\n defaultGranted?: boolean;\n}\n\n/**\n * Feature declared by an agent\n */\nexport interface AgentFeature {\n id: string;\n label: string;\n description?: string;\n type: 'slot' | 'method';\n}\n\n/**\n * Menu item derived from agent uiSlots\n */\nexport interface AgentMenuItem {\n id: string;\n label: string;\n icon?: string;\n order: number;\n path: string;\n requiredPermission?: string;\n}\n\n/**\n * Component export declaration derived from package.json exports\n */\nexport interface AgentComponentDeclaration {\n exportPath: string;\n type: string;\n}\n\n/**\n * UI slot definition captured from static uiSlots on Agent subclasses\n */\nexport interface AgentUISlotManifest {\n id: string;\n label: string;\n description?: string;\n icon?: string;\n order?: number;\n disabled?: boolean;\n /** Durable owner for settings written through this slot. */\n scope?: 'agent' | 'persona';\n /** Optional fallback form contract for host applications. */\n settingsSchema?: {\n version: number;\n fields: Array<{\n id: string;\n label: string;\n type: 'string' | 'number' | 'boolean' | 'select' | 'textarea' | 'json';\n description?: string;\n required?: boolean;\n default?: unknown;\n placeholder?: string;\n options?: Array<{ value: string; label: string }>;\n min?: number;\n max?: number;\n }>;\n };\n}\n\n/**\n * Admin route declared by an agent via static adminRoutes\n * Consumed by vitePluginAgentRoutes to register admin routes with SvelteKit\n */\nexport interface AgentAdminRouteManifest {\n /** Route path relative to agent root (e.g., 'sources/[sourceId]') */\n path: string;\n /** Component export name from the agent's admin entry point */\n component: string;\n /** Optional: export name for server load function */\n load?: string;\n}\n\n/**\n * Auto-generated agent manifest section\n * Produced by the manifest build pipeline for any class with `agent` decorator config\n */\nexport interface AgentManifest {\n name: string;\n slug: string;\n icon?: string;\n tier: 'free' | 'standard' | 'premium';\n description?: string;\n uiSlots: Record<string, AgentUISlotManifest>;\n adminRoutes?: AgentAdminRouteManifest[];\n /** Default signal subscriptions declared by this agent */\n signalSubscriptions?: string[];\n permissions: AgentPermission[];\n features: AgentFeature[];\n menuItems: AgentMenuItem[];\n components: AgentComponentDeclaration[];\n}\n\n// ── Core manifest types ─────────────────────────────────────────────────\n\nexport interface SmartObjectDefinition {\n /**\n * Qualified name in format \"@package/name:ClassName\"\n * This is the PRIMARY KEY for manifest lookups.\n * Example: \"@happyvertical/smrt-core:Product\"\n *\n * Optional during transition - will be required in future versions.\n */\n qualifiedName?: QualifiedClassName;\n\n /**\n * Simple class name (PascalCase)\n * Example: \"Product\"\n */\n className: string;\n\n /**\n * Package name where this class is defined.\n * Example: \"@happyvertical/smrt-core\"\n *\n * Optional during transition - will be required in future versions.\n */\n packageName?: string;\n\n /**\n * Visibility control for manifest inclusion\n * - 'public': Included in published manifest (default)\n * - 'internal': Package-only, excluded from published manifest\n * - 'test': Test-only, never in any published manifest\n *\n * Defaults to 'public' if not specified.\n */\n visibility?: SmrtVisibility;\n\n /**\n * @deprecated Use qualifiedName instead. Kept for transition period.\n * Lowercase class name, formerly used as manifest key.\n */\n name: string;\n\n collection: string; // Pluralized name for endpoints\n filePath: string;\n packageVersion?: string; // Package version for external manifest loading\n importPath?: string; // Import path for dynamic loading (e.g., \"@pkg/objects\")\n modulePath?: string; // Relative module path within package\n exportName?: string; // Named export to use (defaults to className)\n collectionExportName?: string; // Collection class export name\n fields: Record<string, FieldDefinition>;\n methods: Record<string, MethodDefinition>;\n decoratorConfig: SmartObjectConfig;\n extends?: string; // Base class name (simple name, not qualified)\n extendsQualified?: string; // Base class qualified name\n extendsTypeArg?: string; // Generic type argument (e.g., \"Meeting\" from \"SmrtCollection<Meeting>\")\n tools?: Array<{\n type: 'function';\n function: {\n name: string;\n description?: string;\n parameters?: Record<string, unknown>;\n };\n }>;\n /**\n * Pre-generated schema for efficient external package consumption\n * Generated at build time by ManifestGenerator (smrt scan)\n *\n * When present, consumers can use this pre-computed schema directly\n * without calling generateSchema() at runtime, eliminating latency.\n */\n schema?: ManifestSchema;\n\n /**\n * Pre-computed validation rules for efficient runtime validation\n * Generated at build time by ManifestGenerator (smrt scan)\n *\n * When present, the registry uses these rules instead of compiling\n * validator closures at runtime, significantly reducing startup time.\n *\n * @see ValidationRule\n */\n validationRules?: ValidationRule[];\n\n /**\n * Static properties captured from the class definition\n * Currently used for `static uiSlots` on Agent subclasses\n */\n staticProperties?: Record<string, unknown>;\n\n /**\n * Auto-generated agent manifest\n * Only present for classes with `agent` in their decorator config\n * Generated at build time by ManifestGenerator fifth pass\n */\n agent?: AgentManifest;\n}\n\n/**\n * Fixed `timestamp` for every manifest that can reach build output.\n *\n * Manifests are inlined into bundles (`registerPackageManifest(JSON.parse(...))`),\n * so a wall-clock value changes the emitted bytes on every build. That changes\n * Vite's content hash, which changes `dist/`, which invalidates every\n * downstream package through `dependsOn: ['^build']` — one rebuilt package\n * churned 202 of 245 task hashes, and `typecheck` never reused a cache entry\n * across runs (#2223).\n *\n * Nothing reads the field: `getManifestTimestampsHash` invalidates on\n * filesystem mtimes, and `normalizeManifestForHash` deletes it before\n * comparing. A fixed value therefore costs no information.\n *\n * Genuine runtime caches that expire on elapsed time — the discovery cache in\n * `manifest/discover-smrt-packages.ts` — keep using the clock; they never\n * reach build output.\n */\nexport const MANIFEST_TIMESTAMP = 0;\n\n/**\n * Fixed `generatedAt` for knowledge artifacts emitted into `dist/`.\n *\n * Same reasoning as {@link MANIFEST_TIMESTAMP}: build output is compared\n * byte-for-byte, so it cannot carry the clock. The Unix epoch is used rather\n * than `0` because the field is an ISO-8601 string, and a parseable value\n * keeps any consumer that formats it working.\n *\n * The working copy under `.smrt/` keeps a real timestamp — it is useful to a\n * human there, and `preserveKnowledgeGeneratedAt` already stops it churning\n * across incremental rebuilds.\n */\nexport const DETERMINISTIC_GENERATED_AT = '1970-01-01T00:00:00.000Z';\n\nexport interface SmartObjectManifest {\n version: string;\n /** Always {@link MANIFEST_TIMESTAMP} for build-output manifests. */\n timestamp: number;\n packageName?: string; // Root package name (should be set for all new manifests)\n packageVersion?: string; // Root package version\n /**\n * Objects keyed by qualified name (e.g., \"@happyvertical/smrt-core:Product\")\n * Key is string for backward compatibility, but should be QualifiedClassName format.\n */\n objects: Record<string, SmartObjectDefinition>;\n /** Test artifacts must not become dependency providers during discovery. */\n artifactPurpose?: 'runtime' | 'test';\n moduleType?: string; // Module type identifier (e.g., \"smrt\") for package discovery\n smrtDependencies?: string[]; // Discovered SMRT packages from dependency tree\n}\n\nexport interface ScanResult {\n filePath: string;\n objects: SmartObjectDefinition[];\n errors: Array<{\n message: string;\n line?: number;\n column?: number;\n }>;\n}\n\nexport interface ScanOptions {\n includePrivateMethods?: boolean;\n includeStaticMethods?: boolean;\n followImports?: boolean;\n baseClasses?: string[]; // Classes to consider as SMRT base classes\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4hBA,IAAa,qBAAqB;;;;;;;;;;;;;AAclC,IAAa,6BAA6B"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Now uses ManifestBuilder service for consolidated, testable logic
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { existsSync, readFileSync,
|
|
10
|
+
import { existsSync, mkdirSync, readFileSync, unlinkSync } from 'node:fs';
|
|
11
11
|
import { resolve } from 'node:path';
|
|
12
12
|
import { pathToFileURL } from 'node:url';
|
|
13
13
|
import { register } from 'tsx/esm/api';
|
|
@@ -64,7 +64,11 @@ async function generateManifest() {
|
|
|
64
64
|
moduleType: 'smrt',
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
const {
|
|
67
|
+
const {
|
|
68
|
+
buildDomainKnowledgeManifest,
|
|
69
|
+
publishAtomicArtifact,
|
|
70
|
+
resolveFileKnowledgeConfig,
|
|
71
|
+
} = await import(
|
|
68
72
|
pathToFileURL(resolve(process.cwd(), 'src/knowledge.ts')).href
|
|
69
73
|
);
|
|
70
74
|
const sourceManifestPath = resolve(
|
|
@@ -104,7 +108,44 @@ async function generateManifest() {
|
|
|
104
108
|
},
|
|
105
109
|
}),
|
|
106
110
|
);
|
|
107
|
-
|
|
111
|
+
publishAtomicArtifact({
|
|
112
|
+
path: knowledgePath,
|
|
113
|
+
content: JSON.stringify(knowledge, null, 2),
|
|
114
|
+
});
|
|
115
|
+
// Core has no Vite producer during its own package build, yet its
|
|
116
|
+
// declared build cache owns this canonical runtime pair. Refresh it
|
|
117
|
+
// from the current production projection, replacing stale test output.
|
|
118
|
+
const localDir = resolve(process.cwd(), '.smrt');
|
|
119
|
+
mkdirSync(localDir, { recursive: true });
|
|
120
|
+
const localManifestPath = resolve(localDir, 'manifest.json');
|
|
121
|
+
const localKnowledgePath = resolve(localDir, 'smrt-knowledge.json');
|
|
122
|
+
const localConfig = await resolveFileKnowledgeConfig(
|
|
123
|
+
process.cwd(),
|
|
124
|
+
manifest.packageName,
|
|
125
|
+
);
|
|
126
|
+
publishAtomicArtifact({
|
|
127
|
+
path: localManifestPath,
|
|
128
|
+
content: JSON.stringify(manifest, null, 2),
|
|
129
|
+
});
|
|
130
|
+
if (localConfig.enabled !== false)
|
|
131
|
+
publishAtomicArtifact({
|
|
132
|
+
path: localKnowledgePath,
|
|
133
|
+
content: JSON.stringify(
|
|
134
|
+
withDeterministicGeneratedAt(
|
|
135
|
+
DeterministicGeneratedAt,
|
|
136
|
+
buildDomainKnowledgeManifest({
|
|
137
|
+
manifest,
|
|
138
|
+
rootDir: process.cwd(),
|
|
139
|
+
packageJson,
|
|
140
|
+
manifestPath: localManifestPath,
|
|
141
|
+
config: localConfig,
|
|
142
|
+
}),
|
|
143
|
+
),
|
|
144
|
+
null,
|
|
145
|
+
2,
|
|
146
|
+
),
|
|
147
|
+
});
|
|
148
|
+
else if (existsSync(localKnowledgePath)) unlinkSync(localKnowledgePath);
|
|
108
149
|
} finally {
|
|
109
150
|
await unregister();
|
|
110
151
|
}
|
|
@@ -123,45 +164,4 @@ function withDeterministicGeneratedAt(generatedAt, nextKnowledge) {
|
|
|
123
164
|
return { ...nextKnowledge, generatedAt };
|
|
124
165
|
}
|
|
125
166
|
|
|
126
|
-
function preserveGeneratedAtIfUnchanged(path, nextKnowledge) {
|
|
127
|
-
if (!existsSync(path)) {
|
|
128
|
-
return nextKnowledge;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
try {
|
|
132
|
-
const current = JSON.parse(readFileSync(path, 'utf8'));
|
|
133
|
-
if (semanticArtifactJson(current) === semanticArtifactJson(nextKnowledge)) {
|
|
134
|
-
return {
|
|
135
|
-
...nextKnowledge,
|
|
136
|
-
generatedAt: current.generatedAt,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
} catch {
|
|
140
|
-
// Replace malformed artifacts.
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return nextKnowledge;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function semanticArtifactJson(artifact) {
|
|
147
|
-
const { generatedAt: _generatedAt, ...rest } = artifact ?? {};
|
|
148
|
-
return stableJson(rest);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function stableJson(value) {
|
|
152
|
-
return JSON.stringify(sortJson(value));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function sortJson(value) {
|
|
156
|
-
if (Array.isArray(value)) return value.map(sortJson);
|
|
157
|
-
if (value && typeof value === 'object') {
|
|
158
|
-
return Object.fromEntries(
|
|
159
|
-
Object.entries(value)
|
|
160
|
-
.sort(([a], [b]) => a.localeCompare(b))
|
|
161
|
-
.map(([key, entry]) => [key, sortJson(entry)]),
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
return value;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
167
|
export { generateManifest };
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Now uses ManifestBuilder service for consolidated, testable logic
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { existsSync } from 'node:fs';
|
|
13
|
+
import { existsSync, readFileSync, unlinkSync } from 'node:fs';
|
|
14
14
|
import { resolve } from 'node:path';
|
|
15
15
|
import { pathToFileURL } from 'node:url';
|
|
16
16
|
import { register } from 'tsx/esm/api';
|
|
@@ -36,7 +36,7 @@ async function generateTestManifest() {
|
|
|
36
36
|
|
|
37
37
|
const builder = new ManifestBuilder();
|
|
38
38
|
|
|
39
|
-
await builder.generate({
|
|
39
|
+
const manifest = await builder.generate({
|
|
40
40
|
// === FILE DISCOVERY ===
|
|
41
41
|
// Scan all source files including test files for test manifest
|
|
42
42
|
// Test classes defined inline need to be in the manifest for proper field detection
|
|
@@ -65,6 +65,53 @@ async function generateTestManifest() {
|
|
|
65
65
|
injectPackageInfo: true,
|
|
66
66
|
moduleType: 'smrt',
|
|
67
67
|
});
|
|
68
|
+
const {
|
|
69
|
+
AGENT_SURFACE_HASH_PREFIX,
|
|
70
|
+
buildDomainKnowledgeManifest,
|
|
71
|
+
publishAtomicArtifact,
|
|
72
|
+
resolveFileKnowledgeConfig,
|
|
73
|
+
} = await import(
|
|
74
|
+
pathToFileURL(resolve(process.cwd(), 'src/knowledge.ts')).href
|
|
75
|
+
);
|
|
76
|
+
const manifestPath = resolve(process.cwd(), '.smrt/manifest.json');
|
|
77
|
+
const knowledgePath = resolve(process.cwd(), '.smrt/smrt-knowledge.json');
|
|
78
|
+
let priorKnowledge;
|
|
79
|
+
try {
|
|
80
|
+
priorKnowledge = JSON.parse(readFileSync(knowledgePath, 'utf8'));
|
|
81
|
+
} catch {
|
|
82
|
+
// A missing or malformed prior artifact is replaced by current generation.
|
|
83
|
+
}
|
|
84
|
+
const config = await resolveFileKnowledgeConfig(
|
|
85
|
+
process.cwd(),
|
|
86
|
+
manifest.packageName,
|
|
87
|
+
);
|
|
88
|
+
if (config.enabled !== false) {
|
|
89
|
+
const knowledge = buildDomainKnowledgeManifest({
|
|
90
|
+
manifest,
|
|
91
|
+
rootDir: process.cwd(),
|
|
92
|
+
manifestPath,
|
|
93
|
+
config,
|
|
94
|
+
});
|
|
95
|
+
const priorSurfaceHashes = Object.entries(
|
|
96
|
+
priorKnowledge?.sourceHashes ?? {},
|
|
97
|
+
).filter(([key]) => key.startsWith(AGENT_SURFACE_HASH_PREFIX));
|
|
98
|
+
if (priorKnowledge?.agentSurface && priorSurfaceHashes.length) {
|
|
99
|
+
// This script does not run the producer scanner. Preserve the prior
|
|
100
|
+
// declaration with its prior hashes so an edited declaration stays
|
|
101
|
+
// stale instead of being rehashed as a false-fresh artifact.
|
|
102
|
+
knowledge.agentSurface = priorKnowledge.agentSurface;
|
|
103
|
+
Object.assign(
|
|
104
|
+
knowledge.sourceHashes,
|
|
105
|
+
Object.fromEntries(priorSurfaceHashes),
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
publishAtomicArtifact({
|
|
109
|
+
path: knowledgePath,
|
|
110
|
+
content: JSON.stringify(knowledge, null, 2),
|
|
111
|
+
});
|
|
112
|
+
} else if (existsSync(knowledgePath)) {
|
|
113
|
+
unlinkSync(knowledgePath);
|
|
114
|
+
}
|
|
68
115
|
} finally {
|
|
69
116
|
await unregister();
|
|
70
117
|
}
|