stitchkit 0.103.12 → 0.103.13
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 +17 -0
- package/darwin-native.cjs +12 -0
- package/darwin-native.d.cts +2 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +5 -5
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -1
- package/dist/entrypoints/agent-runtime/harness.js +2 -1
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -1
- package/dist/entrypoints/application/diagnostic-journal.js +3 -2
- package/dist/entrypoints/cli.js +1 -1
- package/dist/entrypoints/files.js +3 -2
- package/dist/entrypoints/process.js +2 -1
- package/dist/entrypoints/tools.js +1 -1
- package/dist/{index-nybn2err.js → index-5csmzesf.js} +1 -1
- package/dist/{index-ahtnte39.js → index-8zfsgar0.js} +35 -30
- package/dist/{index-xvdd2rbb.js → index-9853ymwb.js} +1 -1
- package/dist/{index-806d5phm.js → index-db2spkv1.js} +4 -4
- package/dist/{index-ej331hah.js → index-gxm9rc97.js} +1 -1
- package/dist/index-v5ee8ath.js +88 -0
- package/dist/internal/darwin-binding-error.d.ts +24 -0
- package/dist/internal/darwin-binding-error.d.ts.map +1 -0
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/tools/cli/args-fields.d.ts +2 -0
- package/dist/tools/cli/args-fields.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/llms/cli.txt +10 -0
- package/llms/process.txt +34 -5
- package/llms-full.txt +44 -5
- package/llms.txt +2 -2
- package/package.json +6 -1
- package/dist/index-d4pa2bgs.js +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,23 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.103.13] - 2026-10-04
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Darwin native process and contained-file backends retain a static addon dependency through
|
|
23
|
+
Node-compatible package builds, minified Bun/Node bundles and Bun standalone executables.
|
|
24
|
+
Bundlers emit native assets automatically; Bun compile embeds the target architecture addon.
|
|
25
|
+
Backend load failures keep their original internal cause and serialize safe stage/code
|
|
26
|
+
diagnostics instead of an empty object. Installed Darwin proofs exercise relocated artifacts,
|
|
27
|
+
exact process ownership, lock recovery, contained-file races and missing/corrupt backends.
|
|
28
|
+
|
|
29
|
+
- `stitchkit/cli`: repeated non-array options are refused before scalar coercion, including
|
|
30
|
+
mixed boolean presence, separate values, inline values, negation and short aliases. The same
|
|
31
|
+
rule covers framework and application globals. For example, `--check=false --check` is an
|
|
32
|
+
argument error instead of silently selecting `false`. Single options, array repetition,
|
|
33
|
+
untyped passthrough lists and command help retain their grammar.
|
|
34
|
+
|
|
18
35
|
## [0.103.12] - 2026-10-03
|
|
19
36
|
|
|
20
37
|
### Fixed
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A lazy, statically discoverable addon edge shared by Node and Bun consumers. */
|
|
2
|
+
module.exports = function loadDarwinAddon() {
|
|
3
|
+
// The catch also keeps non-Darwin builds independent of unavailable slices.
|
|
4
|
+
// Bun compile selects its target architecture and embeds that literal addon.
|
|
5
|
+
try {
|
|
6
|
+
if (process.arch === 'arm64') return require('./native/darwin-arm64.node');
|
|
7
|
+
if (process.arch === 'x64') return require('./native/darwin-x64.node');
|
|
8
|
+
throw new Error('Unsupported Darwin addon architecture');
|
|
9
|
+
} catch (cause) {
|
|
10
|
+
throw new Error('Darwin addon loading failed', { cause });
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -8,6 +8,11 @@ export declare function userMessage(conversationId: string, id: string): {
|
|
|
8
8
|
parts: ({
|
|
9
9
|
type: "text";
|
|
10
10
|
text: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "file";
|
|
13
|
+
mediaType: string;
|
|
14
|
+
reference: string;
|
|
15
|
+
filename?: string | undefined;
|
|
11
16
|
} | {
|
|
12
17
|
type: "reasoning";
|
|
13
18
|
text: string;
|
|
@@ -16,11 +21,6 @@ export declare function userMessage(conversationId: string, id: string): {
|
|
|
16
21
|
provider: string;
|
|
17
22
|
data: Record<string, import("zod").JSONType>;
|
|
18
23
|
} | undefined;
|
|
19
|
-
} | {
|
|
20
|
-
type: "file";
|
|
21
|
-
mediaType: string;
|
|
22
|
-
reference: string;
|
|
23
|
-
filename?: string | undefined;
|
|
24
24
|
} | {
|
|
25
25
|
type: "source";
|
|
26
26
|
sourceId: string;
|
|
@@ -7,9 +7,11 @@ import {
|
|
|
7
7
|
AgentCodingToolAuthorizationSchema2,
|
|
8
8
|
AgentCodingToolPathAuthorizationSchema2,
|
|
9
9
|
createAgentCodingTools2
|
|
10
|
-
} from "../../index-
|
|
10
|
+
} from "../../index-db2spkv1.js";
|
|
11
|
+
import"../../index-v5ee8ath.js";
|
|
11
12
|
import"../../index-f330qqyg.js";
|
|
12
13
|
import"../../index-ahvsksw5.js";
|
|
14
|
+
import"../../index-gxm9rc97.js";
|
|
13
15
|
import"../../index-tgzhq07n.js";
|
|
14
16
|
export {
|
|
15
17
|
AgentCodingToolAuthorizationSchema2 as AgentCodingToolAuthorizationSchema,
|
|
@@ -18,6 +18,7 @@ import"../../index-m2xqkv55.js";
|
|
|
18
18
|
import"../../index-69nvze1q.js";
|
|
19
19
|
import"../../index-nggfa2yn.js";
|
|
20
20
|
import"../../index-r5hsgkz5.js";
|
|
21
|
+
import"../../index-v5ee8ath.js";
|
|
21
22
|
import"../../index-n5yqxd3d.js";
|
|
22
23
|
import {
|
|
23
24
|
createAgentHarnessControlServer2
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
import"../../index-vgkbcnkc.js";
|
|
26
27
|
import {
|
|
27
28
|
walkContainedFiles
|
|
28
|
-
} from "../../index-
|
|
29
|
+
} from "../../index-gxm9rc97.js";
|
|
29
30
|
import"../../index-7n68nmc6.js";
|
|
30
31
|
import {
|
|
31
32
|
defineRuntimeTool2
|
|
@@ -9,13 +9,15 @@ import"../../index-x87j7csh.js";
|
|
|
9
9
|
import"../../index-b2bz0kdm.js";
|
|
10
10
|
import {
|
|
11
11
|
createAgentCodingTools2
|
|
12
|
-
} from "../../index-
|
|
12
|
+
} from "../../index-db2spkv1.js";
|
|
13
|
+
import"../../index-v5ee8ath.js";
|
|
13
14
|
import {
|
|
14
15
|
NativeCommandError2,
|
|
15
16
|
spawnOwnedCommand,
|
|
16
17
|
nativeCommandOwner,
|
|
17
18
|
startNativeCommand
|
|
18
19
|
} from "../../index-f330qqyg.js";
|
|
20
|
+
import"../../index-gxm9rc97.js";
|
|
19
21
|
import"../../index-tgzhq07n.js";
|
|
20
22
|
|
|
21
23
|
// src/agent-runtime/sandbox-bubblewrap.ts
|
|
@@ -16,8 +16,9 @@ import {
|
|
|
16
16
|
} from "../../index-w0eqdhyd.js";
|
|
17
17
|
import {
|
|
18
18
|
attemptExclusiveLock
|
|
19
|
-
} from "../../index-
|
|
20
|
-
import"../../index-
|
|
19
|
+
} from "../../index-9853ymwb.js";
|
|
20
|
+
import"../../index-5csmzesf.js";
|
|
21
|
+
import"../../index-v5ee8ath.js";
|
|
21
22
|
import {
|
|
22
23
|
isRecord
|
|
23
24
|
} from "../../index-9jfdm5tg.js";
|
package/dist/entrypoints/cli.js
CHANGED
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
} from "../index-n53mswt3.js";
|
|
12
12
|
import {
|
|
13
13
|
attemptExclusiveLock
|
|
14
|
-
} from "../index-
|
|
15
|
-
import"../index-
|
|
14
|
+
} from "../index-9853ymwb.js";
|
|
15
|
+
import"../index-5csmzesf.js";
|
|
16
|
+
import"../index-v5ee8ath.js";
|
|
16
17
|
import {
|
|
17
18
|
writeFileAtomic2,
|
|
18
19
|
writeFileAtomicSync2
|
|
@@ -152,6 +152,18 @@ class CliArgumentError2 extends Error {
|
|
|
152
152
|
|
|
153
153
|
// src/tools/cli/args-fields.ts
|
|
154
154
|
import { z } from "zod";
|
|
155
|
+
function appendCliOptionValue(raw, name, value, info) {
|
|
156
|
+
const existing = raw.get(name);
|
|
157
|
+
const repeatable = !name.includes(".") && (info === undefined || info.kind === "array");
|
|
158
|
+
if (existing !== undefined) {
|
|
159
|
+
if (!repeatable) {
|
|
160
|
+
throw new CliArgumentError2(`--${name} was passed ${existing.length + 1} times`);
|
|
161
|
+
}
|
|
162
|
+
existing.push(value);
|
|
163
|
+
} else {
|
|
164
|
+
raw.set(name, [value]);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
155
167
|
function unwrap(field) {
|
|
156
168
|
if (field instanceof z.ZodOptional || field instanceof z.ZodNullable || field instanceof z.ZodDefault) {
|
|
157
169
|
return unwrap(field.unwrap());
|
|
@@ -799,16 +811,13 @@ function readCliTokens(argv, fields, config) {
|
|
|
799
811
|
help: false
|
|
800
812
|
};
|
|
801
813
|
const flags = new Map;
|
|
802
|
-
const
|
|
814
|
+
const literalBooleanFlags = new Set;
|
|
815
|
+
const frameworkFlags = new Map;
|
|
803
816
|
const viewFlags = new Map;
|
|
804
817
|
let ascending = false;
|
|
805
818
|
const positionals = [];
|
|
806
819
|
const pushFlag = (name, value) => {
|
|
807
|
-
|
|
808
|
-
if (existing)
|
|
809
|
-
existing.push(value);
|
|
810
|
-
else
|
|
811
|
-
flags.set(name, [value]);
|
|
820
|
+
appendCliOptionValue(flags, name, value, fields.get(name));
|
|
812
821
|
};
|
|
813
822
|
let optionsEnded = false;
|
|
814
823
|
for (let i = 0;i < argv.length; i++) {
|
|
@@ -824,6 +833,7 @@ function readCliTokens(argv, fields, config) {
|
|
|
824
833
|
continue;
|
|
825
834
|
}
|
|
826
835
|
if (tok === "-h") {
|
|
836
|
+
appendCliOptionValue(frameworkFlags, "help", "true", { kind: "boolean" });
|
|
827
837
|
options.help = true;
|
|
828
838
|
continue;
|
|
829
839
|
}
|
|
@@ -839,7 +849,10 @@ function readCliTokens(argv, fields, config) {
|
|
|
839
849
|
const separate = inline === undefined ? separateBoolValue(argv[i + 1]) : undefined;
|
|
840
850
|
if (separate !== undefined)
|
|
841
851
|
i++;
|
|
842
|
-
|
|
852
|
+
pushFlag(field, inline ?? String(separate ?? true));
|
|
853
|
+
if (inline !== undefined)
|
|
854
|
+
parseReservedBool(field, inline);
|
|
855
|
+
literalBooleanFlags.add(field);
|
|
843
856
|
continue;
|
|
844
857
|
}
|
|
845
858
|
let value = inline;
|
|
@@ -866,6 +879,9 @@ function readCliTokens(argv, fields, config) {
|
|
|
866
879
|
const separate = value === undefined ? separateBoolValue(argv[i + 1]) : undefined;
|
|
867
880
|
if (separate !== undefined)
|
|
868
881
|
i++;
|
|
882
|
+
appendCliOptionValue(frameworkFlags, name, value ?? String(separate ?? true), {
|
|
883
|
+
kind: "boolean"
|
|
884
|
+
});
|
|
869
885
|
const enabled = value === undefined ? separate ?? true : parseReservedBool(name, value);
|
|
870
886
|
if (name === "dry-run")
|
|
871
887
|
options.dryRun = enabled;
|
|
@@ -889,6 +905,7 @@ function readCliTokens(argv, fields, config) {
|
|
|
889
905
|
}
|
|
890
906
|
if (!option.inline)
|
|
891
907
|
i++;
|
|
908
|
+
appendCliOptionValue(frameworkFlags, name, value, { kind: "string" });
|
|
892
909
|
if (name === "wait-timeout") {
|
|
893
910
|
const timeout = Number(value);
|
|
894
911
|
if (!Number.isFinite(timeout) || timeout <= 0) {
|
|
@@ -896,8 +913,6 @@ function readCliTokens(argv, fields, config) {
|
|
|
896
913
|
}
|
|
897
914
|
options.waitTimeout = timeout;
|
|
898
915
|
} else if (VIEW_OPTIONS.has(name)) {
|
|
899
|
-
if (viewFlags.has(name))
|
|
900
|
-
throw new CliArgumentError2(`--${name} was given twice`);
|
|
901
916
|
viewFlags.set(name, value);
|
|
902
917
|
} else {
|
|
903
918
|
options.outputDir = value;
|
|
@@ -905,7 +920,8 @@ function readCliTokens(argv, fields, config) {
|
|
|
905
920
|
continue;
|
|
906
921
|
}
|
|
907
922
|
if (value === undefined && name.startsWith("no-") && fields.get(name.slice(3))?.kind === "boolean") {
|
|
908
|
-
|
|
923
|
+
pushFlag(name.slice(3), "false");
|
|
924
|
+
literalBooleanFlags.add(name.slice(3));
|
|
909
925
|
continue;
|
|
910
926
|
}
|
|
911
927
|
const unsafeSegment = name.split(".").find(isUnsafeKey);
|
|
@@ -922,7 +938,8 @@ function readCliTokens(argv, fields, config) {
|
|
|
922
938
|
const separate = separateBoolValue(argv[i + 1]);
|
|
923
939
|
if (separate !== undefined)
|
|
924
940
|
i++;
|
|
925
|
-
|
|
941
|
+
pushFlag(name, String(separate ?? true));
|
|
942
|
+
literalBooleanFlags.add(name);
|
|
926
943
|
continue;
|
|
927
944
|
}
|
|
928
945
|
const next = argv[i + 1];
|
|
@@ -935,10 +952,10 @@ function readCliTokens(argv, fields, config) {
|
|
|
935
952
|
}
|
|
936
953
|
pushFlag(name, value);
|
|
937
954
|
}
|
|
938
|
-
return { options, flags,
|
|
955
|
+
return { options, flags, literalBooleanFlags, viewFlags, ascending, positionals };
|
|
939
956
|
}
|
|
940
957
|
function buildToolArgs(tokens, fields, declaredPositionals) {
|
|
941
|
-
const { flags,
|
|
958
|
+
const { flags, literalBooleanFlags, positionals } = tokens;
|
|
942
959
|
const toolArgs = {};
|
|
943
960
|
const fillable = declaredPositionals === undefined ? [...fields.entries()].filter(([, info]) => info.kind !== "boolean").map(([name]) => name) : [...declaredPositionals];
|
|
944
961
|
const variadicTail = declaredPositionals !== undefined && fields.get(fillable[fillable.length - 1] ?? "")?.kind === "array" ? fillable[fillable.length - 1] : undefined;
|
|
@@ -964,14 +981,12 @@ function buildToolArgs(tokens, fields, declaredPositionals) {
|
|
|
964
981
|
if (pi < positionals.length) {
|
|
965
982
|
throw new CliArgumentError2(`Unexpected positional argument "${positionals[pi]}"`);
|
|
966
983
|
}
|
|
967
|
-
for (const [key, value] of boolFlags) {
|
|
968
|
-
toolArgs[key] = value;
|
|
969
|
-
}
|
|
970
984
|
const dottedRoots = new Map;
|
|
971
985
|
for (const key of flags.keys()) {
|
|
972
986
|
const dot = key.indexOf(".");
|
|
973
|
-
if (dot > 0)
|
|
987
|
+
if (dot > 0 && !literalBooleanFlags.has(key)) {
|
|
974
988
|
dottedRoots.set(key.slice(0, dot), key);
|
|
989
|
+
}
|
|
975
990
|
}
|
|
976
991
|
for (const [root, dotted] of dottedRoots) {
|
|
977
992
|
if (flags.has(root)) {
|
|
@@ -979,17 +994,11 @@ function buildToolArgs(tokens, fields, declaredPositionals) {
|
|
|
979
994
|
}
|
|
980
995
|
}
|
|
981
996
|
for (const [key, values] of flags) {
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
throw new CliArgumentError2(`--${key} was passed ${values.length} times`);
|
|
985
|
-
}
|
|
997
|
+
const info = fields.get(key);
|
|
998
|
+
if (key.includes(".") && !literalBooleanFlags.has(key)) {
|
|
986
999
|
setNested(toolArgs, key.split("."), looseCoerce(values[0] ?? ""));
|
|
987
1000
|
continue;
|
|
988
1001
|
}
|
|
989
|
-
const info = fields.get(key);
|
|
990
|
-
if (values.length > 1 && info !== undefined && info.kind !== "array" && info.kind !== "other") {
|
|
991
|
-
throw new CliArgumentError2(`--${key} was passed ${values.length} times`);
|
|
992
|
-
}
|
|
993
1002
|
toolArgs[key] = coerceField(info, values, `--${key}`);
|
|
994
1003
|
}
|
|
995
1004
|
return toolArgs;
|
|
@@ -1041,11 +1050,7 @@ function extractCliGlobalOptions2(argv, schema) {
|
|
|
1041
1050
|
throw new CliArgumentError2(`--${option.name} requires a value`);
|
|
1042
1051
|
}
|
|
1043
1052
|
}
|
|
1044
|
-
|
|
1045
|
-
if (existing)
|
|
1046
|
-
existing.push(value);
|
|
1047
|
-
else
|
|
1048
|
-
raw.set(option.name, [value]);
|
|
1053
|
+
appendCliOptionValue(raw, option.name, value, info);
|
|
1049
1054
|
}
|
|
1050
1055
|
const args = {};
|
|
1051
1056
|
for (const [name, values] of raw) {
|
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
forbidden2,
|
|
3
3
|
conflict2
|
|
4
4
|
} from "./index-n53mswt3.js";
|
|
5
|
+
import {
|
|
6
|
+
loadDarwinBinding
|
|
7
|
+
} from "./index-v5ee8ath.js";
|
|
5
8
|
import {
|
|
6
9
|
NativeCommandError2,
|
|
7
10
|
stopCommandGroup,
|
|
@@ -28,10 +31,7 @@ import {
|
|
|
28
31
|
openContainedParentFile,
|
|
29
32
|
readContainedUtf8Handle,
|
|
30
33
|
scanContainedFiles
|
|
31
|
-
} from "./index-
|
|
32
|
-
import {
|
|
33
|
-
loadDarwinBinding
|
|
34
|
-
} from "./index-d4pa2bgs.js";
|
|
34
|
+
} from "./index-gxm9rc97.js";
|
|
35
35
|
import {
|
|
36
36
|
defineRuntimeTool2
|
|
37
37
|
} from "./index-tgzhq07n.js";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/internal/darwin-binding.ts
|
|
2
|
+
import loadDarwinAddon from "#stitchkit-darwin-native";
|
|
3
|
+
|
|
4
|
+
// src/internal/darwin-binding-error.ts
|
|
5
|
+
var messages = {
|
|
6
|
+
architecture: "The packaged Darwin backend does not support this architecture",
|
|
7
|
+
resolve: "The packaged Darwin backend is missing",
|
|
8
|
+
load: "The packaged Darwin backend could not be loaded",
|
|
9
|
+
surface: "The packaged Darwin backend has an invalid surface"
|
|
10
|
+
};
|
|
11
|
+
var nativeCodes = new Set([
|
|
12
|
+
"MODULE_NOT_FOUND",
|
|
13
|
+
"ERR_MODULE_NOT_FOUND",
|
|
14
|
+
"ERR_DLOPEN_FAILED",
|
|
15
|
+
"ENOENT",
|
|
16
|
+
"EINVAL",
|
|
17
|
+
"EPERM",
|
|
18
|
+
"EACCES",
|
|
19
|
+
"ENOTSUP"
|
|
20
|
+
]);
|
|
21
|
+
function darwinNativeCode(cause) {
|
|
22
|
+
let current = cause;
|
|
23
|
+
for (let depth = 0;depth < 3 && current instanceof Error; depth++) {
|
|
24
|
+
if ("code" in current && typeof current.code === "string" && nativeCodes.has(current.code)) {
|
|
25
|
+
return current.code;
|
|
26
|
+
}
|
|
27
|
+
current = current.cause;
|
|
28
|
+
}
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
class DarwinBackendError extends Error {
|
|
33
|
+
stage;
|
|
34
|
+
code = "DARWIN_BACKEND_UNAVAILABLE";
|
|
35
|
+
constructor(stage, cause) {
|
|
36
|
+
super(messages[stage], { cause });
|
|
37
|
+
this.stage = stage;
|
|
38
|
+
this.name = "DarwinBackendError";
|
|
39
|
+
}
|
|
40
|
+
toJSON() {
|
|
41
|
+
return {
|
|
42
|
+
name: this.name,
|
|
43
|
+
code: this.code,
|
|
44
|
+
stage: this.stage,
|
|
45
|
+
architecture: process.arch,
|
|
46
|
+
message: this.message,
|
|
47
|
+
nativeCode: darwinNativeCode(this.cause)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/internal/darwin-binding.ts
|
|
53
|
+
function hasFunctions(value, names) {
|
|
54
|
+
return typeof value === "object" && value !== null && names.every((name) => typeof Reflect.get(value, name) === "function");
|
|
55
|
+
}
|
|
56
|
+
var darwinBinding;
|
|
57
|
+
function loadDarwinBinding() {
|
|
58
|
+
if (darwinBinding)
|
|
59
|
+
return darwinBinding;
|
|
60
|
+
if (process.arch !== "arm64" && process.arch !== "x64") {
|
|
61
|
+
throw new DarwinBackendError("architecture");
|
|
62
|
+
}
|
|
63
|
+
let loaded;
|
|
64
|
+
try {
|
|
65
|
+
loaded = loadDarwinAddon();
|
|
66
|
+
} catch (cause) {
|
|
67
|
+
const code = darwinNativeCode(cause);
|
|
68
|
+
throw new DarwinBackendError(code === "MODULE_NOT_FOUND" || code === "ERR_MODULE_NOT_FOUND" || code === "ENOENT" ? "resolve" : "load", cause);
|
|
69
|
+
}
|
|
70
|
+
const methods = [
|
|
71
|
+
"openDirectoryAt",
|
|
72
|
+
"openFileAt",
|
|
73
|
+
"createFileAt",
|
|
74
|
+
"createDirectoryAt",
|
|
75
|
+
"statAt",
|
|
76
|
+
"listAt",
|
|
77
|
+
"renameAt",
|
|
78
|
+
"unlinkAt",
|
|
79
|
+
"processIdentity"
|
|
80
|
+
];
|
|
81
|
+
if (!hasFunctions(loaded, methods)) {
|
|
82
|
+
throw new DarwinBackendError("surface");
|
|
83
|
+
}
|
|
84
|
+
darwinBinding = loaded;
|
|
85
|
+
return darwinBinding;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { loadDarwinBinding };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
architecture: string;
|
|
3
|
+
resolve: string;
|
|
4
|
+
load: string;
|
|
5
|
+
surface: string;
|
|
6
|
+
};
|
|
7
|
+
type Stage = keyof typeof messages;
|
|
8
|
+
export declare function darwinNativeCode(cause: unknown): string | undefined;
|
|
9
|
+
/** Live callers retain the original Error; operator JSON only carries safe loader evidence. */
|
|
10
|
+
export declare class DarwinBackendError extends Error {
|
|
11
|
+
readonly stage: Stage;
|
|
12
|
+
readonly code = "DARWIN_BACKEND_UNAVAILABLE";
|
|
13
|
+
constructor(stage: Stage, cause?: unknown);
|
|
14
|
+
toJSON(): {
|
|
15
|
+
name: string;
|
|
16
|
+
code: string;
|
|
17
|
+
stage: "architecture" | "load" | "resolve" | "surface";
|
|
18
|
+
architecture: NodeJS.Architecture;
|
|
19
|
+
message: string;
|
|
20
|
+
nativeCode: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=darwin-binding-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"darwin-binding-error.d.ts","sourceRoot":"","sources":["../../src/internal/darwin-binding-error.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ;IACZ,YAAY;IACZ,OAAO;IACP,IAAI;IACJ,OAAO;CACR,CAAC;AACF,KAAK,KAAK,GAAG,MAAM,OAAO,QAAQ,CAAC;AAYnC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAanE;AAED,+FAA+F;AAC/F,qBAAa,kBAAmB,SAAQ,KAAK;IAGzC,QAAQ,CAAC,KAAK,EAAE,KAAK;IAFvB,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,YACW,KAAK,EAAE,KAAK,EACrB,KAAK,CAAC,EAAE,OAAO,EAIhB;IACD,MAAM;;;;;;;MASL;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"darwin-binding.d.ts","sourceRoot":"","sources":["../../src/internal/darwin-binding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"darwin-binding.d.ts","sourceRoot":"","sources":["../../src/internal/darwin-binding.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACzD,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACpD,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1E,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC1E,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,WAAW,EAAE,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAClE,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACjD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAM9E;AAID,wBAAgB,iBAAiB,IAAI,aAAa,CAkCjD"}
|
|
@@ -12,6 +12,8 @@ export interface FieldInfo {
|
|
|
12
12
|
/** A `number` field that only accepts integers — named in its coercion error. */
|
|
13
13
|
integer?: boolean;
|
|
14
14
|
}
|
|
15
|
+
/** Admit each raw occurrence before scalar coercion can discard a value. */
|
|
16
|
+
export declare function appendCliOptionValue(raw: Map<string, string[]>, name: string, value: string, info: FieldInfo | undefined): void;
|
|
15
17
|
/**
|
|
16
18
|
* Map a merged tool schema to per-field kind info — what each `--flag` should
|
|
17
19
|
* coerce to. Object members of unions and intersections contribute their
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args-fields.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAC;AAEZ,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iFAAiF;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA6ED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAI1F;AAKD,4GAA4G;AAC5G;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAI/E;AAED,oEAAoE;AACpE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAKtE;AA8BD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKlD;AAuCD,gFAAgF;AAChF,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAaT;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,OAAO,GACb,IAAI,CAsBN"}
|
|
1
|
+
{"version":3,"file":"args-fields.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAC;AAEZ,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iFAAiF;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B,IAAI,CAaN;AA6ED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAI1F;AAKD,4GAA4G;AAC5G;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAI/E;AAED,oEAAoE;AACpE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAKtE;AA8BD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKlD;AAuCD,gFAAgF;AAChF,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAaT;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,OAAO,GACb,IAAI,CAsBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkB7B,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,aAAa,CAAC;AAGjE,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,IAAI,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,KAAK,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,MAAM,EAAE,OAAO,CAAC;IAChB,qDAAqD;IACrD,IAAI,EAAE,OAAO,CAAC;IACd,0FAA0F;IAC1F,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,+BAA+B;IAC/B,OAAO,EAAE,aAAa,CAAC;CACxB;AAoRD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAC7B,MAAM,GAAE;IACN,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B,GACL,aAAa,CAUf;AAED,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,CAAC,CAAC,SAAS,GAAG,SAAS,GAC9B,qBAAqB,CAgDvB"}
|
package/llms/cli.txt
CHANGED
|
@@ -206,6 +206,16 @@ there stays a positional, and `--` makes a literal `false` one too. The same
|
|
|
206
206
|
holds for a short alias, a framework flag such as `--json false` and an
|
|
207
207
|
application option.
|
|
208
208
|
|
|
209
|
+
Every declared non-array option is single-use, including framework and
|
|
210
|
+
application globals. Bare, separate-value, inline, negative and short-alias
|
|
211
|
+
forms of a command option count as the same name: `--active=false --active`,
|
|
212
|
+
`--active false --no-active` and `-f --active` are argument errors even when
|
|
213
|
+
the values agree. Duplicates are refused before command execution. Array
|
|
214
|
+
options accumulate across long and short forms; unknown non-dotted passthrough
|
|
215
|
+
options retain their raw-list grammar. Tokens after `--` are literal data.
|
|
216
|
+
Command `--help` and `-h` keep their diagnostic precedence over malformed
|
|
217
|
+
operation arguments; application globals are validated before routing.
|
|
218
|
+
|
|
209
219
|
Without presentation configuration, positional arguments fill non-boolean
|
|
210
220
|
fields in declaration order, so `myapp generate "a fox"` is
|
|
211
221
|
`--prompt "a fox"`. A piped value fills the first required unset field:
|
package/llms/process.txt
CHANGED
|
@@ -15,7 +15,7 @@ description: Native IO для Bun и Node, с явно выбранной durabi
|
|
|
15
15
|
type: guide
|
|
16
16
|
status: active
|
|
17
17
|
created: 2026-10-01 20:44 +07:00
|
|
18
|
-
updated: 2026-10-
|
|
18
|
+
updated: 2026-10-04 09:40 +07:00
|
|
19
19
|
participants:
|
|
20
20
|
- role: authored
|
|
21
21
|
harness: Codex
|
|
@@ -29,6 +29,10 @@ participants:
|
|
|
29
29
|
harness: Codex
|
|
30
30
|
model: GPT-6
|
|
31
31
|
at: 2026-10-03 13:36 +07:00
|
|
32
|
+
- role: implemented
|
|
33
|
+
harness: Codex
|
|
34
|
+
model: GPT-6
|
|
35
|
+
at: 2026-10-04 09:21 +07:00
|
|
32
36
|
---
|
|
33
37
|
|
|
34
38
|
# Native IO
|
|
@@ -256,10 +260,35 @@ version: carry their reachable relative `.d.ts` closure, rather than emitting re
|
|
|
256
260
|
instead emit declarations for only that DTO contract. Keep the library's manifest at runtime
|
|
257
261
|
`dependencies: {}` and `peerDependencies: { zod: ... }` when that is its declared promise.
|
|
258
262
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
+
The packaged Darwin loader has static references to both architecture addons. Bun compilation
|
|
264
|
+
embeds the matching `.node` asset; ordinary Bun bundling emits native assets alongside its JS
|
|
265
|
+
output. Publish **every output returned by `Bun.build`**, preserving relative paths. Copying only
|
|
266
|
+
the JS file drops its native dependency. No runtime Stitchkit installation or manually chosen
|
|
267
|
+
native path is required for these bundled artifacts.
|
|
268
|
+
|
|
269
|
+
```sh
|
|
270
|
+
bun build src/native.ts --target=bun --minify --outdir=dist
|
|
271
|
+
bun build src/native.ts --compile --bytecode --format=esm --outfile=dist/native
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
For a JS build that previously used `--outfile=dist/native.js`, use
|
|
275
|
+
`--outdir=dist --entry-naming=native.js` instead: the output can now include native assets.
|
|
276
|
+
The standalone executable still uses `--outfile` because those assets are embedded inside it.
|
|
277
|
+
|
|
278
|
+
Qualify the complete output outside its build tree and installed dependency graph. Test process
|
|
279
|
+
identity, live-owner refusal, dead-owner recovery and contained file operations in the resulting
|
|
280
|
+
JS bundle and standalone executable. Bun and Node package imports retain the same lazy loader;
|
|
281
|
+
importing a portable leaf does not load a Darwin addon on another OS. Test declarations too,
|
|
282
|
+
and check that importing an unbundled Stitchkit leaf fails in a deliberately isolated library
|
|
283
|
+
distribution. A separate schema-only entry must not import the native entry.
|
|
284
|
+
|
|
285
|
+
If the Darwin backend cannot load, `observeProcessInstance` still returns `unavailable`.
|
|
286
|
+
Its backend `Error` preserves the original `cause`; JSON serialization carries only the stable
|
|
287
|
+
`DARWIN_BACKEND_UNAVAILABLE` code, architecture, safe message and failure stage
|
|
288
|
+
(`architecture`, `resolve`, `load` or `surface`), plus a recognized native error code when present.
|
|
289
|
+
It excludes stack, paths and nested cause. This backend diagnosis does not reclassify kernel
|
|
290
|
+
failures or turn unavailable identity into proof that an owner is dead. If a runtime provides
|
|
291
|
+
no recognized native error code, the stage stays `load`; the loader never infers errno from text.
|
|
263
292
|
|
|
264
293
|
This delivery removes a runtime kernel installation; it does not remove the build-time
|
|
265
294
|
Stitchkit installation or create an independent lightweight npm package.
|
package/llms-full.txt
CHANGED
|
@@ -8045,7 +8045,7 @@ description: Native IO для Bun и Node, с явно выбранной durabi
|
|
|
8045
8045
|
type: guide
|
|
8046
8046
|
status: active
|
|
8047
8047
|
created: 2026-10-01 20:44 +07:00
|
|
8048
|
-
updated: 2026-10-
|
|
8048
|
+
updated: 2026-10-04 09:40 +07:00
|
|
8049
8049
|
participants:
|
|
8050
8050
|
- role: authored
|
|
8051
8051
|
harness: Codex
|
|
@@ -8059,6 +8059,10 @@ participants:
|
|
|
8059
8059
|
harness: Codex
|
|
8060
8060
|
model: GPT-6
|
|
8061
8061
|
at: 2026-10-03 13:36 +07:00
|
|
8062
|
+
- role: implemented
|
|
8063
|
+
harness: Codex
|
|
8064
|
+
model: GPT-6
|
|
8065
|
+
at: 2026-10-04 09:21 +07:00
|
|
8062
8066
|
---
|
|
8063
8067
|
|
|
8064
8068
|
# Native IO
|
|
@@ -8286,10 +8290,35 @@ version: carry their reachable relative `.d.ts` closure, rather than emitting re
|
|
|
8286
8290
|
instead emit declarations for only that DTO contract. Keep the library's manifest at runtime
|
|
8287
8291
|
`dependencies: {}` and `peerDependencies: { zod: ... }` when that is its declared promise.
|
|
8288
8292
|
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
+
The packaged Darwin loader has static references to both architecture addons. Bun compilation
|
|
8294
|
+
embeds the matching `.node` asset; ordinary Bun bundling emits native assets alongside its JS
|
|
8295
|
+
output. Publish **every output returned by `Bun.build`**, preserving relative paths. Copying only
|
|
8296
|
+
the JS file drops its native dependency. No runtime Stitchkit installation or manually chosen
|
|
8297
|
+
native path is required for these bundled artifacts.
|
|
8298
|
+
|
|
8299
|
+
```sh
|
|
8300
|
+
bun build src/native.ts --target=bun --minify --outdir=dist
|
|
8301
|
+
bun build src/native.ts --compile --bytecode --format=esm --outfile=dist/native
|
|
8302
|
+
```
|
|
8303
|
+
|
|
8304
|
+
For a JS build that previously used `--outfile=dist/native.js`, use
|
|
8305
|
+
`--outdir=dist --entry-naming=native.js` instead: the output can now include native assets.
|
|
8306
|
+
The standalone executable still uses `--outfile` because those assets are embedded inside it.
|
|
8307
|
+
|
|
8308
|
+
Qualify the complete output outside its build tree and installed dependency graph. Test process
|
|
8309
|
+
identity, live-owner refusal, dead-owner recovery and contained file operations in the resulting
|
|
8310
|
+
JS bundle and standalone executable. Bun and Node package imports retain the same lazy loader;
|
|
8311
|
+
importing a portable leaf does not load a Darwin addon on another OS. Test declarations too,
|
|
8312
|
+
and check that importing an unbundled Stitchkit leaf fails in a deliberately isolated library
|
|
8313
|
+
distribution. A separate schema-only entry must not import the native entry.
|
|
8314
|
+
|
|
8315
|
+
If the Darwin backend cannot load, `observeProcessInstance` still returns `unavailable`.
|
|
8316
|
+
Its backend `Error` preserves the original `cause`; JSON serialization carries only the stable
|
|
8317
|
+
`DARWIN_BACKEND_UNAVAILABLE` code, architecture, safe message and failure stage
|
|
8318
|
+
(`architecture`, `resolve`, `load` or `surface`), plus a recognized native error code when present.
|
|
8319
|
+
It excludes stack, paths and nested cause. This backend diagnosis does not reclassify kernel
|
|
8320
|
+
failures or turn unavailable identity into proof that an owner is dead. If a runtime provides
|
|
8321
|
+
no recognized native error code, the stage stays `load`; the loader never infers errno from text.
|
|
8293
8322
|
|
|
8294
8323
|
This delivery removes a runtime kernel installation; it does not remove the build-time
|
|
8295
8324
|
Stitchkit installation or create an independent lightweight npm package.
|
|
@@ -8907,6 +8936,16 @@ there stays a positional, and `--` makes a literal `false` one too. The same
|
|
|
8907
8936
|
holds for a short alias, a framework flag such as `--json false` and an
|
|
8908
8937
|
application option.
|
|
8909
8938
|
|
|
8939
|
+
Every declared non-array option is single-use, including framework and
|
|
8940
|
+
application globals. Bare, separate-value, inline, negative and short-alias
|
|
8941
|
+
forms of a command option count as the same name: `--active=false --active`,
|
|
8942
|
+
`--active false --no-active` and `-f --active` are argument errors even when
|
|
8943
|
+
the values agree. Duplicates are refused before command execution. Array
|
|
8944
|
+
options accumulate across long and short forms; unknown non-dotted passthrough
|
|
8945
|
+
options retain their raw-list grammar. Tokens after `--` are literal data.
|
|
8946
|
+
Command `--help` and `-h` keep their diagnostic precedence over malformed
|
|
8947
|
+
operation arguments; application globals are validated before routing.
|
|
8948
|
+
|
|
8910
8949
|
Without presentation configuration, positional arguments fill non-boolean
|
|
8911
8950
|
fields in declaration order, so `myapp generate "a fox"` is
|
|
8912
8951
|
`--prompt "a fox"`. A piped value fills the first required unset field:
|
package/llms.txt
CHANGED
|
@@ -17,7 +17,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
17
17
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
18
18
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
19
19
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.1 KB
|
|
20
|
-
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt)
|
|
20
|
+
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 44.2 KB → [llms/cli.2.txt](llms/cli.2.txt) 8.1 KB
|
|
21
21
|
- **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
|
|
22
22
|
- **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
|
|
23
23
|
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 11.2 KB
|
|
@@ -55,7 +55,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
55
55
|
- **stitchkit/agent-runtime/react**: [llms/agent-runtime-react.txt](llms/agent-runtime-react.txt) 1.0 KB
|
|
56
56
|
- **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt) 1.8 KB
|
|
57
57
|
- **stitchkit/agent-runtime/harness-tools**: [llms/agent-runtime-harness-tools.txt](llms/agent-runtime-harness-tools.txt) 1.3 KB
|
|
58
|
-
- **stitchkit/process**: [llms/process.txt](llms/process.txt)
|
|
58
|
+
- **stitchkit/process**: [llms/process.txt](llms/process.txt) 21.7 KB
|
|
59
59
|
|
|
60
60
|
## Upgrading slices
|
|
61
61
|
- **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 10.3 KB
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stitchkit",
|
|
3
|
-
"version": "0.103.
|
|
3
|
+
"version": "0.103.13",
|
|
4
4
|
"description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"dist",
|
|
44
44
|
"native/*.node",
|
|
45
|
+
"darwin-native.cjs",
|
|
46
|
+
"darwin-native.d.cts",
|
|
45
47
|
"llms.txt",
|
|
46
48
|
"llms-full.txt",
|
|
47
49
|
"llms",
|
|
@@ -49,6 +51,9 @@
|
|
|
49
51
|
"CHANGELOG.md",
|
|
50
52
|
"LICENSE"
|
|
51
53
|
],
|
|
54
|
+
"imports": {
|
|
55
|
+
"#stitchkit-darwin-native": "./darwin-native.cjs"
|
|
56
|
+
},
|
|
52
57
|
"exports": {
|
|
53
58
|
".": {
|
|
54
59
|
"types": "./dist/entrypoints/index.d.ts",
|
package/dist/index-d4pa2bgs.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// src/internal/darwin-binding.ts
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
function hasFunctions(value, names) {
|
|
7
|
-
return typeof value === "object" && value !== null && names.every((name) => typeof Reflect.get(value, name) === "function");
|
|
8
|
-
}
|
|
9
|
-
var darwinBinding;
|
|
10
|
-
function loadDarwinBinding() {
|
|
11
|
-
if (darwinBinding)
|
|
12
|
-
return darwinBinding;
|
|
13
|
-
const directory = path.dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
const binary = `darwin-${process.arch}.node`;
|
|
15
|
-
const candidates = [
|
|
16
|
-
path.resolve(directory, "../native", binary),
|
|
17
|
-
path.resolve(directory, "../../native", binary)
|
|
18
|
-
];
|
|
19
|
-
const selected = candidates.find((candidate) => existsSync(candidate));
|
|
20
|
-
if (!selected) {
|
|
21
|
-
throw new Error(`Contained filesystem operations need the packaged Darwin ${process.arch} backend`);
|
|
22
|
-
}
|
|
23
|
-
const loaded = createRequire(import.meta.url)(selected);
|
|
24
|
-
const methods = [
|
|
25
|
-
"openDirectoryAt",
|
|
26
|
-
"openFileAt",
|
|
27
|
-
"createFileAt",
|
|
28
|
-
"createDirectoryAt",
|
|
29
|
-
"statAt",
|
|
30
|
-
"listAt",
|
|
31
|
-
"renameAt",
|
|
32
|
-
"unlinkAt",
|
|
33
|
-
"processIdentity"
|
|
34
|
-
];
|
|
35
|
-
if (!hasFunctions(loaded, methods)) {
|
|
36
|
-
throw new Error("The packaged Darwin contained-files backend has an invalid surface");
|
|
37
|
-
}
|
|
38
|
-
darwinBinding = loaded;
|
|
39
|
-
return darwinBinding;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { loadDarwinBinding };
|