@elie-laloum/outpost 4.1.0 → 4.2.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 (189) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +9 -5
  3. package/SECURITY.md +2 -0
  4. package/dist/adapters/models/openai-compatible.constants.d.ts +4 -0
  5. package/dist/adapters/models/openai-compatible.constants.js +10 -0
  6. package/dist/adapters/models/openai-compatible.constants.js.map +1 -0
  7. package/dist/adapters/models/openai-compatible.d.ts +3 -0
  8. package/dist/adapters/models/openai-compatible.js +78 -0
  9. package/dist/adapters/models/openai-compatible.js.map +1 -0
  10. package/dist/adapters/models/openai-compatible.types.d.ts +14 -0
  11. package/dist/adapters/models/openai-compatible.types.js +2 -0
  12. package/dist/adapters/models/openai-compatible.types.js.map +1 -0
  13. package/dist/adapters/models/openai-http.d.ts +1 -0
  14. package/dist/adapters/models/openai-http.js +30 -0
  15. package/dist/adapters/models/openai-http.js.map +1 -0
  16. package/dist/adapters/models/openai-request.d.ts +4 -0
  17. package/dist/adapters/models/openai-request.js +46 -0
  18. package/dist/adapters/models/openai-request.js.map +1 -0
  19. package/dist/adapters/models/openai-response.d.ts +3 -0
  20. package/dist/adapters/models/openai-response.js +65 -0
  21. package/dist/adapters/models/openai-response.js.map +1 -0
  22. package/dist/application/execution.types.d.ts +2 -0
  23. package/dist/application/execution.types.js.map +1 -1
  24. package/dist/application/outpost.types.d.ts +5 -0
  25. package/dist/application/outpost.types.js.map +1 -1
  26. package/dist/application/recovery-archive.d.ts +4 -0
  27. package/dist/application/recovery-archive.js +29 -0
  28. package/dist/application/recovery-archive.js.map +1 -0
  29. package/dist/application/recovery-archive.types.d.ts +10 -0
  30. package/dist/application/recovery-archive.types.js +2 -0
  31. package/dist/application/recovery-archive.types.js.map +1 -0
  32. package/dist/application/recovery-inspection.js +3 -0
  33. package/dist/application/recovery-inspection.js.map +1 -1
  34. package/dist/application/recovery-inspection.types.d.ts +2 -0
  35. package/dist/application/recovery-inspection.types.js.map +1 -1
  36. package/dist/application/recovery-retention.d.ts +2 -1
  37. package/dist/application/recovery-retention.js +9 -1
  38. package/dist/application/recovery-retention.js.map +1 -1
  39. package/dist/application/recovery-retention.types.d.ts +6 -0
  40. package/dist/application/recovery-retention.types.js.map +1 -1
  41. package/dist/application/remote-backup.js +8 -0
  42. package/dist/application/remote-backup.js.map +1 -1
  43. package/dist/application/remote-workspace.types.d.ts +2 -0
  44. package/dist/application/remote-workspace.types.js.map +1 -1
  45. package/dist/application/sandbox-agents.js +2 -1
  46. package/dist/application/sandbox-agents.js.map +1 -1
  47. package/dist/application/sandbox-dispatch.js +9 -0
  48. package/dist/application/sandbox-dispatch.js.map +1 -1
  49. package/dist/application/sandbox-provision.js +6 -0
  50. package/dist/application/sandbox-provision.js.map +1 -1
  51. package/dist/application/storage-reservation.js +3 -0
  52. package/dist/application/storage-reservation.js.map +1 -1
  53. package/dist/application/transport-inspection.constants.d.ts +2 -0
  54. package/dist/application/transport-inspection.constants.js +10 -0
  55. package/dist/application/transport-inspection.constants.js.map +1 -0
  56. package/dist/application/transport-inspection.d.ts +2 -0
  57. package/dist/application/transport-inspection.js +103 -0
  58. package/dist/application/transport-inspection.js.map +1 -0
  59. package/dist/application/transport-retention.d.ts +4 -0
  60. package/dist/application/transport-retention.js +153 -0
  61. package/dist/application/transport-retention.js.map +1 -0
  62. package/dist/domain/conversation.types.d.ts +2 -0
  63. package/dist/domain/conversation.types.js.map +1 -1
  64. package/dist/domain/model.types.d.ts +15 -0
  65. package/dist/domain/model.types.js +2 -0
  66. package/dist/domain/model.types.js.map +1 -0
  67. package/dist/domain/transport.constants.d.ts +2 -0
  68. package/dist/domain/transport.constants.js +3 -0
  69. package/dist/domain/transport.constants.js.map +1 -0
  70. package/dist/domain/transport.d.ts +6 -0
  71. package/dist/domain/transport.js +21 -0
  72. package/dist/domain/transport.js.map +1 -0
  73. package/dist/domain/transport.types.d.ts +31 -0
  74. package/dist/domain/transport.types.js +2 -0
  75. package/dist/domain/transport.types.js.map +1 -0
  76. package/dist/index.d.ts +17 -0
  77. package/dist/index.js +8 -0
  78. package/dist/index.js.map +1 -1
  79. package/dist/infrastructure/artifact-store.js +10 -0
  80. package/dist/infrastructure/artifact-store.js.map +1 -1
  81. package/dist/infrastructure/artifact-store.types.d.ts +3 -1
  82. package/dist/infrastructure/artifact-store.types.js.map +1 -1
  83. package/dist/infrastructure/conversations/capture.js +1 -1
  84. package/dist/infrastructure/conversations/capture.js.map +1 -1
  85. package/dist/infrastructure/conversations.d.ts +2 -0
  86. package/dist/infrastructure/conversations.js +2 -0
  87. package/dist/infrastructure/conversations.js.map +1 -1
  88. package/dist/infrastructure/inspection-file.js +3 -3
  89. package/dist/infrastructure/inspection-file.js.map +1 -1
  90. package/dist/infrastructure/inspection-hash.js +4 -3
  91. package/dist/infrastructure/inspection-hash.js.map +1 -1
  92. package/dist/infrastructure/inspection-path.d.ts +1 -0
  93. package/dist/infrastructure/inspection-path.js +18 -0
  94. package/dist/infrastructure/inspection-path.js.map +1 -0
  95. package/dist/infrastructure/journal.js +6 -0
  96. package/dist/infrastructure/journal.js.map +1 -1
  97. package/dist/infrastructure/journal.types.d.ts +3 -0
  98. package/dist/infrastructure/journal.types.js.map +1 -1
  99. package/dist/infrastructure/local-transport.d.ts +3 -0
  100. package/dist/infrastructure/local-transport.js +146 -0
  101. package/dist/infrastructure/local-transport.js.map +1 -0
  102. package/dist/infrastructure/local-transport.types.d.ts +3 -0
  103. package/dist/infrastructure/local-transport.types.js +2 -0
  104. package/dist/infrastructure/local-transport.types.js.map +1 -0
  105. package/dist/infrastructure/resource-activity-inspection.d.ts +2 -1
  106. package/dist/infrastructure/resource-activity-inspection.js +2 -2
  107. package/dist/infrastructure/resource-activity-inspection.js.map +1 -1
  108. package/dist/infrastructure/resource-activity.js +42 -14
  109. package/dist/infrastructure/resource-activity.js.map +1 -1
  110. package/dist/infrastructure/resource-activity.types.d.ts +2 -0
  111. package/dist/infrastructure/resource-activity.types.js.map +1 -1
  112. package/dist/infrastructure/s3-transport.d.ts +4 -0
  113. package/dist/infrastructure/s3-transport.js +144 -0
  114. package/dist/infrastructure/s3-transport.js.map +1 -0
  115. package/dist/infrastructure/s3-transport.types.d.ts +6 -0
  116. package/dist/infrastructure/s3-transport.types.js +2 -0
  117. package/dist/infrastructure/s3-transport.types.js.map +1 -0
  118. package/dist/infrastructure/storage-inventory.types.d.ts +2 -1
  119. package/dist/infrastructure/storage-inventory.types.js.map +1 -1
  120. package/dist/infrastructure/storage-reservations.types.d.ts +2 -0
  121. package/dist/infrastructure/storage-reservations.types.js.map +1 -1
  122. package/dist/infrastructure/task-queue-bullmq-resources.d.ts +13 -0
  123. package/dist/infrastructure/task-queue-bullmq-resources.js +118 -0
  124. package/dist/infrastructure/task-queue-bullmq-resources.js.map +1 -0
  125. package/dist/infrastructure/task-queue-bullmq-state.d.ts +5 -0
  126. package/dist/infrastructure/task-queue-bullmq-state.js +26 -0
  127. package/dist/infrastructure/task-queue-bullmq-state.js.map +1 -0
  128. package/dist/infrastructure/task-queue-bullmq.constants.d.ts +7 -0
  129. package/dist/infrastructure/task-queue-bullmq.constants.js +79 -0
  130. package/dist/infrastructure/task-queue-bullmq.constants.js.map +1 -0
  131. package/dist/infrastructure/task-queue-bullmq.d.ts +3 -0
  132. package/dist/infrastructure/task-queue-bullmq.js +124 -0
  133. package/dist/infrastructure/task-queue-bullmq.js.map +1 -0
  134. package/dist/infrastructure/task-queue-bullmq.types.d.ts +17 -0
  135. package/dist/infrastructure/task-queue-bullmq.types.js +2 -0
  136. package/dist/infrastructure/task-queue-bullmq.types.js.map +1 -0
  137. package/dist/infrastructure/transport-archive.constants.d.ts +6 -0
  138. package/dist/infrastructure/transport-archive.constants.js +7 -0
  139. package/dist/infrastructure/transport-archive.constants.js.map +1 -0
  140. package/dist/infrastructure/transport-archive.d.ts +5 -0
  141. package/dist/infrastructure/transport-archive.js +157 -0
  142. package/dist/infrastructure/transport-archive.js.map +1 -0
  143. package/dist/infrastructure/transport-archive.types.d.ts +17 -0
  144. package/dist/infrastructure/transport-archive.types.js +2 -0
  145. package/dist/infrastructure/transport-archive.types.js.map +1 -0
  146. package/dist/infrastructure/transport-artifact-store.d.ts +3 -0
  147. package/dist/infrastructure/transport-artifact-store.js +31 -0
  148. package/dist/infrastructure/transport-artifact-store.js.map +1 -0
  149. package/dist/infrastructure/transport-artifact-store.types.d.ts +4 -0
  150. package/dist/infrastructure/transport-artifact-store.types.js +2 -0
  151. package/dist/infrastructure/transport-artifact-store.types.js.map +1 -0
  152. package/dist/infrastructure/transport-checkpoint.d.ts +5 -0
  153. package/dist/infrastructure/transport-checkpoint.js +105 -0
  154. package/dist/infrastructure/transport-checkpoint.js.map +1 -0
  155. package/dist/infrastructure/transport-checkpoint.types.d.ts +9 -0
  156. package/dist/infrastructure/transport-checkpoint.types.js +2 -0
  157. package/dist/infrastructure/transport-checkpoint.types.js.map +1 -0
  158. package/dist/infrastructure/transport-conversations.d.ts +4 -0
  159. package/dist/infrastructure/transport-conversations.js +69 -0
  160. package/dist/infrastructure/transport-conversations.js.map +1 -0
  161. package/dist/infrastructure/transport-conversations.types.d.ts +4 -0
  162. package/dist/infrastructure/transport-conversations.types.js +2 -0
  163. package/dist/infrastructure/transport-conversations.types.js.map +1 -0
  164. package/dist/infrastructure/transport-envelope.d.ts +7 -0
  165. package/dist/infrastructure/transport-envelope.js +47 -0
  166. package/dist/infrastructure/transport-envelope.js.map +1 -0
  167. package/dist/infrastructure/transport-journal.d.ts +6 -0
  168. package/dist/infrastructure/transport-journal.js +93 -0
  169. package/dist/infrastructure/transport-journal.js.map +1 -0
  170. package/dist/infrastructure/transport-journal.types.d.ts +10 -0
  171. package/dist/infrastructure/transport-journal.types.js +2 -0
  172. package/dist/infrastructure/transport-journal.types.js.map +1 -0
  173. package/dist/infrastructure/transport-json.d.ts +6 -0
  174. package/dist/infrastructure/transport-json.js +46 -0
  175. package/dist/infrastructure/transport-json.js.map +1 -0
  176. package/dist/infrastructure/transport-reservations.d.ts +5 -0
  177. package/dist/infrastructure/transport-reservations.js +89 -0
  178. package/dist/infrastructure/transport-reservations.js.map +1 -0
  179. package/dist/infrastructure/transport-reservations.types.d.ts +4 -0
  180. package/dist/infrastructure/transport-reservations.types.js +2 -0
  181. package/dist/infrastructure/transport-reservations.types.js.map +1 -0
  182. package/dist/infrastructure/transport.constants.d.ts +8 -0
  183. package/dist/infrastructure/transport.constants.js +9 -0
  184. package/dist/infrastructure/transport.constants.js.map +1 -0
  185. package/dist/infrastructure/workflow-checkpoint.js +7 -0
  186. package/dist/infrastructure/workflow-checkpoint.js.map +1 -1
  187. package/dist/infrastructure/workflow-checkpoint.types.d.ts +3 -1
  188. package/dist/infrastructure/workflow-checkpoint.types.js.map +1 -1
  189. package/package.json +26 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport-reservations.js","sourceRoot":"","sources":["../../src/infrastructure/transport-reservations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAO5D,MAAM,GAAG,GAAG,qBAAqB,CAAC;AAElC,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;IAChE,SAAS,CACP,KAAK;QACH,OAAO,KAAK,KAAK,QAAQ;QACzB,QAAQ,IAAI,KAAK;QACjB,KAAK,CAAC,MAAM,KAAK,CAAC;QAClB,cAAc,IAAI,KAAK;QACvB,KAAK,CAAC,YA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AG,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;oBACnE,UAAU,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;oBACrC,GAAG,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAClE,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,CAAC,KAAK,YAAY,iBAAiB,CAAC;oBAAE,MAAM,KAAK,CAAC;YACzD,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,cAAc,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;QAC3C,MAAM,KAAK,CAAC;IACd,CAAC;IACD,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;QACzB,IAAI,QAAQ;YAAE,OAAO;QACrB,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;QACnB,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC,CAAC;IACF,OAAO;QACL,EAAE;QACF,UAAU;QACV,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,OAAO;QACP,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO;KAC/B,CAAC;AACJ,CAAC","sourcesContent":["import { transportDefaults } from \"./transport.constants.ts\";\nimport { randomUUID } from \"node:crypto\";\nimport type { Transport } from \"../domain/transport.types.ts\";\nimport { TransportConflict } from \"../domain/transport.ts\";\nimport { invariant, recordRecovery } from \"../domain/errors.ts\";\nimport { jsonBytes, jsonObject } from \"./transport-json.ts\";\nimport type {\n StorageReservation,\n StorageReservationOptions,\n} from \"./storage-reservations.types.ts\";\nimport type { ReservationLedger } from \"./transport-reservations.types.ts\";\n\nconst key = \"reservations/ledger\";\n\nexport function reservationLedger(value: unknown): ReservationLedger {\n if (value === undefined) return { format: 1, reservations: {} };\n invariant(\n value &&\n typeof value === \"object\" &&\n \"format\" in value &&\n value.format === 1 &&\n \"reservations\" in value &&\n value.reservations &&\n typeof value.reservations === \"object\" &&\n !Array.isArray(value.reservations),\n \"Invalid reservation ledger\",\n );\n const entries = Object.entries(value.reservations);\n invariant(\n entries.every(\n ([id, bytes]) =>\n /^[a-f0-9-]{36}$/.test(id) &&\n typeof bytes === \"number\" &&\n Number.isSafeInteger(bytes) &&\n bytes >= 0,\n ),\n \"Invalid reservation entry\",\n );\n return { format: 1, reservations: Object.fromEntries(entries) };\n}\n\nexport async function reserveTransportStorage(\n transporter: Transport,\n repository: string,\n options: StorageReservationOptions,\n): Promise<StorageReservation> {\n invariant(\n Number.isSafeInteger(options.maxBytes) &&\n options.maxBytes >= 0 &&\n Number.isSafeInteger(options.reserveBytes) &&\n options.reserveBytes >= 0,\n \"Invalid reservation byte limit\",\n );\n const id = randomUUID();\n const maxEntries = options.maxEntries ?? transportDefaults.maxEntries;\n invariant(\n Number.isSafeInteger(maxEntries) && maxEntries > 0,\n \"Invalid reservation entry limit\",\n );\n async function update(release: boolean): Promise<void> {\n for (\n let attempt = 0;\n attempt < transportDefaults.mutationAttempts;\n attempt++\n ) {\n if (!release) options.signal?.throwIfAborted();\n const current = await transporter.read(key);\n const ledger = reservationLedger(jsonObject(current));\n const reservations = { ...ledger.reservations };\n if (release) delete reservations[id];\n if (!release) {\n let usage = 0,\n count = 0;\n for await (const entry of transporter.list(\n \"\",\n options.signal ? { signal: options.signal } : {},\n )) {\n invariant(\n ++count <= maxEntries,\n \"Reservation inventory is incomplete\",\n );\n if (entry.key !== key) usage += entry.size;\n }\n const reserved = Object.values(reservations).reduce(\n (sum, value) => sum + value,\n 0,\n );\n invariant(\n usage + reserved + options.reserveBytes <= options.maxBytes,\n \"Outpost storage quota admission refused\",\n );\n reservations[id] = options.reserveBytes;\n }\n try {\n await transporter.write(key, jsonBytes({ format: 1, reservations }), {\n ifRevision: current?.revision ?? null,\n ...(!release && options.signal ? { signal: options.signal } : {}),\n });\n return;\n } catch (error) {\n if (!(error instanceof TransportConflict)) throw error;\n }\n }\n throw new Error(\"Storage reservation contention limit exceeded\");\n }\n try {\n await update(false);\n } catch (error) {\n recordRecovery(error, { reservation: id });\n throw error;\n }\n let released = false;\n const release = async () => {\n if (released) return;\n await update(true);\n released = true;\n };\n return {\n id,\n repository,\n reserveBytes: options.reserveBytes,\n release,\n [Symbol.asyncDispose]: release,\n };\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export interface ReservationLedger {
