@deepseek-ai/dsh-typert-generator 0.0.1-rc.1 → 0.0.1-rc.2

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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/typert/generator/README.md
5
- README.md: ac2610620af14a30143e95921273a8c254b50a17
5
+ README.md: ee71c26141dc56360f4e9e1ae3c7e2add6e3a19b
6
6
  README.zh.md: a1fa777493578533c93db6cd3354b89c8757d837
package/README.md CHANGED
@@ -8,7 +8,7 @@ The analyzer can use independent `ts.Program` instances seeded from `tsconfig.ho
8
8
 
9
9
  ## Analysis Model
10
10
 
11
- Each face contains package exports, Cordis services and events, explicitly tagged objects and schemas, and a type graph for their reachable declarations. The graph preserves declaration identity, generic parameters and applications, explicit inheritance, conditional and mapped types, import attributes, abstract modifiers, and source JSDoc. Service and `@typert object` surfaces expose public instance members only; constructors, static members, and non-public members are excluded.
11
+ Each face contains package exports, Cordis services and events, explicitly tagged objects and schemas, and a type graph for their reachable declarations. The graph preserves declaration identity, generic parameters and applications, explicit inheritance, conditional and mapped types, import attributes, abstract modifiers, and source JSDoc. Service and `@typert object` APIs expose public instance members only; constructors, static members, and non-public members are excluded.
12
12
 
13
13
  `WorkspaceAnalyzer` defaults to `check` mode and fails on TypeScript syntax or semantic diagnostics, missing reachable public annotations, private cross-package references, and reachable declaration merges that the model cannot retain losslessly. `write` mode inserts checker-derived annotations, rebuilds the program, and returns a clean check-mode model.
14
14
 
package/lib/index.js CHANGED
@@ -2491,7 +2491,7 @@ var TypeGraphRenderer = class {
2491
2491
  }
2492
2492
  /**
2493
2493
  * Find the transitive declaration closure referenced by members.
2494
- * @param memberIds - business-surface member ids.
2494
+ * @param memberIds - business-API member ids.
2495
2495
  * @returns declarations in graph order, excluding no roots implicitly.
2496
2496
  */
2497
2497
  declarationClosureForMembers(memberIds) {
@@ -3263,7 +3263,7 @@ var CordisCatalogProjector = class {
3263
3263
  this.renderer = new TypeGraphRenderer(face.graph);
3264
3264
  }
3265
3265
  /**
3266
- * Validate and project the host model's Cordis surface.
3266
+ * Validate and project the host model's Cordis API.
3267
3267
  * @returns every validated service and event projected from the host model.
3268
3268
  */
3269
3269
  project() {
@@ -3503,10 +3503,10 @@ function parseJsDoc(raw) {
3503
3503
  returns
3504
3504
  };
3505
3505
  }
3506
- function checkParams(where, surface, parameters, tags, isExempt, violations) {
3506
+ function checkParams(where, apiKind, parameters, tags, isExempt, violations) {
3507
3507
  for (const parameter of parameters) {
3508
3508
  if (parameter.binding !== "identifier") {
3509
- violations.push(`${where}: parameter '${parameter.name}' is a binding pattern; the ${surface} surface needs simple identifier parameters so @param can name them.`);
3509
+ violations.push(`${where}: parameter '${parameter.name}' is a binding pattern; the ${apiKind} API needs simple identifier parameters so @param can name them.`);
3510
3510
  continue;
3511
3511
  }
3512
3512
  if (isExempt(parameter)) continue;
@@ -3601,7 +3601,7 @@ function renderRuntimeApi(services, events, types, inheritedServices) {
3601
3601
  " *",
3602
3602
  " * The machine-readable cordis API catalog `cordis_inspect` serves to the",
3603
3603
  " * model: harness services (summary + public method signatures/JSDoc),",
3604
- " * harness events (mode + signature/JSDoc), and the inherited `ctx` surface. Produced by",
3604
+ " * harness events (mode + signature/JSDoc), and the inherited `ctx` API. Produced by",
3605
3605
  " * the same AST walk as docs/cordis-catalog, so this data and the rendered",
3606
3606
  " * docs cannot diverge.",
3607
3607
  " *",
@@ -3693,7 +3693,7 @@ function renderRuntimeApi(services, events, types, inheritedServices) {
3693
3693
  lines.push(` declaration: ${quote(type.declaration)},`);
3694
3694
  lines.push(" },");
3695
3695
  }
3696
- lines.push("]", "", "/** The inherited `ctx` surface (cordis core + loader/hmr/timer), in curated order. */", "export const INHERITED_CTX_API: readonly InheritedApiEntry[] = [");
3696
+ lines.push("]", "", "/** The inherited `ctx` API (cordis core + loader/hmr/timer), in curated order. */", "export const INHERITED_CTX_API: readonly InheritedApiEntry[] = [");
3697
3697
  for (const inherited of inheritedServices) lines.push(` { name: ${quote(inherited.name)}, summary: ${quote(inherited.summary)} },`);
3698
3698
  lines.push("]", "");
3699
3699
  return lines.join("\n");
@@ -3775,7 +3775,7 @@ const BANNER = [
3775
3775
  /** The shared GENERATED + freshness-gate + fence notice paragraph. */
3776
3776
  const GATE_NOTICE = "This file is GENERATED from source (`scripts/gen-cordis-catalog.ts`) and verified fresh by `pnpm run verify-cordis-catalog` (part of `doc-sync`) — do not edit it by hand. Signature blocks use a `ts cordis-catalog` fence and include the original source JSDoc immediately before each event or service method. doc-typecheck skips these bare declaration fragments; type names in a signature link to the page that documents them.";
3777
3777
  /**
3778
- * Render one page's generated `cordis-surface` region: the services mapped to
3778
+ * Render one page's generated Cordis API region: the services mapped to
3779
3779
  * the page, then the event scopes mapped to it, markers included. Pure and
3780
3780
  * deterministic given sorted inputs; identical bytes land in both pair sides.
3781
3781
  * @param page - the owning `docs/subsystems/` page basename, e.g. `core.md`.
@@ -3790,9 +3790,9 @@ function renderPageRegion(page, services, events, policy) {
3790
3790
  "",
3791
3791
  "<a id=\"cordis-surface\"></a>",
3792
3792
  "",
3793
- "## Cordis surface",
3793
+ "## Cordis API",
3794
3794
  "",
3795
- "Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — this section is byte-identical in both language sides of the page. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` surface lives in [cordis-api/inherited.md](../cordis-api/inherited.md).",
3795
+ "Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — this section is byte-identical in both language sides of the page. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).",
3796
3796
  ""
