@kitman-sh/cli 0.13.18 → 0.14.0

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 (27) hide show
  1. package/dist/{chunk-940cc29s.js → chunk-099ybrqz.js} +18 -18
  2. package/dist/{chunk-fv2v1sdc.js → chunk-4c6w8sb7.js} +16 -16
  3. package/dist/{chunk-r1s1dcy0.js → chunk-5129s1vg.js} +3 -3
  4. package/dist/{chunk-03hvwd6m.js → chunk-5d2sdzbz.js} +10 -10
  5. package/dist/{chunk-dc0pcs3z.js → chunk-84fcym2g.js} +1 -1
  6. package/dist/{chunk-q5w3v4k1.js → chunk-9avbsbvk.js} +1 -6
  7. package/dist/{chunk-39m1xtbk.js → chunk-9j4cnz4j.js} +135 -65
  8. package/dist/{chunk-gq7y5v3e.js → chunk-bbf0jzsc.js} +1 -1
  9. package/dist/{chunk-vxc2cg5f.js → chunk-bmkc5r0p.js} +9 -9
  10. package/dist/{chunk-rp4tn60z.js → chunk-bscvbpa1.js} +6 -6
  11. package/dist/{chunk-1cbnvby8.js → chunk-c4mf5mgt.js} +2 -2
  12. package/dist/{chunk-gy9rf14f.js → chunk-ctpgfdzf.js} +3 -3
  13. package/dist/{chunk-bc8ytp0y.js → chunk-f2ycw5bp.js} +308 -130
  14. package/dist/{chunk-z1rve2hk.js → chunk-gbr4s7nk.js} +6 -6
  15. package/dist/{chunk-827sgh31.js → chunk-gmdd1a74.js} +1 -1
  16. package/dist/{chunk-hakqpy8z.js → chunk-h7zb6d3z.js} +33 -185
  17. package/dist/{chunk-frjsv0ng.js → chunk-hq2xzj6f.js} +4 -4
  18. package/dist/{chunk-84xks8tn.js → chunk-r9tzwrnb.js} +2 -2
  19. package/dist/{chunk-gqy5shhk.js → chunk-t2zzamex.js} +30 -30
  20. package/dist/{chunk-ynvzbgms.js → chunk-vth8h56e.js} +4 -4
  21. package/dist/{chunk-a7ds2jqf.js → chunk-w34sq09e.js} +8 -8
  22. package/dist/{chunk-7m71m106.js → chunk-w8vxzc7w.js} +27 -14
  23. package/dist/{chunk-be2jf9m3.js → chunk-wb3wsm86.js} +10 -10
  24. package/dist/{chunk-y1krmnbv.js → chunk-y0y2gg8d.js} +2 -2
  25. package/dist/{chunk-zw3gf6r5.js → chunk-zpp4jg4a.js} +118 -60
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -118,9 +118,8 @@ import {
118
118
  decodeJsonStringOption,
119
119
  encodeJsonStringSync,
120
120
  encodePrettyJsonString
121
- } from "./chunk-zw3gf6r5.js";
121
+ } from "./chunk-zpp4jg4a.js";
122
122
  import {
123
- currentTimeMillis,
124
123
  SecureRandom,
125
124
  makeUnsafe,
126
125
  formatIso,
@@ -170,8 +169,9 @@ import {
170
169
  runMcpEffect,
171
170
  createAgentAuthSignedFetch,
172
171
  setupMcpAgentCredential
173
- } from "./chunk-bc8ytp0y.js";
172
+ } from "./chunk-f2ycw5bp.js";
174
173
  import {
174
+ currentTimeMillis,
175
175
  join,
176
176
  interrupt,
177
177
  empty2,
@@ -187,27 +187,27 @@ import {
187
187
  withDefault,
188
188
  option,
189
189
  String2
190
- } from "./chunk-hakqpy8z.js";
191
- import {
192
- guard,
193
- Id,
194
- Timestamp,
195
- ActorType
196
- } from "./chunk-q5w3v4k1.js";
190
+ } from "./chunk-h7zb6d3z.js";
197
191
  import {
198
192
  searchDocs2,
199
193
  readDoc2
200
- } from "./chunk-827sgh31.js";
194
+ } from "./chunk-gmdd1a74.js";
201
195
  import {
202
196
  nextInt
203
- } from "./chunk-gq7y5v3e.js";
197
+ } from "./chunk-bbf0jzsc.js";
204
198
  import {
205
199
  layerJson,
206
200
  make4,
207
201
  withHeaders,
208
202
  layerProtocolSocket,
209
203
  ConnectionHooks
210
- } from "./chunk-940cc29s.js";
204
+ } from "./chunk-099ybrqz.js";
205
+ import {
206
+ guard,
207
+ Id,
208
+ Timestamp,
209
+ ActorType
210
+ } from "./chunk-9avbsbvk.js";
211
211
 
