@kitman-sh/cli 0.9.0 → 0.10.53

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 (37) hide show
  1. package/dist/chunk-11p4wf6n.js +3551 -0
  2. package/dist/chunk-1mc9vgcr.js +39 -0
  3. package/dist/chunk-30397r95.js +30 -0
  4. package/dist/chunk-3bj7sc3v.js +389 -0
  5. package/dist/chunk-6vns3ej0.js +23 -0
  6. package/dist/chunk-7thnf14y.js +936 -0
  7. package/dist/chunk-arvwar2c.js +141 -0
  8. package/dist/chunk-b6thzgc9.js +32 -0
  9. package/dist/{chunk-8bvf4fh4.js → chunk-ctasxxz5.js} +26 -11
  10. package/dist/{chunk-5gjpv3ax.js → chunk-dzh9e6n2.js} +824 -651
  11. package/dist/{chunk-snn0e1qb.js → chunk-eg8f5ncv.js} +7 -3
  12. package/dist/chunk-g5bs3f6z.js +173 -0
  13. package/dist/chunk-jafetf7z.js +109 -0
  14. package/dist/chunk-jagzz148.js +527 -0
  15. package/dist/{chunk-1d4316hp.js → chunk-jfvq7s24.js} +38 -25
  16. package/dist/chunk-mbctzx7e.js +11436 -0
  17. package/dist/chunk-mej2bx5n.js +100 -0
  18. package/dist/chunk-p6spvbwq.js +6305 -0
  19. package/dist/chunk-pp1p3g6e.js +133 -0
  20. package/dist/chunk-r8p3nxcp.js +231 -0
  21. package/dist/chunk-txwt6r25.js +1731 -0
  22. package/dist/chunk-v290mf51.js +5242 -0
  23. package/dist/chunk-vjmz23rs.js +13 -0
  24. package/dist/chunk-vyv0p5eq.js +3183 -0
  25. package/dist/chunk-wh1pa2aa.js +15322 -0
  26. package/dist/chunk-x0b92bjb.js +222 -0
  27. package/dist/{chunk-8z5b6fpd.js → chunk-x9dhxfts.js} +216 -152
  28. package/dist/chunk-z821b2gp.js +164 -0
  29. package/dist/index.js +13 -5738
  30. package/dist/opencode-reader.main.ts +4 -0
  31. package/package.json +6 -5
  32. package/dist/chunk-3gxahgnq.js +0 -28495
  33. package/dist/chunk-ehzbtavj.js +0 -247
  34. package/dist/chunk-f5z8tgss.js +0 -1214
  35. package/dist/chunk-kdb1cbnx.js +0 -1273
  36. package/dist/chunk-ke1w0hx7.js +0 -5771
  37. package/dist/chunk-z6hc4ew9.js +0 -13
