dsh-plugin-inspector 0.6.0 → 0.7.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.
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Readings of a syntax tree that both capability detection and readability
3
+ * detection need, and that must agree between them.
4
+ *
5
+ * Tier B matches a name; Tier C reports the names it could not match. If the
6
+ * two disagree about which expressions are constant, a package gets both a
7
+ * finding and a degrade for the same site, or neither. They agree because they
8
+ * ask the same function.
9
+ *
10
+ * Nothing here evaluates anything. {@link foldConstantString} reads literals
11
+ * out of an already-parsed tree and concatenates them; it never constructs a
12
+ * function, and it never touches an identifier's value.
13
+ * @module dsh-plugin-inspector/syntax
14
+ */
15
+ import ts from 'typescript';
16
+ /**
17
+ * The text a constant string expression holds, or `null` when the expression is
18
+ * not constant.
19
+ *
20
+ * Four forms, chosen because each one is a spelling of a name that a reader
21
+ * sees and a name-matching check does not: a literal, a `+` chain of them, a
22
+ * template whose every span is one, and `[…].join(…)` over an array of them.
23
+ * Anything reaching an identifier, a property, or any other call answers
24
+ * `null` — resolving those is value tracking, which this tool does not do and
25
+ * which Tier C exists to admit.
26
+ * @param node - the expression, or `undefined` for a missing argument.
27
+ * @returns the text, or `null`.
28
+ */
29
+ export declare function foldConstantString(node: ts.Node | undefined): string | null;
30
+ /**
31
+ * The Node API that hands back a builtin module without `require` and without
32
+ * an `import` declaration, added in Node 22.3.
33
+ *
34
+ * It reaches the same modules the harness sandbox's `require` trap covers,
35
+ * from a call that sandbox never sees: the sandbox leaves
36
+ * `process` `undefined`, so inside it this expression throws, and a mounted
37
+ * bundle layer is not inside it.
38
+ * @see https://nodejs.org/api/process.html#processgetbuiltinmoduleid
39
+ */
40
+ export declare const BUILTIN_MODULE_GETTER = "getBuiltinModule";
41
+ /**
42
+ * Whether a call is `process.getBuiltinModule(…)`.
43
+ *
44
+ * The receiver is required. `getBuiltinModule` pulled off `process` and bound
45
+ * to a bare name is not this — it is a detached member, which Tier C reports as
46
+ * dispatch it cannot follow.
47
+ * @param node - the call expression.
48
+ * @returns true when the call loads a builtin through `process`.
49
+ */
50
+ export declare function isBuiltinModuleGetter(node: ts.CallExpression): boolean;
51
+ //# sourceMappingURL=syntax.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-inspector",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Know what a DeepSeek Harness plugin does before you install it — static pre-install analysis of a plugin directory or tarball",
5
5
  "license": "MIT",
6
6
  "author": "Ivan Tyshchenko",
@@ -57,6 +57,7 @@
57
57
  "test:coverage": "vitest run --config vitest.config.ts --coverage",
58
58
  "inspect": "node --experimental-strip-types src/cli.ts",
59
59
  "sweep": "node --experimental-strip-types scripts/ecosystem-sweep.ts",
60
+ "sync": "node --experimental-strip-types scripts/harness-sync.ts",
60
61
  "test:e2e": "pnpm run build && vitest run --config vitest.e2e.config.ts"
61
62
  }
62
63
  }