@kitman-sh/cli 0.10.90 → 0.10.91

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-xb70ys3n.js → chunk-25q7mg6g.js} +17 -17
  2. package/dist/{chunk-x11j5jcj.js → chunk-2wsyg2g7.js} +46 -38
  3. package/dist/{chunk-py4t32pa.js → chunk-5fxxg02f.js} +340 -144
  4. package/dist/{chunk-e8zm8z3a.js → chunk-5tqy48a3.js} +10 -10
  5. package/dist/{chunk-75d425rk.js → chunk-6h0rz0zk.js} +4 -4
  6. package/dist/{chunk-j9frwmmt.js → chunk-947btdv6.js} +3 -3
  7. package/dist/{chunk-fq47a5yd.js → chunk-9m9cv82t.js} +2 -2
  8. package/dist/{chunk-76ctrqm6.js → chunk-c3k32vw4.js} +1 -1
  9. package/dist/{chunk-9zd52pda.js → chunk-cmtvcbxr.js} +5 -5
  10. package/dist/{chunk-bbvvx5z1.js → chunk-d82t42vr.js} +16 -16
  11. package/dist/{chunk-5vsqzmvf.js → chunk-d9wjvvbc.js} +5 -5
  12. package/dist/{chunk-jbwk6k6m.js → chunk-dstm8aen.js} +71 -28
  13. package/dist/{chunk-0gs7cjkt.js → chunk-fgnfx5mw.js} +7 -212
  14. package/dist/{chunk-mgmsx0bm.js → chunk-gncygm43.js} +9 -9
  15. package/dist/{chunk-yx90ye72.js → chunk-gykt7zjx.js} +7 -7
  16. package/dist/{chunk-62565d52.js → chunk-hsf2sj69.js} +2 -2
  17. package/dist/{chunk-tzz4fv17.js → chunk-k4fvnphp.js} +1 -1
  18. package/dist/{chunk-kgdppbdr.js → chunk-mbqeakm1.js} +1 -1
  19. package/dist/{chunk-dd5aa39j.js → chunk-r6d67qqa.js} +263 -34
  20. package/dist/{chunk-ky974pcr.js → chunk-rmsm8vnc.js} +4 -4
  21. package/dist/{chunk-rq6bn96v.js → chunk-sb8c2sgy.js} +16 -16
  22. package/dist/{chunk-jq8hhvdv.js → chunk-tmbhak7y.js} +8 -8
  23. package/dist/{chunk-98sg1yyd.js → chunk-w0sehmpd.js} +14 -60
  24. package/dist/{chunk-m1ewm9dy.js → chunk-y1tnxz9f.js} +25 -25
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -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-jbwk6k6m.js";
75
+ } from "./chunk-dstm8aen.js";
79
76
  import {
80
77
  guard
81
- } from "./chunk-kgdppbdr.js";
78
+ } from "./chunk-mbqeakm1.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
- KitName,
105
- KitDigest,
93
+ LoopCapabilities,
94
+ LoopManifest,
106
95
  KitSetup,
107
96
  RunnerRpcError
108
- } from "./chunk-py4t32pa.js";
97
+ } from "./chunk-5fxxg02f.js";
109
98
  import {
110
99
  runForEach,
111
100
  FileSystem
112
- } from "./chunk-xb70ys3n.js";
101
+ } from "./chunk-25q7mg6g.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",
@@ -1131,4 +926,4 @@ var redirectStatuses = new Set([301, 302, 303, 307, 308]);
1131
926
  var readStdin = tryPromise(() => Bun.stdin.text());
1132
927
  var isWorkUnit = guard(ProgramWorkUnit);
1133
928
 
1134
- export { AgentDeclaration, KitDeclarations, uploadRunFile, programLease, rpcRunFiles, describeFlag, Described, programHostsEnv, undeclaredHostsEnv };
929
+ export { uploadRunFile, programLease, rpcRunFiles, describeFlag, Described, programHostsEnv, undeclaredHostsEnv };
@@ -6,10 +6,7 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-jbwk6k6m.js";
10
- import {
11
- runForEach
12
- } from "./chunk-xb70ys3n.js";
9
+ } from "./chunk-dstm8aen.js";
13
10
  import {
14
11
  WebSocketConstructor,
15
12
  layerWebSocketConstructorGlobal,
@@ -19,13 +16,16 @@ import {
19
16
  RunnerReplicaRpcs,
20
17
  RunnerRunFileRpcs,
21
18
  ProgramRpcs
22
- } from "./chunk-py4t32pa.js";
19
+ } from "./chunk-5fxxg02f.js";
20
+ import {
21
+ runForEach
22
+ } from "./chunk-25q7mg6g.js";
23
23
  import {
24
24
  layerJson,
25
- make4,
25
+ make3,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-rq6bn96v.js";
28
+ } from "./chunk-sb8c2sgy.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -46,7 +46,7 @@ var authorizer = (options) => (call) => flatMap3(options.bearer, (token) => with
46
46
  var RunnerProcessRpcs = RunnerReplicaRpcs.merge(RunnerRunFileRpcs);
47
47
  var makeRunnerRpcClient2 = (options) => gen(function* () {
48
48
  const protocol = yield* build(options.protocol);
49
- const client = yield* make4(RunnerProcessRpcs).pipe(provideContext2(protocol));
49
+ const client = yield* make3(RunnerProcessRpcs).pipe(provideContext2(protocol));
50
50
  const authorized = authorizer(options);
51
51
  return {
52
52
  claim: (input) => authorized(client.Claim(input)),
@@ -74,7 +74,7 @@ var makeRunnerRpcClient2 = (options) => gen(function* () {
74
74
  });
75
75
  var makeProgramRpcClient2 = (options) => gen(function* () {
76
76
  const protocol = yield* build(options.protocol);
77
- const client = yield* make4(ProgramRpcs).pipe(provideContext2(protocol));
77
+ const client = yield* make3(ProgramRpcs).pipe(provideContext2(protocol));
78
78
  const authorized = authorizer(options);
79
79
  return {
80
80
  recordActivity: (input) => authorized(client.RecordActivity(input)),
@@ -4,13 +4,13 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-mgmsx0bm.js";
8
- import"./chunk-rq6bn96v.js";
9
- import"./chunk-py4t32pa.js";
10
- import"./chunk-kgdppbdr.js";
11
- import"./chunk-tzz4fv17.js";
12
- import"./chunk-xb70ys3n.js";
13
- import"./chunk-jbwk6k6m.js";
7
+ } from "./chunk-gncygm43.js";
8
+ import"./chunk-sb8c2sgy.js";
9
+ import"./chunk-5fxxg02f.js";
10
+ import"./chunk-mbqeakm1.js";
11
+ import"./chunk-k4fvnphp.js";
12
+ import"./chunk-25q7mg6g.js";
13
+ import"./chunk-dstm8aen.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
16
16
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-jbwk6k6m.js";
16
+ } from "./chunk-dstm8aen.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-kgdppbdr.js";
20
+ } from "./chunk-mbqeakm1.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -8,7 +8,7 @@ import {
8
8
  isFunction2,
9
9
  isUndefined2,
10
10
  isObjectOrArray
11
- } from "./chunk-jbwk6k6m.js";
11
+ } from "./chunk-dstm8aen.js";
12
12
 
13
13
  // packages/core/src/runtime-type.ts
14
14
  var UnsafeJsonObjectKeys = new Set(["__proto__", "constructor", "prototype"]);
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-jbwk6k6m.js";
21
+ } from "./chunk-dstm8aen.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"];