212
212
  // apps/cli/src/mcp.ts
213
213
  import { tmpdir as tmpdir2 } from "os";
@@ -2226,6 +2226,7 @@ import { McpServer, fromJsonSchema } from "@modelcontextprotocol/server";
2226
2226
  var generatedOpenApiSchemas = {
2227
2227
  "0081ac4452412a57": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId"],"properties":{"workspaceId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"teamId":{"type":"string"},"includeSnoozed":{"type":"string","enum":["true","false"]}}}}}'),
2228
2228
  "00f7548b091fdfe9": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"runnerId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"}},"required":["runnerId","workspaceId","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
2229
+ "018d60262e213f02": JSON.parse('{"type":"object","additionalProperties":false,"required":["runId","fileId"],"properties":{"runId":{"type":"string"},"fileId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"offset":{"anyOf":[{"type":"number"},{"type":"string"}],"multipleOf":1,"minimum":0},"length":{"anyOf":[{"type":"number"},{"type":"string"}],"multipleOf":1,"minimum":1,"maximum":262144}}}}}'),
2229
2230
  "027dc751b86d8885": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","input"],"properties":{"workspaceId":{"type":"string","minLength":1},"input":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task"]},"taskId":{"type":"string","minLength":1,"maxLength":240}},"required":["kind","taskId"],"additionalProperties":false},"preset":{"type":"string","enum":["attention","all"]}},"required":["target"],"additionalProperties":false}}}'),