@@ -0,0 +1,141 @@
1
+ // @bun
2
+ import {
3
+ isString2,
4
+ isNumber2,
5
+ isBoolean2,
6
+ isBigInt2,
7
+ isSymbol2,
8
+ isFunction2,
9
+ isUndefined2,
10
+ isObjectOrArray
11
+ } from "./chunk-mbctzx7e.js";
12
+
13
+ // packages/core/src/runtime-type.ts
14
+ var UnsafeJsonObjectKeys = new Set(["__proto__", "constructor", "prototype"]);
15
+ function jsonDataError() {
16
+ throw new TypeError("Value is not JSON data");
17
+ }
18
+ function parseJsonValue(value, ancestors) {
19
+ if (value === null)
20
+ return null;
21
+ if (value === undefined)
22
+ return jsonDataError();
23
+ if (isString(value))
24
+ return String(value);
25
+ if (isNumber(value))
26
+ return Number.isFinite(value) ? Number(value) : jsonDataError();
27
+ if (isBoolean(value))
28
+ return Boolean(value);
29
+ if (value instanceof Date) {
30
+ const timestamp = Date.prototype.getTime.call(value);
31
+ return Number.isNaN(timestamp) ? jsonDataError() : Date.prototype.toISOString.call(value);
32
+ }
33
+ if (!isObject(value))
34
+ return jsonDataError();
35
+ if (ancestors.has(value))
36
+ throw new TypeError("JSON data must not contain cycles");
37
+ const prototype = Object.getPrototypeOf(value);
38
+ if (Array.isArray(value)) {
39
+ ancestors.add(value);
40
+ try {
41
+ const keys = Object.keys(value);
42
+ const hasNamedProperty = keys.some((key, index) => key !== String(index)) || Object.getOwnPropertySymbols(value).some((symbol) => Object.getOwnPropertyDescriptor(value, symbol)?.enumerable);
43
+ if (hasNamedProperty)
44
+ throw new TypeError("JSON arrays must not contain named properties");
45
+ if (keys.length !== value.length)
46
+ throw new TypeError("JSON arrays must not contain sparse slots");
47
+ const result = [];
48
+ for (const key of keys) {
49
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
50
+ if (descriptor === undefined || !("value" in descriptor))
51
+ throw new TypeError("JSON array entries must be data properties");
52
+ result.push(parseJsonValue(descriptor.value, ancestors));
53
+ }
54
+ return result;
55
+ } finally {
56
+ ancestors.delete(value);
57
+ }
58
+ }
59
+ if (prototype !== Object.prototype && prototype !== null)
60
+ return jsonDataError();
61
+ ancestors.add(value);
62
+ try {
63
+ const result = Object.create(null);
64
+ for (const key of Object.keys(value)) {
65
+ if (UnsafeJsonObjectKeys.has(key))
66
+ throw new TypeError(`Unsafe JSON object key: ${key}`);
67
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
68
+ if (descriptor === undefined || !("value" in descriptor))
69
+ throw new TypeError("JSON object properties must be data properties");
70
+ if (descriptor.value !== undefined)
71
+ result[key] = parseJsonValue(descriptor.value, ancestors);
72
+ }
73
+ return result;
74
+ } finally {
75
+ ancestors.delete(value);
76
+ }
77
+ }
78
+ function toJsonValue(value) {
79
+ return parseJsonValue(value, new WeakSet);
80
+ }
81
+ function isJsonArray(value) {
82
+ return Array.isArray(value);
83
+ }
84
+ function isOneOf(values, value) {
85
+ return values.some((item) => Object.is(item, value));
86
+ }
87
+ function isKeyOf(record, key) {
88
+ return Object.hasOwn(record, key);
89
+ }
90
+ function toJsonObject(value) {
91
+ const parsed = toJsonValue(value);
92
+ if (parsed === null || isJsonArray(parsed) || !isObject(parsed))
93
+ throw new TypeError("Value is not a JSON object");
94
+ return parsed;
95
+ }
96
+ function isBigInt(value) {
97
+ return isBigInt2(value);
98
+ }
99
+ function isBoolean(value) {
100
+ return isBoolean2(value);
101
+ }
102
+ function isFunction(value) {
103
+ return isFunction2(value);
104
+ }
105
+ function isNumber(value) {
106
+ return isNumber2(value);
107
+ }
108
+ function isObject(value) {
109
+ return isObjectOrArray(value);
110
+ }
111
+ function isJsonObject(value) {
112
+ return isObject(value) && value !== null && !Array.isArray(value);
113
+ }
114
+ function isString(value) {
115
+ return isString2(value);
116
+ }
117
+ function isSymbol(value) {
118
+ return isSymbol2(value);
119
+ }
120
+ function isUndefined(value) {
121
+ return isUndefined2(value);
122
+ }
123
+ function kindOf(value) {
124
+ if (isString(value))
125
+ return "string";
126
+ if (isNumber(value))
127
+ return "number";
128
+ if (isBoolean(value))
129
+ return "boolean";
130
+ if (isBigInt(value))
131
+ return "bigint";
132
+ if (isSymbol(value))
133
+ return "symbol";
134
+ if (isUndefined(value))
135
+ return "undefined";
136
+ if (isFunction(value))
137
+ return "function";
138
+ return "object";
139
+ }
140
+
141
+ export { toJsonValue, isOneOf, isKeyOf, toJsonObject, isBigInt, isBoolean, isFunction, isNumber, isObject, isJsonObject, isString, isSymbol, isUndefined, kindOf };
@@ -0,0 +1,32 @@
1
+ // @bun
2
+ import {
3
+ harnessesUnsupportedInSrt2,
4
+ compiled2,
5
+ pinnedSrtCommand2,
6
+ pinnedSrtStepCommand2,
7
+ runSrtCli2,
8
+ srtSettings2,
9
+ srtCacheEnvironment2,
10
+ srtInheritedEnv2,
11
+ inheritedEnvironment2,
12
+ withOnlyEnvironment2,
13
+ writeSrtSettings2,
14
+ srtStepArgv2,
15
+ srtArgv2
16
+ } from "./chunk-11p4wf6n.js";
17
+ import"./chunk-mbctzx7e.js";
18
+ export {
19
+ compiled2 as compiled,
20
+ harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
21
+ inheritedEnvironment2 as inheritedEnvironment,
22
+ pinnedSrtCommand2 as pinnedSrtCommand,
23
+ pinnedSrtStepCommand2 as pinnedSrtStepCommand,
24
+ runSrtCli2 as runSrtCli,
25
+ srtArgv2 as srtArgv,
26
+ srtCacheEnvironment2 as srtCacheEnvironment,
27
+ srtInheritedEnv2 as srtInheritedEnv,
28
+ srtSettings2 as srtSettings,
29
+ srtStepArgv2 as srtStepArgv,
30
+ withOnlyEnvironment2 as withOnlyEnvironment,
31
+ writeSrtSettings2 as writeSrtSettings
32
+ };
@@ -1,12 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  build2,
4
- succeed4,
4
+ succeed5,
5
5
  provide2,
