@kitman-sh/cli 0.10.98 → 0.10.99

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 (26) hide show
  1. package/dist/{chunk-g1xmj2nb.js → chunk-0a10kdrd.js} +4 -4
  2. package/dist/{chunk-aba9zdpb.js → chunk-0hjtwtms.js} +59 -34
  3. package/dist/{chunk-7c3pgktm.js → chunk-0tsc91qr.js} +8 -8
  4. package/dist/{chunk-sy8d7bfa.js → chunk-2fs34341.js} +111 -105
  5. package/dist/{chunk-797w5qe6.js → chunk-3ka78n56.js} +7 -7
  6. package/dist/{chunk-p83y21hp.js → chunk-3r7ahnwy.js} +4 -4
  7. package/dist/{chunk-6dc0x5cg.js → chunk-3v70x040.js} +8 -8
  8. package/dist/{chunk-fd39ch4n.js → chunk-4sswz0mn.js} +8 -8
  9. package/dist/{chunk-95mkdtzk.js → chunk-56e202xk.js} +6 -6
  10. package/dist/{chunk-j8vq6sk1.js → chunk-6vmpa1nw.js} +19 -19
  11. package/dist/{chunk-7ya2q09c.js → chunk-a244myqw.js} +1 -1
  12. package/dist/{chunk-gfqm22x7.js → chunk-abf4m4b2.js} +5 -5
  13. package/dist/{chunk-07p2dcq3.js → chunk-ampzxrqe.js} +94 -333
  14. package/dist/{chunk-d1sqb8rt.js → chunk-bk3dpjxq.js} +1 -1
  15. package/dist/{chunk-qrxkpwzy.js → chunk-et6qa95h.js} +1 -1
  16. package/dist/{chunk-cgjyv52e.js → chunk-fv6kgtze.js} +2 -2
  17. package/dist/{chunk-xwhybbj2.js → chunk-g3r5xp0t.js} +2 -2
  18. package/dist/{chunk-3bjekzn7.js → chunk-k0shg2fb.js} +485 -333
  19. package/dist/{chunk-nym2zmz3.js → chunk-rdv42ygn.js} +4 -4
  20. package/dist/{chunk-bqg9gy2e.js → chunk-rp224rm4.js} +7 -7
  21. package/dist/{chunk-s90hj0mb.js → chunk-rrj434w6.js} +361 -133
  22. package/dist/{chunk-n8c1wh6t.js → chunk-t7ncjd6s.js} +6 -6
  23. package/dist/{chunk-s5p94z8x.js → chunk-vjcn82g3.js} +214 -65
  24. package/dist/{chunk-c6h3fhtb.js → chunk-z2f9enrp.js} +24 -24
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -4,13 +4,13 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-95mkdtzk.js";
8
- import"./chunk-c6h3fhtb.js";
9
- import"./chunk-3bjekzn7.js";
10
- import"./chunk-qrxkpwzy.js";
11
- import"./chunk-d1sqb8rt.js";
12
- import"./chunk-s5p94z8x.js";
13
- import"./chunk-07p2dcq3.js";
7
+ } from "./chunk-56e202xk.js";
8
+ import"./chunk-z2f9enrp.js";
9
+ import"./chunk-k0shg2fb.js";
10
+ import"./chunk-et6qa95h.js";
11
+ import"./chunk-bk3dpjxq.js";
12
+ import"./chunk-vjcn82g3.js";
13
+ import"./chunk-ampzxrqe.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
16
16
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -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-07p2dcq3.js";
25
+ } from "./chunk-ampzxrqe.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-s5p94z8x.js";
34
+ } from "./chunk-vjcn82g3.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,
@@ -11,7 +11,7 @@ import {
11
11
  fail7,
12
12
  flatMap3,
13
13
  exit,
14
- map7,
14
+ map8,
15
15
  as,
16
16
  catch_,
17
17
  catchReason,
@@ -23,24 +23,24 @@ import {
23
23
  fnUntraced,
24
24
  encodePrettyJsonString,
25
25
  decodeJsonStringSync
26
- } from "./chunk-07p2dcq3.js";
26
+ } from "./chunk-ampzxrqe.js";
27
27
  import {
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-d1sqb8rt.js";
30
+ } from "./chunk-bk3dpjxq.js";
31
31
  import {
32
32
  FileSystem,
33
33
  Path,
34
34
  optionalEnv
35
- } from "./chunk-s5p94z8x.js";
35
+ } from "./chunk-vjcn82g3.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-3bjekzn7.js";
40
+ } from "./chunk-k0shg2fb.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-bqg9gy2e.js";
43
+ } from "./chunk-rp224rm4.js";
44
44
 
45
45
  // packages/agent-runtime/src/config-convergence.ts
46
46
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -124,7 +124,7 @@ function manifestSkillPaths(manifest) {
124
124
  return isString(item.skillPath) ? [item.skillPath] : [];
125
125
  }));
126
126
  }
