@orkestrel/scaffold 0.0.139 → 0.0.141
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/dist/bin/main.js +86 -26
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +2 -1
- package/dist/host/claude/agents/orkestrel.md +51 -51
- package/dist/host/claude/rules/architecture.md +4 -2
- package/dist/host/claude/rules/typescript.md +23 -10
- package/dist/host/configs/policy.ts +174 -11
- package/dist/host/guides/abort.md +2 -0
- package/dist/host/guides/agent.md +447 -531
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/guide.md +10 -2
- package/dist/host/guides/mcp.md +9 -9
- package/dist/host/guides/middleware.md +34 -49
- package/dist/host/guides/ollama.md +44 -12
- package/dist/host/guides/probe.md +1 -2
- package/dist/host/guides/scaffold.md +25 -16
- package/dist/host/guides/server.md +5 -5
- package/dist/host/guides/study.md +2680 -760
- package/dist/host/manifest.json +18 -18
- package/dist/host/scripts/browsers.sh +0 -0
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/npm.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +185 -1
- package/dist/src/core/index.cjs +14 -14
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +14 -14
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +6 -24
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +1 -1
- package/dist/src/server/index.d.ts +1 -1
- package/dist/src/server/index.js +7 -25
- package/dist/src/server/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -686,7 +686,7 @@ function resolveRealPath(path) {
|
|
|
686
686
|
* ```
|
|
687
687
|
*/
|
|
688
688
|
function climbRealPath(current, pending, depth) {
|
|
689
|
-
if (!
|
|
689
|
+
if (!(0, _orkestrel_contract.isSafeInteger)(depth) || depth < 0 || depth > 64) return void 0;
|
|
690
690
|
const real = (0, _orkestrel_contract.attempt)(() => (0, node_fs.realpathSync)(current));
|
|
691
691
|
if (real.success) return pending.length === 0 ? real.value : (0, node_path.join)(real.value, ...pending);
|
|
692
692
|
if (!matchesMissingPath(real.error)) return void 0;
|
|
@@ -1122,7 +1122,7 @@ function pruneEmptiedDirectories(target, removed) {
|
|
|
1122
1122
|
* ```
|
|
1123
1123
|
*/
|
|
1124
1124
|
function readFileHex(root, path, limit = _src_core.MAX_ARTIFACT_BYTES) {
|
|
1125
|
-
if (!(0, _orkestrel_contract.
|
|
1125
|
+
if (!(0, _orkestrel_contract.isSafeInteger)(limit) || limit < 0 || limit > _src_core.MAX_ARTIFACT_BYTES) throw new _src_core.ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
|
|
1126
1126
|
root,
|
|
1127
1127
|
path,
|
|
1128
1128
|
limit
|
|
@@ -3319,7 +3319,7 @@ var Materializer = class {
|
|
|
3319
3319
|
* @param plan - The compiled plan to compare.
|
|
3320
3320
|
* @param target - The directory to inspect.
|
|
3321
3321
|
* @returns Findings for hydrated planned paths and selected foreign candidates,
|
|
3322
|
-
*
|
|
3322
|
+
* and no questions.
|
|
3323
3323
|
* @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
|
|
3324
3324
|
* exact shape, `TARGET` when the host or target cannot be read within its
|
|
3325
3325
|
* bounds, and `DESTROYED` after teardown.
|
|
@@ -3679,27 +3679,9 @@ var Materializer = class {
|
|
|
3679
3679
|
...listCanonPaths(target, plan.groups),
|
|
3680
3680
|
...listWrapperPaths(target, plan.groups)
|
|
3681
3681
|
]);
|
|
3682
|
-
const questions = [];
|
|
3683
|
-
if (plan.groups.includes("guides")) {
|
|
3684
|
-
const directory = resolveContainedPath(target, "guides");
|
|
3685
|
-
const spent = [];
|
|
3686
|
-
for (const file of directory === void 0 ? [] : listFiles(directory)) {
|
|
3687
|
-
const path = `guides/${file}`;
|
|
3688
|
-
if (file.includes("/") || file === "README.md" || !file.endsWith(".md") || path === (0, _src_core.nameToGuide)(plan.blueprint.name)) continue;
|
|
3689
|
-
const hosted = this.#reference(path, _src_core.MAX_TOTAL_ARTIFACT_BYTES - (0, _src_core.computeTotal)(spent));
|
|
3690
|
-
if (hosted === void 0) continue;
|
|
3691
|
-
spent.push(hosted.length / 2);
|
|
3692
|
-
const present = readFileHex(target, path);
|
|
3693
|
-
if (present !== void 0 && present !== hosted) questions.push({
|
|
3694
|
-
field: "guides",
|
|
3695
|
-
message: `The mirror at ${path} differs from the hosted guide. Run catalog to refresh it.`,
|
|
3696
|
-
blocking: false
|
|
3697
|
-
});
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
3682
|
return {
|
|
3701
3683
|
findings: (0, _src_core.planToArtifactFindings)(hydrated, readSnapshot(target, [...paths])),
|
|
3702
|
-
questions
|
|
3684
|
+
questions: []
|
|
3703
3685
|
};
|
|
3704
3686
|
}
|
|
3705
3687
|
#reference(path, budget) {
|
|
@@ -4168,7 +4150,7 @@ var ReadAllowance = class {
|
|
|
4168
4150
|
* non-negative safe integer.
|
|
4169
4151
|
*/
|
|
4170
4152
|
constructor(budget) {
|
|
4171
|
-
if (!(0, _orkestrel_contract.isNonNegativeInteger)(budget) || !
|
|
4153
|
+
if (!(0, _orkestrel_contract.isNonNegativeInteger)(budget) || !(0, _orkestrel_contract.isSafeInteger)(budget)) throw new _src_core.ScaffoldError("INVALID", "The read budget is not a non-negative safe integer.", { field: "budget" });
|
|
4172
4154
|
this.#remaining = budget;
|
|
4173
4155
|
}
|
|
4174
4156
|
/** The bytes the call has left; negative after a read overshoots the budget. */
|
|
@@ -4193,7 +4175,7 @@ var ReadAllowance = class {
|
|
|
4193
4175
|
* ```
|
|
4194
4176
|
*/
|
|
4195
4177
|
spend(bytes) {
|
|
4196
|
-
if (!(0, _orkestrel_contract.isNonNegativeInteger)(bytes) || !
|
|
4178
|
+
if (!(0, _orkestrel_contract.isNonNegativeInteger)(bytes) || !(0, _orkestrel_contract.isSafeInteger)(bytes)) throw new _src_core.ScaffoldError("INVALID", "The spent bytes are not a non-negative safe integer.", { field: "bytes" });
|
|
4197
4179
|
this.#remaining -= bytes;
|
|
4198
4180
|
}
|
|
4199
4181
|
};
|