2230
2231
  "04a869801e712407": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"stepKey":{"type":"string","minLength":1,"maxLength":240},"waitId":{"type":"string","minLength":1},"taskThreadEntryId":{"type":"string","minLength":1},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"freeText":{"type":"boolean"},"optionDescriptions":{"type":"object","additionalProperties":{"type":"string"}},"recommended":{"type":"string"},"recommendationReason":{"type":"string"},"informationOnly":{"type":"boolean"},"default":{"type":"string","maxLength":4000,"pattern":"^(?![\\\\s\\\\S]*(?:(?:^|[^A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}|ghp_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+|glpat-[A-Za-z0-9_-]+|\\\\b[Bb][Ee][Aa][Rr][Ee][Rr]\\\\s+[A-Za-z0-9._~+/=-]+|eyJ[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+|[A-Za-z][A-Za-z0-9+.-]*:\\\\/\\\\/(?:[^\\\\s/?#]*@|[^\\\\s?#]*\\\\?)))[\\\\s\\\\S]*$"},"defaultAt":{"type":"string","format":"date-time"},"responderPolicy":{"type":"object","properties":{"eligibleMemberIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100,"uniqueItems":true},"allowWorkspaceAdmins":{"type":"boolean"}},"required":["eligibleMemberIds","allowWorkspaceAdmins"],"additionalProperties":false},"status":{"type":"string","enum":["open","answered","resume_requested","resumed","resume_failed","expired","cancelled"]},"answer":{"type":"object","properties":{"value":{"type":"string","maxLength":4000,"pattern":"^(?![\\\\s\\\\S]*(?:(?:^|[^A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}|ghp_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+|glpat-[A-Za-z0-9_-]+|\\\\b[Bb][Ee][Aa][Rr][Ee][Rr]\\\\s+[A-Za-z0-9._~+/=-]+|eyJ[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+|[A-Za-z][A-Za-z0-9+.-]*:\\\\/\\\\/(?:[^\\\\s/?#]*@|[^\\\\s?#]*\\\\?)))[\\\\s\\\\S]*$"},"answeredByUserId":{"type":"string","minLength":1},"byDefault":{"type":"boolean"},"byAuto":{"type":"boolean"},"evidence":{"type":"object","properties":{"review":{"type":"string","minLength":1,"maxLength":240},"head":{"type":"string","minLength":1,"maxLength":240}},"additionalProperties":false},"answeredAt":{"type":"string","format":"date-time"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":240}},"required":["value","answeredAt","idempotencyKey"],"additionalProperties":false},"resolutionOutcome":{"type":"string","maxLength":4000,"pattern":"^(?![\\\\s\\\\S]*(?:(?:^|[^A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}|ghp_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+|glpat-[A-Za-z0-9_-]+|\\\\b[Bb][Ee][Aa][Rr][Ee][Rr]\\\\s+[A-Za-z0-9._~+/=-]+|eyJ[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]+|[A-Za-z][A-Za-z0-9+.-]*:\\\\/\\\\/(?:[^\\\\s/?#]*@|[^\\\\s?#]*\\\\?)))[\\\\s\\\\S]*$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","runId","stepKey","waitId","prompt","responderPolicy","status","createdAt","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
2231
2232
  "05202550daf612b4": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string"},"kind":{"type":"string","enum":["offer","stop","pause","resume"]},"loop":{"type":"string"}},"required":["id","title","kind"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
@@ -2307,6 +2308,7 @@ var generatedOpenApiSchemas = {
2307
2308
  "32ac7de3d8fc8949": JSON.parse('{"type":"object","properties":{"usedBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quotaBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byPurpose":{"type":"object","properties":{"runFile":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"taskAsset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checkpoint":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["runFile","taskAsset","checkpoint"],"additionalProperties":false},"limits":{"type":"object","properties":{"fileBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filesPerRun":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["fileBytes","filesPerRun"],"additionalProperties":false},"runFileRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650}},"required":["usedBytes","quotaBytes","byPurpose","limits","runFileRetentionDays"],"additionalProperties":false}'),
2308
2309
  "33ecc39a5e097505": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"version":{"type":"string"},"layer":{"type":"string","enum":["team","workspace"]},"digest":{"type":"string"},"outcome":{"type":"string"},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"loop":{"type":"string"},"from":{"type":"string"}},"required":["id","title","loop"],"additionalProperties":false}},"publishedAt":{"type":"string","format":"date-time"},"kit":{"type":"string"}},"required":["id","title","layer","digest","offers","publishedAt","kit"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
2309
2310
  "3470fe86bc616e81": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","taskId","entryId","input"],"properties":{"workspaceId":{"type":"string"},"taskId":{"type":"string","description":"The Task: its id or any key it has had, such as `KIT-12`."},"entryId":{"type":"string"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reaction":{"type":"string","enum":["thumbs_up","thumbs_down","heart","laugh","hooray","confused","eyes","rocket"]},"reacted":{"type":"boolean"}},"required":["reaction","reacted"],"additionalProperties":true}}}'),
2311
+ "35eacb8b04a38525": JSON.parse('{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"step":{"type":"string"},"stepAttemptId":{"type":"string"},"verificationId":{"type":"string"},"madeBy":{"type":"string","enum":["program","agent","check"]},"name":{"type":"string"},"caption":{"type":"string"},"kind":{"type":"string","enum":["image","video","html","text","other"]},"contentType":{"type":"string"},"byteSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"status":{"type":"string","enum":["uploading","available","rejected","refused","removing","removed","expired"]},"reason":{"type":"string"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"actual":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"removedBy":{"type":"string"},"removedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","runId","step","madeBy","name","kind","contentType","byteSize","sha256","status","createdAt"],"additionalProperties":false},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"}},"required":["file","offset","end","text"],"additionalProperties":false}'),
2310
2312
  "3656a0b2fb1be79d": JSON.parse('{"type":"object","additionalProperties":false,"required":["runId"],"properties":{"runId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"step":{"type":"string"}}}}}'),
2311
2313
  "36683821fbfbdcdc": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId"],"properties":{"workspaceId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"teamId":{"type":"string","minLength":1},"repoBindingId":{"type":"string","minLength":1}}}}}'),
