@kitman-sh/cli 0.11.0-rc.3 → 0.11.0-rc.4
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-egb7pjjz.js → chunk-0h5et1rg.js} +6 -6
- package/dist/{chunk-vkgqtwqm.js → chunk-2aj4ym2c.js} +7 -7
- package/dist/{chunk-sk6ceghr.js → chunk-2sfgqfgq.js} +2 -2
- package/dist/{chunk-52ad8f0f.js → chunk-4ngdyd3k.js} +17 -17
- package/dist/{chunk-bs81bt3q.js → chunk-6zrq5xq2.js} +7 -7
- package/dist/{chunk-248msks2.js → chunk-7d8prq0a.js} +4 -4
- package/dist/{chunk-6pyxykt1.js → chunk-9ew87kjc.js} +7 -212
- package/dist/{chunk-japwbj9n.js → chunk-anf9ddey.js} +2 -2
- package/dist/{chunk-nzjb36ad.js → chunk-bj73db3f.js} +1 -1
- package/dist/{chunk-0qz10ek8.js → chunk-bv9e34qz.js} +1 -1
- package/dist/{chunk-rtqdqr0v.js → chunk-cbwmsy27.js} +464 -114
- package/dist/{chunk-5j848ckb.js → chunk-cegdw7gw.js} +2 -2
- package/dist/{chunk-x7b9bwk6.js → chunk-dc681k94.js} +4 -4
- package/dist/{chunk-cnzz61ta.js → chunk-k2b10qys.js} +19 -19
- package/dist/{chunk-9a2r12ye.js → chunk-k6mfj25g.js} +3 -3
- package/dist/{chunk-d9bv70qb.js → chunk-kbhm8p3c.js} +5 -5
- package/dist/{chunk-7fbpsnt7.js → chunk-nb36pw5d.js} +8 -8
- package/dist/{chunk-5hx3j5x8.js → chunk-pqz98b85.js} +5 -5
- package/dist/{chunk-z450wa10.js → chunk-rjdptgqf.js} +4 -4
- package/dist/{chunk-vmv7gwwr.js → chunk-tx61h9d8.js} +6 -6
- package/dist/{chunk-vtfwjhzh.js → chunk-txyp31q5.js} +60 -60
- package/dist/{chunk-c6rbt85q.js → chunk-xmq9zpr1.js} +1 -1
- package/dist/{chunk-b6m9rfzj.js → chunk-y0q2574w.js} +12 -12
- package/dist/{chunk-3d4d52e5.js → chunk-znh6xbze.js} +28 -177
- 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,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
Defect,
|
|
97
97
|
Exit,
|
|
98
98
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-txyp31q5.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-
|
|
111
|
+
} from "./chunk-znh6xbze.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-
|
|
126
|
+
} from "./chunk-cbwmsy27.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")) {
|
|
@@ -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) => {
|
|
@@ -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 = {
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2,
|
|
6
6
|
makeProgramRpcClient2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
13
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-7d8prq0a.js";
|
|
8
|
+
import"./chunk-0h5et1rg.js";
|
|
9
|
+
import"./chunk-cbwmsy27.js";
|
|
10
|
+
import"./chunk-bv9e34qz.js";
|
|
11
|
+
import"./chunk-xmq9zpr1.js";
|
|
12
|
+
import"./chunk-znh6xbze.js";
|
|
13
|
+
import"./chunk-txyp31q5.js";
|
|
14
14
|
export {
|
|
15
15
|
makeProgramRpcClient2 as makeProgramRpcClient,
|
|
16
16
|
makeRunnerRpcClient2 as makeRunnerRpcClient,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
map8,
|
|
23
23
|
raceFirst,
|
|
24
24
|
scoped
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-txyp31q5.js";
|
|
26
26
|
import {
|
|
27
27
|
unwrap,
|
|
28
28
|
drainFork,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
runCollect,
|
|
32
32
|
runDrain,
|
|
33
33
|
mkString
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-znh6xbze.js";
|
|
35
35
|
|
|
36
36
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
|
|
37
37
|
var redactedRegistry = /* @__PURE__ */ new WeakMap;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
succeed,
|
|
13
13
|
isSuccess,
|
|
14
14
|
TaggedError,
|
|
15
|
-
|
|
15
|
+
make15,
|
|
16
16
|
_await,
|
|
17
17
|
fail5,
|
|
18
18
|
succeed5,
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
decodeJsonString,
|
|
96
96
|
encodeJsonStringSync,
|
|
97
97
|
encodePrettyJsonString
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-txyp31q5.js";
|
|
99
99
|
import {
|
|
100
100
|
tap,
|
|
101
101
|
mapError,
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
withDefault,
|
|
108
108
|
option,
|
|
109
109
|
String2
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-znh6xbze.js";
|
|
111
111
|
import {
|
|
112
112
|
currentTimeMillis,
|
|
113
113
|
SecureRandom,
|
|
@@ -215,10 +215,10 @@ import {
|
|
|
215
215
|
harnessNames,
|
|
216
216
|
herdrRunnerCapabilities2,
|
|
217
217
|
declaredChecks
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-cbwmsy27.js";
|
|
219
219
|
import {
|
|
220
220
|
Id
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-bv9e34qz.js";
|
|
222
222
|
import {
|
|
223
223
|
toJsonValue,
|
|
224
224
|
isOneOf,
|
|
@@ -228,11 +228,11 @@ import {
|
|
|
228
228
|
isObject,
|
|
229
229
|
isJsonObject,
|
|
230
230
|
isString
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-xmq9zpr1.js";
|
|
232
232
|
import {
|
|
233
233
|
ChildProcessSpawner,
|
|
234
234
|
make3
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-2sfgqfgq.js";
|
|
236
236
|
|
|
237
237
|
// apps/cli/src/cli-error.ts
|
|
238
238
|
function cliErrorCode(error, status) {
|
|
@@ -527,10 +527,10 @@ var sandboxMissing = (sandbox, missing) => ({
|
|
|
527
527
|
var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
|
|
528
528
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
529
529
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
530
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
530
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-dc681k94.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
531
531
|
});
|
|
532
532
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
533
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
533
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-dc681k94.js")), (module) => module.updateHerdrCore(options))
|
|
534
534
|
});
|
|
535
535
|
var herdrCoreMissing = (error) => {
|
|
536
536
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -932,7 +932,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
932
932
|
});
|
|
933
933
|
var syncKits = (input) => gen(function* () {
|
|
934
934
|
const fs = yield* FileSystem;
|
|
935
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
935
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-nb36pw5d.js"));
|
|
936
936
|
const harnesses = yield* syncTargets(input.harness);
|
|
937
937
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
938
938
|
for (const { name, problem } of chain.skipped)
|
|
@@ -1850,7 +1850,7 @@ var package_default = {
|
|
|
1850
1850
|
};
|
|
1851
1851
|
|
|
1852
1852
|
// apps/cli/src/scaffold.ts
|
|
1853
|
-
var cliVersion = "0.11.0-rc.
|
|
1853
|
+
var cliVersion = "0.11.0-rc.4";
|
|
1854
1854
|
var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
1855
1855
|
name,
|
|
1856
1856
|
private: true,
|
|
@@ -2110,7 +2110,7 @@ var Usage = [
|
|
|
2110
2110
|
"Every run, loop, agent, verify, constraint, secret, claim, deploy, dev and kit command takes --json."
|
|
2111
2111
|
].join(`
|
|
2112
2112
|
`);
|
|
2113
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
2113
|
+
var agentRuntime = promise(() => import("./chunk-k2b10qys.js"));
|
|
2114
2114
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
2115
2115
|
defaultValue: () => gen(function* () {
|
|
2116
2116
|
const tui = yield* tryPromise({
|
|
@@ -3061,7 +3061,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
3061
3061
|
});
|
|
3062
3062
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
3063
3063
|
defaultValue: () => (options) => gen(function* () {
|
|
3064
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
3064
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-2aj4ym2c.js"));
|
|
3065
3065
|
return yield* makeRunnerRpcClient({
|
|
3066
3066
|
runnerId: options.runnerId,
|
|
3067
3067
|
bearer: options.bearer,
|
|
@@ -3341,7 +3341,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
3341
3341
|
const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
|
|
3342
3342
|
yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map8(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
|
|
3343
3343
|
const platform = yield* context();
|
|
3344
|
-
const updated = yield*
|
|
3344
|
+
const updated = yield* make15();
|
|
3345
3345
|
const scope = yield* scope2;
|
|
3346
3346
|
const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
|
|
3347
3347
|
const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
|
|
@@ -3584,7 +3584,7 @@ function mcpCommand(args) {
|
|
|
3584
3584
|
if (command.action === "run") {
|
|
3585
3585
|
if (command.args.length > 0)
|
|
3586
3586
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
3587
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
3587
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-6zrq5xq2.js"));
|
|
3588
3588
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
3589
3589
|
}
|
|
3590
3590
|
if (command.action !== "setup")
|
|
@@ -4838,9 +4838,9 @@ function changeRequestCommand(args) {
|
|
|
4838
4838
|
yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
|
|
4839
4839
|
});
|
|
4840
4840
|
}
|
|
4841
|
-
var KitWriter = map8(promise(() => import("./chunk-
|
|
4841
|
+
var KitWriter = map8(promise(() => import("./chunk-y0q2574w.js")), (build) => build.writeKit);
|
|
4842
4842
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
4843
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
4843
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-y0q2574w.js")), (build) => build.buildKit(directory))
|
|
4844
4844
|
});
|
|
4845
4845
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
4846
4846
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
decodeJsonStringOption,
|
|
108
108
|
encodeJsonStringSync,
|
|
109
109
|
encodePrettyJsonString
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-txyp31q5.js";
|
|
111
111
|
import {
|
|
112
112
|
currentTimeMillis,
|
|
113
113
|
SecureRandom,
|
|
@@ -159,13 +159,13 @@ import {
|
|
|
159
159
|
runMcpEffect,
|
|
160
160
|
createAgentAuthSignedFetch,
|
|
161
161
|
setupMcpAgentCredential
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-cbwmsy27.js";
|
|
163
163
|
import {
|
|
164
164
|
guard,
|
|
165
165
|
Id,
|
|
166
166
|
Timestamp,
|
|
167
167
|
ActorType
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-bv9e34qz.js";
|
|
169
169
|
import {
|
|
170
170
|
toJsonValue,
|
|
171
171
|
isOneOf,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
isJsonObject,
|
|
179
179
|
isString,
|
|
180
180
|
kindOf
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-xmq9zpr1.js";
|
|
182
182
|
import {
|
|
183
183
|
join,
|
|
184
184
|
interrupt,
|
|
@@ -192,17 +192,17 @@ import {
|
|
|
192
192
|
withDefault,
|
|
193
193
|
option,
|
|
194
194
|
String2
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-znh6xbze.js";
|
|
196
196
|
import {
|
|
197
197
|
nextInt
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-bj73db3f.js";
|
|
199
199
|
import {
|
|
200
200
|
layerJson,
|
|
201
201
|
make4,
|
|
202
202
|
withHeaders,
|
|
203
203
|
layerProtocolSocket,
|
|
204
204
|
ConnectionHooks
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-0h5et1rg.js";
|
|
206
206
|
|
|
207
207
|
// apps/cli/src/mcp.ts
|
|
208
208
|
import { tmpdir as tmpdir2 } from "os";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
gen,
|
|
7
7
|
flatMap3,
|
|
8
8
|
provideContext2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-txyp31q5.js";
|
|
10
10
|
import {
|
|
11
11
|
runForEach
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-znh6xbze.js";
|
|
13
13
|
import {
|
|
14
14
|
WebSocketConstructor,
|
|
15
15
|
layerWebSocketConstructorGlobal,
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
RunnerReplicaRpcs,
|
|
20
20
|
RunnerRunFileRpcs,
|
|
21
21
|
ProgramRpcs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-cbwmsy27.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
25
|
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-0h5et1rg.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -38,7 +38,6 @@ import {
|
|
|
38
38
|
fnUntraced,
|
|
39
39
|
makeFormatterStandardSchemaV1,
|
|
40
40
|
transform,
|
|
41
|
-
declare,
|
|
42
41
|
is,
|
|
43
42
|
encodeEffect,
|
|
44
43
|
isSchema,
|
|
@@ -46,7 +45,6 @@ import {
|
|
|
46
45
|
optional,
|
|
47
46
|
Literal,
|
|
48
47
|
Never,
|
|
49
|
-
Null,
|
|
50
48
|
String4,
|
|
51
49
|
Boolean2,
|
|
52
50
|
Void,
|
|
@@ -72,24 +70,15 @@ import {
|
|
|
72
70
|
Cause,
|
|
73
71
|
Class2,
|
|
74
72
|
TaggedError2,
|
|
75
|
-
toEquivalence,
|
|
76
73
|
toCodecJson,
|
|
77
74
|
Json
|
|
78
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-txyp31q5.js";
|
|
79
76
|
import {
|
|
80
77
|
guard
|
|
81
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-bv9e34qz.js";
|
|
82
79
|
import {
|
|
83
80
|
currentTimeMillis,
|
|
84
81
|
WebCrypto,
|
|
85
|
-
SafeJson,
|
|
86
|
-
AgentSandboxNetwork,
|
|
87
|
-
AgentEfforts,
|
|
88
|
-
AgentCapabilities,
|
|
89
|
-
LoopDataSchemaRef,
|
|
90
|
-
LoopVersion,
|
|
91
|
-
ProgramLoop,
|
|
92
|
-
AgentFallback,
|
|
93
82
|
ProgramWorkUnit,
|
|
94
83
|
MeasureEvidence,
|
|
95
84
|
CatchUp,
|
|
@@ -101,15 +90,15 @@ import {
|
|
|
101
90
|
bodyUint8Array,
|
|
102
91
|
filterStatusOk,
|
|
103
92
|
HttpClient,
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
LoopCapabilities,
|
|
94
|
+
LoopManifest,
|
|
106
95
|
KitSetup,
|
|
107
96
|
RunnerRpcError
|
|
108
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-cbwmsy27.js";
|
|
109
98
|
import {
|
|
110
99
|
runForEach,
|
|
111
100
|
FileSystem
|
|
112
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-znh6xbze.js";
|
|
113
102
|
|
|
114
103
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
|
|
115
104
|
var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");
|
|
@@ -135,200 +124,6 @@ var sha256 = {
|
|
|
135
124
|
implementation: undefined
|
|
136
125
|
};
|
|
137
126
|
|
|
138
|
-
// packages/core/src/schedule.ts
|
|
139
|
-
var ScheduleFrequency = ["daily", "weekly"];
|
|
140
|
-
var ScheduleMisfirePolicies = ["skip", "fire_once", "catch_up"];
|
|
141
|
-
var ScheduleOverlapPolicies = ["allow", "skip", "coalesce"];
|
|
142
|
-
var ScheduleVersionStatuses = ["draft", "published", "disabled", "archived"];
|
|
143
|
-
var ScheduleCalendarRule = Struct({
|
|
144
|
-
frequency: Literals(ScheduleFrequency),
|
|
145
|
-
hour: Int.check(isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(23)),
|
|
146
|
-
minute: Int.check(isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(59)),
|
|
147
|
-
second: optionalKey(Int.check(isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(59))),
|
|
148
|
-
daysOfWeek: optionalKey(ArraySchema(Int.check(isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(6))).check(isMinLength(1), isMaxLength(7)))
|
|
149
|
-
});
|
|
150
|
-
var ScheduleCronRule = Struct({
|
|
151
|
-
cron: String4.check(isMinLength(9), isMaxLength(200), isPattern(new RegExp("^[0-9*,/-]+( [0-9*,/-]+){4}$", "u")))
|
|
152
|
-
});
|
|
153
|
-
var ScheduleRule = Union([ScheduleCalendarRule, ScheduleCronRule]);
|
|
154
|
-
var cronBounds = [
|
|
155
|
-
[0, 59],
|
|
156
|
-
[0, 23],
|
|
157
|
-
[1, 31],
|
|
158
|
-
[1, 12],
|
|
159
|
-
[0, 7]
|
|
160
|
-
];
|
|
161
|
-
function cronField(field, [min, max]) {
|
|
162
|
-
const values = new Set;
|
|
163
|
-
for (const part of field.split(",")) {
|
|
164
|
-
const match = /^(\*|(\d+)(?:-(\d+))?)(?:\/(\d+))?$/.exec(part);
|
|
165
|
-
if (match === null)
|
|
166
|
-
return;
|
|
167
|
-
const from = match[1] === "*" ? min : Number(match[2]);
|
|
168
|
-
const to = match[1] === "*" ? max : match[3] === undefined ? match[4] === undefined ? from : max : Number(match[3]);
|
|
169
|
-
const step = match[4] === undefined ? 1 : Number(match[4]);
|
|
170
|
-
if (from < min || to > max || from > to || step < 1)
|
|
171
|
-
return;
|
|
172
|
-
for (let value = from;value <= to; value += step)
|
|
173
|
-
values.add(value);
|
|
174
|
-
}
|
|
175
|
-
return values;
|
|
176
|
-
}
|
|
177
|
-
function parseCron(cron) {
|
|
178
|
-
const fields = cron.split(" ");
|
|
179
|
-
const [minutes, hours, days, months, weekdays] = fields.map((field, index) => cronField(field, cronBounds[index] ?? [0, 0]));
|
|
180
|
-
if (fields.length !== 5 || !minutes || !hours || !days || !months || !weekdays)
|
|
181
|
-
return;
|
|
182
|
-
return {
|
|
183
|
-
minutes,
|
|
184
|
-
hours,
|
|
185
|
-
days,
|
|
186
|
-
months,
|
|
187
|
-
weekdays: new Set([...weekdays].map((value) => value % 7)),
|
|
188
|
-
dayRestricted: !(fields[2] ?? "").startsWith("*"),
|
|
189
|
-
weekdayRestricted: !(fields[4] ?? "").startsWith("*")
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function isScheduleRule(value) {
|
|
193
|
-
return guard(ScheduleRule)(value) && (!("cron" in value) || parseCron(value.cron) !== undefined);
|
|
194
|
-
}
|
|
195
|
-
var ScheduleVersion = Struct({
|
|
196
|
-
contractVersion: Literal("schedule.v1"),
|
|
197
|
-
id: String4.check(isMinLength(1)),
|
|
198
|
-
scheduleId: String4.check(isMinLength(1)),
|
|
199
|
-
workspaceId: String4.check(isMinLength(1)),
|
|
200
|
-
teamId: optionalKey(String4.check(isMinLength(1))),
|
|
201
|
-
loopId: optionalKey(String4.check(isMinLength(1))),
|
|
202
|
-
name: optionalKey(String4.check(isMinLength(1), isMaxLength(200))),
|
|
203
|
-
version: Int.check(isGreaterThanOrEqualTo(1)),
|
|
204
|
-
status: Literals(ScheduleVersionStatuses),
|
|
205
|
-
timezone: String4.check(isMinLength(1), isMaxLength(80)),
|
|
206
|
-
rule: ScheduleRule,
|
|
207
|
-
misfirePolicy: Literals(ScheduleMisfirePolicies),
|
|
208
|
-
overlapPolicy: Literals(ScheduleOverlapPolicies),
|
|
209
|
-
maxCatchUp: Int.check(isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(200)),
|
|
210
|
-
misfireGraceSeconds: optionalKey(Int.check(isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(604800))),
|
|
211
|
-
inputSchemaRef: optionalKey(LoopDataSchemaRef),
|
|
212
|
-
input: optionalKey(SafeJson),
|
|
213
|
-
createdAt: String4.check(isMinLength(1))
|
|
214
|
-
});
|
|
215
|
-
var zones = new Map;
|
|
216
|
-
var resolvedLocalDateTimes = new Map;
|
|
217
|
-
|
|
218
|
-
// packages/core/src/kit-declarations.ts
|
|
219
|
-
var LoopCapabilities = [
|
|
220
|
-
"agent_work",
|
|
221
|
-
"ask",
|
|
222
|
-
"call",
|
|
223
|
-
"verify",
|
|
224
|
-
"change_request",
|
|
225
|
-
"write_back",
|
|
226
|
-
"post_comment",
|
|
227
|
-
"create_tasks",
|
|
228
|
-
"merge_change_request",
|
|
229
|
-
"approve_change_request",
|
|
230
|
-
"publish_release",
|
|
231
|
-
"read_transcripts",
|
|
232
|
-
"read_change_request",
|
|
233
|
-
"measure",
|
|
234
|
-
"claim",
|
|
235
|
-
"propose",
|
|
236
|
-
"read_project",
|
|
237
|
-
"draft_update"
|
|
238
|
-
];
|
|
239
|
-
var JsonObject = Record(String4, Json);
|
|
240
|
-
var SecretName = String4.check(isPattern(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/));
|
|
241
|
-
var EventFilterValue = Union([String4, Finite, Boolean2, Null]);
|
|
242
|
-
var LoopManifest = Struct({
|
|
243
|
-
id: String4,
|
|
244
|
-
title: String4,
|
|
245
|
-
version: optionalKey(LoopVersion),
|
|
246
|
-
input: JsonObject,
|
|
247
|
-
output: JsonObject,
|
|
248
|
-
outcome: optionalKey(Literals(["feature", "bug", "refactor", "investigation", "docs", "migration", "performance"])),
|
|
249
|
-
agents: Record(String4, String4),
|
|
250
|
-
checkout: Literals(["none", "read", "write"]),
|
|
251
|
-
when: ArraySchema(Struct({
|
|
252
|
-
event: String4,
|
|
253
|
-
filter: optionalKey(Record(String4, Union([EventFilterValue, ArraySchema(EventFilterValue)]))),
|
|
254
|
-
input: Record(String4, String4),
|
|
255
|
-
values: optionalKey(JsonObject)
|
|
256
|
-
})),
|
|
257
|
-
offers: ArraySchema(Struct({
|
|
258
|
-
id: String4,
|
|
259
|
-
title: String4,
|
|
260
|
-
loop: String4,
|
|
261
|
-
from: optionalKey(String4)
|
|
262
|
-
})),
|
|
263
|
-
capabilities: ArraySchema(Literals(LoopCapabilities)),
|
|
264
|
-
ownCapabilities: optionalKey(ArraySchema(Literals(LoopCapabilities))),
|
|
265
|
-
secrets: optionalKey(ArraySchema(SecretName)),
|
|
266
|
-
network: optionalKey(AgentSandboxNetwork),
|
|
267
|
-
schedule: optionalKey(Struct({ rule: ScheduleRule, timezone: String4 }))
|
|
268
|
-
});
|
|
269
|
-
var LoopDetail = Struct({
|
|
270
|
-
id: String4,
|
|
271
|
-
resolved: optionalKey(Struct({
|
|
272
|
-
...ProgramLoop.fields,
|
|
273
|
-
agents: LoopManifest.fields.agents,
|
|
274
|
-
when: LoopManifest.fields.when,
|
|
275
|
-
schedule: optionalKey(Struct({
|
|
276
|
-
rule: ScheduleRule,
|
|
277
|
-
timezone: String4,
|
|
278
|
-
on: Boolean2,
|
|
279
|
-
nextRunAt: optionalKey(String4)
|
|
280
|
-
}))
|
|
281
|
-
}))
|
|
282
|
-
});
|
|
283
|
-
var AgentDeclaration = Struct({
|
|
284
|
-
extends: optionalKey(String4),
|
|
285
|
-
instructions: optionalKey(String4),
|
|
286
|
-
harness: optionalKey(String4),
|
|
287
|
-
model: optionalKey(String4),
|
|
288
|
-
effort: optionalKey(Literals(AgentEfforts)),
|
|
289
|
-
fallbacks: optionalKey(ArraySchema(AgentFallback)),
|
|
290
|
-
tools: optionalKey(ArraySchema(Literals(AgentCapabilities))),
|
|
291
|
-
skills: optionalKey(ArraySchema(String4.check(isMinLength(1)))),
|
|
292
|
-
network: optionalKey(Union([Struct({ hosts: ArraySchema(String4) }), Literal("open")])),
|
|
293
|
-
sandbox: optionalKey(Literal("docker"))
|
|
294
|
-
});
|
|
295
|
-
var scheduleFields = {
|
|
296
|
-
name: String4.check(isMinLength(1)),
|
|
297
|
-
loop: String4,
|
|
298
|
-
team: optionalKey(String4),
|
|
299
|
-
input: optionalKey(JsonObject),
|
|
300
|
-
timezone: String4,
|
|
301
|
-
misfire: optionalKey(Literals(ScheduleMisfirePolicies)),
|
|
302
|
-
overlap: optionalKey(Literals(ScheduleOverlapPolicies))
|
|
303
|
-
};
|
|
304
|
-
var ScheduleDeclaration = Union([
|
|
305
|
-
Struct({
|
|
306
|
-
...scheduleFields,
|
|
307
|
-
cron: String4.check(makeFilter((cron) => isScheduleRule({ cron }) || "five cron fields, each within its range"))
|
|
308
|
-
}),
|
|
309
|
-
Struct({
|
|
310
|
-
...scheduleFields,
|
|
311
|
-
rule: declare((value) => isScheduleRule(value), {
|
|
312
|
-
expected: "a Schedule rule: frequency daily or weekly, hour, minute, and optionally second and daysOfWeek"
|
|
313
|
-
})
|
|
314
|
-
})
|
|
315
|
-
]);
|
|
316
|
-
var CarriedKit = Struct({
|
|
317
|
-
name: KitName,
|
|
318
|
-
version: String4.check(isMinLength(1)),
|
|
319
|
-
setup: KitDigest,
|
|
320
|
-
loops: ArraySchema(String4),
|
|
321
|
-
agents: ArraySchema(String4)
|
|
322
|
-
});
|
|
323
|
-
var KitDeclarations = Struct({
|
|
324
|
-
loops: ArraySchema(LoopManifest),
|
|
325
|
-
agents: Record(String4, AgentDeclaration),
|
|
326
|
-
schedules: optionalKey(Record(String4, ScheduleDeclaration)),
|
|
327
|
-
carried: optionalKey(ArraySchema(CarriedKit))
|
|
328
|
-
});
|
|
329
|
-
var sameLoop = toEquivalence(LoopManifest);
|
|
330
|
-
var sameAgent = toEquivalence(AgentDeclaration);
|
|
331
|
-
|
|
332
127
|
// packages/sdk/src/loop/define.ts
|
|
333
128
|
var LoopOutcome = Literals([
|
|
334
129
|
"feature",
|
|
@@ -1136,4 +931,4 @@ var redirectStatuses = new Set([301, 302, 303, 307, 308]);
|
|
|
1136
931
|
var readStdin = tryPromise(() => Bun.stdin.text());
|
|
1137
932
|
var isWorkUnit = guard(ProgramWorkUnit);
|
|
1138
933
|
|
|
1139
|
-
export {
|
|
934
|
+
export { uploadRunFile, programLease, rpcRunFiles, describeFlag, Described, programHostsEnv, undeclaredHostsEnv };
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
writeSrtSettings2,
|
|
15
15
|
srtStepArgv2,
|
|
16
16
|
srtArgv2
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import"./chunk-
|
|
17
|
+
} from "./chunk-znh6xbze.js";
|
|
18
|
+
import"./chunk-txyp31q5.js";
|
|
19
19
|
export {
|
|
20
20
|
compiled2 as compiled,
|
|
21
21
|
harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isMinLength,
|
|
19
19
|
isMaxLength,
|
|
20
20
|
FiniteFromString
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-txyp31q5.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"];
|