@kitman-sh/cli 0.10.74 → 0.10.76

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-kd02wvfa.js → chunk-0e3t90fs.js} +8 -8
  2. package/dist/{chunk-x0ep0a1y.js → chunk-1zt1yeme.js} +4 -4
  3. package/dist/{chunk-5rs3yv84.js → chunk-225qhz3b.js} +15 -15
  4. package/dist/{chunk-ggax0n15.js → chunk-3teaa3qx.js} +3 -3
  5. package/dist/{chunk-rrnee9mk.js → chunk-545b129z.js} +38 -5
  6. package/dist/{chunk-q3c7vmby.js → chunk-76ctrqm6.js} +1 -1
  7. package/dist/{chunk-rt94p780.js → chunk-89547s8p.js} +647 -75
  8. package/dist/{chunk-1rry0tsn.js → chunk-98sg1yyd.js} +2 -2
  9. package/dist/{chunk-60333x3q.js → chunk-9zd52pda.js} +5 -5
  10. package/dist/{chunk-3edjgnxf.js → chunk-b0cscqbw.js} +25 -3
  11. package/dist/{chunk-g4fvd8r1.js → chunk-bcbne0ek.js} +22 -6
  12. package/dist/{chunk-8bhea26e.js → chunk-e3dmkypq.js} +5 -5
  13. package/dist/{chunk-csbf77zs.js → chunk-e8zm8z3a.js} +4 -4
  14. package/dist/{chunk-3ne401fy.js → chunk-f0stxany.js} +7 -7
  15. package/dist/{chunk-rm83dbpv.js → chunk-fq47a5yd.js} +2 -2
  16. package/dist/{chunk-2v7pbpfw.js → chunk-fqhxxxmp.js} +3 -3
  17. package/dist/{chunk-mzphfkyk.js → chunk-h3y4z2c0.js} +7 -7
  18. package/dist/{chunk-yzm5s3ng.js → chunk-jb01khjp.js} +4 -4
  19. package/dist/{chunk-d3ksv8y1.js → chunk-jbwk6k6m.js} +44 -7
  20. package/dist/{chunk-xz1z7j2d.js → chunk-p8g8qyev.js} +4 -4
  21. package/dist/{chunk-gmnqchsc.js → chunk-t07tn0ay.js} +4 -4
  22. package/dist/{chunk-v01c0k6j.js → chunk-tzz4fv17.js} +1 -1
  23. package/dist/{chunk-dk0ftqwg.js → chunk-xb70ys3n.js} +1 -1
  24. package/dist/{chunk-mv288r6q.js → chunk-z7p5y767.js} +17 -17
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -12,30 +12,30 @@ import {
12
12
  orElseSucceed,
13
13
  decodeJsonString,
14
14
  encodePrettyJsonString
15
- } from "./chunk-d3ksv8y1.js";
16
- import"./chunk-rrnee9mk.js";
15
+ } from "./chunk-jbwk6k6m.js";
16
+ import"./chunk-545b129z.js";
17
17
  import {
18
18
  isJsonObject
19
- } from "./chunk-v01c0k6j.js";
19
+ } from "./chunk-tzz4fv17.js";
20
20
  import {
21
21
  FileSystem,
22
22
  Path
23
- } from "./chunk-dk0ftqwg.js";
23
+ } from "./chunk-xb70ys3n.js";
24
24
  import {
25
25
  tomlTableHeader2,
26
26
  tomlKeyPath2,
27
27
  kitmanSkillEntry,
28
28
  isPathWithin2
29
- } from "./chunk-8bhea26e.js";
29
+ } from "./chunk-e3dmkypq.js";
30
30
  import {
31
31
  instructionsStart,
32
32
  instructionsEnd,
33
33
  renderMcpServer,
34
34
  materializeKitSetup,
35
35
  tomlInline
36
- } from "./chunk-g4fvd8r1.js";
37
- import"./chunk-2v7pbpfw.js";
38
- import"./chunk-1rry0tsn.js";
36
+ } from "./chunk-bcbne0ek.js";
37
+ import"./chunk-fqhxxxmp.js";
38
+ import"./chunk-98sg1yyd.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-1rry0tsn.js";
2
+ import"./chunk-98sg1yyd.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-g4fvd8r1.js";
16
- import"./chunk-dk0ftqwg.js";
17
- import"./chunk-d3ksv8y1.js";
15
+ } from "./chunk-bcbne0ek.js";
16
+ import"./chunk-xb70ys3n.js";
17
+ import"./chunk-jbwk6k6m.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
@@ -85,7 +85,7 @@ import {
85
85
  decodeJsonString,
86
86
  encodeJsonStringSync,
87
87
  encodePrettyJsonString
88
- } from "./chunk-d3ksv8y1.js";
88
+ } from "./chunk-jbwk6k6m.js";
89
89
  import {
90
90
  tap,
91
91
  mapError,
@@ -97,7 +97,7 @@ import {
97
97
  withDefault,
98
98
  option,
99
99
  String2
100
- } from "./chunk-dk0ftqwg.js";
100
+ } from "./chunk-xb70ys3n.js";
101
101
  import {
102
102
  currentTimeMillis,
103
103
  SecureRandom,
@@ -197,10 +197,10 @@ import {
197
197
  harnessNames,
198
198
  herdrRunnerCapabilities2,
199
199
  declaredChecks
200
- } from "./chunk-g4fvd8r1.js";
200
+ } from "./chunk-bcbne0ek.js";
201
201
  import {
202
202
  Id
203
- } from "./chunk-rrnee9mk.js";
203
+ } from "./chunk-545b129z.js";
204
204
  import {
205
205
  toJsonValue,
206
206
  isOneOf,
@@ -210,11 +210,11 @@ import {
210
210
  isObject,
211
211
  isJsonObject,
212
212
  isString
213
- } from "./chunk-v01c0k6j.js";
213
+ } from "./chunk-tzz4fv17.js";
214
214
  import {
215
215
  ChildProcessSpawner,
216
216
  make3
217
- } from "./chunk-1rry0tsn.js";
217
+ } from "./chunk-98sg1yyd.js";
218
218
 
