@llui/vite-plugin 0.2.0 → 0.3.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/cross-file-resolver.d.ts +1 -1
- package/dist/cross-file-resolver.d.ts.map +1 -1
- package/dist/cross-file-resolver.js +1 -1
- package/dist/cross-file-resolver.js.map +1 -1
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -3
- package/dist/index.js.map +1 -1
- package/dist/transform.d.ts +1 -3
- package/dist/transform.d.ts.map +1 -1
- package/dist/transform.js +1 -8
- package/dist/transform.js.map +1 -1
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-file-resolver.d.ts","sourceRoot":"","sources":["../src/cross-file-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,
|
|
1
|
+
{"version":3,"file":"cross-file-resolver.d.ts","sourceRoot":"","sources":["../src/cross-file-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,iBAAiB,CAAA;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC7E;;;;;OAKG;IACH,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;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as MessageDispatchMode,\n} from './msg-annotations.js'\nimport {\n type MsgSchema,\n type MsgField,\n type TypeIndex,\n buildFieldDescriptor,\n} from './msg-schema.js'\n\n/**\n * Cross-file type resolver.\n *\n * The schema/annotation extractors (`extractMsgAnnotations`,\n * `extractMsgSchema`, `extractStateSchema`, `extractEffectSchema`) only\n * see the source string for the file currently being transformed. When\n * a developer keeps the `Msg` (or `State` / `Effect`) union in a\n * separate file and imports it where `component()` is called, those\n * extractors silently return `null` — the plugin emits no annotations,\n * runtime LAP validation is disabled, and Claude can dispatch arbitrary\n * `type` strings that fall through to `assertNever`.\n *\n * This module follows imports and re-exports to find the source file\n * that declares the requested type alias, returning that file's source\n * string + the local name of the alias there. Extractors then run\n * against that source and produce the same output they would have for\n * a co-located declaration.\n *\n * Limitations:\n * - Composition (`type Msg = ImportedA | { type: 'b' }`): only the\n * locally-declared variants are extracted; the imported half isn't\n * walked recursively into. The lint rule `agent-msg-resolvable`\n * catches this case at lint time.\n * - Namespace imports (`import * as ns from './msg'`) and `export *`:\n * not followed. Same lint coverage.\n * - Generic types: not parameterized resolution; the type argument\n * must resolve to a concrete type alias.\n */\n\nexport interface ResolveContext {\n /**\n * Resolve a module specifier (e.g. `'./msg'`, `'@scope/pkg'`) against\n * the importing file's path. Returns the absolute filesystem path of\n * the resolved module, or `null` if it cannot be resolved (the type\n * stays unresolved and the extractor falls back to local-only mode).\n */\n resolveModule: (spec: string, importerPath: string) => Promise<string | null>\n /**\n * Read the source contents of an absolute module path. The contents\n * are parsed by TypeScript so they should be valid TS/TSX. The plugin\n *'s vite hook plumbs `fs/promises.readFile` here; tests provide an\n * in-memory map.\n */\n readSource: (absolutePath: string) => Promise<string>\n}\n\nexport interface ResolvedTypeSource {\n /** The full source string of the file declaring the type alias. */\n source: string\n /** The local name of the alias *in that file* (after rename chains). */\n localName: string\n /** Absolute path of the file declaring the alias (debug aid). */\n filePath: string\n}\n\n/**\n * Walk imports + re-exports to find where a type alias is actually\n * declared. Returns the source string and local name of the alias in\n * its declaring file. Returns `null` if the chain leads to an unresolved\n * module, a re-export through `export *`, a namespace import, or a\n * dead-end (alias not declared anywhere we can see).\n */\nexport async function findTypeSource(\n typeName: string,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n visited: Set<string> = new Set(),\n): Promise<ResolvedTypeSource | null> {\n // Cycle prevention — re-export A → A is a tight loop that some\n // pathological re-export chains can produce. Bail rather than\n // infinitely recurse.\n if (visited.has(`${filePath}::${typeName}`)) return null\n visited.add(`${filePath}::${typeName}`)\n\n const sf = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true)\n\n // 1. Local declaration wins. `type X = ...` or `interface X { ... }`\n // (extractors only support type aliases today, but check both so\n // the resolver itself isn't a footgun for future extractors).\n for (const stmt of sf.statements) {\n if (ts.isTypeAliasDeclaration(stmt) && stmt.name.text === typeName) {\n return { source, localName: typeName, filePath }\n }\n if (ts.isInterfaceDeclaration(stmt) && stmt.name.text === typeName) {\n return { source, localName: typeName, filePath }\n }\n }\n\n // 2. Re-export with name: `export { X } from './y'` or\n // `export { X as Y } from './y'`. Walk to the source module.\n for (const stmt of sf.statements) {\n if (!ts.isExportDeclaration(stmt)) continue\n if (!stmt.exportClause || !ts.isNamedExports(stmt.exportClause)) continue\n if (!stmt.moduleSpecifier || !ts.isStringLiteral(stmt.moduleSpecifier)) continue\n\n for (const spec of stmt.exportClause.elements) {\n const exportedName = spec.name.text\n if (exportedName !== typeName) continue\n // The name in the source module is `propertyName` if present\n // (e.g. `export { Msg as M } from './msg'` exports as M but the\n // source module has it as Msg).\n const sourceName = spec.propertyName?.text ?? spec.name.text\n const resolved = await ctx.resolveModule(stmt.moduleSpecifier.text, filePath)\n if (!resolved) return null\n const subSource = await ctx.readSource(resolved)\n return findTypeSource(sourceName, subSource, resolved, ctx, visited)\n }\n }\n\n // 3. Local re-binding: `export { X } from elsewhere` shorthand was\n // handled above. A separate case is `import { X } from ... ; export\n // { X }` — the import already declares X locally, so step 5 picks\n // it up.\n\n // 4. Star re-exports: `export * from './y'`. The barrel re-exports\n // every named member of `./y` under the same name. Walk each\n // barrel target and return the first hit. Order: textual order\n // in the source file (matches TypeScript's behaviour for\n // multi-barrel name collisions, where the first declared wins).\n //\n // Multiple `export *` declarations are common in monorepo barrel\n // files (`export * from './msg'; export * from './effects'`).\n // Without this step, the resolver returns `null` and the plugin\n // silently emits empty annotations for any consumer that points\n // at a barrel.\n for (const stmt of sf.statements) {\n if (!ts.isExportDeclaration(stmt)) continue\n // `export * from './y'` has no exportClause; `export {} from './y'`\n // is a different beast (re-exports nothing). Skip the latter.\n if (stmt.exportClause) continue\n if (!stmt.moduleSpecifier || !ts.isStringLiteral(stmt.moduleSpecifier)) continue\n\n const resolved = await ctx.resolveModule(stmt.moduleSpecifier.text, filePath)\n if (!resolved) continue\n let subSource: string\n try {\n subSource = await ctx.readSource(resolved)\n } catch {\n // Module path resolved but the file isn't readable (deleted,\n // dynamic-only, etc.). Continue to the next barrel.\n continue\n }\n const found = await findTypeSource(typeName, subSource, resolved, ctx, visited)\n if (found) return found\n }\n\n // 5. Imports: `import { X } from './y'` or `import { X as Y } from './y'`.\n // Walk to the source module using the original (imported) name.\n for (const stmt of sf.statements) {\n if (!ts.isImportDeclaration(stmt)) continue\n if (!stmt.importClause) continue\n if (!stmt.moduleSpecifier || !ts.isStringLiteral(stmt.moduleSpecifier)) continue\n\n const bindings = stmt.importClause.namedBindings\n if (!bindings || !ts.isNamedImports(bindings)) continue\n\n for (const elem of bindings.elements) {\n const localName = elem.name.text\n if (localName !== typeName) continue\n // The remote name is `propertyName` when there's a rename, else\n // the local name itself.\n const remoteName = elem.propertyName?.text ?? elem.name.text\n const resolved = await ctx.resolveModule(stmt.moduleSpecifier.text, filePath)\n if (!resolved) return null\n const subSource = await ctx.readSource(resolved)\n return findTypeSource(remoteName, subSource, resolved, ctx, visited)\n }\n }\n\n // Not found in this file and no import/re-export to follow.\n return null\n}\n\n/**\n * Annotation extractor that walks composed Msg unions across files.\n *\n * Given a Msg type that may be a union of inline `{ type: 'literal' }`\n * objects AND TypeReferences (e.g.\n * `type Msg = ImportedFoo | { type: 'extra' }`), recursively follow\n * each TypeReference via `findTypeSource` and merge its variants into\n * the returned map.\n *\n * Composition + cross-file is the union of two failure modes the\n * file-local sync extractor silently mishandles. This function\n * produces the same map the runtime expects regardless of how the\n * developer organized the type declarations.\n *\n * Conflict policy: if two composed branches contribute the same\n * discriminant string (e.g. both halves declare `{ type: 'inc' }`),\n * the first one walked wins. The lint rule `agent-msg-resolvable`\n * fires before this point on most pathological cases; ESLint's\n * type-checker would flag the duplicate independently.\n */\nexport async function extractMsgAnnotationsCrossFile(\n source: string,\n typeName: string,\n filePath: string,\n ctx: ResolveContext,\n): Promise<Record<string, MessageAnnotations> | null> {\n const out: Record<string, MessageAnnotations> = {}\n const ok = await collectMsgVariants(typeName, source, filePath, ctx, out, new Set())\n if (!ok) return null\n return Object.keys(out).length === 0 ? null : out\n}\n\nasync function collectMsgVariants(\n typeName: string,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n out: Record<string, MessageAnnotations>,\n visitedAliases: Set<string>,\n): Promise<boolean> {\n const located = await findTypeSource(typeName, source, filePath, ctx, new Set())\n if (!located) return false\n\n const aliasKey = `${located.filePath}::${located.localName}`\n if (visitedAliases.has(aliasKey)) return true\n visitedAliases.add(aliasKey)\n\n const sf = ts.createSourceFile(located.filePath, located.source, ts.ScriptTarget.Latest, true)\n const aliases: ts.TypeAliasDeclaration[] = []\n sf.forEachChild((n) => {\n if (ts.isTypeAliasDeclaration(n)) aliases.push(n)\n })\n const alias = aliases.find((a) => a.name.text === located.localName)\n if (!alias) return false\n\n // Single-variant alias: `type Foo = { type: 'a', ... }`. Treat as a\n // one-element union so a Msg variant can be its own type alias.\n const memberNodes: ts.TypeNode[] = ts.isUnionTypeNode(alias.type)\n ? [...alias.type.types]\n : [alias.type]\n\n for (let i = 0; i < memberNodes.length; i++) {\n const member = memberNodes[i]!\n\n if (ts.isTypeLiteralNode(member)) {\n const variant = readDiscriminantLiteral(member)\n if (!variant) continue\n const comment = readLeadingJSDocForMember(located.source, alias, memberNodes, i)\n if (out[variant] === undefined) {\n out[variant] = parseMessageAnnotations(comment)\n }\n continue\n }\n\n if (ts.isTypeReferenceNode(member) && ts.isIdentifier(member.typeName)) {\n // Composed: recurse through the resolver.\n await collectMsgVariants(\n member.typeName.text,\n located.source,\n located.filePath,\n ctx,\n out,\n visitedAliases,\n )\n continue\n }\n\n // Other shapes (intersections, conditional types, namespace-qualified\n // names) aren't followed. Lint catches this.\n }\n\n return true\n}\n\nfunction readDiscriminantLiteral(lit: ts.TypeLiteralNode): string | null {\n for (const m of lit.members) {\n if (!ts.isPropertySignature(m)) continue\n if (!m.name || !ts.isIdentifier(m.name) || m.name.text !== 'type') continue\n if (!m.type || !ts.isLiteralTypeNode(m.type)) continue\n const literal = m.type.literal\n if (ts.isStringLiteral(literal)) return literal.text\n }\n return null\n}\n\n/**\n * Read leading JSDoc for a union member at index `i` of `members`.\n * The JSDoc lives between the previous element's end and the current\n * element's start (or between the type alias start and the first\n * element for `i === 0`). Mirrors the logic in\n * `extractMsgAnnotations` so the cross-file path produces the same\n * output for the same input.\n */\nfunction readLeadingJSDocForMember(\n source: string,\n alias: ts.TypeAliasDeclaration,\n members: ts.TypeNode[],\n i: number,\n): string {\n const prev = members[i - 1]\n const member = members[i]!\n // For non-union (single-variant) aliases the union pos is the alias\n // body's pos.\n const unionPos = ts.isUnionTypeNode(alias.type) ? alias.type.pos : alias.type.pos\n const scanPos = i === 0 || prev === undefined ? unionPos : prev.end\n const ranges = ts.getLeadingCommentRanges(source, scanPos) ?? []\n const docs = ranges\n .filter((r) => r.kind === ts.SyntaxKind.MultiLineCommentTrivia)\n .map((r) => source.slice(r.pos, r.end))\n .filter((txt) => txt.startsWith('/**'))\n // Cut off comments that appear AFTER the member starts (rare but\n // possible with weird formatting).\n const _end = member.pos\n return docs.join('\\n')\n}\n\nfunction parseMessageAnnotations(comment: string): MessageAnnotations {\n if (!comment) return defaultMessageAnnotations()\n const intent = readIntentTag(comment)\n const human = /@humanOnly\\b/.test(comment)\n const agent = /@agentOnly\\b/.test(comment)\n const dispatchMode: MessageDispatchMode =\n human && !agent ? 'human-only' : agent && !human ? 'agent-only' : 'shared'\n return {\n intent,\n alwaysAffordable: /@alwaysAffordable\\b/.test(comment),\n requiresConfirm: /@requiresConfirm\\b/.test(comment),\n dispatchMode,\n examples: readExamplesTag(comment),\n warning: readWarningTag(comment),\n emits: readEmitsTag(comment),\n routeGate: readRouteGateTag(comment),\n }\n}\n\nfunction readRouteGateTag(comment: string): string | null {\n const match = comment.match(/@routeGated\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/)\n return match?.[1] ?? null\n}\n\nfunction readEmitsTag(comment: string): string[] {\n const outer = comment.match(/@emits\\s*\\(([^)]*)\\)/)\n if (!outer || outer[1] === undefined) return []\n const inner = outer[1]\n const seen = new Set<string>()\n const out: string[] = []\n const re = /[\"“]([^\"”]*)[\"”]/g\n let m: RegExpExecArray | null\n while ((m = re.exec(inner)) !== null) {\n const v = m[1]\n if (v === undefined || seen.has(v)) continue\n seen.add(v)\n out.push(v)\n }\n return out\n}\n\nfunction readExamplesTag(comment: string): string[] {\n const out: string[] = []\n const re = /@example\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/g\n let m: RegExpExecArray | null\n while ((m = re.exec(comment)) !== null) {\n if (m[1] !== undefined) out.push(m[1])\n }\n return out\n}\n\nfunction readWarningTag(comment: string): string | null {\n const match = comment.match(/@warning\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/)\n return match?.[1] ?? null\n}\n\nfunction defaultMessageAnnotations(): MessageAnnotations {\n return {\n intent: null,\n alwaysAffordable: false,\n requiresConfirm: false,\n dispatchMode: 'shared',\n examples: [],\n warning: null,\n emits: [],\n routeGate: null,\n }\n}\n\nfunction readIntentTag(comment: string): string | null {\n const match = comment.match(/@intent\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/)\n return match?.[1] ?? null\n}\n\n/**\n * Cross-file companion to `extractMsgSchema` / `extractEffectSchema`.\n *\n * Discriminated-union schema extractor that follows composed\n * TypeReferences through the resolver. Same recursion shape as\n * `extractMsgAnnotationsCrossFile`, just collecting field shapes\n * instead of JSDoc annotations.\n */\nexport async function extractDiscriminatedUnionSchemaCrossFile(\n source: string,\n typeName: string,\n filePath: string,\n ctx: ResolveContext,\n): Promise<MsgSchema | null> {\n const variants: MsgSchema['variants'] = {}\n const ok = await collectSchemaVariants(typeName, source, filePath, ctx, variants, new Set())\n if (!ok) return null\n return Object.keys(variants).length === 0 ? null : { discriminant: 'type', variants }\n}\n\nasync function collectSchemaVariants(\n typeName: string,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n variants: MsgSchema['variants'],\n visitedAliases: Set<string>,\n): Promise<boolean> {\n const located = await findTypeSource(typeName, source, filePath, ctx, new Set())\n if (!located) return false\n\n const aliasKey = `${located.filePath}::${located.localName}`\n if (visitedAliases.has(aliasKey)) return true\n visitedAliases.add(aliasKey)\n\n const sf = ts.createSourceFile(located.filePath, located.source, ts.ScriptTarget.Latest, true)\n const aliases: ts.TypeAliasDeclaration[] = []\n sf.forEachChild((n) => {\n if (ts.isTypeAliasDeclaration(n)) aliases.push(n)\n })\n const alias = aliases.find((a) => a.name.text === located.localName)\n if (!alias) return false\n\n const memberNodes: ts.TypeNode[] = ts.isUnionTypeNode(alias.type)\n ? [...alias.type.types]\n : [alias.type]\n\n // Build a typeIndex that combines this file's local types with any\n // *imported* type aliases referenced inside the variant payloads.\n // Without this enrichment, a field typed as `GridSorting` (declared\n // in `./state.ts` and imported here) would resolve to `'unknown'`\n // because the local index doesn't know about it. The synthesizer\n // would then emit `null` and the agent would have to guess at the\n // permissible literal-union values.\n const typeIndex = await buildEnrichedTypeIndex(sf, located.source, located.filePath, ctx)\n\n for (const member of memberNodes) {\n if (ts.isTypeLiteralNode(member)) {\n collectOneVariant(member, variants, located.source, typeIndex)\n continue\n }\n if (ts.isTypeReferenceNode(member) && ts.isIdentifier(member.typeName)) {\n await collectSchemaVariants(\n member.typeName.text,\n located.source,\n located.filePath,\n ctx,\n variants,\n visitedAliases,\n )\n continue\n }\n }\n return true\n}\n\nfunction collectOneVariant(\n lit: ts.TypeLiteralNode,\n variants: MsgSchema['variants'],\n source: string,\n typeIndex: TypeIndex,\n): void {\n let discriminantValue: string | null = null\n const fields: Record<string, MsgField> = {}\n for (const member of lit.members) {\n if (!ts.isPropertySignature(member) || !member.name || !ts.isIdentifier(member.name)) continue\n const name = member.name.text\n const memberType = member.type\n if (name === 'type' && memberType) {\n if (ts.isLiteralTypeNode(memberType) && ts.isStringLiteral(memberType.literal)) {\n discriminantValue = memberType.literal.text\n }\n continue\n }\n fields[name] = buildFieldDescriptor(member, source, typeIndex)\n }\n if (discriminantValue && variants[discriminantValue] === undefined) {\n variants[discriminantValue] = fields\n }\n}\n\n/**\n * Build a TypeIndex that includes the locally-declared types in `sf`\n * AND any types imported by name into `sf`. Following the imports\n * picks up sibling-file aliases like `GridSorting`, `ScoreMode`,\n * `ConfirmRequest` that an app commonly extracts to a state module.\n *\n * Limitations:\n * - Only follows direct named imports (`import type { X } from './y'`).\n * Namespace imports and `export *` aren't followed (the lint rule\n * `agent-msg-resolvable` already catches the namespace case).\n * - The resolved external type must itself be a type alias or\n * interface in the target file — chained re-exports beyond the first\n * hop fall back to `'unknown'`.\n * - Best-effort: any failure to resolve an import is silent. The\n * field type just stays `'unknown'` as it would have without\n * enrichment.\n */\nasync function buildEnrichedTypeIndex(\n sf: ts.SourceFile,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n): Promise<TypeIndex> {\n const index: TypeIndex = new Map()\n\n // 1. Locally-declared aliases / interfaces.\n for (const stmt of sf.statements) {\n if (ts.isTypeAliasDeclaration(stmt)) {\n index.set(stmt.name.text, stmt.type)\n } else if (ts.isInterfaceDeclaration(stmt)) {\n index.set(stmt.name.text, stmt)\n }\n }\n\n // 2. Walk imports transitively. Each file's named imports are\n // resolved, the target declarations are added to the index under\n // their local name, and the target's OWN file is then queued so\n // its imports are followed too. This is what makes\n // `Matrix/AddCriteria.criteria[].type.ease` resolve all the way\n // to its discriminated-union descriptor: `Criterion` is imported\n // from `@decisive/domain`, and `EaseFunction` is in turn imported\n // by Criterion's home file. Without transitivity the inner types\n // collapse to `'unknown'` and the agent has to guess the shape.\n //\n // Type-only imports (`import type { X }`) are followed exactly\n // the same as value imports — TypeScript's `isTypeOnly` flag\n // doesn't change the referent.\n //\n // Name collisions are first-write-wins: a local declaration\n // shadows an imported one of the same name, and the first\n // transitively-discovered import wins over later same-name\n // imports. Intentional — root files almost always import the\n // canonical name, and shallower-import names are more likely\n // correct than deep-import collisions.\n const fileQueue: Array<{ source: string; filePath: string; sf: ts.SourceFile }> = [\n { source, filePath, sf },\n ]\n const visitedFiles = new Set<string>([filePath])\n\n while (fileQueue.length > 0) {\n const cur = fileQueue.shift()\n if (!cur) break\n\n // Add this file's *own* local type declarations to the index so\n // sibling references inside the file's exported types resolve.\n // Without this, a Criterion in domain.ts referencing EaseMode\n // (declared right next to it) would collapse to 'unknown' even\n // though we already followed the import chain to domain.ts.\n // First-write-wins: a local declaration in the entry file\n // shadows a same-named declaration in a transitively-walked\n // file (intentional — entry-file names are canonical).\n if (cur.filePath !== filePath) {\n for (const stmt of cur.sf.statements) {\n if (ts.isTypeAliasDeclaration(stmt)) {\n if (!index.has(stmt.name.text)) index.set(stmt.name.text, stmt.type)\n } else if (ts.isInterfaceDeclaration(stmt)) {\n if (!index.has(stmt.name.text)) index.set(stmt.name.text, stmt)\n }\n }\n }\n\n for (const stmt of cur.sf.statements) {\n if (!ts.isImportDeclaration(stmt)) continue\n const named = stmt.importClause?.namedBindings\n if (!named || !ts.isNamedImports(named)) continue\n for (const spec of named.elements) {\n const localName = spec.name.text\n const importedName = spec.propertyName?.text ?? localName\n if (index.has(localName)) continue\n // Best-effort: any failure to resolve / read silently bails.\n // Bare-specifier imports like `'fs'` resolve to vite's\n // `__vite-browser-external` sentinel, which then ENOENTs at\n // readSource — those imports aren't type-relevant for schema\n // extraction anyway, so the failure is benign.\n let located: ResolvedTypeSource | null\n try {\n located = await findTypeSource(importedName, cur.source, cur.filePath, ctx, new Set())\n } catch {\n located = null\n }\n if (!located) continue\n const targetSf = ts.createSourceFile(\n located.filePath,\n located.source,\n ts.ScriptTarget.Latest,\n true,\n )\n let added = false\n for (const targetStmt of targetSf.statements) {\n if (ts.isTypeAliasDeclaration(targetStmt) && targetStmt.name.text === located.localName) {\n index.set(localName, targetStmt.type)\n added = true\n break\n }\n if (ts.isInterfaceDeclaration(targetStmt) && targetStmt.name.text === located.localName) {\n index.set(localName, targetStmt)\n added = true\n break\n }\n }\n // Queue the target file so its own imports — and own local\n // declarations — flow into the index. Only queue once per file.\n if (added && !visitedFiles.has(located.filePath)) {\n visitedFiles.add(located.filePath)\n fileQueue.push({\n source: located.source,\n filePath: located.filePath,\n sf: targetSf,\n })\n }\n }\n }\n }\n\n return index\n}\n\n/**\n * Inspect the type arguments of a `component<...>()` call and return\n * the textual identifier for each known position. Returns `null` for\n * positions whose type argument isn't a plain identifier (e.g.\n * inline literal types, generic instantiations, namespace-qualified\n * names). Identifiers are what the resolver can chase; everything else\n * we leave to the local extractor's existing behavior.\n *\n * Order: `[State, Msg, Effect]` matching `component<State, Msg, Effect>`.\n */\nexport function readComponentTypeArgNames(call: ts.CallExpression): {\n state: string | null\n msg: string | null\n effect: string | null\n} {\n const args = call.typeArguments\n const get = (i: number): string | null => {\n const t = args?.[i]\n if (!t) return null\n if (ts.isTypeReferenceNode(t) && ts.isIdentifier(t.typeName)) return t.typeName.text\n return null\n }\n return { state: get(0), msg: get(1), effect: get(2) }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cross-file-resolver.js","sourceRoot":"","sources":["../src/cross-file-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAGN,MAAM,gBAAgB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AAC,CAAC,CAAC,EAAE,CAAA;AACvD,CAAC","sourcesContent":["import ts from 'typescript'\nimport {\n type MessageAnnotations,\n type DispatchMode as MessageDispatchMode,\n} from '@llui/compiler'\nimport {\n type MsgSchema,\n type MsgField,\n type TypeIndex,\n buildFieldDescriptor,\n} from './msg-schema.js'\n\n/**\n * Cross-file type resolver.\n *\n * The schema/annotation extractors (`extractMsgAnnotations`,\n * `extractMsgSchema`, `extractStateSchema`, `extractEffectSchema`) only\n * see the source string for the file currently being transformed. When\n * a developer keeps the `Msg` (or `State` / `Effect`) union in a\n * separate file and imports it where `component()` is called, those\n * extractors silently return `null` — the plugin emits no annotations,\n * runtime LAP validation is disabled, and Claude can dispatch arbitrary\n * `type` strings that fall through to `assertNever`.\n *\n * This module follows imports and re-exports to find the source file\n * that declares the requested type alias, returning that file's source\n * string + the local name of the alias there. Extractors then run\n * against that source and produce the same output they would have for\n * a co-located declaration.\n *\n * Limitations:\n * - Composition (`type Msg = ImportedA | { type: 'b' }`): only the\n * locally-declared variants are extracted; the imported half isn't\n * walked recursively into. The lint rule `agent-msg-resolvable`\n * catches this case at lint time.\n * - Namespace imports (`import * as ns from './msg'`) and `export *`:\n * not followed. Same lint coverage.\n * - Generic types: not parameterized resolution; the type argument\n * must resolve to a concrete type alias.\n */\n\nexport interface ResolveContext {\n /**\n * Resolve a module specifier (e.g. `'./msg'`, `'@scope/pkg'`) against\n * the importing file's path. Returns the absolute filesystem path of\n * the resolved module, or `null` if it cannot be resolved (the type\n * stays unresolved and the extractor falls back to local-only mode).\n */\n resolveModule: (spec: string, importerPath: string) => Promise<string | null>\n /**\n * Read the source contents of an absolute module path. The contents\n * are parsed by TypeScript so they should be valid TS/TSX. The plugin\n *'s vite hook plumbs `fs/promises.readFile` here; tests provide an\n * in-memory map.\n */\n readSource: (absolutePath: string) => Promise<string>\n}\n\nexport interface ResolvedTypeSource {\n /** The full source string of the file declaring the type alias. */\n source: string\n /** The local name of the alias *in that file* (after rename chains). */\n localName: string\n /** Absolute path of the file declaring the alias (debug aid). */\n filePath: string\n}\n\n/**\n * Walk imports + re-exports to find where a type alias is actually\n * declared. Returns the source string and local name of the alias in\n * its declaring file. Returns `null` if the chain leads to an unresolved\n * module, a re-export through `export *`, a namespace import, or a\n * dead-end (alias not declared anywhere we can see).\n */\nexport async function findTypeSource(\n typeName: string,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n visited: Set<string> = new Set(),\n): Promise<ResolvedTypeSource | null> {\n // Cycle prevention — re-export A → A is a tight loop that some\n // pathological re-export chains can produce. Bail rather than\n // infinitely recurse.\n if (visited.has(`${filePath}::${typeName}`)) return null\n visited.add(`${filePath}::${typeName}`)\n\n const sf = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true)\n\n // 1. Local declaration wins. `type X = ...` or `interface X { ... }`\n // (extractors only support type aliases today, but check both so\n // the resolver itself isn't a footgun for future extractors).\n for (const stmt of sf.statements) {\n if (ts.isTypeAliasDeclaration(stmt) && stmt.name.text === typeName) {\n return { source, localName: typeName, filePath }\n }\n if (ts.isInterfaceDeclaration(stmt) && stmt.name.text === typeName) {\n return { source, localName: typeName, filePath }\n }\n }\n\n // 2. Re-export with name: `export { X } from './y'` or\n // `export { X as Y } from './y'`. Walk to the source module.\n for (const stmt of sf.statements) {\n if (!ts.isExportDeclaration(stmt)) continue\n if (!stmt.exportClause || !ts.isNamedExports(stmt.exportClause)) continue\n if (!stmt.moduleSpecifier || !ts.isStringLiteral(stmt.moduleSpecifier)) continue\n\n for (const spec of stmt.exportClause.elements) {\n const exportedName = spec.name.text\n if (exportedName !== typeName) continue\n // The name in the source module is `propertyName` if present\n // (e.g. `export { Msg as M } from './msg'` exports as M but the\n // source module has it as Msg).\n const sourceName = spec.propertyName?.text ?? spec.name.text\n const resolved = await ctx.resolveModule(stmt.moduleSpecifier.text, filePath)\n if (!resolved) return null\n const subSource = await ctx.readSource(resolved)\n return findTypeSource(sourceName, subSource, resolved, ctx, visited)\n }\n }\n\n // 3. Local re-binding: `export { X } from elsewhere` shorthand was\n // handled above. A separate case is `import { X } from ... ; export\n // { X }` — the import already declares X locally, so step 5 picks\n // it up.\n\n // 4. Star re-exports: `export * from './y'`. The barrel re-exports\n // every named member of `./y` under the same name. Walk each\n // barrel target and return the first hit. Order: textual order\n // in the source file (matches TypeScript's behaviour for\n // multi-barrel name collisions, where the first declared wins).\n //\n // Multiple `export *` declarations are common in monorepo barrel\n // files (`export * from './msg'; export * from './effects'`).\n // Without this step, the resolver returns `null` and the plugin\n // silently emits empty annotations for any consumer that points\n // at a barrel.\n for (const stmt of sf.statements) {\n if (!ts.isExportDeclaration(stmt)) continue\n // `export * from './y'` has no exportClause; `export {} from './y'`\n // is a different beast (re-exports nothing). Skip the latter.\n if (stmt.exportClause) continue\n if (!stmt.moduleSpecifier || !ts.isStringLiteral(stmt.moduleSpecifier)) continue\n\n const resolved = await ctx.resolveModule(stmt.moduleSpecifier.text, filePath)\n if (!resolved) continue\n let subSource: string\n try {\n subSource = await ctx.readSource(resolved)\n } catch {\n // Module path resolved but the file isn't readable (deleted,\n // dynamic-only, etc.). Continue to the next barrel.\n continue\n }\n const found = await findTypeSource(typeName, subSource, resolved, ctx, visited)\n if (found) return found\n }\n\n // 5. Imports: `import { X } from './y'` or `import { X as Y } from './y'`.\n // Walk to the source module using the original (imported) name.\n for (const stmt of sf.statements) {\n if (!ts.isImportDeclaration(stmt)) continue\n if (!stmt.importClause) continue\n if (!stmt.moduleSpecifier || !ts.isStringLiteral(stmt.moduleSpecifier)) continue\n\n const bindings = stmt.importClause.namedBindings\n if (!bindings || !ts.isNamedImports(bindings)) continue\n\n for (const elem of bindings.elements) {\n const localName = elem.name.text\n if (localName !== typeName) continue\n // The remote name is `propertyName` when there's a rename, else\n // the local name itself.\n const remoteName = elem.propertyName?.text ?? elem.name.text\n const resolved = await ctx.resolveModule(stmt.moduleSpecifier.text, filePath)\n if (!resolved) return null\n const subSource = await ctx.readSource(resolved)\n return findTypeSource(remoteName, subSource, resolved, ctx, visited)\n }\n }\n\n // Not found in this file and no import/re-export to follow.\n return null\n}\n\n/**\n * Annotation extractor that walks composed Msg unions across files.\n *\n * Given a Msg type that may be a union of inline `{ type: 'literal' }`\n * objects AND TypeReferences (e.g.\n * `type Msg = ImportedFoo | { type: 'extra' }`), recursively follow\n * each TypeReference via `findTypeSource` and merge its variants into\n * the returned map.\n *\n * Composition + cross-file is the union of two failure modes the\n * file-local sync extractor silently mishandles. This function\n * produces the same map the runtime expects regardless of how the\n * developer organized the type declarations.\n *\n * Conflict policy: if two composed branches contribute the same\n * discriminant string (e.g. both halves declare `{ type: 'inc' }`),\n * the first one walked wins. The lint rule `agent-msg-resolvable`\n * fires before this point on most pathological cases; ESLint's\n * type-checker would flag the duplicate independently.\n */\nexport async function extractMsgAnnotationsCrossFile(\n source: string,\n typeName: string,\n filePath: string,\n ctx: ResolveContext,\n): Promise<Record<string, MessageAnnotations> | null> {\n const out: Record<string, MessageAnnotations> = {}\n const ok = await collectMsgVariants(typeName, source, filePath, ctx, out, new Set())\n if (!ok) return null\n return Object.keys(out).length === 0 ? null : out\n}\n\nasync function collectMsgVariants(\n typeName: string,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n out: Record<string, MessageAnnotations>,\n visitedAliases: Set<string>,\n): Promise<boolean> {\n const located = await findTypeSource(typeName, source, filePath, ctx, new Set())\n if (!located) return false\n\n const aliasKey = `${located.filePath}::${located.localName}`\n if (visitedAliases.has(aliasKey)) return true\n visitedAliases.add(aliasKey)\n\n const sf = ts.createSourceFile(located.filePath, located.source, ts.ScriptTarget.Latest, true)\n const aliases: ts.TypeAliasDeclaration[] = []\n sf.forEachChild((n) => {\n if (ts.isTypeAliasDeclaration(n)) aliases.push(n)\n })\n const alias = aliases.find((a) => a.name.text === located.localName)\n if (!alias) return false\n\n // Single-variant alias: `type Foo = { type: 'a', ... }`. Treat as a\n // one-element union so a Msg variant can be its own type alias.\n const memberNodes: ts.TypeNode[] = ts.isUnionTypeNode(alias.type)\n ? [...alias.type.types]\n : [alias.type]\n\n for (let i = 0; i < memberNodes.length; i++) {\n const member = memberNodes[i]!\n\n if (ts.isTypeLiteralNode(member)) {\n const variant = readDiscriminantLiteral(member)\n if (!variant) continue\n const comment = readLeadingJSDocForMember(located.source, alias, memberNodes, i)\n if (out[variant] === undefined) {\n out[variant] = parseMessageAnnotations(comment)\n }\n continue\n }\n\n if (ts.isTypeReferenceNode(member) && ts.isIdentifier(member.typeName)) {\n // Composed: recurse through the resolver.\n await collectMsgVariants(\n member.typeName.text,\n located.source,\n located.filePath,\n ctx,\n out,\n visitedAliases,\n )\n continue\n }\n\n // Other shapes (intersections, conditional types, namespace-qualified\n // names) aren't followed. Lint catches this.\n }\n\n return true\n}\n\nfunction readDiscriminantLiteral(lit: ts.TypeLiteralNode): string | null {\n for (const m of lit.members) {\n if (!ts.isPropertySignature(m)) continue\n if (!m.name || !ts.isIdentifier(m.name) || m.name.text !== 'type') continue\n if (!m.type || !ts.isLiteralTypeNode(m.type)) continue\n const literal = m.type.literal\n if (ts.isStringLiteral(literal)) return literal.text\n }\n return null\n}\n\n/**\n * Read leading JSDoc for a union member at index `i` of `members`.\n * The JSDoc lives between the previous element's end and the current\n * element's start (or between the type alias start and the first\n * element for `i === 0`). Mirrors the logic in\n * `extractMsgAnnotations` so the cross-file path produces the same\n * output for the same input.\n */\nfunction readLeadingJSDocForMember(\n source: string,\n alias: ts.TypeAliasDeclaration,\n members: ts.TypeNode[],\n i: number,\n): string {\n const prev = members[i - 1]\n const member = members[i]!\n // For non-union (single-variant) aliases the union pos is the alias\n // body's pos.\n const unionPos = ts.isUnionTypeNode(alias.type) ? alias.type.pos : alias.type.pos\n const scanPos = i === 0 || prev === undefined ? unionPos : prev.end\n const ranges = ts.getLeadingCommentRanges(source, scanPos) ?? []\n const docs = ranges\n .filter((r) => r.kind === ts.SyntaxKind.MultiLineCommentTrivia)\n .map((r) => source.slice(r.pos, r.end))\n .filter((txt) => txt.startsWith('/**'))\n // Cut off comments that appear AFTER the member starts (rare but\n // possible with weird formatting).\n const _end = member.pos\n return docs.join('\\n')\n}\n\nfunction parseMessageAnnotations(comment: string): MessageAnnotations {\n if (!comment) return defaultMessageAnnotations()\n const intent = readIntentTag(comment)\n const human = /@humanOnly\\b/.test(comment)\n const agent = /@agentOnly\\b/.test(comment)\n const dispatchMode: MessageDispatchMode =\n human && !agent ? 'human-only' : agent && !human ? 'agent-only' : 'shared'\n return {\n intent,\n alwaysAffordable: /@alwaysAffordable\\b/.test(comment),\n requiresConfirm: /@requiresConfirm\\b/.test(comment),\n dispatchMode,\n examples: readExamplesTag(comment),\n warning: readWarningTag(comment),\n emits: readEmitsTag(comment),\n routeGate: readRouteGateTag(comment),\n }\n}\n\nfunction readRouteGateTag(comment: string): string | null {\n const match = comment.match(/@routeGated\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/)\n return match?.[1] ?? null\n}\n\nfunction readEmitsTag(comment: string): string[] {\n const outer = comment.match(/@emits\\s*\\(([^)]*)\\)/)\n if (!outer || outer[1] === undefined) return []\n const inner = outer[1]\n const seen = new Set<string>()\n const out: string[] = []\n const re = /[\"“]([^\"”]*)[\"”]/g\n let m: RegExpExecArray | null\n while ((m = re.exec(inner)) !== null) {\n const v = m[1]\n if (v === undefined || seen.has(v)) continue\n seen.add(v)\n out.push(v)\n }\n return out\n}\n\nfunction readExamplesTag(comment: string): string[] {\n const out: string[] = []\n const re = /@example\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/g\n let m: RegExpExecArray | null\n while ((m = re.exec(comment)) !== null) {\n if (m[1] !== undefined) out.push(m[1])\n }\n return out\n}\n\nfunction readWarningTag(comment: string): string | null {\n const match = comment.match(/@warning\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/)\n return match?.[1] ?? null\n}\n\nfunction defaultMessageAnnotations(): MessageAnnotations {\n return {\n intent: null,\n alwaysAffordable: false,\n requiresConfirm: false,\n dispatchMode: 'shared',\n examples: [],\n warning: null,\n emits: [],\n routeGate: null,\n }\n}\n\nfunction readIntentTag(comment: string): string | null {\n const match = comment.match(/@intent\\s*\\(\\s*[\"“]([^\"”]*)[\"”]\\s*\\)/)\n return match?.[1] ?? null\n}\n\n/**\n * Cross-file companion to `extractMsgSchema` / `extractEffectSchema`.\n *\n * Discriminated-union schema extractor that follows composed\n * TypeReferences through the resolver. Same recursion shape as\n * `extractMsgAnnotationsCrossFile`, just collecting field shapes\n * instead of JSDoc annotations.\n */\nexport async function extractDiscriminatedUnionSchemaCrossFile(\n source: string,\n typeName: string,\n filePath: string,\n ctx: ResolveContext,\n): Promise<MsgSchema | null> {\n const variants: MsgSchema['variants'] = {}\n const ok = await collectSchemaVariants(typeName, source, filePath, ctx, variants, new Set())\n if (!ok) return null\n return Object.keys(variants).length === 0 ? null : { discriminant: 'type', variants }\n}\n\nasync function collectSchemaVariants(\n typeName: string,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n variants: MsgSchema['variants'],\n visitedAliases: Set<string>,\n): Promise<boolean> {\n const located = await findTypeSource(typeName, source, filePath, ctx, new Set())\n if (!located) return false\n\n const aliasKey = `${located.filePath}::${located.localName}`\n if (visitedAliases.has(aliasKey)) return true\n visitedAliases.add(aliasKey)\n\n const sf = ts.createSourceFile(located.filePath, located.source, ts.ScriptTarget.Latest, true)\n const aliases: ts.TypeAliasDeclaration[] = []\n sf.forEachChild((n) => {\n if (ts.isTypeAliasDeclaration(n)) aliases.push(n)\n })\n const alias = aliases.find((a) => a.name.text === located.localName)\n if (!alias) return false\n\n const memberNodes: ts.TypeNode[] = ts.isUnionTypeNode(alias.type)\n ? [...alias.type.types]\n : [alias.type]\n\n // Build a typeIndex that combines this file's local types with any\n // *imported* type aliases referenced inside the variant payloads.\n // Without this enrichment, a field typed as `GridSorting` (declared\n // in `./state.ts` and imported here) would resolve to `'unknown'`\n // because the local index doesn't know about it. The synthesizer\n // would then emit `null` and the agent would have to guess at the\n // permissible literal-union values.\n const typeIndex = await buildEnrichedTypeIndex(sf, located.source, located.filePath, ctx)\n\n for (const member of memberNodes) {\n if (ts.isTypeLiteralNode(member)) {\n collectOneVariant(member, variants, located.source, typeIndex)\n continue\n }\n if (ts.isTypeReferenceNode(member) && ts.isIdentifier(member.typeName)) {\n await collectSchemaVariants(\n member.typeName.text,\n located.source,\n located.filePath,\n ctx,\n variants,\n visitedAliases,\n )\n continue\n }\n }\n return true\n}\n\nfunction collectOneVariant(\n lit: ts.TypeLiteralNode,\n variants: MsgSchema['variants'],\n source: string,\n typeIndex: TypeIndex,\n): void {\n let discriminantValue: string | null = null\n const fields: Record<string, MsgField> = {}\n for (const member of lit.members) {\n if (!ts.isPropertySignature(member) || !member.name || !ts.isIdentifier(member.name)) continue\n const name = member.name.text\n const memberType = member.type\n if (name === 'type' && memberType) {\n if (ts.isLiteralTypeNode(memberType) && ts.isStringLiteral(memberType.literal)) {\n discriminantValue = memberType.literal.text\n }\n continue\n }\n fields[name] = buildFieldDescriptor(member, source, typeIndex)\n }\n if (discriminantValue && variants[discriminantValue] === undefined) {\n variants[discriminantValue] = fields\n }\n}\n\n/**\n * Build a TypeIndex that includes the locally-declared types in `sf`\n * AND any types imported by name into `sf`. Following the imports\n * picks up sibling-file aliases like `GridSorting`, `ScoreMode`,\n * `ConfirmRequest` that an app commonly extracts to a state module.\n *\n * Limitations:\n * - Only follows direct named imports (`import type { X } from './y'`).\n * Namespace imports and `export *` aren't followed (the lint rule\n * `agent-msg-resolvable` already catches the namespace case).\n * - The resolved external type must itself be a type alias or\n * interface in the target file — chained re-exports beyond the first\n * hop fall back to `'unknown'`.\n * - Best-effort: any failure to resolve an import is silent. The\n * field type just stays `'unknown'` as it would have without\n * enrichment.\n */\nasync function buildEnrichedTypeIndex(\n sf: ts.SourceFile,\n source: string,\n filePath: string,\n ctx: ResolveContext,\n): Promise<TypeIndex> {\n const index: TypeIndex = new Map()\n\n // 1. Locally-declared aliases / interfaces.\n for (const stmt of sf.statements) {\n if (ts.isTypeAliasDeclaration(stmt)) {\n index.set(stmt.name.text, stmt.type)\n } else if (ts.isInterfaceDeclaration(stmt)) {\n index.set(stmt.name.text, stmt)\n }\n }\n\n // 2. Walk imports transitively. Each file's named imports are\n // resolved, the target declarations are added to the index under\n // their local name, and the target's OWN file is then queued so\n // its imports are followed too. This is what makes\n // `Matrix/AddCriteria.criteria[].type.ease` resolve all the way\n // to its discriminated-union descriptor: `Criterion` is imported\n // from `@decisive/domain`, and `EaseFunction` is in turn imported\n // by Criterion's home file. Without transitivity the inner types\n // collapse to `'unknown'` and the agent has to guess the shape.\n //\n // Type-only imports (`import type { X }`) are followed exactly\n // the same as value imports — TypeScript's `isTypeOnly` flag\n // doesn't change the referent.\n //\n // Name collisions are first-write-wins: a local declaration\n // shadows an imported one of the same name, and the first\n // transitively-discovered import wins over later same-name\n // imports. Intentional — root files almost always import the\n // canonical name, and shallower-import names are more likely\n // correct than deep-import collisions.\n const fileQueue: Array<{ source: string; filePath: string; sf: ts.SourceFile }> = [\n { source, filePath, sf },\n ]\n const visitedFiles = new Set<string>([filePath])\n\n while (fileQueue.length > 0) {\n const cur = fileQueue.shift()\n if (!cur) break\n\n // Add this file's *own* local type declarations to the index so\n // sibling references inside the file's exported types resolve.\n // Without this, a Criterion in domain.ts referencing EaseMode\n // (declared right next to it) would collapse to 'unknown' even\n // though we already followed the import chain to domain.ts.\n // First-write-wins: a local declaration in the entry file\n // shadows a same-named declaration in a transitively-walked\n // file (intentional — entry-file names are canonical).\n if (cur.filePath !== filePath) {\n for (const stmt of cur.sf.statements) {\n if (ts.isTypeAliasDeclaration(stmt)) {\n if (!index.has(stmt.name.text)) index.set(stmt.name.text, stmt.type)\n } else if (ts.isInterfaceDeclaration(stmt)) {\n if (!index.has(stmt.name.text)) index.set(stmt.name.text, stmt)\n }\n }\n }\n\n for (const stmt of cur.sf.statements) {\n if (!ts.isImportDeclaration(stmt)) continue\n const named = stmt.importClause?.namedBindings\n if (!named || !ts.isNamedImports(named)) continue\n for (const spec of named.elements) {\n const localName = spec.name.text\n const importedName = spec.propertyName?.text ?? localName\n if (index.has(localName)) continue\n // Best-effort: any failure to resolve / read silently bails.\n // Bare-specifier imports like `'fs'` resolve to vite's\n // `__vite-browser-external` sentinel, which then ENOENTs at\n // readSource — those imports aren't type-relevant for schema\n // extraction anyway, so the failure is benign.\n let located: ResolvedTypeSource | null\n try {\n located = await findTypeSource(importedName, cur.source, cur.filePath, ctx, new Set())\n } catch {\n located = null\n }\n if (!located) continue\n const targetSf = ts.createSourceFile(\n located.filePath,\n located.source,\n ts.ScriptTarget.Latest,\n true,\n )\n let added = false\n for (const targetStmt of targetSf.statements) {\n if (ts.isTypeAliasDeclaration(targetStmt) && targetStmt.name.text === located.localName) {\n index.set(localName, targetStmt.type)\n added = true\n break\n }\n if (ts.isInterfaceDeclaration(targetStmt) && targetStmt.name.text === located.localName) {\n index.set(localName, targetStmt)\n added = true\n break\n }\n }\n // Queue the target file so its own imports — and own local\n // declarations — flow into the index. Only queue once per file.\n if (added && !visitedFiles.has(located.filePath)) {\n visitedFiles.add(located.filePath)\n fileQueue.push({\n source: located.source,\n filePath: located.filePath,\n sf: targetSf,\n })\n }\n }\n }\n }\n\n return index\n}\n\n/**\n * Inspect the type arguments of a `component<...>()` call and return\n * the textual identifier for each known position. Returns `null` for\n * positions whose type argument isn't a plain identifier (e.g.\n * inline literal types, generic instantiations, namespace-qualified\n * names). Identifiers are what the resolver can chase; everything else\n * we leave to the local extractor's existing behavior.\n *\n * Order: `[State, Msg, Effect]` matching `component<State, Msg, Effect>`.\n */\nexport function readComponentTypeArgNames(call: ts.CallExpression): {\n state: string | null\n msg: string | null\n effect: string | null\n} {\n const args = call.typeArguments\n const get = (i: number): string | null => {\n const t = args?.[i]\n if (!t) return null\n if (ts.isTypeReferenceNode(t) && ts.isIdentifier(t.typeName)) return t.typeName.text\n return null\n }\n return { state: get(0), msg: get(1), effect: get(2) }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,32 @@ export interface LluiPluginOptions {
|
|
|
41
41
|
* Default `false` — metadata is dev-only, no agent endpoints.
|
|
42
42
|
*/
|
|
43
43
|
agent?: boolean | AgentPluginConfig;
|
|
44
|
+
/**
|
|
45
|
+
* Opt-in cross-file accessor walking (v2c pipeline integration of v2b's
|
|
46
|
+
* cross-file walker). When enabled, the plugin builds a `ts.Program`
|
|
47
|
+
* over the project at `configResolved` and feeds each `transform` call
|
|
48
|
+
* the cross-file paths read through in-repo view-helpers — replacing
|
|
49
|
+
* the v0.x sentinel-`show()` workaround for helpers in sibling files.
|
|
50
|
+
*
|
|
51
|
+
* Prototype-grade caveats:
|
|
52
|
+
* - The Program builds once at startup; it does NOT refresh on file
|
|
53
|
+
* change. HMR-edited files see stale cross-file edges until the
|
|
54
|
+
* next dev-server restart. (v2c's module decomposition lands the
|
|
55
|
+
* proper incremental Program; this is the v2b pipeline-integration
|
|
56
|
+
* deferral.)
|
|
57
|
+
* - The Program covers `.ts` / `.tsx` files reachable from the Vite
|
|
58
|
+
* project root's `tsconfig.json`. Out-of-project imports are not
|
|
59
|
+
* followed; manifest-driven library helpers cover those in
|
|
60
|
+
* `@llui/cli publish-deps` (v2c, deferred).
|
|
61
|
+
* - The walker emits `llui/opaque-view-call` diagnostics for helpers
|
|
62
|
+
* it can't classify; in dev these surface as Vite warnings. Set
|
|
63
|
+
* `crossFile: 'silent'` to suppress the diagnostics while still
|
|
64
|
+
* getting the path merging.
|
|
65
|
+
*
|
|
66
|
+
* Default `false` — preserves pre-v2c per-file behavior. Enable
|
|
67
|
+
* explicitly to opt in to the cross-file resolution.
|
|
68
|
+
*/
|
|
69
|
+
crossFile?: boolean | 'silent';
|
|
44
70
|
}
|
|
45
71
|
/**
|
|
46
72
|
* Reserved for future agent-server config. Empty today — opaque tokens
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAA;AAgPjD,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAExB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAA;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAoOrD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAwcpE"}
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,16 @@ import { readFile } from 'node:fs/promises';
|
|
|
4
4
|
import { dirname, relative, resolve } from 'node:path';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
|
-
import { transformLlui,
|
|
8
|
-
import {
|
|
7
|
+
import { transformLlui, crossFileAccessorPaths, registerIntrospectionFactory, registerDevtoolsFactory, } from '@llui/compiler';
|
|
8
|
+
import { transformUseClientSsr, hasUseClientDirective } from '@llui/compiler-ssr';
|
|
9
|
+
import { introspectionFactory } from '@llui/compiler-introspection';
|
|
10
|
+
import { devtoolsFactory } from '@llui/compiler-devtools';
|
|
11
|
+
// Register opt-in module factories at plugin-import time.
|
|
12
|
+
// @llui/compiler doesn't depend on its sibling packages (would
|
|
13
|
+
// create a workspace cycle), so the host wires them.
|
|
14
|
+
registerIntrospectionFactory(introspectionFactory);
|
|
15
|
+
registerDevtoolsFactory(devtoolsFactory);
|
|
16
|
+
import { findTypeSource, readComponentTypeArgNames, extractMsgAnnotationsCrossFile, extractDiscriminatedUnionSchemaCrossFile, } from '@llui/compiler';
|
|
9
17
|
import ts from 'typescript';
|
|
10
18
|
/**
|
|
11
19
|
* Pre-resolution step run before `transformLlui`. Scans the source for
|
|
@@ -371,6 +379,37 @@ async function handleAgentRequest(req, res, router) {
|
|
|
371
379
|
const buf = Buffer.from(await webRes.arrayBuffer());
|
|
372
380
|
res.end(buf);
|
|
373
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* Build the cross-file `ts.Program` for v2c pipeline integration. Scans
|
|
384
|
+
* the project root's `tsconfig.json` (or a sensible default) to collect
|
|
385
|
+
* rootNames. Returns null if no tsconfig is reachable — caller falls
|
|
386
|
+
* back to per-file path collection silently.
|
|
387
|
+
*
|
|
388
|
+
* Prototype: builds once, never refreshes. v2c's incremental program is
|
|
389
|
+
* the natural upgrade.
|
|
390
|
+
*/
|
|
391
|
+
async function buildCrossFileProgram(root) {
|
|
392
|
+
try {
|
|
393
|
+
const ts = (await import('typescript')).default;
|
|
394
|
+
const tsconfigPath = ts.findConfigFile(root, ts.sys.fileExists, 'tsconfig.json');
|
|
395
|
+
if (!tsconfigPath)
|
|
396
|
+
return null;
|
|
397
|
+
const parsed = ts.getParsedCommandLineOfConfigFile(tsconfigPath, undefined, {
|
|
398
|
+
...ts.sys,
|
|
399
|
+
onUnRecoverableConfigFileDiagnostic: () => { },
|
|
400
|
+
});
|
|
401
|
+
if (!parsed)
|
|
402
|
+
return null;
|
|
403
|
+
const program = ts.createProgram({
|
|
404
|
+
rootNames: parsed.fileNames,
|
|
405
|
+
options: { ...parsed.options, noEmit: true, skipLibCheck: true },
|
|
406
|
+
});
|
|
407
|
+
return program;
|
|
408
|
+
}
|
|
409
|
+
catch {
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
374
413
|
export default function llui(options = {}) {
|
|
375
414
|
let devMode = false;
|
|
376
415
|
// `mcpPort` + `mcpMode` are resolved lazily in `configResolved` so we
|
|
@@ -385,6 +424,13 @@ export default function llui(options = {}) {
|
|
|
385
424
|
let mcpChild = null;
|
|
386
425
|
const verbose = options.verbose === true;
|
|
387
426
|
const agent = options.agent ?? false;
|
|
427
|
+
const crossFileMode = options.crossFile ?? false;
|
|
428
|
+
// The Program is built lazily on first transform when crossFile is
|
|
429
|
+
// enabled; cached afterwards for reuse. ts.Program is immutable —
|
|
430
|
+
// file changes are not reflected without a rebuild (documented above).
|
|
431
|
+
let crossFileProgram = null;
|
|
432
|
+
let crossFileProgramInit = false;
|
|
433
|
+
let crossFileRoot = process.cwd();
|
|
388
434
|
const agentConfig = typeof agent === 'object' ? agent : {};
|
|
389
435
|
// Agent server instance — loaded in configResolved (async), registered
|
|
390
436
|
// in configureServer (sync). Null until loaded, or if @llui/agent isn't
|
|
@@ -452,6 +498,7 @@ export default function llui(options = {}) {
|
|
|
452
498
|
enforce: 'pre',
|
|
453
499
|
async configResolved(config) {
|
|
454
500
|
devMode = config.command === 'serve' || config.mode === 'development';
|
|
501
|
+
crossFileRoot = config.root;
|
|
455
502
|
// Load @llui/agent here (async) so we can register middleware
|
|
456
503
|
// synchronously in configureServer — which must happen BEFORE Vite
|
|
457
504
|
// installs its catch-all SPA/fallback middleware.
|
|
@@ -685,9 +732,54 @@ export default function llui(options = {}) {
|
|
|
685
732
|
preExtractCompositional(code, id, this.resolve.bind(this)),
|
|
686
733
|
])
|
|
687
734
|
: [undefined, undefined];
|
|
688
|
-
|
|
735
|
+
// Cross-file path resolution (v2c pipeline integration). When
|
|
736
|
+
// enabled, the plugin reuses a shared `ts.Program` across all
|
|
737
|
+
// transform calls and asks the engine for the union of paths read
|
|
738
|
+
// through in-repo view-helpers. Builds the Program on first call.
|
|
739
|
+
let crossFilePaths;
|
|
740
|
+
if (crossFileMode !== false) {
|
|
741
|
+
if (!crossFileProgramInit) {
|
|
742
|
+
crossFileProgramInit = true;
|
|
743
|
+
crossFileProgram = await buildCrossFileProgram(crossFileRoot);
|
|
744
|
+
}
|
|
745
|
+
if (crossFileProgram) {
|
|
746
|
+
const sf = crossFileProgram.getSourceFile(id);
|
|
747
|
+
if (sf) {
|
|
748
|
+
try {
|
|
749
|
+
crossFilePaths = crossFileAccessorPaths(crossFileProgram, sf);
|
|
750
|
+
}
|
|
751
|
+
catch (err) {
|
|
752
|
+
if (crossFileMode !== 'silent') {
|
|
753
|
+
this.warn(`[llui] cross-file walker failed on ${id}: ${err.message}. ` +
|
|
754
|
+
`Falling back to per-file path collection.`);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
const result = transformLlui(code, id, devMode, Boolean(agent), mcpPort, verbose, typeSources, preExtracted, crossFilePaths);
|
|
689
761
|
if (!result)
|
|
690
762
|
return undefined;
|
|
763
|
+
// Surface compiler diagnostics to Rollup. Severity 'error' fails
|
|
764
|
+
// the transform (and the build); 'warning' / 'info' report
|
|
765
|
+
// non-fatally. Locations are 1-based for Rollup.
|
|
766
|
+
for (const diag of result.diagnostics) {
|
|
767
|
+
const loc = {
|
|
768
|
+
file: diag.location.file,
|
|
769
|
+
line: diag.location.range.start.line + 1,
|
|
770
|
+
column: diag.location.range.start.column,
|
|
771
|
+
};
|
|
772
|
+
const formatted = `[${diag.id}] ${diag.message}`;
|
|
773
|
+
if (diag.severity === 'error') {
|
|
774
|
+
this.error({ message: formatted, loc });
|
|
775
|
+
}
|
|
776
|
+
else if (diag.severity === 'warning') {
|
|
777
|
+
this.warn({ message: formatted, loc });
|
|
778
|
+
}
|
|
779
|
+
else if (verbose) {
|
|
780
|
+
console.info(`[llui] ${formatted}`);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
691
783
|
// Apply per-statement edits via MagicString for accurate source maps.
|
|
692
784
|
// Untouched statements keep their original positions.
|
|
693
785
|
const s = new MagicString(code);
|
|
@@ -708,6 +800,52 @@ export default function llui(options = {}) {
|
|
|
708
800
|
map: s.generateMap({ source: id, includeContent: true, hires: true }),
|
|
709
801
|
};
|
|
710
802
|
},
|
|
803
|
+
// Build-time integrity check (v2a §2.4; shared.md §20.12). Every
|
|
804
|
+
// compiled component carries `__lluiCompilerEmitted: 1`; we scan the
|
|
805
|
+
// final bundle for that literal text. Zero occurrences in a production
|
|
806
|
+
// build means the project routed its TS through some other pipeline
|
|
807
|
+
// and the runtime would silently degrade to FULL_MASK — fail closed.
|
|
808
|
+
//
|
|
809
|
+
// Dev mode skips the check: dev users have HMR + warnings to find
|
|
810
|
+
// misconfiguration interactively. SSR builds also skip — the SSR
|
|
811
|
+
// pass may emit a stub module bundle that legitimately contains no
|
|
812
|
+
// components.
|
|
813
|
+
generateBundle(opts, bundle) {
|
|
814
|
+
if (devMode)
|
|
815
|
+
return;
|
|
816
|
+
if (opts.dir === undefined && opts.file === undefined)
|
|
817
|
+
return;
|
|
818
|
+
// The `ssr` flag on the output options is the cleanest signal for
|
|
819
|
+
// SSR builds; rollup adds it when Vite's build.ssr is set.
|
|
820
|
+
if (opts.ssr)
|
|
821
|
+
return;
|
|
822
|
+
let markerCount = 0;
|
|
823
|
+
for (const chunk of Object.values(bundle)) {
|
|
824
|
+
if (chunk.type !== 'chunk')
|
|
825
|
+
continue;
|
|
826
|
+
// Count literal occurrences of the marker. `__lluiCompilerEmitted`
|
|
827
|
+
// is unique enough that false positives from user source are
|
|
828
|
+
// implausible.
|
|
829
|
+
let from = 0;
|
|
830
|
+
const code = chunk.code;
|
|
831
|
+
while (true) {
|
|
832
|
+
const i = code.indexOf('__lluiCompilerEmitted', from);
|
|
833
|
+
if (i < 0)
|
|
834
|
+
break;
|
|
835
|
+
markerCount++;
|
|
836
|
+
from = i + '__lluiCompilerEmitted'.length;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
if (markerCount === 0) {
|
|
840
|
+
this.error('[llui] integrity check failed: no compiled `component()` calls found in ' +
|
|
841
|
+
'this bundle. Either the project has no LLui components (remove ' +
|
|
842
|
+
'`@llui/vite-plugin` from vite.config.ts), or the plugin order is wrong ' +
|
|
843
|
+
'and another transform is consuming TS before `@llui/vite-plugin` runs ' +
|
|
844
|
+
"(check `enforce: 'pre'`). The check looks for the `__lluiCompilerEmitted` " +
|
|
845
|
+
'property the compiler injects into every component. See ' +
|
|
846
|
+
'docs/proposals/v2-compiler/v2a.md §2.4.');
|
|
847
|
+
}
|
|
848
|
+
},
|
|
711
849
|
};
|
|
712
850
|
}
|
|
713
851
|
//# sourceMappingURL=index.js.map
|