3797
3797
  ];
3798
3798
  for (const s of services) lines.push(...renderService(s, page, policy.linkedTypePages));
@@ -3813,7 +3813,7 @@ function renderPageRegion(page, services, events, policy) {
3813
3813
  function renderInheritedPage(policy) {
3814
3814
  const lines = [
3815
3815
  ...BANNER,
3816
- "# Inherited Cordis Surface",
3816
+ "# Inherited Cordis API",
3817
3817
  "",
3818
3818
  "The framework `ctx` members and events every plugin sees beyond the harness tier — pinned vendor source ([vendoring policy](../../vendor/README.md)), summarized tersely so the harness pages stay focused on repository-owned vocabulary. Detailed Context, Fiber, Registry, and Service APIs are generated in [context.md](context.md), [fiber.md](fiber.md), [registry.md](registry.md), and [service.md](service.md); the event-dispatch methods in [events.md](events.md).",
3819
3819
  "",
@@ -85,7 +85,7 @@ export declare class CordisCatalogProjector {
85
85
  */
86
86
  constructor(face: FaceModel, sourceDeclarations: readonly SourceDeclarationModel[], policy: CordisCatalogPolicy);
87
87
  /**
88
- * Validate and project the host model's Cordis surface.
88
+ * Validate and project the host model's Cordis API.
89
89
  * @returns every validated service and event projected from the host model.
90
90
  */
91
91
  project(): CordisCatalogModel;
@@ -128,7 +128,7 @@ export declare const REGION_BEGIN = "<!-- BEGIN GENERATED cordis-surface (gen-co
128
128
  /** Closing region delimiter matching {@link REGION_BEGIN}. */
129
129
  export declare const REGION_END = "<!-- END GENERATED cordis-surface -->";
130
130
  /**
131
- * Render one page's generated `cordis-surface` region: the services mapped to
131
+ * Render one page's generated Cordis API region: the services mapped to
132
132
  * the page, then the event scopes mapped to it, markers included. Pure and
133
133
  * deterministic given sorted inputs; identical bytes land in both pair sides.
134
134
  * @param page - the owning `docs/subsystems/` page basename, e.g. `core.md`.
@@ -49,7 +49,7 @@ export class CordisCatalogProjector {
49
49
  this.renderer = new TypeGraphRenderer(face.graph);
50
50
  }
51
51
  /**
52
- * Validate and project the host model's Cordis surface.
52
+ * Validate and project the host model's Cordis API.
53
53
  * @returns every validated service and event projected from the host model.
54
54
  */
55
55
  project() {
@@ -328,10 +328,10 @@ function parseJsDoc(raw) {
328
328
  returns,
329
329
  };
330
330
  }
331
- function checkParams(where, surface, parameters, tags, isExempt, violations) {
331
+ function checkParams(where, apiKind, parameters, tags, isExempt, violations) {
332
332
  for (const parameter of parameters) {
333
333
  if (parameter.binding !== 'identifier') {
334
- violations.push(`${where}: parameter '${parameter.name}' is a binding pattern; the ${surface} surface needs simple identifier parameters so @param can name them.`);
334
+ violations.push(`${where}: parameter '${parameter.name}' is a binding pattern; the ${apiKind} API needs simple identifier parameters so @param can name them.`);
335
335
  continue;
336
336
  }
337
337
  if (isExempt(parameter))
@@ -451,7 +451,7 @@ function renderRuntimeApi(services, events, types, inheritedServices) {
451
451
  ' *',
452
452
  ' * The machine-readable cordis API catalog `cordis_inspect` serves to the',
453
453
  ' * model: harness services (summary + public method signatures/JSDoc),',
454
- ' * harness events (mode + signature/JSDoc), and the inherited `ctx` surface. Produced by',
454
+ ' * harness events (mode + signature/JSDoc), and the inherited `ctx` API. Produced by',
455
455
  ' * the same AST walk as docs/cordis-catalog, so this data and the rendered',
456
456
  ' * docs cannot diverge.',
457
457
  ' *',
@@ -545,7 +545,7 @@ function renderRuntimeApi(services, events, types, inheritedServices) {
545
545
  lines.push(` declaration: ${quote(type.declaration)},`);
546
546
  lines.push(' },');
547
547
  }
548
- lines.push(']', '', '/** The inherited `ctx` surface (cordis core + loader/hmr/timer), in curated order. */', 'export const INHERITED_CTX_API: readonly InheritedApiEntry[] = [');
548
+ lines.push(']', '', '/** The inherited `ctx` API (cordis core + loader/hmr/timer), in curated order. */', 'export const INHERITED_CTX_API: readonly InheritedApiEntry[] = [');
549
549
  for (const inherited of inheritedServices) {
550
550
  lines.push(` { name: ${quote(inherited.name)}, summary: ${quote(inherited.summary)} },`);
551
551
  }
@@ -631,7 +631,7 @@ const BANNER = [
631
631
  /** The shared GENERATED + freshness-gate + fence notice paragraph. */
632
632
  const GATE_NOTICE = 'This file is GENERATED from source (`scripts/gen-cordis-catalog.ts`) and verified fresh by `pnpm run verify-cordis-catalog` (part of `doc-sync`) — do not edit it by hand. Signature blocks use a `ts cordis-catalog` fence and include the original source JSDoc immediately before each event or service method. doc-typecheck skips these bare declaration fragments; type names in a signature link to the page that documents them.';
633
633
  /**
634
- * Render one page's generated `cordis-surface` region: the services mapped to
634
+ * Render one page's generated Cordis API region: the services mapped to
635
635
  * the page, then the event scopes mapped to it, markers included. Pure and
636
636
  * deterministic given sorted inputs; identical bytes land in both pair sides.
637
637
  * @param page - the owning `docs/subsystems/` page basename, e.g. `core.md`.
@@ -646,9 +646,9 @@ export function renderPageRegion(page, services, events, policy) {
646
646
  '',
647
647
  '<a id="cordis-surface"></a>',
648
648
  '',
649
- '## Cordis surface',
649
+ '## Cordis API',
650
650
  '',
651
- 'Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — this section is byte-identical in both language sides of the page. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` surface lives in [cordis-api/inherited.md](../cordis-api/inherited.md).',
651
+ 'Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — this section is byte-identical in both language sides of the page. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).',
652
652
  '',
653
653
  ];
654
654
  for (const s of services)
@@ -673,7 +673,7 @@ export function renderPageRegion(page, services, events, policy) {
673
673
  export function renderInheritedPage(policy) {
674
674
  const lines = [
675
675
  ...BANNER,
676
- '# Inherited Cordis Surface',
676
+ '# Inherited Cordis API',
677
677
  '',
678
678
  'The framework `ctx` members and events every plugin sees beyond the harness tier — pinned vendor source ([vendoring policy](../../vendor/README.md)), summarized tersely so the harness pages stay focused on repository-owned vocabulary. Detailed Context, Fiber, Registry, and Service APIs are generated in [context.md](context.md), [fiber.md](fiber.md), [registry.md](registry.md), and [service.md](service.md); the event-dispatch methods in [events.md](events.md).',
679
679
  '',
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public surface of the Typert analyzer, compiler-independent model, and
2
+ * Public API of the Typert analyzer, compiler-independent model, and
3
3
  * model-driven artifact emitters. Build wiring lives in the `./tsdown`
4
4
  * subpath.
5
5
  * @module @deepseek-ai/dsh-typert-generator
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public surface of the Typert analyzer, compiler-independent model, and
2
+ * Public API of the Typert analyzer, compiler-independent model, and
3
3
  * model-driven artifact emitters. Build wiring lives in the `./tsdown`
4
4
  * subpath.
5
5
  * @module @deepseek-ai/dsh-typert-generator
@@ -68,7 +68,7 @@ export declare class TypeGraphRenderer {
68
68
  renderDeclaration(id: SymbolId): string;
69
69
  /**
70
70
  * Find the transitive declaration closure referenced by members.
71
- * @param memberIds - business-surface member ids.
71
+ * @param memberIds - business-API member ids.
72
72
  * @returns declarations in graph order, excluding no roots implicitly.
73
73
  */
74
74
  declarationClosureForMembers(memberIds: readonly string[]): TypeDeclarationModel[];
@@ -218,7 +218,7 @@ export class TypeGraphRenderer {
218
218
  }
219
219
  /**
220
220
  * Find the transitive declaration closure referenced by members.
221
- * @param memberIds - business-surface member ids.
221
+ * @param memberIds - business-API member ids.
222
222
  * @returns declarations in graph order, excluding no roots implicitly.
223
223
  */
224
224
  declarationClosureForMembers(memberIds) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-typert-generator",
3
3
  "description": "TypeScript project analyzer and model-driven Typert artifact generator",
4
- "version": "0.0.1-rc.1",
4
+ "version": "0.0.1-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -41,14 +41,14 @@
41
41
  "typescript": "^6.0.3"
42
42
  },
43
43
  "peerDependencies": {
44
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
45
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
44
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
45
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "zod": "^4.4.3",
49
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
50
- "@deepseek-ai/dsh-tool-cordis": "^0.0.1-rc.1",
51
- "@deepseek-ai/dsh-typert-registry": "^0.0.1-rc.1",
52
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
49
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
50
+ "@deepseek-ai/dsh-typert-registry": "^0.0.1-rc.2",
51
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
52
+ "@deepseek-ai/dsh-tool-cordis": "^0.0.1-rc.2"
53
53
  }
54
54
  }