@kitman-sh/cli 0.10.74 → 0.10.75

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-ggax0n15.js → chunk-3teaa3qx.js} +3 -3
  4. package/dist/{chunk-rrnee9mk.js → chunk-545b129z.js} +38 -5
  5. package/dist/{chunk-q3c7vmby.js → chunk-76ctrqm6.js} +1 -1
  6. package/dist/{chunk-rt94p780.js → chunk-89547s8p.js} +647 -75
  7. package/dist/{chunk-1rry0tsn.js → chunk-98sg1yyd.js} +2 -2
  8. package/dist/{chunk-60333x3q.js → chunk-9zd52pda.js} +5 -5
  9. package/dist/{chunk-3edjgnxf.js → chunk-b0cscqbw.js} +25 -3
  10. package/dist/{chunk-g4fvd8r1.js → chunk-bcbne0ek.js} +22 -6
  11. package/dist/{chunk-8bhea26e.js → chunk-e3dmkypq.js} +5 -5
  12. package/dist/{chunk-csbf77zs.js → chunk-e8zm8z3a.js} +4 -4
  13. package/dist/{chunk-3ne401fy.js → chunk-f0stxany.js} +7 -7
  14. package/dist/{chunk-rm83dbpv.js → chunk-fq47a5yd.js} +2 -2
  15. package/dist/{chunk-2v7pbpfw.js → chunk-fqhxxxmp.js} +3 -3
  16. package/dist/{chunk-mzphfkyk.js → chunk-h3y4z2c0.js} +7 -7
  17. package/dist/{chunk-yzm5s3ng.js → chunk-jb01khjp.js} +4 -4
  18. package/dist/{chunk-d3ksv8y1.js → chunk-jbwk6k6m.js} +44 -7
  19. package/dist/{chunk-xz1z7j2d.js → chunk-p8g8qyev.js} +4 -4
  20. package/dist/{chunk-5rs3yv84.js → chunk-qs6h506g.js} +15 -15
  21. package/dist/{chunk-gmnqchsc.js → chunk-t07tn0ay.js} +4 -4
  22. package/dist/{chunk-mv288r6q.js → chunk-tv3fkqb9.js} +10 -10
  23. package/dist/{chunk-v01c0k6j.js → chunk-tzz4fv17.js} +1 -1
  24. package/dist/{chunk-dk0ftqwg.js → chunk-xb70ys3n.js} +1 -1
  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,
@@ -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;