6
6
  gen,
7
- flatMap2,
8
- provideContext,
9
- runForEach,
7
+ flatMap3,
8
+ provideContext2
9
+ } from "./chunk-mbctzx7e.js";
10
+ import {
11
+ runForEach
12
+ } from "./chunk-11p4wf6n.js";
13
+ import {
10
14
  WebSocketConstructor,
11
15
  layerWebSocketConstructorGlobal,
12
16
  layerWebSocket,
@@ -15,16 +19,16 @@ import {
15
19
  RunnerReplicaRpcs,
16
20
  RunnerRunFileRpcs,
17
21
  ProgramRpcs
18
- } from "./chunk-3gxahgnq.js";
22
+ } from "./chunk-wh1pa2aa.js";
19
23
  import {
20
24
  layerJson,
21
- make4,
25
+ make,
22
26
  withHeaders,
23
27
  layerProtocolSocket
24
- } from "./chunk-8z5b6fpd.js";
28
+ } from "./chunk-x9dhxfts.js";
25
29
 
26
30
  // packages/live/src/rpc/runner-client.ts
27
- var proxiedWebSocket = (proxy) => succeed4(WebSocketConstructor)((target) => {
31
+ var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
28
32
  const options = { proxy };
29
33
  return Reflect.construct(globalThis.WebSocket, [target, options]);
30
34
  });
@@ -34,7 +38,7 @@ function runnerRpcUrl2(apiUrl) {
34
38
  url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
35
39
  return url.toString();
36
40
  }
