@kitman-sh/cli 0.10.96 → 0.10.98
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/{chunk-ampzxrqe.js → chunk-07p2dcq3.js} +333 -94
- package/dist/{chunk-2kr43ps6.js → chunk-3bjekzn7.js} +312 -395
- package/dist/{chunk-dh3108wk.js → chunk-6dc0x5cg.js} +8 -8
- package/dist/{chunk-q3nygncv.js → chunk-797w5qe6.js} +7 -7
- package/dist/{chunk-4psvc86s.js → chunk-7c3pgktm.js} +9 -8
- package/dist/{chunk-a244myqw.js → chunk-7ya2q09c.js} +1 -1
- package/dist/{chunk-qacvrg7j.js → chunk-95mkdtzk.js} +6 -6
- package/dist/{chunk-tpdcq44c.js → chunk-aba9zdpb.js} +32 -32
- package/dist/{chunk-mcpesyz2.js → chunk-bqg9gy2e.js} +7 -7
- package/dist/{chunk-8tq7n7wc.js → chunk-c6h3fhtb.js} +24 -24
- package/dist/{chunk-fv6kgtze.js → chunk-cgjyv52e.js} +2 -2
- package/dist/{chunk-bk3dpjxq.js → chunk-d1sqb8rt.js} +1 -1
- package/dist/{chunk-c9wzakrx.js → chunk-fd39ch4n.js} +8 -8
- package/dist/{chunk-6aa8y66v.js → chunk-g1xmj2nb.js} +4 -4
- package/dist/{chunk-abf4m4b2.js → chunk-gfqm22x7.js} +5 -5
- package/dist/{chunk-15w92pn6.js → chunk-j8vq6sk1.js} +19 -19
- package/dist/{chunk-t7ncjd6s.js → chunk-n8c1wh6t.js} +6 -6
- package/dist/{chunk-rdv42ygn.js → chunk-nym2zmz3.js} +4 -4
- package/dist/{chunk-3r7ahnwy.js → chunk-p83y21hp.js} +4 -4
- package/dist/{chunk-et6qa95h.js → chunk-qrxkpwzy.js} +1 -1
- package/dist/{chunk-vjcn82g3.js → chunk-s5p94z8x.js} +65 -214
- package/dist/{chunk-q2d37e4x.js → chunk-s90hj0mb.js} +53 -53
- package/dist/{chunk-s3qgchay.js → chunk-sy8d7bfa.js} +98 -98
- package/dist/{chunk-g3r5xp0t.js → chunk-xwhybbj2.js} +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -12,30 +12,30 @@ import {
|
|
|
12
12
|
orElseSucceed,
|
|
13
13
|
decodeJsonString,
|
|
14
14
|
encodePrettyJsonString
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-07p2dcq3.js";
|
|
16
|
+
import"./chunk-qrxkpwzy.js";
|
|
17
17
|
import {
|
|
18
18
|
isJsonObject
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-d1sqb8rt.js";
|
|
20
20
|
import {
|
|
21
21
|
FileSystem,
|
|
22
22
|
Path
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-s5p94z8x.js";
|
|
24
24
|
import {
|
|
25
25
|
tomlTableHeader2,
|
|
26
26
|
tomlKeyPath2,
|
|
27
27
|
kitmanSkillEntry,
|
|
28
28
|
isPathWithin2
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6dc0x5cg.js";
|
|
30
30
|
import {
|
|
31
31
|
instructionsStart,
|
|
32
32
|
instructionsEnd,
|
|
33
33
|
renderMcpServer,
|
|
34
34
|
materializeKitSetup,
|
|
35
35
|
tomlInline
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import"./chunk-
|
|
38
|
-
import"./chunk-
|
|
36
|
+
} from "./chunk-3bjekzn7.js";
|
|
37
|
+
import"./chunk-bqg9gy2e.js";
|
|
38
|
+
import"./chunk-p83y21hp.js";
|
|
39
39
|
|
|
40
40
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
41
41
|
class KitSyncError extends TaggedError("KitSyncError") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-p83y21hp.js";
|
|
3
3
|
import {
|
|
4
4
|
HERDR_CORE_GENERATION2,
|
|
5
5
|
HERDR_CORE_INSTALL_COMMAND2,
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
herdrCoreLayer2,
|
|
13
13
|
herdrCoreTransportLayer2,
|
|
14
14
|
updateHerdrCore2
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import"./chunk-
|
|
17
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-3bjekzn7.js";
|
|
16
|
+
import"./chunk-s5p94z8x.js";
|
|
17
|
+
import"./chunk-07p2dcq3.js";
|
|
18
18
|
export {
|
|
19
19
|
HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
|
|
20
20
|
HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
decoded2,
|
|
8
8
|
readOpencode2,
|
|
9
9
|
runOpencodeReader2
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
13
|
-
import"./chunk-
|
|
14
|
-
import"./chunk-
|
|
10
|
+
} from "./chunk-n8c1wh6t.js";
|
|
11
|
+
import"./chunk-p83y21hp.js";
|
|
12
|
+
import"./chunk-d1sqb8rt.js";
|
|
13
|
+
import"./chunk-s5p94z8x.js";
|
|
14
|
+
import"./chunk-07p2dcq3.js";
|
|
15
15
|
export {
|
|
16
16
|
decoded2 as decoded,
|
|
17
17
|
decodedOption2 as decodedOption,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
gen,
|
|
11
11
|
fail7,
|
|
12
12
|
flatMap3,
|
|
13
|
-
|
|
13
|
+
map7,
|
|
14
14
|
catchTags,
|
|
15
15
|
mapError2,
|
|
16
16
|
orDie,
|
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
toCodecJson,
|
|
33
33
|
Json,
|
|
34
34
|
encodePrettyJsonString
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import"./chunk-
|
|
37
|
-
import"./chunk-
|
|
35
|
+
} from "./chunk-07p2dcq3.js";
|
|
36
|
+
import"./chunk-qrxkpwzy.js";
|
|
37
|
+
import"./chunk-d1sqb8rt.js";
|
|
38
38
|
import {
|
|
39
39
|
SecureRandom,
|
|
40
40
|
layerWebCrypto,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
layer4,
|
|
47
47
|
kitmanMcpServer,
|
|
48
48
|
RunnerRpcProtocolVersion
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-3bjekzn7.js";
|
|
50
50
|
import {
|
|
51
51
|
decodeText,
|
|
52
52
|
mkString,
|
|
@@ -54,23 +54,23 @@ import {
|
|
|
54
54
|
Path,
|
|
55
55
|
withDefault,
|
|
56
56
|
String2
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-s5p94z8x.js";
|
|
58
58
|
import {
|
|
59
59
|
Packument,
|
|
60
60
|
tarballMatches
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import"./chunk-
|
|
61
|
+
} from "./chunk-bqg9gy2e.js";
|
|
62
|
+
import"./chunk-95mkdtzk.js";
|
|
63
63
|
import {
|
|
64
64
|
AgentDeclaration,
|
|
65
65
|
KitDeclarations,
|
|
66
66
|
describeFlag,
|
|
67
67
|
Described
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-7c3pgktm.js";
|
|
69
69
|
import {
|
|
70
70
|
ChildProcessSpawner,
|
|
71
71
|
make3
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import"./chunk-
|
|
72
|
+
} from "./chunk-p83y21hp.js";
|
|
73
|
+
import"./chunk-c6h3fhtb.js";
|
|
74
74
|
|
|
75
75
|
// packages/sdk/src/build/index.ts
|
|
76
76
|
class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
|
|
@@ -119,7 +119,7 @@ var run = (command, args, cwd) => gen(function* () {
|
|
|
119
119
|
}).pipe(scoped);
|
|
120
120
|
var failure = (result) => (result.stderr.trim() || result.stdout.trim()).slice(-2000);
|
|
121
121
|
var provenance = (directory) => gen(function* () {
|
|
122
|
-
const git = (...args) => run("git", args, directory).pipe(
|
|
122
|
+
const git = (...args) => run("git", args, directory).pipe(map7((result) => result.ok ? result.stdout.trim() : undefined), orElseSucceed(() => {
|
|
123
123
|
return;
|
|
124
124
|
}));
|
|
125
125
|
const repository = yield* git("remote", "get-url", "origin");
|
|
@@ -145,7 +145,7 @@ var readText = (directory, text, what) => gen(function* () {
|
|
|
145
145
|
const file = yield* inKit(directory, text.file, what);
|
|
146
146
|
return yield* fs.readFileString(file).pipe(mapError2(() => new DeclarationsInvalid({ reason: `${what} ${text.file} does not read` })));
|
|
147
147
|
});
|
|
148
|
-
var readAgents = (directory, agents) => forEach(Object.entries(agents), ([id, { instructions, ...agent }]) => instructions === undefined ? succeed6([id, agent]) :
|
|
148
|
+
var readAgents = (directory, agents) => forEach(Object.entries(agents), ([id, { instructions, ...agent }]) => instructions === undefined ? succeed6([id, agent]) : map7(readText(directory, instructions, `Agent "${id}" instructions`), (text) => [id, { ...agent, instructions: text.trim() }])).pipe(map7(Object.fromEntries));
|
|
149
149
|
var utf8 = new TextDecoder("utf-8", { fatal: true });
|
|
150
150
|
var setupFile = (bytes) => {
|
|
151
151
|
try {
|
|
@@ -220,7 +220,7 @@ var fetchNpm = (name, wanted, what) => gen(function* () {
|
|
|
220
220
|
const dist = packument.versions[packument["dist-tags"][wanted] ?? wanted]?.dist;
|
|
221
221
|
if (dist === undefined)
|
|
222
222
|
return yield* failed("npm has no such version or dist-tag");
|
|
223
|
-
const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer),
|
|
223
|
+
const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer), map7((buffer) => new Uint8Array(buffer)), mapError2((error) => failed(error.message)));
|
|
224
224
|
if (!tarballMatches(tarball, dist))
|
|
225
225
|
return yield* failed(`the tarball does not match its integrity ${dist.integrity ?? `sha1 ${dist.shasum}`}`);
|
|
226
226
|
const directory = yield* fs.makeTempDirectoryScoped({ prefix: "kitman-npm-" });
|
|
@@ -261,11 +261,11 @@ var setupArchive = (directory, kit, setup, checkouts) => gen(function* () {
|
|
|
261
261
|
const file = yield* inKit(directory, setup.instructions, what);
|
|
262
262
|
files["instructions.md"] = setupFile(yield* fs.readFile(file).pipe(mapError2(() => new DeclarationsInvalid({ reason: `${what} do not read` }))));
|
|
263
263
|
}
|
|
264
|
-
const skills = setup.skills === undefined ? undefined : yield* forEach(setup.skills, (skill) =>
|
|
264
|
+
const skills = setup.skills === undefined ? undefined : yield* forEach(setup.skills, (skill) => map7(sourceTree(directory, skill.source, `Kit ${kit} skill ${skill.name}`, checkouts), (tree) => ({
|
|
265
265
|
...skill,
|
|
266
266
|
source: place(`skills/${skill.name}`, tree)
|
|
267
267
|
})));
|
|
268
|
-
const plugins = setup.plugins === undefined ? undefined : yield* forEach(setup.plugins, (plugin) =>
|
|
268
|
+
const plugins = setup.plugins === undefined ? undefined : yield* forEach(setup.plugins, (plugin) => map7(sourceTree(directory, plugin.sources[0], `Kit ${kit} plugin ${plugin.name}`, checkouts), (tree) => ({
|
|
269
269
|
...plugin,
|
|
270
270
|
sources: [place(`plugins/${plugin.name}`, tree)]
|
|
271
271
|
})));
|
|
@@ -311,7 +311,7 @@ var importedFile = (file, specifier) => gen(function* () {
|
|
|
311
311
|
const path = yield* Path;
|
|
312
312
|
const target = path.resolve(path.dirname(file), specifier);
|
|
313
313
|
for (const candidate of [target, `${target}.ts`, path.join(target, "kitman.config.ts")])
|
|
314
|
-
if (yield* fs.stat(candidate).pipe(
|
|
314
|
+
if (yield* fs.stat(candidate).pipe(map7((info) => info.type === "File"), orElseSucceed(() => false)))
|
|
315
315
|
return candidate;
|
|
316
316
|
return;
|
|
317
317
|
});
|
|
@@ -352,7 +352,7 @@ var kitModules = (root) => gen(function* () {
|
|
|
352
352
|
if (visited.has(file))
|
|
353
353
|
return;
|
|
354
354
|
visited.add(file);
|
|
355
|
-
const transpiled = yield* run("bun", ["build", "--no-bundle", file], root).pipe(
|
|
355
|
+
const transpiled = yield* run("bun", ["build", "--no-bundle", file], root).pipe(map7((result) => result.ok ? result.stdout : ""), orElseSucceed(() => ""));
|
|
356
356
|
for (const [, specifier] of transpiled.matchAll(/\b(?:from|import)\s*"(\.{1,2}\/[^"]+)"/gu)) {
|
|
357
357
|
const module = specifier === undefined ? undefined : yield* importedFile(file, specifier);
|
|
358
358
|
if (module === undefined || visited.has(module))
|
|
@@ -478,7 +478,7 @@ var buildKit = (directory, options = {}) => gen(function* () {
|
|
|
478
478
|
...own.schedules === undefined ? undefined : { schedules: own.schedules },
|
|
479
479
|
carried
|
|
480
480
|
}).pipe(mapError2((error) => new DeclarationsInvalid({ reason: error.message })));
|
|
481
|
-
const bundle = yield* fs.readFileString(bundleFile).pipe(
|
|
481
|
+
const bundle = yield* fs.readFileString(bundleFile).pipe(map7((text) => new TextEncoder().encode(text.replaceAll(entryName, ".kitman-build-entry.ts"))), mapError2((error) => new BundleFailed({ reason: error.message })));
|
|
482
482
|
return {
|
|
483
483
|
...identity,
|
|
484
484
|
bundle,
|
|
@@ -22,21 +22,21 @@ import {
|
|
|
22
22
|
NullOr,
|
|
23
23
|
Finite,
|
|
24
24
|
encodeUnknownJsonStringSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-07p2dcq3.js";
|
|
26
26
|
import {
|
|
27
27
|
isNumber,
|
|
28
28
|
isJsonObject,
|
|
29
29
|
isString
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-d1sqb8rt.js";
|
|
31
31
|
import {
|
|
32
|
-
|
|
32
|
+
make10,
|
|
33
33
|
runForEach,
|
|
34
34
|
compiled2
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-s5p94z8x.js";
|
|
36
36
|
import {
|
|
37
37
|
ChildProcessSpawner,
|
|
38
38
|
make3
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-p83y21hp.js";
|
|
40
40
|
|
|
41
41
|
// packages/agent-runtime/src/opencode-store.ts
|
|
42
42
|
import { lstatSync, readFileSync, realpathSync } from "fs";
|
|
@@ -170,7 +170,7 @@ var isolatedRead = (store, name, input) => gen(function* () {
|
|
|
170
170
|
const spawner = yield* ChildProcessSpawner;
|
|
171
171
|
const [command, ...args] = opencodeReaderCommand();
|
|
172
172
|
const handle = yield* spawner.spawn(make3(command, args, {
|
|
173
|
-
stdin:
|
|
173
|
+
stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
|
|
174
174
|
stderr: "ignore",
|
|
175
175
|
extendEnv: false,
|
|
176
176
|
env: {},
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
opaqueTunnelRefusal2,
|
|
5
5
|
isOpaqueConnectReason2,
|
|
6
6
|
runSrtStep2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-cgjyv52e.js";
|
|
8
|
+
import"./chunk-qrxkpwzy.js";
|
|
9
|
+
import"./chunk-d1sqb8rt.js";
|
|
10
|
+
import"./chunk-07p2dcq3.js";
|
|
11
11
|
export {
|
|
12
12
|
isOpaqueConnectReason2 as isOpaqueConnectReason,
|
|
13
13
|
opaqueTunnelRefusal2 as opaqueTunnelRefusal,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
never,
|
|
20
20
|
flatMap3,
|
|
21
21
|
andThen2,
|
|
22
|
-
|
|
22
|
+
map7,
|
|
23
23
|
raceFirst,
|
|
24
24
|
scoped
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-07p2dcq3.js";
|
|
26
26
|
import {
|
|
27
27
|
unwrap,
|
|
28
28
|
drainFork,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
runCollect,
|
|
32
32
|
runDrain,
|
|
33
33
|
mkString
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-s5p94z8x.js";
|
|
35
35
|
|
|
36
36
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
|
|
37
37
|
var redactedRegistry = /* @__PURE__ */ new WeakMap;
|
|
@@ -102,7 +102,7 @@ var makeHandle = (params) => Object.setPrototypeOf({
|
|
|
102
102
|
...params
|
|
103
103
|
}, HandleProto);
|
|
104
104
|
var make2 = (spawn) => {
|
|
105
|
-
const streamString = (command, options) => spawn(command).pipe(
|
|
105
|
+
const streamString = (command, options) => spawn(command).pipe(map7((handle) => decodeText(options?.includeStderr === true ? handle.all : drainFork(handle.stdout, handle.stderr))), unwrap);
|
|
106
106
|
const streamLines = (command, options) => splitLines(streamString(command, options));
|
|
107
107
|
return ChildProcessSpawner.of({
|
|
108
108
|
spawn,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isMinLength,
|
|
19
19
|
isMaxLength,
|
|
20
20
|
FiniteFromString
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-07p2dcq3.js";
|
|
22
22
|
|
|
23
23
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/JsonSchema.js
|
|
24
24
|
var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];
|