@kitman-sh/cli 0.13.9 → 0.13.11

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.
Files changed (27) hide show
  1. package/dist/{chunk-aezq3fyy.js → chunk-0h49y8gf.js} +214 -74
  2. package/dist/{chunk-a44ebqzx.js → chunk-3rkhx6gq.js} +6 -6
  3. package/dist/{chunk-qkjfx2ts.js → chunk-5an78wy8.js} +14 -14
  4. package/dist/{chunk-ezv4p0zr.js → chunk-5zhh41gb.js} +4 -4
  5. package/dist/{chunk-53qp6kcp.js → chunk-5zth85pj.js} +2 -2
  6. package/dist/{chunk-v190zzc5.js → chunk-7rpd6a98.js} +1 -1
  7. package/dist/{chunk-69fcvx7d.js → chunk-acneym1p.js} +65 -45
  8. package/dist/{chunk-tspf987k.js → chunk-cbpb2rww.js} +8 -8
  9. package/dist/{chunk-9gg1w4aa.js → chunk-dtkejy3r.js} +377 -283
  10. package/dist/{chunk-rz18qefg.js → chunk-fcb6skhx.js} +10 -10
  11. package/dist/{chunk-cw61zyh5.js → chunk-gq7y5v3e.js} +1 -1
  12. package/dist/{chunk-fh58za51.js → chunk-gy9rf14f.js} +3 -3
  13. package/dist/{chunk-ksgt1tdc.js → chunk-h7mnz0w3.js} +4 -4
  14. package/dist/{chunk-pj3mer60.js → chunk-j48k8j8y.js} +4 -4
  15. package/dist/{chunk-s63fjc69.js → chunk-jyq4790r.js} +25 -25
  16. package/dist/{chunk-0wj65j5e.js → chunk-krqb80g6.js} +12 -12
  17. package/dist/{chunk-kq88aaa3.js → chunk-mtkstrh3.js} +4 -4
  18. package/dist/{chunk-x8sewxzm.js → chunk-mx3zt8v8.js} +145 -145
  19. package/dist/{chunk-wzr1n3zy.js → chunk-p0vqjc0n.js} +26 -6
  20. package/dist/{chunk-hezxa6q5.js → chunk-p8fhxfa0.js} +7 -7
  21. package/dist/{chunk-0tjg9eya.js → chunk-q5w3v4k1.js} +1 -1
  22. package/dist/{chunk-6jtjcvnc.js → chunk-rh9g6sef.js} +44 -44
  23. package/dist/{chunk-1ht6jwzm.js → chunk-xzfj61cp.js} +11 -11
  24. package/dist/{chunk-z5f7g1w1.js → chunk-y1krmnbv.js} +2 -2
  25. package/dist/{chunk-qjqa338f.js → chunk-zw3gf6r5.js} +94 -333
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -1,8 +1,4 @@
1
1
  // @bun
2
- import {
3
- FileSystem,
4
- Path
5
- } from "./chunk-aezq3fyy.js";
6
2
  import {
7
3
  isObject,
8
4
  isUint8Array,
@@ -17,23 +13,27 @@ import {
17
13
  isJsonObject,
18
14
  decodeJsonString,
19
15
  encodePrettyJsonString
20
- } from "./chunk-qjqa338f.js";
21
- import"./chunk-0tjg9eya.js";
16
+ } from "./chunk-zw3gf6r5.js";
17
+ import"./chunk-q5w3v4k1.js";
18
+ import {
19
+ FileSystem,
20
+ Path
21
+ } from "./chunk-0h49y8gf.js";
22
22
  import {
23
23
  tomlTableHeader2,
24
24
  tomlKeyPath2,
25
25
  kitmanSkillEntry,
26
26
  isPathWithin2
27
- } from "./chunk-0wj65j5e.js";
27
+ } from "./chunk-krqb80g6.js";
28
28
  import {
29
29
  instructionsStart,
30
30
  instructionsEnd,
31
31
  renderMcpServer,
32
32
  materializeKitSetup,
33
33
  tomlInline
34
- } from "./chunk-9gg1w4aa.js";
35
- import"./chunk-hezxa6q5.js";
36
- import"./chunk-kq88aaa3.js";
34
+ } from "./chunk-dtkejy3r.js";
35
+ import"./chunk-p8fhxfa0.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") {
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-qjqa338f.js";
6
+ } from "./chunk-zw3gf6r5.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -4,9 +4,9 @@ import {
4
4
  opaqueTunnelRefusal2,
5
5
  isOpaqueConnectReason2,
6
6
  runSrtStep2
