owenloop 0.5.0 → 0.5.2
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/CHANGELOG.md +67 -0
- package/README.md +144 -35
- package/bin/owenloop.mjs +49 -1
- package/dist/packages/work/src/agent/brief.d.ts +29 -4
- package/dist/packages/work/src/agent/brief.js +49 -4
- package/dist/packages/work/src/agent/capability-model.d.ts +123 -0
- package/dist/packages/work/src/agent/capability-model.js +148 -0
- package/dist/packages/work/src/agent/loop.d.ts +56 -7
- package/dist/packages/work/src/agent/loop.js +166 -9
- package/dist/packages/work/src/bundle/cache.d.ts +7 -5
- package/dist/packages/work/src/bundle/cache.js +20 -6
- package/dist/packages/work/src/bundle/fetch.d.ts +7 -5
- package/dist/packages/work/src/bundle/fetch.js +27 -7
- package/dist/packages/work/src/bundle/types.d.ts +8 -4
- package/dist/packages/work/src/consumed-verifier.d.ts +45 -0
- package/dist/packages/work/src/consumed-verifier.js +205 -0
- package/dist/packages/work/src/exec/instructions.d.ts +99 -0
- package/dist/packages/work/src/exec/instructions.js +323 -0
- package/dist/packages/work/src/exec/loop.d.ts +29 -1
- package/dist/packages/work/src/exec/loop.js +313 -35
- package/dist/packages/work/src/exec/payload.d.ts +29 -0
- package/dist/packages/work/src/exec/payload.js +54 -0
- package/dist/packages/work/src/exec/receipt.d.ts +9 -6
- package/dist/packages/work/src/exec/receipt.js +12 -1
- package/dist/packages/work/src/exec/runner.d.ts +7 -1
- package/dist/packages/work/src/exec/runner.js +84 -3
- package/dist/packages/work/src/harness/child-env.js +7 -0
- package/dist/packages/work/src/harness/claude.d.ts +20 -8
- package/dist/packages/work/src/harness/claude.js +260 -58
- package/dist/packages/work/src/harness/codex.d.ts +5 -4
- package/dist/packages/work/src/harness/codex.js +169 -41
- package/dist/packages/work/src/harness/contract.d.ts +36 -11
- package/dist/packages/work/src/harness/fake.js +1 -0
- package/dist/packages/work/src/harness/jsonrpc-stdio.js +7 -0
- package/dist/packages/work/src/harness/permissions.d.ts +16 -3
- package/dist/packages/work/src/harness/permissions.js +102 -13
- package/dist/packages/work/src/harness/session-store.d.ts +30 -10
- package/dist/packages/work/src/harness/session-store.js +317 -89
- package/dist/packages/work/src/hold/mcp.d.ts +25 -5
- package/dist/packages/work/src/hold/mcp.js +134 -12
- package/dist/packages/work/src/hub/client.d.ts +8 -1
- package/dist/packages/work/src/hub/client.js +15 -1
- package/dist/packages/work/src/hub/types.d.ts +137 -33
- package/dist/packages/work/src/hub/types.js +8 -10
- package/dist/packages/work/src/mcp/server.js +1 -1
- package/dist/packages/work/src/owenloop-bin.d.ts +1 -0
- package/dist/packages/work/src/owenloop-bin.js +18 -0
- package/dist/packages/work/src/roles/agent-run.d.ts +12 -6
- package/dist/packages/work/src/roles/agent-run.js +115 -34
- package/dist/packages/work/src/roles/exec.d.ts +8 -0
- package/dist/packages/work/src/roles/exec.js +27 -2
- package/dist/packages/work/src/roles/hold.d.ts +6 -0
- package/dist/packages/work/src/roles/hold.js +83 -13
- package/dist/packages/work/src/roles/lint.d.ts +3 -4
- package/dist/packages/work/src/roles/lint.js +41 -7
- package/dist/packages/work/src/roles/settings.js +19 -2
- package/dist/packages/work/src/roles/shift.d.ts +1 -0
- package/dist/packages/work/src/roles/shift.js +36 -2
- package/dist/packages/work/src/settings/settings.d.ts +70 -1
- package/dist/packages/work/src/settings/settings.js +90 -4
- package/dist/packages/work/src/shift/logretention.d.ts +253 -0
- package/dist/packages/work/src/shift/logretention.js +407 -0
- package/dist/packages/work/src/shift/logsink.d.ts +14 -0
- package/dist/packages/work/src/shift/logsink.js +98 -0
- package/dist/packages/work/src/shift/loop.d.ts +32 -4
- package/dist/packages/work/src/shift/loop.js +687 -166
- package/dist/packages/work/src/shift/protocol.d.ts +128 -1
- package/dist/packages/work/src/shift/protocol.js +14 -0
- package/dist/packages/work/src/shift/runtime.d.ts +16 -0
- package/dist/packages/work/src/shift/runtime.js +291 -5
- package/dist/packages/work/src/shift/server.d.ts +13 -0
- package/dist/packages/work/src/shift/server.js +61 -36
- package/dist/packages/work/src/shift/spawn.d.ts +115 -19
- package/dist/packages/work/src/shift/spawn.js +234 -30
- package/dist/packages/work/src/shift/state.d.ts +76 -49
- package/dist/packages/work/src/shift/state.js +350 -103
- package/dist/packages/work/src/shift/truncate.d.ts +35 -0
- package/dist/packages/work/src/shift/truncate.js +73 -0
- package/dist/packages/work/src/submit-proof.d.ts +61 -0
- package/dist/packages/work/src/submit-proof.js +119 -0
- package/dist/packages/work/src/submit-value.d.ts +48 -0
- package/dist/packages/work/src/submit-value.js +118 -0
- package/dist/packages/work/src/usage.d.ts +1 -1
- package/dist/packages/work/src/usage.js +11 -0
- package/dist/src/add.d.ts +64 -259
- package/dist/src/add.js +81 -615
- package/dist/src/archive.d.ts +97 -0
- package/dist/src/archive.js +591 -0
- package/dist/src/bundle/index.d.ts +64 -0
- package/dist/src/bundle/index.js +508 -0
- package/dist/src/bundle/manifest.d.ts +50 -0
- package/dist/src/bundle/manifest.js +435 -0
- package/dist/src/bundle/runtime.d.ts +26 -0
- package/dist/src/bundle/runtime.js +64 -0
- package/dist/src/bundle/tar.d.ts +62 -0
- package/dist/src/bundle/tar.js +238 -0
- package/dist/src/bundle/types.d.ts +105 -0
- package/dist/src/bundle/types.js +21 -0
- package/dist/src/capabilities.d.ts +93 -0
- package/dist/src/capabilities.js +101 -0
- package/dist/src/cli.d.ts +90 -20
- package/dist/src/cli.js +2421 -374
- package/dist/src/credentials.d.ts +4 -3
- package/dist/src/credentials.js +21 -19
- package/dist/src/crypto/allowed-signers.d.ts +68 -0
- package/dist/src/crypto/allowed-signers.js +307 -0
- package/dist/src/crypto/canonical.d.ts +8 -0
- package/dist/src/crypto/canonical.js +92 -0
- package/dist/src/crypto/chain.d.ts +65 -0
- package/dist/src/crypto/chain.js +377 -0
- package/dist/src/crypto/dsse.d.ts +209 -0
- package/dist/src/crypto/dsse.js +282 -0
- package/dist/src/crypto/enrollment.d.ts +78 -0
- package/dist/src/crypto/enrollment.js +186 -0
- package/dist/src/crypto/index.d.ts +48 -0
- package/dist/src/crypto/index.js +44 -0
- package/dist/src/crypto/keys.d.ts +258 -0
- package/dist/src/crypto/keys.js +908 -0
- package/dist/src/crypto/org-root.d.ts +33 -0
- package/dist/src/crypto/org-root.js +78 -0
- package/dist/src/crypto/origin-rules.d.ts +56 -0
- package/dist/src/crypto/origin-rules.js +143 -0
- package/dist/src/crypto/policy-floor.d.ts +98 -0
- package/dist/src/crypto/policy-floor.js +353 -0
- package/dist/src/crypto/records.d.ts +319 -0
- package/dist/src/crypto/records.js +168 -0
- package/dist/src/crypto/scope.d.ts +49 -0
- package/dist/src/crypto/scope.js +83 -0
- package/dist/src/crypto/ssh.d.ts +171 -0
- package/dist/src/crypto/ssh.js +396 -0
- package/dist/src/crypto/submission.d.ts +33 -0
- package/dist/src/crypto/submission.js +47 -0
- package/dist/src/crypto/trust-roots.d.ts +29 -0
- package/dist/src/crypto/trust-roots.js +39 -0
- package/dist/src/crypto/verify-consumed.d.ts +67 -0
- package/dist/src/crypto/verify-consumed.js +259 -0
- package/dist/src/crypto/verify-origin.d.ts +50 -0
- package/dist/src/crypto/verify-origin.js +151 -0
- package/dist/src/crypto/verify-publication.d.ts +60 -0
- package/dist/src/crypto/verify-publication.js +150 -0
- package/dist/src/defs.d.ts +24 -1
- package/dist/src/defs.js +335 -27
- package/dist/src/engine.d.ts +211 -6
- package/dist/src/engine.js +459 -59
- package/dist/src/factory.d.ts +16 -0
- package/dist/src/factory.js +16 -4
- package/dist/src/global-config.d.ts +59 -0
- package/dist/src/global-config.js +84 -0
- package/dist/src/hub.d.ts +102 -32
- package/dist/src/hub.js +147 -58
- package/dist/src/index.d.ts +19 -2
- package/dist/src/index.js +23 -2
- package/dist/src/install.d.ts +538 -0
- package/dist/src/install.js +1981 -0
- package/dist/src/lock.d.ts +15 -57
- package/dist/src/lock.js +251 -143
- package/dist/src/mcp/serve.d.ts +46 -22
- package/dist/src/mcp/serve.js +174 -44
- package/dist/src/mcp/server.js +12 -1
- package/dist/src/model.d.ts +51 -0
- package/dist/src/model.js +157 -1
- package/dist/src/order-resolver.d.ts +184 -0
- package/dist/src/order-resolver.js +252 -0
- package/dist/src/package-version.d.ts +10 -0
- package/dist/src/package-version.js +42 -0
- package/dist/src/paths.d.ts +14 -1
- package/dist/src/paths.js +18 -0
- package/dist/src/schemas/enrollment-grant.v1.schema.json +90 -0
- package/dist/src/schemas/index.d.ts +1433 -0
- package/dist/src/schemas/index.js +31 -0
- package/dist/src/schemas/order.v1.schema.json +120 -0
- package/dist/src/schemas/origin.v1.schema.json +68 -0
- package/dist/src/schemas/policy-floor.v1.schema.json +29 -0
- package/dist/src/schemas/publication.v1.schema.json +31 -0
- package/dist/src/schemas/revocation.v1.schema.json +39 -0
- package/dist/src/schemas/submission.v1.schema.json +61 -0
- package/dist/src/store/def-source.d.ts +52 -0
- package/dist/src/store/def-source.js +335 -0
- package/dist/src/store/index-file.d.ts +69 -0
- package/dist/src/store/index-file.js +151 -0
- package/dist/src/store/index.d.ts +27 -0
- package/dist/src/store/index.js +22 -0
- package/dist/src/store/ingestor.d.ts +43 -0
- package/dist/src/store/ingestor.js +211 -0
- package/dist/src/store/install.d.ts +228 -0
- package/dist/src/store/install.js +555 -0
- package/dist/src/store/instruction-source.d.ts +49 -0
- package/dist/src/store/instruction-source.js +298 -0
- package/dist/src/store/origin-evidence.d.ts +21 -0
- package/dist/src/store/origin-evidence.js +66 -0
- package/dist/src/store/pre-commit-verifier.d.ts +68 -0
- package/dist/src/store/pre-commit-verifier.js +418 -0
- package/dist/src/store/resolve.d.ts +138 -0
- package/dist/src/store/resolve.js +363 -0
- package/dist/src/store/types.d.ts +288 -0
- package/dist/src/store/types.js +356 -0
- package/dist/src/store.d.ts +33 -1
- package/dist/src/store.js +57 -4
- package/dist/src/types.d.ts +146 -12
- package/dist/src/untar.d.ts +8 -23
- package/dist/src/untar.js +10 -136
- package/docs/agent-runner.md +86 -0
- package/docs/authoring.md +64 -6
- package/docs/bundles.md +350 -0
- package/docs/cli.md +1298 -106
- package/docs/crypto.md +832 -0
- package/docs/design.md +342 -20
- package/docs/embedding.md +132 -25
- package/docs/shift-logs.md +642 -0
- package/docs/wire-contracts.md +395 -0
- package/package.json +6 -1
- package/plugins/claude-code/.claude-plugin/marketplace.json +14 -0
- package/plugins/claude-code/plugin/.claude-plugin/plugin.json +8 -0
- package/plugins/claude-code/plugin/.mcp.json +14 -0
- package/plugins/claude-code/plugin/hooks/hooks.json +26 -0
- package/plugins/claude-code/plugin/hooks/session-end.sh +40 -0
- package/plugins/claude-code/plugin/hooks/session-start.sh +52 -0
- package/plugins/claude-code/plugin/skills/author/SKILL.md +181 -0
- package/plugins/claude-code/plugin/skills/conduct/SKILL.md +106 -0
- package/plugins/claude-code/plugin/skills/shift/SKILL.md +105 -0
- package/plugins/codex/.agents/plugins/marketplace.json +21 -0
- package/plugins/codex/plugins/owenloop/.codex-plugin/plugin.json +7 -0
- package/plugins/codex/plugins/owenloop/.mcp.json +20 -0
- package/plugins/codex/plugins/owenloop/hooks/hooks.json +26 -0
- package/plugins/codex/plugins/owenloop/hooks/session-end.sh +40 -0
- package/plugins/codex/plugins/owenloop/hooks/session-start.sh +52 -0
- package/plugins/codex/plugins/owenloop/skills/author/SKILL.md +181 -0
- package/plugins/codex/plugins/owenloop/skills/conduct/SKILL.md +106 -0
- package/plugins/codex/plugins/owenloop/skills/shift/SKILL.md +105 -0
package/dist/src/hub.js
CHANGED
|
@@ -111,6 +111,16 @@ export function hashDefForHub(yaml) {
|
|
|
111
111
|
* and cheap to widen later (a two-way door).
|
|
112
112
|
*/
|
|
113
113
|
const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '[::1]']);
|
|
114
|
+
/**
|
|
115
|
+
* The production hub. The sole fallback rung for every hub-resolution ladder
|
|
116
|
+
* in this package that has one (`src/cli.ts`'s `resolveHub` and
|
|
117
|
+
* `resolveSetupHub`, `src/mcp/serve.ts`'s `resolveMcpOrigin`) — there must be
|
|
118
|
+
* exactly one literal `'https://api.owenloop.com'` in `src/`, and this is it.
|
|
119
|
+
* `resolveAgentHub` (`src/cli.ts`) deliberately has NO fallback to this
|
|
120
|
+
* constant: it mints credentials, and silently minting on the wrong org is
|
|
121
|
+
* not undone by a retry.
|
|
122
|
+
*/
|
|
123
|
+
export const DEFAULT_HUB = 'https://api.owenloop.com';
|
|
114
124
|
/**
|
|
115
125
|
* Normalize a hub URL to a bare origin (`scheme://host[:port]`), stripping any
|
|
116
126
|
* path, query, trailing slash, and fragment. Requires an http(s) scheme. This
|
|
@@ -360,52 +370,101 @@ export function writeCredentialFile(path, file) {
|
|
|
360
370
|
chmodSync(dir, 0o700);
|
|
361
371
|
writeFileAtomic(path, `${JSON.stringify(file, null, 2)}\n`, { mode: 0o600 });
|
|
362
372
|
}
|
|
373
|
+
const runMacosSecurity = (command) => {
|
|
374
|
+
if (command.captureStdout === true) {
|
|
375
|
+
return execFileSync('security', command.args, {
|
|
376
|
+
encoding: 'utf8',
|
|
377
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
execFileSync('security', command.args, {
|
|
381
|
+
...(command.input === undefined ? {} : { input: command.input }),
|
|
382
|
+
stdio: command.input === undefined ? 'ignore' : ['pipe', 'ignore', 'ignore'],
|
|
383
|
+
});
|
|
384
|
+
return '';
|
|
385
|
+
};
|
|
386
|
+
function macosSecurityFailure(operation, error) {
|
|
387
|
+
const detail = error;
|
|
388
|
+
if (typeof detail.status === 'number') {
|
|
389
|
+
throw new Error(`macOS Keychain ${operation} failed: security exited with status ${detail.status}`);
|
|
390
|
+
}
|
|
391
|
+
if (typeof detail.signal === 'string') {
|
|
392
|
+
throw new Error(`macOS Keychain ${operation} failed: security terminated by signal ${detail.signal}`);
|
|
393
|
+
}
|
|
394
|
+
const code = typeof detail.code === 'string' ? detail.code : 'unknown error';
|
|
395
|
+
throw new Error(`macOS Keychain ${operation} failed: security could not be run (${code})`);
|
|
396
|
+
}
|
|
363
397
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
* never appears in `ps`/shell history. Returns `undefined` off macOS or when
|
|
368
|
-
* `OWENLOOP_NO_KEYCHAIN=1`, so callers fall back to the 0600 credential file.
|
|
398
|
+
* Build the macOS generic-password backend around an injectable `security`
|
|
399
|
+
* command runner. Status 44 (`errSecItemNotFound`) alone means absence. Every
|
|
400
|
+
* other exit, signal, or start failure is a stable, secret-free error.
|
|
369
401
|
*/
|
|
370
|
-
export function
|
|
371
|
-
if (env.OWENLOOP_NO_KEYCHAIN === '1')
|
|
372
|
-
return undefined;
|
|
373
|
-
if (process.platform !== 'darwin')
|
|
374
|
-
return undefined;
|
|
402
|
+
export function macosKeychain(runner = runMacosSecurity) {
|
|
375
403
|
return {
|
|
376
404
|
get(service, account) {
|
|
377
405
|
try {
|
|
378
|
-
const out =
|
|
379
|
-
|
|
380
|
-
|
|
406
|
+
const out = runner({
|
|
407
|
+
args: ['find-generic-password', '-s', service, '-a', account, '-w'],
|
|
408
|
+
captureStdout: true,
|
|
381
409
|
});
|
|
382
410
|
return out.replace(/\n$/, '');
|
|
383
411
|
}
|
|
384
|
-
catch {
|
|
385
|
-
|
|
412
|
+
catch (error) {
|
|
413
|
+
if (error.status === 44)
|
|
414
|
+
return null;
|
|
415
|
+
return macosSecurityFailure('lookup', error);
|
|
386
416
|
}
|
|
387
417
|
},
|
|
388
418
|
set(service, account, value) {
|
|
389
419
|
// `security -i` reads newline-terminated commands from stdin; the secret
|
|
390
420
|
// rides in that stdin stream (single-quoted), never on this process's argv.
|
|
391
|
-
//
|
|
392
|
-
//
|
|
393
|
-
const sq = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
421
|
+
// `security -i` treats `\` as an escape character even inside single
|
|
422
|
+
// quotes, so backslashes are doubled before quote escaping.
|
|
423
|
+
const sq = (s) => `'${s.replace(/\\/g, '\\\\').replace(/'/g, `'\\''`)}'`;
|
|
394
424
|
const cmd = `add-generic-password -U -s ${sq(service)} -a ${sq(account)} -w ${sq(value)}\n`;
|
|
395
|
-
|
|
425
|
+
try {
|
|
426
|
+
runner({ args: ['-i'], input: cmd });
|
|
427
|
+
}
|
|
428
|
+
catch (error) {
|
|
429
|
+
return macosSecurityFailure('write', error);
|
|
430
|
+
}
|
|
396
431
|
},
|
|
397
432
|
delete(service, account) {
|
|
398
433
|
try {
|
|
399
|
-
|
|
400
|
-
stdio: 'ignore',
|
|
401
|
-
});
|
|
434
|
+
runner({ args: ['delete-generic-password', '-s', service, '-a', account] });
|
|
402
435
|
}
|
|
403
|
-
catch {
|
|
404
|
-
|
|
436
|
+
catch (error) {
|
|
437
|
+
if (error.status === 44)
|
|
438
|
+
return;
|
|
439
|
+
return macosSecurityFailure('delete', error);
|
|
405
440
|
}
|
|
406
441
|
},
|
|
407
442
|
};
|
|
408
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Every locally available Keychain backend, independent of the ordinary-store
|
|
446
|
+
* override. Defensive logout uses this resolver so `OWENLOOP_NO_KEYCHAIN=1`
|
|
447
|
+
* cannot hide a credential that would become authoritative again when the
|
|
448
|
+
* override is removed. An injected backend remains available on every platform;
|
|
449
|
+
* otherwise only macOS has a platform backend.
|
|
450
|
+
*/
|
|
451
|
+
export function resolveLocalKeychain(injected) {
|
|
452
|
+
if (injected !== undefined)
|
|
453
|
+
return injected;
|
|
454
|
+
if (process.platform !== 'darwin')
|
|
455
|
+
return undefined;
|
|
456
|
+
return macosKeychain();
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* The default Keychain selected for ordinary reads and writes. Returns
|
|
460
|
+
* `undefined` off macOS or when `OWENLOOP_NO_KEYCHAIN=1` selects the 0600 file
|
|
461
|
+
* store. Logout deliberately uses `resolveLocalKeychain` instead.
|
|
462
|
+
*/
|
|
463
|
+
export function defaultKeychain(env) {
|
|
464
|
+
if (env.OWENLOOP_NO_KEYCHAIN === '1')
|
|
465
|
+
return undefined;
|
|
466
|
+
return resolveLocalKeychain();
|
|
467
|
+
}
|
|
409
468
|
/**
|
|
410
469
|
* The configured external credential command, or `undefined` when it is unset
|
|
411
470
|
* or blank.
|
|
@@ -575,13 +634,11 @@ export function credentialBackend(env, injected) {
|
|
|
575
634
|
* never `process.env` directly, so a caller passing `opts.env` stays hermetic;
|
|
576
635
|
* only the top-level default falls back to `process.env`.
|
|
577
636
|
*
|
|
578
|
-
* **
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* `runCredentialCommand`. When it is NOT configured, behaviour is exactly what
|
|
584
|
-
* it has always been.
|
|
637
|
+
* **An authoritative backend failure throws instead of returning `null`.** For
|
|
638
|
+
* `OWENLOOP_CREDENTIAL_COMMAND`, a nonzero exit, timeout, empty output, or
|
|
639
|
+
* malformed credential is a loud error naming the origin and slot. For the
|
|
640
|
+
* macOS Keychain, every `security` failure except status 44 is a stable,
|
|
641
|
+
* secret-free error. Neither backend falls through to a stale file entry.
|
|
585
642
|
*/
|
|
586
643
|
export function readStoredCredential(origin, opts) {
|
|
587
644
|
const env = opts.env ?? process.env;
|
|
@@ -614,11 +671,37 @@ export function readStoredCredential(origin, opts) {
|
|
|
614
671
|
* Enumerate the hub origins that have a usable `human` credential stored, or
|
|
615
672
|
* `null` when the active backend cannot be enumerated.
|
|
616
673
|
*
|
|
617
|
-
*
|
|
618
|
-
* `src/mcp/serve.ts`
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
674
|
+
* Callers in `src/cli.ts` share a backend-aware discovery layer, while
|
|
675
|
+
* `src/mcp/serve.ts` consumes this fact directly. Their policies deliberately
|
|
676
|
+
* differ, turning the same three possible results (`null`, `[]`, length>1)
|
|
677
|
+
* into different outcomes:
|
|
678
|
+
*
|
|
679
|
+
* - `resolveAgentHub` (`agent new`, `capability bind|unbind|list`, and
|
|
680
|
+
* `crew`'s subcommands) — mutating, mint-like commands. Every non-single
|
|
681
|
+
* result (`null`, `[]`, or length>1) is an immediate `CliError` (exit 2)
|
|
682
|
+
* naming `--hub <origin>` as the fix. There is no `DEFAULT_HUB` fallback
|
|
683
|
+
* here at all: silently minting against the production hub while the
|
|
684
|
+
* operator is logged into a dev hub would mint on the wrong org, and a mint
|
|
685
|
+
* is not undone by a retry.
|
|
686
|
+
* - `resolveSetupHub` (`setup`, `doctor`) — `null` or `[]` fall back to
|
|
687
|
+
* `DEFAULT_HUB` with a printed notice so the operator can see what
|
|
688
|
+
* happened; length>1 is still a `CliError` (exit 2) naming the origins,
|
|
689
|
+
* because guessing among several logged-in hubs would be silently wrong for
|
|
690
|
+
* someone who has more than one.
|
|
691
|
+
* - `resolvePublishingHub` (`connect`, `push`, `publish`) — one file-backed
|
|
692
|
+
* origin is the global fallback; more than one or none is an exit-2 error.
|
|
693
|
+
* For `null`, and only for `null`, this policy may use the validated
|
|
694
|
+
* execution-settings `hubOrigin` after checking the requested credential
|
|
695
|
+
* slot. It never guesses `DEFAULT_HUB`.
|
|
696
|
+
* - `resolveMcpOrigin` (`owenloop mcp`'s origin ladder) — the most lenient:
|
|
697
|
+
* this is rung 4 of 5, tried only after `--hub`, `OWENLOOP_HUB`, and
|
|
698
|
+
* `~/.owenloop/config.json` have all had nothing to offer. `null`, `[]`,
|
|
699
|
+
* and length>1 are ALL just "this rung has nothing to offer either" and
|
|
700
|
+
* fall through silently to rung 5 (`DEFAULT_HUB`) — there is no error path
|
|
701
|
+
* left to reach from here.
|
|
702
|
+
*
|
|
703
|
+
* The backend determines whether enumeration is even possible in the first
|
|
704
|
+
* place, independent of which of the three callers is asking:
|
|
622
705
|
*
|
|
623
706
|
* - **file** → the origins in `readCredentialFile(credentialFilePath(env)).hubs`
|
|
624
707
|
* whose `human` slot parses as a well-formed `Credential` (`parseCredential`).
|
|
@@ -633,10 +716,10 @@ export function readStoredCredential(origin, opts) {
|
|
|
633
716
|
* - **external** → `null`, for the same reason: the command answers a single
|
|
634
717
|
* `(origin, slot)` query; it has no listing contract.
|
|
635
718
|
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
719
|
+
* This function only reports the fact (and the backend-level reason behind
|
|
720
|
+
* it); it never decides the outcome — that is each caller's job, per the list
|
|
721
|
+
* above. It never logs or echoes any credential; only the origin KEYS (never
|
|
722
|
+
* secrets) are returned.
|
|
640
723
|
*
|
|
641
724
|
* `env`/`keychain` are threaded exactly as `readStoredCredential` threads them,
|
|
642
725
|
* so a caller passing a fixture `env` stays hermetic.
|
|
@@ -885,7 +968,7 @@ export function asAgentIdentities(body) {
|
|
|
885
968
|
* Validate the five common `CapabilityRouteWire` fields on one row. `prefix` is the
|
|
886
969
|
* endpoint-qualified lead-in the caller wants (e.g.
|
|
887
970
|
* `add_capability_route: malformed success response`) and `where` names the
|
|
888
|
-
* offending position (`
|
|
971
|
+
* offending position (`binding`, or `bindings[2]`) — a FIELD/INDEX name only,
|
|
889
972
|
* never a value.
|
|
890
973
|
*
|
|
891
974
|
* `crewName` is validated LENIENTLY here, unlike the other four fields: absent or
|
|
@@ -925,11 +1008,11 @@ function asCapabilityRouteRow(entry, prefix, where) {
|
|
|
925
1008
|
}
|
|
926
1009
|
/**
|
|
927
1010
|
* Narrow `POST /api/add_capability_route`'s 200 body
|
|
928
|
-
* (`{ text,
|
|
1011
|
+
* (`{ text, binding, alreadyBound, boundCrewCount }`). Throws on anything
|
|
929
1012
|
* malformed, naming the offending FIELD only — same discipline as
|
|
930
1013
|
* `asAgentIdentities`, so no body value is echoed.
|
|
931
1014
|
*
|
|
932
|
-
* `
|
|
1015
|
+
* `binding.crewName` is required to be a NON-NULL non-empty string here, on top
|
|
933
1016
|
* of `asCapabilityRouteRow`'s lenient check. That is not a contradiction: an add
|
|
934
1017
|
* resolves its crew BY NAME, so the crew is live by construction and a `null`
|
|
935
1018
|
* name in THIS response is genuinely malformed — whereas a `null` name in a
|
|
@@ -943,20 +1026,20 @@ export function asCapabilityRouteAdded(body) {
|
|
|
943
1026
|
throw new Error(`${prefix} — not an object`);
|
|
944
1027
|
}
|
|
945
1028
|
const b = body;
|
|
946
|
-
if (b.
|
|
947
|
-
throw new Error(`${prefix} — missing
|
|
1029
|
+
if (b.binding === undefined) {
|
|
1030
|
+
throw new Error(`${prefix} — missing binding`);
|
|
948
1031
|
}
|
|
949
|
-
const
|
|
950
|
-
if (
|
|
951
|
-
throw new Error(`${prefix} —
|
|
1032
|
+
const binding = asCapabilityRouteRow(b.binding, prefix, 'binding');
|
|
1033
|
+
if (binding.crewName === null) {
|
|
1034
|
+
throw new Error(`${prefix} — binding missing non-empty string crewName`);
|
|
952
1035
|
}
|
|
953
|
-
if (typeof b.
|
|
954
|
-
throw new Error(`${prefix} — missing boolean
|
|
1036
|
+
if (typeof b.alreadyBound !== 'boolean') {
|
|
1037
|
+
throw new Error(`${prefix} — missing boolean alreadyBound`);
|
|
955
1038
|
}
|
|
956
|
-
if (typeof b.
|
|
957
|
-
throw new Error(`${prefix} — missing number
|
|
1039
|
+
if (typeof b.boundCrewCount !== 'number') {
|
|
1040
|
+
throw new Error(`${prefix} — missing number boundCrewCount`);
|
|
958
1041
|
}
|
|
959
|
-
return {
|
|
1042
|
+
return { binding, alreadyBound: b.alreadyBound, boundCrewCount: b.boundCrewCount };
|
|
960
1043
|
}
|
|
961
1044
|
/**
|
|
962
1045
|
* Narrow `POST /api/remove_capability_route`'s 200 body
|
|
@@ -1020,21 +1103,27 @@ export function asCapabilityRouteRemoved(body) {
|
|
|
1020
1103
|
return { capability: b.capability, crewId, removed: b.removed, remainingCrewIds };
|
|
1021
1104
|
}
|
|
1022
1105
|
/**
|
|
1023
|
-
* Narrow `GET /api/capability_routes`'s 200 body (`{ text,
|
|
1106
|
+
* Narrow `GET /api/capability_routes`'s 200 body (`{ text, bindings: [...] }`) to a
|
|
1024
1107
|
* typed array. An EMPTY array is valid — that is the "this org has no routes
|
|
1025
1108
|
* yet" case, not an error.
|
|
1026
1109
|
*
|
|
1110
|
+
* THE ARRAY KEY IS `bindings`, WHICH IS THE HUB'S NAME — the endpoint PATH is
|
|
1111
|
+
* `capability_routes` but its payload key is not. This narrower demanded
|
|
1112
|
+
* `routes` until now, so `capability list` failed against every live hub with
|
|
1113
|
+
* `malformed response — expected a \`routes\` array` even on a perfectly good
|
|
1114
|
+
* 200. See `CapabilityRouteAddedWire` for why the client mirrors the hub.
|
|
1115
|
+
*
|
|
1027
1116
|
* Rows are plain `CapabilityRouteWire`, ONE per `(capability, crew)` pair ordered by
|
|
1028
1117
|
* `capability, crew_id`, so a capability bound to many crews yields MANY rows — the array
|
|
1029
1118
|
* is forwarded as-is and must never be collapsed into a per-capability map. A row
|
|
1030
1119
|
* whose `crewName` is `null` is a dangling route and is kept, not dropped.
|
|
1031
1120
|
*/
|
|
1032
1121
|
export function asCapabilityRoutes(body) {
|
|
1033
|
-
if (typeof body !== 'object' || body === null || !Array.isArray(body.
|
|
1034
|
-
throw new Error('capability_routes: malformed response — expected a `
|
|
1122
|
+
if (typeof body !== 'object' || body === null || !Array.isArray(body.bindings)) {
|
|
1123
|
+
throw new Error('capability_routes: malformed response — expected a `bindings` array');
|
|
1035
1124
|
}
|
|
1036
|
-
const list = body.
|
|
1037
|
-
return list.map((entry, i) => asCapabilityRouteRow(entry, 'capability_routes: malformed response', `
|
|
1125
|
+
const list = body.bindings;
|
|
1126
|
+
return list.map((entry, i) => asCapabilityRouteRow(entry, 'capability_routes: malformed response', `bindings[${i}]`));
|
|
1038
1127
|
}
|
|
1039
1128
|
/**
|
|
1040
1129
|
* The `orphan:` prefix the hub uses to name its reserved orphan crew
|
package/dist/src/index.d.ts
CHANGED
|
@@ -11,22 +11,39 @@
|
|
|
11
11
|
* workflow definitions + a Step Agent that executes orders) layers a concrete
|
|
12
12
|
* process — software delivery, research, triage — on top of it.
|
|
13
13
|
*/
|
|
14
|
-
export { Engine } from './engine.ts';
|
|
14
|
+
export { CallsPinError, Engine, ModifierRefusalError } from './engine.ts';
|
|
15
15
|
export type { CommitResult, CreateOpts, DefResolver, DeferredFiring, DeferredReason, EmitResult, EngineEvent, EngineListener, EngineWorkflowStatus, Order, ReapDetail, ReapReason, TickResult, } from './engine.ts';
|
|
16
|
+
export { capabilityName, claimMatches, composeCapabilities, DEFAULT_MATCH_MODE, MODIFIER_SEPARATOR, } from './capabilities.ts';
|
|
17
|
+
export type { MatchMode } from './capabilities.ts';
|
|
16
18
|
export { createEngine } from './factory.ts';
|
|
17
19
|
export type { CreateEngineOpts, CreatedEngine } from './factory.ts';
|
|
20
|
+
export { createDefInstructionSource, defInstructionDigest, OrderResolver, substituteOrderVars, UnknownDefDigestError, UnknownInstructionError, } from './order-resolver.ts';
|
|
21
|
+
export type { OrderInstructionLookup, OrderInstructionRef, OrderInstructionSource, OrderRuntimeVars, ResolvedInstructionRecord, ResolvedInstructions, } from './order-resolver.ts';
|
|
18
22
|
export { Store, openStore, StoreVersionError } from './store.ts';
|
|
19
23
|
export type { ArtifactRow, RunRow, TaskRow, WorkflowRow } from './store.ts';
|
|
20
|
-
export {
|
|
24
|
+
export { defDigest, emptyWorkflowStoreIndex, globalStoreRoot, hardenObjectModes, installWorkflowBundle, inspectCasDefs, isDefDigest, loadCasDefs, objectDestRelPath, objectDirForDigest, parseWorkflowCoordinate, parseWorkflowStoreIndex, projectStoreRoot, probeObjectDir, probeStoreRoot, readWorkflowStoreIndex, recoverWorkflowStore, resolveWorkflowCoordinate, resolveWorkflowDigest, serializeWorkflowStoreIndex, storeIndexPath, workflowCoordinate, workflowStoreStatePaths, WORKFLOW_STORE_INDEX_VERSION, WorkflowStoreError, StoreIndexError, StoreDigestError, StoreCoordinateError, StoreAmbiguityError, StoreNotFoundError, StoreIntegrityError, StoreConflictError, StoreDefinitionVerificationError, StoreOriginPolicyError, StorePathError, BundleIngestorUnavailableError, PreCommitVerifierUnavailableError, createExecutionOriginVerifier, originEvidencePath, persistOriginEvidence, readOriginEvidence, } from './store/index.ts';
|
|
25
|
+
export type { BundleInstallResult, BundleIngestor, BundleSource, CasDefInspectionResult, CasDefRegistration, DefDigest, LoadCasDefsArgs, InstallWorkflowBundleArgs, PreCommitVerifier, ExecutionOriginVerifierInput, RecoverWorkflowStoreArgs, ResolvedWorkflowObject, ResolveWorkflowCoordinateArgs, ResolveWorkflowDigestArgs, ResolutionLevel, StoreLevel, WorkflowCoordinate, WorkflowStoreIndex, WorkflowStoreIndexEntry, WorkflowStoreStatePaths, } from './store/index.ts';
|
|
26
|
+
export { buildDef, DefError, expandIncludes, finalizeDefs, hashDef, lintDef, loadDefFile, loadDefs, loadDefsRaw, parseDef, resolveCallsTarget, SUPPORTED_ENGINE_VERSION, validateDef } from './defs.ts';
|
|
21
27
|
export { credentialSlot, hashDefForHub, keychainServiceFor, normalizeOrigin, readStoredCredential } from './hub.ts';
|
|
22
28
|
export type { Credential, CredentialSlotSelector, Keychain, ReadStoredCredentialOpts } from './hub.ts';
|
|
23
29
|
export type { DefLoadFailure } from './defs.ts';
|
|
24
30
|
export { deleteCredential, ensureFreshOAuth, storeCredential } from './credentials.ts';
|
|
25
31
|
export type { CredentialIO } from './credentials.ts';
|
|
32
|
+
export { DSSE_SSH_NAMESPACE, DSSE_VERSION, DSSE_RECORD_PAYLOAD_TYPES, DsseEnvelopeError, isDsseRecordPayloadType, PAYLOAD_TYPE_ENROLLMENT_GRANT, PAYLOAD_TYPE_ORIGIN, PAYLOAD_TYPE_POLICY_FLOOR, PAYLOAD_TYPE_PUBLICATION, PAYLOAD_TYPE_REVOCATION, PAYLOAD_TYPE_SUBMISSION, PrincipalKeyManager, SshSigner, SshSignerError, assertEd25519PubText, assertKeyRef, canonicalKeyRef, createSshSigner, decodeBase64Strict, dsseSignEnrollmentGrant, dsseSignEnvelope, dsseSignOrigin, dsseSignPolicyFloor, dsseSignPublication, dsseSignRecord, dsseSignRevocation, dsseSignSubmission, dsseVerifyEnrollmentGrant, dsseVerifyEnvelope, dsseVerifyOrigin, dsseVerifyPolicyFloor, dsseVerifyPublication, dsseVerifyRecord, dsseVerifyRevocation, dsseVerifySubmission, encodeBase64, keyidFromBlob, keyRefHash, parseAllowedSigners, preAuthEncode, publicKeyDescriptor, allowedSignersPath, resolveAllowedSigners, resolveAllowedSignersFile, isDefPolicy, verifyOrigin, verifyOriginSidecar, verifyPublication, verifyPublicationSidecar, verifyConsumed, verifyConsumedArtifact, DEFAULT_MACHINE_SCOPE, buildEnrollmentGrant, verifyRosterEntry, validateEnrollmentChain, validateProducer, revocationTemporalConsistency, attenuate, axisPermits, delegationPermits, ORG_ROOT_SCOPE, scopePermits, loadRoster, loadRevocations, orgRootPrivateKeyPath, orgRootPublicKeyPath, resolveOrgRoot, revocationsDir, rosterDir, ENROLLMENT_GRANT_FIELDS, ENROLLMENT_KEY_FIELDS, GRANT_DELEGATION_ALLOWED_FIELDS, GRANT_DELEGATION_DENIED_FIELDS, GRANT_SCOPE_FIELDS, ORDER_FIELDS, ORDER_OWED_FIELDS, ORDER_REASON_FIELDS, ORIGIN_FIELDS, ORIGIN_SOURCE_AGENT_FIELDS, ORIGIN_SOURCE_CONSOLE_FIELDS, ORIGIN_SOURCE_GIT_FIELDS, POLICY_FLOOR_FIELDS, POLICY_FLOOR_RECORD_FIELDS, PRINCIPAL_REFERENCE_FIELDS, PUBLICATION_FIELDS, RECORD_PAYLOAD_TYPES, REVOCATION_FIELDS, SUBMISSION_FIELDS, SUBMISSION_PRODUCED_FIELDS, } from './crypto/index.ts';
|
|
33
|
+
export type { AllowedSignerEntry, AllowedSignerOptions, AllowedSignersFile, AllowedSignersParseError, AllowedSignersResolution, AllowedSignersPresent, AllowedSignersAbsent, DefPolicy, DefVerdict, OriginVerdict, VerifyOriginInput, VerifyOriginOptions, ConsumedVerdict, VerifyConsumedInput, VerifyConsumedOptions, VerifyPublicationInput, VerifyPublicationOptions, BuildEnrollmentGrantArgs, EnrollmentChainValidator, RosterVerdict, VerifyRosterEntryInput, VerifyRosterEntryOptions, ChainInput, ChainOptions, ChainVerdict, ScopeAxis, OrgRootAbsent, OrgRootPresent, OrgRootResolution, DetachedSignature, DsseEnvelope, DsseRecordPayloadType, DsseSignature, DsseVerifyResult, EnsureKeyResult, InspectKeyResult, KeyStorageBackendKind, PrincipalKeyRef, PrincipalKind, PublicKeyDescriptor, EnrollmentGrantRecord, EnrollmentKeyDescriptor, FieldManifest, GrantDelegation, GrantDelegationAllowed, GrantDelegationDenied, GrantScope, OptionalKeys, OriginRecord, OriginSource, OriginSourceAgent, OriginSourceConsole, OriginSourceGit, PolicyFloor, PolicyFloorRecord, PrincipalReference, PublicationRecord, RequiredKeys, RevocationRecord, SubmissionProducedArtifact, SubmissionRecord, Signer, SshProcessAdapter, SshSignerConfig, VerifiedSignature, } from './crypto/index.ts';
|
|
34
|
+
export { DEF_POLICY_RANK, POLICY_FLOOR_PRESETS, artifactPolicyMinimum, floorDefPolicyMinimum, mergePolicyFloorWithLocal, originRulesMinimum, policyFloorGaps, stricterDefPolicy, verifyPolicyFloorRecord, } from './crypto/index.ts';
|
|
35
|
+
export type { PolicyFloorGap, PolicyFloorMergeResult, PolicyFloorVerdict, VerifyPolicyFloorInput, VerifyPolicyFloorOptions, } from './crypto/index.ts';
|
|
36
|
+
export { ORIGIN_SOURCE_RANK, OriginRulesError, evaluateOriginRule, matchOriginRule, parseOriginRules, } from './crypto/index.ts';
|
|
37
|
+
export type { OriginPolicy, OriginRuleEvaluation, OriginRuleMatch, OriginRuleValue, OriginRules, } from './crypto/index.ts';
|
|
26
38
|
export { buildGraph, buildTrace, eligibleFirings, graphToDot, graphToMermaid, isStalled, modelCheck, workflowStatus, } from './model.ts';
|
|
27
39
|
export type { ArtifactMap, Blocker, Firing, TimeFacts, WorkflowStatus } from './model.ts';
|
|
28
40
|
export { parseConsume, parseProduce, } from './paths.ts';
|
|
29
41
|
export { assertValidSchema, summarizeIssues, validateValue } from './schema.ts';
|
|
30
42
|
export type { SchemaCheck, SchemaIssue } from './schema.ts';
|
|
43
|
+
export { enrollmentGrantSchema, orderSchema, originSchema, policyFloorSchema, publicationSchema, RECORD_SCHEMAS, revocationSchema, SCHEMA_BY_PAYLOAD_TYPE, submissionSchema, WIRE_SCHEMAS, } from './schemas/index.ts';
|
|
44
|
+
export { BundleError, DEFAULT_BUNDLE_LIMITS, digestBundle, inspectBundle, packBundle, unpackBundle } from './bundle/index.ts';
|
|
45
|
+
export type { BundleEntryInfo, BundleErrorCode, BundleLimits, BundleManifest, BundleRuntimeRequirements, InspectOptions, InspectResult, PackOptions, PackResult, } from './bundle/index.ts';
|
|
31
46
|
export { DEBT_STATES, SETTLED_STATES } from './types.ts';
|
|
32
47
|
export type { Acceptance, ArtifactBiography, ArtifactData, Author, CheckFinding, CheckOptions, CheckReport, CheckStep, ConsumePattern, FiringTrigger, Fingerprint, GraphEdge, GraphNode, GraphNodeState, InputDef, InvariantDef, InvariantPredicate, InvariantViolation, JsonSchema, StepDef, ProducePattern, ReasonEntry, RejectKind, RunData, TaskData, TimelineEvent, WorkflowDef, WorkflowGraph, WorkflowTrace, } from './types.ts';
|
|
48
|
+
export { canonicalValueBytes, valueDigestHex, buildSubmissionRecord, signSubmission } from './crypto/index.ts';
|
|
49
|
+
export type { BuildSubmissionRecordInput, SubmissionProducedInput } from './crypto/index.ts';
|
package/dist/src/index.js
CHANGED
|
@@ -11,13 +11,34 @@
|
|
|
11
11
|
* workflow definitions + a Step Agent that executes orders) layers a concrete
|
|
12
12
|
* process — software delivery, research, triage — on top of it.
|
|
13
13
|
*/
|
|
14
|
-
export { Engine } from "./engine.js";
|
|
14
|
+
export { CallsPinError, Engine, ModifierRefusalError } from "./engine.js";
|
|
15
|
+
// Routing capabilities: offer-time composition and the claim-side match. The
|
|
16
|
+
// hub imports these to reason about the same compounds the engine composes.
|
|
17
|
+
export { capabilityName, claimMatches, composeCapabilities, DEFAULT_MATCH_MODE, MODIFIER_SEPARATOR, } from "./capabilities.js";
|
|
15
18
|
export { createEngine } from "./factory.js";
|
|
19
|
+
export { createDefInstructionSource, defInstructionDigest, OrderResolver, substituteOrderVars, UnknownDefDigestError, UnknownInstructionError, } from "./order-resolver.js";
|
|
16
20
|
export { Store, openStore, StoreVersionError } from "./store.js";
|
|
17
|
-
|
|
21
|
+
// The content-addressed WORKFLOW store (distinct from the SQLite runtime
|
|
22
|
+
// store above): two-level digest-addressed workflow objects + coordinate
|
|
23
|
+
// index, `.wnlp` bundle installation, and fail-closed resolution.
|
|
24
|
+
export { defDigest, emptyWorkflowStoreIndex, globalStoreRoot, hardenObjectModes, installWorkflowBundle, inspectCasDefs, isDefDigest, loadCasDefs, objectDestRelPath, objectDirForDigest, parseWorkflowCoordinate, parseWorkflowStoreIndex, projectStoreRoot, probeObjectDir, probeStoreRoot, readWorkflowStoreIndex, recoverWorkflowStore, resolveWorkflowCoordinate, resolveWorkflowDigest, serializeWorkflowStoreIndex, storeIndexPath, workflowCoordinate, workflowStoreStatePaths, WORKFLOW_STORE_INDEX_VERSION, WorkflowStoreError, StoreIndexError, StoreDigestError, StoreCoordinateError, StoreAmbiguityError, StoreNotFoundError, StoreIntegrityError, StoreConflictError, StoreDefinitionVerificationError, StoreOriginPolicyError, StorePathError, BundleIngestorUnavailableError, PreCommitVerifierUnavailableError, createExecutionOriginVerifier, originEvidencePath, persistOriginEvidence, readOriginEvidence, } from "./store/index.js";
|
|
25
|
+
export { buildDef, DefError, expandIncludes, finalizeDefs, hashDef, lintDef, loadDefFile, loadDefs, loadDefsRaw, parseDef, resolveCallsTarget, SUPPORTED_ENGINE_VERSION, validateDef } from "./defs.js";
|
|
18
26
|
export { credentialSlot, hashDefForHub, keychainServiceFor, normalizeOrigin, readStoredCredential } from "./hub.js";
|
|
19
27
|
export { deleteCredential, ensureFreshOAuth, storeCredential } from "./credentials.js";
|
|
28
|
+
export { DSSE_SSH_NAMESPACE, DSSE_VERSION, DSSE_RECORD_PAYLOAD_TYPES, DsseEnvelopeError, isDsseRecordPayloadType, PAYLOAD_TYPE_ENROLLMENT_GRANT, PAYLOAD_TYPE_ORIGIN, PAYLOAD_TYPE_POLICY_FLOOR, PAYLOAD_TYPE_PUBLICATION, PAYLOAD_TYPE_REVOCATION, PAYLOAD_TYPE_SUBMISSION, PrincipalKeyManager, SshSigner, SshSignerError, assertEd25519PubText, assertKeyRef, canonicalKeyRef, createSshSigner, decodeBase64Strict, dsseSignEnrollmentGrant, dsseSignEnvelope, dsseSignOrigin, dsseSignPolicyFloor, dsseSignPublication, dsseSignRecord, dsseSignRevocation, dsseSignSubmission, dsseVerifyEnrollmentGrant, dsseVerifyEnvelope, dsseVerifyOrigin, dsseVerifyPolicyFloor, dsseVerifyPublication, dsseVerifyRecord, dsseVerifyRevocation, dsseVerifySubmission, encodeBase64, keyidFromBlob, keyRefHash, parseAllowedSigners, preAuthEncode, publicKeyDescriptor, allowedSignersPath, resolveAllowedSigners, resolveAllowedSignersFile, isDefPolicy, verifyOrigin, verifyOriginSidecar, verifyPublication, verifyPublicationSidecar, verifyConsumed, verifyConsumedArtifact, DEFAULT_MACHINE_SCOPE, buildEnrollmentGrant, verifyRosterEntry, validateEnrollmentChain, validateProducer, revocationTemporalConsistency, attenuate, axisPermits, delegationPermits, ORG_ROOT_SCOPE, scopePermits, loadRoster, loadRevocations, orgRootPrivateKeyPath, orgRootPublicKeyPath, resolveOrgRoot, revocationsDir, rosterDir, ENROLLMENT_GRANT_FIELDS, ENROLLMENT_KEY_FIELDS, GRANT_DELEGATION_ALLOWED_FIELDS, GRANT_DELEGATION_DENIED_FIELDS, GRANT_SCOPE_FIELDS, ORDER_FIELDS, ORDER_OWED_FIELDS, ORDER_REASON_FIELDS, ORIGIN_FIELDS, ORIGIN_SOURCE_AGENT_FIELDS, ORIGIN_SOURCE_CONSOLE_FIELDS, ORIGIN_SOURCE_GIT_FIELDS, POLICY_FLOOR_FIELDS, POLICY_FLOOR_RECORD_FIELDS, PRINCIPAL_REFERENCE_FIELDS, PUBLICATION_FIELDS, RECORD_PAYLOAD_TYPES, REVOCATION_FIELDS, SUBMISSION_FIELDS, SUBMISSION_PRODUCED_FIELDS, } from "./crypto/index.js";
|
|
29
|
+
// ---- policy floors ----
|
|
30
|
+
export { DEF_POLICY_RANK, POLICY_FLOOR_PRESETS, artifactPolicyMinimum, floorDefPolicyMinimum, mergePolicyFloorWithLocal, originRulesMinimum, policyFloorGaps, stricterDefPolicy, verifyPolicyFloorRecord, } from "./crypto/index.js";
|
|
31
|
+
// ---- WP-E2a origin execution policy ----
|
|
32
|
+
export { ORIGIN_SOURCE_RANK, OriginRulesError, evaluateOriginRule, matchOriginRule, parseOriginRules, } from "./crypto/index.js";
|
|
20
33
|
export { buildGraph, buildTrace, eligibleFirings, graphToDot, graphToMermaid, isStalled, modelCheck, workflowStatus, } from "./model.js";
|
|
21
34
|
export { parseConsume, parseProduce, } from "./paths.js";
|
|
22
35
|
export { assertValidSchema, summarizeIssues, validateValue } from "./schema.js";
|
|
36
|
+
export { enrollmentGrantSchema, orderSchema, originSchema, policyFloorSchema, publicationSchema, RECORD_SCHEMAS, revocationSchema, SCHEMA_BY_PAYLOAD_TYPE, submissionSchema, WIRE_SCHEMAS, } from "./schemas/index.js";
|
|
37
|
+
// Deterministic `.wnlp` bundle format (WP-A1) — the HIGH-LEVEL API only:
|
|
38
|
+
// pack/inspect/digest/unpack plus result/manifest types, limits/options, and
|
|
39
|
+
// typed errors. Low-level tar builders and add install primitives are
|
|
40
|
+
// deliberately NOT exported through this surface (see docs/bundles.md).
|
|
41
|
+
export { BundleError, DEFAULT_BUNDLE_LIMITS, digestBundle, inspectBundle, packBundle, unpackBundle } from "./bundle/index.js";
|
|
23
42
|
export { DEBT_STATES, SETTLED_STATES } from "./types.js";
|
|
43
|
+
// ---- WP-D2 signed submission records ----
|
|
44
|
+
export { canonicalValueBytes, valueDigestHex, buildSubmissionRecord, signSubmission } from "./crypto/index.js";
|