@vendoai/apps 0.4.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 (203) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +8 -0
  3. package/dist/adapter-conformance.d.ts +48 -0
  4. package/dist/adapter-conformance.d.ts.map +1 -0
  5. package/dist/adapter-conformance.js +196 -0
  6. package/dist/adapter-conformance.js.map +1 -0
  7. package/dist/agent-tools.d.ts +10 -0
  8. package/dist/agent-tools.d.ts.map +1 -0
  9. package/dist/agent-tools.js +252 -0
  10. package/dist/agent-tools.js.map +1 -0
  11. package/dist/app-data.d.ts +23 -0
  12. package/dist/app-data.d.ts.map +1 -0
  13. package/dist/app-data.js +129 -0
  14. package/dist/app-data.js.map +1 -0
  15. package/dist/app-token.d.ts +24 -0
  16. package/dist/app-token.d.ts.map +1 -0
  17. package/dist/app-token.js +61 -0
  18. package/dist/app-token.js.map +1 -0
  19. package/dist/audit.d.ts +11 -0
  20. package/dist/audit.d.ts.map +1 -0
  21. package/dist/audit.js +19 -0
  22. package/dist/audit.js.map +1 -0
  23. package/dist/automation-plan.d.ts +43 -0
  24. package/dist/automation-plan.d.ts.map +1 -0
  25. package/dist/automation-plan.js +212 -0
  26. package/dist/automation-plan.js.map +1 -0
  27. package/dist/bench/client.d.ts +43 -0
  28. package/dist/bench/client.d.ts.map +1 -0
  29. package/dist/bench/client.js +129 -0
  30. package/dist/bench/client.js.map +1 -0
  31. package/dist/bench/fixtures.d.ts +42 -0
  32. package/dist/bench/fixtures.d.ts.map +1 -0
  33. package/dist/bench/fixtures.js +146 -0
  34. package/dist/bench/fixtures.js.map +1 -0
  35. package/dist/bench/judge.d.ts +9 -0
  36. package/dist/bench/judge.d.ts.map +1 -0
  37. package/dist/bench/judge.js +71 -0
  38. package/dist/bench/judge.js.map +1 -0
  39. package/dist/bench/metrics.d.ts +32 -0
  40. package/dist/bench/metrics.d.ts.map +1 -0
  41. package/dist/bench/metrics.js +172 -0
  42. package/dist/bench/metrics.js.map +1 -0
  43. package/dist/bench/prompts.d.ts +17 -0
  44. package/dist/bench/prompts.d.ts.map +1 -0
  45. package/dist/bench/prompts.js +100 -0
  46. package/dist/bench/prompts.js.map +1 -0
  47. package/dist/bench/report.d.ts +43 -0
  48. package/dist/bench/report.d.ts.map +1 -0
  49. package/dist/bench/report.js +74 -0
  50. package/dist/bench/report.js.map +1 -0
  51. package/dist/bench/runner.d.ts +15 -0
  52. package/dist/bench/runner.d.ts.map +1 -0
  53. package/dist/bench/runner.js +26 -0
  54. package/dist/bench/runner.js.map +1 -0
  55. package/dist/bench/toolfork.d.ts +18 -0
  56. package/dist/bench/toolfork.d.ts.map +1 -0
  57. package/dist/bench/toolfork.js +125 -0
  58. package/dist/bench/toolfork.js.map +1 -0
  59. package/dist/box-agent.d.ts +78 -0
  60. package/dist/box-agent.d.ts.map +1 -0
  61. package/dist/box-agent.js +137 -0
  62. package/dist/box-agent.js.map +1 -0
  63. package/dist/box-env.d.ts +26 -0
  64. package/dist/box-env.d.ts.map +1 -0
  65. package/dist/box-env.js +52 -0
  66. package/dist/box-env.js.map +1 -0
  67. package/dist/call.d.ts +23 -0
  68. package/dist/call.d.ts.map +1 -0
  69. package/dist/call.js +45 -0
  70. package/dist/call.js.map +1 -0
  71. package/dist/cloud.d.ts +4917 -0
  72. package/dist/cloud.d.ts.map +1 -0
  73. package/dist/cloud.js +16 -0
  74. package/dist/cloud.js.map +1 -0
  75. package/dist/e2b/index.d.ts +30 -0
  76. package/dist/e2b/index.d.ts.map +1 -0
  77. package/dist/e2b/index.js +273 -0
  78. package/dist/e2b/index.js.map +1 -0
  79. package/dist/egress-approval.d.ts +73 -0
  80. package/dist/egress-approval.d.ts.map +1 -0
  81. package/dist/egress-approval.js +74 -0
  82. package/dist/egress-approval.js.map +1 -0
  83. package/dist/engine.d.ts +188 -0
  84. package/dist/engine.d.ts.map +1 -0
  85. package/dist/engine.js +1507 -0
  86. package/dist/engine.js.map +1 -0
  87. package/dist/fn.d.ts +22 -0
  88. package/dist/fn.d.ts.map +1 -0
  89. package/dist/fn.js +108 -0
  90. package/dist/fn.js.map +1 -0
  91. package/dist/history.d.ts +21 -0
  92. package/dist/history.d.ts.map +1 -0
  93. package/dist/history.js +158 -0
  94. package/dist/history.js.map +1 -0
  95. package/dist/inclient.d.ts +48 -0
  96. package/dist/inclient.d.ts.map +1 -0
  97. package/dist/inclient.js +68 -0
  98. package/dist/inclient.js.map +1 -0
  99. package/dist/index.d.ts +24 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +25 -0
  102. package/dist/index.js.map +1 -0
  103. package/dist/interchange.d.ts +17 -0
  104. package/dist/interchange.d.ts.map +1 -0
  105. package/dist/interchange.js +133 -0
  106. package/dist/interchange.js.map +1 -0
  107. package/dist/machine-lifecycle.d.ts +102 -0
  108. package/dist/machine-lifecycle.d.ts.map +1 -0
  109. package/dist/machine-lifecycle.js +360 -0
  110. package/dist/machine-lifecycle.js.map +1 -0
  111. package/dist/manifest.d.ts +42 -0
  112. package/dist/manifest.d.ts.map +1 -0
  113. package/dist/manifest.js +53 -0
  114. package/dist/manifest.js.map +1 -0
  115. package/dist/open.d.ts +45 -0
  116. package/dist/open.d.ts.map +1 -0
  117. package/dist/open.js +245 -0
  118. package/dist/open.js.map +1 -0
  119. package/dist/parked-action.d.ts +51 -0
  120. package/dist/parked-action.d.ts.map +1 -0
  121. package/dist/parked-action.js +29 -0
  122. package/dist/parked-action.js.map +1 -0
  123. package/dist/persistence.d.ts +41 -0
  124. package/dist/persistence.d.ts.map +1 -0
  125. package/dist/persistence.js +86 -0
  126. package/dist/persistence.js.map +1 -0
  127. package/dist/pins.d.ts +231 -0
  128. package/dist/pins.d.ts.map +1 -0
  129. package/dist/pins.js +213 -0
  130. package/dist/pins.js.map +1 -0
  131. package/dist/pipeline.d.ts +142 -0
  132. package/dist/pipeline.d.ts.map +1 -0
  133. package/dist/pipeline.js +1014 -0
  134. package/dist/pipeline.js.map +1 -0
  135. package/dist/prewired-schema.d.ts +16 -0
  136. package/dist/prewired-schema.d.ts.map +1 -0
  137. package/dist/prewired-schema.js +48 -0
  138. package/dist/prewired-schema.js.map +1 -0
  139. package/dist/redaction.d.ts +13 -0
  140. package/dist/redaction.d.ts.map +1 -0
  141. package/dist/redaction.js +67 -0
  142. package/dist/redaction.js.map +1 -0
  143. package/dist/runtime.d.ts +463 -0
  144. package/dist/runtime.d.ts.map +1 -0
  145. package/dist/runtime.js +1715 -0
  146. package/dist/runtime.js.map +1 -0
  147. package/dist/sandbox.d.ts +90 -0
  148. package/dist/sandbox.d.ts.map +1 -0
  149. package/dist/sandbox.js +2 -0
  150. package/dist/sandbox.js.map +1 -0
  151. package/dist/schedules.d.ts +89 -0
  152. package/dist/schedules.d.ts.map +1 -0
  153. package/dist/schedules.js +334 -0
  154. package/dist/schedules.js.map +1 -0
  155. package/dist/secret-exposure.d.ts +55 -0
  156. package/dist/secret-exposure.d.ts.map +1 -0
  157. package/dist/secret-exposure.js +53 -0
  158. package/dist/secret-exposure.js.map +1 -0
  159. package/dist/ship-diff.d.ts +47 -0
  160. package/dist/ship-diff.d.ts.map +1 -0
  161. package/dist/ship-diff.js +39 -0
  162. package/dist/ship-diff.js.map +1 -0
  163. package/dist/testing/fake-box.d.ts +67 -0
  164. package/dist/testing/fake-box.d.ts.map +1 -0
  165. package/dist/testing/fake-box.js +166 -0
  166. package/dist/testing/fake-box.js.map +1 -0
  167. package/dist/testing/fake-sandbox-v2.d.ts +59 -0
  168. package/dist/testing/fake-sandbox-v2.d.ts.map +1 -0
  169. package/dist/testing/fake-sandbox-v2.js +121 -0
  170. package/dist/testing/fake-sandbox-v2.js.map +1 -0
  171. package/dist/testing/fake-sandbox.d.ts +94 -0
  172. package/dist/testing/fake-sandbox.d.ts.map +1 -0
  173. package/dist/testing/fake-sandbox.js +239 -0
  174. package/dist/testing/fake-sandbox.js.map +1 -0
  175. package/dist/testing/guard-fixture.d.ts +19 -0
  176. package/dist/testing/guard-fixture.d.ts.map +1 -0
  177. package/dist/testing/guard-fixture.js +134 -0
  178. package/dist/testing/guard-fixture.js.map +1 -0
  179. package/dist/testing/index.d.ts +8 -0
  180. package/dist/testing/index.d.ts.map +1 -0
  181. package/dist/testing/index.js +8 -0
  182. package/dist/testing/index.js.map +1 -0
  183. package/dist/testing/memory-store.d.ts +5 -0
  184. package/dist/testing/memory-store.d.ts.map +1 -0
  185. package/dist/testing/memory-store.js +4 -0
  186. package/dist/testing/memory-store.js.map +1 -0
  187. package/dist/testing/scripted-model.d.ts +32 -0
  188. package/dist/testing/scripted-model.d.ts.map +1 -0
  189. package/dist/testing/scripted-model.js +112 -0
  190. package/dist/testing/scripted-model.js.map +1 -0
  191. package/dist/testing/seed-app-row.d.ts +4 -0
  192. package/dist/testing/seed-app-row.d.ts.map +1 -0
  193. package/dist/testing/seed-app-row.js +7 -0
  194. package/dist/testing/seed-app-row.js.map +1 -0
  195. package/dist/unified-diff.d.ts +13 -0
  196. package/dist/unified-diff.d.ts.map +1 -0
  197. package/dist/unified-diff.js +127 -0
  198. package/dist/unified-diff.js.map +1 -0
  199. package/dist/version-hash.d.ts +9 -0
  200. package/dist/version-hash.d.ts.map +1 -0
  201. package/dist/version-hash.js +12 -0
  202. package/dist/version-hash.js.map +1 -0
  203. package/package.json +84 -0
