@kitman-sh/cli 0.10.53 → 0.10.55

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 (34) hide show
  1. package/dist/{chunk-x9dhxfts.js → chunk-148mjppg.js} +5 -5
  2. package/dist/{chunk-pp1p3g6e.js → chunk-4kssrezn.js} +6 -1
  3. package/dist/{chunk-ctasxxz5.js → chunk-5j3cxsnp.js} +10 -10
  4. package/dist/{chunk-7thnf14y.js → chunk-5y5axze6.js} +609 -6
  5. package/dist/{chunk-mbctzx7e.js → chunk-61k67vxh.js} +76 -1389
  6. package/dist/{chunk-arvwar2c.js → chunk-7evwar6b.js} +1 -1
  7. package/dist/{chunk-mej2bx5n.js → chunk-99ver3za.js} +4 -4
  8. package/dist/{chunk-jagzz148.js → chunk-axdmbr61.js} +26 -26
  9. package/dist/{chunk-p6spvbwq.js → chunk-dgb6s5vq.js} +482 -100
  10. package/dist/{chunk-v290mf51.js → chunk-dj7pp4w4.js} +179 -35
  11. package/dist/{chunk-eg8f5ncv.js → chunk-dkpqwk0q.js} +7 -7
  12. package/dist/{chunk-r8p3nxcp.js → chunk-eerh2t20.js} +10 -10
  13. package/dist/{chunk-jafetf7z.js → chunk-g53wn1q8.js} +2 -2
  14. package/dist/chunk-g7vk5tjp.js +1109 -0
  15. package/dist/{chunk-vjmz23rs.js → chunk-gwcqz1bj.js} +1 -1
  16. package/dist/{chunk-wh1pa2aa.js → chunk-m32wb6t0.js} +245 -108
  17. package/dist/{chunk-3bj7sc3v.js → chunk-mmetyep8.js} +7 -7
  18. package/dist/{chunk-30397r95.js → chunk-mtgkvbk4.js} +4 -4
  19. package/dist/{chunk-dzh9e6n2.js → chunk-q0yna8sw.js} +52 -35
  20. package/dist/{chunk-6vns3ej0.js → chunk-rjfxnk05.js} +5 -5
  21. package/dist/{chunk-g5bs3f6z.js → chunk-twp7aprz.js} +4 -6
  22. package/dist/{chunk-x0b92bjb.js → chunk-vtn088tq.js} +6 -6
  23. package/dist/{chunk-b6thzgc9.js → chunk-wczs5vrq.js} +2 -2
  24. package/dist/{chunk-11p4wf6n.js → chunk-xgwjcq4z.js} +3 -3
  25. package/dist/egress-proxy.ts +138 -21
  26. package/dist/half-close-relay.ts +125 -0
  27. package/dist/index.js +4 -4
  28. package/dist/tcp-forwarder.ts +29 -0
  29. package/package.json +1 -1
  30. package/dist/chunk-1mc9vgcr.js +0 -39
  31. package/dist/chunk-jfvq7s24.js +0 -145
  32. package/dist/chunk-txwt6r25.js +0 -1731
  33. package/dist/chunk-vyv0p5eq.js +0 -3183
  34. package/dist/chunk-z821b2gp.js +0 -164
