@nudojs/service 4.0.0 → 5.0.0-beta.1

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 相对/绝对 specifier → 模块源码。
3
+ * CLI / LSP / vite / check 共用同一扩展名表,避免门禁结果分叉。
4
+ */
5
+ type LoadModule = (spec: string, fromFile: string) => string | undefined;
6
+ /** 默认 loadModule:支持 .js/.mjs/.ts 与 index 入口 */
7
+ declare function defaultLoadModule(spec: string, fromFile: string): string | undefined;
8
+
9
+ type TypeBinding = {
10
+ name: string;
11
+ type: string;
12
+ };
13
+ /** agent 面类型表达式 → `@nudo:as` 文法 */
14
+ declare function typeExprToDirective(expr: string): string;
15
+ declare function injectBindings(source: string, bindings: TypeBinding[]): {
16
+ source: string;
17
+ applied: string[];
18
+ unapplied: string[];
19
+ };
20
+
21
+ export { type LoadModule as L, type TypeBinding as T, defaultLoadModule as d, injectBindings as i, typeExprToDirective as t };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@nudojs/service",
3
- "version": "4.0.0",
3
+ "version": "5.0.0-beta.1",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
7
- "description": "Shared inference service for Nudo IDE integrations — evaluator, file analysis, completions, and .d.ts generation",
7
+ "description": "Nudo analysis core and emit products: Abs-native file analysis, evaluator host API, interface/dts/schema/guard projections, and session caches",
8
8
  "type": "module",
9
9
  "license": "MIT",
10
10
  "keywords": [
@@ -22,9 +22,17 @@
22
22
  "types": "./dist/index.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  },
25
+ "./analysis": {
26
+ "types": "./dist/analysis.d.ts",
27
+ "default": "./dist/analysis.js"
28
+ },
25
29
  "./evaluator": {
26
30
  "types": "./dist/evaluator/evaluator-api.d.ts",
27
31
  "default": "./dist/evaluator/evaluator-api.js"
32
+ },
33
+ "./emit": {
34
+ "types": "./dist/emit/index.d.ts",
35
+ "default": "./dist/emit/index.js"
28
36
  }
29
37
  },
30
38
  "files": [
@@ -43,14 +51,14 @@
43
51
  "registry": "https://registry.npmjs.org"
44
52
  },
45
53
  "dependencies": {
46
- "@babel/traverse": "^7.29.0",
47
- "@babel/types": "^7.29.0",
48
- "@nudojs/core": "2.1.0",
49
- "@nudojs/parser": "1.0.0",
50
- "@nudojs/env": "0.4.1",
51
- "@nudojs/harvester": "0.2.7"
54
+ "@babel/traverse": "^8.0.6",
55
+ "@babel/types": "^8.0.6",
56
+ "@nudojs/core": "3.0.0-beta.0",
57
+ "@nudojs/parser": "1.1.0-beta.0",
58
+ "@nudojs/env": "0.4.2-beta.0",
59
+ "@nudojs/harvester": "1.0.0-beta.1"
52
60
  },
53
61
  "scripts": {
54
- "build": "tsup src/index.ts src/evaluator/evaluator-api.ts --format esm --dts"
62
+ "build": "tsup src/index.ts src/analysis.ts src/evaluator/evaluator-api.ts src/emit/index.ts --format esm --dts"
55
63
  }
56
64
  }