7
- } from "./chunk-z5f7g1w1.js";
8
- import"./chunk-0tjg9eya.js";
9
- import"./chunk-qjqa338f.js";
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,
@@ -6,10 +6,10 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-qjqa338f.js";
9
+ } from "./chunk-zw3gf6r5.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-aezq3fyy.js";
12
+ } from "./chunk-0h49y8gf.js";
13
13
  import {
14
14
  WebSocketConstructor,
15
15
  layerWebSocketConstructorGlobal,
@@ -19,13 +19,13 @@ import {
19
19
  RunnerReplicaRpcs,
20
20
  RunnerRunFileRpcs,
21
21
  ProgramRpcs
22
- } from "./chunk-9gg1w4aa.js";
22
+ } from "./chunk-dtkejy3r.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-qkjfx2ts.js";
28
+ } from "./chunk-5an78wy8.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-kq88aaa3.js";
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-9gg1w4aa.js";
16
- import"./chunk-aezq3fyy.js";
17
- import"./chunk-qjqa338f.js";
15
+ } from "./chunk-dtkejy3r.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,
@@ -1,12 +1,4 @@
1
1
  // @bun
2
- import {
3
- decodeText,
4
- mkString,
5
- FileSystem,
6
- Path,
7
- withDefault,
8
- String2
9
- } from "./chunk-aezq3fyy.js";
10
2
  import {
11
3
  isString,
12
4
  hasProperty,
@@ -18,7 +10,7 @@ import {
18
10
  gen,
19
11
  fail7,
20
12
  flatMap3,
21
- map7,
13
+ map8,
22
14
  catchTags,
23
15
  mapError2,
24
16
  orDie,
@@ -40,8 +32,8 @@ import {
40
32
  toCodecJson,
41
33
  Json,
42
34
  encodePrettyJsonString
43
- } from "./chunk-qjqa338f.js";
44
- import"./chunk-0tjg9eya.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-9gg1w4aa.js";
48
+ } from "./chunk-dtkejy3r.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-hezxa6q5.js";
61
- import"./chunk-ksgt1tdc.js";
60
+ } from "./chunk-p8fhxfa0.js";
61
+ import"./chunk-h7mnz0w3.js";
62
62
  import {
63
63
  AgentDeclaration,
64
64
  KitDeclarations,
65
65
  describeFlag,
66
66
  Described
67
- } from "./chunk-1ht6jwzm.js";
67
+ } from "./chunk-xzfj61cp.js";
68
68
  import {
69
69
  ChildProcessSpawner,
70
70
  make3
71
- } from "./chunk-kq88aaa3.js";
72
- import"./chunk-qkjfx2ts.js";
71
+ } from "./chunk-mtkstrh3.js";
72
+ import"./chunk-5an78wy8.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(map7((result) => result.ok ? result.stdout.trim() : undefined), orElseSucceed(() => {
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]) : map7(readText(directory, instructions, `Agent "${id}" instructions`), (text) => [id, { ...agent, instructions: text.trim() }])).pipe(map7(Object.fromEntries));
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), map7((buffer) => new Uint8Array(buffer)), mapError2((error) => failed(error.message)));
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) => map7(sourceTree(directory, skill.source, `Kit ${kit} skill ${skill.name}`, checkouts), (tree) => ({
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) => map7(sourceTree(directory, plugin.sources[0], `Kit ${kit} plugin ${plugin.name}`, checkouts), (tree) => ({
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(map7((info) => info.type === "File"), orElseSucceed(() => false)))
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(map7((result) => result.ok ? result.stdout : ""), orElseSucceed(() => ""));
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(map7((text) => new TextEncoder().encode(text.replaceAll(entryName, ".kitman-build-entry.ts"))), mapError2((error) => new BundleFailed({ reason: error.message })));
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,
@@ -1,10 +1,4 @@
1
1
  // @bun
2
- import {
3
- FileSystem,
4
- Path,
5
- optionalEnv,
6
- tempDirectoryScoped
7
- } from "./chunk-aezq3fyy.js";
8
2
  import {
9
3
  Reference,
10
4
  TaggedError,
@@ -17,7 +11,7 @@ import {
17
11
  fail7,
18
12
  flatMap3,
19
13
  exit,
20
- map7,
14
+ map8,
21
15
  as,
22
16
  catch_,
23
17
  catchReason,
@@ -31,15 +25,21 @@ import {
31
25
  isString2,
32
26
  encodePrettyJsonString,
33
27
  decodeJsonStringSync
34
- } from "./chunk-qjqa338f.js";
28
+ } from "./chunk-zw3gf6r5.js";
29
+ import {
30
+ FileSystem,
31
+ Path,
32
+ optionalEnv,
33
+ tempDirectoryScoped
34
+ } from "./chunk-0h49y8gf.js";
35
35
  import {
36
36
  AgentHarnessIds,
37
37
  sha2562,
38
38
  runCommand2
39
- } from "./chunk-9gg1w4aa.js";
39
+ } from "./chunk-dtkejy3r.js";
40
40
  import {
41
41
  NpmRegistry
42
- } from "./chunk-hezxa6q5.js";
42
+ } from "./chunk-p8fhxfa0.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) => map7(readExistingText(manifestPath), (text) => manifestSkillPaths(parseJsonObject(text)));
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(map7((commit) => ({ commit })), catch_((error) => succeed6({
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
- map7,
22
+ map8,
23
23
  raceFirst,
24
24
  scoped
25
- } from "./chunk-qjqa338f.js";
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-aezq3fyy.js";
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(map7((handle) => decodeText(options?.includeStderr === true ? handle.all : drainFork(handle.stdout, handle.stderr))), unwrap);
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,