2312
2314
  "36d948dddd6a9e41": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string","maxLength":260,"pattern":"^(?:localhost|[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+|\\\\*\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*)(?::(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$"},"teamId":{"type":"string","minLength":1},"repoBindingId":{"type":"string","minLength":1},"addedByActorType":{"type":"string","enum":["human","delegated_agent","agent"]},"addedByActorId":{"type":"string"},"addedAt":{"type":"string","format":"date-time"}},"required":["host","addedByActorType","addedByActorId","addedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
@@ -2840,6 +2842,7 @@ var generatedOpenApiOperationContracts = {
2840
2842
  proposeMemory: { inputSchemaId: "057355d0d5ce3c32", outputSchemaId: "d5afb090a9ae987f" },
2841
2843
  provisionRunnerCredential: { inputSchemaId: "b39474afb7d54a65", outputSchemaId: "e64e9adeb28a4fe2" },
2842
2844
  reactToTaskThreadEntry: { inputSchemaId: "3470fe86bc616e81", outputSchemaId: "45564933894e30ae" },
2845
+ readRunFile: { inputSchemaId: "018d60262e213f02", outputSchemaId: "35eacb8b04a38525" },
2843
2846
  readTranscript: { inputSchemaId: "9f0cec57a4cf20a1", outputSchemaId: "de9952eda651264a" },
2844
2847
  recordChangeRequestReview: { inputSchemaId: "678f394db28394ec", outputSchemaId: "f7dae9095279fe57" },
2845
2848
  recordSessionUpdate: { inputSchemaId: "e90d3f6a3c555be7", outputSchemaId: "efc4a219a6db5db6" },
@@ -4779,6 +4782,13 @@ var operationSpecs = [
4779
4782
  tags: ["runs"],
4780
4783
  summary: "Short-lived download links to available Run Files, by id, valid for 15 minutes. Each call is audited."
4781
4784
  },
4785
+ {
4786
+ name: "readRunFile",
4787
+ parameters: ["runId", "fileId", ["options", false]],
4788
+ namespacePath: ["runs", "readFile"],
4789
+ tags: ["runs"],
4790
+ summary: "Read a text Run File, such as the `<check>.log` a failed check left, redacted: `length` bytes (64 KiB by default, at most 256 KiB) from `offset`, or the file\u2019s end without one. Answers the file, the `offset` and `end` read, and the text. Each call is audited."
4791
+ },
4782
4792
  {
4783
4793
  name: "removeRunFile",
4784
4794
  parameters: ["runId", "fileId", ["request", false]],
@@ -6247,7 +6257,7 @@ function validateObjectSchemaValue(operationName, path, schema, value) {
6247
6257
  if (properties !== undefined) {
6248
6258
  for (const key of Object.keys(value)) {
6249
6259
  if (!properties.has(key))
6250
- throw new Error(`${operationName} ${path} contains unknown field ${key}.`);
6260
+ throw new Error(`${operationName} ${path} contains unknown field ${key}. It takes: ${[...properties].join(", ")}.`);
6251
6261
  }
6252
6262
  }
6253
6263
  if (!isRecord2(schema.properties))
@@ -7867,6 +7877,9 @@ class KitmanClient {
7867
7877
  runFileUrls(runId, request) {
7868
7878
  return this.run(this.effectClient.runFileUrls(runId, request));
7869
7879
  }
7880
+ readRunFile(runId, fileId, options = {}) {
7881
+ return this.run(this.effectClient.readRunFile(runId, fileId, options));
7882
+ }
7870
7883
  removeRunFile(runId, fileId, request = {}) {
7871
7884
  return this.run(this.effectClient.removeRunFile(runId, fileId, request));
7872
7885
  }
@@ -1,8 +1,4 @@
1
1
  // @bun
2
- import {
3
- FileSystem,
4
- Path
5
- } from "./chunk-hakqpy8z.js";
6
2
  import {
7
3
  isObject,
8
4
  isUint8Array,
@@ -17,23 +13,27 @@ import {
17
13
  isJsonObject,
18
14
  decodeJsonString,
19
15
  encodePrettyJsonString
20
- } from "./chunk-zw3gf6r5.js";
21
- import"./chunk-q5w3v4k1.js";
16
+ } from "./chunk-zpp4jg4a.js";
17
+ import {
18
+ FileSystem,
19
+ Path
20
+ } from "./chunk-h7zb6d3z.js";
22
21
  import {
23
22
  tomlTableHeader2,
24
23
  tomlKeyPath2,
25
24
  kitmanSkillEntry,
26
25
  isPathWithin2
27
- } from "./chunk-vxc2cg5f.js";
26
+ } from "./chunk-bmkc5r0p.js";
28
27
  import {
29
28
  instructionsStart,
30
29
  instructionsEnd,
31
30
  renderMcpServer,
32
31
  materializeKitSetup,
33
32
  tomlInline
34
- } from "./chunk-bc8ytp0y.js";
35
- import"./chunk-r1s1dcy0.js";
36
- import"./chunk-84xks8tn.js";
33
+ } from "./chunk-f2ycw5bp.js";
34
+ import"./chunk-5129s1vg.js";
35
+ import"./chunk-r9tzwrnb.js";
36
+ import"./chunk-9avbsbvk.js";
37
37
 
38
38
  // packages/agent-runtime/src/kit-setup-sync.ts
39
39
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-zw3gf6r5.js";
16
+ } from "./chunk-zpp4jg4a.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-q5w3v4k1.js";
20
+ } from "./chunk-9avbsbvk.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";