@@ -6,7 +6,7 @@ import {
6
6
  getOrUndefined,
7
7
  Reference,
8
8
  TaggedError,
9
- make17,
9
+ make16,
10
10
  _await,
11
11
  fail5,
12
12
  succeed5,
@@ -71,16 +71,21 @@ import {
71
71
  is,
72
72
  decodeUnknownEffect2,
73
73
  decodeEffect,
74
+ optionalKey,
75
+ Literal,
74
76
  String4,
75
77
  Struct,
76
78
  Record,
77
79
  ArraySchema,
80
+ Union,
78
81
  isPattern,
82
+ isMinLength,
83
+ isMaxLength,
79
84
  fromJsonString,
80
85
  decodeJsonString,
81
86
  encodeJsonStringSync,
82
87
  encodePrettyJsonString
83
- } from "./chunk-mbctzx7e.js";
88
+ } from "./chunk-61k67vxh.js";
84
89
  import {
85
90
  tap,
86
91
  mapError,
@@ -92,7 +97,7 @@ import {
92
97
  withDefault,
93
98
  option,
94
99
  String2
95
- } from "./chunk-11p4wf6n.js";
100
+ } from "./chunk-xgwjcq4z.js";
96
101
  import {
97
102
  currentTimeMillis,
98
103
  SecureRandom,
@@ -130,7 +135,7 @@ import {
130
135
  digestSha256,
131
136
  sha256Hasher,
132
137
  raw,
133
- make2,
138
+ make5,
134
139
  get,
135
140
  put,
136
141
  HttpClient,
@@ -139,6 +144,7 @@ import {
139
144
  layer2,
140
145
  runDisplayLabels,
141
146
  listedSummary,
147
+ defaultKitName,
142
148
  SetupArchive,
143
149
  KitmanClientError,
144
150
  KitmanEffectClient,
@@ -191,7 +197,10 @@ import {
191
197
  harnessNames,
192
198
  herdrRunnerCapabilities2,
193
199
  declaredChecks
194
- } from "./chunk-wh1pa2aa.js";
200
+ } from "./chunk-m32wb6t0.js";
201
+ import {
202
+ Id
203
+ } from "./chunk-4kssrezn.js";
195
204
  import {
196
205
  toJsonValue,
197
206
  isOneOf,
@@ -201,12 +210,11 @@ import {
201
210
  isObject,
202
211
  isJsonObject,
203
212
  isString
204
- } from "./chunk-arvwar2c.js";
205
- import"./chunk-pp1p3g6e.js";
213
+ } from "./chunk-7evwar6b.js";
206
214
  import {
207
215
  ChildProcessSpawner,
208
- make7
209
- } from "./chunk-3bj7sc3v.js";
216
+ make3
217
+ } from "./chunk-mmetyep8.js";
210
218
 
211
219
  // apps/cli/src/cli-error.ts
212
220
  function cliErrorCode(error, status) {
@@ -254,6 +262,123 @@ var cliErrorLine = (error) => error instanceof Error ? error.message : String(er
254
262
 
255
263
  // apps/cli/src/commands.ts
256
264
  import { homedir } from "os";
265
+
266
+ // packages/core/src/marketplace.ts
267
+ import { parse } from "@babel/parser";
268
+ import { traverseFast } from "@babel/types";
269
+ var Name = String4.check(isMinLength(1), isMaxLength(200));
270
+ var Identifier = String4.check(isPattern(/^[A-Za-z_$][\w$]*$/u));
271
+ var KitName = String4.check(isPattern(/^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/u));
272
+ var MarketplaceReference = Struct({
273
+ id: String4.check(isPattern(/^[a-z0-9][a-z0-9-]{0,79}$/u)),
274
+ kind: Literal("kit"),
275
+ name: Name,
276
+ publisher: Name,
277
+ description: String4.check(isMaxLength(1000)),
278
+ category: Name,
279
+ package: KitName,
280
+ source: Union([
281
+ Struct({ type: Literal("npm"), version: optionalKey(Name) }),
282
+ Struct({
283
+ type: Literal("git"),
284
+ url: String4.check(isPattern(/^https:\/\/\S+$/u)),
285
+ ref: optionalKey(Name)
286
+ })
287
+ ]),
288
+ loops: ArraySchema(Struct({ id: Name, export: Identifier }))
289
+ });
290
+ var MarketplaceReferences = ArraySchema(MarketplaceReference);
291
+ var officialMarketplaceReferences = [
292
+ {
293
+ id: "kitman-software-engineering",
294
+ kind: "kit",
295
+ name: "Software Engineering",
296
+ publisher: "Kitman",
297
+ description: "Everything for building software: the Build, Review, Plan, Research, Release and other Loops, their Agents and the skills they use. A new Workspace installs it.",
298
+ category: "Engineering",
299
+ package: "@kitman-sh/software-engineering",
300
+ source: { type: "npm" },
301
+ loops: [
302
+ { id: "build", export: "build" },
303
+ { id: "errand", export: "errand" },
304
+ { id: "file-tasks", export: "fileTasks" },
305
+ { id: "firewatch", export: "firewatch" },
306
+ { id: "hillclimb", export: "hillclimb" },
307
+ { id: "hindsight", export: "hindsight" },
308
+ { id: "plan", export: "plan" },
309
+ { id: "project-update", export: "projectUpdate" },
310
+ { id: "release", export: "release" },
311
+ { id: "research", export: "research" },
312
+ { id: "review", export: "review" },
313
+ { id: "shepherd", export: "shepherd" },
314
+ { id: "sweep", export: "sweep" },
315
+ { id: "tidy", export: "tidy" }
316
+ ]
317
+ },
318
+ {
319
+ id: "kitman-go-to-market",
320
+ kind: "kit",
321
+ name: "Go-to-Market",
322
+ publisher: "Kitman",
323
+ description: "Copywriting, marketing psychology and SEO audits.",
324
+ category: "Process",
325
+ package: "@kitman-sh/go-to-market",
326
+ source: { type: "npm" },
327
+ loops: []
328
+ }
329
+ ];
330
+ var MarketplaceItemKind = Literal("kit");
331
+ var MarketplaceItemState = Union([
332
+ Struct({ state: Literal("add") }),
333
+ Struct({
334
+ state: Literal("merge_request_open"),
335
+ forge: Name,
336
+ url: optionalKey(String4),
337
+ number: optionalKey(String4)
338
+ }),
339
+ Struct({ state: Literal("added") }),
340
+ Struct({
341
+ state: Literal("installed"),
342
+ version: optionalKey(Name),
343
+ pinnedVersion: optionalKey(Name),
344
+ problem: optionalKey(String4),
345
+ actsFor: optionalKey(String4)
346
+ })
347
+ ]);
348
+ var MarketplaceItem = Struct({
349
+ id: String4,
350
+ kind: MarketplaceItemKind,
351
+ name: Name,
352
+ publisher: Name,
353
+ description: String4,
354
+ category: Name,
355
+ source: String4,
356
+ reference: optionalKey(Union([
357
+ Struct({ type: Literal("npm"), name: KitName }),
358
+ Struct({ type: Literal("git") })
359
+ ])),
360
+ status: MarketplaceItemState
361
+ });
362
+ var MarketplaceList = Struct({ items: ArraySchema(MarketplaceItem) });
363
+ var MarketplaceAdd = Struct({
364
+ kind: MarketplaceItemKind,
365
+ id: String4.check(isMinLength(1), isMaxLength(200)),
366
+ teamId: optionalKey(Id)
367
+ });
368
+ var notListTypes = new Set([
369
+ "NumericLiteral",
370
+ "StringLiteral",
371
+ "BooleanLiteral",
372
+ "NullLiteral",
373
+ "BigIntLiteral",
374
+ "RegExpLiteral",
375
+ "TemplateLiteral",
376
+ "ObjectExpression",
377
+ "ArrowFunctionExpression",
378
+ "FunctionExpression",
379
+ "ClassExpression"
380
+ ]);
381
+ var unbindable = new Set("arguments await break case catch class config const continue debugger default defineKit delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof undefined var void while with yield".split(" "));
257
382
  // apps/cli/src/herdr-runner-credential.ts
258
383
  function herdrRunnerCredentialName(runnerId) {
259
384
  return `herdr-runner:${runnerId}`;
@@ -371,12 +496,18 @@ var sandboxMissing = (sandbox, missing) => ({
371
496
  });
372
497
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
373
498
  var checkHostsSetting = (value) => (value ?? "").split(",").map((host) => host.trim()).filter((host) => host !== "");
499
+ var pinnedImage = (value) => {
500
+ const image = value?.trim();
501
+ return image !== undefined && /@sha256:[a-f0-9]{64}$/.test(image) ? image : undefined;
502
+ };
503
+ var checkDockerImageSetting = pinnedImage;
504
+ var checkRegistryImageSetting = pinnedImage;
374
505
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
375
506
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
376
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-30397r95.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
507
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-mtgkvbk4.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
377
508
  });
378
509
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
379
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-30397r95.js")), (module) => module.updateHerdrCore(options))
510
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-mtgkvbk4.js")), (module) => module.updateHerdrCore(options))
380
511
  });
