@volter/twin-standard 1.0.90 → 1.0.92

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.
Files changed (41) hide show
  1. package/README.md +13 -3
  2. package/dist/src/assessment.d.ts +43 -0
  3. package/dist/src/assessment.js +10 -2
  4. package/dist/src/cli.js +25 -2
  5. package/dist/src/clients/anthropic.first-use.json +17 -0
  6. package/dist/src/clients/clerk.first-use.json +21 -0
  7. package/dist/src/clients/cloudflare.first-use.json +21 -0
  8. package/dist/src/clients/github.first-use.json +21 -0
  9. package/dist/src/clients/openai.first-use.json +17 -0
  10. package/dist/src/clients/resend.first-use.json +25 -0
  11. package/dist/src/clients/run.js +2 -0
  12. package/dist/src/clients/slack.first-use.json +21 -0
  13. package/dist/src/clients/stripe.first-use.json +21 -0
  14. package/dist/src/clients/supabase.first-use.json +21 -0
  15. package/dist/src/clients/tavily.first-use.json +17 -0
  16. package/dist/src/clients/upstash.first-use.json +21 -0
  17. package/dist/src/conformance.js +2 -0
  18. package/dist/src/consumer.d.ts +67 -0
  19. package/dist/src/consumer.js +190 -0
  20. package/dist/src/index.d.ts +1 -0
  21. package/dist/src/index.js +1 -0
  22. package/dist/src/protocol-3.js +1 -1
  23. package/package.json +2 -2
  24. package/src/assessment.ts +7 -3
  25. package/src/cli.ts +19 -2
  26. package/src/clients/anthropic.first-use.json +17 -0
  27. package/src/clients/clerk.first-use.json +21 -0
  28. package/src/clients/cloudflare.first-use.json +21 -0
  29. package/src/clients/github.first-use.json +21 -0
  30. package/src/clients/openai.first-use.json +17 -0
  31. package/src/clients/resend.first-use.json +25 -0
  32. package/src/clients/run.ts +1 -0
  33. package/src/clients/slack.first-use.json +21 -0
  34. package/src/clients/stripe.first-use.json +21 -0
  35. package/src/clients/supabase.first-use.json +21 -0
  36. package/src/clients/tavily.first-use.json +17 -0
  37. package/src/clients/upstash.first-use.json +21 -0
  38. package/src/conformance.ts +1 -0
  39. package/src/consumer.ts +168 -0
  40. package/src/index.ts +1 -0
  41. package/src/protocol-3.ts +1 -1
