@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.
- package/LICENSE +202 -0
- package/README.md +8 -0
- package/dist/adapter-conformance.d.ts +48 -0
- package/dist/adapter-conformance.d.ts.map +1 -0
- package/dist/adapter-conformance.js +196 -0
- package/dist/adapter-conformance.js.map +1 -0
- package/dist/agent-tools.d.ts +10 -0
- package/dist/agent-tools.d.ts.map +1 -0
- package/dist/agent-tools.js +252 -0
- package/dist/agent-tools.js.map +1 -0
- package/dist/app-data.d.ts +23 -0
- package/dist/app-data.d.ts.map +1 -0
- package/dist/app-data.js +129 -0
- package/dist/app-data.js.map +1 -0
- package/dist/app-token.d.ts +24 -0
- package/dist/app-token.d.ts.map +1 -0
- package/dist/app-token.js +61 -0
- package/dist/app-token.js.map +1 -0
- package/dist/audit.d.ts +11 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +19 -0
- package/dist/audit.js.map +1 -0
- package/dist/automation-plan.d.ts +43 -0
- package/dist/automation-plan.d.ts.map +1 -0
- package/dist/automation-plan.js +212 -0
- package/dist/automation-plan.js.map +1 -0
- package/dist/bench/client.d.ts +43 -0
- package/dist/bench/client.d.ts.map +1 -0
- package/dist/bench/client.js +129 -0
- package/dist/bench/client.js.map +1 -0
- package/dist/bench/fixtures.d.ts +42 -0
- package/dist/bench/fixtures.d.ts.map +1 -0
- package/dist/bench/fixtures.js +146 -0
- package/dist/bench/fixtures.js.map +1 -0
- package/dist/bench/judge.d.ts +9 -0
- package/dist/bench/judge.d.ts.map +1 -0
- package/dist/bench/judge.js +71 -0
- package/dist/bench/judge.js.map +1 -0
- package/dist/bench/metrics.d.ts +32 -0
- package/dist/bench/metrics.d.ts.map +1 -0
- package/dist/bench/metrics.js +172 -0
- package/dist/bench/metrics.js.map +1 -0
- package/dist/bench/prompts.d.ts +17 -0
- package/dist/bench/prompts.d.ts.map +1 -0
- package/dist/bench/prompts.js +100 -0
- package/dist/bench/prompts.js.map +1 -0
- package/dist/bench/report.d.ts +43 -0
- package/dist/bench/report.d.ts.map +1 -0
- package/dist/bench/report.js +74 -0
- package/dist/bench/report.js.map +1 -0
- package/dist/bench/runner.d.ts +15 -0
- package/dist/bench/runner.d.ts.map +1 -0
- package/dist/bench/runner.js +26 -0
- package/dist/bench/runner.js.map +1 -0
- package/dist/bench/toolfork.d.ts +18 -0
- package/dist/bench/toolfork.d.ts.map +1 -0
- package/dist/bench/toolfork.js +125 -0
- package/dist/bench/toolfork.js.map +1 -0
- package/dist/box-agent.d.ts +78 -0
- package/dist/box-agent.d.ts.map +1 -0
- package/dist/box-agent.js +137 -0
- package/dist/box-agent.js.map +1 -0
- package/dist/box-env.d.ts +26 -0
- package/dist/box-env.d.ts.map +1 -0
- package/dist/box-env.js +52 -0
- package/dist/box-env.js.map +1 -0
- package/dist/call.d.ts +23 -0
- package/dist/call.d.ts.map +1 -0
- package/dist/call.js +45 -0
- package/dist/call.js.map +1 -0
- package/dist/cloud.d.ts +4917 -0
- package/dist/cloud.d.ts.map +1 -0
- package/dist/cloud.js +16 -0
- package/dist/cloud.js.map +1 -0
- package/dist/e2b/index.d.ts +30 -0
- package/dist/e2b/index.d.ts.map +1 -0
- package/dist/e2b/index.js +273 -0
- package/dist/e2b/index.js.map +1 -0
- package/dist/egress-approval.d.ts +73 -0
- package/dist/egress-approval.d.ts.map +1 -0
- package/dist/egress-approval.js +74 -0
- package/dist/egress-approval.js.map +1 -0
- package/dist/engine.d.ts +188 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +1507 -0
- package/dist/engine.js.map +1 -0
- package/dist/fn.d.ts +22 -0
- package/dist/fn.d.ts.map +1 -0
- package/dist/fn.js +108 -0
- package/dist/fn.js.map +1 -0
- package/dist/history.d.ts +21 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +158 -0
- package/dist/history.js.map +1 -0
- package/dist/inclient.d.ts +48 -0
- package/dist/inclient.d.ts.map +1 -0
- package/dist/inclient.js +68 -0
- package/dist/inclient.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/interchange.d.ts +17 -0
- package/dist/interchange.d.ts.map +1 -0
- package/dist/interchange.js +133 -0
- package/dist/interchange.js.map +1 -0
- package/dist/machine-lifecycle.d.ts +102 -0
- package/dist/machine-lifecycle.d.ts.map +1 -0
- package/dist/machine-lifecycle.js +360 -0
- package/dist/machine-lifecycle.js.map +1 -0
- package/dist/manifest.d.ts +42 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +53 -0
- package/dist/manifest.js.map +1 -0
- package/dist/open.d.ts +45 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +245 -0
- package/dist/open.js.map +1 -0
- package/dist/parked-action.d.ts +51 -0
- package/dist/parked-action.d.ts.map +1 -0
- package/dist/parked-action.js +29 -0
- package/dist/parked-action.js.map +1 -0
- package/dist/persistence.d.ts +41 -0
- package/dist/persistence.d.ts.map +1 -0
- package/dist/persistence.js +86 -0
- package/dist/persistence.js.map +1 -0
- package/dist/pins.d.ts +231 -0
- package/dist/pins.d.ts.map +1 -0
- package/dist/pins.js +213 -0
- package/dist/pins.js.map +1 -0
- package/dist/pipeline.d.ts +142 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +1014 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/prewired-schema.d.ts +16 -0
- package/dist/prewired-schema.d.ts.map +1 -0
- package/dist/prewired-schema.js +48 -0
- package/dist/prewired-schema.js.map +1 -0
- package/dist/redaction.d.ts +13 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +67 -0
- package/dist/redaction.js.map +1 -0
- package/dist/runtime.d.ts +463 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1715 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sandbox.d.ts +90 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +2 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/schedules.d.ts +89 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +334 -0
- package/dist/schedules.js.map +1 -0
- package/dist/secret-exposure.d.ts +55 -0
- package/dist/secret-exposure.d.ts.map +1 -0
- package/dist/secret-exposure.js +53 -0
- package/dist/secret-exposure.js.map +1 -0
- package/dist/ship-diff.d.ts +47 -0
- package/dist/ship-diff.d.ts.map +1 -0
- package/dist/ship-diff.js +39 -0
- package/dist/ship-diff.js.map +1 -0
- package/dist/testing/fake-box.d.ts +67 -0
- package/dist/testing/fake-box.d.ts.map +1 -0
- package/dist/testing/fake-box.js +166 -0
- package/dist/testing/fake-box.js.map +1 -0
- package/dist/testing/fake-sandbox-v2.d.ts +59 -0
- package/dist/testing/fake-sandbox-v2.d.ts.map +1 -0
- package/dist/testing/fake-sandbox-v2.js +121 -0
- package/dist/testing/fake-sandbox-v2.js.map +1 -0
- package/dist/testing/fake-sandbox.d.ts +94 -0
- package/dist/testing/fake-sandbox.d.ts.map +1 -0
- package/dist/testing/fake-sandbox.js +239 -0
- package/dist/testing/fake-sandbox.js.map +1 -0
- package/dist/testing/guard-fixture.d.ts +19 -0
- package/dist/testing/guard-fixture.d.ts.map +1 -0
- package/dist/testing/guard-fixture.js +134 -0
- package/dist/testing/guard-fixture.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +8 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/memory-store.d.ts +5 -0
- package/dist/testing/memory-store.d.ts.map +1 -0
- package/dist/testing/memory-store.js +4 -0
- package/dist/testing/memory-store.js.map +1 -0
- package/dist/testing/scripted-model.d.ts +32 -0
- package/dist/testing/scripted-model.d.ts.map +1 -0
- package/dist/testing/scripted-model.js +112 -0
- package/dist/testing/scripted-model.js.map +1 -0
- package/dist/testing/seed-app-row.d.ts +4 -0
- package/dist/testing/seed-app-row.d.ts.map +1 -0
- package/dist/testing/seed-app-row.js +7 -0
- package/dist/testing/seed-app-row.js.map +1 -0
- package/dist/unified-diff.d.ts +13 -0
- package/dist/unified-diff.d.ts.map +1 -0
- package/dist/unified-diff.js +127 -0
- package/dist/unified-diff.js.map +1 -0
- package/dist/version-hash.d.ts +9 -0
- package/dist/version-hash.d.ts.map +1 -0
- package/dist/version-hash.js +12 -0
- package/dist/version-hash.js.map +1 -0
- package/package.json +84 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# @vendoai/apps
|
|
2
|
+
|
|
3
|
+
Owns Vendo app documents, instant tree rendering, app generation, sandbox
|
|
4
|
+
adapters, and the execution-v2 machine lifecycle (provision/wake/sleep/destroy)
|
|
5
|
+
with its box door; the box reaches host tools and durable rows through the
|
|
6
|
+
umbrella's guarded `/box` callback surface.
|
|
7
|
+
|
|
8
|
+
Read [Generated UI](https://docs.vendo.run/concepts/generated-ui).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SandboxAdapter, SandboxMachine } from "./sandbox.js";
|
|
2
|
+
/**
|
|
3
|
+
* The conformance app every harness must install in the box (on $PORT):
|
|
4
|
+
* - `GET /conformance/env/<NAME>` → 200, body = the box's value for env NAME
|
|
5
|
+
* - `POST /fn/echo` → 200, body echoed back
|
|
6
|
+
* - `GET /conformance/egress/<host>` → 200 JSON `{"allowed": boolean}` — an
|
|
7
|
+
* outbound `https://<host>` attempt (real or provider-faithfully simulated)
|
|
8
|
+
*/
|
|
9
|
+
export interface SandboxConformanceHarness {
|
|
10
|
+
makeAdapter(): SandboxAdapter | Promise<SandboxAdapter>;
|
|
11
|
+
/**
|
|
12
|
+
* Install the conformance app in a freshly created machine through
|
|
13
|
+
* provider-private means (in production the in-box agent owns the inside of
|
|
14
|
+
* the box; here it is test scaffolding — e.g. adapter-private exec for a
|
|
15
|
+
* live provider, an in-process handler for the fake).
|
|
16
|
+
*/
|
|
17
|
+
bootstrap(machine: SandboxMachine): Promise<void>;
|
|
18
|
+
/** True when the adapter enforces create()'s allowedDomains; enables the egress case. */
|
|
19
|
+
enforcesAllowedDomains: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* True when a DEFAULT request() (no explicit port) reaches the app on its
|
|
22
|
+
* $PORT whatever that is (e2b). The Vendo Cloud relay defaults to the one
|
|
23
|
+
* canonical box port instead — explicit ports route fine, but the
|
|
24
|
+
* "$PORT by default" case is provider-specific and tested beside the
|
|
25
|
+
* adapter.
|
|
26
|
+
*/
|
|
27
|
+
multiPort: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* True when resume() mints an INDEPENDENT machine per call (e2b restores
|
|
30
|
+
* a checkpoint into fresh sandboxes). The Vendo Cloud resume revives the
|
|
31
|
+
* ONE machine a snapshot came from (pause model, same id) — no fork — so
|
|
32
|
+
* its harness disables the independent-machines case and the fresh-id
|
|
33
|
+
* assertion. Tracked Cloud follow-up: resume-from-a-stopped-machine
|
|
34
|
+
* provisioning a new box would flip this back on.
|
|
35
|
+
*/
|
|
36
|
+
resumeForks: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* True when resume(ref, policy) can REPLACE the snapshot-time egress
|
|
39
|
+
* allowlist (e2b, via provider network rules). The Cloud resume takes the
|
|
40
|
+
* bare ref today (a changed policy raises the typed
|
|
41
|
+
* cloud-egress-override-unsupported error); flips on when the Cloud
|
|
42
|
+
* resume grows its egress field (tracked follow-up).
|
|
43
|
+
*/
|
|
44
|
+
resumeReplacesPolicy: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** execution-v2 sandbox-seam conformance suite shared by the fake and live adapters. */
|
|
47
|
+
export declare const sandboxAdapterConformance: (name: string, harness: SandboxConformanceHarness) => void;
|
|
48
|
+
//# sourceMappingURL=adapter-conformance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-conformance.d.ts","sourceRoot":"","sources":["../src/adapter-conformance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAKnE;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,WAAW,IAAI,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACxD;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,yFAAyF;IACzF,sBAAsB,EAAE,OAAO,CAAC;IAChC;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAqCD,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,GACpC,MAAM,MAAM,EACZ,SAAS,yBAAyB,KACjC,IA6LF,CAAC"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
const decoder = new TextDecoder();
|
|
3
|
+
const TEST_TIMEOUT_MS = 180_000;
|
|
4
|
+
const requestEventually = async (machine, req) => {
|
|
5
|
+
let failure;
|
|
6
|
+
for (let attempt = 0; attempt < 30; attempt += 1) {
|
|
7
|
+
try {
|
|
8
|
+
const response = await machine.request(req);
|
|
9
|
+
if (response.status >= 200 && response.status < 500) {
|
|
10
|
+
expect(response.body).toBeInstanceOf(Uint8Array);
|
|
11
|
+
return { status: response.status, body: decoder.decode(response.body) };
|
|
12
|
+
}
|
|
13
|
+
failure = new Error(`sandbox listener answered ${response.status} for ${req.path}`);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
failure = error;
|
|
17
|
+
}
|
|
18
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
19
|
+
}
|
|
20
|
+
throw failure ?? new Error(`sandbox listener did not serve ${req.path}`);
|
|
21
|
+
};
|
|
22
|
+
/** True when the machine no longer serves the given env value (asleep, dead, or wrong box). */
|
|
23
|
+
const noLongerServes = async (machine, req, value) => {
|
|
24
|
+
try {
|
|
25
|
+
const response = await machine.request(req);
|
|
26
|
+
return response.status !== 200 || decoder.decode(response.body) !== value;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/** execution-v2 sandbox-seam conformance suite shared by the fake and live adapters. */
|
|
33
|
+
export const sandboxAdapterConformance = (name, harness) => {
|
|
34
|
+
describe(`${name} SandboxAdapter conformance`, () => {
|
|
35
|
+
const spawned = [];
|
|
36
|
+
const track = (machine) => {
|
|
37
|
+
spawned.push(machine);
|
|
38
|
+
return machine;
|
|
39
|
+
};
|
|
40
|
+
const mintedRefs = [];
|
|
41
|
+
const mint = async (adapter, machine) => {
|
|
42
|
+
const ref = await machine.snapshot();
|
|
43
|
+
mintedRefs.push({ adapter, ref });
|
|
44
|
+
return ref;
|
|
45
|
+
};
|
|
46
|
+
// The gate's own rule: destroy every sandbox we create — and every
|
|
47
|
+
// snapshot we mint — even on failure.
|
|
48
|
+
afterEach(async () => {
|
|
49
|
+
await Promise.all(spawned.splice(0).map((machine) => machine.destroy().catch(() => undefined)));
|
|
50
|
+
await Promise.all(mintedRefs.splice(0).map(({ adapter, ref }) => adapter.destroy(ref).catch(() => undefined)));
|
|
51
|
+
}, TEST_TIMEOUT_MS);
|
|
52
|
+
it("creates, serves on $PORT, snapshots, sleeps, resumes, and destroys", async () => {
|
|
53
|
+
const adapter = await harness.makeAdapter();
|
|
54
|
+
const created = track(await adapter.create({
|
|
55
|
+
env: { PORT: "8080", CONFORMANCE_VALUE: "present" },
|
|
56
|
+
}));
|
|
57
|
+
await harness.bootstrap(created);
|
|
58
|
+
const envRequest = { method: "GET", path: "/conformance/env/CONFORMANCE_VALUE" };
|
|
59
|
+
await expect(requestEventually(created, envRequest))
|
|
60
|
+
.resolves.toMatchObject({ status: 200, body: "present" });
|
|
61
|
+
const echoed = await created.request({ method: "POST", path: "/fn/echo", body: "round-trip" });
|
|
62
|
+
expect(echoed.status).toBe(200);
|
|
63
|
+
expect(decoder.decode(echoed.body)).toBe("round-trip");
|
|
64
|
+
const snapshotRef = await mint(adapter, created);
|
|
65
|
+
// The seam requires provider-prefixed refs (e.g. "e2b:…"); the prefix
|
|
66
|
+
// spelling beyond that is the provider's business.
|
|
67
|
+
expect(snapshotRef).toMatch(/^[A-Za-z][A-Za-z0-9_-]*:.+/);
|
|
68
|
+
await created.stop();
|
|
69
|
+
await created.stop(); // sleeping twice is not an error
|
|
70
|
+
expect(await noLongerServes(created, envRequest, "present")).toBe(true);
|
|
71
|
+
// A fresh adapter instance restores the ref: env and app carried. A
|
|
72
|
+
// forking provider restores into a NEW machine; a pause-model provider
|
|
73
|
+
// (Cloud) revives the one it came from.
|
|
74
|
+
const resumed = track(await (await harness.makeAdapter()).resume(snapshotRef));
|
|
75
|
+
if (harness.resumeForks)
|
|
76
|
+
expect(resumed.id).not.toBe(created.id);
|
|
77
|
+
await expect(requestEventually(resumed, envRequest))
|
|
78
|
+
.resolves.toMatchObject({ status: 200, body: "present" });
|
|
79
|
+
// destroy() works on a sleeping machine and is idempotent.
|
|
80
|
+
await created.destroy();
|
|
81
|
+
await created.destroy();
|
|
82
|
+
await resumed.destroy();
|
|
83
|
+
expect(await noLongerServes(resumed, envRequest, "present")).toBe(true);
|
|
84
|
+
}, TEST_TIMEOUT_MS);
|
|
85
|
+
it.skipIf(!harness.resumeForks)("resumes one snapshot into independent machines", async () => {
|
|
86
|
+
const adapter = await harness.makeAdapter();
|
|
87
|
+
const source = track(await adapter.create({
|
|
88
|
+
env: { PORT: "8080", CONFORMANCE_VALUE: "independent" },
|
|
89
|
+
}));
|
|
90
|
+
await harness.bootstrap(source);
|
|
91
|
+
const envRequest = { method: "GET", path: "/conformance/env/CONFORMANCE_VALUE" };
|
|
92
|
+
await requestEventually(source, envRequest);
|
|
93
|
+
const ref = await mint(adapter, source);
|
|
94
|
+
// The source keeps serving after the snapshot...
|
|
95
|
+
await expect(requestEventually(source, envRequest))
|
|
96
|
+
.resolves.toMatchObject({ status: 200, body: "independent" });
|
|
97
|
+
const left = track(await adapter.resume(ref));
|
|
98
|
+
const right = track(await adapter.resume(ref));
|
|
99
|
+
expect(new Set([source.id, left.id, right.id]).size).toBe(3);
|
|
100
|
+
await requestEventually(left, envRequest);
|
|
101
|
+
// ...and destroying one resume leaves its sibling alive.
|
|
102
|
+
await left.destroy();
|
|
103
|
+
await expect(requestEventually(right, envRequest))
|
|
104
|
+
.resolves.toMatchObject({ status: 200, body: "independent" });
|
|
105
|
+
}, TEST_TIMEOUT_MS);
|
|
106
|
+
it.skipIf(!harness.multiPort)("routes requests to the box $PORT by default, honoring an explicit port", async () => {
|
|
107
|
+
const adapter = await harness.makeAdapter();
|
|
108
|
+
const machine = track(await adapter.create({
|
|
109
|
+
env: { PORT: "9090", CONFORMANCE_VALUE: "ported" },
|
|
110
|
+
}));
|
|
111
|
+
await harness.bootstrap(machine);
|
|
112
|
+
const envPath = "/conformance/env/CONFORMANCE_VALUE";
|
|
113
|
+
await expect(requestEventually(machine, { method: "GET", path: envPath }))
|
|
114
|
+
.resolves.toMatchObject({ status: 200, body: "ported" });
|
|
115
|
+
await expect(requestEventually(machine, { method: "GET", path: envPath, port: 9090 }))
|
|
116
|
+
.resolves.toMatchObject({ status: 200, body: "ported" });
|
|
117
|
+
// A port nothing listens on never reaches the app.
|
|
118
|
+
expect(await noLongerServes(machine, { method: "GET", path: envPath, port: 9099 }, "ported"))
|
|
119
|
+
.toBe(true);
|
|
120
|
+
}, TEST_TIMEOUT_MS);
|
|
121
|
+
it.skipIf(!harness.enforcesAllowedDomains)("enforces the create-time allowedDomains egress allowlist", async () => {
|
|
122
|
+
const adapter = await harness.makeAdapter();
|
|
123
|
+
const machine = track(await adapter.create({
|
|
124
|
+
env: { PORT: "8080" },
|
|
125
|
+
allowedDomains: ["example.com"],
|
|
126
|
+
}));
|
|
127
|
+
await harness.bootstrap(machine);
|
|
128
|
+
const attempt = async (host) => {
|
|
129
|
+
const result = await requestEventually(machine, {
|
|
130
|
+
method: "GET",
|
|
131
|
+
path: `/conformance/egress/${host}`,
|
|
132
|
+
});
|
|
133
|
+
return JSON.parse(result.body).allowed;
|
|
134
|
+
};
|
|
135
|
+
expect(await attempt("example.com")).toBe(true);
|
|
136
|
+
expect(await attempt("vendo.run")).toBe(false);
|
|
137
|
+
}, TEST_TIMEOUT_MS);
|
|
138
|
+
it.skipIf(!harness.enforcesAllowedDomains || !harness.resumeReplacesPolicy)("a resume-time policy replaces the snapshot's egress allowlist", async () => {
|
|
139
|
+
const adapter = await harness.makeAdapter();
|
|
140
|
+
const source = track(await adapter.create({
|
|
141
|
+
env: { PORT: "8080" },
|
|
142
|
+
allowedDomains: ["example.com"],
|
|
143
|
+
}));
|
|
144
|
+
await harness.bootstrap(source);
|
|
145
|
+
const attempt = async (machine, host) => {
|
|
146
|
+
const result = await requestEventually(machine, {
|
|
147
|
+
method: "GET",
|
|
148
|
+
path: `/conformance/egress/${host}`,
|
|
149
|
+
});
|
|
150
|
+
return JSON.parse(result.body).allowed;
|
|
151
|
+
};
|
|
152
|
+
expect(await attempt(source, "example.com")).toBe(true);
|
|
153
|
+
const ref = await mint(adapter, source);
|
|
154
|
+
// A bare resume restores the snapshot-time policy…
|
|
155
|
+
const bare = track(await adapter.resume(ref));
|
|
156
|
+
expect(await attempt(bare, "example.com")).toBe(true);
|
|
157
|
+
expect(await attempt(bare, "vendo.run")).toBe(false);
|
|
158
|
+
// …and a passed policy replaces it — the wake enforces CURRENT grants
|
|
159
|
+
// (Lane E), not what the machine slept with. The positive probe uses
|
|
160
|
+
// an IANA-reserved domain so reachability never masquerades as policy.
|
|
161
|
+
const repoliced = track(await adapter.resume(ref, { allowedDomains: ["example.org"] }));
|
|
162
|
+
expect(await attempt(repoliced, "example.org")).toBe(true);
|
|
163
|
+
expect(await attempt(repoliced, "example.com")).toBe(false);
|
|
164
|
+
}, TEST_TIMEOUT_MS);
|
|
165
|
+
it("exposes a public ingress URL, defaulting to the app's $PORT", async () => {
|
|
166
|
+
const adapter = await harness.makeAdapter();
|
|
167
|
+
const machine = track(await adapter.create({
|
|
168
|
+
env: { PORT: "8080" },
|
|
169
|
+
}));
|
|
170
|
+
// Wave 4 (layer 3) — the browser→box path: an absolute URL per port,
|
|
171
|
+
// defaulting to the app's $PORT. The exact host shape is the provider's.
|
|
172
|
+
const appUrl = await machine.url();
|
|
173
|
+
expect(new URL(appUrl).protocol).toMatch(/^https?:$/);
|
|
174
|
+
expect(await machine.url(8080)).toBe(appUrl);
|
|
175
|
+
expect(await machine.url(9090)).not.toBe(appUrl);
|
|
176
|
+
expect(new URL(await machine.url(9090)).protocol).toMatch(/^https?:$/);
|
|
177
|
+
}, TEST_TIMEOUT_MS);
|
|
178
|
+
it("rejects a snapshot ref it did not issue", async () => {
|
|
179
|
+
const adapter = await harness.makeAdapter();
|
|
180
|
+
await expect(adapter.resume("bogus:not-a-real-ref")).rejects.toThrow();
|
|
181
|
+
await expect(adapter.destroy("bogus:not-a-real-ref")).rejects.toThrow();
|
|
182
|
+
}, TEST_TIMEOUT_MS);
|
|
183
|
+
it("destroys a sleeping machine by ref, without resuming it", async () => {
|
|
184
|
+
const adapter = await harness.makeAdapter();
|
|
185
|
+
const machine = track(await adapter.create({
|
|
186
|
+
env: { PORT: "8080", CONFORMANCE_VALUE: "sleeping" },
|
|
187
|
+
}));
|
|
188
|
+
const ref = await mint(adapter, machine);
|
|
189
|
+
await machine.stop();
|
|
190
|
+
await adapter.destroy(ref);
|
|
191
|
+
await adapter.destroy(ref); // destroying already-destroyed state is a no-op
|
|
192
|
+
await expect(adapter.resume(ref)).rejects.toThrow();
|
|
193
|
+
}, TEST_TIMEOUT_MS);
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=adapter-conformance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-conformance.js","sourceRoot":"","sources":["../src/adapter-conformance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAGzD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,eAAe,GAAG,OAAO,CAAC;AA+ChC,MAAM,iBAAiB,GAAG,KAAK,EAC7B,OAAuB,EACvB,GAA6C,EACF,EAAE;IAC7C,IAAI,OAAgB,CAAC;IACrB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,EAAE,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;gBACpD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;gBACjD,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,CAAC;YACD,OAAO,GAAG,IAAI,KAAK,CAAC,6BAA6B,QAAQ,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAI,E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js";
|
|
3
|
+
import type { AppsRuntime } from "./runtime.js";
|
|
4
|
+
export interface AgentToolsDataDependencies {
|
|
5
|
+
data: AppDataAccess;
|
|
6
|
+
requireOwned(appId: AppId, subject: string): Promise<AppDocument>;
|
|
7
|
+
}
|
|
8
|
+
/** 06-apps §§1,5 — unbound Vendo app capabilities; the umbrella binds this registry. */
|
|
9
|
+
export declare const createAgentTools: (runtime: AppsRuntime, dependencies: AgentToolsDataDependencies) => ToolRegistry;
|
|
10
|
+
//# sourceMappingURL=agent-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../src/agent-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,KAAK,EAMV,KAAK,YAAY,EAElB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAgKhD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACnE;AASD,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,EACpB,cAAc,0BAA0B,KACvC,YAyFD,CAAC"}
|