@volter/twin-standard 1.0.151 → 1.0.152

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.
@@ -527,8 +527,11 @@ export async function fixedFiles(dir) {
527
527
  if (!existsSync(join(dir, 'src', 'stream.ts'))) {
528
528
  // a unit whose spec is a proto (derive-pack generated its schema) is served over gRPC: its serve seam in that form
529
529
  const lanesOnly = !hasOwnSurface(dir) && readdirSync(dir).some((n) => existsSync(join(dir, n, 'src', 'manifest.ts')));
530
- files['src/server.ts'] = serverFile(vendor, !lanesOnly && existsSync(join(dir, 'src', 'generated', 'proto.gen.json')));
531
- files['src/cli.ts'] = cliFile(vendor);
530
+ const grpc = !lanesOnly && existsSync(join(dir, 'src', 'generated', 'proto.gen.json'));
531
+ // a unit that takes broadcasts over RTMP (its manifest's `live`) has the live forms --index writes, so they reproduce
532
+ const live = !grpc && Boolean(manifest?.live?.length);
533
+ files['src/server.ts'] = serverFile(vendor, grpc, false, live);
534
+ files['src/cli.ts'] = cliFile(vendor, live);
532
535
  }
533
536
  return files;
534
537
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/twin-standard",
3
- "version": "1.0.151",
3
+ "version": "1.0.152",
4
4
  "description": "The Protocol 3 standard for Volter twin packs: the criteria a pack is graded by, the grader, the gate a pack repository and the twin catalog run on every change and submission, and the spec derivation the grade checks against. Pin a version: every place a pack is judged judges by that standard.",
5
5
  "keywords": [
6
6
  "twin",
@@ -75,7 +75,7 @@
75
75
  "yaml": "2.9.0"
76
76
  },
77
77
  "peerDependencies": {
78
- "@volter/world-core": "3.0.158",
78
+ "@volter/world-core": "3.0.159",
79
79
  "@volter/world-runtime": "*",
80
80
  "playwright": "^1.63.0"
81
81
  },
@@ -513,15 +513,18 @@ export function laneInitFiles(vendor: string, lanes: string[]): Record<string, s
513
513
  export async function fixedFiles(dir: string): Promise<Record<string, string>> {
514
514
  const files: Record<string, string> = { 'src/fetch.ts': packFetchFile(dir, fetchName(dir)) };
515
515
  if (!existsSync(join(dir, 'package.json'))) return files;
516
- const { manifest } = await import(join(dir, 'src', 'manifest.ts')) as { manifest?: { vendor?: string } };
516
+ const { manifest } = await import(join(dir, 'src', 'manifest.ts')) as { manifest?: { vendor?: string; live?: unknown[] } };
517
517
  const vendor = manifest?.vendor;
518
518
  if (!vendor || !/^[a-z][a-z0-9-]*$/.test(vendor)) throw new Error('Pack manifest must declare its vendor identity independently of the npm package name');
519
519
  files['src/index.ts'] = packIndexFile(dir, vendor);
520
520
  if (!existsSync(join(dir, 'src', 'stream.ts'))) {
521
521
  // a unit whose spec is a proto (derive-pack generated its schema) is served over gRPC: its serve seam in that form
522
522
  const lanesOnly = !hasOwnSurface(dir) && readdirSync(dir).some((n) => existsSync(join(dir, n, 'src', 'manifest.ts')));
523
- files['src/server.ts'] = serverFile(vendor, !lanesOnly && existsSync(join(dir, 'src', 'generated', 'proto.gen.json')));
524
- files['src/cli.ts'] = cliFile(vendor);
523
+ const grpc = !lanesOnly && existsSync(join(dir, 'src', 'generated', 'proto.gen.json'));
524
+ // a unit that takes broadcasts over RTMP (its manifest's `live`) has the live forms --index writes, so they reproduce
525
+ const live = !grpc && Boolean(manifest?.live?.length);
526
+ files['src/server.ts'] = serverFile(vendor, grpc, false, live);
527
+ files['src/cli.ts'] = cliFile(vendor, live);
525
528
  }
526
529
  return files;
527
530
  }