2
+ readonly format: 1;
3
+ readonly reservations: Readonly<Record<string, number>>;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=transport-reservations.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport-reservations.types.js","sourceRoot":"","sources":["../../src/infrastructure/transport-reservations.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface ReservationLedger {\n readonly format: 1;\n readonly reservations: Readonly<Record<string, number>>;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ export declare const transportDefaults: Readonly<{
2
+ maxBytes: number;
3
+ headerBytes: 1024;
4
+ lockMs: 30000;
5
+ retryMs: 10;
6
+ maxEntries: 100000;
7
+ mutationAttempts: 100;
8
+ }>;
@@ -0,0 +1,9 @@
1
+ export const transportDefaults = Object.freeze({
2
+ maxBytes: 64 * 1024 * 1024,
3
+ headerBytes: 1024,
4
+ lockMs: 30_000,
5
+ retryMs: 10,
6
+ maxEntries: 100_000,
7
+ mutationAttempts: 100,
8
+ });
9
+ //# sourceMappingURL=transport.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.constants.js","sourceRoot":"","sources":["../../src/infrastructure/transport.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IAC1B,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,OAAO;IACnB,gBAAgB,EAAE,GAAG;CACtB,CAAC,CAAC","sourcesContent":["export const transportDefaults = Object.freeze({\n maxBytes: 64 * 1024 * 1024,\n headerBytes: 1024,\n lockMs: 30_000,\n retryMs: 10,\n maxEntries: 100_000,\n mutationAttempts: 100,\n});\n"]}
@@ -1,3 +1,4 @@
1
+ import { workflowCheckpointStore } from "./transport-checkpoint.js";
1
2
  import { readInspectionFile } from "./inspection-file.js";
2
3
  import { workflowCheckpointMaxBytes } from "./workflow-checkpoint.constants.js";
3
4
  import { createHash, randomUUID } from "node:crypto";
@@ -5,6 +6,12 @@ import { mkdir, open, realpath, rename, rm } from "node:fs/promises";
5
6
  import { join, resolve } from "node:path";
6
7
  import { lock } from "./git/lock.js";
7
8
  export function fileWorkflowCheckpointStore(options) {
9
+ if ((options.directory === undefined) === (options.transporter === undefined))
10
+ throw new Error("Provide exactly one checkpoint directory or transporter");
11
+ if (options.transporter)
12
+ return workflowCheckpointStore({ transporter: options.transporter });
13
+ if (options.directory === undefined)
14
+ throw new Error("Checkpoint directory is required");
8
15
  const configuredDirectory = resolve(options.directory);
9
16
  return {
10
17
  async acquire(runId) {
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-checkpoint.js","sourceRoot":"","sources":["../../src/infrastructure/workflow-checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aA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wBACT,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;oBACvC,CAAC;gBACH,CAAC;gBACD,KAAK,CAAC,OAAO;oBACX,IAAI,QAAQ;wBAAE,OAAO;oBACrB,QAAQ,GAAG,IAAI,CAAC;oBAChB,MAAM,OAAO,EAAE,CAAC;gBAClB,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { readInspectionFile } from \"./inspection-file.ts\";\nimport { workflowCheckpointMaxBytes } from \"./workflow-checkpoint.constants.ts\";\nimport { createHash, randomUUID } from \"node:crypto\";\nimport { mkdir, open, realpath, rename, rm } from \"node:fs/promises\";\nimport { join, resolve } from \"node:path\";\nimport type { WorkflowCheckpointStore } from \"../domain/workflow/checkpoint.types.ts\";\nimport type { FileWorkflowCheckpointOptions } from \"./workflow-checkpoint.types.ts\";\nimport { lock } from \"./git/lock.ts\";\n\nexport function fileWorkflowCheckpointStore(\n options: FileWorkflowCheckpointOptions,\n): WorkflowCheckpointStore {\n const configuredDirectory = resolve(options.directory);\n return {\n async acquire(runId) {\n if (!runId.trim()) throw new Error(\"Checkpoint runId must not be empty\");\n await mkdir(configuredDirectory, { recursive: true, mode: 0o700 });\n const directory = await realpath(configuredDirectory);\n const release = await lock(directory, `workflow:${runId}`);\n const path = join(\n directory,\n `${createHash(\"sha256\").update(runId).digest(\"hex\")}.json`,\n );\n let released = false;\n const assertOwned = () => {\n if (released) throw new Error(\"Checkpoint lease has been released\");\n };\n return {\n async read() {\n assertOwned();\n try {\n return JSON.parse(\n (\n await readInspectionFile(path, workflowCheckpointMaxBytes)\n ).toString(\"utf8\"),\n ) as unknown;\n } catch (error) {\n if (\n error &&\n typeof error === \"object\" &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n )\n return undefined;\n throw error;\n }\n },\n async write(checkpoint) {\n assertOwned();\n const data = JSON.stringify(checkpoint);\n if (Buffer.byteLength(data) > workflowCheckpointMaxBytes)\n throw new Error(\n \"Workflow checkpoint exceeds 16 MiB; store large artifacts separately\",\n );\n const temporary = `${path}.${randomUUID()}.tmp`;\n try {\n const file = await open(temporary, \"wx\", 0o600);\n try {\n await file.writeFile(data);\n await file.sync();\n } finally {\n await file.close();\n }\n await rename(temporary, path);\n if (process.platform !== \"win32\") {\n const parent = await open(directory, \"r\");\n try {\n await parent.sync();\n } finally {\n await parent.close();\n }\n }\n } finally {\n await rm(temporary, { force: true });\n }\n },\n async release() {\n if (released) return;\n released = true;\n await release();\n },\n };\n },\n };\n}\n"]}
1
+ {"version":3,"file":"workflow-checkpoint.js","sourceRoot":"","sources":["../../src/infrastructure/workflow-checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,UAAU,2BAA2B,CACzC,OAAsC;IAEtC,IAAI,CAAC,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC;QAC3E,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,IAAI,OAAO,CAAC,WAAW;QACrB,OAAO,uBAAuB,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvE,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS;QACjC,MAA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AAC;gBAClB,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { workflowCheckpointStore } from \"./transport-checkpoint.ts\";\nimport { readInspectionFile } from \"./inspection-file.ts\";\nimport { workflowCheckpointMaxBytes } from \"./workflow-checkpoint.constants.ts\";\nimport { createHash, randomUUID } from \"node:crypto\";\nimport { mkdir, open, realpath, rename, rm } from \"node:fs/promises\";\nimport { join, resolve } from \"node:path\";\nimport type { WorkflowCheckpointStore } from \"../domain/workflow/checkpoint.types.ts\";\nimport type { FileWorkflowCheckpointOptions } from \"./workflow-checkpoint.types.ts\";\nimport { lock } from \"./git/lock.ts\";\n\nexport function fileWorkflowCheckpointStore(\n options: FileWorkflowCheckpointOptions,\n): WorkflowCheckpointStore {\n if ((options.directory === undefined) === (options.transporter === undefined))\n throw new Error(\"Provide exactly one checkpoint directory or transporter\");\n if (options.transporter)\n return workflowCheckpointStore({ transporter: options.transporter });\n if (options.directory === undefined)\n throw new Error(\"Checkpoint directory is required\");\n const configuredDirectory = resolve(options.directory);\n return {\n async acquire(runId) {\n if (!runId.trim()) throw new Error(\"Checkpoint runId must not be empty\");\n await mkdir(configuredDirectory, { recursive: true, mode: 0o700 });\n const directory = await realpath(configuredDirectory);\n const release = await lock(directory, `workflow:${runId}`);\n const path = join(\n directory,\n `${createHash(\"sha256\").update(runId).digest(\"hex\")}.json`,\n );\n let released = false;\n const assertOwned = () => {\n if (released) throw new Error(\"Checkpoint lease has been released\");\n };\n return {\n async read() {\n assertOwned();\n try {\n return JSON.parse(\n (\n await readInspectionFile(path, workflowCheckpointMaxBytes)\n ).toString(\"utf8\"),\n ) as unknown;\n } catch (error) {\n if (\n error &&\n typeof error === \"object\" &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n )\n return undefined;\n throw error;\n }\n },\n async write(checkpoint) {\n assertOwned();\n const data = JSON.stringify(checkpoint);\n if (Buffer.byteLength(data) > workflowCheckpointMaxBytes)\n throw new Error(\n \"Workflow checkpoint exceeds 16 MiB; store large artifacts separately\",\n );\n const temporary = `${path}.${randomUUID()}.tmp`;\n try {\n const file = await open(temporary, \"wx\", 0o600);\n try {\n await file.writeFile(data);\n await file.sync();\n } finally {\n await file.close();\n }\n await rename(temporary, path);\n if (process.platform !== \"win32\") {\n const parent = await open(directory, \"r\");\n try {\n await parent.sync();\n } finally {\n await parent.close();\n }\n }\n } finally {\n await rm(temporary, { force: true });\n }\n },\n async release() {\n if (released) return;\n released = true;\n await release();\n },\n };\n },\n };\n}\n"]}
@@ -1,4 +1,6 @@
1
+ import type { Transport } from "../domain/transport.types.ts";
1
2
  export interface FileWorkflowCheckpointOptions {
2
3
  /** Private directory for checkpoint data and local process ownership locks. */
3
- readonly directory: string;
4
+ readonly directory?: string;
5
+ readonly transporter?: Transport;
4
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-checkpoint.types.js","sourceRoot":"","sources":["../../src/infrastructure/workflow-checkpoint.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface FileWorkflowCheckpointOptions {\n /** Private directory for checkpoint data and local process ownership locks. */\n readonly directory: string;\n}\n"]}
1
+ {"version":3,"file":"workflow-checkpoint.types.js","sourceRoot":"","sources":["../../src/infrastructure/workflow-checkpoint.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Transport } from \"../domain/transport.types.ts\";\n\nexport interface FileWorkflowCheckpointOptions {\n /** Private directory for checkpoint data and local process ownership locks. */\n readonly directory?: string;\n readonly transporter?: Transport;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elie-laloum/outpost",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Programmable sandboxes, coding agents and typed workflows.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,6 +43,14 @@
43
43
  "./providers/firecracker": {
44
44
  "types": "./dist/providers/firecracker.d.ts",
45
45
  "import": "./dist/providers/firecracker.js"
46
+ },
47
+ "./transports/s3": {
48
+ "types": "./dist/infrastructure/s3-transport.d.ts",
49
+ "import": "./dist/infrastructure/s3-transport.js"
50
+ },
51
+ "./queues/bullmq": {
52
+ "types": "./dist/infrastructure/task-queue-bullmq.d.ts",
53
+ "import": "./dist/infrastructure/task-queue-bullmq.js"
46
54
  }
47
55
  },
48
56
  "files": [
@@ -66,11 +74,14 @@
66
74
  "test:package": "node scripts/package-smoke.mjs",
67
75
  "test:container": "node --test test/container.test.ts",
68
76
  "architecture": "node scripts/check-architecture.mjs",
69
- "docs:sync": "npm run build && node docs/scripts/sync-reference.mjs",
70
- "docs:check": "node docs/scripts/sync-reference.mjs --check && npm run check --prefix docs",
77
+ "docs:sync": "npm run build && node docs/scripts/sync-preparations.mjs && node docs/scripts/sync-reference.mjs",
78
+ "docs:check": "node docs/scripts/sync-preparations.mjs --check && node docs/scripts/sync-reference.mjs --check && npm run check --prefix docs",
71
79
  "docs:dev": "npm run dev --prefix docs",
72
80
  "docs:build": "npm run build --prefix docs",
73
- "docs:test": "npm run test:build --prefix docs && node docs/scripts/check-examples.mjs && node --test docs/scripts/release-channel.test.mjs"
81
+ "docs:test": "npm run test:build --prefix docs && node docs/scripts/check-examples.mjs && node --test docs/scripts/release-channel.test.mjs",
82
+ "docs:test:browser": "npm run test:browser --prefix docs",
83
+ "docs:test:container": "node docs/scripts/check-container-examples.mjs",
84
+ "test:redis": "node --test test/redis.test.ts"
74
85
  },
75
86
  "repository": {
76
87
  "type": "git",
@@ -84,9 +95,11 @@
84
95
  "provenance": true
85
96
  },
86
97
  "peerDependencies": {
98
+ "@aws-sdk/client-s3": "^3.1140.0",
87
99
  "@daytona/sdk": "^0.216.0",
88
100
  "@opentelemetry/api": "^1.9.0",
89
- "@vercel/sandbox": "^3.3.0"
101
+ "@vercel/sandbox": "^3.3.0",
102
+ "bullmq": "^5.81.5"
90
103
  },
91
104
  "peerDependenciesMeta": {
92
105
  "@daytona/sdk": {
@@ -97,15 +110,23 @@
97
110
  },
98
111
  "@opentelemetry/api": {
99
112
  "optional": true
113
+ },
114
+ "@aws-sdk/client-s3": {
115
+ "optional": true
116
+ },
117
+ "bullmq": {
118
+ "optional": true
100
119
  }
101
120
  },
102
121
  "devDependencies": {
122
+ "@aws-sdk/client-s3": "^3.1140.0",
103
123
  "@daytona/sdk": "^0.216.0",
104
124
  "@opentelemetry/api": "^1.9.0",
105
125
  "@opentelemetry/sdk-metrics": "^2.0.0",
106
126
  "@opentelemetry/sdk-trace-base": "^2.0.0",
107
127
  "@types/node": "^24.0.0",
108
128
  "@vercel/sandbox": "^3.3.0",
129
+ "bullmq": "^5.81.5",
109
130
  "c8": "^10.1.3",
110
131
  "prettier": "^3.5.3",
111
132
  "typescript": "^6.0.3"