@kitman-sh/cli 0.12.8 → 0.12.10
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-bh9k3kty.js → chunk-05sytbsa.js} +55 -55
- package/dist/{chunk-c8wpw9nh.js → chunk-0h49y8gf.js} +214 -65
- package/dist/{chunk-gyek54h3.js → chunk-4gy4ty6k.js} +8 -8
- package/dist/{chunk-cr3qw0xf.js → chunk-4w0c1ykv.js} +381 -297
- package/dist/{chunk-j1cnq2j0.js → chunk-5zhh41gb.js} +4 -4
- package/dist/{chunk-kzwdhdej.js → chunk-5zth85pj.js} +2 -2
- package/dist/{chunk-tgwa9vqw.js → chunk-7afnkx5b.js} +6 -6
- package/dist/{chunk-xng6j3a8.js → chunk-7hb5jp84.js} +1 -1
- package/dist/{chunk-n9351czb.js → chunk-azfjx5d8.js} +7 -7
- package/dist/{chunk-31gpnkq3.js → chunk-cbpb2rww.js} +5 -5
- package/dist/{chunk-pjpfc3sd.js → chunk-cmrvjdff.js} +1 -1
- package/dist/{chunk-9qp59fht.js → chunk-en5mb363.js} +32 -32
- package/dist/{chunk-wcvfkdwd.js → chunk-fr79hgq2.js} +24 -24
- package/dist/{chunk-cw61zyh5.js → chunk-gq7y5v3e.js} +1 -1
- package/dist/{chunk-jwrs9pfa.js → chunk-gwnyxm1r.js} +107 -107
- package/dist/{chunk-3x6cbhzd.js → chunk-gxbcvd4q.js} +4 -4
- package/dist/{chunk-fh58za51.js → chunk-gy9rf14f.js} +3 -3
- package/dist/{chunk-c8hwfktd.js → chunk-jn7w2ntt.js} +7 -7
- package/dist/{chunk-6d53ezj1.js → chunk-mtkstrh3.js} +4 -4
- package/dist/{chunk-6w7ajkm8.js → chunk-nb1x1swa.js} +25 -25
- package/dist/{chunk-0tjg9eya.js → chunk-q5w3v4k1.js} +1 -1
- package/dist/{chunk-93ypzdpa.js → chunk-vkg40ysx.js} +7 -7
- package/dist/{chunk-z5f7g1w1.js → chunk-y1krmnbv.js} +2 -2
- package/dist/{chunk-s5pzy86v.js → chunk-ywzxwgrz.js} +6 -6
- package/dist/{chunk-qjqa338f.js → chunk-zw3gf6r5.js} +94 -333
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-mtkstrh3.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-4w0c1ykv.js";
|
|
16
|
+
import"./chunk-0h49y8gf.js";
|
|
17
|
+
import"./chunk-zw3gf6r5.js";
|
|
18
18
|
export {
|
|
19
19
|
HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
|
|
20
20
|
HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
opaqueTunnelRefusal2,
|
|
5
5
|
isOpaqueConnectReason2,
|
|
6
6
|
runSrtStep2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-y1krmnbv.js";
|
|
8
|
+
import"./chunk-q5w3v4k1.js";
|
|
9
|
+
import"./chunk-zw3gf6r5.js";
|
|
10
10
|
export {
|
|
11
11
|
isOpaqueConnectReason2 as isOpaqueConnectReason,
|
|
12
12
|
opaqueTunnelRefusal2 as opaqueTunnelRefusal,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
fail7,
|
|
12
12
|
flatMap3,
|
|
13
13
|
exit,
|
|
14
|
-
|
|
14
|
+
map8,
|
|
15
15
|
as,
|
|
16
16
|
catch_,
|
|
17
17
|
catchReason,
|
|
@@ -25,21 +25,21 @@ import {
|
|
|
25
25
|
isString2,
|
|
26
26
|
encodePrettyJsonString,
|
|
27
27
|
decodeJsonStringSync
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-zw3gf6r5.js";
|
|
29
29
|
import {
|
|
30
30
|
FileSystem,
|
|
31
31
|
Path,
|
|
32
32
|
optionalEnv,
|
|
33
33
|
tempDirectoryScoped
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-0h49y8gf.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4w0c1ykv.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-azfjx5d8.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -123,7 +123,7 @@ function manifestSkillPaths(manifest) {
|
|
|
123
123
|
return isString2(item.skillPath) ? [item.skillPath] : [];
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
|
-
var readManifestSkillPaths2 = (manifestPath) =>
|
|
126
|
+
var readManifestSkillPaths2 = (manifestPath) => map8(readExistingText(manifestPath), (text) => manifestSkillPaths(parseJsonObject(text)));
|
|
127
127
|
var managedManifestPathForConfig = (paths, file) => gen(function* () {
|
|
128
128
|
const fs = yield* FileSystem;
|
|
129
129
|
const manifestRoot = managedManifestRootPath(paths, file);
|
|
@@ -944,7 +944,7 @@ var resolveGitSource = (subject, source, input) => gen(function* () {
|
|
|
944
944
|
const resolver = yield* SourceResolver;
|
|
945
945
|
const latest = input.versions === "latest";
|
|
946
946
|
const ref = latest ? undefined : source.ref;
|
|
947
|
-
const resolved = (isCommitHash(ref) ? succeed6(ref) : resolver.gitCommit(source.url, ref)).pipe(
|
|
947
|
+
const resolved = (isCommitHash(ref) ? succeed6(ref) : resolver.gitCommit(source.url, ref)).pipe(map8((commit) => ({ commit })), catch_((error) => succeed6({
|
|
948
948
|
problem: `Kitman could not resolve ${subject} from ${source.url}${ref === undefined ? "" : ` at ${ref}`}: ${error.message}`
|
|
949
949
|
})));
|
|
950
950
|
if (input.requireReviewedSources !== true)
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
never,
|
|
20
20
|
flatMap3,
|
|
21
21
|
andThen2,
|
|
22
|
-
|
|
22
|
+
map8,
|
|
23
23
|
raceFirst,
|
|
24
24
|
scoped
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-zw3gf6r5.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-0h49y8gf.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(map8((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,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
gen,
|
|
11
11
|
fail7,
|
|
12
12
|
flatMap3,
|
|
13
|
-
|
|
13
|
+
map8,
|
|
14
14
|
catchTags,
|
|
15
15
|
mapError2,
|
|
16
16
|
orDie,
|
|
@@ -32,16 +32,8 @@ import {
|
|
|
32
32
|
toCodecJson,
|
|
33
33
|
Json,
|
|
34
34
|
encodePrettyJsonString
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import"./chunk-
|
|
37
|
-
import {
|
|
38
|
-
decodeText,
|
|
39
|
-
mkString,
|
|
40
|
-
FileSystem,
|
|
41
|
-
Path,
|
|
42
|
-
withDefault,
|
|
43
|
-
String2
|
|
44
|
-
} from "./chunk-c8wpw9nh.js";
|
|
35
|
+
} from "./chunk-zw3gf6r5.js";
|
|
36
|
+
import"./chunk-q5w3v4k1.js";
|
|
45
37
|
import {
|
|
46
38
|
SecureRandom,
|
|
47
39
|
layerWebCrypto,
|
|
@@ -53,23 +45,31 @@ import {
|
|
|
53
45
|
layer4,
|
|
54
46
|
kitmanMcpServer,
|
|
55
47
|
RunnerRpcProtocolVersion
|
|
56
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-4w0c1ykv.js";
|
|
49
|
+
import {
|
|
50
|
+
decodeText,
|
|
51
|
+
mkString,
|
|
52
|
+
FileSystem,
|
|
53
|
+
Path,
|
|
54
|
+
withDefault,
|
|
55
|
+
String2
|
|
56
|
+
} from "./chunk-0h49y8gf.js";
|
|
57
57
|
import {
|
|
58
58
|
Packument,
|
|
59
59
|
tarballMatches
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import"./chunk-
|
|
60
|
+
} from "./chunk-azfjx5d8.js";
|
|
61
|
+
import"./chunk-7afnkx5b.js";
|
|
62
62
|
import {
|
|
63
63
|
AgentDeclaration,
|
|
64
64
|
KitDeclarations,
|
|
65
65
|
describeFlag,
|
|
66
66
|
Described
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-4gy4ty6k.js";
|
|
68
68
|
import {
|
|
69
69
|
ChildProcessSpawner,
|
|
70
70
|
make3
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import"./chunk-
|
|
71
|
+
} from "./chunk-mtkstrh3.js";
|
|
72
|
+
import"./chunk-fr79hgq2.js";
|
|
73
73
|
|
|
74
74
|
// packages/sdk/src/build/index.ts
|
|
75
75
|
class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
|
|
@@ -118,7 +118,7 @@ var run = (command, args, cwd) => gen(function* () {
|
|
|
118
118
|
}).pipe(scoped);
|
|
119
119
|
var failure = (result) => (result.stderr.trim() || result.stdout.trim()).slice(-2000);
|
|
120
120
|
var provenance = (directory) => gen(function* () {
|
|
121
|
-
const git = (...args) => run("git", args, directory).pipe(
|
|
121
|
+
const git = (...args) => run("git", args, directory).pipe(map8((result) => result.ok ? result.stdout.trim() : undefined), orElseSucceed(() => {
|
|
122
122
|
return;
|
|
123
123
|
}));
|
|
124
124
|
const repository = yield* git("remote", "get-url", "origin");
|
|
@@ -144,7 +144,7 @@ var readText = (directory, text, what) => gen(function* () {
|
|
|
144
144
|
const file = yield* inKit(directory, text.file, what);
|
|
145
145
|
return yield* fs.readFileString(file).pipe(mapError2(() => new DeclarationsInvalid({ reason: `${what} ${text.file} does not read` })));
|
|
146
146
|
});
|
|
147
|
-
var readAgents = (directory, agents) => forEach(Object.entries(agents), ([id, { instructions, ...agent }]) => instructions === undefined ? succeed6([id, agent]) :
|
|
147
|
+
var readAgents = (directory, agents) => forEach(Object.entries(agents), ([id, { instructions, ...agent }]) => instructions === undefined ? succeed6([id, agent]) : map8(readText(directory, instructions, `Agent "${id}" instructions`), (text) => [id, { ...agent, instructions: text.trim() }])).pipe(map8(Object.fromEntries));
|
|
148
148
|
var utf8 = new TextDecoder("utf-8", { fatal: true });
|
|
149
149
|
var setupFile = (bytes) => {
|
|
150
150
|
try {
|
|
@@ -219,7 +219,7 @@ var fetchNpm = (name, wanted, what) => gen(function* () {
|
|
|
219
219
|
const dist = packument.versions[packument["dist-tags"][wanted] ?? wanted]?.dist;
|
|
220
220
|
if (dist === undefined)
|
|
221
221
|
return yield* failed("npm has no such version or dist-tag");
|
|
222
|
-
const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer),
|
|
222
|
+
const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer), map8((buffer) => new Uint8Array(buffer)), mapError2((error) => failed(error.message)));
|
|
223
223
|
if (!tarballMatches(tarball, dist))
|
|
224
224
|
return yield* failed(`the tarball does not match its integrity ${dist.integrity ?? `sha1 ${dist.shasum}`}`);
|
|
225
225
|
const directory = yield* fs.makeTempDirectoryScoped({ prefix: "kitman-npm-" });
|
|
@@ -260,11 +260,11 @@ var setupArchive = (directory, kit, setup, checkouts) => gen(function* () {
|
|
|
260
260
|
const file = yield* inKit(directory, setup.instructions, what);
|
|
261
261
|
files["instructions.md"] = setupFile(yield* fs.readFile(file).pipe(mapError2(() => new DeclarationsInvalid({ reason: `${what} do not read` }))));
|
|
262
262
|
}
|
|
263
|
-
const skills = setup.skills === undefined ? undefined : yield* forEach(setup.skills, (skill) =>
|
|
263
|
+
const skills = setup.skills === undefined ? undefined : yield* forEach(setup.skills, (skill) => map8(sourceTree(directory, skill.source, `Kit ${kit} skill ${skill.name}`, checkouts), (tree) => ({
|
|
264
264
|
...skill,
|
|
265
265
|
source: place(`skills/${skill.name}`, tree)
|
|
266
266
|
})));
|
|
267
|
-
const plugins = setup.plugins === undefined ? undefined : yield* forEach(setup.plugins, (plugin) =>
|
|
267
|
+
const plugins = setup.plugins === undefined ? undefined : yield* forEach(setup.plugins, (plugin) => map8(sourceTree(directory, plugin.sources[0], `Kit ${kit} plugin ${plugin.name}`, checkouts), (tree) => ({
|
|
268
268
|
...plugin,
|
|
269
269
|
sources: [place(`plugins/${plugin.name}`, tree)]
|
|
270
270
|
})));
|
|
@@ -310,7 +310,7 @@ var importedFile = (file, specifier) => gen(function* () {
|
|
|
310
310
|
const path = yield* Path;
|
|
311
311
|
const target = path.resolve(path.dirname(file), specifier);
|
|
312
312
|
for (const candidate of [target, `${target}.ts`, path.join(target, "kitman.config.ts")])
|
|
313
|
-
if (yield* fs.stat(candidate).pipe(
|
|
313
|
+
if (yield* fs.stat(candidate).pipe(map8((info) => info.type === "File"), orElseSucceed(() => false)))
|
|
314
314
|
return candidate;
|
|
315
315
|
return;
|
|
316
316
|
});
|
|
@@ -351,7 +351,7 @@ var kitModules = (root) => gen(function* () {
|
|
|
351
351
|
if (visited.has(file))
|
|
352
352
|
return;
|
|
353
353
|
visited.add(file);
|
|
354
|
-
const transpiled = yield* run("bun", ["build", "--no-bundle", file], root).pipe(
|
|
354
|
+
const transpiled = yield* run("bun", ["build", "--no-bundle", file], root).pipe(map8((result) => result.ok ? result.stdout : ""), orElseSucceed(() => ""));
|
|
355
355
|
for (const [, specifier] of transpiled.matchAll(/\b(?:from|import)\s*"(\.{1,2}\/[^"]+)"/gu)) {
|
|
356
356
|
const module = specifier === undefined ? undefined : yield* importedFile(file, specifier);
|
|
357
357
|
if (module === undefined || visited.has(module))
|
|
@@ -477,7 +477,7 @@ var buildKit = (directory, options = {}) => gen(function* () {
|
|
|
477
477
|
...own.schedules === undefined ? undefined : { schedules: own.schedules },
|
|
478
478
|
carried
|
|
479
479
|
}).pipe(mapError2((error) => new DeclarationsInvalid({ reason: error.message })));
|
|
480
|
-
const bundle = yield* fs.readFileString(bundleFile).pipe(
|
|
480
|
+
const bundle = yield* fs.readFileString(bundleFile).pipe(map8((text) => new TextEncoder().encode(text.replaceAll(entryName, ".kitman-build-entry.ts"))), mapError2((error) => new BundleFailed({ reason: error.message })));
|
|
481
481
|
return {
|
|
482
482
|
...identity,
|
|
483
483
|
bundle,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isMinLength,
|
|
19
19
|
isMaxLength,
|
|
20
20
|
FiniteFromString
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-zw3gf6r5.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"];
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
isJsonObject,
|
|
14
14
|
decodeJsonString,
|
|
15
15
|
encodePrettyJsonString
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import"./chunk-
|
|
16
|
+
} from "./chunk-zw3gf6r5.js";
|
|
17
|
+
import"./chunk-q5w3v4k1.js";
|
|
18
18
|
import {
|
|
19
19
|
FileSystem,
|
|
20
20
|
Path
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-0h49y8gf.js";
|
|
22
22
|
import {
|
|
23
23
|
tomlTableHeader2,
|
|
24
24
|
tomlKeyPath2,
|
|
25
25
|
kitmanSkillEntry,
|
|
26
26
|
isPathWithin2
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-jn7w2ntt.js";
|
|
28
28
|
import {
|
|
29
29
|
instructionsStart,
|
|
30
30
|
instructionsEnd,
|
|
31
31
|
renderMcpServer,
|
|
32
32
|
materializeKitSetup,
|
|
33
33
|
tomlInline
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
34
|
+
} from "./chunk-4w0c1ykv.js";
|
|
35
|
+
import"./chunk-azfjx5d8.js";
|
|
36
|
+
import"./chunk-mtkstrh3.js";
|
|
37
37
|
|
|
38
38
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
39
39
|
class KitSyncError extends TaggedError("KitSyncError") {
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
ArraySchema,
|
|
14
14
|
decodeJsonStringOption,
|
|
15
15
|
encodeUnknownJsonStringSync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-zw3gf6r5.js";
|
|
17
17
|
import {
|
|
18
18
|
replaceSecretReferences,
|
|
19
19
|
secretReferencesIn
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-q5w3v4k1.js";
|
|
21
21
|
|
|
22
22
|
// packages/agent-runtime/src/srt-step.ts
|
|
23
23
|
import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2,
|
|
6
6
|
makeProgramRpcClient2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-7afnkx5b.js";
|
|
8
|
+
import"./chunk-fr79hgq2.js";
|
|
9
|
+
import"./chunk-4w0c1ykv.js";
|
|
10
|
+
import"./chunk-q5w3v4k1.js";
|
|
11
|
+
import"./chunk-0h49y8gf.js";
|
|
12
|
+
import"./chunk-zw3gf6r5.js";
|
|
13
13
|
export {
|
|
14
14
|
makeProgramRpcClient2 as makeProgramRpcClient,
|
|
15
15
|
makeRunnerRpcClient2 as makeRunnerRpcClient,
|