@@ -0,0 +1,190 @@
1
+ // The installed customer entry into a pack's life. The CLI owns World lifetime; these are caller steps.
2
+ import { createHash } from 'node:crypto';
3
+ import { existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, statSync, writeFileSync } from 'node:fs';
4
+ import { createRequire } from 'node:module';
5
+ import { basename, dirname, isAbsolute, join, resolve } from 'node:path';
6
+ import { spawn } from 'node:child_process';
7
+ import { fileURLToPath } from 'node:url';
8
+ import { standardPackageFile } from "./package-file.js";
9
+ /** Bind behavior inputs on both source and packed layouts; compiled outputs and score caches are not inputs. */
10
+ export function consumerSourceDigest(pack) {
11
+ const entries = [];
12
+ const cache = new Set(['journeys/score.json', 'journeys/coverage.json']);
13
+ const scan = (path) => {
14
+ if (cache.has(path))
15
+ return;
16
+ const at = join(pack, path);
17
+ if (statSync(at).isDirectory()) {
18
+ for (const name of readdirSync(at).sort())
19
+ if (name !== 'node_modules')
20
+ scan(`${path}/${name}`);
21
+ }
22
+ else
23
+ entries.push([path, createHash('sha256').update(readFileSync(at)).digest('hex')]);
24
+ };
25
+ for (const name of readdirSync(pack).sort()) {
26
+ const at = join(pack, name);
27
+ if (['src', 'spec', 'journeys', 'vendor', 'assets', 'static'].includes(name) || statSync(at).isDirectory() && existsSync(join(at, 'src/manifest.ts')))
28
+ scan(name);
29
+ }
30
+ return createHash('sha256').update(JSON.stringify(entries)).digest('hex');
31
+ }
32
+ /** A pack supplies its own entry journey; older immutable releases use a versioned standard fixture. */
33
+ export function consumerRecipe(vendor, packDir) {
34
+ if (!/^[a-z][a-z0-9-]*$/.test(vendor))
35
+ throw new Error('Invalid consumer vendor identity');
36
+ const root = dirname(fileURLToPath(standardPackageFile('package.json')));
37
+ const supplied = packDir ? join(packDir, 'journeys/first-use.json') : undefined;
38
+ const path = supplied && existsSync(supplied) ? supplied : join(root, 'src/clients', `${vendor}.first-use.json`);
39
+ if (!existsSync(path))
40
+ throw new Error(`${vendor} has no installed customer workflow in this standard`);
41
+ const recipe = JSON.parse(readFileSync(path, 'utf8'));
42
+ const command = (value) => Array.isArray(value) && value.length > 0 && value.every((part) => typeof part === 'string' && part.length > 0);
43
+ if (recipe.schemaVersion !== 1 || typeof recipe.source !== 'string' || !recipe.source || typeof recipe.about !== 'string' || !recipe.about || !recipe.files || typeof recipe.files !== 'object' || Array.isArray(recipe.files) || !recipe.files['package.json'] || typeof recipe.files['.env.example'] !== 'string' || !command(recipe.run))
44
+ throw new Error('Incomplete installed customer workflow');
45
+ if (!recipe.retention || ('none' in recipe.retention) === ('readback' in recipe.retention) || ('none' in recipe.retention ? typeof recipe.retention.none !== 'string' || !recipe.retention.none.trim() : !command(recipe.retention.readback)))
46
+ throw new Error('Workflow needs retained-state readback or a stateless explanation');
47
+ if (recipe.clock && (!Number.isFinite(Date.parse(recipe.clock.at)) || recipe.clock.advanceAfterRun !== undefined && (!/^\d+(?:\.\d+)?[smhd]$/.test(recipe.clock.advanceAfterRun) || !('readback' in recipe.retention))))
48
+ throw new Error('Consumer clock needs an instant and, for a stored result, an optional advance before inspection');
49
+ return recipe;
50
+ }
51
+ /** Materialize only a new caller-owned app. Normal dependency installation happens before offline assessment. */
52
+ export function prepareConsumerApp(packDir, appDir) {
53
+ const facts = JSON.parse(readFileSync(join(packDir, 'generated/pack-facts.json'), 'utf8'));
54
+ const vendor = Object.keys(facts.packs ?? {})[0];
55
+ if (!vendor || Object.keys(facts.packs).length !== 1)
56
+ throw new Error('Consumer preparation requires one artifact vendor identity');
57
+ const recipe = consumerRecipe(vendor, packDir);
58
+ if (existsSync(appDir))
59
+ throw new Error('Consumer app must be a new directory');
60
+ const app = JSON.parse(recipe.files['package.json']);
61
+ if (app.scripts || app.workspaces)
62
+ throw new Error('Consumer fixture supplies direct SDK commands, not install scripts or workspace links');
63
+ for (const [name, version] of Object.entries({ ...app.dependencies, ...app.devDependencies, ...app.optionalDependencies })) {
64
+ if (typeof version !== 'string' || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(version))
65
+ throw new Error(`${name}: customer SDK dependencies require exact registry versions`);
66
+ }
67
+ const files = Object.entries(recipe.files).map(([path, content]) => {
68
+ if (isAbsolute(path) || path.includes('\\') || path.split('/').some((part) => !part || part === '.' || part === '..') || path.split('/').includes('node_modules') || ['.env', '.npmrc', '.volter/world.json'].includes(path))
69
+ throw new Error(`Invalid consumer file: ${path}`);
70
+ if (typeof content !== 'string')
71
+ throw new Error('Consumer files must contain text');
72
+ return [path, content];
73
+ });
74
+ mkdirSync(appDir, { recursive: true });
75
+ for (const [path, content] of files) {
76
+ mkdirSync(dirname(join(appDir, path)), { recursive: true });
77
+ writeFileSync(join(appDir, path), content);
78
+ }
79
+ return { recipeSha256: createHash('sha256').update(JSON.stringify(recipe)).digest('hex'), dependencies: app.dependencies ?? {} };
80
+ }
81
+ export async function runConsumerWorkflow(packDir, options) {
82
+ if (!isAbsolute(options.appDir) || !isAbsolute(options.cli) || !/^sha512-[A-Za-z0-9+/]{86}==$/.test(options.artifactIntegrity))
83
+ throw new Error('Consumer requires absolute prepared paths and candidate SHA-512 integrity');
84
+ if (existsSync(join(options.appDir, '.volter/world.json')))
85
+ throw new Error('Consumer app already has a World; prepare a new app rather than reusing prior state');
86
+ const packageVersion = (entry, name) => {
87
+ let directory = dirname(entry);
88
+ while (true) {
89
+ const file = join(directory, 'package.json');
90
+ if (existsSync(file)) {
91
+ const pkg = JSON.parse(readFileSync(file, 'utf8'));
92
+ if (pkg.name === name)
93
+ return pkg.version;
94
+ }
95
+ const parent = dirname(directory);
96
+ if (parent === directory)
97
+ throw new Error(`${name} has no installed package identity`);
98
+ directory = parent;
99
+ }
100
+ };
101
+ const cliEntry = realpathSync(options.cli);
102
+ const cliRequire = createRequire(cliEntry);
103
+ const tools = {
104
+ '@volter/world': packageVersion(cliEntry, '@volter/world'),
105
+ '@volter/world-core': packageVersion(cliRequire.resolve('@volter/world-core/runtime'), '@volter/world-core'),
106
+ '@volter/world-runtime': packageVersion(cliRequire.resolve('@volter/world-runtime'), '@volter/world-runtime'),
107
+ };
108
+ const metadata = JSON.parse(readFileSync(join(packDir, 'package.json'), 'utf8'));
109
+ const facts = JSON.parse(readFileSync(join(packDir, 'generated/pack-facts.json'), 'utf8'));
110
+ const vendor = Object.keys(facts.packs ?? {})[0];
111
+ if (!vendor || Object.keys(facts.packs).length !== 1)
112
+ throw new Error('Consumer workflow requires one selected artifact identity');
113
+ const recipe = consumerRecipe(vendor, packDir);
114
+ const commands = [];
115
+ const failures = [];
116
+ const run = async (label, args) => {
117
+ const result = await new Promise((done) => {
118
+ const child = spawn(options.cli, ['world', ...args], { cwd: options.appDir, env: process.env, stdio: ['ignore', 'pipe', 'pipe'] });
119
+ let stdout = '', stderr = '';
120
+ child.stdout.on('data', (chunk) => { stdout += chunk; });
121
+ child.stderr.on('data', (chunk) => { stderr += chunk; });
122
+ child.on('error', (error) => done({ exitCode: 1, stdout, stderr: `${stderr}\n${error.message}` }));
123
+ child.on('close', (exitCode) => done({ exitCode, stdout, stderr }));
124
+ });
125
+ commands.push({ label, argv: [options.cli, 'world', ...args], ...result });
126
+ if (result.exitCode !== 0)
127
+ throw new Error(`${label} exited ${result.exitCode}: ${result.stderr.trim().split('\n')[0] ?? ''}`);
128
+ return result.stdout;
129
+ };
130
+ let upAttempted = false;
131
+ let retainedReadback = false;
132
+ let teardownVerified = false;
133
+ try {
134
+ await run('init', ['init', '--twins', vendor]);
135
+ const config = JSON.parse(readFileSync(join(options.appDir, '.volter/world.json'), 'utf8'));
136
+ if (!config.services?.some((service) => service.source?.package === metadata.name && service.source?.version === metadata.version))
137
+ throw new Error('World init did not select the installed candidate package and exact version');
138
+ upAttempted = true;
139
+ await run('up', ['up']);
140
+ if (recipe.clock)
141
+ await run('clock-set', ['clock', 'set', recipe.clock.at]);
142
+ await run('sdk', ['run', '--', ...recipe.run]);
143
+ if ('readback' in recipe.retention) {
144
+ if (recipe.clock?.advanceAfterRun) {
145
+ await run('clock-advance', ['clock', 'advance', recipe.clock.advanceAfterRun]);
146
+ await run('inspect-timed-result', ['run', '--', ...recipe.retention.readback]);
147
+ }
148
+ const before = JSON.parse(await run('log-before-stop', ['log', '--json']));
149
+ await run('stop', ['down']);
150
+ await run('resume', ['up']);
151
+ const resumed = JSON.parse(await run('log-after-resume', ['log', '--json']));
152
+ if (JSON.stringify(before) !== JSON.stringify(resumed))
153
+ throw new Error('Resume changed recorded application state before readback');
154
+ await run('retained-readback', ['run', '--', ...recipe.retention.readback]);
155
+ const after = JSON.parse(await run('log-after-readback', ['log', '--json']));
156
+ if (JSON.stringify(before) !== JSON.stringify(after))
157
+ throw new Error('Retained readback added mutations; it must only inspect existing state');
158
+ retainedReadback = true;
159
+ }
160
+ }
161
+ catch (error) {
162
+ failures.push(error.message);
163
+ }
164
+ finally {
165
+ if (upAttempted) {
166
+ try {
167
+ await run('final-stop', ['down']);
168
+ const status = JSON.parse(await run('final-status', ['status', '--json']));
169
+ if (status.running || Object.values(status.services ?? {}).some((service) => service.running))
170
+ throw new Error('Consumer World still reports running compute');
171
+ teardownVerified = true;
172
+ }
173
+ catch (error) {
174
+ failures.push(error.message);
175
+ }
176
+ }
177
+ }
178
+ return {
179
+ measured: true, passed: failures.length === 0 && teardownVerified,
180
+ scope: 'Exact installed artifact; normal CLI initialization, unchanged SDK, result assertions and retained-state read-only resume where applicable',
181
+ package: metadata.name, version: metadata.version, integrity: options.artifactIntegrity,
182
+ tools,
183
+ sourceInputsSha256: consumerSourceDigest(packDir), recipeSha256: createHash('sha256').update(JSON.stringify(recipe)).digest('hex'),
184
+ fixture: existsSync(join(packDir, 'journeys/first-use.json')) ? 'journeys/first-use.json' : `standard/clients/${vendor}.first-use.json`, appDir: resolve(options.appDir), appName: basename(options.appDir),
185
+ commands, failures, teardownVerified, retainedReadback,
186
+ clock: recipe.clock ?? { mode: 'wall' },
187
+ ...('none' in recipe.retention ? { retentionNotApplicable: recipe.retention.none } : {}),
188
+ node: process.versions.node, at: new Date().toISOString(),
189
+ };
190
+ }
@@ -11,3 +11,4 @@ export { compilePackFacts, renderPackFacts, type PackFacts, type PackFactsFile }
11
11
  export { assessPack, type AssessmentOptions } from './assessment.js';
