@volter/twin-standard 1.0.110 → 1.0.112
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.md +3 -1
- package/dist/src/cli.js +22 -1
- package/package.json +2 -2
- package/src/cli.ts +16 -1
package/README.md
CHANGED
|
@@ -35,7 +35,9 @@ assessment World starts. The journey refuses candidate or kernel imports from ev
|
|
|
35
35
|
app's own lockfile against the assessed integrity. Older evidence without this installation identity does not satisfy
|
|
36
36
|
the current completion check. The public
|
|
37
37
|
`runConsumerWorkflow(packDir, consumer)` lets a builder walk only that entry journey while authoring; it runs no
|
|
38
|
-
grade or conformance checks.
|
|
38
|
+
grade or conformance checks. Its CLI is `twin-standard walk-consumer <pack dir> --prepared-consumer <options.json>
|
|
39
|
+
--out <walk.json>`, using the options written by `prepare-consumer`. Run it inside a World after installing the
|
|
40
|
+
prepared app's dependencies. Installed readiness requires ordinary CLI initialization against the exact candidate,
|
|
39
41
|
SDK assertions, read-only state inspection after stop/resume for stored workflows, and verified teardown. A
|
|
40
42
|
stateless workflow records why retained-state inspection does not apply. Empty SDK case execution fails.
|
|
41
43
|
|
package/dist/src/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ import { standardPackageFile } from "./package-file.js";
|
|
|
31
31
|
import { gatePublished } from "./published.js";
|
|
32
32
|
const [command, ...args] = process.argv.slice(2);
|
|
33
33
|
const usage = () => {
|
|
34
|
-
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> [--candidate <tgz>] | assess <pack dir> --prepared-consumer <json> [--browser] [--out <file>] | --version');
|
|
34
|
+
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> [--candidate <tgz>] | walk-consumer <pack dir> --prepared-consumer <json> [--out <file>] | assess <pack dir> --prepared-consumer <json> [--browser] [--out <file>] | --version');
|
|
35
35
|
process.exit(2);
|
|
36
36
|
};
|
|
37
37
|
if (command === '--version') {
|
|
@@ -130,6 +130,27 @@ else if (command === 'prepare-consumer') {
|
|
|
130
130
|
writeFileSync(out, JSON.stringify({ appDir, cli, artifactIntegrity }, null, 2) + '\n');
|
|
131
131
|
console.log(JSON.stringify({ appDir, fixture, preparedConsumer: out, next: 'Install the app SDK, candidate and kernel dependencies with scripts disabled before assessing inside a World' }));
|
|
132
132
|
}
|
|
133
|
+
else if (command === 'walk-consumer') {
|
|
134
|
+
if (!args[0])
|
|
135
|
+
usage();
|
|
136
|
+
const at = args.indexOf('--prepared-consumer');
|
|
137
|
+
if (at < 0 || !args[at + 1])
|
|
138
|
+
usage();
|
|
139
|
+
const outputAt = args.indexOf('--out');
|
|
140
|
+
if (outputAt >= 0 && !args[outputAt + 1])
|
|
141
|
+
usage();
|
|
142
|
+
const consumer = JSON.parse(readFileSync(resolve(args[at + 1]), 'utf8'));
|
|
143
|
+
const { runConsumerWorkflow } = await import("./consumer.js");
|
|
144
|
+
const report = await runConsumerWorkflow(resolve(args[0]), consumer);
|
|
145
|
+
const text = `${JSON.stringify(report, null, 2)}\n`;
|
|
146
|
+
if (outputAt >= 0) {
|
|
147
|
+
const { writeFileSync } = await import('node:fs');
|
|
148
|
+
writeFileSync(resolve(args[outputAt + 1]), text);
|
|
149
|
+
}
|
|
150
|
+
else
|
|
151
|
+
console.log(text);
|
|
152
|
+
process.exit(report.passed ? 0 : 1);
|
|
153
|
+
}
|
|
133
154
|
else if (command === 'assess') {
|
|
134
155
|
if (!args[0])
|
|
135
156
|
usage();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-standard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.112",
|
|
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.
|
|
78
|
+
"@volter/world-core": "3.0.120",
|
|
79
79
|
"@volter/world-runtime": "*",
|
|
80
80
|
"playwright": "^1.63.0"
|
|
81
81
|
},
|
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>] | prepare-consumer <pack dir> --app <new dir> --cli <volter executable> --integrity <sha512> --out <json> [--candidate <tgz>] | assess <pack dir> --prepared-consumer <json> [--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> [--candidate <tgz>] | walk-consumer <pack dir> --prepared-consumer <json> [--out <file>] | assess <pack dir> --prepared-consumer <json> [--browser] [--out <file>] | --version');
|
|
28
28
|
process.exit(2);
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -89,6 +89,21 @@ if (command === '--version') {
|
|
|
89
89
|
const { writeFileSync } = await import('node:fs');
|
|
90
90
|
writeFileSync(out, JSON.stringify({ appDir, cli, artifactIntegrity }, null, 2) + '\n');
|
|
91
91
|
console.log(JSON.stringify({ appDir, fixture, preparedConsumer: out, next: 'Install the app SDK, candidate and kernel dependencies with scripts disabled before assessing inside a World' }));
|
|
92
|
+
} else if (command === 'walk-consumer') {
|
|
93
|
+
if (!args[0]) usage();
|
|
94
|
+
const at = args.indexOf('--prepared-consumer');
|
|
95
|
+
if (at < 0 || !args[at + 1]) usage();
|
|
96
|
+
const outputAt = args.indexOf('--out');
|
|
97
|
+
if (outputAt >= 0 && !args[outputAt + 1]) usage();
|
|
98
|
+
const consumer = JSON.parse(readFileSync(resolve(args[at + 1]!), 'utf8'));
|
|
99
|
+
const { runConsumerWorkflow } = await import('./consumer.ts');
|
|
100
|
+
const report = await runConsumerWorkflow(resolve(args[0]!), consumer);
|
|
101
|
+
const text = `${JSON.stringify(report, null, 2)}\n`;
|
|
102
|
+
if (outputAt >= 0) {
|
|
103
|
+
const { writeFileSync } = await import('node:fs');
|
|
104
|
+
writeFileSync(resolve(args[outputAt + 1]!), text);
|
|
105
|
+
} else console.log(text);
|
|
106
|
+
process.exit(report.passed ? 0 : 1);
|
|
92
107
|
} else if (command === 'assess') {
|
|
93
108
|
if (!args[0]) usage();
|
|
94
109
|
const { assessPack } = await import('./assessment.ts');
|