127
- var readManifestSkillPaths2 = (manifestPath) => map7(readExistingText(manifestPath), (text) => manifestSkillPaths(parseJsonObject(text)));
127
+ var readManifestSkillPaths2 = (manifestPath) => map8(readExistingText(manifestPath), (text) => manifestSkillPaths(parseJsonObject(text)));
128
128
  var managedManifestPathForConfig = (paths, file) => gen(function* () {
129
129
  const fs = yield* FileSystem;
130
130
  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)
@@ -12,30 +12,30 @@ import {
12
12
  orElseSucceed,
13
13
  decodeJsonString,
14
14
  encodePrettyJsonString
15
- } from "./chunk-07p2dcq3.js";
16
- import"./chunk-qrxkpwzy.js";
15
+ } from "./chunk-ampzxrqe.js";
16
+ import"./chunk-et6qa95h.js";
17
17
  import {
18
18
  isJsonObject
19
- } from "./chunk-d1sqb8rt.js";
19
+ } from "./chunk-bk3dpjxq.js";
20
20
  import {
21
21
  FileSystem,
22
22
  Path
23
- } from "./chunk-s5p94z8x.js";
23
+ } from "./chunk-vjcn82g3.js";
24
24
  import {
25
25
  tomlTableHeader2,
26
26
  tomlKeyPath2,
27
27
  kitmanSkillEntry,
28
28
  isPathWithin2
29
- } from "./chunk-6dc0x5cg.js";
29
+ } from "./chunk-3v70x040.js";
30
30
  import {
31
31
  instructionsStart,
32
32
  instructionsEnd,
33
33
  renderMcpServer,
34
34
  materializeKitSetup,
35
35
  tomlInline
36
- } from "./chunk-3bjekzn7.js";
37
- import"./chunk-bqg9gy2e.js";
38
- import"./chunk-p83y21hp.js";
36
+ } from "./chunk-k0shg2fb.js";
37
+ import"./chunk-rp224rm4.js";
38
+ import"./chunk-3r7ahnwy.js";
39
39
 
40
40
  // packages/agent-runtime/src/kit-setup-sync.ts
41
41
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -6,7 +6,10 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-07p2dcq3.js";
9
+ } from "./chunk-ampzxrqe.js";
10
+ import {
11
+ runForEach
12
+ } from "./chunk-vjcn82g3.js";
10
13
  import {
11
14
  WebSocketConstructor,
12
15
  layerWebSocketConstructorGlobal,
@@ -16,16 +19,13 @@ import {
16
19
  RunnerReplicaRpcs,
17
20
  RunnerRunFileRpcs,
18
21
  ProgramRpcs
19
- } from "./chunk-3bjekzn7.js";
20
- import {
21
- runForEach
22
- } from "./chunk-s5p94z8x.js";
22
+ } from "./chunk-k0shg2fb.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-c6h3fhtb.js";
28
+ } from "./chunk-z2f9enrp.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -10,7 +10,7 @@ import {
10
10
  gen,
11
11
  fail7,
12
12
  flatMap3,
13
- map7,
13
+ map8,
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-07p2dcq3.js";
36
- import"./chunk-qrxkpwzy.js";
37
- import"./chunk-d1sqb8rt.js";
35
+ } from "./chunk-ampzxrqe.js";
36
+ import"./chunk-et6qa95h.js";
37
+ import"./chunk-bk3dpjxq.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-3bjekzn7.js";
49
+ } from "./chunk-k0shg2fb.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-s5p94z8x.js";
57
+ } from "./chunk-vjcn82g3.js";
58
58
  import {
59
59
  Packument,
60
60
  tarballMatches
61
- } from "./chunk-bqg9gy2e.js";
62
- import"./chunk-95mkdtzk.js";
61
+ } from "./chunk-rp224rm4.js";
62
+ import"./chunk-56e202xk.js";
63
63
  import {
64
64
  AgentDeclaration,
65
65
  KitDeclarations,
66
66
  describeFlag,
67
67
  Described
68
- } from "./chunk-7c3pgktm.js";
68
+ } from "./chunk-0tsc91qr.js";
69
69
  import {
70
70
  ChildProcessSpawner,
71
71
  make3
72
- } from "./chunk-p83y21hp.js";
73
- import"./chunk-c6h3fhtb.js";
72
+ } from "./chunk-3r7ahnwy.js";
73
+ import"./chunk-z2f9enrp.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(map7((result) => result.ok ? result.stdout.trim() : undefined), orElseSucceed(() => {
122
+ const git = (...args) => run("git", args, directory).pipe(map8((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]) : map7(readText(directory, instructions, `Agent "${id}" instructions`), (text) => [id, { ...agent, instructions: text.trim() }])).pipe(map7(Object.fromEntries));
148
+ 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));
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), map7((buffer) => new Uint8Array(buffer)), mapError2((error) => failed(error.message)));
223
+ const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer), map8((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) => map7(sourceTree(directory, skill.source, `Kit ${kit} skill ${skill.name}`, checkouts), (tree) => ({
264
+ const skills = setup.skills === undefined ? undefined : yield* forEach(setup.skills, (skill) => map8(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) => map7(sourceTree(directory, plugin.sources[0], `Kit ${kit} plugin ${plugin.name}`, checkouts), (tree) => ({
268
+ const plugins = setup.plugins === undefined ? undefined : yield* forEach(setup.plugins, (plugin) => map8(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(map7((info) => info.type === "File"), orElseSucceed(() => false)))
314
+ if (yield* fs.stat(candidate).pipe(map8((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(map7((result) => result.ok ? result.stdout : ""), orElseSucceed(() => ""));
355
+ const transpiled = yield* run("bun", ["build", "--no-bundle", file], root).pipe(map8((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(map7((text) => new TextEncoder().encode(text.replaceAll(entryName, ".kitman-build-entry.ts"))), mapError2((error) => new BundleFailed({ reason: error.message })));
481
+ 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 })));
482
482
  return {
483
483
  ...identity,
484
484
  bundle,
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-07p2dcq3.js";
6
+ } from "./chunk-ampzxrqe.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -7,11 +7,11 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
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";
10
+ } from "./chunk-t7ncjd6s.js";
11
+ import"./chunk-3r7ahnwy.js";
12
+ import"./chunk-bk3dpjxq.js";
13
+ import"./chunk-vjcn82g3.js";
14
+ import"./chunk-ampzxrqe.js";
15
15
  export {
16
16
  decoded2 as decoded,
17
17
  decodedOption2 as decodedOption,