381
512
  var herdrCoreMissing = (error) => {
382
513
  if (isTagged(error, "HerdrCoreMissing"))
@@ -602,7 +733,7 @@ var syncTargets = (harness) => gen(function* () {
602
733
  });
603
734
  var syncKits = (input) => gen(function* () {
604
735
  const fs = yield* FileSystem;
605
- const { syncKitSetup } = yield* promise(() => import("./chunk-r8p3nxcp.js"));
736
+ const { syncKitSetup } = yield* promise(() => import("./chunk-eerh2t20.js"));
606
737
  const harnesses = yield* syncTargets(input.harness);
607
738
  const chain = yield* input.client.getKitChain(input.workspaceId);
608
739
  for (const { name, problem } of chain.skipped)
@@ -1118,7 +1249,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1118
1249
  run: (command, args) => runCommand2(command, args),
1119
1250
  attach: (command, args) => gen(function* () {
1120
1251
  const spawner = yield* ChildProcessSpawner;
1121
- const handle = yield* spawner.spawn(make7(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1252
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1122
1253
  const exitCode = yield* handle.exitCode;
1123
1254
  if (exitCode !== 0)
1124
1255
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -1506,7 +1637,6 @@ var package_default = {
1506
1637
  },
1507
1638
  dependencies: {
1508
1639
  "@effect/platform-bun": "4.1.2",
1509
- "@kitman-sh/loops": "workspace:*",
1510
1640
  "@kitman-sh/sdk": "workspace:*",
1511
1641
  "@kitman/agent-runtime": "workspace:*",
1512
1642
  "@kitman/core": "workspace:*",
@@ -1521,7 +1651,7 @@ var package_default = {
1521
1651
  };
1522
1652
 
1523
1653
  // apps/cli/src/scaffold.ts
1524
- var cliVersion = "0.10.53";
1654
+ var cliVersion = "0.10.55";
1525
1655
  var packageJson = (name, scaffold) => `${JSON.stringify({
1526
1656
  name,
1527
1657
  private: true,
@@ -1529,7 +1659,7 @@ var packageJson = (name, scaffold) => `${JSON.stringify({
1529
1659
  scripts: { test: "bun test", plan: "kitman deploy --plan", deploy: "kitman deploy" },
1530
1660
  dependencies: {
1531
1661
  "@kitman-sh/cli": cliVersion,
1532
- ...scaffold.fork === undefined ? undefined : { "@kitman-sh/loops": cliVersion },
1662
+ ...scaffold.fork === undefined ? undefined : { [defaultKitName]: cliVersion },
1533
1663
  "@kitman-sh/sdk": cliVersion,
1534
1664
  effect: `^${package_default.dependencies.effect}`
1535
1665
  }
@@ -1577,13 +1707,13 @@ test('greets by name', async () => {
1577
1707
  })
1578
1708
  `;
1579
1709
  var forkConfig = (loop) => `import { defineKit } from '@kitman-sh/sdk/loop'
1580
- import { shippedLoops } from '@kitman-sh/loops'
1710
+ import { loops } from '${defaultKitName}'
1581
1711
 
1582
1712
  export default defineKit({
1583
1713
  loops: [
1584
1714
  {
1585
- ...shippedLoops['${loop}']
1586
- // Change a field of the shipped Loop here, such as title: 'Our ${loop}'.
1715
+ ...loops['${loop}']
1716
+ // Change a field of the Loop here, such as title: 'Our ${loop}'.
1587
1717
  }
1588
1718
  ]
1589
1719
  })
@@ -1626,7 +1756,7 @@ kitman-deploy:
1626
1756
  var readme = (name, scaffold) => [
1627
1757
  `# ${name}`,
1628
1758
  "",
1629
- scaffold.fork === undefined ? "A Kitman Kit: its Loops and Agents are declared in `kitman.config.ts`." : `A Kitman Kit that forks the shipped \`${scaffold.fork}\` Loop by spreading it in \`kitman.config.ts\`. Change a field there; once deployed, the fork replaces the shipped Loop in its layer.`,
1759
+ scaffold.fork === undefined ? "A Kitman Kit: its Loops and Agents are declared in `kitman.config.ts`." : `A Kitman Kit that forks the \`${scaffold.fork}\` Loop of \`${defaultKitName}\` by spreading it in \`kitman.config.ts\`. Change a field there; once deployed, the fork replaces the installed Loop in its layer.`,
1630
1760
  "",
1631
1761
  "1. `bun install`, then `bun test`.",
1632
1762
  "2. `bunx kitman deploy --plan` shows what deploying would change.",
@@ -1641,10 +1771,10 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
1641
1771
  const path = yield* Path;
1642
1772
  const root = path.resolve(directory);
1643
1773
  if (scaffold.fork !== undefined) {
1644
- const { shippedLoops } = yield* promise(() => import("./chunk-vyv0p5eq.js"));
1645
- if (!(scaffold.fork in shippedLoops))
1774
+ const loops = officialMarketplaceReferences.find((kit) => kit.package === defaultKitName)?.loops ?? [];
1775
+ if (!loops.some((loop) => loop.id === scaffold.fork))
1646
1776
  return yield* new CliError({
1647
- message: `Kitman ships no Loop ${scaffold.fork}; fork one of ${Object.keys(shippedLoops).join(", ")}`
1777
+ message: `${defaultKitName} has no Loop ${scaffold.fork}; fork one of ${loops.map((loop) => loop.id).join(", ")}`
1648
1778
  });
1649
1779
  }
1650
1780
  for (const file of ["package.json", "kitman.config.ts"])
@@ -1717,7 +1847,7 @@ var Usage = [
1717
1847
  "",
1718
1848
  "Kits of your own, to deploy with kitman deploy:",
1719
1849
  " kitman init --kit [dir] (a new Kit with an example Loop and a GitLab pipeline)",
1720
- " kitman loop fork <loop> [dir] (a new Kit that spreads a shipped Loop, to change it)",
1850
+ " kitman loop fork <loop> [dir] (a new Kit that spreads a software-engineering Loop, to change it)",
1721
1851
  "",
1722
1852
  "Approved verifications of the current repository:",
1723
1853
  " kitman verify list",
@@ -1770,7 +1900,7 @@ var Usage = [
1770
1900
  "Every run, loop, agent, verify, constraint, secret, claim, deploy, dev and kit command takes --json."
1771
1901
  ].join(`
1772
1902
  `);
1773
- var agentRuntime = promise(() => import("./chunk-p6spvbwq.js"));
1903
+ var agentRuntime = promise(() => import("./chunk-dgb6s5vq.js"));
1774
1904
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
1775
1905
  defaultValue: () => gen(function* () {
1776
1906
  const tui = yield* tryPromise({
@@ -2616,7 +2746,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
2616
2746
  });
2617
2747
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
2618
2748
  defaultValue: () => (options) => gen(function* () {
2619
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-eg8f5ncv.js"));
2749
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-dkpqwk0q.js"));
2620
2750
  return yield* makeRunnerRpcClient({
2621
2751
  runnerId: options.runnerId,
2622
2752
  bearer: options.bearer,
@@ -2638,7 +2768,9 @@ var runnerSettings = gen(function* () {
2638
2768
  sshAgentAvailable: (yield* optional("SSH_AUTH_SOCK")) !== undefined,
2639
2769
  sandbox,
2640
2770
  dockerImage: yield* optional("KITMAN_RUNNER_DOCKER_IMAGE"),
2641
- checkHosts: checkHostsSetting(yield* optional("KITMAN_RUNNER_CHECK_HOSTS"))
2771
+ checkHosts: checkHostsSetting(yield* optional("KITMAN_RUNNER_CHECK_HOSTS")),
2772
+ checkDockerImage: checkDockerImageSetting(yield* optional("KITMAN_RUNNER_CHECK_DOCKER_IMAGE")),
2773
+ checkRegistryImage: checkRegistryImageSetting(yield* optional("KITMAN_RUNNER_CHECK_REGISTRY_IMAGE"))
2642
2774
  };
2643
2775
  });
2644
2776
  var herdrRunnerRootDir = gen(function* () {
@@ -2663,8 +2795,10 @@ function startCanonicalHerdrRunnerCommand(input) {
2663
2795
  HerdrCore,
2664
2796
  herdrCoreAgentBackendLayer,
2665
2797
  detectHarnesses,
2798
+ dockerCheckDaemon,
2666
2799
  dockerCheckPostgres,
2667
2800
  liveReplicaIds,
2801
+ removeCheckDocker,
2668
2802
  removeCheckPostgres,
2669
2803
  checkPostgresSweepInterval,
2670
2804
  herdrRunnerCapabilities,
@@ -2807,7 +2941,7 @@ function startCanonicalHerdrRunnerCommand(input) {
2807
2941
  });
2808
2942
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
2809
2943
  const platform = yield* context();
2810
- const updated = yield* make17();
2944
+ const updated = yield* make16();
2811
2945
  const scope = yield* scope2;
2812
2946
  yield* listenForSignals({
2813
2947
  rpc,
@@ -2892,7 +3026,9 @@ function startCanonicalHerdrRunnerCommand(input) {
2892
3026
  const removeOrphanedCheckPostgres = gen(function* () {
2893
3027
  const now = yield* currentTimeMillis;
2894
3028
  const { items } = yield* controlPlane.client.listRunnerReplicas(input.runnerId);
2895
- yield* removeCheckPostgres(input.runnerId, liveReplicaIds(items, replica.id, now));
3029
+ const live = liveReplicaIds(items, replica.id, now);
3030
+ yield* removeCheckPostgres(input.runnerId, live);
3031
+ yield* removeCheckDocker(input.runnerId, live);
2896
3032
  }).pipe(ignore);
2897
3033
  yield* removeOrphanedCheckPostgres;
2898
3034
  yield* removeOrphanedCheckPostgres.pipe(delay(checkPostgresSweepInterval), forever, forkScoped);
@@ -2902,6 +3038,14 @@ function startCanonicalHerdrRunnerCommand(input) {
2902
3038
  gitCredentials: rpc.gitCredential,
2903
3039
  runFiles: { client: rpc, storage },
2904
3040
  postgres: dockerCheckPostgres(input.runnerId, replica.id),
3041
+ ...settings.checkDockerImage === undefined || settings.checkRegistryImage === undefined ? undefined : {
3042
+ docker: dockerCheckDaemon({
3043
+ runnerId: input.runnerId,
3044
+ replicaId: replica.id,
3045
+ image: settings.checkDockerImage,
3046
+ registryImage: settings.checkRegistryImage
3047
+ })
3048
+ },
2905
3049
  ...checkSandbox === undefined ? undefined : { sandbox: { ...checkSandbox, apiUrl: input.apiUrl, hosts: settings.checkHosts } }
2906
3050
  });
2907
3051
  const control = (capacitySlot) => {
@@ -2986,7 +3130,7 @@ function mcpCommand(args) {
2986
3130
  if (command.action === "run") {
2987
3131
  if (command.args.length > 0)
2988
3132
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
2989
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-dzh9e6n2.js"));
3133
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-q0yna8sw.js"));
2990
3134
  return yield* runMcpServerCommand({ flags: command.flags });
2991
3135
  }
2992
3136
  if (command.action !== "setup")
@@ -3510,7 +3654,7 @@ function loopCommand(args) {
3510
3654
  if (["catalog", "validate", "test"].includes(command.action))
3511
3655
  return loopCatalogCommand(args);
3512
3656
  if (command.action === "fork")
3513
- return scaffoldKit(command.args[1] ?? ".", { fork: requiredArg(command, "a shipped Loop id") });
3657
+ return scaffoldKit(command.args[1] ?? ".", { fork: requiredArg(command, "a Loop id") });
3514
3658
  return fail7(new CliError({
3515
3659
  message: `Unknown loop command: ${command.action || "(missing)"}. Start a Run with kitman run start <loop> "<words>".`
3516
3660
  }));
@@ -3648,7 +3792,7 @@ var runShowLines = (shown) => [
3648
3792
  ...shown.closures.map((closure, index) => index === 0 ? closureLine(closure) : `Earlier: ${closureLine(closure)}`),
3649
3793
  ...alignmentLines(shown.run.alignment),
3650
3794
  ...shown.run.loopDigest === undefined ? [] : [
3651
- `Loop${shown.run.loopVersion === undefined ? "" : ` ${shown.run.loopVersion}`} from the ${shown.run.loopLayer ?? "shipped"} layer, digest ${shown.run.loopDigest}`
3795
+ `Loop${shown.run.loopVersion === undefined ? "" : ` ${shown.run.loopVersion}`}${shown.run.loopLayer === undefined ? "" : ` from the ${shown.run.loopLayer} layer`}, digest ${shown.run.loopDigest}`
3652
3796
  ],
3653
3797
  ...shown.run.failureSummary === undefined ? [] : [`Failure: ${shown.run.failureSummary}`],
3654
3798
  ...shown.steps.flatMap((step) => [
@@ -4188,9 +4332,9 @@ function claimCommand(args) {
4188
4332
  }
4189
4333
  });
4190
4334
  }
4191
- var KitWriter = map8(promise(() => import("./chunk-jagzz148.js")), (build) => build.writeKit);
4335
+ var KitWriter = map8(promise(() => import("./chunk-axdmbr61.js")), (build) => build.writeKit);
4192
4336
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
4193
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-jagzz148.js")), (build) => build.buildKit(directory))
4337
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-axdmbr61.js")), (build) => build.buildKit(directory))
4194
4338
  });
4195
4339
  var uploadKit = (client, workspaceId, built) => gen(function* () {
4196
4340
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -4948,7 +5092,7 @@ function downloadPresignedAsset(download, outputPath) {
4948
5092
  return gen(function* () {
4949
5093
  const fs = yield* FileSystem;
4950
5094
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
4951
- const response = yield* send(make2(download.method)(download.url), failed);
5095
+ const response = yield* send(make5(download.method)(download.url), failed);
4952
5096
  if (response.status < 200 || response.status >= 300)
4953
5097
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
4954
5098
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -4,13 +4,13 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-ctasxxz5.js";
8
- import"./chunk-x9dhxfts.js";
9
- import"./chunk-wh1pa2aa.js";
10
- import"./chunk-11p4wf6n.js";
11
- import"./chunk-pp1p3g6e.js";
12
- import"./chunk-arvwar2c.js";
13
- import"./chunk-mbctzx7e.js";
7
+ } from "./chunk-5j3cxsnp.js";
8
+ import"./chunk-148mjppg.js";
9
+ import"./chunk-m32wb6t0.js";
10
+ import"./chunk-4kssrezn.js";
11
+ import"./chunk-7evwar6b.js";
12
+ import"./chunk-xgwjcq4z.js";
13
+ import"./chunk-61k67vxh.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
16
16
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -12,30 +12,30 @@ import {
12
12
  orElseSucceed,
13
13
  decodeJsonString,
14
14
  encodePrettyJsonString
15
- } from "./chunk-mbctzx7e.js";
15
+ } from "./chunk-61k67vxh.js";
16
+ import"./chunk-4kssrezn.js";
16
17
  import {
17
18
  isJsonObject
18
- } from "./chunk-arvwar2c.js";
19
+ } from "./chunk-7evwar6b.js";
19
20
  import {
20
21
  FileSystem,
21
22
  Path
22
- } from "./chunk-11p4wf6n.js";
23
+ } from "./chunk-xgwjcq4z.js";
23
24
  import {
24
25
  tomlTableHeader2,
25
26
  tomlKeyPath2,
27
+ kitmanSkillEntry,
26
28
  isPathWithin2
27
- } from "./chunk-7thnf14y.js";
29
+ } from "./chunk-5y5axze6.js";
28
30
  import {
29
31
  instructionsStart,
30
32
  instructionsEnd,
31
33
  renderMcpServer,
32
34
  materializeKitSetup,
33
35
  tomlInline
34
- } from "./chunk-wh1pa2aa.js";
35
- import"./chunk-pp1p3g6e.js";
36
- import"./chunk-g5bs3f6z.js";
37
- import"./chunk-3bj7sc3v.js";
38
- import"./chunk-z821b2gp.js";
36
+ } from "./chunk-m32wb6t0.js";
37
+ import"./chunk-twp7aprz.js";
38
+ import"./chunk-mmetyep8.js";
39
39
 
40
40
  // packages/agent-runtime/src/kit-setup-sync.ts
41
41
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -122,7 +122,7 @@ var codexConfigKept = (text, servers) => {
122
122
  var syncKitSetup = (input) => gen(function* () {
123
123
  const fs = yield* FileSystem;
124
124
  const path = yield* Path;
125
- const setup = materializeKitSetup(input.harness, input.kits);
125
+ const setup = materializeKitSetup(input.harness, [...input.kits, kitmanSkillEntry]);
126
126
  const layout = layoutOf(path, input.harness, input.home);
127
127
  const skillsDir = path.join(layout.root, setup.skillsRoot);
128
128
  const write = (file, content) => andThen2(fs.makeDirectory(path.dirname(file), { recursive: true }), isUint8Array(content) ? fs.writeFile(file, content) : fs.writeFileString(file, content));
@@ -11,11 +11,11 @@ import {
11
11
  ArraySchema,
12
12
  decodeJsonStringOption,
13
13
  encodeUnknownJsonStringSync
14
- } from "./chunk-mbctzx7e.js";
14
+ } from "./chunk-61k67vxh.js";
15
15
  import {
16
16
  replaceSecretReferences,
17
17
  secretReferencesIn
18
- } from "./chunk-pp1p3g6e.js";
18
+ } from "./chunk-4kssrezn.js";
19
19
 
20
20
  // packages/agent-runtime/src/secret-proxy.ts
21
21
  import { appendFileSync, readFileSync, renameSync, writeFileSync } from "fs";