12
12
  export { createPack } from './create-pack.js';
13
13
  export { verifyBrowserTransport } from './browser-verification.js';
14
+ export { consumerRecipe, prepareConsumerApp, runConsumerWorkflow, consumerSourceDigest, type ConsumerRecipe, type ConsumerOptions } from './consumer.js';
package/dist/src/index.js CHANGED
@@ -15,3 +15,4 @@ export { compilePackFacts, renderPackFacts } from "./pack-facts.js";
15
15
  export { assessPack } from "./assessment.js";
16
16
  export { createPack } from "./create-pack.js";
17
17
  export { verifyBrowserTransport } from "./browser-verification.js";
18
+ export { consumerRecipe, prepareConsumerApp, runConsumerWorkflow, consumerSourceDigest } from "./consumer.js";
@@ -145,7 +145,7 @@ function srcFileInForm(unit, name) {
145
145
  const SEMANTICS_FIXED = new Set(['answer-views.ts', 'states.ts', 'index.ts', 'shared.ts', 'doors.ts', 'seed.ts', 'around.ts', 'events.ts', 'clock.ts', 'tenant.ts', 'scenario.ts', 'gap.ts', 'graphql.ts', 'sockets.ts', 'board.ts']);
146
146
  /** journeys/'s closed set. */
147
147
  const JOURNEY_FILES = new Set(['customer-life.outline.md', 'customer-life.outline.verdict.json', 'customer-life.json', 'customer-life.verdict.json', 'decisions.json',
148
- 'vendor-examples.json', 'vendor-examples.verdict.json', 'demand.json', 'unreachable.json', 'score.json', 'coverage.json',
148
+ 'vendor-examples.json', 'vendor-examples.verdict.json', 'demand.json', 'unreachable.json', 'score.json', 'coverage.json', 'first-use.json',
149
149
  // a generative pack's life names the World's scenario it walks under (architecture, "Writing a life")
150
150
  'scenario.json']);
151
151
  /** Only scenario basenames the two walks explicitly declare extend the closed layout. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/twin-standard",
3
- "version": "1.0.90",
3
+ "version": "1.0.92",
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.98",
78
+ "@volter/world-core": "3.0.100",
79
79
  "@volter/world-runtime": "*",
80
80
  "playwright": "^1.63.0"
81
81
  },
package/src/assessment.ts CHANGED
@@ -8,12 +8,13 @@ import { conformance } from './conformance.ts';
8
8
  import { inMemoryWorld, walk, withPinnedWorldDraws, usePacks, type ServedTwin } from './walk/behavior-journey.ts';
9
9
  import { compilePackFacts } from './pack-facts.ts';
10
10
  import { expandFills, type Journey } from './walk/journey-kit.ts';
11
+ import { runConsumerWorkflow, type ConsumerOptions } from './consumer.ts';
11
12
 
12
13
  const canonical = (value: unknown): unknown => value && typeof value === 'object' ? Array.isArray(value) ? value.map(canonical) : Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)).map(([key, item]) => [key, canonical(item)])) : value;
13
14
  const json = (value: unknown) => JSON.stringify(canonical(value));
14
15
  const hash = (value: unknown) => createHash('sha256').update(json(value)).digest('hex');
15
16
  const read = (file: string) => JSON.parse(readFileSync(file, 'utf8'));
16
- export type AssessmentOptions = { browser?: boolean; conformance?: boolean };
17
+ export type AssessmentOptions = { browser?: boolean; conformance?: boolean; consumer?: ConsumerOptions };
17
18
 
18
19
  /** Surface coverage counts actual kernel dispatch, and retains every declared gap in the denominator. */
19
20
  export async function assessPack(packDir: string, options: AssessmentOptions = {}) {
@@ -88,6 +89,9 @@ export async function assessPack(packDir: string, options: AssessmentOptions = {
88
89
  } finally { await transport.stop(); }
89
90
  }
90
91
  const conform = options.conformance === false ? null : await conformance(packDir);
91
- const ready = gates.length > 0 && gates.every((gate) => !gate.failures.length) && !quick.failures.length && replayEqual && conform !== null && conform.length > 0 && conform.every((result) => !result.failures.length) && (!options.browser || !httpOnly || browser.measured === true && (browser.failures as unknown[]).length === 0 && (browser.replay as { equal: boolean }).equal);
92
- return { schemaVersion: 1, vendor, package: manifest.name, version: manifest.version, ready, gates: gates.map((gate) => ({ ...gate, unit: gate.unit === packDir ? vendor : `${vendor}/${gate.unit.slice(packDir.length + 1)}` })), quick, browser, conformance: conform };
92
+ let consumer;
93
+ try { consumer = options.consumer ? await runConsumerWorkflow(packDir, options.consumer) : { measured: false, passed: false, failures: ['Installed customer workflow was not prepared'] }; }
94
+ catch (error) { consumer = { measured: false, passed: false, failures: [(error as Error).message] }; }
95
+ const ready = gates.length > 0 && gates.every((gate) => !gate.failures.length) && !quick.failures.length && replayEqual && conform !== null && conform.length > 0 && conform.every((result) => !result.failures.length) && consumer.measured && consumer.passed && (!options.browser || !httpOnly || browser.measured === true && (browser.failures as unknown[]).length === 0 && (browser.replay as { equal: boolean }).equal);
96
+ return { schemaVersion: 1, vendor, package: manifest.name, version: manifest.version, ready, gates: gates.map((gate) => ({ ...gate, unit: gate.unit === packDir ? vendor : `${vendor}/${gate.unit.slice(packDir.length + 1)}` })), quick, browser, conformance: conform, consumer };
93
97
  }
package/src/cli.ts CHANGED
@@ -24,7 +24,7 @@ import { gatePublished } from './published.ts';
24
24
 
25
25
  const [command, ...args] = process.argv.slice(2);
26
26
  const usage = (): never => {
27
- console.error('usage: twin-standard gate <repo> [units…] | gate-published <name>@<version>… [--registry <url>] | grade <unit>… [--static] [--form] | derive <unit> [--out <dir>] | read-page <url> [--raw] | check-sources <unit> [--recheck] | conform <pack dir> | <name>@<version> [--registry <url>] | create <dir> --init <vendor> --package <@scope/name> | create <unit> --index | facts <pack dir> [--out <file>] | assess <pack dir> [--browser] [--out <file>] | --version');
27
+ console.error('usage: twin-standard gate <repo> [units…] | gate-published <name>@<version>… [--registry <url>] | grade <unit>… [--static] [--form] | derive <unit> [--out <dir>] | read-page <url> [--raw] | check-sources <unit> [--recheck] | conform <pack dir> | <name>@<version> [--registry <url>] | create <dir> --init <vendor> --package <@scope/name> | create <unit> --index | facts <pack dir> [--out <file>] | prepare-consumer <pack dir> --app <new dir> --cli <volter executable> --integrity <sha512> --out <json> | assess <pack dir> --prepared-consumer <json> [--browser] [--out <file>] | --version');
28
28
  process.exit(2);
29
29
  };
30
30
 
@@ -73,10 +73,27 @@ if (command === '--version') {
73
73
  } else if (command === 'create') {
74
74
  if (args.includes('--init') && !args.includes('--package')) throw new Error('Name your scoped package with --package');
75
75
  await (await import('./create-pack.ts')).createPack(args);
76
+ } else if (command === 'prepare-consumer') {
77
+ if (!args[0]) usage();
78
+ const value = (name: string) => { const at = args.indexOf(name); if (at < 0 || !args[at + 1]) usage(); return args[at + 1]!; };
79
+ const appDir = resolve(value('--app'));
80
+ const cli = resolve(value('--cli'));
81
+ const artifactIntegrity = value('--integrity');
82
+ if (!/^sha512-[A-Za-z0-9+/]{86}==$/.test(artifactIntegrity)) throw new Error('Consumer preparation requires candidate SHA-512 integrity');
83
+ const out = resolve(value('--out'));
84
+ if (existsSync(out)) throw new Error('Prepared consumer output already exists');
85
+ const { prepareConsumerApp } = await import('./consumer.ts');
86
+ const fixture = prepareConsumerApp(resolve(args[0]!), appDir);
87
+ const { writeFileSync } = await import('node:fs');
88
+ writeFileSync(out, JSON.stringify({ appDir, cli, artifactIntegrity }, null, 2) + '\n');
89
+ console.log(JSON.stringify({ appDir, fixture, preparedConsumer: out, next: 'Install the app SDK dependencies with scripts disabled before assessing inside a World' }));
76
90
  } else if (command === 'assess') {
77
91
  if (!args[0]) usage();
78
92
  const { assessPack } = await import('./assessment.ts');
79
- const report = await assessPack(resolve(args[0]!), { browser: args.includes('--browser') });
93
+ const consumerAt = args.indexOf('--prepared-consumer');
94
+ if (consumerAt >= 0 && !args[consumerAt + 1]) usage();
95
+ const consumer = consumerAt >= 0 ? JSON.parse(readFileSync(resolve(args[consumerAt + 1]!), 'utf8')) : undefined;
96
+ const report = await assessPack(resolve(args[0]!), { browser: args.includes('--browser'), ...(consumer ? { consumer } : {}) });
80
97
  const at = args.indexOf('--out');
81
98
  if (at >= 0) {
82
99
  if (!args[at + 1]) usage();
@@ -0,0 +1,17 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/@anthropic-ai/sdk/v/0.131.0",
4
+ "about": "Use the official SDK for Messages and streaming, checking the explicitly labeled model stub.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"anthropic-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@anthropic-ai/sdk\": \"0.131.0\"\n }\n}\n",
7
+ ".env.example": "ANTHROPIC_API_KEY=\n",
8
+ "app.mjs": "import Anthropic from '@anthropic-ai/sdk';\nimport assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nassert.ok(process.env.VOLTER_WORLD, 'must run in the World');\nconst client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, maxRetries:0 });\nconst input = {model:'claude-sonnet-4-5', max_tokens:128, messages:[{role:'user',content:'first-user deterministic fixture'}]};\nconst response = await client.messages.create(input);\nconst text = response.content.filter(x=>x.type==='text').map(x=>x.text).join('');\nassert.match(text,/\\[twin-stub:/);\nassert.equal(response.role,'assistant');\nassert.equal(response.stop_reason,'end_turn');\nlet streamed='';\nfor await (const event of await client.messages.create({...input,stream:true})) if (event.type==='content_block_delta' && event.delta.type==='text_delta') streamed+=event.delta.text;\nassert.equal(streamed,text);\nconst receipt={passed:true,scope:'unchanged official Anthropic SDK non-streamed and streamed Messages; labeled deterministic stub, no prose quality claim',};\nwriteFileSync('first-use-receipt.json',JSON.stringify(receipt,null,2)+'\\n');console.log(JSON.stringify(receipt));\n"
9
+ },
10
+ "run": [
11
+ "node",
12
+ "app.mjs"
13
+ ],
14
+ "retention": {
15
+ "none": "This workflow requests an unstored message and stream; it creates no vendor resource to read after restart."
16
+ }
17
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/@clerk/backend/v/2.33.3",
4
+ "about": "A first user creates a user and organization, adds a member, verifies a signed session token and removes the member; after resume the original owner and membership remain.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"clerk-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@clerk/backend\": \"2.33.3\"\n }\n}\n",
7
+ ".env.example": "CLERK_SECRET_KEY=\nCLERK_PUBLISHABLE_KEY=\nCLERK_JWT_KEY=\n",
8
+ "workflow.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport { createClerkClient, verifyToken } from '@clerk/backend';\n\nassert.ok(process.env.VOLTER_WORLD);\nconst clerk = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY });\nawait clerk.instance.updateOrganizationSettings({ enabled: true });\nconst owner = await clerk.users.createUser({ emailAddress: ['owner@catalog-clerk.example'], firstName: 'First', skipPasswordRequirement: true });\nconst org = await clerk.organizations.createOrganization({ name: 'Catalog first user', createdBy: owner.id });\nconst guest = await clerk.users.createUser({ emailAddress: ['member@catalog-clerk.example'], firstName: 'Member', skipPasswordRequirement: true });\nawait clerk.organizations.createOrganizationMembership({ organizationId: org.id, userId: guest.id, role: 'org:member' });\nconst before = await clerk.organizations.getOrganizationMembershipList({ organizationId: org.id, limit: 100 });\nassert.equal(before.totalCount, 2);\nassert.ok(before.data.some(member => member.publicUserData.userId === guest.id));\nconst session = await clerk.sessions.createSession({ userId: guest.id });\nconst { jwt } = await clerk.sessions.getToken(session.id);\nconst payload = await verifyToken(jwt, { secretKey: process.env.CLERK_SECRET_KEY });\nassert.equal(payload.sub, guest.id);\nassert.equal(payload.sid, session.id);\nawait clerk.users.deleteUser(guest.id);\nconst after = await clerk.organizations.getOrganizationMembershipList({ organizationId: org.id, limit: 100 });\nassert.equal(after.totalCount, 1);\nassert.equal(after.data[0].publicUserData.userId, owner.id);\nwriteFileSync('workflow-receipt.json', JSON.stringify({ owner: owner.id, organization: org.id, deletedMember: guest.id, remainingMemberships: after.totalCount, tokenVerified: true }, null, 2) + '\\n');\nconsole.log('Clerk SDK user, membership, signed token and deletion journey passed');\n",
9
+ "readback.mjs": "import assert from 'node:assert/strict';\nimport { readFileSync } from 'node:fs';\nimport { createClerkClient } from '@clerk/backend';\n\nassert.ok(process.env.VOLTER_WORLD);\nconst previous = JSON.parse(readFileSync('workflow-receipt.json', 'utf8'));\nconst clerk = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY });\nconst owner = await clerk.users.getUser(previous.owner);\nassert.equal(owner.emailAddresses[0].emailAddress, 'owner@catalog-clerk.example');\nconst memberships = await clerk.organizations.getOrganizationMembershipList({ organizationId: previous.organization, limit: 100 });\nassert.equal(memberships.totalCount, 1);\nassert.equal(memberships.data[0].publicUserData.userId, previous.owner);\nassert.ok(memberships.data.every(member => member.publicUserData.userId !== previous.deletedMember));\nconsole.log(JSON.stringify({ retained: true, organization: previous.organization, remainingMemberships: memberships.totalCount }));\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "workflow.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "readback.mjs"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/cloudflare/v/7.2.0",
4
+ "about": "Create a zone and DNS record through the official SDK, then read the retained record after restart.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"cloudflare-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"cloudflare\": \"7.2.0\"\n }\n}\n",
7
+ ".env.example": "CLOUDFLARE_API_TOKEN=\nCLOUDFLARE_ACCOUNT_ID=\n",
8
+ "resume.mjs": "import assert from 'node:assert/strict';\nimport { readFileSync, writeFileSync } from 'node:fs';\nimport Cloudflare from 'cloudflare';\nassert.ok(process.env.VOLTER_WORLD);\nconst held = JSON.parse(readFileSync('first-use-receipt.json', 'utf8'));\nconst client = new Cloudflare({ apiToken: process.env.CLOUDFLARE_API_TOKEN, maxRetries: 0 });\nconst saved = await client.dns.records.get(held.record, { zone_id: held.zone });\nassert.equal(saved.content, '192.0.2.10');\nconst receipt = { passed: true, scope: 'down/up retains DNS record and World-issued credentials remain usable', };\nwriteFileSync('resume-receipt.json', JSON.stringify(receipt, null, 2) + '\\n');\nconsole.log(JSON.stringify(receipt));\n",
9
+ "app.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport Cloudflare from 'cloudflare';\nassert.ok(process.env.VOLTER_WORLD);\nconst client = new Cloudflare({ apiToken: process.env.CLOUDFLARE_API_TOKEN, maxRetries: 0 });\nconst zone = await client.zones.create({ account: { id: process.env.CLOUDFLARE_ACCOUNT_ID }, name: 'first-user.example', type: 'full' });\nconst record = await client.dns.records.create({ zone_id: zone.id, type: 'A', name: 'www.first-user.example', content: '192.0.2.10', ttl: 1, proxied: true });\nconst saved = await client.dns.records.get(record.id, { zone_id: zone.id });\nassert.equal(saved.name, 'www.first-user.example');\nassert.equal(saved.content, '192.0.2.10');\nassert.equal(saved.proxied, true);\nconst receipt = { passed: true, scope: 'fresh published CLI init/up/run/log/down; unchanged official Cloudflare SDK zone create and DNS write/read', zone: zone.id, record: record.id, };\nwriteFileSync('first-use-receipt.json', JSON.stringify(receipt, null, 2) + '\\n');\nconsole.log(JSON.stringify(receipt));\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "app.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "resume.mjs"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/@octokit/rest/v/22.0.1",
4
+ "about": "Create a repository and issue through Octokit, inspect a missing issue refusal, then read the retained issue after restart.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"github-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@octokit/rest\": \"22.0.1\"\n }\n}\n",
7
+ ".env.example": "GITHUB_TOKEN=\n",
8
+ "resume.mjs": "import assert from 'node:assert/strict';\nimport { readFileSync, writeFileSync } from 'node:fs';\nimport { Octokit } from '@octokit/rest';\nassert.ok(process.env.VOLTER_WORLD);\nconst prior = JSON.parse(readFileSync('first-use-receipt.json', 'utf8'));\nconst client = new Octokit({ auth: process.env.GITHUB_TOKEN });\nconst saved = (await client.rest.issues.get({ owner: prior.owner, repo: prior.repo, issue_number: prior.issue })).data;\nassert.equal(saved.title, prior.title);\nconst receipt = { passed: true, scope: 'ordinary down then up retains stored GitHub issue and usable throwaway credentials', title: saved.title, issue: saved.number, };\nwriteFileSync('resume-receipt.json', JSON.stringify(receipt, null, 2) + '\\n');\nconsole.log(JSON.stringify(receipt));\n",
9
+ "app.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport { Octokit } from '@octokit/rest';\nassert.ok(process.env.VOLTER_WORLD, 'Run the app through its World');\nassert.ok(process.env.GITHUB_TOKEN, 'The World supplies a throwaway token');\nconst client = new Octokit({ auth: process.env.GITHUB_TOKEN });\nconst created = await client.graphql('mutation($name: String!) { createRepository(input: { name: $name, visibility: PUBLIC }) { repository { nameWithOwner } } }', { name: 'first-catalog-app' });\nconst [owner, repo] = created.createRepository.repository.nameWithOwner.split('/');\nconst made = (await client.rest.issues.create({ owner, repo, title: 'First local issue', body: 'Created through the real Octokit SDK inside a World.' })).data;\nconst saved = (await client.rest.issues.get({ owner, repo, issue_number: made.number })).data;\nassert.equal(saved.title, made.title);\nassert.equal(saved.body, made.body);\nassert.equal(saved.state, 'open');\nawait assert.rejects(() => client.rest.issues.get({ owner, repo, issue_number: 99999 }), error => error.status === 404);\nconst receipt = { passed: true, scope: 'fresh published CLI init/up/run/log/down with unmodified Octokit; repository create and issue write/read/missing read', owner, repo, issue: saved.number, title: saved.title, };\nwriteFileSync('first-use-receipt.json', JSON.stringify(receipt, null, 2) + '\\n');\nconsole.log(JSON.stringify(receipt));\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "app.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "resume.mjs"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/openai/v/7.28.0",
4
+ "about": "Use the official SDK for Chat Completions and SSE streaming, checking the explicitly labeled model stub.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"openai-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"openai\": \"7.28.0\"\n }\n}\n",
7
+ ".env.example": "OPENAI_API_KEY=\n",
8
+ "app.mjs": "import OpenAI from 'openai';\nimport assert from 'node:assert/strict';\nimport {writeFileSync} from 'node:fs';\nassert.ok(process.env.VOLTER_WORLD,'run through the World');\nconst client=new OpenAI({apiKey:process.env.OPENAI_API_KEY,maxRetries:0});\nconst input={model:'gpt-4o',messages:[{role:'user',content:'first-user deterministic fixture'}]};\nconst answer=await client.chat.completions.create(input);\nconst text=answer.choices[0].message.content;\nassert.match(text,/\\[twin-stub:/);\nassert.equal(answer.choices[0].message.role,'assistant');\nassert.equal(answer.choices[0].finish_reason,'stop');\nlet streamed='';\nfor await(const event of await client.chat.completions.create({...input,stream:true})) streamed+=event.choices[0]?.delta?.content??'';\nassert.equal(streamed,text);\nconst receipt={passed:true,scope:'unchanged official OpenAI SDK Chat Completions and SSE stream; labeled default model stub; no generated prose quality or Realtime/browser claim',};\nwriteFileSync('first-use-receipt.json',JSON.stringify(receipt,null,2)+'\\n');console.log(JSON.stringify(receipt));\n"
9
+ },
10
+ "run": [
11
+ "node",
12
+ "app.mjs"
13
+ ],
14
+ "retention": {
15
+ "none": "This workflow requests an unstored completion and stream; it creates no vendor resource to read after restart."
16
+ }
17
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/resend/v/6.6.0",
4
+ "about": "Send a synthetic sign-in email through the official SDK and inspect the retained message and local inbox after restart. Advance the frozen World clock to settle synthetic delivery before retained-state inspection.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"resend-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"resend\": \"6.6.0\"\n }\n}\n",
7
+ ".env.example": "RESEND_API_KEY=\n",
8
+ "inspect-email.mjs": "import assert from 'node:assert/strict';\nimport { readFileSync } from 'node:fs';\nimport { Resend } from 'resend';\n\nassert.ok(process.env.VOLTER_WORLD, 'run this script through the World');\nconst { id } = JSON.parse(readFileSync('last-email.json', 'utf8'));\nconst resend = new Resend(process.env.RESEND_API_KEY);\nconst saved = await resend.emails.get(id);\nassert.equal(saved.error, null);\nassert.equal(saved.data.last_event, 'delivered');\nconst response = await fetch(`${process.env.RESEND_TWIN_URL}/_twin/mail?to=owner%40world.test`);\nassert.equal(response.status, 200);\nconst inbox = await response.json();\nconst email = inbox.mail.find((message) => message.id === id);\nassert.ok(email, 'the delivered message must be in the local inbox');\nassert.equal(email.subject, 'Your local sign-in code');\nassert.match(email.text, /123456/);\nassert.match(email.html, /<strong>123456<\\/strong>/);\nconsole.log('local inbox contains the delivered email and sign-in code');\n",
9
+ "send-email.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport { Resend } from 'resend';\n\nassert.ok(process.env.VOLTER_WORLD, 'run this script through the World');\nconst resend = new Resend(process.env.RESEND_API_KEY);\nconst email = {\n from: 'Example app <onboarding@resend.dev>',\n to: ['owner@world.test'],\n subject: 'Your local sign-in code',\n text: 'Your synthetic sign-in code is 123456.',\n html: '<p>Your synthetic sign-in code is <strong>123456</strong>.</p>'\n};\nconst sent = await resend.emails.send(email);\nassert.equal(sent.error, null);\nassert.ok(sent.data.id);\nconst saved = await resend.emails.get(sent.data.id);\nassert.equal(saved.error, null);\nassert.equal(saved.data.id, sent.data.id);\nassert.equal(saved.data.subject, email.subject);\nassert.equal(saved.data.text, email.text);\nassert.deepEqual(saved.data.to, email.to);\nwriteFileSync('last-email.json', JSON.stringify({ id: sent.data.id }) + '\\n');\nconsole.log('email sent and read back locally');\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "send-email.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "inspect-email.mjs"
19
+ ]
20
+ },
21
+ "clock": {
22
+ "at": "2026-10-06T12:00:00Z",
23
+ "advanceAfterRun": "10s"
24
+ }
25
+ }
@@ -9,6 +9,7 @@ import { clientContext, worldProxy, type ClientCase } from './harness.ts';
9
9
 
