@kitman-sh/cli 0.10.53 → 0.10.54
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-x9dhxfts.js → chunk-148mjppg.js} +5 -5
- package/dist/{chunk-mej2bx5n.js → chunk-19aqk325.js} +4 -4
- package/dist/{chunk-jafetf7z.js → chunk-3d6abgjh.js} +2 -2
- package/dist/{chunk-pp1p3g6e.js → chunk-4kssrezn.js} +6 -1
- package/dist/{chunk-ctasxxz5.js → chunk-5j3cxsnp.js} +10 -10
- package/dist/{chunk-7thnf14y.js → chunk-5y5axze6.js} +609 -6
- package/dist/{chunk-mbctzx7e.js → chunk-61k67vxh.js} +76 -1389
- package/dist/{chunk-arvwar2c.js → chunk-7evwar6b.js} +1 -1
- package/dist/{chunk-p6spvbwq.js → chunk-c0wrcam4.js} +30 -32
- package/dist/{chunk-eg8f5ncv.js → chunk-dkpqwk0q.js} +7 -7
- package/dist/{chunk-r8p3nxcp.js → chunk-eerh2t20.js} +10 -10
- package/dist/chunk-g7vk5tjp.js +1109 -0
- package/dist/{chunk-vjmz23rs.js → chunk-gwcqz1bj.js} +1 -1
- package/dist/{chunk-wh1pa2aa.js → chunk-m32wb6t0.js} +245 -108
- package/dist/{chunk-3bj7sc3v.js → chunk-mmetyep8.js} +7 -7
- package/dist/{chunk-30397r95.js → chunk-mtgkvbk4.js} +4 -4
- package/dist/{chunk-jagzz148.js → chunk-my987gxf.js} +20 -24
- package/dist/{chunk-dzh9e6n2.js → chunk-q0yna8sw.js} +52 -35
- package/dist/{chunk-6vns3ej0.js → chunk-rjfxnk05.js} +5 -5
- package/dist/{chunk-g5bs3f6z.js → chunk-twp7aprz.js} +4 -6
- package/dist/{chunk-x0b92bjb.js → chunk-vtn088tq.js} +6 -6
- package/dist/{chunk-b6thzgc9.js → chunk-wczs5vrq.js} +2 -2
- package/dist/{chunk-11p4wf6n.js → chunk-xgwjcq4z.js} +3 -3
- package/dist/{chunk-v290mf51.js → chunk-y48wz1sa.js} +157 -33
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-1mc9vgcr.js +0 -39
- package/dist/chunk-jfvq7s24.js +0 -145
- package/dist/chunk-txwt6r25.js +0 -1731
- package/dist/chunk-vyv0p5eq.js +0 -3183
- package/dist/chunk-z821b2gp.js +0 -164
|
@@ -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-vtn088tq.js";
|
|
11
|
+
import"./chunk-mmetyep8.js";
|
|
12
|
+
import"./chunk-7evwar6b.js";
|
|
13
|
+
import"./chunk-xgwjcq4z.js";
|
|
14
|
+
import"./chunk-61k67vxh.js";
|
|
15
15
|
export {
|
|
16
16
|
decoded2 as decoded,
|
|
17
17
|
decodedOption2 as decodedOption,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
Record,
|
|
25
25
|
Int,
|
|
26
26
|
fromJsonString
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-61k67vxh.js";
|
|
28
28
|
import {
|
|
29
29
|
withDefault,
|
|
30
30
|
String2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-xgwjcq4z.js";
|
|
32
32
|
import {
|
|
33
33
|
digestSha256,
|
|
34
34
|
digestSha512,
|
|
@@ -36,11 +36,9 @@ import {
|
|
|
36
36
|
schemaBodyJson,
|
|
37
37
|
filterStatusOk,
|
|
38
38
|
get2,
|
|
39
|
-
layer2
|
|
40
|
-
} from "./chunk-wh1pa2aa.js";
|
|
41
|
-
import {
|
|
39
|
+
layer2,
|
|
42
40
|
KitDigest
|
|
43
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-m32wb6t0.js";
|
|
44
42
|
|
|
45
43
|
// packages/core/src/npm-registry.ts
|
|
46
44
|
var KitManifest = Struct({
|
|
@@ -22,21 +22,21 @@ import {
|
|
|
22
22
|
NullOr,
|
|
23
23
|
Finite,
|
|
24
24
|
encodeUnknownJsonStringSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-61k67vxh.js";
|
|
26
26
|
import {
|
|
27
27
|
isNumber,
|
|
28
28
|
isJsonObject,
|
|
29
29
|
isString
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7evwar6b.js";
|
|
31
31
|
import {
|
|
32
32
|
make11,
|
|
33
33
|
runForEach,
|
|
34
34
|
compiled2
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-xgwjcq4z.js";
|
|
36
36
|
import {
|
|
37
37
|
ChildProcessSpawner,
|
|
38
|
-
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
make3
|
|
39
|
+
} from "./chunk-mmetyep8.js";
|
|
40
40
|
|
|
41
41
|
// packages/agent-runtime/src/opencode-store.ts
|
|
42
42
|
import { lstatSync, readFileSync, realpathSync } from "fs";
|
|
@@ -164,7 +164,7 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
|
|
|
164
164
|
var isolatedRead = (store, name, input) => gen(function* () {
|
|
165
165
|
const spawner = yield* ChildProcessSpawner;
|
|
166
166
|
const [command, ...args] = opencodeReaderCommand();
|
|
167
|
-
const handle = yield* spawner.spawn(
|
|
167
|
+
const handle = yield* spawner.spawn(make3(command, args, {
|
|
168
168
|
stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
|
|
169
169
|
stderr: "ignore",
|
|
170
170
|
extendEnv: false,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
writeSrtSettings2,
|
|
14
14
|
srtStepArgv2,
|
|
15
15
|
srtArgv2
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import"./chunk-
|
|
16
|
+
} from "./chunk-xgwjcq4z.js";
|
|
17
|
+
import"./chunk-61k67vxh.js";
|
|
18
18
|
export {
|
|
19
19
|
compiled2 as compiled,
|
|
20
20
|
harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
|
|
@@ -195,11 +195,11 @@ import {
|
|
|
195
195
|
toEncoded,
|
|
196
196
|
decodeUnknownEffect,
|
|
197
197
|
SchemaError,
|
|
198
|
-
|
|
198
|
+
make17,
|
|
199
199
|
String4,
|
|
200
200
|
toCodecStringTree,
|
|
201
201
|
encodeUnknownJsonStringSync
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-61k67vxh.js";
|
|
203
203
|
|
|
204
204
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
205
205
|
var headUnsafe = (self) => {
|
|
@@ -3438,7 +3438,7 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
|
3438
3438
|
function schema(codec, path) {
|
|
3439
3439
|
const codecStringTree = toCodecStringTree(codec);
|
|
3440
3440
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3441
|
-
const decodeCursor = decodeUnknownEffect(
|
|
3441
|
+
const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
|
|
3442
3442
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3443
3443
|
return make14((provider, pathPrefix) => {
|
|
3444
3444
|
const fullPath = [...pathPrefix, ...localPath];
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOrUndefined,
|
|
7
7
|
Reference,
|
|
8
8
|
TaggedError,
|
|
9
|
-
|
|
9
|
+
make16,
|
|
10
10
|
_await,
|
|
11
11
|
fail5,
|
|
12
12
|
succeed5,
|
|
@@ -71,16 +71,21 @@ import {
|
|
|
71
71
|
is,
|
|
72
72
|
decodeUnknownEffect2,
|
|
73
73
|
decodeEffect,
|
|
74
|
+
optionalKey,
|
|
75
|
+
Literal,
|
|
74
76
|
String4,
|
|
75
77
|
Struct,
|
|
76
78
|
Record,
|
|
77
79
|
ArraySchema,
|
|
80
|
+
Union,
|
|
78
81
|
isPattern,
|
|
82
|
+
isMinLength,
|
|
83
|
+
isMaxLength,
|
|
79
84
|
fromJsonString,
|
|
80
85
|
decodeJsonString,
|
|
81
86
|
encodeJsonStringSync,
|
|
82
87
|
encodePrettyJsonString
|
|
83
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-61k67vxh.js";
|
|
84
89
|
import {
|
|
85
90
|
tap,
|
|
86
91
|
mapError,
|
|
@@ -92,7 +97,7 @@ import {
|
|
|
92
97
|
withDefault,
|
|
93
98
|
option,
|
|
94
99
|
String2
|
|
95
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-xgwjcq4z.js";
|
|
96
101
|
import {
|
|
97
102
|
currentTimeMillis,
|
|
98
103
|
SecureRandom,
|
|
@@ -130,7 +135,7 @@ import {
|
|
|
130
135
|
digestSha256,
|
|
131
136
|
sha256Hasher,
|
|
132
137
|
raw,
|
|
133
|
-
|
|
138
|
+
make5,
|
|
134
139
|
get,
|
|
135
140
|
put,
|
|
136
141
|
HttpClient,
|
|
@@ -139,6 +144,7 @@ import {
|
|
|
139
144
|
layer2,
|
|
140
145
|
runDisplayLabels,
|
|
141
146
|
listedSummary,
|
|
147
|
+
defaultKitName,
|
|
142
148
|
SetupArchive,
|
|
143
149
|
KitmanClientError,
|
|
144
150
|
KitmanEffectClient,
|
|
@@ -191,7 +197,10 @@ import {
|
|
|
191
197
|
harnessNames,
|
|
192
198
|
herdrRunnerCapabilities2,
|
|
193
199
|
declaredChecks
|
|
194
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-m32wb6t0.js";
|
|
201
|
+
import {
|
|
202
|
+
Id
|
|
203
|
+
} from "./chunk-4kssrezn.js";
|
|
195
204
|
import {
|
|
196
205
|
toJsonValue,
|
|
197
206
|
isOneOf,
|
|
@@ -201,12 +210,11 @@ import {
|
|
|
201
210
|
isObject,
|
|
202
211
|
isJsonObject,
|
|
203
212
|
isString
|
|
204
|
-
} from "./chunk-
|
|
205
|
-
import"./chunk-pp1p3g6e.js";
|
|
213
|
+
} from "./chunk-7evwar6b.js";
|
|
206
214
|
import {
|
|
207
215
|
ChildProcessSpawner,
|
|
208
|
-
|
|
209
|
-
} from "./chunk-
|
|
216
|
+
make3
|
|
217
|
+
} from "./chunk-mmetyep8.js";
|
|
210
218
|
|
|
211
219
|
// apps/cli/src/cli-error.ts
|
|
212
220
|
function cliErrorCode(error, status) {
|
|
@@ -254,6 +262,123 @@ var cliErrorLine = (error) => error instanceof Error ? error.message : String(er
|
|
|
254
262
|
|
|
255
263
|
// apps/cli/src/commands.ts
|
|
256
264
|
import { homedir } from "os";
|
|
265
|
+
|
|
266
|
+
// packages/core/src/marketplace.ts
|
|
267
|
+
import { parse } from "@babel/parser";
|
|
268
|
+
import { traverseFast } from "@babel/types";
|
|
269
|
+
var Name = String4.check(isMinLength(1), isMaxLength(200));
|
|
270
|
+
var Identifier = String4.check(isPattern(/^[A-Za-z_$][\w$]*$/u));
|
|
271
|
+
var KitName = String4.check(isPattern(/^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/u));
|
|
272
|
+
var MarketplaceReference = Struct({
|
|
273
|
+
id: String4.check(isPattern(/^[a-z0-9][a-z0-9-]{0,79}$/u)),
|
|
274
|
+
kind: Literal("kit"),
|
|
275
|
+
name: Name,
|
|
276
|
+
publisher: Name,
|
|
277
|
+
description: String4.check(isMaxLength(1000)),
|
|
278
|
+
category: Name,
|
|
279
|
+
package: KitName,
|
|
280
|
+
source: Union([
|
|
281
|
+
Struct({ type: Literal("npm"), version: optionalKey(Name) }),
|
|
282
|
+
Struct({
|
|
283
|
+
type: Literal("git"),
|
|
284
|
+
url: String4.check(isPattern(/^https:\/\/\S+$/u)),
|
|
285
|
+
ref: optionalKey(Name)
|
|
286
|
+
})
|
|
287
|
+
]),
|
|
288
|
+
loops: ArraySchema(Struct({ id: Name, export: Identifier }))
|
|
289
|
+
});
|
|
290
|
+
var MarketplaceReferences = ArraySchema(MarketplaceReference);
|
|
291
|
+
var officialMarketplaceReferences = [
|
|
292
|
+
{
|
|
293
|
+
id: "kitman-software-engineering",
|
|
294
|
+
kind: "kit",
|
|
295
|
+
name: "Software Engineering",
|
|
296
|
+
publisher: "Kitman",
|
|
297
|
+
description: "Everything for building software: the Build, Review, Plan, Research, Release and other Loops, their Agents and the skills they use. A new Workspace installs it.",
|
|
298
|
+
category: "Engineering",
|
|
299
|
+
package: "@kitman-sh/software-engineering",
|
|
300
|
+
source: { type: "npm" },
|
|
301
|
+
loops: [
|
|
302
|
+
{ id: "build", export: "build" },
|
|
303
|
+
{ id: "errand", export: "errand" },
|
|
304
|
+
{ id: "file-tasks", export: "fileTasks" },
|
|
305
|
+
{ id: "firewatch", export: "firewatch" },
|
|
306
|
+
{ id: "hillclimb", export: "hillclimb" },
|
|
307
|
+
{ id: "hindsight", export: "hindsight" },
|
|
308
|
+
{ id: "plan", export: "plan" },
|
|
309
|
+
{ id: "project-update", export: "projectUpdate" },
|
|
310
|
+
{ id: "release", export: "release" },
|
|
311
|
+
{ id: "research", export: "research" },
|
|
312
|
+
{ id: "review", export: "review" },
|
|
313
|
+
{ id: "shepherd", export: "shepherd" },
|
|
314
|
+
{ id: "sweep", export: "sweep" },
|
|
315
|
+
{ id: "tidy", export: "tidy" }
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: "kitman-go-to-market",
|
|
320
|
+
kind: "kit",
|
|
321
|
+
name: "Go-to-Market",
|
|
322
|
+
publisher: "Kitman",
|
|
323
|
+
description: "Copywriting, marketing psychology and SEO audits.",
|
|
324
|
+
category: "Process",
|
|
325
|
+
package: "@kitman-sh/go-to-market",
|
|
326
|
+
source: { type: "npm" },
|
|
327
|
+
loops: []
|
|
328
|
+
}
|
|
329
|
+
];
|
|
330
|
+
var MarketplaceItemKind = Literal("kit");
|
|
331
|
+
var MarketplaceItemState = Union([
|
|
332
|
+
Struct({ state: Literal("add") }),
|
|
333
|
+
Struct({
|
|
334
|
+
state: Literal("merge_request_open"),
|
|
335
|
+
forge: Name,
|
|
336
|
+
url: optionalKey(String4),
|
|
337
|
+
number: optionalKey(String4)
|
|
338
|
+
}),
|
|
339
|
+
Struct({ state: Literal("added") }),
|
|
340
|
+
Struct({
|
|
341
|
+
state: Literal("installed"),
|
|
342
|
+
version: optionalKey(Name),
|
|
343
|
+
pinnedVersion: optionalKey(Name),
|
|
344
|
+
problem: optionalKey(String4),
|
|
345
|
+
actsFor: optionalKey(String4)
|
|
346
|
+
})
|
|
347
|
+
]);
|
|
348
|
+
var MarketplaceItem = Struct({
|
|
349
|
+
id: String4,
|
|
350
|
+
kind: MarketplaceItemKind,
|
|
351
|
+
name: Name,
|
|
352
|
+
publisher: Name,
|
|
353
|
+
description: String4,
|
|
354
|
+
category: Name,
|
|
355
|
+
source: String4,
|
|
356
|
+
reference: optionalKey(Union([
|
|
357
|
+
Struct({ type: Literal("npm"), name: KitName }),
|
|
358
|
+
Struct({ type: Literal("git") })
|
|
359
|
+
])),
|
|
360
|
+
status: MarketplaceItemState
|
|
361
|
+
});
|
|
362
|
+
var MarketplaceList = Struct({ items: ArraySchema(MarketplaceItem) });
|
|
363
|
+
var MarketplaceAdd = Struct({
|
|
364
|
+
kind: MarketplaceItemKind,
|
|
365
|
+
id: String4.check(isMinLength(1), isMaxLength(200)),
|
|
366
|
+
teamId: optionalKey(Id)
|
|
367
|
+
});
|
|
368
|
+
var notListTypes = new Set([
|
|
369
|
+
"NumericLiteral",
|
|
370
|
+
"StringLiteral",
|
|
371
|
+
"BooleanLiteral",
|
|
372
|
+
"NullLiteral",
|
|
373
|
+
"BigIntLiteral",
|
|
374
|
+
"RegExpLiteral",
|
|
375
|
+
"TemplateLiteral",
|
|
376
|
+
"ObjectExpression",
|
|
377
|
+
"ArrowFunctionExpression",
|
|
378
|
+
"FunctionExpression",
|
|
379
|
+
"ClassExpression"
|
|
380
|
+
]);
|
|
381
|
+
var unbindable = new Set("arguments await break case catch class config const continue debugger default defineKit delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof undefined var void while with yield".split(" "));
|
|
257
382
|
// apps/cli/src/herdr-runner-credential.ts
|
|
258
383
|
function herdrRunnerCredentialName(runnerId) {
|
|
259
384
|
return `herdr-runner:${runnerId}`;
|
|
@@ -373,10 +498,10 @@ var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "
|
|
|
373
498
|
var checkHostsSetting = (value) => (value ?? "").split(",").map((host) => host.trim()).filter((host) => host !== "");
|
|
374
499
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
375
500
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
376
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
501
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-mtgkvbk4.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
377
502
|
});
|
|
378
503
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
379
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
504
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-mtgkvbk4.js")), (module) => module.updateHerdrCore(options))
|
|
380
505
|
});
|
|
381
506
|
var herdrCoreMissing = (error) => {
|
|
382
507
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -602,7 +727,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
602
727
|
});
|
|
603
728
|
var syncKits = (input) => gen(function* () {
|
|
604
729
|
const fs = yield* FileSystem;
|
|
605
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
730
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-eerh2t20.js"));
|
|
606
731
|
const harnesses = yield* syncTargets(input.harness);
|
|
607
732
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
608
733
|
for (const { name, problem } of chain.skipped)
|
|
@@ -1118,7 +1243,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
|
|
|
1118
1243
|
run: (command, args) => runCommand2(command, args),
|
|
1119
1244
|
attach: (command, args) => gen(function* () {
|
|
1120
1245
|
const spawner = yield* ChildProcessSpawner;
|
|
1121
|
-
const handle = yield* spawner.spawn(
|
|
1246
|
+
const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
|
|
1122
1247
|
const exitCode = yield* handle.exitCode;
|
|
1123
1248
|
if (exitCode !== 0)
|
|
1124
1249
|
return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
|
|
@@ -1506,7 +1631,6 @@ var package_default = {
|
|
|
1506
1631
|
},
|
|
1507
1632
|
dependencies: {
|
|
1508
1633
|
"@effect/platform-bun": "4.1.2",
|
|
1509
|
-
"@kitman-sh/loops": "workspace:*",
|
|
1510
1634
|
"@kitman-sh/sdk": "workspace:*",
|
|
1511
1635
|
"@kitman/agent-runtime": "workspace:*",
|
|
1512
1636
|
"@kitman/core": "workspace:*",
|
|
@@ -1521,7 +1645,7 @@ var package_default = {
|
|
|
1521
1645
|
};
|
|
1522
1646
|
|
|
1523
1647
|
// apps/cli/src/scaffold.ts
|
|
1524
|
-
var cliVersion = "0.10.
|
|
1648
|
+
var cliVersion = "0.10.54";
|
|
1525
1649
|
var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
1526
1650
|
name,
|
|
1527
1651
|
private: true,
|
|
@@ -1529,7 +1653,7 @@ var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
|
1529
1653
|
scripts: { test: "bun test", plan: "kitman deploy --plan", deploy: "kitman deploy" },
|
|
1530
1654
|
dependencies: {
|
|
1531
1655
|
"@kitman-sh/cli": cliVersion,
|
|
1532
|
-
...scaffold.fork === undefined ? undefined : {
|
|
1656
|
+
...scaffold.fork === undefined ? undefined : { [defaultKitName]: cliVersion },
|
|
1533
1657
|
"@kitman-sh/sdk": cliVersion,
|
|
1534
1658
|
effect: `^${package_default.dependencies.effect}`
|
|
1535
1659
|
}
|
|
@@ -1577,13 +1701,13 @@ test('greets by name', async () => {
|
|
|
1577
1701
|
})
|
|
1578
1702
|
`;
|
|
1579
1703
|
var forkConfig = (loop) => `import { defineKit } from '@kitman-sh/sdk/loop'
|
|
1580
|
-
import {
|
|
1704
|
+
import { loops } from '${defaultKitName}'
|
|
1581
1705
|
|
|
1582
1706
|
export default defineKit({
|
|
1583
1707
|
loops: [
|
|
1584
1708
|
{
|
|
1585
|
-
...
|
|
1586
|
-
// Change a field of the
|
|
1709
|
+
...loops['${loop}']
|
|
1710
|
+
// Change a field of the Loop here, such as title: 'Our ${loop}'.
|
|
1587
1711
|
}
|
|
1588
1712
|
]
|
|
1589
1713
|
})
|
|
@@ -1626,7 +1750,7 @@ kitman-deploy:
|
|
|
1626
1750
|
var readme = (name, scaffold) => [
|
|
1627
1751
|
`# ${name}`,
|
|
1628
1752
|
"",
|
|
1629
|
-
scaffold.fork === undefined ? "A Kitman Kit: its Loops and Agents are declared in `kitman.config.ts`." : `A Kitman Kit that forks the
|
|
1753
|
+
scaffold.fork === undefined ? "A Kitman Kit: its Loops and Agents are declared in `kitman.config.ts`." : `A Kitman Kit that forks the \`${scaffold.fork}\` Loop of \`${defaultKitName}\` by spreading it in \`kitman.config.ts\`. Change a field there; once deployed, the fork replaces the installed Loop in its layer.`,
|
|
1630
1754
|
"",
|
|
1631
1755
|
"1. `bun install`, then `bun test`.",
|
|
1632
1756
|
"2. `bunx kitman deploy --plan` shows what deploying would change.",
|
|
@@ -1641,10 +1765,10 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
|
|
|
1641
1765
|
const path = yield* Path;
|
|
1642
1766
|
const root = path.resolve(directory);
|
|
1643
1767
|
if (scaffold.fork !== undefined) {
|
|
1644
|
-
const
|
|
1645
|
-
if (!(scaffold.fork
|
|
1768
|
+
const loops = officialMarketplaceReferences.find((kit) => kit.package === defaultKitName)?.loops ?? [];
|
|
1769
|
+
if (!loops.some((loop) => loop.id === scaffold.fork))
|
|
1646
1770
|
return yield* new CliError({
|
|
1647
|
-
message:
|
|
1771
|
+
message: `${defaultKitName} has no Loop ${scaffold.fork}; fork one of ${loops.map((loop) => loop.id).join(", ")}`
|
|
1648
1772
|
});
|
|
1649
1773
|
}
|
|
1650
1774
|
for (const file of ["package.json", "kitman.config.ts"])
|
|
@@ -1717,7 +1841,7 @@ var Usage = [
|
|
|
1717
1841
|
"",
|
|
1718
1842
|
"Kits of your own, to deploy with kitman deploy:",
|
|
1719
1843
|
" kitman init --kit [dir] (a new Kit with an example Loop and a GitLab pipeline)",
|
|
1720
|
-
" kitman loop fork <loop> [dir] (a new Kit that spreads a
|
|
1844
|
+
" kitman loop fork <loop> [dir] (a new Kit that spreads a software-engineering Loop, to change it)",
|
|
1721
1845
|
"",
|
|
1722
1846
|
"Approved verifications of the current repository:",
|
|
1723
1847
|
" kitman verify list",
|
|
@@ -1770,7 +1894,7 @@ var Usage = [
|
|
|
1770
1894
|
"Every run, loop, agent, verify, constraint, secret, claim, deploy, dev and kit command takes --json."
|
|
1771
1895
|
].join(`
|
|
1772
1896
|
`);
|
|
1773
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
1897
|
+
var agentRuntime = promise(() => import("./chunk-c0wrcam4.js"));
|
|
1774
1898
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
1775
1899
|
defaultValue: () => gen(function* () {
|
|
1776
1900
|
const tui = yield* tryPromise({
|
|
@@ -2616,7 +2740,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
2616
2740
|
});
|
|
2617
2741
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
2618
2742
|
defaultValue: () => (options) => gen(function* () {
|
|
2619
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
2743
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-dkpqwk0q.js"));
|
|
2620
2744
|
return yield* makeRunnerRpcClient({
|
|
2621
2745
|
runnerId: options.runnerId,
|
|
2622
2746
|
bearer: options.bearer,
|
|
@@ -2807,7 +2931,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
2807
2931
|
});
|
|
2808
2932
|
const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
|
|
2809
2933
|
const platform = yield* context();
|
|
2810
|
-
const updated = yield*
|
|
2934
|
+
const updated = yield* make16();
|
|
2811
2935
|
const scope = yield* scope2;
|
|
2812
2936
|
yield* listenForSignals({
|
|
2813
2937
|
rpc,
|
|
@@ -2986,7 +3110,7 @@ function mcpCommand(args) {
|
|
|
2986
3110
|
if (command.action === "run") {
|
|
2987
3111
|
if (command.args.length > 0)
|
|
2988
3112
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
2989
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
3113
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-q0yna8sw.js"));
|
|
2990
3114
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
2991
3115
|
}
|
|
2992
3116
|
if (command.action !== "setup")
|
|
@@ -3510,7 +3634,7 @@ function loopCommand(args) {
|
|
|
3510
3634
|
if (["catalog", "validate", "test"].includes(command.action))
|
|
3511
3635
|
return loopCatalogCommand(args);
|
|
3512
3636
|
if (command.action === "fork")
|
|
3513
|
-
return scaffoldKit(command.args[1] ?? ".", { fork: requiredArg(command, "a
|
|
3637
|
+
return scaffoldKit(command.args[1] ?? ".", { fork: requiredArg(command, "a Loop id") });
|
|
3514
3638
|
return fail7(new CliError({
|
|
3515
3639
|
message: `Unknown loop command: ${command.action || "(missing)"}. Start a Run with kitman run start <loop> "<words>".`
|
|
3516
3640
|
}));
|
|
@@ -3648,7 +3772,7 @@ var runShowLines = (shown) => [
|
|
|
3648
3772
|
...shown.closures.map((closure, index) => index === 0 ? closureLine(closure) : `Earlier: ${closureLine(closure)}`),
|
|
3649
3773
|
...alignmentLines(shown.run.alignment),
|
|
3650
3774
|
...shown.run.loopDigest === undefined ? [] : [
|
|
3651
|
-
`Loop${shown.run.loopVersion === undefined ? "" : ` ${shown.run.loopVersion}`} from the ${shown.run.loopLayer
|
|
3775
|
+
`Loop${shown.run.loopVersion === undefined ? "" : ` ${shown.run.loopVersion}`}${shown.run.loopLayer === undefined ? "" : ` from the ${shown.run.loopLayer} layer`}, digest ${shown.run.loopDigest}`
|
|
3652
3776
|
],
|
|
3653
3777
|
...shown.run.failureSummary === undefined ? [] : [`Failure: ${shown.run.failureSummary}`],
|
|
3654
3778
|
...shown.steps.flatMap((step) => [
|
|
@@ -4188,9 +4312,9 @@ function claimCommand(args) {
|
|
|
4188
4312
|
}
|
|
4189
4313
|
});
|
|
4190
4314
|
}
|
|
4191
|
-
var KitWriter = map8(promise(() => import("./chunk-
|
|
4315
|
+
var KitWriter = map8(promise(() => import("./chunk-my987gxf.js")), (build) => build.writeKit);
|
|
4192
4316
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
4193
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
4317
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-my987gxf.js")), (build) => build.buildKit(directory))
|
|
4194
4318
|
});
|
|
4195
4319
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
4196
4320
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -4948,7 +5072,7 @@ function downloadPresignedAsset(download, outputPath) {
|
|
|
4948
5072
|
return gen(function* () {
|
|
4949
5073
|
const fs = yield* FileSystem;
|
|
4950
5074
|
const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
|
|
4951
|
-
const response = yield* send(
|
|
5075
|
+
const response = yield* send(make5(download.method)(download.url), failed);
|
|
4952
5076
|
if (response.status < 200 || response.status >= 300)
|
|
4953
5077
|
return yield* new CliError({ message: `Asset download failed with ${response.status}` });
|
|
4954
5078
|
const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
var args = process.argv.slice(2);
|
|
6
6
|
if (args[0] === "srt") {
|
|
7
7
|
process.argv.splice(2, 1);
|
|
8
|
-
const { runSrtCli } = await import("./chunk-
|
|
8
|
+
const { runSrtCli } = await import("./chunk-wczs5vrq.js");
|
|
9
9
|
await runSrtCli();
|
|
10
10
|
} else if (args[0] === "srt-step") {
|
|
11
|
-
const { runSrtStep } = await import("./chunk-
|
|
11
|
+
const { runSrtStep } = await import("./chunk-19aqk325.js");
|
|
12
12
|
await runSrtStep(args.slice(1));
|
|
13
13
|
} else if (args[0] === "opencode-read") {
|
|
14
|
-
const { runOpencodeReader } = await import("./chunk-
|
|
14
|
+
const { runOpencodeReader } = await import("./chunk-rjfxnk05.js");
|
|
15
15
|
runOpencodeReader();
|
|
16
16
|
} else {
|
|
17
|
-
const { runCli } = await import("./chunk-
|
|
17
|
+
const { runCli } = await import("./chunk-y48wz1sa.js");
|
|
18
18
|
runCli(args);
|
|
19
19
|
}
|
package/package.json
CHANGED
package/dist/chunk-1mc9vgcr.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
isString
|
|
4
|
-
} from "./chunk-arvwar2c.js";
|
|
5
|
-
|
|
6
|
-
// packages/core/src/question-recommendation.ts
|
|
7
|
-
var optionValue = (option) => isString(option) ? option : option.value;
|
|
8
|
-
var splitQuestionOptions = (options) => {
|
|
9
|
-
const descriptions = Object.fromEntries(options.flatMap((option) => isString(option) || option.description === undefined || option.description.trim() === "" ? [] : [[option.value, option.description]]));
|
|
10
|
-
return {
|
|
11
|
-
options: options.map(optionValue),
|
|
12
|
-
...Object.keys(descriptions).length === 0 ? undefined : { optionDescriptions: descriptions }
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
var recommendationProblem = (question) => {
|
|
16
|
-
const options = question.options?.map(optionValue);
|
|
17
|
-
const reason = question.recommendationReason?.trim() ?? "";
|
|
18
|
-
const recommended = question.recommended?.trim() ?? "";
|
|
19
|
-
if (question.informationOnly === true) {
|
|
20
|
-
if (options !== undefined)
|
|
21
|
-
return "A Question with options always has one to recommend: set `recommended` to one of them, and drop `informationOnly`.";
|
|
22
|
-
if (recommended !== "")
|
|
23
|
-
return "A Question that recommends an answer is not `informationOnly`: drop `informationOnly`.";
|
|
24
|
-
return reason === "" ? "Say in `recommendationReason` why you cannot suggest an answer, such as that only the person knows the secret\u2019s name." : undefined;
|
|
25
|
-
}
|
|
26
|
-
if (recommended === "")
|
|
27
|
-
return `Add \`recommended\`: the answer you would pick${options === undefined ? ", as a suggested free-text answer" : `, one of: ${options.join(", ")}`}. Add \`recommendationReason\` too, in one or two sentences. Only a Question that purely asks for information you cannot guess, such as a secret's name, may set \`informationOnly\` instead and say why in \`recommendationReason\`.`;
|
|
28
|
-
if (options !== undefined && !options.includes(question.recommended ?? ""))
|
|
29
|
-
return `The recommended answer "${question.recommended}" is not one of the options: ${options.join(", ")}.`;
|
|
30
|
-
return reason === "" ? "Add `recommendationReason`: why you recommend that answer, in one or two sentences." : undefined;
|
|
31
|
-
};
|
|
32
|
-
var questionAdvice = (question) => ({
|
|
33
|
-
...question.optionDescriptions === undefined ? undefined : { optionDescriptions: question.optionDescriptions },
|
|
34
|
-
...question.recommended === undefined ? undefined : { recommended: question.recommended },
|
|
35
|
-
...question.recommendationReason === undefined ? undefined : { recommendationReason: question.recommendationReason },
|
|
36
|
-
...question.informationOnly === true ? { informationOnly: true } : undefined
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export { splitQuestionOptions, recommendationProblem, questionAdvice };
|