@@ -0,0 +1,24 @@
1
+ /** @vendoai/apps — the app artifact and engine (docs/contracts/06-apps.md).
2
+ *
3
+ * The sandbox seam is the execution-v2 shape (sandbox.ts); the v1 seam and
4
+ * its compat bridge are deleted (execution-v2 Wave 1.5).
5
+ * The package root otherwise exports exactly the 06 §1 public API plus the
6
+ * block-plan's flagged additions (AppsConfig.pinBaselines), the ENG-288 M4
7
+ * in-client trust-axis surface (06 §9): AppsRuntime.inClient and
8
+ * appVersionHash, and the ENG-288 M5 drift→rebase surface (06 §8):
9
+ * AppsRuntime.pins and detectPinDrift.
10
+ * Everything else — the generation engine, interchange plumbing — is internal
11
+ * and reachable only through AppsRuntime.
12
+ */
13
+ export { createApps, type AppsConfig, type AppsRuntime, type BoxRequest, type BoxResponse, type EditFailure, type EditResult, type MachineEditResult, type OpenSurface, type PinForkInput, type PinForkResult, type PinRebaseResult, type SecretExposureState, type SetExposureResult, type VersionEntry, } from "./runtime.js";
14
+ export type { SandboxAdapter, SandboxMachine, SandboxResumePolicy } from "./sandbox.js";
15
+ export { parseVendoManifest, vendoManifestSchema, type VendoManifest, type VendoManifestSchedule, } from "./manifest.js";
16
+ export { createAppTokens, type AppTokens, } from "./app-token.js";
17
+ export { buildEnv, type BuildEnvContext, type BuiltBoxEnv, type InferenceResolver, } from "./box-env.js";
18
+ export { SCHEDULE_STATE_COLLECTION } from "./schedules.js";
19
+ export { shareSnapshotSchema, publishRecordSchema, type CloudAppsClient, type PublishRecord, type ShareSnapshot, } from "./cloud.js";
20
+ export { detectPinDrift, inClientApprovalSchema, pinBaselineSchema, pinComponentName, type InClientApproval, type PinBaseline, type PinDrift, } from "./pins.js";
21
+ export { appVersionHash } from "./version-hash.js";
22
+ export { type InClientVenueState, type InClientVerdict, } from "./inclient.js";
23
+ export { type ShipDiff, type ShipDiffGenerated, type ShipDiffPin, } from "./ship-diff.js";
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,UAAU,EACV,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxF,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,KAAK,SAAS,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,QAAQ,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ /** @vendoai/apps — the app artifact and engine (docs/contracts/06-apps.md).
2
+ *
3
+ * The sandbox seam is the execution-v2 shape (sandbox.ts); the v1 seam and
4
+ * its compat bridge are deleted (execution-v2 Wave 1.5).
5
+ * The package root otherwise exports exactly the 06 §1 public API plus the
6
+ * block-plan's flagged additions (AppsConfig.pinBaselines), the ENG-288 M4
7
+ * in-client trust-axis surface (06 §9): AppsRuntime.inClient and
8
+ * appVersionHash, and the ENG-288 M5 drift→rebase surface (06 §8):
9
+ * AppsRuntime.pins and detectPinDrift.
10
+ * Everything else — the generation engine, interchange plumbing — is internal
11
+ * and reachable only through AppsRuntime.
12
+ */
13
+ export { createApps, } from "./runtime.js";
14
+ // execution-v2 skin contract (Lane C): the manifest gate, the per-app box
15
+ // token, and the box env assembly Lane B consumes at provision.
16
+ export { parseVendoManifest, vendoManifestSchema, } from "./manifest.js";
17
+ export { createAppTokens, } from "./app-token.js";
18
+ export { buildEnv, } from "./box-env.js";
19
+ // execution-v2 Lane D — the BYO schedule engine's state collection (the wire
20
+ // tests pin its name).
21
+ export { SCHEDULE_STATE_COLLECTION } from "./schedules.js";
22
+ export { shareSnapshotSchema, publishRecordSchema, } from "./cloud.js";
23
+ export { detectPinDrift, inClientApprovalSchema, pinBaselineSchema, pinComponentName, } from "./pins.js";
24
+ export { appVersionHash } from "./version-hash.js";
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,UAAU,GAeX,MAAM,cAAc,CAAC;AAEtB,0EAA0E;AAC1E,gEAAgE;AAChE,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAGpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,GAEhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,GAIT,MAAM,cAAc,CAAC;AACtB,6EAA6E;AAC7E,uBAAuB;AACvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAIpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,GAIjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type AppDocument, type AppId, type Guard, type RunContext, type StoreAdapter } from "@vendoai/core";
2
+ import { type PinBaseline } from "./pins.js";
3
+ /** Dependencies for the 06-apps §7 interchange boundary. */
4
+ export interface AppInterchangeDependencies {
5
+ store: StoreAdapter;
6
+ guard: Guard;
7
+ pinBaselines?: readonly PinBaseline[];
8
+ requireOwned(appId: AppId, subject: string): Promise<AppDocument>;
9
+ }
10
+ /** Public interchange methods wired into AppsRuntime. */
11
+ export interface AppInterchange {
12
+ exportApp(appId: AppId, ctx: RunContext): Promise<Uint8Array>;
13
+ importApp(source: Uint8Array | AppDocument, ctx: RunContext): Promise<AppDocument>;
14
+ }
15
+ /** 06-apps §7 — build the copy-only .vendoapp import/export boundary. */
16
+ export declare const createAppInterchange: (dependencies: AppInterchangeDependencies) => AppInterchange;
17
+ //# sourceMappingURL=interchange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interchange.d.ts","sourceRoot":"","sources":["../src/interchange.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,KAAK,EAEV,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AA+GnE,4DAA4D;AAC5D,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IACtC,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACnE;AAED,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9D,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,WAAW,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACpF;AAED,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,GAC/B,cAAc,0BAA0B,KACvC,cA0CF,CAAC"}
@@ -0,0 +1,133 @@
1
+ import { VendoError, validateAppDocument, } from "@vendoai/core";
2
+ import { unzipSync, zipSync } from "fflate";
3
+ import { appLifecycleEvent } from "./audit.js";
4
+ import { appRecordInput } from "./persistence.js";
5
+ import { assertPinsExportable } from "./pins.js";
6
+ const encoder = new TextEncoder();
7
+ const decoder = new TextDecoder();
8
+ const ARCHIVE_MAX_ENTRIES = 4_096;
9
+ const ARCHIVE_MAX_TOTAL_BYTES = 64 * 1024 * 1024;
10
+ const ARCHIVE_MAX_ENTRY_BYTES = 16 * 1024 * 1024;
11
+ const APP_DOCUMENT_FIELDS = [
12
+ "format",
13
+ "id",
14
+ "name",
15
+ "description",
16
+ "ui",
17
+ "tree",
18
+ "components",
19
+ "storage",
20
+ "server",
21
+ "machine",
22
+ "trigger",
23
+ "egress",
24
+ "secrets",
25
+ "pins",
26
+ "forkedFrom",
27
+ ];
28
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
29
+ const validationError = (message, detail) => new VendoError("validation", message, detail);
30
+ const validateImportedDocument = (input) => {
31
+ const result = validateAppDocument(input);
32
+ if (!result.ok) {
33
+ throw validationError(`invalid imported app document: ${result.error.message}`, {
34
+ reason: result.error.message,
35
+ validationCode: result.error.code,
36
+ });
37
+ }
38
+ return structuredClone(result.app);
39
+ };
40
+ const allowedDocumentFields = (input, omitted) => {
41
+ if (!isRecord(input))
42
+ return {};
43
+ const copy = {};
44
+ for (const field of APP_DOCUMENT_FIELDS) {
45
+ if (!omitted.has(field) && Object.prototype.hasOwnProperty.call(input, field)) {
46
+ copy[field] = structuredClone(input[field]);
47
+ }
48
+ }
49
+ return copy;
50
+ };
51
+ // execution-v2 — interchange is document-only, a copy boundary: a machine (or
52
+ // retired v1 server) ref never crosses it. Export never writes one, import
53
+ // strips one a document tries to smuggle in, and the box's disk is scratch by
54
+ // the data rule — an imported app re-graduates on its own.
55
+ const withoutExportIdentity = (app) => allowedDocumentFields(app, new Set(["id", "server", "machine", "forkedFrom"]));
56
+ const withFreshIdentity = (input, id) => {
57
+ const copy = allowedDocumentFields(input, new Set(["id", "server", "machine", "forkedFrom"]));
58
+ copy.id = id;
59
+ return copy;
60
+ };
61
+ const parseArchive = (source) => {
62
+ try {
63
+ let entryCount = 0;
64
+ let declaredBytes = 0;
65
+ const archive = unzipSync(source, {
66
+ filter(entry) {
67
+ entryCount += 1;
68
+ declaredBytes += entry.originalSize;
69
+ if (entryCount > ARCHIVE_MAX_ENTRIES
70
+ || entry.originalSize > ARCHIVE_MAX_ENTRY_BYTES
71
+ || declaredBytes > ARCHIVE_MAX_TOTAL_BYTES) {
72
+ throw validationError("app archive exceeds size limits");
73
+ }
74
+ return true;
75
+ },
76
+ });
77
+ let inflatedBytes = 0;
78
+ for (const bytes of Object.values(archive)) {
79
+ inflatedBytes += bytes.byteLength;
80
+ if (bytes.byteLength > ARCHIVE_MAX_ENTRY_BYTES || inflatedBytes > ARCHIVE_MAX_TOTAL_BYTES) {
81
+ throw validationError("app archive exceeds size limits");
82
+ }
83
+ }
84
+ const appJson = archive["app.json"];
85
+ if (appJson === undefined)
86
+ throw validationError("invalid .vendoapp: app.json is missing");
87
+ return {
88
+ document: JSON.parse(decoder.decode(appJson)),
89
+ hasAppDirectory: Object.keys(archive).some((entry) => entry.startsWith("app/")),
90
+ };
91
+ }
92
+ catch (error) {
93
+ if (error instanceof VendoError)
94
+ throw error;
95
+ throw validationError("invalid .vendoapp archive", {
96
+ reason: error instanceof Error ? error.message : "archive parse failed",
97
+ });
98
+ }
99
+ };
100
+ /** 06-apps §7 — build the copy-only .vendoapp import/export boundary. */
101
+ export const createAppInterchange = (dependencies) => {
102
+ const report = async (operation, appId, ctx, extra = {}) => {
103
+ await dependencies.guard.report(appLifecycleEvent(ctx.principal, ctx, appId, { operation, ...extra }));
104
+ };
105
+ return {
106
+ async exportApp(appId, ctx) {
107
+ const app = await dependencies.requireOwned(appId, ctx.principal.subject);
108
+ assertPinsExportable(app.pins ?? [], dependencies.pinBaselines ?? []);
109
+ const archive = {
110
+ "app.json": encoder.encode(JSON.stringify(withoutExportIdentity(app))),
111
+ };
112
+ const bytes = zipSync(archive, { level: 6 });
113
+ await report("export", app.id, ctx);
114
+ return bytes;
115
+ },
116
+ async importApp(source, ctx) {
117
+ // Mint before document validation; an artifact id is never trusted (01-core §10).
118
+ const appId = `app_${globalThis.crypto.randomUUID()}`;
119
+ const parsed = source instanceof Uint8Array
120
+ ? parseArchive(source)
121
+ : { document: source, hasAppDirectory: false };
122
+ const imported = validateImportedDocument(withFreshIdentity(parsed.document, appId));
123
+ await dependencies.store.records("vendo_apps").put(appRecordInput(imported, ctx.principal.subject));
124
+ // An app/ directory in the archive is machine scratch from an older
125
+ // export; it is ignored — the imported copy re-graduates on its own.
126
+ await report("import", imported.id, ctx, {
127
+ appDirectory: parsed.hasAppDirectory ? "ignored" : "absent",
128
+ });
129
+ return structuredClone(imported);
130
+ },
131
+ };
132
+ };
133
+ //# sourceMappingURL=interchange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interchange.js","sourceRoot":"","sources":["../src/interchange.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,mBAAmB,GAOpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,WAAW,CAAC;AAEnE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI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AY,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAChD,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAChD,CAAC;YACF,oEAAoE;YACpE,qEAAqE;YACrE,MAAM,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;gBACvC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;aAC5D,CAAC,CAAC;YACH,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { type AppDocument, type AppId, type StoreAdapter } from "@vendoai/core";
2
+ import type { SandboxAdapter, SandboxMachine } from "./sandbox.js";
3
+ /** Injectable timer seam so idle auto-sleep is testable without real time. */
4
+ export interface LifecycleClock {
5
+ setTimeout(fn: () => void, ms: number): unknown;
6
+ clearTimeout(handle: unknown): void;
7
+ }
8
+ /**
9
+ * Lane C's env-assembly seam (PORT, secrets, store URL, callback URL,
10
+ * inference endpoint). Injected here so the lanes do not collide; the default
11
+ * assembles nothing.
12
+ *
13
+ * Lane E adds `grants`: the runtime resolves the app's active secret grants
14
+ * and hands them to the host's assembler, so ONLY declared ∩ granted secrets
15
+ * inject real values (the assembler never reads grant state itself). The
16
+ * lifecycle calls the seam with the document only; the runtime composes the
17
+ * grant-carrying closure.
18
+ */
19
+ export type BuildMachineEnv = (app: AppDocument, grants?: MachineEnvGrants) => Promise<Record<string, string>> | Record<string, string>;
20
+ /** Lane E — grant state resolved by the runtime for the env assembler. */
21
+ export interface MachineEnvGrants {
22
+ /** Names of declared secrets the owner granted to THIS app. */
23
+ grantedSecrets: ReadonlySet<string>;
24
+ }
25
+ /**
26
+ * Lane E's egress-policy seam: resolves the CURRENT allowlist a machine must
27
+ * boot or wake with (approved declaration + implicit skin domains — see
28
+ * boxAllowlist in egress-approval.ts, where the list is assembled). Consulted
29
+ * on every provision AND every wake, so a grant decided while the machine
30
+ * slept applies at the next resume; it throws to refuse the operation (an
31
+ * unapproved declared domain must never reach the provider). `undefined`
32
+ * result means unrestricted egress (no policy for this app). No callback →
33
+ * pre-Lane-E behavior: create unrestricted, resume with the snapshot ref's
34
+ * stored policy.
35
+ */
36
+ export type BuildMachineAllowlist = (app: AppDocument) => Promise<string[] | undefined> | string[] | undefined;
37
+ export interface MachineLifecycleConfig {
38
+ store: StoreAdapter;
39
+ sandbox?: SandboxAdapter;
40
+ buildEnv?: BuildMachineEnv;
41
+ allowedDomains?: BuildMachineAllowlist;
42
+ /**
43
+ * Wave 7 — push a freshly assembled boundary env into a LIVE machine (the
44
+ * runtime wires the box control port's env door, which restarts the app).
45
+ * A wake of a machine whose document carries `machine.envStaleAt` (a secret
46
+ * grant changed while it slept — resumes restore the SNAPSHOT's env on
47
+ * every provider) rebuilds the env through this seam and clears the marker.
48
+ * Fail-closed: an injection failure destroys the resumed machine and fails
49
+ * the wake (a box we cannot re-police must not serve — a revoked secret
50
+ * would stay usable inside it); the marker and ref survive for the retry.
51
+ */
52
+ injectEnv?: (machine: SandboxMachine, env: Record<string, string>) => Promise<void>;
53
+ /** Provider base template every provisioned machine boots from. */
54
+ template?: string;
55
+ idleMs?: number;
56
+ clock?: LifecycleClock;
57
+ }
58
+ /**
59
+ * Execution-v2 machine lifecycle: provision on graduation, wake on demand,
60
+ * sleep on idle, destroy with the app. Wake single-flight and the idle timer
61
+ * are in-process state — multi-instance hosts can wake one app twice (known
62
+ * v2 limit; last sleep's CAS wins).
63
+ */
64
+ export interface MachineLifecycle {
65
+ available(): boolean;
66
+ /** The live machine for an app, when one is awake in this process. */
67
+ peek(appId: AppId): SandboxMachine | undefined;
68
+ /** Create the machine from the base template, snapshot it, store the ref. Idempotent. */
69
+ provision(app: AppDocument): Promise<AppDocument>;
70
+ /** Resume the stored snapshot; concurrent wakes of one app share one machine. */
71
+ wake(app: AppDocument): Promise<SandboxMachine>;
72
+ /** Snapshot the live machine, store the new ref, stop it. No-op when not awake. */
73
+ sleep(app: AppDocument): Promise<AppDocument>;
74
+ /**
75
+ * execution-v2 Wave 3 — drop the live machine WITHOUT snapshotting it,
76
+ * leaving the document's `machine.snapshotRef` untouched: the app rolls back
77
+ * to its pre-edit snapshot (the next wake re-provisions from the prior ref).
78
+ * This is the failed-edit rollback — no new fork machinery, just "don't keep
79
+ * what the box just did". No-op when the app is not awake.
80
+ */
81
+ discard(app: AppDocument): Promise<void>;
82
+ /** Destroy the sandbox and clear the document's machine field. */
83
+ destroyMachine(app: AppDocument): Promise<AppDocument>;
84
+ /**
85
+ * execution-v2 Wave 3 — reap ALL provider resources for an app (live machine
86
+ * + stored snapshot) WITHOUT rewriting the document. The delete path uses
87
+ * this: the row is about to be removed, so re-validating a machine-cleared
88
+ * document (which a graduated tree's `fn:` refs would fail) must never block
89
+ * the provider cleanup. Best-effort and idempotent.
90
+ */
91
+ destroyResources(app: AppDocument): Promise<void>;
92
+ /**
93
+ * execution-v2 Wave 3 — the CURRENT boundary env for an app (PORT, granted
94
+ * secrets, skin URLs, inference), assembled by the injected buildEnv seam.
95
+ * The Wave-3 edit flow pushes this to the box's control port before an edit
96
+ * so a grant flipped while the machine slept lands via the in-box restart
97
+ * loop (Lane E's env-baked-at-provision gap).
98
+ */
99
+ buildAppEnv(app: AppDocument): Promise<Record<string, string>>;
100
+ }
101
+ export declare const createMachineLifecycle: (config: MachineLifecycleConfig) => MachineLifecycle;
102
+ //# sourceMappingURL=machine-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine-lifecycle.d.ts","sourceRoot":"","sources":["../src/machine-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAA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