@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,463 @@
1
+ import { type AppDocument, type AppId, type DomainManifest, type Guard, type IsoDateTime, type Json, type NormalizedCatalog, type RunContext, type ApprovalId, type ApprovalRequest, type RiskLabel, type SecretsProvider, type StoreAdapter, type ToolCall, type ToolOutcome, type ToolSemantics, type ToolRegistry, type Trigger, type UIPayload, type VendoViewPart, type VendoTheme } from "@vendoai/core";
2
+ import type { LanguageModel } from "ai";
3
+ import type { CloudAppsClient, PublishRecord, ShareSnapshot } from "./cloud.js";
4
+ import { type GenerationDependencies } from "./engine.js";
5
+ import { type InClientVerdict } from "./inclient.js";
6
+ import { type BuildMachineEnv, type LifecycleClock } from "./machine-lifecycle.js";
7
+ import { type InClientApproval, type PinBaseline, type PinDrift } from "./pins.js";
8
+ import { type AppScheduleState, type AppScheduleStatus, type ScheduleTickReport } from "./schedules.js";
9
+ import { type ShipDiff } from "./ship-diff.js";
10
+ import type { SandboxAdapter, SandboxMachine } from "./sandbox.js";
11
+ /** 06-apps §1 plus block-plan decisions 3–4. */
12
+ export interface AppsConfig {
13
+ store: StoreAdapter;
14
+ guard: Guard;
15
+ tools: ToolRegistry;
16
+ /**
17
+ * execution-v2 — machine lifecycle seams. `sandbox` is the v2 adapter
18
+ * (Lane A's shrunk seam); `buildEnv` is Lane C's env assembly, injected so
19
+ * the lanes do not collide. No adapter → layer-2 lifecycle operations fail
20
+ * with the existing sandbox-unavailable VendoError; layer-1 apps are
21
+ * unaffected.
22
+ */
23
+ machine?: {
24
+ sandbox?: SandboxAdapter;
25
+ buildEnv?: BuildMachineEnv;
26
+ /**
27
+ * Lane E — the implicit skin domains merged into every machine's egress
28
+ * allowlist (the box must always reach its own boundary: store surface,
29
+ * host-callback surface, inference endpoint). The host assembles them
30
+ * from the same origins it injects as VENDO_STORE_URL / VENDO_HOST_URL /
31
+ * VENDO_INFERENCE_URL. They are never subject to declaration or approval.
32
+ */
33
+ implicitDomains?: string[];
34
+ template?: string;
35
+ idleMs?: number;
36
+ clock?: LifecycleClock;
37
+ /**
38
+ * execution-v2 Wave 3 — the in-box agent edit is a minutes-long loop the
39
+ * host long-polls. These tune that poll; defaults suit a live box (8-min
40
+ * budget). Tests shrink them to run without real time.
41
+ */
42
+ boxEditPollMs?: number;
43
+ boxEditTimeoutMs?: number;
44
+ };
45
+ /**
46
+ * execution-v2 Wave 4 — the layer-3 (machine serves the app surface)
47
+ * experimental opt-in. OFF by default: layer-3 generation, the 2→3 surface
48
+ * flip, and open() on a served app all refuse with a typed VendoError naming
49
+ * this flag. The host enables it per project
50
+ * (`createVendo({ apps: { experimentalServedApps: true } })`).
51
+ * Layer 3 is a machine surface, so this flag REQUIRES
52
+ * {@link AppsConfig.experimentalMachines}; createApps refuses the
53
+ * combination `experimentalServedApps` without `experimentalMachines`.
54
+ */
55
+ experimentalServedApps?: boolean;
56
+ /**
57
+ * execution-v2 Wave 9 — the layer-2 (machine-backed execution) experimental
58
+ * opt-in, gating ALL of the box machinery for NEW graduation: machine
59
+ * provisioning, box-agent delegation, and fn: generation targeting a new
60
+ * machine. OFF by default: when the escalation ladder concludes only a box
61
+ * can express a request (rung c), the create/edit refuses with a typed
62
+ * VendoError naming this flag — NEVER a silent degrade to a broken
63
+ * automation. Rungs (a) steps and (b) agentic automations need no machine
64
+ * and work regardless of this flag. Apps that ALREADY carry a machine are
65
+ * never stranded: every runtime path over an existing machine (wake, sleep,
66
+ * fn: calls, schedules, box edits, open) keeps working with the flag off —
67
+ * only NEW graduation/provisioning is gated.
68
+ */
69
+ experimentalMachines?: boolean;
70
+ /**
71
+ * execution-v2 Wave 9 — the arming seam for ladder-authored automations
72
+ * (the same seam pattern as AutomationsConfig.runner: this block never
73
+ * imports the automations engine). When set, a freshly authored trigger is
74
+ * armed through it — the umbrella wires `automations.enable`, which runs
75
+ * the 07 §3 grant-capture flow and surfaces the missing standing-grant
76
+ * approvals (they ride EditResult.automation.pendingGrants). Unset, the
77
+ * runtime arms the stored row directly and grant capture stays lazy: the
78
+ * first away run's ungranted step parks the normal approval card.
79
+ */
80
+ armAutomation?: (appId: AppId, ctx: RunContext) => Promise<{
81
+ enabled: boolean;
82
+ missing: ApprovalRequest[];
83
+ }>;
84
+ model?: LanguageModel;
85
+ /** v2 spec §4 — tier-0 paint lane knob, passed to the generation engine.
86
+ * `model` is the no-think switch (a thinking-disabled model instance);
87
+ * `disabled` forces single-lane generation. */
88
+ paint?: GenerationDependencies["paint"];
89
+ /** W4 pipeline knobs, passed to the generation engine: structured repair
90
+ * (default on), outline+region-parallel tier-2 and the end pass (opt-in). */
91
+ pipeline?: GenerationDependencies["pipeline"];
92
+ /** The composition-normalized catalog (01 §14): derived schemas included. */
93
+ catalog: NormalizedCatalog;
94
+ theme?: VendoTheme;
95
+ secrets?: SecretsProvider;
96
+ /** Host design rules for generation prompts; the function form is re-read
97
+ * per create/edit (engine.ts GenerationDependencies). */
98
+ designRules?: string | (() => string | undefined);
99
+ pinBaselines?: PinBaseline[];
100
+ /** ADAPTER RULE — the share/publish seam (see cloud.ts): the umbrella wires
101
+ * the Cloud console client when VENDO_API_KEY fills the unset slot; this
102
+ * block never reads the environment. Unset → share/publish fail with
103
+ * VendoError("cloud-required"). */
104
+ cloud?: CloudAppsClient;
105
+ /** W3 — per-tool field semantics from `.vendo/semantics.json`, passed to
106
+ * the generation engine (annotated shape cards, law checks, Kit format
107
+ * defaults). */
108
+ semantics?: Readonly<Record<string, ToolSemantics>>;
109
+ /** W3 — the host's domain manifest (has / has-NOT), generation fact. */
110
+ domains?: DomainManifest;
111
+ }
112
+ /** 06-apps §1 */
113
+ export interface EditResult {
114
+ app: AppDocument;
115
+ version: VersionEntry;
116
+ issues?: string[];
117
+ /** Additive failure detail: when present, no edit was persisted. */
118
+ failure?: EditFailure;
119
+ /** Additive 06 §8 drift report: pins whose host baseline changed under the
120
+ * fork. Present on every edit result over a drifted app so drift is loud at
121
+ * edit time, not only in sync output or the ship-diff. */
122
+ driftedPins?: PinDrift[];
123
+ /**
124
+ * execution-v2 Wave 3 — set when this edit graduated the app 1→2 (or edited
125
+ * an already-graduated app's server): the machine was provisioned, the box
126
+ * agent wrote/updated the server code, and the tree gained its fn: bindings.
127
+ */
128
+ graduated?: boolean;
129
+ /** The in-box agent's structured report for a graduating/server edit (DATA:
130
+ * it carries no host authority — approvals still gate every mutation). */
131
+ box?: {
132
+ ok: boolean;
133
+ summary: string;
134
+ fns?: string[];
135
+ filesChanged?: string[];
136
+ };
137
+ /**
138
+ * execution-v2 Wave 3 — a graduating edit whose server code declares egress
139
+ * the owner has not approved surfaces the parked approval HERE (not a silent
140
+ * failure). The code is written and snapshotted; the fn does real egress only
141
+ * once the owner approves this card.
142
+ */
143
+ pendingEgress?: {
144
+ approvalId?: ApprovalId;
145
+ domains: string[];
146
+ };
147
+ /**
148
+ * execution-v2 Wave 9 — set when this edit rode the escalation ladder to an
149
+ * automation instead of a box: the authored trigger was written onto the
150
+ * document and ARMED on the existing automations engine (the enabled row the
151
+ * tick/emit machinery fires). Grant capture stays lazy — an away run's first
152
+ * ungranted mutating step parks the normal approval card. No machine is
153
+ * involved. `resultsCollection` names the app records collection the
154
+ * automation writes displayable results into (the rows the tree queries).
155
+ * `pendingGrants` carries the standing-grant approvals the arming seam's
156
+ * capture flow parked — approving them lets away runs complete unattended.
157
+ */
158
+ automation?: {
159
+ mode: "steps" | "agentic";
160
+ trigger: Trigger;
161
+ resultsCollection?: string;
162
+ pendingGrants?: ApprovalRequest[];
163
+ };
164
+ }
165
+ export interface EditFailure {
166
+ code: "edit-rejected";
167
+ retryable: boolean;
168
+ message: string;
169
+ }
170
+ /** execution-v2 Wave 3 — the outcome of a machine.editApp() box edit. */
171
+ export interface MachineEditResult {
172
+ ok: boolean;
173
+ /** The in-box agent's summary (data-only; carries no host authority). */
174
+ summary: string;
175
+ fns?: string[];
176
+ filesChanged?: string[];
177
+ /** The synced document after a successful edit (schedules + egress declaration). */
178
+ app?: AppDocument;
179
+ /** A parked egress-approval card for the domains the server code declared. */
180
+ pendingEgress?: {
181
+ approvalId?: ApprovalId;
182
+ domains: string[];
183
+ };
184
+ }
185
+ /** 06-apps §1 */
186
+ export interface VersionEntry {
187
+ at: IsoDateTime;
188
+ intent: string;
189
+ rung: 1 | 2 | 3 | 4;
190
+ }
191
+ /** 06-apps §1 */
192
+ export type OpenSurface = {
193
+ kind: "tree";
194
+ payload: UIPayload;
195
+ components?: Record<string, string>;
196
+ } | {
197
+ kind: "http";
198
+ url: string;
199
+ } | {
200
+ kind: "resuming";
201
+ cover?: string;
202
+ };
203
+ /** execution-v2 Lane C — one HTTP request across the skin of the box (the
204
+ * shape SandboxMachine.request speaks, named at the runtime surface). */
205
+ export interface BoxRequest {
206
+ method: string;
207
+ path: string;
208
+ headers?: Record<string, string>;
209
+ body?: Uint8Array | string;
210
+ }
211
+ /** execution-v2 Lane C — the box's answer, relayed verbatim by the caller. */
212
+ export interface BoxResponse {
213
+ status: number;
214
+ headers: Record<string, string>;
215
+ body: Uint8Array;
216
+ }
217
+ /**
218
+ * ENG-345 — the in-sandbox status of one declared secret for one app.
219
+ * `handle` is the Option B default; `exposed` means an active owner-approved
220
+ * grant places its real value in the sandbox env; `pending` means a flip-on is
221
+ * parked awaiting the high-risk guard approval.
222
+ */
223
+ export interface SecretExposureState {
224
+ secretName: string;
225
+ status: "handle" | "pending" | "exposed";
226
+ approvalId?: ApprovalId;
227
+ }
228
+ /** ENG-345 — the outcome of a setExposure() call. */
229
+ export type SetExposureResult = {
230
+ status: "handles";
231
+ } | {
232
+ status: "exposed";
233
+ } | {
234
+ status: "pending-approval";
235
+ approvalId: ApprovalId;
236
+ };
237
+ /**
238
+ * 06-apps §8 — the outcome of one pin rebase. `failed` persists NOTHING: the
239
+ * pre-rebase version stays live, and the report says which recorded intents
240
+ * replayed cleanly, which one failed, and which were never attempted.
241
+ * Fail-closed by construction — a rebase is all-or-nothing, never a silent
242
+ * half-rebase.
243
+ */
244
+ export type PinRebaseResult = {
245
+ status: "rebased";
246
+ app: AppDocument;
247
+ version: VersionEntry;
248
+ slot: string;
249
+ /** The NEW baseline hash the pin now records as its `base`. */
250
+ baseHash: string;
251
+ /** The pin intents replayed onto the new baseline, in recorded order. */
252
+ replayed: string[];
253
+ } | {
254
+ status: "failed";
255
+ slot: string;
256
+ baseHash: string;
257
+ replayed: string[];
258
+ failed: {
259
+ intent: string;
260
+ issues: string[];
261
+ };
262
+ remaining: string[];
263
+ };
264
+ /**
265
+ * 06-apps §8 — gesture-owned forking (2026-07-21): the input of pins.fork().
266
+ * The fork itself is DETERMINISTIC (engine copies the captured baseline and
267
+ * records the pin — no model call); the model never decides to fork. With no
268
+ * `appId` the gesture mints a minimal app around the fork (the empty-slot
269
+ * Remix affordance). An `instruction` then rides the ORDINARY edit path,
270
+ * already scoped to the forked component.
271
+ */
272
+ export interface PinForkInput {
273
+ appId?: AppId;
274
+ slot: string;
275
+ instruction?: string;
276
+ }
277
+ /** 06-apps §8 — the outcome of one gesture fork. `version` describes the
278
+ * deterministic fork itself; `edit` (present only when the gesture carried an
279
+ * instruction) is the scoped follow-up edit — its failure never rolls the
280
+ * fork back, so `app` is always at least the faithful fork. */
281
+ export interface PinForkResult {
282
+ app: AppDocument;
283
+ version: VersionEntry;
284
+ slot: string;
285
+ /** The generated-component name the fork ships under (`pinComponentName`). */
286
+ componentName: string;
287
+ edit?: EditResult;
288
+ }
289
+ /** 06-apps §1 */
290
+ export interface AppsRuntime {
291
+ create(input: {
292
+ prompt: string;
293
+ /** Additive per-call stream hook used by the agent bridge. */
294
+ onView?: (part: VendoViewPart) => void;
295
+ }, ctx: RunContext): Promise<AppDocument>;
296
+ /** Speed lane — best-effort page-open warm-up of the generation model(s)
297
+ * (full + paint), so the first create reuses a live connection. Safe to
298
+ * call on surface mount; never throws. */
299
+ prewarm(): Promise<void>;
300
+ get(appId: AppId, ctx: RunContext): Promise<AppDocument | null>;
301
+ list(ctx: RunContext): Promise<AppDocument[]>;
302
+ delete(appId: AppId, ctx: RunContext): Promise<void>;
303
+ fork(appId: AppId, ctx: RunContext): Promise<AppDocument>;
304
+ edit(appId: AppId, instruction: string, ctx: RunContext): Promise<EditResult>;
305
+ history(appId: AppId): {
306
+ list(): Promise<VersionEntry[]>;
307
+ undo(): Promise<AppDocument>;
308
+ };
309
+ open(appId: AppId, ctx: RunContext): Promise<OpenSurface>;
310
+ call(appId: AppId, ref: string, args: Json, ctx: RunContext): Promise<ToolOutcome>;
311
+ exportApp(appId: AppId, ctx: RunContext): Promise<Uint8Array>;
312
+ importApp(source: Uint8Array | AppDocument, ctx: RunContext): Promise<AppDocument>;
313
+ share(appId: AppId, ctx: RunContext): Promise<ShareSnapshot>;
314
+ publish(appId: AppId, ctx: RunContext): Promise<PublishRecord>;
315
+ agentTools(): ToolRegistry;
316
+ /** Contextual policy projection for Vendo-owned agent tools. Undefined means
317
+ * the static descriptor remains authoritative. */
318
+ agentToolRisk(call: ToolCall, ctx: RunContext): Promise<RiskLabel | undefined>;
319
+ /**
320
+ * execution-v2 skin contract (Lane C) — the box door the wire's fn proxy
321
+ * route rides: wake the app's machine on demand and proxy ONE HTTP request
322
+ * to its $PORT (the box serves `POST /fn/<name>` per the contract; the
323
+ * caller shapes the path). Owner-scoped like every app surface. Additive
324
+ * like `proxy`/`inClient` — not part of the frozen §1 method table. Lane B's
325
+ * machine lifecycle owns the wake internals behind this door.
326
+ */
327
+ box: {
328
+ request(appId: AppId, request: BoxRequest, ctx: RunContext): Promise<BoxResponse>;
329
+ /**
330
+ * Lane E — scrub the app's known secret values out of a JSON-ish value
331
+ * (defensive redaction guard). The /box wire surface runs every callback
332
+ * outcome and row payload through this before it can land in a response,
333
+ * a store row, or a log line. Not an authority operation: it only ever
334
+ * REMOVES information.
335
+ */
336
+ redact(appId: AppId, value: Json): Promise<Json>;
337
+ };
338
+ /**
339
+ * 06-apps §9 — additive trust-axis surface (like `proxy`/`agentToolRisk`,
340
+ * not part of the frozen §1 method table). OSS carries the enforcement
341
+ * machinery: the ship-diff a reviewer reads, the stored approval records,
342
+ * and the hash-pin verdict `open()` rides to the client. Cloud's review
343
+ * console MINTS approvals in production; `approve` is the documented local
344
+ * injection seam (demos, dev, host-built review flows).
345
+ */
346
+ inClient: {
347
+ shipDiff(appId: AppId, ctx: RunContext): Promise<ShipDiff>;
348
+ approvals(appId: AppId, ctx: RunContext): Promise<InClientApproval[]>;
349
+ verdict(appId: AppId, ctx: RunContext): Promise<InClientVerdict>;
350
+ approve(input: {
351
+ appId: AppId;
352
+ approvedBy: string;
353
+ }, ctx: RunContext): Promise<InClientApproval>;
354
+ };
355
+ /**
356
+ * 06-apps §8 — additive drift→rebase surface (same additive precedent as
357
+ * `inClient`, not part of the frozen §1 method table). `drift` reports the
358
+ * pins whose captured host baseline changed under a fork; `rebase` re-forks
359
+ * ONE drifted pin from the NEW baseline and replays its recorded pin-intent
360
+ * trail (history.pinIntents) through the real model edit path, producing a
361
+ * new version whose pin `base` is the new baseline hash. A rebase is a
362
+ * content change, so it is NEVER invoked automatically: the agent tool
363
+ * `vendo_apps_rebase_pin` and the wire route are the invocation surfaces,
364
+ * and the new version drops in-client approval by construction (§9).
365
+ */
366
+ pins: {
367
+ drift(appId: AppId, ctx: RunContext): Promise<PinDrift[]>;
368
+ rebase(input: {
369
+ appId: AppId;
370
+ slot: string;
371
+ }, ctx: RunContext): Promise<PinRebaseResult>;
372
+ /**
373
+ * Gesture-owned forking (2026-07-21) — the deterministic fork the user's
374
+ * Remix gesture invokes: the engine copies the captured baseline into the
375
+ * pinned generated component and records the pin, with NO model call. The
376
+ * model lost the fork decision entirely (<ForkPin> is retired from the
377
+ * edit dialect; the op still compiles for stored apps). An optional
378
+ * instruction runs afterwards as an ordinary edit, already scoped to the
379
+ * forked component; its failure leaves the faithful fork in place.
380
+ */
381
+ fork(input: PinForkInput, ctx: RunContext): Promise<PinForkResult>;
382
+ };
383
+ /**
384
+ * execution-v2 — additive machine lifecycle surface (same additive precedent
385
+ * as `inClient`/`pins`/`secrets`). An app with no `machine` on its document
386
+ * is a layer-1 tree app; presence of `machine` means layer 2+ — the layer is
387
+ * always derived from presence, never stored. Wake single-flight and idle
388
+ * auto-sleep live in-process; a multi-instance host can wake one app twice
389
+ * (known v2 limit — the last sleep's CAS wins).
390
+ */
391
+ machine: {
392
+ /** Create the machine from the base template, snapshot it, store the ref. Idempotent. */
393
+ provision(appId: AppId, ctx: RunContext): Promise<AppDocument>;
394
+ /** Resume the stored snapshot; concurrent wakes coalesce to one machine. */
395
+ wake(appId: AppId, ctx: RunContext): Promise<SandboxMachine>;
396
+ /** Snapshot the live machine, store the new ref, stop it. No-op when not awake. */
397
+ sleep(appId: AppId, ctx: RunContext): Promise<AppDocument>;
398
+ /**
399
+ * execution-v2 Wave 3 — send one edit instruction to the IN-BOX agent of
400
+ * an already-graduated app: wake the box, re-inject the current env, run
401
+ * the agent, and on success sync schedules + the egress declaration and
402
+ * snapshot. On failure the box is discarded and the app rolls back to its
403
+ * pre-edit snapshot. This edits the SERVER only; graduation (runtime.edit)
404
+ * is what also lands the tree's fn: bindings.
405
+ */
406
+ editApp(appId: AppId, instruction: string, ctx: RunContext): Promise<MachineEditResult>;
407
+ /** Destroy the sandbox and clear the document's machine field (de-graduation). */
408
+ destroy(appId: AppId, ctx: RunContext): Promise<AppDocument>;
409
+ /**
410
+ * Wave 7 H2 — the embed surface's keepalive: one cheap HEAD through the
411
+ * idle-tracked machine wrapper, so user activity on an embedded served
412
+ * app counts as machine activity (re-arms the idle timer and rides any
413
+ * provider TTL extension). A sleeping machine wakes and reports "woke" —
414
+ * the embed's signal that its URL is stale and it should re-open once
415
+ * awake. Owner-scoped like every machine surface.
416
+ */
417
+ ping(appId: AppId, ctx: RunContext): Promise<{
418
+ state: "awake" | "woke";
419
+ }>;
420
+ };
421
+ /**
422
+ * execution-v2 Wave 2 Lane D — additive BYO schedule-execution surface (same
423
+ * additive precedent as `machine`/`box`). `tick` is what the host's
424
+ * authenticated scheduler endpoint calls on every external-cron hit: it
425
+ * fires due `vendo.json` schedules exactly once per cron window (see
426
+ * schedules.ts for the store-claimed idempotency rule). `sync` is the
427
+ * owner-scoped manifest re-read (the Wave-3 in-box agent's edit-complete
428
+ * hook); `report` feeds the doctor's machine/schedule reporting.
429
+ */
430
+ schedules: {
431
+ tick(at?: Date): Promise<ScheduleTickReport>;
432
+ sync(appId: AppId, ctx: RunContext): Promise<AppScheduleState>;
433
+ report(): Promise<AppScheduleStatus[]>;
434
+ };
435
+ /**
436
+ * ENG-345 — additive guarded per-secret in-sandbox exposure surface (same
437
+ * additive precedent as `inClient`/`pins`, not part of the frozen §1 method
438
+ * table). Option B (handles + egress substitution) stays the default; this is
439
+ * the exception path, off by default, per-secret × per-app, OWNER-ONLY, and
440
+ * gated by the guard's existing high-risk approval flow. The grant NEVER
441
+ * travels with a copy: it lives in its own store collection keyed by the app
442
+ * id, so exportApp/importApp/fork/share/publish (all of which mint or copy a
443
+ * fresh app id) can never carry it. Requires a docs/contracts/06-apps.md §4.3
444
+ * amendment (parked, Yousef-gated).
445
+ */
446
+ secrets: {
447
+ /** Current in-sandbox status of every declared secret for one app (owner-only). */
448
+ exposure(appId: AppId, ctx: RunContext): Promise<SecretExposureState[]>;
449
+ /**
450
+ * Flip one secret's in-sandbox exposure. Turning ON routes through the
451
+ * guard's high-risk approval flow and returns `pending-approval` until the
452
+ * owner decides it; turning OFF reverts to handles immediately.
453
+ */
454
+ setExposure(input: {
455
+ appId: AppId;
456
+ secretName: string;
457
+ expose: boolean;
458
+ }, ctx: RunContext): Promise<SetExposureResult>;
459
+ };
460
+ }
461
+ /** 06-apps §1 — construct the app lifecycle, generation, execution, and interchange surface. */
462
+ export declare const createApps: (config: AppsConfig) => AppsRuntime;
463
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,cAAc,EACnB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,eAAe,EAEpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EAEb,KAAK,WAAW,EAChB,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAMxC,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,aAAa,EACd,MAAM,YAAY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