@orkestrel/scaffold 0.0.69 → 0.0.71
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 +8 -8
- package/dist/bin/main.js.map +1 -1
- package/dist/host/claude/agents/orkestrel.md +7 -7
- package/dist/host/guides/mcp.md +615 -63
- package/dist/host/guides/ollama.md +9 -8
- package/dist/host/guides/scaffold.md +19 -8
- package/dist/host/manifest.json +5 -5
- package/dist/src/core/index.cjs +11 -11
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +12 -12
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +4 -4
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.js +5 -5
- package/dist/src/server/index.js.map +1 -1
- package/package.json +8 -8
package/dist/src/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { andOf, arrayOf, attempt, boundsOf, compareValues, holds, isArray, isBoolean, isError, isFunction, isInteger, isRecord, isString, parseJSON, parseJSONAs, parseStringField, recordOf, stringOf, unionOf, whereOf } from "@orkestrel/contract";
|
|
2
|
+
import { andOf, arrayOf, attempt, boundsOf, compareValues, holds, isArray, isBoolean, isError, isFunction, isInteger, isNumber, isRecord, isString, parseJSON, parseJSONAs, parseStringField, recordOf, stringOf, unionOf, whereOf } from "@orkestrel/contract";
|
|
3
3
|
import { CANON_PATHS, CATALOG_AGENT_PATH, CATALOG_CLOSING_MARKER, CATALOG_OPENING_MARKER, CONTROL_CHARACTER_PATTERN, DEPENDENCY_NAME_PATTERN, EXECUTABLE_PATHS, HOST_INVENTORY_PATH, HOST_PATHS, MAX_ARTIFACT_BYTES, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, REFERENCE_PATHS, ScaffoldError, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, contentToHex, extractRangeMajor, extractVersion, inferGroup, isAudit, isCatalogEntry, isCollection, isDependency, isDependencyName, isFloorPath, isHex, isManifestScript, isMirror, isPath, isPlan, isRetainedPath, isSnapshot, matchesDriftReachability, matchesRange, nameToGuide, planToFindings, replaceManifestRanges, replaceManifestScripts } from "../core/index.js";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { chmodSync, closeSync, constants, copyFileSync, fstatSync, linkSync, lstatSync, mkdirSync, mkdtempSync, openSync, opendirSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, writeFileSync } from "node:fs";
|
|
@@ -1001,7 +1001,7 @@ function pruneEmptiedDirectories(target, removed) {
|
|
|
1001
1001
|
* ```
|
|
1002
1002
|
*/
|
|
1003
1003
|
function readFileHex(root, path, limit = MAX_ARTIFACT_BYTES) {
|
|
1004
|
-
if (!Number.isSafeInteger(limit) || limit < 0 || limit > MAX_ARTIFACT_BYTES) throw new ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
|
|
1004
|
+
if (!isNumber(limit) || !Number.isSafeInteger(limit) || limit < 0 || limit > MAX_ARTIFACT_BYTES) throw new ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
|
|
1005
1005
|
root,
|
|
1006
1006
|
path,
|
|
1007
1007
|
limit
|
|
@@ -2736,7 +2736,7 @@ var WriteTransaction = class {
|
|
|
2736
2736
|
}
|
|
2737
2737
|
#preflight() {
|
|
2738
2738
|
for (const anchor of this.#created) {
|
|
2739
|
-
if (
|
|
2739
|
+
if (isString(anchor)) throw new ScaffoldError("WRITE", `The directory at ${anchor} changed while writing.`, {
|
|
2740
2740
|
target: this.#target,
|
|
2741
2741
|
path: anchor
|
|
2742
2742
|
});
|
|
@@ -2800,7 +2800,7 @@ var WriteTransaction = class {
|
|
|
2800
2800
|
if (!cleared.success) residue.push(cleared.error);
|
|
2801
2801
|
}
|
|
2802
2802
|
for (const created of [...this.#created].reverse()) {
|
|
2803
|
-
const path =
|
|
2803
|
+
const path = isString(created) ? created : created.path;
|
|
2804
2804
|
const removed = attempt(() => rmdirSync(path));
|
|
2805
2805
|
if (!removed.success && !matchesMissingPath(removed.error)) residue.push(removed.error);
|
|
2806
2806
|
}
|
|
@@ -4197,7 +4197,7 @@ var Upstream = class {
|
|
|
4197
4197
|
const edges = [];
|
|
4198
4198
|
for (const [name, range] of Object.entries(declared)) {
|
|
4199
4199
|
if (edges.length >= MAX_COLLECTION_ITEMS) break;
|
|
4200
|
-
if (
|
|
4200
|
+
if (!isString(range) || range.length === 0 || range.length > MAX_RANGE_LENGTH) continue;
|
|
4201
4201
|
if (CONTROL_CHARACTER_PATTERN.test(name) || CONTROL_CHARACTER_PATTERN.test(range)) continue;
|
|
4202
4202
|
if (name.length === 0 || name.length > MAX_DEPENDENCY_NAME_LENGTH) continue;
|
|
4203
4203
|
edges.push({
|