@kitman-sh/cli 0.10.97 → 0.10.98
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.
- package/dist/{chunk-dstm8aen.js → chunk-07p2dcq3.js} +308 -111
- package/dist/{chunk-y8dzp1t8.js → chunk-3bjekzn7.js} +376 -459
- package/dist/{chunk-gfe4kk5k.js → chunk-6dc0x5cg.js} +8 -8
- package/dist/{chunk-q4q69zgm.js → chunk-797w5qe6.js} +7 -7
- package/dist/{chunk-nwqcmdtz.js → chunk-7c3pgktm.js} +9 -8
- package/dist/{chunk-c3k32vw4.js → chunk-7ya2q09c.js} +1 -1
- package/dist/{chunk-t8ny8exc.js → chunk-95mkdtzk.js} +9 -9
- package/dist/{chunk-k6ndhjcd.js → chunk-aba9zdpb.js} +48 -48
- package/dist/{chunk-mkr1nwdy.js → chunk-bqg9gy2e.js} +7 -7
- package/dist/{chunk-mxqrv47k.js → chunk-c6h3fhtb.js} +26 -26
- package/dist/{chunk-hsf2sj69.js → chunk-cgjyv52e.js} +2 -2
- package/dist/{chunk-k4fvnphp.js → chunk-d1sqb8rt.js} +1 -1
- package/dist/{chunk-3tjssyvf.js → chunk-fd39ch4n.js} +8 -8
- package/dist/{chunk-mrzmq4jq.js → chunk-g1xmj2nb.js} +4 -4
- package/dist/{chunk-yzmyy4vs.js → chunk-gfqm22x7.js} +5 -5
- package/dist/{chunk-qr0n7rde.js → chunk-j8vq6sk1.js} +21 -21
- package/dist/{chunk-2ndnvcp3.js → chunk-n8c1wh6t.js} +6 -6
- package/dist/{chunk-rmsm8vnc.js → chunk-nym2zmz3.js} +4 -4
- package/dist/{chunk-w0sehmpd.js → chunk-p83y21hp.js} +62 -16
- package/dist/{chunk-mbqeakm1.js → chunk-qrxkpwzy.js} +1 -1
- package/dist/{chunk-25q7mg6g.js → chunk-s5p94z8x.js} +69 -218
- package/dist/{chunk-3snbxcct.js → chunk-s90hj0mb.js} +55 -55
- package/dist/{chunk-jtyxjjvs.js → chunk-sy8d7bfa.js} +97 -97
- package/dist/{chunk-9m9cv82t.js → chunk-xwhybbj2.js} +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
add,
|
|
13
13
|
getOrUndefinedUnsafe,
|
|
14
14
|
getUnsafe,
|
|
15
|
-
|
|
15
|
+
get3,
|
|
16
16
|
Reference,
|
|
17
17
|
toMillis,
|
|
18
18
|
isSuccess,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
interrupt2,
|
|
23
23
|
void_2,
|
|
24
24
|
isFailure2,
|
|
25
|
-
|
|
25
|
+
makeUnsafe4,
|
|
26
26
|
_await,
|
|
27
27
|
isDoneUnsafe,
|
|
28
28
|
succeed4,
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
findError,
|
|
37
37
|
hasInterrupts2,
|
|
38
38
|
interruptors,
|
|
39
|
+
Clock,
|
|
39
40
|
min2,
|
|
40
41
|
exponential,
|
|
41
42
|
spaced,
|
|
@@ -51,7 +52,7 @@ import {
|
|
|
51
52
|
withFiber2,
|
|
52
53
|
flatMap3,
|
|
53
54
|
andThen2,
|
|
54
|
-
|
|
55
|
+
map7,
|
|
55
56
|
catchCause2,
|
|
56
57
|
catchCauseIf,
|
|
57
58
|
orDie,
|
|
@@ -96,21 +97,8 @@ import {
|
|
|
96
97
|
Defect,
|
|
97
98
|
Exit,
|
|
98
99
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import {
|
|
101
|
-
interrupt,
|
|
102
|
-
getCurrent,
|
|
103
|
-
makeUnsafe2,
|
|
104
|
-
bounded,
|
|
105
|
-
offerAll,
|
|
106
|
-
failCause,
|
|
107
|
-
end,
|
|
108
|
-
shutdownUnsafe,
|
|
109
|
-
fromQueue,
|
|
110
|
-
unwrap
|
|
111
|
-
} from "./chunk-25q7mg6g.js";
|
|
100
|
+
} from "./chunk-07p2dcq3.js";
|
|
112
101
|
import {
|
|
113
|
-
Clock,
|
|
114
102
|
empty,
|
|
115
103
|
fromInput,
|
|
116
104
|
merge,
|
|
@@ -123,7 +111,19 @@ import {
|
|
|
123
111
|
ParseOptions,
|
|
124
112
|
RpcClientDefect,
|
|
125
113
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-3bjekzn7.js";
|
|
115
|
+
import {
|
|
116
|
+
interrupt,
|
|
117
|
+
getCurrent,
|
|
118
|
+
makeUnsafe,
|
|
119
|
+
bounded,
|
|
120
|
+
offerAll,
|
|
121
|
+
failCause,
|
|
122
|
+
end,
|
|
123
|
+
shutdownUnsafe,
|
|
124
|
+
fromQueue,
|
|
125
|
+
unwrap
|
|
126
|
+
} from "./chunk-s5p94z8x.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")) {
|
|
@@ -200,7 +200,7 @@ var withRunClient = (f) => suspend3(() => {
|
|
|
200
200
|
buffer.push([data, context]);
|
|
201
201
|
return void_3;
|
|
202
202
|
});
|
|
203
|
-
return
|
|
203
|
+
return map7(f((clientId, data) => {
|
|
204
204
|
const clientWrite = clientWrites.get(clientId);
|
|
205
205
|
if (clientWrite) {
|
|
206
206
|
return clientWrite(data);
|
|
@@ -237,7 +237,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
237
237
|
const disableTracing = options?.disableTracing ?? false;
|
|
238
238
|
const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
|
|
239
239
|
const services = yield* context();
|
|
240
|
-
const scope =
|
|
240
|
+
const scope = get3(services, Scope);
|
|
241
241
|
const entries = new Map;
|
|
242
242
|
let isShutdown = false;
|
|
243
243
|
yield* addFinalizer(scope, withFiber2((parent) => {
|
|
@@ -271,7 +271,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
271
271
|
const queue = onStreamRequest(rpc, middleware, rpc.payloadSchema.make(payload), headers, opts?.streamBufferSize ?? 16, context);
|
|
272
272
|
if (opts?.asQueue)
|
|
273
273
|
return queue;
|
|
274
|
-
return unwrap(
|
|
274
|
+
return unwrap(map7(queue, fromQueue));
|
|
275
275
|
};
|
|
276
276
|
};
|
|
277
277
|
const onEffectRequest = (rpc, middleware, span, payload, headers, context, discard) => withFiber2((parentFiber) => {
|
|
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
483
483
|
};
|
|
484
484
|
});
|
|
485
485
|
var clientIdCounter = 0;
|
|
486
|
-
var
|
|
486
|
+
var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
487
487
|
const clientId = clientIdCounter++;
|
|
488
488
|
const {
|
|
489
489
|
codecFor,
|
|
@@ -495,7 +495,7 @@ var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
|
495
495
|
const rpcSchemas = makeRpcSchemas(codecFor);
|
|
496
496
|
const decodeDefect = decodeSync(codecFor(Defect()));
|
|
497
497
|
const entries = new Map;
|
|
498
|
-
const closing =
|
|
498
|
+
const closing = makeUnsafe4();
|
|
499
499
|
const interruptRequest = (requestId) => {
|
|
500
500
|
if (!entries.has(requestId))
|
|
501
501
|
return void_3;
|
|
@@ -643,7 +643,7 @@ var makeRpcSchemas = (codecFor) => {
|
|
|
643
643
|
return entry;
|
|
644
644
|
}
|
|
645
645
|
const streamSchemas = getStreamSchemas(rpc.successSchema);
|
|
646
|
-
const parseOptions =
|
|
646
|
+
const parseOptions = get3(rpc.annotations, ParseOptions);
|
|
647
647
|
const exitSchema2 = exitSchema(rpc);
|
|
648
648
|
let decodeDiscardExit;
|
|
649
649
|
entry = {
|
|
@@ -804,7 +804,7 @@ var makePinger = /* @__PURE__ */ fnUntraced(function* (writePing, options) {
|
|
|
804
804
|
const timeoutMillis = toMillis(options?.pingTimeout ?? interval);
|
|
805
805
|
let lastSeen = clock.currentTimeMillisUnsafe();
|
|
806
806
|
let awaitingResponse = false;
|
|
807
|
-
const latch =
|
|
807
|
+
const latch = makeUnsafe();
|
|
808
808
|
const onFrame = () => {
|
|
809
809
|
lastSeen = clock.currentTimeMillisUnsafe();
|
|
810
810
|
awaitingResponse = false;
|
|
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
|
|
|
829
829
|
class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
export { layerJson,
|
|
832
|
+
export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
ArraySchema,
|
|
14
14
|
decodeJsonStringOption,
|
|
15
15
|
encodeUnknownJsonStringSync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-07p2dcq3.js";
|
|
17
17
|
import {
|
|
18
18
|
replaceSecretReferences,
|
|
19
19
|
secretReferencesIn
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-qrxkpwzy.js";
|
|
21
21
|
|
|
22
22
|
// packages/agent-runtime/src/srt-step.ts
|
|
23
23
|
import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
|
|
@@ -12,30 +12,30 @@ import {
|
|
|
12
12
|
orElseSucceed,
|
|
13
13
|
decodeJsonString,
|
|
14
14
|
encodePrettyJsonString
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-07p2dcq3.js";
|
|
16
|
+
import"./chunk-qrxkpwzy.js";
|
|
17
17
|
import {
|
|
18
18
|
isJsonObject
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-d1sqb8rt.js";
|
|
20
20
|
import {
|
|
21
21
|
FileSystem,
|
|
22
22
|
Path
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-s5p94z8x.js";
|
|
24
24
|
import {
|
|
25
25
|
tomlTableHeader2,
|
|
26
26
|
tomlKeyPath2,
|
|
27
27
|
kitmanSkillEntry,
|
|
28
28
|
isPathWithin2
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6dc0x5cg.js";
|
|
30
30
|
import {
|
|
31
31
|
instructionsStart,
|
|
32
32
|
instructionsEnd,
|
|
33
33
|
renderMcpServer,
|
|
34
34
|
materializeKitSetup,
|
|
35
35
|
tomlInline
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import"./chunk-
|
|
38
|
-
import"./chunk-
|
|
36
|
+
} from "./chunk-3bjekzn7.js";
|
|
37
|
+
import"./chunk-bqg9gy2e.js";
|
|
38
|
+
import"./chunk-p83y21hp.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-
|
|
2
|
+
import"./chunk-p83y21hp.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-
|
|
16
|
-
import"./chunk-
|
|
17
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-3bjekzn7.js";
|
|
16
|
+
import"./chunk-s5p94z8x.js";
|
|
17
|
+
import"./chunk-07p2dcq3.js";
|
|
18
18
|
export {
|
|
19
19
|
HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
|
|
20
20
|
HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
decoded2,
|
|
8
8
|
readOpencode2,
|
|
9
9
|
runOpencodeReader2
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
13
|
-
import"./chunk-
|
|
14
|
-
import"./chunk-
|
|
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";
|
|
15
15
|
export {
|
|
16
16
|
decoded2 as decoded,
|
|
17
17
|
decodedOption2 as decodedOption,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
gen,
|
|
11
11
|
fail7,
|
|
12
12
|
flatMap3,
|
|
13
|
-
|
|
13
|
+
map7,
|
|
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-
|
|
36
|
-
import"./chunk-
|
|
37
|
-
import"./chunk-
|
|
35
|
+
} from "./chunk-07p2dcq3.js";
|
|
36
|
+
import"./chunk-qrxkpwzy.js";
|
|
37
|
+
import"./chunk-d1sqb8rt.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-
|
|
49
|
+
} from "./chunk-3bjekzn7.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-
|
|
57
|
+
} from "./chunk-s5p94z8x.js";
|
|
58
58
|
import {
|
|
59
59
|
Packument,
|
|
60
60
|
tarballMatches
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import"./chunk-
|
|
61
|
+
} from "./chunk-bqg9gy2e.js";
|
|
62
|
+
import"./chunk-95mkdtzk.js";
|
|
63
63
|
import {
|
|
64
64
|
AgentDeclaration,
|
|
65
65
|
KitDeclarations,
|
|
66
66
|
describeFlag,
|
|
67
67
|
Described
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-7c3pgktm.js";
|
|
69
69
|
import {
|
|
70
70
|
ChildProcessSpawner,
|
|
71
|
-
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import"./chunk-
|
|
71
|
+
make3
|
|
72
|
+
} from "./chunk-p83y21hp.js";
|
|
73
|
+
import"./chunk-c6h3fhtb.js";
|
|
74
74
|
|
|
75
75
|
// packages/sdk/src/build/index.ts
|
|
76
76
|
class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
|
|
@@ -109,7 +109,7 @@ var ConfigAgents = Record(String4, Struct({
|
|
|
109
109
|
}));
|
|
110
110
|
var run = (command, args, cwd) => gen(function* () {
|
|
111
111
|
const spawner = yield* ChildProcessSpawner;
|
|
112
|
-
const handle = yield* spawner.spawn(
|
|
112
|
+
const handle = yield* spawner.spawn(make3(command, args, { cwd, stdin: "ignore" }));
|
|
113
113
|
const [stdout, stderr, exitCode] = yield* all3([
|
|
114
114
|
mkString(decodeText(handle.stdout)),
|
|
115
115
|
mkString(decodeText(handle.stderr)),
|
|
@@ -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(
|
|
122
|
+
const git = (...args) => run("git", args, directory).pipe(map7((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]) :
|
|
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));
|
|
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),
|
|
223
|
+
const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer), map7((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) =>
|
|
264
|
+
const skills = setup.skills === undefined ? undefined : yield* forEach(setup.skills, (skill) => map7(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) =>
|
|
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) => ({
|
|
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(
|
|
314
|
+
if (yield* fs.stat(candidate).pipe(map7((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(
|
|
355
|
+
const transpiled = yield* run("bun", ["build", "--no-bundle", file], root).pipe(map7((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(
|
|
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 })));
|
|
482
482
|
return {
|
|
483
483
|
...identity,
|
|
484
484
|
bundle,
|
|
@@ -22,21 +22,21 @@ import {
|
|
|
22
22
|
NullOr,
|
|
23
23
|
Finite,
|
|
24
24
|
encodeUnknownJsonStringSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-07p2dcq3.js";
|
|
26
26
|
import {
|
|
27
27
|
isNumber,
|
|
28
28
|
isJsonObject,
|
|
29
29
|
isString
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-d1sqb8rt.js";
|
|
31
31
|
import {
|
|
32
32
|
make10,
|
|
33
33
|
runForEach,
|
|
34
34
|
compiled2
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-s5p94z8x.js";
|
|
36
36
|
import {
|
|
37
37
|
ChildProcessSpawner,
|
|
38
|
-
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
make3
|
|
39
|
+
} from "./chunk-p83y21hp.js";
|
|
40
40
|
|
|
41
41
|
// packages/agent-runtime/src/opencode-store.ts
|
|
42
42
|
import { lstatSync, readFileSync, realpathSync } from "fs";
|
|
@@ -169,7 +169,7 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
|
|
|
169
169
|
var isolatedRead = (store, name, input) => gen(function* () {
|
|
170
170
|
const spawner = yield* ChildProcessSpawner;
|
|
171
171
|
const [command, ...args] = opencodeReaderCommand();
|
|
172
|
-
const handle = yield* spawner.spawn(
|
|
172
|
+
const handle = yield* spawner.spawn(make3(command, args, {
|
|
173
173
|
stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
|
|
174
174
|
stderr: "ignore",
|
|
175
175
|
extendEnv: false,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
opaqueTunnelRefusal2,
|
|
5
5
|
isOpaqueConnectReason2,
|
|
6
6
|
runSrtStep2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-cgjyv52e.js";
|
|
8
|
+
import"./chunk-qrxkpwzy.js";
|
|
9
|
+
import"./chunk-d1sqb8rt.js";
|
|
10
|
+
import"./chunk-07p2dcq3.js";
|
|
11
11
|
export {
|
|
12
12
|
isOpaqueConnectReason2 as isOpaqueConnectReason,
|
|
13
13
|
opaqueTunnelRefusal2 as opaqueTunnelRefusal,
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
+
isString2,
|
|
4
|
+
hasProperty,
|
|
5
|
+
symbol,
|
|
6
|
+
hash,
|
|
7
|
+
symbol2,
|
|
8
|
+
equals,
|
|
3
9
|
BaseProto,
|
|
10
|
+
PipeInspectableProto,
|
|
4
11
|
Prototype,
|
|
5
12
|
some,
|
|
6
13
|
Service2,
|
|
@@ -12,13 +19,10 @@ import {
|
|
|
12
19
|
never,
|
|
13
20
|
flatMap3,
|
|
14
21
|
andThen2,
|
|
15
|
-
|
|
22
|
+
map7,
|
|
16
23
|
raceFirst,
|
|
17
|
-
scoped
|
|
18
|
-
|
|
19
|
-
make16,
|
|
20
|
-
value
|
|
21
|
-
} from "./chunk-dstm8aen.js";
|
|
24
|
+
scoped
|
|
25
|
+
} from "./chunk-07p2dcq3.js";
|
|
22
26
|
import {
|
|
23
27
|
unwrap,
|
|
24
28
|
drainFork,
|
|
@@ -27,7 +31,49 @@ import {
|
|
|
27
31
|
runCollect,
|
|
28
32
|
runDrain,
|
|
29
33
|
mkString
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-s5p94z8x.js";
|
|
35
|
+
|
|
36
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
|
|
37
|
+
var redactedRegistry = /* @__PURE__ */ new WeakMap;
|
|
38
|
+
var value2 = (self) => {
|
|
39
|
+
if (redactedRegistry.has(self)) {
|
|
40
|
+
return redactedRegistry.get(self);
|
|
41
|
+
} else {
|
|
42
|
+
throw new Error("Unable to get redacted value" + (self.label ? ` with label: "${self.label}"` : ""));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Redacted.js
|
|
47
|
+
var TypeId = "~effect/Redacted";
|
|
48
|
+
var isRedacted = (u) => hasProperty(u, TypeId);
|
|
49
|
+
var make = (value, options) => {
|
|
50
|
+
const self = Object.create(Proto);
|
|
51
|
+
if (options?.label) {
|
|
52
|
+
self.label = options.label;
|
|
53
|
+
}
|
|
54
|
+
redactedRegistry.set(self, value);
|
|
55
|
+
return self;
|
|
56
|
+
};
|
|
57
|
+
var Proto = {
|
|
58
|
+
[TypeId]: {
|
|
59
|
+
_A: (_) => _
|
|
60
|
+
},
|
|
61
|
+
label: undefined,
|
|
62
|
+
...PipeInspectableProto,
|
|
63
|
+
toJSON() {
|
|
64
|
+
return this.toString();
|
|
65
|
+
},
|
|
66
|
+
toString() {
|
|
67
|
+
return `<redacted${isString2(this.label) ? ":" + this.label : ""}>`;
|
|
68
|
+
},
|
|
69
|
+
[symbol]() {
|
|
70
|
+
return hash(redactedRegistry.get(this));
|
|
71
|
+
},
|
|
72
|
+
[symbol2](that) {
|
|
73
|
+
return isRedacted(that) && equals(redactedRegistry.get(this), redactedRegistry.get(that));
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var value = value2;
|
|
31
77
|
|
|
32
78
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Brand.js
|
|
33
79
|
function nominal() {
|
|
@@ -55,8 +101,8 @@ var HandleProto = {
|
|
|
55
101
|
var makeHandle = (params) => Object.setPrototypeOf({
|
|
56
102
|
...params
|
|
57
103
|
}, HandleProto);
|
|
58
|
-
var
|
|
59
|
-
const streamString = (command, options) => spawn(command).pipe(
|
|
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);
|
|
60
106
|
const streamLines = (command, options) => splitLines(streamString(command, options));
|
|
61
107
|
return ChildProcessSpawner.of({
|
|
62
108
|
spawn,
|
|
@@ -176,7 +222,7 @@ var parseTemplate = (texts, values) => {
|
|
|
176
222
|
if (word.length === 0)
|
|
177
223
|
return;
|
|
178
224
|
const value = word.map(unwrap2).join("");
|
|
179
|
-
words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ?
|
|
225
|
+
words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make(value) : value);
|
|
180
226
|
word = [];
|
|
181
227
|
plain = true;
|
|
182
228
|
braceDepth = 0;
|
|
@@ -266,23 +312,23 @@ var parseTemplate = (texts, values) => {
|
|
|
266
312
|
};
|
|
267
313
|
|
|
268
314
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/process/ChildProcess.js
|
|
269
|
-
var
|
|
270
|
-
var
|
|
315
|
+
var TypeId2 = "~effect/process/ChildProcess";
|
|
316
|
+
var Proto2 = {
|
|
271
317
|
.../* @__PURE__ */ Prototype({
|
|
272
318
|
label: "Command",
|
|
273
319
|
evaluate(fiber) {
|
|
274
320
|
return getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);
|
|
275
321
|
}
|
|
276
322
|
}),
|
|
277
|
-
[
|
|
323
|
+
[TypeId2]: TypeId2
|
|
278
324
|
};
|
|
279
|
-
var makeStandardCommand = (command, args, options) => Object.assign(Object.create(
|
|
325
|
+
var makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto2), {
|
|
280
326
|
_tag: "StandardCommand",
|
|
281
327
|
command,
|
|
282
328
|
args,
|
|
283
329
|
options
|
|
284
330
|
});
|
|
285
|
-
var
|
|
331
|
+
var make3 = function make(...args) {
|
|
286
332
|
if (isTemplateString(args[0])) {
|
|
287
333
|
const [templates, ...expressions] = args;
|
|
288
334
|
const [command, cmdArgs] = parseTemplate2(templates, expressions);
|
|
@@ -340,4 +386,4 @@ var shellScript = (templates, expressions) => {
|
|
|
340
386
|
}
|
|
341
387
|
return script;
|
|
342
388
|
};
|
|
343
|
-
export { ExitCode, ProcessId, makeHandle,
|
|
389
|
+
export { isRedacted, make, value, ExitCode, ProcessId, makeHandle, make2, ChildProcessSpawner, display, make3, parseFdName, fdName };
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isMinLength,
|
|
19
19
|
isMaxLength,
|
|
20
20
|
FiniteFromString
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-07p2dcq3.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"];
|