37
- var authorizer = (options) => (call) => flatMap2(options.bearer, (token) => withHeaders(call, {
41
+ var authorizer = (options) => (call) => flatMap3(options.bearer, (token) => withHeaders(call, {
38
42
  authorization: `Bearer ${token}`,
39
43
  [RunnerHeaders.runnerId]: options.runnerId,
40
44
  [RunnerHeaders.protocolVersion]: String(RunnerRpcProtocolVersion)
@@ -42,7 +46,7 @@ var authorizer = (options) => (call) => flatMap2(options.bearer, (token) => with
42
46
  var RunnerProcessRpcs = RunnerReplicaRpcs.merge(RunnerRunFileRpcs);
43
47
  var makeRunnerRpcClient2 = (options) => gen(function* () {
44
48
  const protocol = yield* build2(options.protocol);
45
- const client = yield* make4(RunnerProcessRpcs).pipe(provideContext(protocol));
49
+ const client = yield* make(RunnerProcessRpcs).pipe(provideContext2(protocol));
46
50
  const authorized = authorizer(options);
47
51
  return {
48
52
  claim: (input) => authorized(client.Claim(input)),
@@ -64,12 +68,13 @@ var makeRunnerRpcClient2 = (options) => gen(function* () {
64
68
  resumeCheckpoint: (input) => authorized(client.ResumeCheckpoint(input)),
65
69
  settledCheckpoints: authorized(client.SettledCheckpoints()),
66
70
  forgetCheckpoints: (stepAttemptIds) => authorized(client.ForgetCheckpoints({ stepAttemptIds })),
71
+ gitCredential: (repoBindingId) => authorized(client.GitCredential({ repoBindingId })),
67
72
  listen: (runnerReplicaId, onSignal) => authorized(runForEach(client.Signals({ runnerReplicaId }), onSignal))
68
73
  };
69
74
  });
70
75
  var makeProgramRpcClient2 = (options) => gen(function* () {
71
76
  const protocol = yield* build2(options.protocol);
72
- const client = yield* make4(ProgramRpcs).pipe(provideContext(protocol));
77
+ const client = yield* make(ProgramRpcs).pipe(provideContext2(protocol));
73
78
  const authorized = authorizer(options);
74
79
  return {
75
80
  recordActivity: (input) => authorized(client.RecordActivity(input)),
@@ -82,6 +87,7 @@ var makeProgramRpcClient2 = (options) => gen(function* () {
82
87
  startAgentStep: (input) => authorized(client.StartAgentStep(input)),
83
88
  startVerification: (input) => authorized(client.StartVerification(input)),
84
89
  awaitEvent: (input) => authorized(client.AwaitEvent(input)),
90
+ claimResource: (input) => authorized(client.ClaimResource(input)),
85
91
  admitChild: (input) => authorized(client.AdmitChild(input)),
86
92
  storeArtifact: (input) => authorized(client.StoreArtifact(input)),
87
93
  createRunFile: (input) => authorized(client.CreateRunFile(input)),
@@ -90,12 +96,21 @@ var makeProgramRpcClient2 = (options) => gen(function* () {
90
96
  recordNote: (input) => authorized(client.RecordNote(input)),
91
97
  performHostEffect: (input) => authorized(client.PerformHostEffect(input)),
92
98
  createPlanTasks: (input) => authorized(client.CreatePlanTasks(input)),
99
+ alertTask: (input) => authorized(client.AlertTask(input)),
93
100
  readTranscripts: (input) => authorized(client.ReadTranscripts(input)),
101
+ pipelineStatus: (input) => authorized(client.PipelineStatus(input)),
102
+ reportPipeline: (input) => authorized(client.ReportPipeline(input)),
103
+ reviewThreads: (input) => authorized(client.ReviewThreads(input)),
104
+ openChangeRequests: (input) => authorized(client.OpenChangeRequests(input)),
105
+ ownChangeRequests: (input) => authorized(client.OwnChangeRequests(input)),
94
106
  propose: (input) => authorized(client.Propose(input)),
95
107
  readProject: (input) => authorized(client.ReadProject(input)),
96
108
  draftUpdate: (input) => authorized(client.DraftUpdate(input)),
97
109
  integrationBranch: (input) => authorized(client.IntegrationBranch(input)),
98
110
  mergeChangeRequest: (input) => authorized(client.MergeChangeRequest(input)),
111
+ closeChangeRequest: (input) => authorized(client.CloseChangeRequest(input)),
112
+ approveChangeRequest: (input) => authorized(client.ApproveChangeRequest(input)),
113
+ rerunPipeline: (input) => authorized(client.RerunPipeline(input)),
99
114
  publishRelease: (input) => authorized(client.PublishRelease(input))
100
115
  };
101
116
  });