@kitman-sh/cli 0.7.0 → 0.7.1
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-6f4anyec.js → chunk-1d2e4je3.js} +1 -1
- package/dist/{chunk-ae7gx971.js → chunk-23ch5vdv.js} +2 -2
- package/dist/{chunk-6kdj8psf.js → chunk-2vcae278.js} +2 -2
- package/dist/{chunk-hrd7xmax.js → chunk-50w9z6we.js} +7 -7
- package/dist/{chunk-704ws2q7.js → chunk-5rp5hvc0.js} +326 -187
- package/dist/{chunk-dwgta18y.js → chunk-9bje6bm0.js} +1 -1
- package/dist/{chunk-226sychh.js → chunk-eynqc0vm.js} +17 -17
- package/dist/{chunk-vjnae06n.js → chunk-f1f60hgt.js} +13 -13
- package/dist/{chunk-epdajq63.js → chunk-gj8pz39x.js} +2 -2
- package/dist/{chunk-gzhxsb25.js → chunk-mx1x1b6a.js} +3 -3
- package/dist/{chunk-ztmwmk8t.js → chunk-tkk2synn.js} +1 -1
- package/dist/index.js +35 -194
- package/package.json +1 -1
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
isStreamSchema,
|
|
122
122
|
getStreamSchemas,
|
|
123
123
|
exitSchema
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-5rp5hvc0.js";
|
|
125
125
|
|
|
126
126
|
// node_modules/.bun/effect@4.0.4/node_modules/effect/dist/socket/Socket.js
|
|
127
127
|
var TypeId = "~effect/socket/Socket";
|
|
@@ -160,11 +160,11 @@ import {
|
|
|
160
160
|
McpPlatformLive,
|
|
161
161
|
runMcpEffect,
|
|
162
162
|
createAgentAuthSignedFetch,
|
|
163
|
-
make13,
|
|
164
163
|
make14,
|
|
164
|
+
make15,
|
|
165
165
|
Service2,
|
|
166
166
|
setupMcpAgentCredential
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-5rp5hvc0.js";
|
|
168
168
|
import {
|
|
169
169
|
layerWebSocketConstructorGlobal,
|
|
170
170
|
layerWebSocket,
|
|
@@ -173,10 +173,10 @@ import {
|
|
|
173
173
|
withHeaders,
|
|
174
174
|
layerProtocolSocket,
|
|
175
175
|
ConnectionHooks
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-9bje6bm0.js";
|
|
177
177
|
import {
|
|
178
178
|
nextInt
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-1d2e4je3.js";
|
|
180
180
|
|
|
181
181
|
// apps/mcp/src/index.ts
|
|
182
182
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
@@ -1880,56 +1880,56 @@ var LivePresenceSubscriptionMessage = Union([
|
|
|
1880
1880
|
LivePresenceSubscriptionUpdate
|
|
1881
1881
|
]);
|
|
1882
1882
|
|
|
1883
|
-
class LiveRpcs extends make14(
|
|
1883
|
+
class LiveRpcs extends make15(make14("Session", {
|
|
1884
1884
|
success: Struct({ workspaceId: String2, clientKind: String2 }),
|
|
1885
1885
|
error: LiveRpcError
|
|
1886
|
-
}),
|
|
1886
|
+
}), make14("Subscribe", {
|
|
1887
1887
|
payload: LiveSubscribeInput,
|
|
1888
1888
|
success: LiveSubscriptionMessage,
|
|
1889
1889
|
error: LiveRpcError,
|
|
1890
1890
|
stream: true
|
|
1891
|
-
}),
|
|
1891
|
+
}), make14("Replay", {
|
|
1892
1892
|
payload: LiveReplayInput,
|
|
1893
1893
|
success: ArraySchema(LiveEvent),
|
|
1894
1894
|
error: LiveRpcError
|
|
1895
|
-
}),
|
|
1895
|
+
}), make14("Ack", {
|
|
1896
1896
|
payload: LiveAckInput,
|
|
1897
1897
|
success: LiveAckResult,
|
|
1898
1898
|
error: LiveRpcError
|
|
1899
|
-
}),
|
|
1899
|
+
}), make14("SubscribeWeb", {
|
|
1900
1900
|
payload: LiveWebSubscribeInput,
|
|
1901
1901
|
success: LiveWebSubscriptionMessage,
|
|
1902
1902
|
error: LiveRpcError,
|
|
1903
1903
|
stream: true
|
|
1904
|
-
}),
|
|
1904
|
+
}), make14("SubscriptionStatus", {
|
|
1905
1905
|
payload: { subscriptionId: String2 },
|
|
1906
1906
|
success: LiveSubscriptionStatus,
|
|
1907
1907
|
error: LiveRpcError
|
|
1908
|
-
}),
|
|
1908
|
+
}), make14("ReplayWeb", {
|
|
1909
1909
|
payload: LiveWebReplayInput,
|
|
1910
1910
|
success: LiveWebReplayResult,
|
|
1911
1911
|
error: LiveRpcError
|
|
1912
|
-
}),
|
|
1912
|
+
}), make14("AckWeb", {
|
|
1913
1913
|
payload: LiveWebAckInput,
|
|
1914
1914
|
success: LiveWebAckResult,
|
|
1915
1915
|
error: LiveRpcError
|
|
1916
|
-
}),
|
|
1916
|
+
}), make14("PublishPresence", {
|
|
1917
1917
|
payload: LivePresencePublishInput,
|
|
1918
1918
|
success: LivePresenceEntry,
|
|
1919
1919
|
error: LiveRpcError
|
|
1920
|
-
}),
|
|
1920
|
+
}), make14("SubscribePresence", {
|
|
1921
1921
|
payload: LivePresenceSubscribeInput,
|
|
1922
1922
|
success: LivePresenceSubscriptionMessage,
|
|
1923
1923
|
error: LiveRpcError,
|
|
1924
1924
|
stream: true
|
|
1925
|
-
}),
|
|
1925
|
+
}), make14("ClearPresence", {
|
|
1926
1926
|
payload: { scope: optional(LiveScope) },
|
|
1927
1927
|
error: LiveRpcError
|
|
1928
|
-
}),
|
|
1928
|
+
}), make14("RecordSessionUpdate", {
|
|
1929
1929
|
payload: { sessionId: String2, input: SessionUpdateCreate },
|
|
1930
1930
|
success: SessionUpdate,
|
|
1931
1931
|
error: LiveRpcError
|
|
1932
|
-
}),
|
|
1932
|
+
}), make14("EndSession", {
|
|
1933
1933
|
payload: { sessionId: String2, input: SessionEnd },
|
|
1934
1934
|
success: Session,
|
|
1935
1935
|
error: LiveRpcError
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
interrupt3,
|
|
108
108
|
makeUnsafe3,
|
|
109
109
|
makeUnsafe4,
|
|
110
|
-
|
|
110
|
+
make10,
|
|
111
111
|
map4,
|
|
112
112
|
filter,
|
|
113
113
|
decodeText,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
FileSystem,
|
|
117
117
|
Path,
|
|
118
118
|
ChildProcessSpawner,
|
|
119
|
-
|
|
119
|
+
make12,
|
|
120
120
|
Crypto,
|
|
121
121
|
value,
|
|
122
122
|
is,
|
|
@@ -161,7 +161,7 @@ import {
|
|
|
161
161
|
herdrRunnerCapabilitiesForRepoBinding2,
|
|
162
162
|
herdrRunnerCapabilities2,
|
|
163
163
|
assertHerdrRunnerCapability2
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-5rp5hvc0.js";
|
|
165
165
|
import {
|
|
166
166
|
make4,
|
|
167
167
|
readerString,
|
|
@@ -172,17 +172,17 @@ import {
|
|
|
172
172
|
SocketUpgradeError,
|
|
173
173
|
SocketCloseError,
|
|
174
174
|
SocketError
|
|
175
|
-
} from "./chunk-
|
|
176
|
-
import"./chunk-
|
|
175
|
+
} from "./chunk-9bje6bm0.js";
|
|
176
|
+
import"./chunk-tkk2synn.js";
|
|
177
177
|
import {
|
|
178
178
|
programLease,
|
|
179
179
|
programHostsEnv,
|
|
180
180
|
undeclaredHostsEnv
|
|
181
|
-
} from "./chunk-
|
|
182
|
-
import"./chunk-
|
|
181
|
+
} from "./chunk-2vcae278.js";
|
|
182
|
+
import"./chunk-23ch5vdv.js";
|
|
183
183
|
import {
|
|
184
184
|
nextInt
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-1d2e4je3.js";
|
|
186
186
|
|
|
187
187
|
// packages/core/src/runner-trust.ts
|
|
188
188
|
import { createHash } from "crypto";
|
|
@@ -2494,7 +2494,7 @@ var temporaryDirectory = map3(optionalEnv("TMPDIR"), (tmp) => tmp ?? "/tmp");
|
|
|
2494
2494
|
var spawnServer = (input) => gen(function* () {
|
|
2495
2495
|
const spawner = yield* ChildProcessSpawner;
|
|
2496
2496
|
const scope = yield* make6();
|
|
2497
|
-
const handle = yield* spawner.spawn(
|
|
2497
|
+
const handle = yield* spawner.spawn(make12(input.command, [...input.args], {
|
|
2498
2498
|
env: { HERDR_SOCKET_PATH: input.socketPath },
|
|
2499
2499
|
extendEnv: true,
|
|
2500
2500
|
detached: true,
|
|
@@ -4451,10 +4451,10 @@ var handshake = [
|
|
|
4451
4451
|
`).join("");
|
|
4452
4452
|
var kitmanMcpPreflight = (mcp) => gen(function* () {
|
|
4453
4453
|
const spawner = yield* ChildProcessSpawner;
|
|
4454
|
-
const server = yield* spawner.spawn(
|
|
4454
|
+
const server = yield* spawner.spawn(make12(mcp.command, [...mcp.args], {
|
|
4455
4455
|
extendEnv: true,
|
|
4456
4456
|
env: mcp.env,
|
|
4457
|
-
stdin: { stream:
|
|
4457
|
+
stdin: { stream: make10(new TextEncoder().encode(handshake)), endOnDone: false },
|
|
4458
4458
|
stderr: "ignore"
|
|
4459
4459
|
}));
|
|
4460
4460
|
const reply = yield* server.stdout.pipe(decodeText, splitLines, map4((line) => recordValue(getOrUndefined(decodeJsonStringOption(line)))), filter((message) => message?.id === 2), runHead);
|
|
@@ -4526,8 +4526,8 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
|
|
|
4526
4526
|
};
|
|
4527
4527
|
const exitCode = sandbox === undefined ? yield* gen(function* () {
|
|
4528
4528
|
const spawner = yield* ChildProcessSpawner;
|
|
4529
|
-
const handle = yield* spawner.spawn(
|
|
4530
|
-
stdin:
|
|
4529
|
+
const handle = yield* spawner.spawn(make12(input.bun ?? process.execPath, [file], {
|
|
4530
|
+
stdin: make10(new TextEncoder().encode(stdin)),
|
|
4531
4531
|
stdout: "inherit",
|
|
4532
4532
|
stderr: "inherit",
|
|
4533
4533
|
extendEnv: false,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
Int,
|
|
32
32
|
TaggedError2,
|
|
33
33
|
Json
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5rp5hvc0.js";
|
|
35
35
|
import {
|
|
36
36
|
LoopOutcome,
|
|
37
37
|
defineLoop,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
mergeFindings,
|
|
68
68
|
settleRound,
|
|
69
69
|
rallyStop
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-tkk2synn.js";
|
|
71
71
|
|
|
72
72
|
// node_modules/.bun/effect@4.0.4/node_modules/effect/dist/workflow/DurableClock.js
|
|
73
73
|
var TypeId = "~effect/workflow/DurableClock";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
runnerWebSocketProtocol2,
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import"./chunk-
|
|
8
|
-
import"./chunk-
|
|
6
|
+
} from "./chunk-23ch5vdv.js";
|
|
7
|
+
import"./chunk-9bje6bm0.js";
|
|
8
|
+
import"./chunk-5rp5hvc0.js";
|
|
9
9
|
export {
|
|
10
10
|
makeRunnerRpcClient2 as makeRunnerRpcClient,
|
|
11
11
|
runnerRpcUrl2 as runnerRpcUrl,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
toCodecJson,
|
|
101
101
|
Json,
|
|
102
102
|
LoopCapabilities
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-5rp5hvc0.js";
|
|
104
104
|
|
|
105
105
|
// packages/sdk/src/loop/define.ts
|
|
106
106
|
var LoopOutcome = Literals(["feature", "bug", "refactor", "investigation", "docs", "migration"]);
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
3
|
import {
|
|
4
|
-
pipeArguments,
|
|
5
4
|
identity,
|
|
6
5
|
isUndefined,
|
|
7
6
|
isNotUndefined,
|
|
@@ -20,12 +19,8 @@ import {
|
|
|
20
19
|
fromUndefinedOr,
|
|
21
20
|
getOrUndefined,
|
|
22
21
|
Service,
|
|
23
|
-
add,
|
|
24
|
-
get,
|
|
25
22
|
Reference,
|
|
26
23
|
of,
|
|
27
|
-
fromInputUnsafe,
|
|
28
|
-
isFinite,
|
|
29
24
|
toMillis,
|
|
30
25
|
TaggedError,
|
|
31
26
|
squash,
|
|
@@ -34,19 +29,12 @@ import {
|
|
|
34
29
|
UnknownError,
|
|
35
30
|
succeed2,
|
|
36
31
|
fail2,
|
|
37
|
-
void_,
|
|
38
|
-
isSuccess2,
|
|
39
|
-
isFailure2,
|
|
40
32
|
makeUnsafe,
|
|
41
33
|
_await,
|
|
42
34
|
isDone,
|
|
43
35
|
isDoneUnsafe,
|
|
44
36
|
doneUnsafe,
|
|
45
|
-
Scope,
|
|
46
|
-
makeUnsafe2,
|
|
47
|
-
addFinalizerExit,
|
|
48
37
|
addFinalizer,
|
|
49
|
-
close,
|
|
50
38
|
succeed4,
|
|
51
39
|
effect,
|
|
52
40
|
mergeAll,
|
|
@@ -66,7 +54,6 @@ import {
|
|
|
66
54
|
gen,
|
|
67
55
|
fail4,
|
|
68
56
|
try_,
|
|
69
|
-
withFiber,
|
|
70
57
|
flatMap,
|
|
71
58
|
andThen,
|
|
72
59
|
tap,
|
|
@@ -86,28 +73,19 @@ import {
|
|
|
86
73
|
provide3,
|
|
87
74
|
provideContext,
|
|
88
75
|
provideService,
|
|
89
|
-
scope,
|
|
90
76
|
scoped,
|
|
91
77
|
acquireRelease,
|
|
92
78
|
addFinalizer2,
|
|
93
79
|
ensuring,
|
|
94
|
-
onExit,
|
|
95
|
-
interrupt2,
|
|
96
80
|
uninterruptible,
|
|
97
|
-
uninterruptibleMask,
|
|
98
81
|
forever,
|
|
99
82
|
forkScoped,
|
|
100
|
-
runForkWith,
|
|
101
83
|
fnUntraced,
|
|
102
84
|
logWarning,
|
|
103
85
|
logError,
|
|
104
86
|
runMain,
|
|
105
87
|
systemError,
|
|
106
88
|
badArgument,
|
|
107
|
-
join,
|
|
108
|
-
interrupt3,
|
|
109
|
-
getCurrent,
|
|
110
|
-
runIn,
|
|
111
89
|
makeUnsafe3,
|
|
112
90
|
make7,
|
|
113
91
|
make8,
|
|
@@ -120,6 +98,8 @@ import {
|
|
|
120
98
|
isSink,
|
|
121
99
|
fromChannel,
|
|
122
100
|
drain,
|
|
101
|
+
make9,
|
|
102
|
+
get2,
|
|
123
103
|
isStream,
|
|
124
104
|
fromChannel2,
|
|
125
105
|
empty2,
|
|
@@ -135,9 +115,9 @@ import {
|
|
|
135
115
|
ExitCode,
|
|
136
116
|
ProcessId,
|
|
137
117
|
makeHandle,
|
|
138
|
-
make10,
|
|
139
|
-
ChildProcessSpawner,
|
|
140
118
|
make11,
|
|
119
|
+
ChildProcessSpawner,
|
|
120
|
+
make12,
|
|
141
121
|
parseFdName,
|
|
142
122
|
fdName,
|
|
143
123
|
handleErrnoException,
|
|
@@ -203,8 +183,8 @@ import {
|
|
|
203
183
|
agentCredentialForApi,
|
|
204
184
|
storeAgentCredential,
|
|
205
185
|
raw,
|
|
206
|
-
|
|
207
|
-
|
|
186
|
+
make13,
|
|
187
|
+
get3,
|
|
208
188
|
put,
|
|
209
189
|
execute,
|
|
210
190
|
Fetch,
|
|
@@ -227,146 +207,7 @@ import {
|
|
|
227
207
|
runCommand2,
|
|
228
208
|
detectHarnesses2,
|
|
229
209
|
herdrRunnerCapabilities2
|
|
230
|
-
} from "./chunk-
|
|
231
|
-
|
|
232
|
-
// node_modules/.bun/effect@4.0.4/node_modules/effect/dist/internal/rcRef.js
|
|
233
|
-
var TypeId = "~effect/RcRef";
|
|
234
|
-
var stateEmpty = {
|
|
235
|
-
_tag: "Empty"
|
|
236
|
-
};
|
|
237
|
-
var stateClosed = {
|
|
238
|
-
_tag: "Closed"
|
|
239
|
-
};
|
|
240
|
-
var variance = {
|
|
241
|
-
_A: identity,
|
|
242
|
-
_E: identity
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
class RcRefImpl {
|
|
246
|
-
[TypeId] = variance;
|
|
247
|
-
pipe() {
|
|
248
|
-
return pipeArguments(this, arguments);
|
|
249
|
-
}
|
|
250
|
-
state = stateEmpty;
|
|
251
|
-
acquire;
|
|
252
|
-
context;
|
|
253
|
-
scope;
|
|
254
|
-
idleTimeToLive;
|
|
255
|
-
constructor(acquire, context, scope, idleTimeToLive) {
|
|
256
|
-
this.acquire = acquire;
|
|
257
|
-
this.context = context;
|
|
258
|
-
this.scope = scope;
|
|
259
|
-
this.idleTimeToLive = idleTimeToLive;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
var make = (options) => withFiber((fiber) => {
|
|
263
|
-
const context = fiber.context;
|
|
264
|
-
const scope = get(context, Scope);
|
|
265
|
-
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
266
|
-
return as(addFinalizerExit(scope, () => {
|
|
267
|
-
const state = ref.state;
|
|
268
|
-
ref.state = stateClosed;
|
|
269
|
-
if (state._tag === "Acquired")
|
|
270
|
-
return close(state.scope, void_);
|
|
271
|
-
if (state._tag === "Acquiring")
|
|
272
|
-
return interrupt3(state.fiber);
|
|
273
|
-
return void_2;
|
|
274
|
-
}), ref);
|
|
275
|
-
});
|
|
276
|
-
var getState = (self, restore) => {
|
|
277
|
-
switch (self.state._tag) {
|
|
278
|
-
case "Closed": {
|
|
279
|
-
return interrupt2;
|
|
280
|
-
}
|
|
281
|
-
case "Acquired": {
|
|
282
|
-
const state = self.state;
|
|
283
|
-
state.refCount++;
|
|
284
|
-
return state.fiber ? as(interrupt3(state.fiber), state) : succeed5(state);
|
|
285
|
-
}
|
|
286
|
-
case "Acquiring": {
|
|
287
|
-
const state = self.state;
|
|
288
|
-
state.awaiters++;
|
|
289
|
-
return awaitAcquiring(self, state, restore);
|
|
290
|
-
}
|
|
291
|
-
case "Empty": {
|
|
292
|
-
const acquiring = {
|
|
293
|
-
_tag: "Acquiring",
|
|
294
|
-
fiber: undefined,
|
|
295
|
-
awaiters: 1,
|
|
296
|
-
acquired: undefined
|
|
297
|
-
};
|
|
298
|
-
self.state = acquiring;
|
|
299
|
-
const scope = makeUnsafe2();
|
|
300
|
-
const acquire = provideContext(self.acquire, add(self.context, Scope, scope)).pipe(flatMap((value) => {
|
|
301
|
-
if (self.state !== acquiring) {
|
|
302
|
-
return interrupt2;
|
|
303
|
-
}
|
|
304
|
-
const state = {
|
|
305
|
-
_tag: "Acquired",
|
|
306
|
-
value,
|
|
307
|
-
scope,
|
|
308
|
-
fiber: undefined,
|
|
309
|
-
refCount: acquiring.awaiters,
|
|
310
|
-
invalidated: false
|
|
311
|
-
};
|
|
312
|
-
self.state = state;
|
|
313
|
-
acquiring.acquired = state;
|
|
314
|
-
return succeed5(state);
|
|
315
|
-
}), onExit((exit) => {
|
|
316
|
-
if (isSuccess2(exit))
|
|
317
|
-
return void_2;
|
|
318
|
-
if (self.state === acquiring)
|
|
319
|
-
self.state = stateEmpty;
|
|
320
|
-
return close(scope, exit);
|
|
321
|
-
}));
|
|
322
|
-
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
323
|
-
return awaitAcquiring(self, acquiring, restore);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
328
|
-
const acquired = acquiring.acquired;
|
|
329
|
-
if (acquired !== undefined) {
|
|
330
|
-
return isFailure2(exit) ? release(self, acquired) : void_2;
|
|
331
|
-
}
|
|
332
|
-
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
333
|
-
return void_2;
|
|
334
|
-
self.state = stateEmpty;
|
|
335
|
-
return interrupt3(acquiring.fiber);
|
|
336
|
-
});
|
|
337
|
-
var get3 = (self_) => {
|
|
338
|
-
const self = self_;
|
|
339
|
-
return uninterruptibleMask((restore) => flatMap(scope, (scope) => flatMap(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
340
|
-
};
|
|
341
|
-
var release = (self, state) => {
|
|
342
|
-
state.refCount--;
|
|
343
|
-
if (state.refCount > 0) {
|
|
344
|
-
return void_2;
|
|
345
|
-
}
|
|
346
|
-
const idleTimeToLive = self.idleTimeToLive;
|
|
347
|
-
if (idleTimeToLive === undefined || state.invalidated) {
|
|
348
|
-
if (self.state === state) {
|
|
349
|
-
self.state = stateEmpty;
|
|
350
|
-
}
|
|
351
|
-
return close(state.scope, void_);
|
|
352
|
-
} else if (!isFinite(idleTimeToLive)) {
|
|
353
|
-
return void_2;
|
|
354
|
-
}
|
|
355
|
-
state.fiber = uninterruptibleMask((restore) => flatMap(restore(sleep(idleTimeToLive)), () => {
|
|
356
|
-
if (self.state === state && state.refCount === 0) {
|
|
357
|
-
self.state = stateEmpty;
|
|
358
|
-
return close(state.scope, void_);
|
|
359
|
-
}
|
|
360
|
-
return void_2;
|
|
361
|
-
})).pipe(ensuring(sync(() => {
|
|
362
|
-
state.fiber = undefined;
|
|
363
|
-
})), runForkWith(self.context), runIn(self.scope));
|
|
364
|
-
return void_2;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// node_modules/.bun/effect@4.0.4/node_modules/effect/dist/RcRef.js
|
|
368
|
-
var make2 = make;
|
|
369
|
-
var get4 = get3;
|
|
210
|
+
} from "./chunk-5rp5hvc0.js";
|
|
370
211
|
|
|
371
212
|
// node_modules/.bun/@effect+platform-node-shared@4.0.4+b8cbb99ebc524863/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
372
213
|
import * as NodeChildProcess from "child_process";
|
|
@@ -544,7 +385,7 @@ var taskkill = (childProcess, onExit = () => {}) => {
|
|
|
544
385
|
windowsHide: true
|
|
545
386
|
}, onExit);
|
|
546
387
|
};
|
|
547
|
-
var
|
|
388
|
+
var make = /* @__PURE__ */ gen(function* () {
|
|
548
389
|
const fs = yield* FileSystem;
|
|
549
390
|
const path = yield* Path;
|
|
550
391
|
const resolveWorkingDirectory = fnUntraced(function* (options) {
|
|
@@ -946,7 +787,7 @@ var make3 = /* @__PURE__ */ gen(function* () {
|
|
|
946
787
|
const sourceStream = unwrap(succeed5(getSourceStream(handles[handles.length - 1], options.from)));
|
|
947
788
|
const toOption = options.to ?? "stdin";
|
|
948
789
|
if (toOption === "stdin") {
|
|
949
|
-
handles.push(yield* spawnCommand(
|
|
790
|
+
handles.push(yield* spawnCommand(make12(command.command, command.args, {
|
|
950
791
|
...command.options,
|
|
951
792
|
stdin: {
|
|
952
793
|
...stdinConfig,
|
|
@@ -958,7 +799,7 @@ var make3 = /* @__PURE__ */ gen(function* () {
|
|
|
958
799
|
if (isNotUndefined(fd)) {
|
|
959
800
|
const fdName2 = fdName(fd);
|
|
960
801
|
const existingFds = command.options.additionalFds ?? {};
|
|
961
|
-
handles.push(yield* spawnCommand(
|
|
802
|
+
handles.push(yield* spawnCommand(make12(command.command, command.args, {
|
|
962
803
|
...command.options,
|
|
963
804
|
additionalFds: {
|
|
964
805
|
...existingFds,
|
|
@@ -969,7 +810,7 @@ var make3 = /* @__PURE__ */ gen(function* () {
|
|
|
969
810
|
}
|
|
970
811
|
})));
|
|
971
812
|
} else {
|
|
972
|
-
handles.push(yield* spawnCommand(
|
|
813
|
+
handles.push(yield* spawnCommand(make12(command.command, command.args, {
|
|
973
814
|
...command.options,
|
|
974
815
|
stdin: {
|
|
975
816
|
...stdinConfig,
|
|
@@ -1008,9 +849,9 @@ var make3 = /* @__PURE__ */ gen(function* () {
|
|
|
1008
849
|
}
|
|
1009
850
|
}
|
|
1010
851
|
});
|
|
1011
|
-
return
|
|
852
|
+
return make11(spawnCommand);
|
|
1012
853
|
});
|
|
1013
|
-
var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner,
|
|
854
|
+
var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make);
|
|
1014
855
|
var flattenCommand = (command) => {
|
|
1015
856
|
const commands = [];
|
|
1016
857
|
const pipeOptions = [];
|
|
@@ -1041,10 +882,10 @@ var flattenCommand = (command) => {
|
|
|
1041
882
|
};
|
|
1042
883
|
|
|
1043
884
|
// node_modules/.bun/effect@4.0.4/node_modules/effect/dist/Stdio.js
|
|
1044
|
-
var
|
|
1045
|
-
var Stdio = /* @__PURE__ */ Service(
|
|
1046
|
-
var
|
|
1047
|
-
[
|
|
885
|
+
var TypeId = "~effect/Stdio";
|
|
886
|
+
var Stdio = /* @__PURE__ */ Service(TypeId);
|
|
887
|
+
var make2 = (options) => ({
|
|
888
|
+
[TypeId]: TypeId,
|
|
1048
889
|
stdinIsTerminal: succeed5(false),
|
|
1049
890
|
stdoutIsTerminal: succeed5(false),
|
|
1050
891
|
stderrIsTerminal: succeed5(false),
|
|
@@ -1052,7 +893,7 @@ var make4 = (options) => ({
|
|
|
1052
893
|
});
|
|
1053
894
|
|
|
1054
895
|
// node_modules/.bun/@effect+platform-node-shared@4.0.4+b8cbb99ebc524863/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
|
|
1055
|
-
var layer6 = /* @__PURE__ */ succeed4(Stdio, /* @__PURE__ */
|
|
896
|
+
var layer6 = /* @__PURE__ */ succeed4(Stdio, /* @__PURE__ */ make2({
|
|
1056
897
|
args: /* @__PURE__ */ sync(() => process.argv.slice(2)),
|
|
1057
898
|
stdinIsTerminal: /* @__PURE__ */ sync(() => process.stdin.isTTY === true),
|
|
1058
899
|
stdoutIsTerminal: /* @__PURE__ */ sync(() => process.stdout.isTTY === true),
|
|
@@ -1093,7 +934,7 @@ var layer6 = /* @__PURE__ */ succeed4(Stdio, /* @__PURE__ */ make4({
|
|
|
1093
934
|
var layer7 = layer6;
|
|
1094
935
|
|
|
1095
936
|
// node_modules/.bun/effect@4.0.4/node_modules/effect/dist/Terminal.js
|
|
1096
|
-
var
|
|
937
|
+
var TypeId2 = "~effect/Terminal";
|
|
1097
938
|
var QuitErrorTypeId = "~effect/Terminal/QuitError";
|
|
1098
939
|
|
|
1099
940
|
class QuitError extends (/* @__PURE__ */ Error2("QuitError")({
|
|
@@ -1102,14 +943,14 @@ class QuitError extends (/* @__PURE__ */ Error2("QuitError")({
|
|
|
1102
943
|
[QuitErrorTypeId] = QuitErrorTypeId;
|
|
1103
944
|
}
|
|
1104
945
|
var Terminal = /* @__PURE__ */ Service("effect/Terminal");
|
|
1105
|
-
var
|
|
946
|
+
var make3 = (impl) => Terminal.of({
|
|
1106
947
|
...impl,
|
|
1107
|
-
[
|
|
948
|
+
[TypeId2]: TypeId2
|
|
1108
949
|
});
|
|
1109
950
|
|
|
1110
951
|
// node_modules/.bun/@effect+platform-node-shared@4.0.4+b8cbb99ebc524863/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
|
|
1111
952
|
import * as readline from "readline";
|
|
1112
|
-
var
|
|
953
|
+
var make4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
|
|
1113
954
|
const stdin = process.stdin;
|
|
1114
955
|
const stdout = process.stdout;
|
|
1115
956
|
const lines = yield* make8();
|
|
@@ -1123,7 +964,7 @@ var make6 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
|
|
|
1123
964
|
};
|
|
1124
965
|
stdin.once("end", onStdinEnd);
|
|
1125
966
|
yield* addFinalizer2(() => sync(() => stdin.off("end", onStdinEnd)));
|
|
1126
|
-
const rlRef = yield*
|
|
967
|
+
const rlRef = yield* make9({
|
|
1127
968
|
acquire: acquireRelease(sync(() => {
|
|
1128
969
|
const rl = readline.createInterface({
|
|
1129
970
|
input: stdin,
|
|
@@ -1197,13 +1038,13 @@ var make6 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
|
|
|
1197
1038
|
if (inputEnded) {
|
|
1198
1039
|
handleEnd();
|
|
1199
1040
|
} else {
|
|
1200
|
-
yield*
|
|
1041
|
+
yield* get2(rlRef);
|
|
1201
1042
|
stdin.once("end", handleEnd);
|
|
1202
1043
|
}
|
|
1203
1044
|
return queue;
|
|
1204
1045
|
});
|
|
1205
1046
|
const readLine = suspend(() => poll(lines).pipe(flatMap(match({
|
|
1206
|
-
onNone: () => scoped(andThen(
|
|
1047
|
+
onNone: () => scoped(andThen(get2(rlRef), take(lines))),
|
|
1207
1048
|
onSome: succeed5
|
|
1208
1049
|
})), mapError(() => new QuitError({}))));
|
|
1209
1050
|
const display = (prompt2) => uninterruptible(callback((resume) => {
|
|
@@ -1214,7 +1055,7 @@ var make6 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
|
|
|
1214
1055
|
cause: err
|
|
1215
1056
|
}))));
|
|
1216
1057
|
}));
|
|
1217
|
-
return
|
|
1058
|
+
return make3({
|
|
1218
1059
|
columns,
|
|
1219
1060
|
rows,
|
|
1220
1061
|
readInput,
|
|
@@ -1222,7 +1063,7 @@ var make6 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
|
|
|
1222
1063
|
display
|
|
1223
1064
|
});
|
|
1224
1065
|
});
|
|
1225
|
-
var layer8 = /* @__PURE__ */ effect(Terminal, /* @__PURE__ */
|
|
1066
|
+
var layer8 = /* @__PURE__ */ effect(Terminal, /* @__PURE__ */ make4(defaultShouldQuit));
|
|
1226
1067
|
function defaultShouldQuit(input) {
|
|
1227
1068
|
const key = input.key;
|
|
1228
1069
|
return key.name === "escape" || key.ctrl && (key.name === "c" || key.name === "d");
|
|
@@ -1929,7 +1770,7 @@ var package_default = {
|
|
|
1929
1770
|
};
|
|
1930
1771
|
|
|
1931
1772
|
// apps/cli/src/scaffold.ts
|
|
1932
|
-
var cliVersion = "0.7.
|
|
1773
|
+
var cliVersion = "0.7.1";
|
|
1933
1774
|
var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
1934
1775
|
name,
|
|
1935
1776
|
private: true,
|
|
@@ -2049,7 +1890,7 @@ var scaffoldPackage = (directory, scaffold = {}) => gen(function* () {
|
|
|
2049
1890
|
const path = yield* Path;
|
|
2050
1891
|
const root = path.resolve(directory);
|
|
2051
1892
|
if (scaffold.fork !== undefined) {
|
|
2052
|
-
const { shippedLoops } = yield* promise(() => import("./chunk-
|
|
1893
|
+
const { shippedLoops } = yield* promise(() => import("./chunk-gj8pz39x.js"));
|
|
2053
1894
|
if (!(scaffold.fork in shippedLoops))
|
|
2054
1895
|
return yield* new CliError({
|
|
2055
1896
|
message: `Kitman ships no Loop ${scaffold.fork}; fork one of ${Object.keys(shippedLoops).join(", ")}`
|
|
@@ -2143,7 +1984,7 @@ var Usage = [
|
|
|
2143
1984
|
`);
|
|
2144
1985
|
var KitCreateValidator = guard(KitCreate);
|
|
2145
1986
|
var KitUpdateValidator = guard(KitUpdate);
|
|
2146
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
1987
|
+
var agentRuntime = promise(() => import("./chunk-f1f60hgt.js"));
|
|
2147
1988
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
2148
1989
|
defaultValue: () => gen(function* () {
|
|
2149
1990
|
const tui = yield* tryPromise({
|
|
@@ -3449,7 +3290,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
3449
3290
|
superviseReplica,
|
|
3450
3291
|
verificationExecutor
|
|
3451
3292
|
} = yield* agentRuntime;
|
|
3452
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
3293
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-mx1x1b6a.js"));
|
|
3453
3294
|
const settings = yield* runnerSettings;
|
|
3454
3295
|
const { concurrency, fullAccess, sshAgentAvailable } = settings;
|
|
3455
3296
|
const personal = input.runner.ownership.kind === "personal";
|
|
@@ -3667,7 +3508,7 @@ function mcpCommand(args) {
|
|
|
3667
3508
|
if (command.action === "run") {
|
|
3668
3509
|
if (command.args.length > 0)
|
|
3669
3510
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
3670
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
3511
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-eynqc0vm.js"));
|
|
3671
3512
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
3672
3513
|
}
|
|
3673
3514
|
if (command.action !== "setup")
|
|
@@ -4687,7 +4528,7 @@ function secretCommand(args) {
|
|
|
4687
4528
|
});
|
|
4688
4529
|
}
|
|
4689
4530
|
var PackageBuilder = Reference("kitman/cli/PackageBuilder", {
|
|
4690
|
-
defaultValue: () => (directory) => flatMap(promise(() => import("./chunk-
|
|
4531
|
+
defaultValue: () => (directory) => flatMap(promise(() => import("./chunk-50w9z6we.js")), (build) => build.buildPackage(directory))
|
|
4691
4532
|
});
|
|
4692
4533
|
var optionalEnv = (name) => String3(name).pipe(option2, map3(getOrUndefined));
|
|
4693
4534
|
var ciIdToken = (apiUrl) => gen(function* () {
|
|
@@ -4701,7 +4542,7 @@ var ciIdToken = (apiUrl) => gen(function* () {
|
|
|
4701
4542
|
const url = new URL(requestUrl);
|
|
4702
4543
|
const refused = (reason) => new CliError({ message: `GitHub Actions issued no ID token: ${reason}` });
|
|
4703
4544
|
url.searchParams.set("audience", apiUrl.replace(/\/+$/, ""));
|
|
4704
|
-
const response = yield* send(
|
|
4545
|
+
const response = yield* send(get3(url, { headers: { authorization: `Bearer ${requestToken}` } }), (cause) => refused(String(cause)));
|
|
4705
4546
|
if (response.status < 200 || response.status >= 300)
|
|
4706
4547
|
return yield* refused(`${response.status}; does the job have id-token: write?`);
|
|
4707
4548
|
const body = yield* response.text.pipe(mapError((error) => refused(error.message)));
|
|
@@ -5588,7 +5429,7 @@ function downloadPresignedAsset(download, outputPath) {
|
|
|
5588
5429
|
return gen(function* () {
|
|
5589
5430
|
const fs = yield* FileSystem;
|
|
5590
5431
|
const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
|
|
5591
|
-
const response = yield* send(
|
|
5432
|
+
const response = yield* send(make13(download.method)(download.url), failed);
|
|
5592
5433
|
if (response.status < 200 || response.status >= 300)
|
|
5593
5434
|
return yield* new CliError({ message: `Asset download failed with ${response.status}` });
|
|
5594
5435
|
const body = yield* response.arrayBuffer.pipe(mapError((error) => failed(error.message)));
|