toilscript 0.1.46 → 0.1.48

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "imports": {
3
- "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.46/dist/toilscript.js",
4
- "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.46/dist/cli.js",
3
+ "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.48/dist/toilscript.js",
4
+ "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.48/dist/cli.js",
5
5
  "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
6
6
  "long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
7
7
  }
@@ -3129,9 +3129,10 @@ declare module "types:toilscript/src/parser" {
3129
3129
  /**
3130
3130
  * Wire `@service` classes and free `@remote` functions onto the global `Rpc` registry. Runs ONCE
3131
3131
  * before element creation (via `weaveDataMigrations`). `@service` could be done at parse time, but
3132
- * folding both here gives a SINGLE place to honor the `@stream` gating: a project using `@stream`
3133
- * cannot declare `@service`/`@remote` (the 9003 diagnostic fires at element creation), so we must not
3134
- * half-inject first or the build crashes instead of reporting it.
3132
+ * folding both here gives a SINGLE place to honor the same-source `@stream` rule: ONE source cannot
3133
+ * declare both `@stream` and `@service`/`@remote`, so we SKIP the RPC weave for any source that also has
3134
+ * a `@stream` - weaving it would half-inject an unresolvable import and crash instead of letting
3135
+ * enforceStreamServiceExclusion report it. (`@stream` + `@service`/`@remote` DO coexist across tiers.)
3135
3136
  */
3136
3137
  private weaveRpc;
3137
3138
  /** Reject duplicate client-facing `Server` keys (two @services lowercasing to the same key, a free
@@ -3139,8 +3140,8 @@ declare module "types:toilscript/src/parser" {
3139
3140
  * surface is emitted - else the generated `Server` object/type silently overwrites a key, or a collided
3140
3141
  * id routes to the wrong method at dispatch. */
3141
3142
  private checkRpcSurfaceCollisions;
3142
- /** True if the program declares any `@stream` class (gates the RPC weave; see diagnostic 9003). */
3143
- private projectHasStream;
3143
+ /** True if `source` declares any `@stream` class (the RPC weave skips such a source; diagnostic 9003). */
3144
+ private sourceHasStream;
3144
3145
  /** Inject the RPC dispatch fn + its registration for one free `@remote` function (id = FNV of the
3145
3146
  * bare function name, matching the generated client). */
3146
3147
  private injectRemote;
@@ -3677,12 +3678,11 @@ declare module "types:toilscript/src/program" {
3677
3678
  /** Initializes the program and its elements prior to compilation. */
3678
3679
  initialize(): void;
3679
3680
  /**
3680
- * Enforces the project-wide rule that a compilation unit using `@stream` cannot also
3681
- * declare `@service` or `@remote` anywhere (spec 03 section 4.4). The host loads one
3682
- * `hot.wasm` whose surface is either a stream node or an RPC service node, never both,
3683
- * so mixing them is a deploy-time ambiguity caught fail-closed at compile time. Reported
3684
- * at the offending `@service`/`@remote` site. Skipped in cold mode (neither flag is
3685
- * admitted there anyway).
3681
+ * Enforces that a SINGLE source (one emitted surface) cannot declare BOTH `@stream` AND
3682
+ * `@service`/`@remote`: the host loads one artifact whose surface is either a stream node or an RPC
3683
+ * service node, never both. `@stream` and `@service`/`@remote` DO coexist across separate tier files
3684
+ * (main.ts vs main.stream.ts); only the same-source clash is the deploy-time ambiguity caught here.
3685
+ * Reported at the offending `@service`/`@remote` site. Skipped in cold mode.
3686
3686
  */
3687
3687
  private enforceStreamServiceExclusion;
3688
3688
  /** Processes overridden members by this class in a base class. */