10
10
  const job = JSON.parse(readFileSync(process.argv[2]!, 'utf8')) as { vendor: string; port: number; host: string; env: Record<string, string>; scenarioPath: string; packFacts: string };
11
11
  const { cases } = (await import(`./${job.vendor}${extname(fileURLToPath(import.meta.url))}`)) as { cases: ClientCase[] };
12
+ if (!Array.isArray(cases) || cases.length === 0) throw new Error(`${job.vendor} client module declares no cases; there is no SDK execution evidence`);
12
13
  // every connection a case makes goes through the World's proxy, as an application's does in a World
13
14
  const proxy = await worldProxy(job.port);
14
15
  // Bind only this artifact's declared vendor hosts to the assessed server. The enclosing World's
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/@slack/web-api/v/7.19.0",
4
+ "about": "Create a Slack Connect invitation through the official SDK, then inspect the retained invitation after restart.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"slack-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@slack/web-api\": \"7.19.0\"\n }\n}\n",
7
+ ".env.example": "SLACK_BOT_TOKEN=\nSLACK_APP_TOKEN=\nSLACK_SIGNING_SECRET=\n",
8
+ "readback.mjs": "import assert from 'node:assert/strict';\nimport {readFileSync} from 'node:fs';\nimport {WebClient} from '@slack/web-api';\nconst old=JSON.parse(readFileSync('workflow-receipt.json','utf8'));\nconst slack=new WebClient(process.env.SLACK_BOT_TOKEN);\nconst identity=await slack.auth.test();\nassert.equal(identity.team,'World');\nconst pending=await slack.conversations.listConnectInvites({count:1});\nassert.equal(pending.invites[0].invite.id,old.invitation);\nassert.equal(pending.invites[0].channel.id,old.channel);\nconsole.log(JSON.stringify({retained:true,workspace:identity.team,invitation:old.invitation}));\n",
9
+ "workflow.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport { WebClient } from '@slack/web-api';\nassert.ok(process.env.VOLTER_WORLD);\nconst slack = new WebClient(process.env.SLACK_BOT_TOKEN);\nconst identity = await slack.auth.test();\nconst channel = await slack.conversations.create({ name: 'catalog-first-user-support' });\nconst invitation = await slack.conversations.inviteShared({ channel: channel.channel.id, emails: ['customer@outside.test'], external_limited: true });\nconst pending = await slack.conversations.listConnectInvites({ count: 1 });\nassert.equal(pending.invites[0].invite.id, invitation.invite_id);\nassert.equal(pending.invites[0].channel.id, channel.channel.id);\nwriteFileSync('workflow-receipt.json', JSON.stringify({ identity: { team_id: identity.team_id, team: identity.team }, channel: channel.channel.id, invitation: invitation.invite_id, pending: true }, null, 2) + '\\n');\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "workflow.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "readback.mjs"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/stripe/v/17.7.0",
4
+ "about": "Create and retrieve a customer through the official SDK. Read the retained customer after restart.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"stripe-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"stripe\": \"17.7.0\"\n }\n}\n",
7
+ ".env.example": "STRIPE_SECRET_KEY=\n",
8
+ "signup.mjs": "import { writeFileSync } from 'node:fs';\nimport assert from 'node:assert/strict';\nimport Stripe from 'stripe';\n\nassert.ok(process.env.VOLTER_WORLD);\nconst stripe = new Stripe(process.env.STRIPE_SECRET_KEY);\nconst customer = await stripe.customers.create({ email: 'ada@example.com', name: 'Ada' });\nconst saved = await stripe.customers.retrieve(customer.id);\nassert.equal(saved.email, 'ada@example.com');\nassert.equal(saved.name, 'Ada');\nconsole.log(`created ${customer.id}`);\nconsole.log('customer read-back passed');\nwriteFileSync('customer.json', JSON.stringify({ id: customer.id }) + '\\n');\n",
9
+ "readback.mjs": "import assert from 'node:assert/strict';\nimport { readFileSync } from 'node:fs';\nimport Stripe from 'stripe';\nassert.ok(process.env.VOLTER_WORLD);\nconst { id } = JSON.parse(readFileSync('customer.json', 'utf8'));\nconst stripe = new Stripe(process.env.STRIPE_SECRET_KEY);\nconst saved = await stripe.customers.retrieve(id);\nassert.equal(saved.email, 'ada@example.com');\nassert.equal(saved.name, 'Ada');\nconsole.log('retained customer read-back passed');\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "signup.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "readback.mjs"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/pg/v/8.16.3",
4
+ "about": "Use the issued Supabase database connection with unchanged node-postgres: schema, write and read, then read retained data after restart. This does not establish Supabase HTTP client compatibility.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"supabase-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"pg\": \"8.16.3\"\n }\n}\n",
7
+ ".env.example": "SUPABASE_DB_URL=\n",
8
+ "app.mjs": "import pg from 'pg';\nimport assert from 'node:assert/strict';\nimport {writeFileSync} from 'node:fs';\nassert.ok(process.env.VOLTER_WORLD,'run through the World');\nassert.ok(process.env.SUPABASE_DB_URL,'the World must issue the database URL');\nconst client=new pg.Client({connectionString:process.env.SUPABASE_DB_URL});\nawait client.connect();\ntry {\n if(process.argv[2]!=='resumed'){\n await client.query('CREATE TABLE IF NOT EXISTS catalog_signup (id text PRIMARY KEY, email text NOT NULL)');\n await client.query('INSERT INTO catalog_signup (id,email) VALUES ($1,$2) ON CONFLICT (id) DO NOTHING',['new-user','new-user@example.test']);\n }\n const {rows}=await client.query('SELECT id,email FROM catalog_signup WHERE id=$1',['new-user']);\n assert.deepEqual(rows,[{id:'new-user',email:'new-user@example.test'}]);\n const receipt={passed:true,phase:process.argv[2]??'first-boot',scope:'unchanged node-postgres client; project credential issuance and native PostgreSQL schema, insert and readback; no Supabase HTTP data-plane claim',};\n writeFileSync(`first-use-${receipt.phase}.json`,JSON.stringify(receipt,null,2)+'\\n');console.log(JSON.stringify(receipt));\n} finally {await client.end();}\n"
9
+ },
10
+ "run": [
11
+ "node",
12
+ "app.mjs"
13
+ ],
14
+ "retention": {
15
+ "readback": [
16
+ "node",
17
+ "app.mjs",
18
+ "resumed"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/@tavily/core/v/0.7.14",
4
+ "about": "Seed an explicitly synthetic World page through its existing door, then search and extract through the official SDK. No public web or model runs.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"tavily-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tavily/core\": \"0.7.14\"\n }\n}\n",
7
+ ".env.example": "TAVILY_API_KEY=\n",
8
+ "workflow.mjs": "import assert from 'node:assert/strict';\nimport { tavily } from '@tavily/core';\nassert.ok(process.env.VOLTER_WORLD);\nconst page = { url: 'https://schedule.example/yoga', title: 'Yoga schedule', content: 'Yoga on Tuesdays at 18:00.' };\nconst setup = await fetch('https://api.tavily.com/_twin/pages', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(page) });\nassert.equal(setup.status, 201);\nconst client = tavily({ apiKey: process.env.TAVILY_API_KEY });\nconst search = await client.search('Yoga schedule', { includeAnswer: true });\nassert.equal(search.results[0].url, page.url);\nassert.match(search.answer, /\\[twin-stub\\]/);\nconst extract = await client.extract([page.url]);\nassert.equal(extract.results[0].url, page.url);\nassert.match(extract.results[0].rawContent, /Yoga on Tuesdays/);\nconsole.log('Official Tavily SDK search and extract over the synthetic World corpus passed');\n"
9
+ },
10
+ "run": [
11
+ "node",
12
+ "workflow.mjs"
13
+ ],
14
+ "retention": {
15
+ "none": "Search and extraction create no stored Tavily resource; the pages door supplies synthetic World corpus, not vendor state."
16
+ }
17
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "https://www.npmjs.com/package/@upstash/redis/v/1.38.2",
4
+ "about": "Store and read a profile and counter through the Redis SDK, then inspect both after restart.",
5
+ "files": {
6
+ "package.json": "{\n \"name\": \"upstash-installed-customer\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@upstash/redis\": \"1.38.2\"\n }\n}\n",
7
+ ".env.example": "UPSTASH_REDIS_REST_URL=\nUPSTASH_REDIS_REST_TOKEN=\n",
8
+ "resume.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport { Redis } from '@upstash/redis';\nassert.ok(process.env.VOLTER_WORLD);\nconst redis = Redis.fromEnv();\nassert.deepEqual(await redis.get('first-user:profile'), { email: 'first-user@example.test', plan: 'free' });\nassert.equal(await redis.get('first-user:visits'), 1);\nconst receipt = { passed: true, scope: 'down/up retains Redis data and throwaway credentials remain usable', };\nwriteFileSync('resume-receipt.json', JSON.stringify(receipt, null, 2) + '\\n');\nconsole.log(JSON.stringify(receipt));\n",
9
+ "app.mjs": "import assert from 'node:assert/strict';\nimport { writeFileSync } from 'node:fs';\nimport { Redis } from '@upstash/redis';\nassert.ok(process.env.VOLTER_WORLD);\nconst redis = Redis.fromEnv();\nconst value = { email: 'first-user@example.test', plan: 'free' };\nassert.equal(await redis.set('first-user:profile', value), 'OK');\nassert.deepEqual(await redis.get('first-user:profile'), value);\nassert.equal(await redis.incr('first-user:visits'), 1);\nassert.equal(await redis.get('first-user:missing'), null);\nconst receipt = { passed: true, scope: 'fresh published CLI init/up/run/log/down; unchanged official Redis SDK set/get/incr/missing read', };\nwriteFileSync('first-use-receipt.json', JSON.stringify(receipt, null, 2) + '\\n');\nconsole.log(JSON.stringify(receipt));\n"
10
+ },
11
+ "run": [
12
+ "node",
13
+ "app.mjs"
14
+ ],
15
+ "retention": {
16
+ "readback": [
17
+ "node",
18
+ "resume.mjs"
19
+ ]
20
+ }
21
+ }
@@ -404,6 +404,7 @@ async function clientCases(pack: string, scratch: string): Promise<{ failures: s
404
404
  child.on('close', (code) => { clearTimeout(timer); resolve(code === 0 ? text : `${text}\n${JSON.stringify({ id: 'runner', asks: 'the cases run', failures: [`node exited ${code}: ${errors.trim().split('\n').slice(0, 12).join(' ')}`] })}`); });
405
405
  });
406
406
  const results = out.split('\n').filter((l) => l.startsWith('{')).map((l) => JSON.parse(l) as { id: string; asks: string; failures: string[] });
407
+ if (results.length === 0) return { failures: [`${vendor} client runner returned no case results; there is no SDK execution evidence`] };
407
408
  return { failures: results.flatMap((r) => r.failures.map((f) => `${r.id} (${r.asks}): ${f}`)), note: `${results.length} case(s) through the vendor's client` };
408
409
  } finally { await server.stop(); }
409
410
  }