@open-everywhere/adapters 0.1.5 โ 0.3.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/NOTICE +9 -9
- package/README.md +9 -1
- package/agent/browser/sandbox.ts +27 -5
- package/agent/instrumentation.ts +95 -36
- package/agent/model/approval-judge.ts +1 -1
- package/agent/oe-oauth/config.ts +1 -1
- package/agent/oe-oauth/token-vault.ts +3 -2
- package/agent/register-defaults.ts +276 -0
- package/agent/sandbox/vercel-lifecycle.ts +22 -1
- package/dist/agent/browser/sandbox.d.ts +8 -2
- package/dist/agent/browser/sandbox.d.ts.map +1 -1
- package/dist/agent/browser/sandbox.js +19 -2
- package/dist/agent/browser/sandbox.js.map +1 -1
- package/dist/agent/instrumentation.d.ts +24 -4
- package/dist/agent/instrumentation.d.ts.map +1 -1
- package/dist/agent/instrumentation.js +83 -34
- package/dist/agent/instrumentation.js.map +1 -1
- package/dist/agent/model/approval-judge.d.ts +1 -1
- package/dist/agent/model/approval-judge.js +1 -1
- package/dist/agent/oe-oauth/config.d.ts +1 -1
- package/dist/agent/oe-oauth/config.d.ts.map +1 -1
- package/dist/agent/oe-oauth/token-vault.d.ts.map +1 -1
- package/dist/agent/oe-oauth/token-vault.js +4 -2
- package/dist/agent/oe-oauth/token-vault.js.map +1 -1
- package/dist/agent/register-defaults.d.ts +76 -0
- package/dist/agent/register-defaults.d.ts.map +1 -0
- package/dist/agent/register-defaults.js +186 -0
- package/dist/agent/register-defaults.js.map +1 -0
- package/dist/agent/sandbox/vercel-lifecycle.d.ts.map +1 -1
- package/dist/agent/sandbox/vercel-lifecycle.js +20 -1
- package/dist/agent/sandbox/vercel-lifecycle.js.map +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// THE DEFAULT ADAPTER WIRING (OPE-2301) โ `registerDefaultAdapters()`, the boot call every app makes
|
|
2
|
+
// from its `agent/lib/register-adapters.ts`.
|
|
3
|
+
//
|
|
4
|
+
// ๐ด WHY THIS IS PRODUCT CODE AND NOT A TEMPLATE FILE. The wiring used to live in each app, as a
|
|
5
|
+
// copy of the template's `agent/lib/register-adapters.ts`. `npx @open-everywhere/create` copies the
|
|
6
|
+
// template once, and an upgrade touches only `package.json`, so every upgrade had to hand-merge the
|
|
7
|
+
// copy. It drifted twice: a 0.1.2 copy registered no Postgres client on a bare `DATABASE_URL`
|
|
8
|
+
// (OPE-2230), and the test-bed's copy broke the 0.1.5 build with a boot refusal. The selection rules
|
|
9
|
+
// and the floors below are product logic, not consumer config. Here they ship with the package, and
|
|
10
|
+
// an upgrade picks them up. The app's file is one call plus an optional `customAdapters` hook.
|
|
11
|
+
//
|
|
12
|
+
// ๐ด STATIC IMPORTS ON PURPOSE. Eve bundles each authored module and its import graph into ONE
|
|
13
|
+
// rolldown chunk. A literal dynamic `import("โฆ")` of an internal module code-splits into a second
|
|
14
|
+
// chunk and trips Eve's "expected one authored module" invariant. Laziness is kept where it matters:
|
|
15
|
+
// `registerNeon()` builds the `@neondatabase/serverless` driver through an inner variable-specifier
|
|
16
|
+
// import, and only when it is CALLED (the Neon gate below).
|
|
17
|
+
//
|
|
18
|
+
// ๐ด THE APP'S INPUTS ARE ARGUMENTS. The selection table (`providers.generated.ts`, `oe build`
|
|
19
|
+
// output) and the memory config are app files, so the app passes them in. This module names no
|
|
20
|
+
// provider bundle: it drives the table it receives.
|
|
21
|
+
import { registerOeOauth } from "./oe-oauth/register.js";
|
|
22
|
+
import { oeOauthEnabled, loadOeOauthConfig } from "./oe-oauth/config.js";
|
|
23
|
+
import { registerAgentBrowser } from "./browser/register.js";
|
|
24
|
+
import { agentBrowserEnabled, loadAgentBrowserConfig } from "./browser/config.js";
|
|
25
|
+
import { registerAwsAccess } from "./aws/register.js";
|
|
26
|
+
import { awsAccessEnabled } from "./aws/config.js";
|
|
27
|
+
import { registerDirectoryAdapter } from "./directory/register.js";
|
|
28
|
+
import { registerGatewayRouteProbe } from "./model/gateway-probe.js";
|
|
29
|
+
import { registerNeon } from "./postgres/neon.js";
|
|
30
|
+
import { vercelBlobPutter } from "./blob/hosting.js";
|
|
31
|
+
import { registerDbCredentialBroker, CREDENTIAL_KEY_ENV, registerGitHubConfigPrProvider, setBlobPutter, registerAuditDropCounter, emitTelemetry, getOperationalStore, bootVerifyAuditChainTail, bootBackfillLinkTenants, runBootNotices, registerBootNotice, announceJudgeWithoutRules, registerOperationalPgliteLazy, resolveOperationalSelection, resolveMemoryProviderId, onVercel, declareProviderSelection, assertConnectorMemoryGrants, applySubtreeSurfaceClaims, reconcileSurfaceCommands, } from "@open-everywhere/core/agent/adapter-api.js";
|
|
32
|
+
/**
|
|
33
|
+
* The store decision, pure. ๐ด THE SELECTION IS THE RUNTIME'S OWN RULE, NOT A SECOND ENV TEST
|
|
34
|
+
* (OPE-2230). Both selectors default to postgres when `DATABASE_URL` is present. A hand-written
|
|
35
|
+
* `OE_MEMORY_PROVIDER === "postgres"` test refuses to build the driver for exactly the deployment
|
|
36
|
+
* the default exists for: the Neon Marketplace integration sets `DATABASE_URL` and nothing else.
|
|
37
|
+
*
|
|
38
|
+
* The PGlite floor (OPE-113) arms when the operational selection resolves to it (no provider named,
|
|
39
|
+
* no `DATABASE_URL`). It stays off on Vercel, where the floor is per-instance and ephemeral, unless
|
|
40
|
+
* `OE_ALLOW_EPHEMERAL_OPERATIONAL=1` names the single-instance escape. The Neon gate never opens on
|
|
41
|
+
* the floor's branch, so the two never both register.
|
|
42
|
+
*/
|
|
43
|
+
export function decideStoreWiring(env, vercel) {
|
|
44
|
+
const operational = resolveOperationalSelection(env);
|
|
45
|
+
const postgresSelected = resolveMemoryProviderId(env) === "postgres" || (operational.id === "postgres" && operational.floor === "none");
|
|
46
|
+
return {
|
|
47
|
+
operational,
|
|
48
|
+
neon: postgresSelected && Boolean(env.DATABASE_URL),
|
|
49
|
+
pgliteFloor: operational.floor === "pglite" && (!vercel || env.OE_ALLOW_EPHEMERAL_OPERATIONAL === "1"),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
let WIRED;
|
|
53
|
+
let STARTED;
|
|
54
|
+
/** What `registerDefaultAdapters()` wired in this process, or `undefined` before it runs. */
|
|
55
|
+
export function defaultAdapterWiring() {
|
|
56
|
+
return WIRED;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Wire every default adapter, the selected provider bundles and the operational store. Call it from
|
|
60
|
+
* the app's `agent/lib/register-adapters.ts`, with `await` at module top level.
|
|
61
|
+
* The wiring runs ONCE per process. A second run would declare the provider selection again (which
|
|
62
|
+
* clears the gate's admitted and refused records), and run every bundle's register(), the boot
|
|
63
|
+
* checks and the slash-command reconcile a second time.
|
|
64
|
+
* ๐ด A SECOND CALL RETURNS THE FIRST CALL'S RESULT; IT DOES NOT THROW. eve 0.71's authored-module
|
|
65
|
+
* loader (`internal/authored-module-loader.js`) bundles and evaluates `agent/agent.ts` more than once
|
|
66
|
+
* in one `eve build` process, and each evaluation runs `register-adapters.ts` again. This module and
|
|
67
|
+
* core stay external, so the second evaluation shares the registries the first one filled. A throw
|
|
68
|
+
* here failed that evaluation and the build (OPE-2346).
|
|
69
|
+
*/
|
|
70
|
+
export function registerDefaultAdapters(options) {
|
|
71
|
+
STARTED ??= wireDefaultAdapters(options);
|
|
72
|
+
return STARTED;
|
|
73
|
+
}
|
|
74
|
+
async function wireDefaultAdapters(options) {
|
|
75
|
+
// PROVIDER SELECTION โ declared FIRST, before any bundle registers (OPE-116 stage 5). Core takes the
|
|
76
|
+
// ids as opaque strings, and every platform-keyed registration seam then refuses anything outside
|
|
77
|
+
// them. A row that lands ahead of the declaration cannot be retracted (core warns if one does).
|
|
78
|
+
const providers = declareProviderSelection(options.providers.map((p) => p.id));
|
|
79
|
+
// Connector-plane user-auth flow (OPE-88): own-rolled OAuth, registered only when the master flag
|
|
80
|
+
// OE_OAUTH_ENABLED is armed AND a provider config block is present. Otherwise no flow registers and
|
|
81
|
+
// core's OAuth mint paths fail closed. There is no vendor fallback.
|
|
82
|
+
const oeOauthCfg = oeOauthEnabled() ? loadOeOauthConfig() : undefined;
|
|
83
|
+
if (oeOauthCfg)
|
|
84
|
+
registerOeOauth({ providers: oeOauthCfg });
|
|
85
|
+
// The "db" credential broker (task #113): registered iff its AES key exists. Without the key the
|
|
86
|
+
// broker fails closed on store and read, so registering it would falsely offer the "Set API key"
|
|
87
|
+
// chat intake, which keys off the broker being REGISTERED.
|
|
88
|
+
const dbCredentialBroker = Boolean(process.env[CREDENTIAL_KEY_ENV]);
|
|
89
|
+
if (dbCredentialBroker)
|
|
90
|
+
registerDbCredentialBroker();
|
|
91
|
+
// The agent-browser toolkit (OPE-43). The platform gate is inside loadAgentBrowserConfig
|
|
92
|
+
// (OPE-1793): off Vercel the config is `undefined` and nothing registers.
|
|
93
|
+
// registerAgentBrowser can still refuse (returns false, loud) when the vendor binding did not take.
|
|
94
|
+
const browserCfg = agentBrowserEnabled() ? loadAgentBrowserConfig() : undefined;
|
|
95
|
+
const agentBrowser = browserCfg ? registerAgentBrowser(browserCfg) : false;
|
|
96
|
+
// The AWS-access layer: only when OE_AWS_ENABLED is armed. Flag-off โ core's AWS mint and exec
|
|
97
|
+
// paths fail closed.
|
|
98
|
+
const awsAccess = awsAccessEnabled();
|
|
99
|
+
if (awsAccess)
|
|
100
|
+
registerAwsAccess();
|
|
101
|
+
// The identity-DIRECTORY plane: a no-op unless OE_DIRECTORY_PROVIDER names an adapter, and LOUD
|
|
102
|
+
// when it names one whose config is incomplete.
|
|
103
|
+
registerDirectoryAdapter();
|
|
104
|
+
// The GitHub config-repo PR mechanism, the default ConfigPrProvider (OPE-86). Unconditional and
|
|
105
|
+
// harmless when unused. A self-host swaps in its own provider from `customAdapters`.
|
|
106
|
+
registerGitHubConfigPrProvider();
|
|
107
|
+
// THE PROVIDER BUNDLES: one boot call per SELECTED bundle, straight from the generated table.
|
|
108
|
+
for (const provider of options.providers) {
|
|
109
|
+
provider.register();
|
|
110
|
+
}
|
|
111
|
+
// The deployment-status surface's model probe (OPE-2230). It registers a function, and nothing
|
|
112
|
+
// calls it until somebody reads `GET /eve/v1/oe/status`.
|
|
113
|
+
registerGatewayRouteProbe();
|
|
114
|
+
// The audit drop counter (audit-wedge WS-5). audit.ts cannot import telemetry.ts (a module-init
|
|
115
|
+
// cycle, and the one-chunk invariant), so this boot module injects the emitter.
|
|
116
|
+
registerAuditDropCounter((action, platform) => emitTelemetry("oe.audit.dropped", { "oe.action": action, "oe.platform": platform }));
|
|
117
|
+
// The Vercel Blob putter for the HTML-artifact hosting seam. Harmless when unused: the hosting
|
|
118
|
+
// path runs only for an org that opted in, and the putter fails loud without its OIDC env.
|
|
119
|
+
setBlobPutter(vercelBlobPutter);
|
|
120
|
+
// THE APP'S HOOK, after every default registration and before every check that reads them.
|
|
121
|
+
const customAdapters = options.customAdapters !== undefined;
|
|
122
|
+
if (options.customAdapters)
|
|
123
|
+
await options.customAdapters();
|
|
124
|
+
// THE PREFETCH INVARIANT (OPE-390), fail-LOUD. It runs after the bundles register, because a
|
|
125
|
+
// connector-owned memory capability is DECLARED by its bundle's register(). It refuses a domain
|
|
126
|
+
// whose memory names a connector-owned silo the domain holds no connector grant for.
|
|
127
|
+
assertConnectorMemoryGrants(options.memory.domains(), options.memory.silos(), options.memory.grants);
|
|
128
|
+
// THE SUBTREE CLAIM (OPE-539), for the same boot-order reason: the platform that honours
|
|
129
|
+
// `subtree: true` declares so from its own bundle's register().
|
|
130
|
+
applySubtreeSurfaceClaims();
|
|
131
|
+
// The judge-without-rules line (OPE-2400): `approvals.judgeMode: "enforce"` with no bound
|
|
132
|
+
// pre-approval rule behaves like `off`, so say so once. A boot notice, so it logs once per process,
|
|
133
|
+
// in the process that serves, and a failure costs one log line, never the boot.
|
|
134
|
+
registerBootNotice("approval-judge-no-rules", announceJudgeWithoutRules);
|
|
135
|
+
const store = decideStoreWiring(process.env, onVercel());
|
|
136
|
+
// Neon (hosted Postgres) is LIVE-ONLY: registerNeon() builds the driver only when called here.
|
|
137
|
+
if (store.neon)
|
|
138
|
+
await registerNeon();
|
|
139
|
+
// The embedded PGlite floor, armed LAZILY (OPE-391). The store registers now, but the lock, the
|
|
140
|
+
// WASM boot and the schema init happen on the first QUERY. `eve start` evaluates the app module
|
|
141
|
+
// in the CLI parent and again in the server child, and an eager arm made the parent the lock
|
|
142
|
+
// holder. The boot store checks ride along as the first-open callback, so they run once, in the
|
|
143
|
+
// process that uses the store.
|
|
144
|
+
if (store.pgliteFloor)
|
|
145
|
+
registerOperationalPgliteLazy(undefined, runBootStoreChecks);
|
|
146
|
+
else
|
|
147
|
+
await runBootStoreChecks();
|
|
148
|
+
// SLASH COMMANDS REGISTER FROM THE DEPLOYMENT ITSELF (OPE-1687). The app declares WHICH ROOMS
|
|
149
|
+
// (`declareSurfaceCommandScope`); each selected bundle declared HOW in the loop above. AWAITED, and
|
|
150
|
+
// it never throws: a lambda can freeze the moment it answers, and a floating promise would be
|
|
151
|
+
// cancelled on the cold start that had the work to do. The reconciler owns the latency bound (a
|
|
152
|
+
// short timeout per vendor call, no 429 backoff, one budget). `eve start` evaluates the app module
|
|
153
|
+
// twice, so a local start reconciles twice. A reconcile WRITES when the process holds the surface's
|
|
154
|
+
// credentials and the declared rooms differ from this checkout.
|
|
155
|
+
await reconcileSurfaceCommands();
|
|
156
|
+
WIRED = { providers, oeOauth: oeOauthCfg !== undefined, dbCredentialBroker, agentBrowser, awsAccess, customAdapters, store };
|
|
157
|
+
return WIRED;
|
|
158
|
+
}
|
|
159
|
+
// The boot-time store checks, in one place so they run either eagerly (hosted and sqlite paths, where
|
|
160
|
+
// the store is live the moment it registers) or on the PGlite floor's FIRST OPEN. Availability over
|
|
161
|
+
// integrity: none of them throws.
|
|
162
|
+
// 1. The audit hash-chain tail-check (OPE-52): one loud warn on any break.
|
|
163
|
+
// 2. The identity-link tenant backfill (OPE-309): fills blank `tenant` columns only.
|
|
164
|
+
// 3. The registered boot notices (OPE-2231): a selected bundle registers a notice from its own
|
|
165
|
+
// register() call, and this drains the registry. The drain catches each notice separately.
|
|
166
|
+
async function runBootStoreChecks() {
|
|
167
|
+
try {
|
|
168
|
+
await bootVerifyAuditChainTail(getOperationalStore());
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
/* store not resolvable โ its first real use raises the reason loudly; skip the check */
|
|
172
|
+
}
|
|
173
|
+
try {
|
|
174
|
+
await bootBackfillLinkTenants();
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
/* store not resolvable โ see above; bootBackfillLinkTenants swallows everything else */
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
await runBootNotices();
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
/* unreachable โ runBootNotices catches per notice; see core boot/notices.ts */
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=register-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-defaults.js","sourceRoot":"","sources":["../../agent/register-defaults.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,6CAA6C;AAC7C,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,oGAAoG;AACpG,8FAA8F;AAC9F,qGAAqG;AACrG,oGAAoG;AACpG,+FAA+F;AAC/F,EAAE;AACF,+FAA+F;AAC/F,kGAAkG;AAClG,qGAAqG;AACrG,oGAAoG;AACpG,4DAA4D;AAC5D,EAAE;AACF,+FAA+F;AAC/F,+FAA+F;AAC/F,oDAAoD;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAg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B,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;;QAC/E,MAAM,kBAAkB,EAAE,CAAC;IAEhC,8FAA8F;IAC9F,oGAAoG;IACpG,8FAA8F;IAC9F,gGAAgG;IAChG,mGAAmG;IACnG,oGAAoG;IACpG,gEAAgE;IAChE,MAAM,wBAAwB,EAAE,CAAC;IAEjC,KAAK,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,KAAK,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;IAC7H,OAAO,KAAK,CAAC;AACf,CAAC;AAED,sGAAsG;AACtG,oGAAoG;AACpG,kCAAkC;AAClC,4EAA4E;AAC5E,sFAAsF;AACtF,gGAAgG;AAChG,+FAA+F;AAC/F,KAAK,UAAU,kBAAkB;IAC/B,IAAI,CAAC;QACH,MAAM,wBAAwB,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,wFAAwF;IAC1F,CAAC;IACD,IAAI,CAAC;QACH,MAAM,uBAAuB,EAAE,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,wFAAwF;IAC1F,CAAC;IACD,IAAI,CAAC;QACH,MAAM,cAAc,EAAE,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,+EAA+E;IACjF,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel-lifecycle.d.ts","sourceRoot":"","sources":["../../../agent/sandbox/vercel-lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vercel-lifecycle.d.ts","sourceRoot":"","sources":["../../../agent/sandbox/vercel-lifecycle.ts"],"names":[],"mappings":"AAaA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAyB,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKhH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,CAAC;AAMhE;;mFAEmF;AACnF,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,cAAwC,EACjD,GAAG,GAAE,MAAM,MAAiB,GAC3B,OAAO,CAAC,cAAc,EAAE,CAAC,CAc3B;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAc1G;AAWD,oEAAoE;AACpE,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,SAAS,MAAM,EAAE,CAMpE;AAmDD;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgGnG"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
// Stop-after-turn sandbox lifecycle โ this file owns the DECISION, backend-stop.ts the mechanics. It exists
|
|
2
2
|
// because a session VM is billed for its whole idle tail; every failure is fail-soft to the `timeout` fuse.
|
|
3
|
+
//
|
|
4
|
+
// ๐ด ON A WORK SESSION THE RULE IS "STOP WHEN IDLE", NOT "STOP AFTER THE TURN" (OPE-2341, placement ยง2.9).
|
|
5
|
+
// In the three-tier shape the WORK SESSION (W) owns the conversation's sandbox, and every job of the
|
|
6
|
+
// conversation runs in it. A W turn can end while W still owes a job: a job forwarded and not yet
|
|
7
|
+
// started, or a task whose settlement has not run yet. The session-local live set does not see the
|
|
8
|
+
// first, so the old rule stopped the VM under a job that was about to run in it. So on W the stop also
|
|
9
|
+
// needs W's DURABLE ledger to owe nothing (core channels/work-generation.ts `workSessionSandboxState`).
|
|
10
|
+
// The rule for every other session is unchanged: a seat has no sandbox of its own, and a two-tier seat
|
|
11
|
+
// keeps the stop after its turn. `timeoutMs` stays the fuse, so on W it is the longest a JOB may hold
|
|
12
|
+
// the VM, not the longest turn.
|
|
3
13
|
import { defineHook } from "eve/hooks";
|
|
4
|
-
import { bindFrom, domainKeyOf, resolvePartition, appendUsageEvent, usageForSession, recordSpend, periodOf, estimateSandboxCostUsd, routineIdOf, turnSurfaceMode, getSettings, isSubagentChildContext, liveTaskIds, subagentParentSessionId } from "@open-everywhere/core/agent/adapter-api.js";
|
|
14
|
+
import { bindFrom, domainKeyOf, resolvePartition, appendUsageEvent, usageForSession, recordSpend, periodOf, estimateSandboxCostUsd, routineIdOf, turnSurfaceMode, getSettings, isSubagentChildContext, liveTaskIds, subagentParentSessionId, workSessionSandboxState } from "@open-everywhere/core/agent/adapter-api.js";
|
|
5
15
|
import { resolveSandboxStopper, shouldStop } from "./backend-stop.js";
|
|
6
16
|
// Re-exported so the one "is this sandbox up?" predicate and the one listing shape stay
|
|
7
17
|
// single-homed in backend-stop.ts while their existing import sites keep working
|
|
@@ -106,6 +116,15 @@ async function onTurnEnd(ctx, outcome) {
|
|
|
106
116
|
`[${holding.join(", ")}]; the next turn end that finds none sweeps it`);
|
|
107
117
|
return;
|
|
108
118
|
}
|
|
119
|
+
// ๐ด OPE-2341 โ A WORK SESSION STOPS ITS SANDBOX ONLY WHEN IDLE (see the file header). Fail-closed:
|
|
120
|
+
// an unreadable ledger reads as busy, and the VM then idles to its fuse instead of dying under a job.
|
|
121
|
+
const work = await workSessionSandboxState(ctx);
|
|
122
|
+
if (work.work && !work.idle) {
|
|
123
|
+
log(`turn.${outcome}: SKIPPED the stop โ this work session is not idle` +
|
|
124
|
+
(work.owed.length > 0 ? `: it still owes ${work.owed.length} job(s) or task(s) [${work.owed.join(", ")}]` : ": its ledger could not be read") +
|
|
125
|
+
"; the turn end that finds it idle sweeps it");
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
109
128
|
const stopped = await stopSessionSandboxes(ctx.session.id, stopper);
|
|
110
129
|
if (stopped.length > 0) {
|
|
111
130
|
log(`turn.${outcome}: stopped ${stopped.map((s) => s.name).join(", ")} (auto-snapshot; next turn auto-resumes)`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel-lifecycle.js","sourceRoot":"","sources":["../../../agent/sandbox/vercel-lifecycle.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,4GAA4G;
|
|
1
|
+
{"version":3,"file":"vercel-lifecycle.js","sourceRoot":"","sources":["../../../agent/sandbox/vercel-lifecycle.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,4GAA4G;AAC5G,EAAE;AACF,2GAA2G;AAC3G,qGAAqG;AACrG,kGAAkG;AAClG,mGAAmG;AACnG,uGAAuG;AACvG,wGAAwG;AACxG,uGAAuG;AACvG,sGAAsG;AACtG,gCAAgC;AAEhC,OAAO,EAAE,UAAU,EAAoB,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,sBAAsB,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,sBAAsB,EAAE,WAAW,EAAE,uBAAuB,EAAE,uBAAuB,EAAwB,MAAM,4CAA4C,CAAC;AAC/U,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAA4C,MAAM,mBAAmB,CAAC;AAEhH,wFAAwF;AACxF,iFAAiF;AACjF,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAA4C,CAAC;AAEhE,SAAS,GAAG,CAAC,GAAW;IACtB,OAAO,CAAC,GAAG,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC;AAC5D,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D,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,qFAAqF;gBACrF,kFAAkF;gBAClF,oFAAoF;gBACpF,GAAG,CAAC,2CAA2C,CAAC,CAAC,IAAI,sEAAsE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC5I,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,4DAA4D,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;AACH,CAAC;AAED,eAAe,UAAU,CAAC;IACxB,MAAM,EAAE;QACN,oFAAoF;QACpF,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC;QACpE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC;QAC9D,mFAAmF;QACnF,mFAAmF;QACnF,+EAA+E;QAC/E,mBAAmB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,mBAAmB,CAAC;QAC/E,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,gBAAgB,CAAC;KAC1E;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-everywhere/adapters",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Open Everywhere adapters โ the reference Vercel-hosted backends: AI Gateway models and pricing, Sandbox, Blob, Neon, OpenTelemetry, AWS and Okta.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -149,6 +149,10 @@
|
|
|
149
149
|
"types": "./dist/agent/postgres/neon.d.ts",
|
|
150
150
|
"default": "./dist/agent/postgres/neon.js"
|
|
151
151
|
},
|
|
152
|
+
"./agent/register-defaults.js": {
|
|
153
|
+
"types": "./dist/agent/register-defaults.d.ts",
|
|
154
|
+
"default": "./dist/agent/register-defaults.js"
|
|
155
|
+
},
|
|
152
156
|
"./agent/sandbox/backend-stop.js": {
|
|
153
157
|
"types": "./dist/agent/sandbox/backend-stop.d.ts",
|
|
154
158
|
"default": "./dist/agent/sandbox/backend-stop.js"
|
|
@@ -188,19 +192,20 @@
|
|
|
188
192
|
"test:model-gateway": "tsx scripts/model-gateway-test.ts",
|
|
189
193
|
"test:dream-judge-gateway": "tsx scripts/dream-judge-gateway-test.ts",
|
|
190
194
|
"test:approval-judge-gateway": "tsx scripts/approval-judge-gateway-test.ts",
|
|
191
|
-
"test:gateway-vision": "tsx scripts/gateway-vision-test.ts"
|
|
195
|
+
"test:gateway-vision": "tsx scripts/gateway-vision-test.ts",
|
|
196
|
+
"test:default-adapters": "tsx scripts/default-adapters-test.ts"
|
|
192
197
|
},
|
|
193
198
|
"dependencies": {
|
|
194
199
|
"@neondatabase/serverless": "^1.1.0",
|
|
195
|
-
"@open-everywhere/core": "0.
|
|
200
|
+
"@open-everywhere/core": "0.3.0",
|
|
196
201
|
"@vercel/blob": "^2.6.1",
|
|
197
202
|
"@vercel/otel": "^2.1.3",
|
|
198
203
|
"@vercel/sandbox": "^3.2.1",
|
|
199
|
-
"ai": "^7.0.
|
|
204
|
+
"ai": "^7.0.105"
|
|
200
205
|
},
|
|
201
206
|
"peerDependencies": {
|
|
202
207
|
"@agent-browser/eve": "0.32.4",
|
|
203
|
-
"eve": "0.
|
|
208
|
+
"eve": "0.71.0"
|
|
204
209
|
},
|
|
205
210
|
"devDependencies": {
|
|
206
211
|
"@types/node": "latest",
|