@yourtechbudstudio/isagi-workflow-verifier 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 YourTechBud
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # Isagi workflow verifier
2
+
3
+ Verify an already-built Isagi workflow package and write its build receipt:
4
+
5
+ ```sh
6
+ isagi-workflow-verify --workflow .
7
+ ```
8
+
9
+ The verifier has one job: raise the probability that the Isagi runtime loads the workflow build without errors. It checks ahead of time exactly what the runtime checks at load time — exact SDK and verifier pins, symlink-free sources, and a `dist/index.js` bundle that default-exports a loadable workflow definition with a valid `command()` manifest (validated in a bounded child process). When every gate passes it fingerprints the sources and the artifact into `dist/isagi-workflow-build.json`; the runtime re-checks that receipt and refuses to run a workflow whose source or artifact no longer matches it. How the package installs dependencies is deliberately outside this contract.
10
+
11
+ The workflow package owns compilation and quality. Run the canonical `build` script before verification, and run your own `typecheck` and `test` scripts before that: the verifier never compiles, installs dependencies, or runs package scripts, and it does not gate on tests. The current versions are `@yourtechbudstudio/isagi-workflow-sdk@0.0.1`, `@yourtechbudstudio/isagi-workflow-verifier@0.0.1`, and `esbuild@0.28.0`. For the full authoring guide, use Isagi's installed `isagi-docs` skill.
12
+
13
+ ## Trust boundary
14
+
15
+ A verified artifact is self-contained with respect to its statically discoverable package import graph. Workflows remain trusted Node.js code and may intentionally access runtime files, processes, network resources, and Node built-ins. Verification is lifecycle containment, not a sandbox.
16
+
17
+ The `./receipt` export contains pure manifest parsing, canonical serialization, path policy, compatibility constants, and hash primitives for consumers that need to check a receipt without executing verifier operations.
package/dist/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/bin.js ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from './cli.js';
3
+ runCli().catch((error) => {
4
+ process.stderr.write(`Workflow verification failed: ${error instanceof Error ? error.message : String(error)}\n`);
5
+ process.exitCode = 1;
6
+ });
7
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAC5F,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ export interface ProcessSpec {
3
+ readonly command: string;
4
+ readonly args: readonly string[];
5
+ readonly cwd: string;
6
+ readonly env?: NodeJS.ProcessEnv;
7
+ readonly timeoutMs?: number;
8
+ }
9
+ export interface ProcessResult {
10
+ readonly stdout: string;
11
+ readonly stderr: string;
12
+ }
13
+ export type ProcessRunner = (spec: ProcessSpec) => Promise<ProcessResult>;
14
+ export declare function runProcess(spec: ProcessSpec): Promise<ProcessResult>;
15
+ /**
16
+ * The verifier front-runs the runtime loader: every gate here mirrors a check the Isagi runtime
17
+ * performs before importing a workflow, so failures surface at authoring time instead of load
18
+ * time. Quality gates (typecheck, tests) are deliberately absent — they are the author's
19
+ * responsibility and do not affect whether the runtime can load the artifact.
20
+ */
21
+ export declare function verifyWorkflow(workflowArgument: string, runner?: ProcessRunner): Promise<void>;
22
+ export declare function runCli(args?: string[]): Promise<void>;
package/dist/cli.js ADDED
@@ -0,0 +1,307 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'node:child_process';
3
+ import { randomUUID } from 'node:crypto';
4
+ import { lstat, mkdtemp, readFile, readdir, rename, rm, stat, writeFile } from 'node:fs/promises';
5
+ import { tmpdir } from 'node:os';
6
+ import { join, resolve } from 'node:path';
7
+ import { pathToFileURL } from 'node:url';
8
+ import { hashArtifact, hashWorkflowInputs, isWorkflowSourcePath, serializeWorkflowBuildManifest, supportedWorkflowContractVersion, workflowBuildManifestVersion, workflowSdkPackage, workflowSdkVersion, workflowVerifierPackage, workflowVerifierVersion, } from './receipt.js';
9
+ const outputLimit = 128 * 1024;
10
+ const subprocessTimeoutMs = 120_000;
11
+ class VerificationError extends Error {
12
+ }
13
+ export async function runProcess(spec) {
14
+ return new Promise((resolveResult, reject) => {
15
+ const child = spawn(spec.command, spec.args, {
16
+ cwd: spec.cwd,
17
+ env: spec.env ?? process.env,
18
+ stdio: ['ignore', 'pipe', 'pipe'],
19
+ detached: process.platform !== 'win32',
20
+ windowsHide: true,
21
+ });
22
+ let stdout = Buffer.alloc(0);
23
+ let stderr = Buffer.alloc(0);
24
+ let overflow = false;
25
+ let timedOut = false;
26
+ const append = (current, chunk) => {
27
+ const next = Buffer.concat([current, chunk]);
28
+ if (next.length > outputLimit) {
29
+ overflow = true;
30
+ return next.subarray(0, outputLimit);
31
+ }
32
+ return next;
33
+ };
34
+ child.stdout.on('data', (chunk) => {
35
+ stdout = append(stdout, chunk);
36
+ });
37
+ child.stderr.on('data', (chunk) => {
38
+ stderr = append(stderr, chunk);
39
+ });
40
+ const timer = setTimeout(() => {
41
+ timedOut = true;
42
+ terminateTree(child.pid);
43
+ }, spec.timeoutMs ?? subprocessTimeoutMs);
44
+ child.on('error', (error) => {
45
+ clearTimeout(timer);
46
+ reject(new VerificationError(`Could not start ${spec.command}: ${error.message}`));
47
+ });
48
+ child.on('close', (code, signal) => {
49
+ clearTimeout(timer);
50
+ const output = [stderr.toString('utf8'), stdout.toString('utf8')].filter(Boolean).join('\n');
51
+ if (timedOut)
52
+ return reject(new VerificationError(`${spec.command} timed out after ${spec.timeoutMs ?? subprocessTimeoutMs}ms.\n${output}`));
53
+ if (overflow)
54
+ return reject(new VerificationError(`${spec.command} produced more than ${outputLimit} bytes of output, which the verifier refuses to process.`));
55
+ if (signal)
56
+ return reject(new VerificationError(`${spec.command} terminated by signal ${signal}.\n${output}`));
57
+ if (code !== 0)
58
+ return reject(new VerificationError(`${spec.command} exited with code ${code}.\n${output}`));
59
+ resolveResult({ stdout: stdout.toString('utf8'), stderr: stderr.toString('utf8') });
60
+ });
61
+ });
62
+ }
63
+ function terminateTree(pid) {
64
+ if (!pid)
65
+ return;
66
+ try {
67
+ if (process.platform === 'win32')
68
+ spawn('taskkill', ['/pid', String(pid), '/t', '/f'], { stdio: 'ignore', windowsHide: true });
69
+ else
70
+ process.kill(-pid, 'SIGTERM');
71
+ }
72
+ catch {
73
+ /* already gone */
74
+ }
75
+ setTimeout(() => {
76
+ try {
77
+ if (process.platform !== 'win32')
78
+ process.kill(-pid, 'SIGKILL');
79
+ }
80
+ catch {
81
+ /* already gone */
82
+ }
83
+ }, 1_000).unref();
84
+ }
85
+ /**
86
+ * The verifier front-runs the runtime loader: every gate here mirrors a check the Isagi runtime
87
+ * performs before importing a workflow, so failures surface at authoring time instead of load
88
+ * time. Quality gates (typecheck, tests) are deliberately absent — they are the author's
89
+ * responsibility and do not affect whether the runtime can load the artifact.
90
+ */
91
+ export async function verifyWorkflow(workflowArgument, runner = runProcess) {
92
+ const root = resolve(workflowArgument);
93
+ const packageJson = await readPackageJson(root);
94
+ requirePins(packageJson);
95
+ const sourceHash = hashWorkflowInputs(await readSourceInputs(root));
96
+ const artifactPath = join(root, 'dist', 'index.js');
97
+ const artifactBytes = await readArtifact(artifactPath);
98
+ await validateArtifact(root, artifactPath, runner);
99
+ const manifest = {
100
+ manifestVersion: workflowBuildManifestVersion,
101
+ workflowContractVersion: supportedWorkflowContractVersion,
102
+ sdk: { name: workflowSdkPackage, version: workflowSdkVersion },
103
+ verifier: { name: workflowVerifierPackage, version: workflowVerifierVersion },
104
+ source: { sha256: sourceHash },
105
+ artifact: { entry: 'dist/index.js', sha256: hashArtifact(artifactBytes) },
106
+ };
107
+ await writeReceipt(root, manifest);
108
+ }
109
+ async function readPackageJson(root) {
110
+ const path = join(root, 'package.json');
111
+ let text;
112
+ try {
113
+ text = await readFile(path, 'utf8');
114
+ }
115
+ catch (cause) {
116
+ throw new VerificationError(`Could not read ${path}. Pass the workflow package root (the directory containing package.json) to --workflow. (${message(cause)})`);
117
+ }
118
+ try {
119
+ return JSON.parse(text);
120
+ }
121
+ catch (cause) {
122
+ throw new VerificationError(`package.json contains invalid JSON: ${message(cause)}`);
123
+ }
124
+ }
125
+ function requirePins(packageJson) {
126
+ const sdkPin = packageJson.dependencies?.[workflowSdkPackage];
127
+ if (sdkPin !== workflowSdkVersion)
128
+ throw new VerificationError(`dependencies["${workflowSdkPackage}"] must be exactly "${workflowSdkVersion}"; found ${found(sdkPin)}. The Isagi runtime refuses to load a workflow whose pin differs from its build receipt.`);
129
+ const verifierPin = packageJson.devDependencies?.[workflowVerifierPackage];
130
+ if (verifierPin !== workflowVerifierVersion)
131
+ throw new VerificationError(`devDependencies["${workflowVerifierPackage}"] must be exactly "${workflowVerifierVersion}"; found ${found(verifierPin)}. The Isagi runtime refuses to load a workflow whose pin differs from its build receipt.`);
132
+ }
133
+ function found(value) {
134
+ return value === undefined ? 'nothing' : JSON.stringify(value);
135
+ }
136
+ async function readSourceInputs(root) {
137
+ const paths = ['package.json'];
138
+ if (await exists(join(root, 'tsconfig.json')))
139
+ paths.push('tsconfig.json');
140
+ await walk(root, 'src', paths, { required: true });
141
+ await walk(root, 'tests', paths, { required: false });
142
+ const inputs = [];
143
+ for (const path of paths) {
144
+ if (!isWorkflowSourcePath(path))
145
+ continue;
146
+ const absolute = join(root, ...path.split('/'));
147
+ const info = await lstat(absolute);
148
+ if (info.isSymbolicLink())
149
+ throw new VerificationError(symlinkMessage(path));
150
+ if (!info.isFile())
151
+ throw new VerificationError(`${path} must be a regular file so it can be fingerprinted into the build receipt.`);
152
+ inputs.push({ path, bytes: await readFile(absolute) });
153
+ }
154
+ return inputs;
155
+ }
156
+ function symlinkMessage(path) {
157
+ return `Symlinks are unsupported in workflow packages: ${path}. The Isagi runtime refuses symlinked sources; replace it with a regular file or directory.`;
158
+ }
159
+ async function walk(root, directory, output, options) {
160
+ const absolute = join(root, directory);
161
+ let info;
162
+ try {
163
+ info = await lstat(absolute);
164
+ }
165
+ catch (cause) {
166
+ if (cause.code !== 'ENOENT')
167
+ throw new VerificationError(`Could not read ${directory}/: ${message(cause)}`);
168
+ if (!options.required)
169
+ return;
170
+ throw new VerificationError(`A ${directory}/ directory is required: the workflow sources live there and are fingerprinted into the build receipt. Check that --workflow points at the workflow package root.`);
171
+ }
172
+ if (info.isSymbolicLink())
173
+ throw new VerificationError(symlinkMessage(directory));
174
+ if (!info.isDirectory())
175
+ throw new VerificationError(`${directory} must be a directory, not a file.`);
176
+ for (const entry of await readdir(absolute, { withFileTypes: true })) {
177
+ const path = `${directory}/${entry.name}`;
178
+ if (entry.isSymbolicLink())
179
+ throw new VerificationError(symlinkMessage(path));
180
+ if (entry.isDirectory())
181
+ await walk(root, path, output, { required: true });
182
+ else if (entry.isFile())
183
+ output.push(path);
184
+ else
185
+ throw new VerificationError(`Unsupported filesystem entry (not a regular file or directory): ${path}. Remove it; only regular files can be fingerprinted into the build receipt.`);
186
+ }
187
+ }
188
+ async function readArtifact(path) {
189
+ let info;
190
+ try {
191
+ info = await lstat(path);
192
+ }
193
+ catch (cause) {
194
+ throw new VerificationError("Workflow build output dist/index.js is missing. Run the package's build script before verification; the verifier never compiles on the author's behalf.", { cause });
195
+ }
196
+ if (info.isSymbolicLink() || !info.isFile())
197
+ throw new VerificationError("dist/index.js must be a regular file, not a symlink or directory. Re-run the package's build script to regenerate it.");
198
+ return readFile(path);
199
+ }
200
+ /**
201
+ * Imports the built artifact in an isolated child process the way the runtime loader will, and
202
+ * checks the exported workflow definition and its command() manifest. The child reports through a
203
+ * result file rather than stdout, so workflow code that logs during import or command() cannot
204
+ * corrupt the report.
205
+ */
206
+ async function validateArtifact(root, artifact, runner) {
207
+ const isolatedRoot = await mkdtemp(join(tmpdir(), 'isagi-workflow-validation-'));
208
+ try {
209
+ const isolatedArtifact = join(isolatedRoot, 'index.mjs');
210
+ await writeFile(isolatedArtifact, await readFile(artifact));
211
+ const resultPath = join(isolatedRoot, 'result.json');
212
+ const validatorPath = join(isolatedRoot, 'validate.mjs');
213
+ await writeFile(validatorPath, validatorSource(isolatedArtifact, resultPath, root));
214
+ try {
215
+ await runner({
216
+ command: process.execPath,
217
+ args: [validatorPath],
218
+ cwd: isolatedRoot,
219
+ timeoutMs: 10_000,
220
+ });
221
+ }
222
+ catch (cause) {
223
+ throw new VerificationError(`dist/index.js failed the artifact check: the bundle crashed the validation process instead of completing. Module-level code in the bundle must settle without crashing, exiting, or hanging.\n${message(cause)}`);
224
+ }
225
+ let report;
226
+ try {
227
+ report = JSON.parse(await readFile(resultPath, 'utf8'));
228
+ }
229
+ catch {
230
+ throw new VerificationError('dist/index.js failed the artifact check: the bundle terminated the validation process (for example via process.exit) before the check finished. Workflow code must not exit the process.');
231
+ }
232
+ if (!report || typeof report !== 'object' || report.ok !== true)
233
+ throw new VerificationError(`dist/index.js failed the artifact check that mirrors how the Isagi runtime loads workflows:\n${String(report?.error ?? 'The validation report is malformed.')}\nFix the workflow source, rebuild, and re-run verification.`);
234
+ }
235
+ finally {
236
+ await rm(isolatedRoot, { recursive: true, force: true });
237
+ }
238
+ }
239
+ function validatorSource(artifactPath, resultPath, worktreePath) {
240
+ return [
241
+ `import { writeFileSync } from 'node:fs';`,
242
+ `const finish = (report) => { writeFileSync(${JSON.stringify(resultPath)}, JSON.stringify(report)); process.exit(0); };`,
243
+ `const describe = (value) => (Array.isArray(value) ? 'an array' : value === null ? 'null' : typeof value);`,
244
+ `const cause = (error) => String((error && error.stack) || error);`,
245
+ `let artifact;`,
246
+ `try { artifact = await import(${JSON.stringify(pathToFileURL(artifactPath).href)}); }`,
247
+ `catch (error) { finish({ ok: false, error: 'Importing the bundle threw before any workflow definition could be read:\\n' + cause(error) }); }`,
248
+ `const workflow = artifact.default;`,
249
+ `if (!workflow || typeof workflow !== 'object') finish({ ok: false, error: 'The bundle must default-export the workflow definition object returned by defineWorkflow(); its default export is ' + describe(workflow) + '.' });`,
250
+ `const missing = ['command', 'validate', 'init', 'step'].filter((name) => typeof workflow[name] !== 'function');`,
251
+ `if (missing.length) finish({ ok: false, error: 'The default-exported workflow definition is missing required function(s): ' + missing.join(', ') + '. Default-export the object returned by defineWorkflow() from src/index.ts.' });`,
252
+ `let manifest;`,
253
+ `try { manifest = await workflow.command({ worktreeId: 0, worktreePath: ${JSON.stringify(worktreePath)}, surfaceId: 0, paneId: null, agentSessionId: null }); }`,
254
+ `catch (error) { finish({ ok: false, error: 'command() threw when called with a minimal launch context. command() must succeed without optional pane or agent-session context.\\n' + cause(error) }); }`,
255
+ `const problems = [];`,
256
+ `if (!manifest || typeof manifest !== 'object' || Array.isArray(manifest)) problems.push('command() must return a manifest object; it returned ' + describe(manifest) + '.');`,
257
+ `else {`,
258
+ ` if (typeof manifest.title !== 'string' || !manifest.title) problems.push('command() must return a manifest with a non-empty string title; found ' + describe(manifest.title) + '.');`,
259
+ ` if (manifest.description !== undefined && typeof manifest.description !== 'string') problems.push('command() manifest description must be a string when present; found ' + describe(manifest.description) + '.');`,
260
+ ` if (manifest.inputs !== undefined && !Array.isArray(manifest.inputs)) problems.push('command() manifest inputs must be an array when present; found ' + describe(manifest.inputs) + '.');`,
261
+ ` for (const [index, input] of (Array.isArray(manifest.inputs) ? manifest.inputs : []).entries()) {`,
262
+ ` const where = 'inputs[' + index + ']' + (input && typeof input.key === 'string' && input.key ? ' (key "' + input.key + '")' : '');`,
263
+ ` if (!input || typeof input !== 'object') { problems.push('command() ' + where + ' must be an input object; found ' + describe(input) + '.'); continue; }`,
264
+ ` if (!['text', 'select', 'multi-select', 'confirm'].includes(input.kind)) problems.push('command() ' + where + ' has kind ' + JSON.stringify(input.kind) + '; expected "text", "select", "multi-select", or "confirm".');`,
265
+ ` if (typeof input.key !== 'string' || !input.key) problems.push('command() ' + where + ' needs a non-empty string key.');`,
266
+ ` if (typeof input.label !== 'string' || !input.label) problems.push('command() ' + where + ' needs a non-empty string label.');`,
267
+ ` if (input.kind === 'select' || input.kind === 'multi-select') {`,
268
+ ` if (!Array.isArray(input.options)) problems.push('command() ' + where + ' is a ' + input.kind + ' input and needs an options array.');`,
269
+ ` else for (const [optionIndex, option] of input.options.entries()) if (!option || typeof option.value !== 'string') problems.push('command() ' + where + ' options[' + optionIndex + '] needs a string value.');`,
270
+ ` }`,
271
+ ` }`,
272
+ `}`,
273
+ `finish(problems.length ? { ok: false, error: problems.join('\\n') } : { ok: true });`,
274
+ ``,
275
+ ].join('\n');
276
+ }
277
+ async function writeReceipt(root, manifest) {
278
+ const receiptPath = join(root, 'dist', 'isagi-workflow-build.json');
279
+ const temporary = `${receiptPath}.${randomUUID()}.tmp`;
280
+ try {
281
+ await writeFile(temporary, serializeWorkflowBuildManifest(manifest), { flag: 'wx' });
282
+ await rename(temporary, receiptPath);
283
+ }
284
+ catch (cause) {
285
+ await rm(temporary, { force: true }).catch(() => undefined);
286
+ throw new VerificationError(`Could not write the build receipt ${receiptPath}: ${message(cause)}`);
287
+ }
288
+ }
289
+ async function exists(path) {
290
+ try {
291
+ await stat(path);
292
+ return true;
293
+ }
294
+ catch {
295
+ return false;
296
+ }
297
+ }
298
+ function message(error) {
299
+ return error instanceof Error ? error.message : String(error);
300
+ }
301
+ export async function runCli(args = process.argv.slice(2)) {
302
+ if (args.length !== 2 || args[0] !== '--workflow' || !args[1])
303
+ throw new VerificationError('Usage: isagi-workflow-verify --workflow <exact-directory>');
304
+ await verifyWorkflow(args[1]);
305
+ process.stdout.write('Workflow verified. Build receipt is ready.\n');
306
+ }
307
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC9B,gCAAgC,EAChC,4BAA4B,EAC5B,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,GAGxB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,GAAG,GAAG,GAAG,IAAI,CAAC;AAC/B,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAcpC,MAAM,iBAAkB,SAAQ,KAAK;CAAG;AAExC,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CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,41 @@
1
+ export declare const workflowBuildManifestVersion: 1;
2
+ export declare const supportedWorkflowContractVersion: 1;
3
+ export declare const workflowSdkPackage: '@yourtechbudstudio/isagi-workflow-sdk';
4
+ export declare const workflowVerifierPackage: '@yourtechbudstudio/isagi-workflow-verifier';
5
+ export declare const workflowSdkVersion: '0.0.1';
6
+ export declare const workflowVerifierVersion: '0.0.1';
7
+ export declare const workflowBuilderPackage: 'esbuild';
8
+ export declare const workflowBuilderVersion: '0.28.0';
9
+ export declare const workflowBuildCommand: 'esbuild src/index.ts --bundle --format=esm --platform=node --target=node22 --log-override:unsupported-dynamic-import=error --outfile=dist/index.js';
10
+ export declare const workflowVerifyCommand: 'isagi-workflow-verify --workflow .';
11
+ export declare const verifierReservedPrefix: '.isagi-workflow-verifier-';
12
+ export interface WorkflowBuildManifest {
13
+ readonly manifestVersion: typeof workflowBuildManifestVersion;
14
+ readonly workflowContractVersion: typeof supportedWorkflowContractVersion;
15
+ readonly sdk: {
16
+ readonly name: typeof workflowSdkPackage;
17
+ readonly version: string;
18
+ };
19
+ readonly verifier: {
20
+ readonly name: typeof workflowVerifierPackage;
21
+ readonly version: string;
22
+ };
23
+ readonly source: {
24
+ readonly sha256: string;
25
+ };
26
+ readonly artifact: {
27
+ readonly entry: 'dist/index.js';
28
+ readonly sha256: string;
29
+ };
30
+ }
31
+ export interface HashInput {
32
+ readonly path: string;
33
+ readonly bytes: Uint8Array;
34
+ }
35
+ export declare function normalizeWorkflowPath(path: string): string;
36
+ export declare function isWorkflowSourcePath(path: string): boolean;
37
+ export declare function hashWorkflowInputs(inputs: readonly HashInput[]): string;
38
+ export declare function hashArtifact(bytes: Uint8Array): string;
39
+ export declare function serializeWorkflowBuildManifest(manifest: WorkflowBuildManifest): string;
40
+ export declare function parseWorkflowBuildManifest(input: unknown): WorkflowBuildManifest;
41
+ export declare function parseWorkflowBuildManifestJson(json: string): WorkflowBuildManifest;
@@ -0,0 +1,127 @@
1
+ import { createHash } from 'node:crypto';
2
+ export const workflowBuildManifestVersion = 1;
3
+ export const supportedWorkflowContractVersion = 1;
4
+ export const workflowSdkPackage = '@yourtechbudstudio/isagi-workflow-sdk';
5
+ export const workflowVerifierPackage = '@yourtechbudstudio/isagi-workflow-verifier';
6
+ export const workflowSdkVersion = '0.0.1';
7
+ export const workflowVerifierVersion = '0.0.1';
8
+ export const workflowBuilderPackage = 'esbuild';
9
+ export const workflowBuilderVersion = '0.28.0';
10
+ export const workflowBuildCommand = 'esbuild src/index.ts --bundle --format=esm --platform=node --target=node22 --log-override:unsupported-dynamic-import=error --outfile=dist/index.js';
11
+ export const workflowVerifyCommand = 'isagi-workflow-verify --workflow .';
12
+ export const verifierReservedPrefix = '.isagi-workflow-verifier-';
13
+ const sha256Pattern = /^[a-f0-9]{64}$/;
14
+ export function normalizeWorkflowPath(path) {
15
+ const normalized = path.replaceAll('\\', '/').replace(/^\.\//, '');
16
+ if (!normalized || normalized.startsWith('/') || normalized.split('/').includes('..')) {
17
+ throw new Error(`Path is outside the workflow package: ${path}`);
18
+ }
19
+ return normalized;
20
+ }
21
+ export function isWorkflowSourcePath(path) {
22
+ const normalized = normalizeWorkflowPath(path);
23
+ if (normalized.startsWith(verifierReservedPrefix))
24
+ return false;
25
+ return (normalized === 'package.json' ||
26
+ normalized === 'tsconfig.json' ||
27
+ normalized.startsWith('src/') ||
28
+ normalized.startsWith('tests/'));
29
+ }
30
+ export function hashWorkflowInputs(inputs) {
31
+ const normalized = inputs
32
+ .map((input) => ({ path: normalizeWorkflowPath(input.path), bytes: input.bytes }))
33
+ .sort((left, right) => left.path.localeCompare(right.path, 'en'));
34
+ const seen = new Set();
35
+ const hash = createHash('sha256');
36
+ for (const input of normalized) {
37
+ if (seen.has(input.path))
38
+ throw new Error(`Duplicate workflow hash input: ${input.path}`);
39
+ seen.add(input.path);
40
+ const pathBytes = Buffer.from(input.path, 'utf8');
41
+ const size = Buffer.alloc(16);
42
+ size.writeBigUInt64BE(BigInt(pathBytes.length), 0);
43
+ size.writeBigUInt64BE(BigInt(input.bytes.byteLength), 8);
44
+ hash.update(size).update(pathBytes).update(input.bytes);
45
+ }
46
+ return hash.digest('hex');
47
+ }
48
+ export function hashArtifact(bytes) {
49
+ return createHash('sha256').update(bytes).digest('hex');
50
+ }
51
+ export function serializeWorkflowBuildManifest(manifest) {
52
+ parseWorkflowBuildManifest(manifest);
53
+ return `${JSON.stringify(manifest, null, 2)}\n`;
54
+ }
55
+ export function parseWorkflowBuildManifest(input) {
56
+ if (!isRecord(input))
57
+ throw new Error('Build manifest must be an object.');
58
+ assertExactKeys(input, ['manifestVersion', 'workflowContractVersion', 'sdk', 'verifier', 'source', 'artifact'], 'manifest');
59
+ if (input.manifestVersion !== workflowBuildManifestVersion)
60
+ throw new Error(`Unsupported manifestVersion ${JSON.stringify(input.manifestVersion)}; this verifier supports ${workflowBuildManifestVersion}.`);
61
+ if (input.workflowContractVersion !== supportedWorkflowContractVersion)
62
+ throw new Error(`Unsupported workflowContractVersion ${JSON.stringify(input.workflowContractVersion)}; this verifier supports ${supportedWorkflowContractVersion}.`);
63
+ const sdk = packageIdentity(input.sdk, 'sdk', workflowSdkPackage);
64
+ const verifier = packageIdentity(input.verifier, 'verifier', workflowVerifierPackage);
65
+ const source = digestObject(input.source, 'source');
66
+ if (!isRecord(input.artifact))
67
+ throw new Error('artifact must be an object.');
68
+ assertExactKeys(input.artifact, ['entry', 'sha256'], 'artifact');
69
+ if (input.artifact.entry !== 'dist/index.js')
70
+ throw new Error('artifact.entry must be dist/index.js.');
71
+ const artifactHash = requiredString(input.artifact.sha256, 'artifact.sha256');
72
+ if (!sha256Pattern.test(artifactHash))
73
+ throw new Error('artifact.sha256 must be a lowercase SHA-256 digest.');
74
+ return {
75
+ manifestVersion: workflowBuildManifestVersion,
76
+ workflowContractVersion: supportedWorkflowContractVersion,
77
+ sdk,
78
+ verifier,
79
+ source,
80
+ artifact: { entry: 'dist/index.js', sha256: artifactHash },
81
+ };
82
+ }
83
+ export function parseWorkflowBuildManifestJson(json) {
84
+ try {
85
+ return parseWorkflowBuildManifest(JSON.parse(json));
86
+ }
87
+ catch (error) {
88
+ throw new Error(`Invalid workflow build manifest: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
89
+ }
90
+ }
91
+ function packageIdentity(value, field, expectedName) {
92
+ if (!isRecord(value))
93
+ throw new Error(`${field} must be an object.`);
94
+ assertExactKeys(value, ['name', 'version'], field);
95
+ if (value.name !== expectedName)
96
+ throw new Error(`${field}.name must be ${expectedName}.`);
97
+ return { name: expectedName, version: requiredString(value.version, `${field}.version`) };
98
+ }
99
+ function digestObject(value, field) {
100
+ if (!isRecord(value))
101
+ throw new Error(`${field} must be an object.`);
102
+ assertExactKeys(value, ['sha256'], field);
103
+ const sha256 = requiredString(value.sha256, `${field}.sha256`);
104
+ if (!sha256Pattern.test(sha256))
105
+ throw new Error(`${field}.sha256 must be a lowercase SHA-256 digest.`);
106
+ return { sha256 };
107
+ }
108
+ function requiredString(value, field) {
109
+ if (typeof value !== 'string' || !value)
110
+ throw new Error(`${field} must be a non-empty string.`);
111
+ return value;
112
+ }
113
+ function assertExactKeys(value, expected, field) {
114
+ const missing = expected.filter((key) => !Object.hasOwn(value, key));
115
+ const unexpected = Object.keys(value).filter((key) => !expected.includes(key));
116
+ if (missing.length === 0 && unexpected.length === 0)
117
+ return;
118
+ const parts = [
119
+ ...(missing.length ? [`missing fields: ${missing.join(', ')}`] : []),
120
+ ...(unexpected.length ? [`unexpected fields: ${unexpected.join(', ')}`] : []),
121
+ ];
122
+ throw new Error(`${field} has ${parts.join('; ')}.`);
123
+ }
124
+ function isRecord(value) {
125
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
126
+ }
127
+ //# sourceMappingURL=receipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt.js","s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4
+ "description": "Verify standalone Isagi workflow artifacts and issue build receipts.",
5
+ "license": "ISC",
6
+ "author": "YourTechBud",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/YourTechBudStudio/Isagi.git",
10
+ "directory": "packages/workflow-verifier"
11
+ },
12
+ "bin": {
13
+ "isagi-workflow-verify": "./dist/bin.js"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "type": "module",
21
+ "types": "./dist/receipt.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/receipt.d.ts",
25
+ "import": "./dist/receipt.js"
26
+ },
27
+ "./receipt": {
28
+ "types": "./dist/receipt.d.ts",
29
+ "import": "./dist/receipt.js"
30
+ }
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^24.10.1",
37
+ "@yourtechbudstudio/isagi-workflow-sdk": "0.0.1",
38
+ "tsx": "^4.21.0",
39
+ "typescript": "^7.0.2"
40
+ },
41
+ "peerDependencies": {
42
+ "@yourtechbudstudio/isagi-workflow-sdk": "0.0.1"
43
+ },
44
+ "engines": {
45
+ "node": ">=22"
46
+ },
47
+ "scripts": {
48
+ "build": "tsc -p tsconfig.build.json",
49
+ "check": "pnpm typecheck && pnpm test && pnpm build && pnpm pack --dry-run",
50
+ "test": "node --import tsx --test \"src/**/*.test.ts\"",
51
+ "typecheck": "tsc --noEmit -p tsconfig.json"
52
+ }
53
+ }