@senpi-ai/runtime 3.0.70 → 3.0.78
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 +76 -2
- package/dist/cli/deploy-render.d.ts +93 -0
- package/dist/cli/deploy-render.d.ts.map +1 -0
- package/dist/cli/deploy-render.js +438 -0
- package/dist/cli/deploy-render.js.map +1 -0
- package/dist/cli/guide-commands.d.ts.map +1 -1
- package/dist/cli/guide-commands.js +94 -9
- package/dist/cli/guide-commands.js.map +1 -1
- package/dist/cli/senpi-commands.d.ts +6 -1
- package/dist/cli/senpi-commands.d.ts.map +1 -1
- package/dist/cli/senpi-commands.js +290 -41
- package/dist/cli/senpi-commands.js.map +1 -1
- package/dist/cli/validate-command.d.ts.map +1 -1
- package/dist/cli/validate-command.js +10 -1
- package/dist/cli/validate-command.js.map +1 -1
- package/dist/deploy/deadlines.d.ts +107 -0
- package/dist/deploy/deadlines.d.ts.map +1 -0
- package/dist/deploy/deadlines.js +139 -0
- package/dist/deploy/deadlines.js.map +1 -0
- package/dist/deploy/error-text.d.ts +25 -0
- package/dist/deploy/error-text.d.ts.map +1 -0
- package/dist/deploy/error-text.js +42 -0
- package/dist/deploy/error-text.js.map +1 -0
- package/dist/deploy/funding.d.ts +125 -0
- package/dist/deploy/funding.d.ts.map +1 -0
- package/dist/deploy/funding.js +268 -0
- package/dist/deploy/funding.js.map +1 -0
- package/dist/deploy/install-gate-runner.d.ts +12 -0
- package/dist/deploy/install-gate-runner.d.ts.map +1 -0
- package/dist/deploy/install-gate-runner.js +17 -0
- package/dist/deploy/install-gate-runner.js.map +1 -0
- package/dist/deploy/job.d.ts +215 -0
- package/dist/deploy/job.d.ts.map +1 -0
- package/dist/deploy/job.js +484 -0
- package/dist/deploy/job.js.map +1 -0
- package/dist/deploy/messages.d.ts +603 -0
- package/dist/deploy/messages.d.ts.map +1 -0
- package/dist/deploy/messages.js +1388 -0
- package/dist/deploy/messages.js.map +1 -0
- package/dist/deploy/min-budget.d.ts +68 -0
- package/dist/deploy/min-budget.d.ts.map +1 -0
- package/dist/deploy/min-budget.js +297 -0
- package/dist/deploy/min-budget.js.map +1 -0
- package/dist/deploy/orchestrator.d.ts +314 -0
- package/dist/deploy/orchestrator.d.ts.map +1 -0
- package/dist/deploy/orchestrator.js +2171 -0
- package/dist/deploy/orchestrator.js.map +1 -0
- package/dist/deploy/package.d.ts +228 -0
- package/dist/deploy/package.d.ts.map +1 -0
- package/dist/deploy/package.js +542 -0
- package/dist/deploy/package.js.map +1 -0
- package/dist/deploy/proof-gate.d.ts +86 -0
- package/dist/deploy/proof-gate.d.ts.map +1 -0
- package/dist/deploy/proof-gate.js +278 -0
- package/dist/deploy/proof-gate.js.map +1 -0
- package/dist/deploy/python-float.d.ts +34 -0
- package/dist/deploy/python-float.d.ts.map +1 -0
- package/dist/deploy/python-float.js +46 -0
- package/dist/deploy/python-float.js.map +1 -0
- package/dist/deploy/recheck-commands.d.ts +50 -0
- package/dist/deploy/recheck-commands.d.ts.map +1 -0
- package/dist/deploy/recheck-commands.js +77 -0
- package/dist/deploy/recheck-commands.js.map +1 -0
- package/dist/deploy/register.d.ts +101 -0
- package/dist/deploy/register.d.ts.map +1 -0
- package/dist/deploy/register.js +714 -0
- package/dist/deploy/register.js.map +1 -0
- package/dist/deploy/taxonomy.d.ts +43 -0
- package/dist/deploy/taxonomy.d.ts.map +1 -0
- package/dist/deploy/taxonomy.js +59 -0
- package/dist/deploy/taxonomy.js.map +1 -0
- package/dist/dsl/events/handlers.d.ts +6 -4
- package/dist/dsl/events/handlers.d.ts.map +1 -1
- package/dist/dsl/events/handlers.js +29 -17
- package/dist/dsl/events/handlers.js.map +1 -1
- package/dist/dsl/events/initial-state.d.ts +21 -11
- package/dist/dsl/events/initial-state.d.ts.map +1 -1
- package/dist/dsl/events/initial-state.js +6 -0
- package/dist/dsl/events/initial-state.js.map +1 -1
- package/dist/dsl/notifications/floor-store.d.ts.map +1 -1
- package/dist/dsl/notifications/floor-store.js +34 -5
- package/dist/dsl/notifications/floor-store.js.map +1 -1
- package/dist/dsl/notifications/formatter.d.ts.map +1 -1
- package/dist/dsl/notifications/formatter.js +13 -5
- package/dist/dsl/notifications/formatter.js.map +1 -1
- package/dist/dsl/notifications/index.d.ts +18 -1
- package/dist/dsl/notifications/index.d.ts.map +1 -1
- package/dist/dsl/notifications/index.js +78 -11
- package/dist/dsl/notifications/index.js.map +1 -1
- package/dist/dsl/notifications/stop-raise-debounce.d.ts +113 -0
- package/dist/dsl/notifications/stop-raise-debounce.d.ts.map +1 -0
- package/dist/dsl/notifications/stop-raise-debounce.js +223 -0
- package/dist/dsl/notifications/stop-raise-debounce.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +467 -222
- package/dist/index.js.map +1 -1
- package/dist/runtime/env-resolve.d.ts +13 -0
- package/dist/runtime/env-resolve.d.ts.map +1 -1
- package/dist/runtime/env-resolve.js +14 -1
- package/dist/runtime/env-resolve.js.map +1 -1
- package/dist/runtime/runtime-descriptor.d.ts +37 -0
- package/dist/runtime/runtime-descriptor.d.ts.map +1 -0
- package/dist/runtime/runtime-descriptor.js +163 -0
- package/dist/runtime/runtime-descriptor.js.map +1 -0
- package/dist/runtime/runtime-schema.d.ts +100 -100
- package/dist/runtime/strategy-registry.d.ts +8 -0
- package/dist/runtime/strategy-registry.d.ts.map +1 -1
- package/dist/runtime/strategy-registry.js +14 -1
- package/dist/runtime/strategy-registry.js.map +1 -1
- package/dist/runtime-api/intake/intake-mount.d.ts.map +1 -1
- package/dist/runtime-api/intake/intake-mount.js +7 -4
- package/dist/runtime-api/intake/intake-mount.js.map +1 -1
- package/dist/scanners/external/scaffold/preflight.py +39 -0
- package/dist/scanners/implementations/market-regime.d.ts +1 -1
- package/dist/senpi/client.d.ts +58 -4
- package/dist/senpi/client.d.ts.map +1 -1
- package/dist/senpi/client.js +262 -18
- package/dist/senpi/client.js.map +1 -1
- package/dist/senpi/strategy-status.d.ts +32 -0
- package/dist/senpi/strategy-status.d.ts.map +1 -0
- package/dist/senpi/strategy-status.js +70 -0
- package/dist/senpi/strategy-status.js.map +1 -0
- package/dist/senpi/types.d.ts +65 -3
- package/dist/senpi/types.d.ts.map +1 -1
- package/dist/skills-manager/manifest.js +3 -3
- package/dist/skills-manager/skills-manifest.json +3 -3
- package/dist/telemetry/metrics.d.ts +30 -0
- package/dist/telemetry/metrics.d.ts.map +1 -1
- package/dist/telemetry/metrics.js +72 -0
- package/dist/telemetry/metrics.js.map +1 -1
- package/dist/types/dsl/index.d.ts +14 -0
- package/dist/types/dsl/index.d.ts.map +1 -1
- package/dist/types/strategy.d.ts +9 -1
- package/dist/types/strategy.d.ts.map +1 -1
- package/dist/universe/package-universe.d.ts +97 -0
- package/dist/universe/package-universe.d.ts.map +1 -0
- package/dist/universe/package-universe.js +304 -0
- package/dist/universe/package-universe.js.map +1 -0
- package/dist/validate/codes.d.ts +30 -0
- package/dist/validate/codes.d.ts.map +1 -1
- package/dist/validate/codes.js +74 -1
- package/dist/validate/codes.js.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/install-gate.d.ts.map +1 -1
- package/dist/validate/install-gate.js +10 -2
- package/dist/validate/install-gate.js.map +1 -1
- package/dist/validate/live-instruments.d.ts +44 -0
- package/dist/validate/live-instruments.d.ts.map +1 -0
- package/dist/validate/live-instruments.js +71 -0
- package/dist/validate/live-instruments.js.map +1 -0
- package/dist/validate/live-stage.d.ts +8 -0
- package/dist/validate/live-stage.d.ts.map +1 -1
- package/dist/validate/live-stage.js +87 -18
- package/dist/validate/live-stage.js.map +1 -1
- package/dist/validate/package-gates-stage.d.ts +61 -0
- package/dist/validate/package-gates-stage.d.ts.map +1 -0
- package/dist/validate/package-gates-stage.js +215 -0
- package/dist/validate/package-gates-stage.js.map +1 -0
- package/dist/validate/proof.d.ts +11 -1
- package/dist/validate/proof.d.ts.map +1 -1
- package/dist/validate/proof.js +10 -6
- package/dist/validate/proof.js.map +1 -1
- package/dist/validate/recipe-checks.d.ts.map +1 -1
- package/dist/validate/recipe-checks.js +6 -4
- package/dist/validate/recipe-checks.js.map +1 -1
- package/dist/validate/run.d.ts +29 -1
- package/dist/validate/run.d.ts.map +1 -1
- package/dist/validate/run.js +65 -6
- package/dist/validate/run.js.map +1 -1
- package/dist/validate/target.d.ts +41 -0
- package/dist/validate/target.d.ts.map +1 -1
- package/dist/validate/target.js +192 -16
- package/dist/validate/target.js.map +1 -1
- package/dist/validate/taxonomy-finding.d.ts +22 -0
- package/dist/validate/taxonomy-finding.d.ts.map +1 -0
- package/dist/validate/taxonomy-finding.js +25 -0
- package/dist/validate/taxonomy-finding.js.map +1 -0
- package/dist/validate/universe-stage.d.ts +71 -0
- package/dist/validate/universe-stage.d.ts.map +1 -0
- package/dist/validate/universe-stage.js +165 -0
- package/dist/validate/universe-stage.js.map +1 -0
- package/dist/validate/wallet-binding-stage.d.ts +44 -0
- package/dist/validate/wallet-binding-stage.d.ts.map +1 -0
- package/dist/validate/wallet-binding-stage.js +92 -0
- package/dist/validate/wallet-binding-stage.js.map +1 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The package-derivable gates `senpi deploy` refuses on, asked at validate's STATIC depth.
|
|
3
|
+
*
|
|
4
|
+
* Deploy's pre-money block decides four things from the package's own bytes: an instance with no
|
|
5
|
+
* DSL exit, a scanner declaring an unsupported `enabled` key, a mixed-case package id, and two
|
|
6
|
+
* instances sharing one recipe directory. None of them can change between a validation and a
|
|
7
|
+
* deploy — unlike the universe check, whose TOCTOU justification is spelled out in `proof-gate.ts`
|
|
8
|
+
* — so validate reporting green on bytes deploy rejects is not a race, it is a divergence. The
|
|
9
|
+
* author would first learn about a package-derivable fault from the money path, which is what
|
|
10
|
+
* `senpi validate` exists to prevent (`wallet-binding-stage.ts` made this move first, for the
|
|
11
|
+
* binding gate; this is the rest of the set).
|
|
12
|
+
*
|
|
13
|
+
* Each refusal these mirror also tells its reader to run `openclaw senpi validate` — so without
|
|
14
|
+
* this module, following a deploy refusal's own instruction returns PASS and disproves the refusal
|
|
15
|
+
* that emitted it.
|
|
16
|
+
*
|
|
17
|
+
* ## Why STATIC depth
|
|
18
|
+
*
|
|
19
|
+
* Every check here reads the package's own bytes and nothing else: no exchange, no gateway, no
|
|
20
|
+
* credentials. That puts them at the shallowest depth, where `depthsUpTo` runs them at every depth
|
|
21
|
+
* above — so an offline CI run with no MCP server reachable still catches them. None of them halts
|
|
22
|
+
* the deeper stages (`NON_HALTING_CODES` in `run.ts`): a package that cannot be funded is still a
|
|
23
|
+
* package whose scanner an author is entitled to import and tick.
|
|
24
|
+
*
|
|
25
|
+
* ## Two checks read the config, two read the package
|
|
26
|
+
*
|
|
27
|
+
* The DSL-exit and scanner-`enabled` faults live in the recipe, so they are asked of the config
|
|
28
|
+
* `collectRecipeFindings` has already parsed. That covers a recipe with no manifest around it yet
|
|
29
|
+
* — the mid-authoring case deploy cannot see at all — and it means neither check can throw on a
|
|
30
|
+
* recipe that does not parse: `config` is `undefined` there, and the YAML-syntax gate already owns
|
|
31
|
+
* that fault and words it properly. The id-case and directory-collision faults live in the
|
|
32
|
+
* manifest, so they need `target.pkg` and are silent without one.
|
|
33
|
+
*
|
|
34
|
+
* ## Scoped to the recipe being validated
|
|
35
|
+
*
|
|
36
|
+
* `target.ts` resolves a package ROOT to a refusal ("pick an instance"), so every run that reaches
|
|
37
|
+
* here is about exactly one recipe. Reporting a sibling instance's fault would be telling the
|
|
38
|
+
* author to edit a file this command did not look at — the rule `wallet-binding-stage.ts` states.
|
|
39
|
+
* The id-case check is the deliberate exception: the id belongs to the package, so it is this
|
|
40
|
+
* recipe's problem too, and its fix is one edit in a file the author already has open.
|
|
41
|
+
*
|
|
42
|
+
* ## An unreadable manifest is silent here, deliberately
|
|
43
|
+
*
|
|
44
|
+
* Same call `wallet-binding-stage.ts` makes, for the same reason. When `target.packageUnreadable`
|
|
45
|
+
* is set, `target.pkg` is absent and the two package-level checks go quiet — but that is not
|
|
46
|
+
* failing open: `target.ts` raises `E_VALIDATE_UNREADABLE_MANIFEST` at the package root, the
|
|
47
|
+
* universe check reports the same unreadable file below it, and no reading of a manifest nobody
|
|
48
|
+
* can read could clear a package for funding. A third voice on one fault is noise.
|
|
49
|
+
*/
|
|
50
|
+
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
51
|
+
import { hasDslExitBlock, lowercasePackageIdFix, nonLowercasePackageId, renderScannerEnabledLine, scannerEnabledEntries, } from "../deploy/package.js";
|
|
52
|
+
import { collidingInstanceDirs } from "../deploy/proof-gate.js";
|
|
53
|
+
import { VALIDATE_CODE } from "./codes.js";
|
|
54
|
+
import { taxonomyFinding } from "./taxonomy-finding.js";
|
|
55
|
+
/**
|
|
56
|
+
* Package-relative where it sits underneath, absolute only where it genuinely sits outside.
|
|
57
|
+
*
|
|
58
|
+
* `wallet-binding-stage.ts` renders the same way, but with one difference that matters here: there,
|
|
59
|
+
* the target is a recipe FILE and can never equal the package directory, so its `rel === ""` branch
|
|
60
|
+
* is unreachable. Here the collision check passes a DIRECTORY, and on a flat package that directory
|
|
61
|
+
* IS the package root — the canonical collision this gate exists for. Falling through to `absolute`
|
|
62
|
+
* would print a machine-local `/var/folders/…` path into a finding whose sibling lines are all
|
|
63
|
+
* package-relative.
|
|
64
|
+
*/
|
|
65
|
+
function asPath(base, absolute) {
|
|
66
|
+
const rel = relative(base, absolute);
|
|
67
|
+
if (rel === "")
|
|
68
|
+
return ".";
|
|
69
|
+
return rel.startsWith("..") || isAbsolute(rel) ? absolute : rel;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The checks, as findings.
|
|
73
|
+
*
|
|
74
|
+
* `config` is `undefined` when the recipe did not parse or failed the schema; both faults are
|
|
75
|
+
* already reported by the recipe checks, and every question below would be asked of a shape that
|
|
76
|
+
* was never established.
|
|
77
|
+
*/
|
|
78
|
+
export function packageGateFindings(target, config) {
|
|
79
|
+
const findings = [];
|
|
80
|
+
const base = target.pkg?.dir ?? target.baseDir ?? "";
|
|
81
|
+
if (config !== undefined) {
|
|
82
|
+
if (!hasDslExitBlock(config))
|
|
83
|
+
findings.push(noDslExitFinding(target, base, config));
|
|
84
|
+
for (const entry of scannerEnabledEntries(config)) {
|
|
85
|
+
findings.push(scannerEnabledFinding(entry, target, base));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// The one check here that is about the PACKAGE rather than this recipe. It is still this recipe's
|
|
89
|
+
// problem — every wallet the package funds carries the mis-cased stamp — and its fix is one edit
|
|
90
|
+
// in a file the author already has open, so the rule against reporting a sibling's fault does not
|
|
91
|
+
// reach it.
|
|
92
|
+
const pkg = target.pkg;
|
|
93
|
+
if (pkg !== undefined && nonLowercasePackageId(pkg) !== null) {
|
|
94
|
+
findings.push(packageIdCaseFinding(pkg, base));
|
|
95
|
+
}
|
|
96
|
+
// Only the collision this recipe is IN. Two siblings sharing some other directory is a real fault
|
|
97
|
+
// that this run did not look at, and sending an author to fix it here would be reporting on files
|
|
98
|
+
// outside the target.
|
|
99
|
+
if (pkg !== undefined && target.recipePath !== undefined) {
|
|
100
|
+
const dir = dirname(target.recipePath);
|
|
101
|
+
const collision = collidingInstanceDirs(pkg).find((c) => c.dir === dir);
|
|
102
|
+
if (collision !== undefined)
|
|
103
|
+
findings.push(instanceDirCollisionFinding(collision, pkg, base));
|
|
104
|
+
}
|
|
105
|
+
return findings;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Two states, two instructions — because the obvious single wording emits a duplicate YAML key.
|
|
109
|
+
*
|
|
110
|
+
* The predicate is "no DSL exit", not "no `exit:`". A recipe carrying `exit: { engine: sm_flip }`
|
|
111
|
+
* trips this gate with an `exit:` block plainly in the file, and "add an `exit:` block" would have
|
|
112
|
+
* an agent append a second top-level `exit:` — which YAML resolves as a duplicate key, not an
|
|
113
|
+
* override. This module's own test suite already records that hazard about a fixture; a refusal is
|
|
114
|
+
* not allowed to walk into it. The state is knowable from the config in hand, so it is read rather
|
|
115
|
+
* than assumed.
|
|
116
|
+
*/
|
|
117
|
+
function noDslExitFinding(target, base, config) {
|
|
118
|
+
const file = target.recipePath === undefined ? "this recipe" : asPath(base, target.recipePath);
|
|
119
|
+
const exit = config.exit;
|
|
120
|
+
const hasExitBlock = exit !== null && typeof exit === "object" && !Array.isArray(exit);
|
|
121
|
+
return taxonomyFinding(VALIDATE_CODE.noDslExit, {
|
|
122
|
+
where: { file, yaml_path: "exit" },
|
|
123
|
+
what: hasExitBlock
|
|
124
|
+
? "This recipe's `exit:` block names no DSL engine and no preset (`exit.dsl_preset`, or `exit.engine: dsl`)"
|
|
125
|
+
: "This recipe declares no `exit:` block at all",
|
|
126
|
+
why: "Every position it opens would run with nothing to close it: no fixed floor from " +
|
|
127
|
+
"`max_loss_pct`, no trailing floor, and no time-based cut. The strategy trades, reports " +
|
|
128
|
+
"healthy, and rides a position all the way back down. `senpi deploy` refuses to fund a " +
|
|
129
|
+
"package in this state before any money moves, and the skills-side `_pkg.validate` refuses " +
|
|
130
|
+
"to deploy one — this is that same rule, where the fix is still free.",
|
|
131
|
+
fix: (hasExitBlock
|
|
132
|
+
? `Inside the \`exit:\` block already in ${file}, either add a \`dsl_preset:\` map or set ` +
|
|
133
|
+
"`engine: dsl` to run the engine on its defaults. Edit that block — a second top-level " +
|
|
134
|
+
"`exit:` is a duplicate key, not an override."
|
|
135
|
+
: `Add an \`exit:\` block to ${file} — either \`exit.dsl_preset\` with a preset map, or ` +
|
|
136
|
+
"`exit.engine: dsl` to run the engine on its defaults.") +
|
|
137
|
+
" `openclaw senpi guide dsl` prints the preset fields and a known-good starting point.",
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* One finding per offending entry, not one per package.
|
|
142
|
+
*
|
|
143
|
+
* `where.yaml_path` points at the exact entry, which is the validate idiom — `duplicateFindings`
|
|
144
|
+
* emits one per duplicate for the same reason. Deploy's single all-offenses refusal is the money
|
|
145
|
+
* path's idiom: it fires once, so it has to carry the whole package's work in one read.
|
|
146
|
+
*/
|
|
147
|
+
function scannerEnabledFinding(entry, target, base) {
|
|
148
|
+
const file = target.recipePath === undefined ? "this recipe" : asPath(base, target.recipePath);
|
|
149
|
+
return taxonomyFinding(VALIDATE_CODE.scannerEnabled, {
|
|
150
|
+
where: { file, yaml_path: `scanners.${entry.index}.enabled` },
|
|
151
|
+
what: `Scanner "${entry.scanner}" declares an \`enabled\` key, which the runtime never reads`,
|
|
152
|
+
why: "The engine derives a scanner's enabled state from the strategy's registration, not from the " +
|
|
153
|
+
"scanner entry: the scanner schema passes `enabled` through untyped and nothing forwards it. " +
|
|
154
|
+
"A scanner written `enabled: false` therefore registers ENABLED and ticks — the package " +
|
|
155
|
+
"would trade while its author believes it is switched off. Every value is reported, not just " +
|
|
156
|
+
"`false`: a `true` is just as unread, and accepting it would teach the next reader that the " +
|
|
157
|
+
"key works.",
|
|
158
|
+
fix: `Delete the line \`${renderScannerEnabledLine(entry.value)}\` from ${file}. To stop a ` +
|
|
159
|
+
"scanner running, remove its entry from `scanners:` entirely; to switch one off after " +
|
|
160
|
+
"install, use the runtime API (`disableScanner`). `senpi deploy` reads the same key and " +
|
|
161
|
+
"refuses to fund the package for the same reason.",
|
|
162
|
+
evidence: { scanner: entry.scanner, value: entry.value, file },
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function packageIdCaseFinding(pkg, base) {
|
|
166
|
+
const fix = lowercasePackageIdFix(pkg.id, pkg.dir);
|
|
167
|
+
return taxonomyFinding(VALIDATE_CODE.packageIdCase, {
|
|
168
|
+
where: { file: asPath(base, join(pkg.dir, "strategy.yaml")), yaml_path: "id" },
|
|
169
|
+
what: `This package's strategy.yaml declares \`id: ${pkg.id}\`, which is not lowercase`,
|
|
170
|
+
why: "`senpi deploy` writes the id into each wallet's `skillName` attribution stamp VERBATIM at " +
|
|
171
|
+
"create, and the backend stores what it is given case-normalized — so a mixed-case id is " +
|
|
172
|
+
"stamped under one spelling and looked up under another. That is how `close.py` came to " +
|
|
173
|
+
'print "no OPEN strategies to close." over a live, funded, trading wallet.',
|
|
174
|
+
// The instruction comes from the shared producer, which emits the directory rename only when
|
|
175
|
+
// the directory IS this id in another case — lowercasing the id alone would otherwise trade
|
|
176
|
+
// this finding for an `id != package dir` refusal from the skills validator.
|
|
177
|
+
fix: `Lowercase it — ${fix.instruction}. \`senpi deploy\` refuses the same package for the same ` +
|
|
178
|
+
"reason, before any wallet exists to carry the wrong stamp.",
|
|
179
|
+
evidence: { id: pkg.id, expected: pkg.id.toLowerCase(), package_dir: pkg.dir },
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The collision as an END STATE, with no command.
|
|
184
|
+
*
|
|
185
|
+
* `buildInstanceDirCollisionRefusal` establishes why, and the reasoning holds here: the directories
|
|
186
|
+
* the fix describes do not exist yet, so any `openclaw senpi validate` path printed would be one
|
|
187
|
+
* the reader cannot run — and a bare `mv` of a recipe re-points its relative `scanners[].path` at a
|
|
188
|
+
* directory that is not there. Name what has to become true; emit no command whose preconditions
|
|
189
|
+
* this check cannot verify.
|
|
190
|
+
*/
|
|
191
|
+
function instanceDirCollisionFinding(collision, pkg, base) {
|
|
192
|
+
const names = collision.instances.map((inst) => inst.name);
|
|
193
|
+
const rows = collision.instances
|
|
194
|
+
.map((inst) => ` - "${inst.name}" → ${asPath(base, inst.runtimeYamlPath)}`)
|
|
195
|
+
.join("\n");
|
|
196
|
+
return taxonomyFinding(VALIDATE_CODE.instanceDirCollision, {
|
|
197
|
+
where: { file: asPath(base, collision.dir) },
|
|
198
|
+
what: `${names.length} instances keep their recipe in one directory ` +
|
|
199
|
+
`(${asPath(base, collision.dir)}):\n${rows}`,
|
|
200
|
+
why: "A proof lives BESIDE the recipe it is a claim about — one `.senpi-proof.json` per " +
|
|
201
|
+
"directory, naming the one recipe it was recorded for. Two recipes in one directory share a " +
|
|
202
|
+
"single proof file, and whichever validation ran last is the only one it describes. " +
|
|
203
|
+
"`senpi deploy` refuses the package rather than read that as evidence for both: the " +
|
|
204
|
+
"unproven recipe would ride its sibling's pass into funding.",
|
|
205
|
+
fix: "Each instance needs its own directory holding its own recipe, with its `runtime:` in " +
|
|
206
|
+
`${asPath(base, join(pkg.dir, "strategy.yaml"))} pointing there. Moving a recipe is not ` +
|
|
207
|
+
"enough on its own: a relative `scanners[].path` resolves against the directory the RECIPE " +
|
|
208
|
+
"is in, so a recipe that moves alone re-points every one of them at a directory that does " +
|
|
209
|
+
"not exist. Whether the tree it names moves with the recipe, is copied, or is referenced " +
|
|
210
|
+
"from both is a decision about this package — these instances share a directory today, so " +
|
|
211
|
+
"they may be sharing what is in it.",
|
|
212
|
+
evidence: { dir: asPath(base, collision.dir), instances: names },
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=package-gates-stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-gates-stage.js","sourceRoot":"","sources":["../../src/validate/package-gates-stage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,GAGtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAA6B,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;;;;;;;;GASG;AACH,SAAS,MAAM,CAAC,IAAY,EAAE,QAAgB;IAC5C,MAAM,GAAG,GAAG,QAAQ,CAAC,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FAA2F;YAC3F,0FAA0F;YAC1F,2FAA2F;YAC3F,oCAAoC;QACtC,QAAQ,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;KACjE,CAAC,CAAC;AACL,CAAC"}
|
package/dist/validate/proof.d.ts
CHANGED
|
@@ -50,6 +50,16 @@ export type VerifyReason = "no_proof" | "content_changed" | "runtime_version_cha
|
|
|
50
50
|
export interface VerifyResult {
|
|
51
51
|
ok: boolean;
|
|
52
52
|
reason?: VerifyReason;
|
|
53
|
+
/**
|
|
54
|
+
* Which named instance the verdict is about, as the caller named it — present exactly when a
|
|
55
|
+
* multi-instance verification failed, absent for a flat package and on every pass.
|
|
56
|
+
*
|
|
57
|
+
* Carried structurally because the alternatives for a caller that needs it are all worse: parsing
|
|
58
|
+
* it back out of {@link VerifyResult.finding}'s prose, or re-verifying instance by instance, which
|
|
59
|
+
* would multiply the proof-verification metric on a refusal. Verification stops at the first
|
|
60
|
+
* failure, so this names THAT one and says nothing about the instances after it.
|
|
61
|
+
*/
|
|
62
|
+
instance?: string;
|
|
53
63
|
/** Relative paths that differ from the record: edited, added, or removed. */
|
|
54
64
|
changedFiles?: string[];
|
|
55
65
|
/** Present exactly when `ok` is false — ready for the deploy verb to surface unmodified. */
|
|
@@ -97,7 +107,7 @@ export interface VerifyOptions {
|
|
|
97
107
|
* Is this package's content the content that passed?
|
|
98
108
|
*
|
|
99
109
|
* Pure observation for the deploy verb to act on. Every failure reason has the same remedy —
|
|
100
|
-
* `senpi validate <packageDir>` — stated on the finding, so the caller can surface it unmodified
|
|
110
|
+
* `openclaw senpi validate <packageDir>` — stated on the finding, so the caller can surface it unmodified
|
|
101
111
|
* and an agent can close the loop without knowing anything about proofs.
|
|
102
112
|
*/
|
|
103
113
|
export declare function verifyProof(packageDir: string, options?: VerifyOptions): VerifyResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAW7F;AAoED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,YAAY,CAQzF"}
|
package/dist/validate/proof.js
CHANGED
|
@@ -175,7 +175,7 @@ function refusal(reason, parts) {
|
|
|
175
175
|
* Is this package's content the content that passed?
|
|
176
176
|
*
|
|
177
177
|
* Pure observation for the deploy verb to act on. Every failure reason has the same remedy —
|
|
178
|
-
* `senpi validate <packageDir>` — stated on the finding, so the caller can surface it unmodified
|
|
178
|
+
* `openclaw senpi validate <packageDir>` — stated on the finding, so the caller can surface it unmodified
|
|
179
179
|
* and an agent can close the loop without knowing anything about proofs.
|
|
180
180
|
*/
|
|
181
181
|
export function verifyProof(packageDir, options = {}) {
|
|
@@ -201,11 +201,12 @@ function verifyInstances(packageDir, instances) {
|
|
|
201
201
|
const finding = result.finding;
|
|
202
202
|
return {
|
|
203
203
|
...result,
|
|
204
|
+
instance,
|
|
204
205
|
changedFiles: result.changedFiles?.map((f) => join(instance, f)),
|
|
205
206
|
finding: {
|
|
206
207
|
...finding,
|
|
207
208
|
what: `Instance '${instance}': ${finding.what}`,
|
|
208
|
-
fix: `Run: senpi validate ${join(packageRoot, instance)}`,
|
|
209
|
+
fix: `Run: openclaw senpi validate ${join(packageRoot, instance)}`,
|
|
209
210
|
},
|
|
210
211
|
};
|
|
211
212
|
}
|
|
@@ -221,8 +222,11 @@ function verifyProofInner(packageDir) {
|
|
|
221
222
|
reason: "no_proof",
|
|
222
223
|
finding: refusal("no_proof", {
|
|
223
224
|
what: `No proof of a passing validation exists for ${packageRoot}`,
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
// Named by flag, like the deploy-side twin of this refusal: "a scoped or shallow run"
|
|
226
|
+
// describes a command instead of naming one, and the sibling wording there ("at live
|
|
227
|
+
// depth") produced a real `--depth static` invocation that exited 1 on an unknown option.
|
|
228
|
+
why: "Funding requires evidence the strategy runs. Only a run that goes all the way and covers the whole package writes that evidence — `--stage live` (the default), no `--scanner`, no `--no-attest`.",
|
|
229
|
+
fix: `Run: openclaw senpi validate ${packageRoot}`,
|
|
226
230
|
}),
|
|
227
231
|
};
|
|
228
232
|
}
|
|
@@ -246,7 +250,7 @@ function verifyProofInner(packageDir) {
|
|
|
246
250
|
finding: refusal("content_changed", {
|
|
247
251
|
what: `The package differs from the content that passed: ${changedFiles.slice(0, 5).join(", ")}${changedFiles.length > 5 ? ` and ${changedFiles.length - 5} more` : ""}`,
|
|
248
252
|
why: "The proof is a claim about exact content. These files are not the bytes that were validated, so nothing is known about how they behave.",
|
|
249
|
-
fix: `Run: senpi validate ${packageRoot}`,
|
|
253
|
+
fix: `Run: openclaw senpi validate ${packageRoot}`,
|
|
250
254
|
evidence: { changed_files: changedFiles, proved_at: record.created_at },
|
|
251
255
|
}),
|
|
252
256
|
};
|
|
@@ -259,7 +263,7 @@ function verifyProofInner(packageDir) {
|
|
|
259
263
|
finding: refusal("runtime_version_changed", {
|
|
260
264
|
what: `The proof was recorded under runtime ${record.runtime_version}; this is ${VERSION}`,
|
|
261
265
|
why: "A pass is a claim about the package running under a specific runtime. The runtime changed, so the claim no longer covers what would actually execute.",
|
|
262
|
-
fix: `Run: senpi validate ${packageRoot}`,
|
|
266
|
+
fix: `Run: openclaw senpi validate ${packageRoot}`,
|
|
263
267
|
evidence: { proved_under: record.runtime_version, current: VERSION },
|
|
264
268
|
}),
|
|
265
269
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../../src/validate/proof.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EACjC,IAAI,EAAE,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,GACnC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"recipe-checks.d.ts","sourceRoot":"","sources":["../../src/validate/recipe-checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,EAAE,OAAO,EAAW,MAAM,YAAY,CAAC;AA0BnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,EAAE,CAkCpE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,EAAE,CAoBpE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,EAAE,CAqBtE;AAED,4FAA4F;AAC5F,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,EAAE,CAc3E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,EACrB,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACvG,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EACjC,IAAI,EAAE,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,GACnC,OAAO,EAAE,CA2CX"}
|
|
@@ -180,10 +180,12 @@ export function findMissingEntrypoints(config, resolveScannerRoot, exists, join)
|
|
|
180
180
|
findings.push(staticFinding(VALIDATE_CODE.unresolvableScannerPath, "edit", {
|
|
181
181
|
what: `Scanner '${scanner.name}' declares path '${declaredPath}', which cannot be resolved`,
|
|
182
182
|
why: `${resolved.reason} An unresolved relative path is interpreted against whatever directory the runtime happens to be started from, which is rarely the one you meant.`,
|
|
183
|
-
//
|
|
184
|
-
// target with a directory, the
|
|
185
|
-
//
|
|
186
|
-
fix
|
|
183
|
+
// THREE callers reach this finding and the remedy differs at each: `senpi validate`
|
|
184
|
+
// wants a target with a directory, the install CLI wants the file or the dir flag, the
|
|
185
|
+
// gateway wants the dir forwarded alongside the inline YAML. Naming all of them beats a
|
|
186
|
+
// fix that is only correct for one — this finding absorbed the deploy-side refusal that
|
|
187
|
+
// used to cover the install surfaces, and the wording has to keep covering them.
|
|
188
|
+
fix: "Give the path something to resolve against: make it absolute, or supply the recipe's directory — `--dir` when validating inline content, `-p <path-to-runtime.yaml>` or `--runtime-yaml-dir <dir>` when installing from the CLI, `runtimeYamlDir` when installing through the gateway. `senpi deploy` always passes it for you, and validating a package directory rather than pasted text gets this for free.",
|
|
187
189
|
where: { yaml_path: `scanners.${index}.path` },
|
|
188
190
|
evidence: { declared_path: declaredPath, scanner: scanner.name },
|
|
189
191
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-checks.js","sourceRoot":"","sources":["../../src/validate/recipe-checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,aAAa,GAAG,eAAe,CAAC;AAEtC,SAAS,aAAa,CACpB,IAAY,EACZ,OAAgB,EAChB,KAA+G;IAE/G,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC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EAAE,SAAS,EAAE,YAAY,KAAK,OAAO,EAAE;gBAC9C,QAAQ,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE;aACjE,CAAC,CACH,CAAC;YACF,OAAO;QACT,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACjD,IAAI,MAAM,CAAC,QAAQ,CAAC;YAAE,OAAO;QAE7B,QAAQ,CAAC,IAAI,CACX,aAAa,CAAC,aAAa,CAAC,iBAAiB,EAAE,MAAM,EAAE;YACrD,IAAI,EAAE,YAAY,OAAO,CAAC,IAAI,0BAA0B,UAAU,sBAAsB,QAAQ,EAAE;YAClG,GAAG,EAAE,yIAAyI;YAC9I,GAAG,EAAE,UAAU,QAAQ,CAAC,QAAQ,CAAC,OAAO,QAAQ,CAAC,IAAI,sEAAsE;YAC3H,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,KAAK,aAAa,EAAE;YACpD,QAAQ,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE;SAC9F,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/validate/run.d.ts
CHANGED
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
* object. The command layer is a thin translation on either side, so the parts worth testing —
|
|
6
6
|
* ordering, verdict, exit code, the basis — are testable without spawning anything.
|
|
7
7
|
*/
|
|
8
|
+
import { type ValidateDeps } from "./universe-stage.js";
|
|
8
9
|
import { type Depth, type Finding } from "./types.js";
|
|
9
10
|
export type Verdict = "PASS" | "FAIL" | "UNPROVEN";
|
|
10
11
|
/** 0 pass · 1 something is wrong · 2 ran but proved nothing · 3 the request itself was malformed. */
|
|
11
12
|
export type ExitCode = 0 | 1 | 2 | 3;
|
|
13
|
+
/** Re-exported so a caller configures the run from one module. Defined with the check that uses it. */
|
|
14
|
+
export type { ValidateDeps };
|
|
12
15
|
export interface ValidateOptions {
|
|
13
16
|
/** Positional target. Omitted means the working directory. */
|
|
14
17
|
target?: string;
|
|
@@ -28,6 +31,8 @@ export interface ValidateOptions {
|
|
|
28
31
|
strict?: boolean;
|
|
29
32
|
/** Suppress proof recording even on a complete passing run. */
|
|
30
33
|
noAttest?: boolean;
|
|
34
|
+
/** Sources for the checks that need one. Omitted means those checks do not run. */
|
|
35
|
+
deps?: ValidateDeps;
|
|
31
36
|
}
|
|
32
37
|
export interface VerdictBasis {
|
|
33
38
|
/** The rule that decided it, rendered from the table rather than written per outcome. */
|
|
@@ -56,11 +61,34 @@ export interface ValidateResult {
|
|
|
56
61
|
proof_recorded?: boolean;
|
|
57
62
|
}
|
|
58
63
|
export declare function isImplemented(depth: Depth): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Static findings that do NOT stop the depths below them.
|
|
66
|
+
*
|
|
67
|
+
* The depth loop halts on error-severity findings because *"the next reads a shape this one could
|
|
68
|
+
* not establish"* — true of a recipe that will not parse or will not satisfy the schema, since
|
|
69
|
+
* every deeper stage starts from a parsed config. It is not true of every error: a package-level
|
|
70
|
+
* fault like a mixed-case id, or a recipe that ships no exit block, leaves the code just as
|
|
71
|
+
* importable and just as tickable as it was.
|
|
72
|
+
*
|
|
73
|
+
* That distinction is load-bearing for the authoring loop rather than cosmetic. `--stage import` is
|
|
74
|
+
* the taught write-time tool (`senpi-strategy-author/SKILL.md`: "Use it while you write, not only
|
|
75
|
+
* at the end"), and the interview it drives settles the exit block LAST — so a static error that
|
|
76
|
+
* halts on a half-written recipe takes the fast-feedback path away exactly when it is being used.
|
|
77
|
+
*
|
|
78
|
+
* A closed list rather than a severity sweep or a stage test, for the reason `install-gate.ts`
|
|
79
|
+
* keeps one: a rule that widens silently as checks are added is one that will one day let
|
|
80
|
+
* something through that nobody decided to let through. Adding a code here is a claim that the
|
|
81
|
+
* import and live stages can still say something true while this fault stands.
|
|
82
|
+
*/
|
|
83
|
+
export declare const NON_HALTING_CODES: ReadonlySet<string>;
|
|
84
|
+
/** True when at least one finding invalidates the depths after this one. */
|
|
85
|
+
export declare function haltsDeeperStages(findings: readonly Finding[]): boolean;
|
|
59
86
|
/**
|
|
60
87
|
* Validate, and report what it means.
|
|
61
88
|
*
|
|
62
89
|
* Stages short-circuit: a depth that produced an error stops the ones after it, because they would
|
|
63
|
-
* be reading a shape that was never established.
|
|
90
|
+
* be reading a shape that was never established — for the errors where that is actually so. See
|
|
91
|
+
* {@link NON_HALTING_CODES}.
|
|
64
92
|
*/
|
|
65
93
|
export declare function runValidation(options: ValidateOptions): Promise<ValidateResult>;
|
|
66
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/validate/run.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/validate/run.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAW1E,OAAO,EAAkC,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAEtF,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD,qGAAqG;AACrG,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAErC,uGAAuG;AACvG,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC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YhD,CAAC;AAEH,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAEvE;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAOrF;AAkTD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAuB7E;AAiGD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,EAAE,CAQjF"}
|
package/dist/validate/run.js
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { dirname, relative, resolve } from "node:path";
|
|
10
10
|
import { VALIDATE_CODE } from "./codes.js";
|
|
11
|
+
import { universeFindings } from "./universe-stage.js";
|
|
12
|
+
import { packageGateFindings } from "./package-gates-stage.js";
|
|
13
|
+
import { walletBindingFindings } from "./wallet-binding-stage.js";
|
|
11
14
|
import { checkScanner, resolveRoot } from "./import-stage.js";
|
|
12
15
|
import { judgeTick, productionBudgetSeconds, runTick } from "./live-stage.js";
|
|
13
16
|
import { recordValidateRun } from "../telemetry/metrics.js";
|
|
@@ -67,11 +70,48 @@ const IMPLEMENTED = ["static", "import", "live"];
|
|
|
67
70
|
export function isImplemented(depth) {
|
|
68
71
|
return IMPLEMENTED.includes(depth);
|
|
69
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Static findings that do NOT stop the depths below them.
|
|
75
|
+
*
|
|
76
|
+
* The depth loop halts on error-severity findings because *"the next reads a shape this one could
|
|
77
|
+
* not establish"* — true of a recipe that will not parse or will not satisfy the schema, since
|
|
78
|
+
* every deeper stage starts from a parsed config. It is not true of every error: a package-level
|
|
79
|
+
* fault like a mixed-case id, or a recipe that ships no exit block, leaves the code just as
|
|
80
|
+
* importable and just as tickable as it was.
|
|
81
|
+
*
|
|
82
|
+
* That distinction is load-bearing for the authoring loop rather than cosmetic. `--stage import` is
|
|
83
|
+
* the taught write-time tool (`senpi-strategy-author/SKILL.md`: "Use it while you write, not only
|
|
84
|
+
* at the end"), and the interview it drives settles the exit block LAST — so a static error that
|
|
85
|
+
* halts on a half-written recipe takes the fast-feedback path away exactly when it is being used.
|
|
86
|
+
*
|
|
87
|
+
* A closed list rather than a severity sweep or a stage test, for the reason `install-gate.ts`
|
|
88
|
+
* keeps one: a rule that widens silently as checks are added is one that will one day let
|
|
89
|
+
* something through that nobody decided to let through. Adding a code here is a claim that the
|
|
90
|
+
* import and live stages can still say something true while this fault stands.
|
|
91
|
+
*/
|
|
92
|
+
export const NON_HALTING_CODES = new Set([
|
|
93
|
+
// A recipe with no exit block imports and ticks exactly as it would with one. The fault is about
|
|
94
|
+
// what happens to a POSITION, and no deeper stage opens one.
|
|
95
|
+
VALIDATE_CODE.noDslExit,
|
|
96
|
+
// An unread key changes nothing about whether the scanner imports or ticks — and the import
|
|
97
|
+
// stage is where an author finds out their scanner is broken.
|
|
98
|
+
VALIDATE_CODE.scannerEnabled,
|
|
99
|
+
// The id lives in the manifest, and the deeper stages never read it.
|
|
100
|
+
VALIDATE_CODE.packageIdCase,
|
|
101
|
+
// A shared directory is about which proof file speaks for which recipe. Neither the import stage
|
|
102
|
+
// nor the live stage reads a proof.
|
|
103
|
+
VALIDATE_CODE.instanceDirCollision,
|
|
104
|
+
]);
|
|
105
|
+
/** True when at least one finding invalidates the depths after this one. */
|
|
106
|
+
export function haltsDeeperStages(findings) {
|
|
107
|
+
return findings.some((f) => f.severity === "error" && !NON_HALTING_CODES.has(f.code));
|
|
108
|
+
}
|
|
70
109
|
/**
|
|
71
110
|
* Validate, and report what it means.
|
|
72
111
|
*
|
|
73
112
|
* Stages short-circuit: a depth that produced an error stops the ones after it, because they would
|
|
74
|
-
* be reading a shape that was never established.
|
|
113
|
+
* be reading a shape that was never established — for the errors where that is actually so. See
|
|
114
|
+
* {@link NON_HALTING_CODES}.
|
|
75
115
|
*/
|
|
76
116
|
export async function runValidation(options) {
|
|
77
117
|
const startedAt = Date.now();
|
|
@@ -130,8 +170,8 @@ async function runValidationInner(options) {
|
|
|
130
170
|
stagesRun.push(depth);
|
|
131
171
|
findings.push(...produced.findings);
|
|
132
172
|
// A depth that failed invalidates everything after it: the next reads a shape this one could
|
|
133
|
-
// not establish.
|
|
134
|
-
if (produced.findings
|
|
173
|
+
// not establish — but only for the findings that actually do. See `NON_HALTING_CODES`.
|
|
174
|
+
if (haltsDeeperStages(produced.findings))
|
|
135
175
|
break;
|
|
136
176
|
}
|
|
137
177
|
const result = assemble(target, stagesRun, findings, options, wallet, liveExecuted);
|
|
@@ -210,6 +250,10 @@ prior) {
|
|
|
210
250
|
}
|
|
211
251
|
if (depth === "live") {
|
|
212
252
|
const { targets } = scannersToCheck(target, config, options.scanner);
|
|
253
|
+
// The package's declared universe against the exchange's live instrument list. It lives at this
|
|
254
|
+
// depth because it needs a live read, and it is asked on every path through it — a recipe whose
|
|
255
|
+
// scanners are all runtime-provided executes nothing here and would otherwise reach a PASS
|
|
256
|
+
// having established nothing about the names it hardcodes.
|
|
213
257
|
if (targets.length === 0) {
|
|
214
258
|
return {
|
|
215
259
|
findings: [
|
|
@@ -221,8 +265,12 @@ prior) {
|
|
|
221
265
|
fix_kind: "locate-only",
|
|
222
266
|
what: "This recipe declares no author-written scanner",
|
|
223
267
|
why: "Built-in scanners are part of the runtime and are covered by its own tests, so there is no author code here whose runnability is in question.",
|
|
224
|
-
|
|
268
|
+
// Names the stage by its flag, not by the `Depth` type's noun: `report.ts` renders
|
|
269
|
+
// every finding's `fix`, so this reaches a reader, and "this depth" is the wording that
|
|
270
|
+
// produced a real `--depth static` invocation (there is no such flag; it exits 1).
|
|
271
|
+
fix: "Nothing to do — a recipe using only built-in scanners has no author-written code for --stage live to execute.",
|
|
225
272
|
},
|
|
273
|
+
...(await universeFindings(target, options)),
|
|
226
274
|
],
|
|
227
275
|
liveExecuted: 0,
|
|
228
276
|
};
|
|
@@ -253,12 +301,15 @@ prior) {
|
|
|
253
301
|
wallet,
|
|
254
302
|
};
|
|
255
303
|
}
|
|
304
|
+
// The universe check reads through the same credentials, so it could not have run either — and
|
|
305
|
+
// the finding above already names them. Reported twice it would read as two faults, and this
|
|
306
|
+
// run cannot reach a pass regardless, which is the state the second report exists to prevent.
|
|
256
307
|
// A warning from the import depth that changes how a zero-read tick should be read: the
|
|
257
308
|
// scanner may have fetched plenty, just not by a route anything here can see.
|
|
258
309
|
const nonMcpSources = prior
|
|
259
310
|
.filter((f) => f.code === VALIDATE_CODE.nonMcpSource && f.where !== undefined)
|
|
260
311
|
.map((f) => f.where);
|
|
261
|
-
const findings = [];
|
|
312
|
+
const findings = [...(await universeFindings(target, options))];
|
|
262
313
|
const observations = [];
|
|
263
314
|
for (const scanner of targets) {
|
|
264
315
|
const declared = (config?.scanners ?? []).find((s) => s.name === scanner.name);
|
|
@@ -305,7 +356,15 @@ prior) {
|
|
|
305
356
|
content: target.recipeContent,
|
|
306
357
|
baseDir: target.baseDir,
|
|
307
358
|
});
|
|
308
|
-
|
|
359
|
+
// Package-derivable and needs no I/O, so these belong at the shallowest depth — which
|
|
360
|
+
// `depthsUpTo` then runs at every depth above. Deploy's copies of these gates are pre-money;
|
|
361
|
+
// without one here the author first learns about them from the money path, which is the
|
|
362
|
+
// divergence `senpi validate` exists to prevent.
|
|
363
|
+
const findings = [
|
|
364
|
+
...result.findings,
|
|
365
|
+
...walletBindingFindings(target),
|
|
366
|
+
...packageGateFindings(target, result.config),
|
|
367
|
+
];
|
|
309
368
|
// `--scanner` can only be checked once the recipe names its scanners.
|
|
310
369
|
if (options.scanner !== undefined && result.config !== undefined) {
|
|
311
370
|
const declared = (result.config.scanners ?? []).map((s) => s.name);
|