219
219
  // apps/cli/src/cli-error.ts
220
220
  function cliErrorCode(error, status) {
@@ -504,10 +504,10 @@ var checkDockerImageSetting = pinnedImage;
504
504
  var checkRegistryImageSetting = pinnedImage;
505
505
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
506
506
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
507
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-x0ep0a1y.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
507
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-1zt1yeme.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
508
508
  });
509
509
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
510
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-x0ep0a1y.js")), (module) => module.updateHerdrCore(options))
510
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-1zt1yeme.js")), (module) => module.updateHerdrCore(options))
511
511
  });
512
512
  var herdrCoreMissing = (error) => {
513
513
  if (isTagged(error, "HerdrCoreMissing"))
@@ -733,7 +733,7 @@ var syncTargets = (harness) => gen(function* () {
733
733
  });
734
734
  var syncKits = (input) => gen(function* () {
735
735
  const fs = yield* FileSystem;
736
- const { syncKitSetup } = yield* promise(() => import("./chunk-kd02wvfa.js"));
736
+ const { syncKitSetup } = yield* promise(() => import("./chunk-0e3t90fs.js"));
737
737
  const harnesses = yield* syncTargets(input.harness);
738
738
  const chain = yield* input.client.getKitChain(input.workspaceId);
739
739
  for (const { name, problem } of chain.skipped)
@@ -1651,7 +1651,7 @@ var package_default = {
1651
1651
  };
1652
1652
 
1653
1653
  // apps/cli/src/scaffold.ts
1654
- var cliVersion = "0.10.74";
1654
+ var cliVersion = "0.10.76";
1655
1655
  var packageJson = (name, scaffold) => `${JSON.stringify({
1656
1656
  name,
1657
1657
  private: true,
@@ -1901,7 +1901,7 @@ var Usage = [
1901
1901
  "Every run, loop, agent, verify, constraint, secret, claim, deploy, dev and kit command takes --json."
1902
1902
  ].join(`
1903
1903
  `);
1904
- var agentRuntime = promise(() => import("./chunk-rt94p780.js"));
1904
+ var agentRuntime = promise(() => import("./chunk-89547s8p.js"));
1905
1905
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
1906
1906
  defaultValue: () => gen(function* () {
1907
1907
  const tui = yield* tryPromise({
@@ -2777,7 +2777,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
2777
2777
  });
2778
2778
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
2779
2779
  defaultValue: () => (options) => gen(function* () {
2780
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-mzphfkyk.js"));
2780
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-h3y4z2c0.js"));
2781
2781
  return yield* makeRunnerRpcClient({
2782
2782
  runnerId: options.runnerId,
2783
2783
  bearer: options.bearer,
@@ -3161,7 +3161,7 @@ function mcpCommand(args) {
3161
3161
  if (command.action === "run") {
3162
3162
  if (command.args.length > 0)
3163
3163
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
3164
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-3ne401fy.js"));
3164
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-f0stxany.js"));
3165
3165
  return yield* runMcpServerCommand({ flags: command.flags });
3166
3166
  }
3167
3167
  if (command.action !== "setup")
@@ -4372,9 +4372,9 @@ function claimCommand(args) {
4372
4372
  }
4373
4373
  });
4374
4374
  }
4375
- var KitWriter = map8(promise(() => import("./chunk-mv288r6q.js")), (build) => build.writeKit);
4375
+ var KitWriter = map8(promise(() => import("./chunk-z7p5y767.js")), (build) => build.writeKit);
4376
4376
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
4377
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-mv288r6q.js")), (build) => build.buildKit(directory))
4377
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-z7p5y767.js")), (build) => build.buildKit(directory))
4378
4378
  });
4379
4379
  var uploadKit = (client, workspaceId, built) => gen(function* () {
4380
4380
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -96,7 +96,7 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-d3ksv8y1.js";
99
+ } from "./chunk-jbwk6k6m.js";
100
100
  import {
101
101
  interrupt,
102
102
  getCurrent,
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-dk0ftqwg.js";
111
+ } from "./chunk-xb70ys3n.js";
112
112
  import {
113
113
  Clock,
114
114
  empty,
@@ -123,7 +123,7 @@ import {
123
123
  ParseOptions,
124
124
  RpcClientDefect,
125
125
  RpcClientError
126
- } from "./chunk-g4fvd8r1.js";
126
+ } from "./chunk-bcbne0ek.js";
127
127
 
128
128
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
129
129
  class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-d3ksv8y1.js";
21
+ } from "./chunk-jbwk6k6m.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"];
@@ -115,9 +115,42 @@ var SecretScope = Union([Literal("workspace"), Literal("team")]);
115
115
  var SecretHost = String4.check(isPattern(new RegExp("^(\\*\\.)?[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*(?::[0-9]{1,5})?$", "u")), isMaxLength(260));
116
116
  var SecretHosts = ArraySchema(SecretHost).check(isMaxLength(32));
117
117
  var secretReference = (owner, name) => `secret://${owner}/${name}`;
118
- var referencePattern = /secret:\/\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+/g;
119
- var replaceSecretReferences = (text, swap) => text.replace(referencePattern, swap);
120
- var secretReferencesIn = (text) => [...new Set(text.match(referencePattern) ?? [])];
118
+ var referencePattern = /secret:\/\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+/;
119
+ var placeholderMarker = "kitmanref";
120
+ var tokenCharacter = "[A-Za-z0-9._~+/-]";
121
+ var copilotEndpoint = /(?:^|;)(proxy-ep=[A-Za-z0-9.-]+)(?:;|$)/;
122
+ var placeholderPattern = new RegExp(`(?<!${tokenCharacter})(?:proxy-ep=[A-Za-z0-9.-]+;)?${tokenCharacter}*${placeholderMarker}((?:[0-9a-f]{2})+)`);
123
+ var anyReference = new RegExp(`${referencePattern.source}|${placeholderPattern.source}`, "g");
124
+ var hex = (text) => [...new TextEncoder().encode(text)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
125
+ var unhex = (text) => new TextDecoder().decode(Uint8Array.from(text.match(/../g) ?? [], (pair) => Number.parseInt(pair, 16)));
126
+ var isReference = (text) => new RegExp(`^${referencePattern.source}$`).test(text);
127
+ var tokenPrefix = /^(?:sk-ant-[a-z]+[0-9]*-|sk-proj-|sk-or-v[0-9]+-|sk-|ya29\.|gh[opsu]_|github_pat_|xai-|gsk_|AIza)/;
128
+ var secretPlaceholder = (token, reference) => {
129
+ const marker = `${placeholderMarker}${hex(reference)}`;
130
+ const jwt = /^([A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.)[A-Za-z0-9_-]*$/.exec(token);
131
+ if (jwt !== null)
132
+ return `${jwt[1]}${marker}`;
133
+ const endpoint = copilotEndpoint.exec(token);
134
+ if (endpoint !== null)
135
+ return `${endpoint[1]};${marker}`;
136
+ return `${tokenPrefix.exec(token)?.[0] ?? ""}${marker}`;
137
+ };
138
+ var referenceOf = (match, encoded) => {
139
+ if (encoded === undefined)
140
+ return match;
141
+ const reference = unhex(encoded);
142
+ return isReference(reference) ? reference : undefined;
143
+ };
144
+ var replaceSecretReferences = (text, swap) => text.replace(anyReference, (match, encoded) => {
145
+ const reference = referenceOf(match, encoded);
146
+ return reference === undefined ? match : swap(reference);
147
+ });
148
+ var secretReferencesIn = (text) => [
149
+ ...new Set([...text.matchAll(anyReference)].flatMap((match) => {
150
+ const reference = referenceOf(match[0], match[1]);
151
+ return reference === undefined ? [] : [reference];
152
+ }))
153
+ ];
121
154
  var SecretSummary = Struct({
122
155
  name: SecretName,
123
156
  scope: SecretScope,
@@ -135,4 +168,4 @@ var SecretSet = Struct({
135
168
  });
136
169
  var SecretScopeQuery = Struct({ teamId: optionalKey(Id) });
137
170
 
138
- export { isDateTime, Numeric, isWholeNumber, guard, Id, Timestamp, ActorType, SecretName, SecretScope, SecretHosts, secretReference, replaceSecretReferences, secretReferencesIn };
171
+ export { isDateTime, Numeric, isWholeNumber, guard, Id, Timestamp, ActorType, SecretName, SecretScope, SecretHosts, secretReference, secretPlaceholder, replaceSecretReferences, secretReferencesIn };
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-d3ksv8y1.js";
6
+ } from "./chunk-jbwk6k6m.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;