@weaccelerateinc/agent-sdk 0.12.0 → 0.13.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/README.md +6 -4
- package/approved-extension-releases/0.0.0.1.json +2 -1
- package/approved-extension-releases/0.0.0.2.json +2 -1
- package/approved-extension.js +1 -1
- package/browser-use-host.d.ts +4 -4
- package/browser-use-host.js +12 -20
- package/index.d.ts +5 -1
- package/package.json +1 -1
- package/partner-starter/README.md +3 -3
- package/partner-starter/package.json +1 -1
- package/partner-starter/synthetic.mjs +1 -1
- package/starter/README.md +2 -2
- package/starter/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
# @weaccelerateinc/agent-sdk 0.
|
|
1
|
+
# @weaccelerateinc/agent-sdk 0.13.0
|
|
2
2
|
|
|
3
|
-
SDK 0.
|
|
3
|
+
SDK 0.13.0 lets authenticated integrations attach their customer-owned Browser Use browser without a separate merchant opt-in or an inventory of other installed extensions. Accelerate verifies its own extension, ownership and run binding. The run-created flow remains fill-only with private verification, durable scheduling/viewer fences, replay protection and cleanup. The approved extension ZIP is unchanged; its compatibility metadata includes 0.13.0.
|
|
4
|
+
|
|
5
|
+
Apply required migration 004 and deploy the matching wallet/gateway and reaper before the managed service, then install this SDK. SDK 0.12.0 retains its original opt-in and inventory checks. The customer controls its browser and other extensions; Accelerate does not claim isolation from them.
|
|
4
6
|
|
|
5
7
|
Version 0.11.0 is a breaking release: **Accelerate never sends the final payment click.** A purchase arms one short click, the customer's agent performs it once through its own browser connection (`BrowserConnectorHost.performFinalClick`) in the customer's existing browser, then Accelerate observes the outcome. Purchase requires `final_click_actor:'customer'` and that host; the managed Kernel browser is fill-only. `client.checkouts.submit` rejects locally with `customer_click_required`. See [customer-owned final click](../../docs/customer-final-click.md). Release 0.10.3 keeps its existing behavior. Merchant layouts remain limited to the qualified sandbox page; this SDK release does not by itself qualify any merchant layout, a service deployment or production payments.
|
|
6
8
|
|
|
7
|
-
Server-only ESM SDK with TypeScript declarations, Node 22+, zero runtime dependencies. New partners use their existing browser and explicitly select `managed_review_v2`, which continues an armed fill immediately after private CVV verification. Existing callers keep `managed_review_v1` unless they opt in. Public npm releases use `@weaccelerateinc/agent-sdk`; install an exact available version with `npm install @weaccelerateinc/agent-sdk@0.
|
|
9
|
+
Server-only ESM SDK with TypeScript declarations, Node 22+, zero runtime dependencies. New partners use their existing browser and explicitly select `managed_review_v2`, which continues an armed fill immediately after private CVV verification. Existing callers keep `managed_review_v1` unless they opt in. Public npm releases use `@weaccelerateinc/agent-sdk`; install an exact available version with `npm install @weaccelerateinc/agent-sdk@0.13.0`. Check `npm view @weaccelerateinc/agent-sdk@0.13.0 version` to confirm registry availability. The package remains `UNLICENSED`.
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
|
-
npm install --ignore-scripts @weaccelerateinc/agent-sdk@0.
|
|
12
|
+
npm install --ignore-scripts @weaccelerateinc/agent-sdk@0.13.0
|
|
11
13
|
npx --no-install accelerate-agent init ./partner-demo --browser existing
|
|
12
14
|
```
|
|
13
15
|
|
package/approved-extension.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
|
|
3
|
-
const SDK_VERSION = '0.
|
|
3
|
+
const SDK_VERSION = '0.13.0';
|
|
4
4
|
const EXECUTOR_CONTRACT = 'accelerate_manual_checkout_v1';
|
|
5
5
|
const BRIDGE_PROTOCOL = 'accelerate_extension_bridge_v1';
|
|
6
6
|
const LEGACY_SHA256 = '65574cbb27ab344687963f72a136f2653551b57458b284e486946b27699099c8';
|
package/browser-use-host.d.ts
CHANGED
|
@@ -42,14 +42,14 @@ export function createBrowserUseHost(options: {
|
|
|
42
42
|
merchantId: string;
|
|
43
43
|
extensionId: string;
|
|
44
44
|
/** Primary runtime ID pinned in durable operator installation configuration.
|
|
45
|
-
* Required
|
|
45
|
+
* Required when the resolved browser has run provenance; stable across host restarts. */
|
|
46
46
|
extensionRuntimeId?: string;
|
|
47
47
|
extensionRelease: ApprovedExtensionRelease;
|
|
48
48
|
host: BrowserUsePlatformHost;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
49
|
+
/** @deprecated Ignored. Run-created browsers require a durable owned reservation,
|
|
50
|
+
* a pinned extensionRuntimeId and a fence covering all session runs and queued work. */
|
|
51
51
|
allowRunCreatedBrowsers?: boolean;
|
|
52
|
-
/**
|
|
52
|
+
/** @deprecated Ignored. The customer manages its other browser extensions. */
|
|
53
53
|
additionalExtensions?: ReadonlyArray<Readonly<{ id: string; runtimeId: string; version: string }>>;
|
|
54
54
|
fetchImpl?: typeof fetch;
|
|
55
55
|
/** Test clock only. */
|
package/browser-use-host.js
CHANGED
|
@@ -45,23 +45,14 @@ const freeze = value => {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export function createBrowserUseHost(configuration = {}) {
|
|
48
|
+
// Legacy opt-in and extension-inventory options remain accepted but have no effect.
|
|
48
49
|
exact(configuration, ['apiKey', 'merchantId', 'extensionId', 'extensionRelease', 'host'], ['fetchImpl', 'now', 'allowRunCreatedBrowsers', 'additionalExtensions', 'extensionRuntimeId']);
|
|
49
|
-
const { apiKey, merchantId, extensionId, host, fetchImpl = fetch, now = Date.now,
|
|
50
|
-
allowRunCreatedBrowsers = false, additionalExtensions = [], extensionRuntimeId } = configuration;
|
|
50
|
+
const { apiKey, merchantId, extensionId, host, fetchImpl = fetch, now = Date.now, extensionRuntimeId } = configuration;
|
|
51
51
|
check(typeof apiKey === 'string' && apiKey.length >= 16 && apiKey.length <= 500 && !/[\u0000-\u0020\u007f]/u.test(apiKey) &&
|
|
52
52
|
UUID.test(merchantId) && UUID.test(extensionId) && typeof fetchImpl === 'function' && typeof now === 'function' && host &&
|
|
53
53
|
['resolveOwnedBrowser', 'drainAndFence', 'bindCheckout', 'resolveCheckoutBrowser', 'inspectDocument', 'confirmLocalCleanup']
|
|
54
54
|
.every(key => typeof host[key] === 'function'), 'configuration_invalid');
|
|
55
|
-
check(typeof allowRunCreatedBrowsers === 'boolean' && Array.isArray(additionalExtensions) && additionalExtensions.length <= 2, 'configuration_invalid');
|
|
56
55
|
check(extensionRuntimeId === undefined || RUNTIME.test(extensionRuntimeId), 'configuration_invalid');
|
|
57
|
-
check(!(allowRunCreatedBrowsers || additionalExtensions.length) || RUNTIME.test(extensionRuntimeId ?? ''), 'configuration_invalid');
|
|
58
|
-
const extensionIds = new Set([extensionId]), runtimes = new Set();
|
|
59
|
-
const extras = additionalExtensions.map(value => {
|
|
60
|
-
exact(value, ['id', 'runtimeId', 'version']);
|
|
61
|
-
check(UUID.test(value.id) && RUNTIME.test(value.runtimeId) && typeof value.version === 'string' &&
|
|
62
|
-
/^\d+(?:\.\d+){0,3}$/u.test(value.version) && !extensionIds.has(value.id) && !runtimes.has(value.runtimeId), 'configuration_invalid');
|
|
63
|
-
extensionIds.add(value.id); runtimes.add(value.runtimeId); return Object.freeze({ ...value });
|
|
64
|
-
});
|
|
65
56
|
let release;
|
|
66
57
|
try { release = validateApprovedExtensionRelease(configuration.extensionRelease); }
|
|
67
58
|
catch { throw new AccelerateError('configuration_invalid'); }
|
|
@@ -81,7 +72,8 @@ export function createBrowserUseHost(configuration = {}) {
|
|
|
81
72
|
catch { throw new AccelerateError('permission_denied'); }
|
|
82
73
|
let provenance;
|
|
83
74
|
if (Object.hasOwn(document.browser, 'provenance')) {
|
|
84
|
-
check(
|
|
75
|
+
check(RUNTIME.test(extensionRuntimeId ?? ''), 'configuration_invalid');
|
|
76
|
+
check(!cleanup || typeof document.fence_id === 'string' && document.fence_id.length > 0, 'permission_denied');
|
|
85
77
|
try { provenance = browserUseRunProvenance(document.browser.provenance); }
|
|
86
78
|
catch { throw new AccelerateError('permission_denied'); }
|
|
87
79
|
}
|
|
@@ -139,23 +131,23 @@ export function createBrowserUseHost(configuration = {}) {
|
|
|
139
131
|
metadata.accelerate_extension_sha256 === release.artifact.sha256 && metadata.accelerate_extension_version === release.extension_version) &&
|
|
140
132
|
typeof value.timeoutAt === 'string' && Number.isFinite(Date.parse(value.timeoutAt)) &&
|
|
141
133
|
(requiredStatus === 'stopped' || Date.parse(value.timeoutAt) > now()) &&
|
|
142
|
-
Array.isArray(value.extensions)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const primary =
|
|
146
|
-
check(primary
|
|
147
|
-
|
|
134
|
+
Array.isArray(value.extensions));
|
|
135
|
+
const primaries = value.extensions.filter(item => item?.id === extensionId);
|
|
136
|
+
check(primaries.length === 1);
|
|
137
|
+
const primary = primaries[0];
|
|
138
|
+
check(primary.version === release.extension_version && RUNTIME.test(primary.runtimeId ?? '') &&
|
|
139
|
+
!value.extensions.some(item => item !== primary && item?.runtimeId === primary.runtimeId));
|
|
148
140
|
check(extensionRuntimeId === undefined || primary.runtimeId === extensionRuntimeId);
|
|
149
141
|
// Deliberately project away provider CDP/viewer URLs and unknown response fields.
|
|
150
142
|
const read = freeze({ expires_at: value.timeoutAt, runtime_id: primary.runtimeId });
|
|
151
143
|
if (!options.withConnection) return read;
|
|
152
144
|
check(typeof value.cdpUrl === 'string' && value.cdpUrl.length <= 2048 && typeof value.startedAt === 'string');
|
|
153
145
|
return freeze({ ...read, connection: freeze({ id: value.id, status: value.status, cdpUrl: value.cdpUrl, startedAt: value.startedAt,
|
|
154
|
-
timeoutAt: value.timeoutAt, recordingAvailable: false,
|
|
146
|
+
timeoutAt: value.timeoutAt, recordingAvailable: false, accelerate_extension_id: extensionId,
|
|
155
147
|
metadata: binding.provenance ? {} : Object.fromEntries(['accelerate_merchant_id', 'accelerate_owner_user_id',
|
|
156
148
|
'accelerate_workspace_id', 'accelerate_custody_mode', 'accelerate_agent_extension_id',
|
|
157
149
|
'accelerate_extension_sha256', 'accelerate_extension_version'].map(key => [key, metadata[key]])),
|
|
158
|
-
extensions:
|
|
150
|
+
extensions: [{ id: extensionId, runtimeId: primary.runtimeId, version: primary.version }],
|
|
159
151
|
...runEvidence }) });
|
|
160
152
|
} catch {
|
|
161
153
|
throw new AccelerateError(options.signal?.aborted ? 'request_cancelled' : 'integration_unavailable');
|
package/index.d.ts
CHANGED
|
@@ -166,9 +166,13 @@ export interface CreateCheckout {
|
|
|
166
166
|
* Send it on every create. It is held in memory for this checkout and never stored. */
|
|
167
167
|
browser_resource?: ClientBrowserResource;
|
|
168
168
|
}
|
|
169
|
-
/**
|
|
169
|
+
/** Private projection of Browser Use `GET /api/v4/browsers/{id}`, with the
|
|
170
|
+
* Accelerate extension selected by the authenticated backend. */
|
|
170
171
|
export interface ClientBrowserResource {
|
|
171
172
|
id: string;
|
|
173
|
+
/** Accelerate extension selected from the backend's durable installation configuration.
|
|
174
|
+
* Other extensions in the customer-owned browser are outside this projection. */
|
|
175
|
+
accelerate_extension_id?: string;
|
|
172
176
|
status: 'active';
|
|
173
177
|
cdpUrl: string;
|
|
174
178
|
startedAt: string;
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Existing-browser payment starter
|
|
2
2
|
|
|
3
|
-
SDK 0.
|
|
3
|
+
SDK 0.13.0, explicit `managed_review_v2`, `customer_backend_trusted`. Newly generated existing-browser apps default to `purpose:'purchase'` with the submit tool enabled. The matching service must support this profile; publishing the SDK does not deploy the service or qualify a merchant layout. Your platform creates its browser and installs the approved extension. This starter attaches that same browser at payment; it never creates a replacement. The older `accelerate-agent init <dir>` starter still selects Accelerate-managed Kernel custody and its fill-only default.
|
|
4
4
|
|
|
5
5
|
## Run without credentials
|
|
6
6
|
|
|
7
|
-
Once Accelerate supplies the matching verified 0.
|
|
7
|
+
Once Accelerate supplies the matching verified 0.13.0 archive, install it, then:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx --no-install accelerate-agent init ./partner-demo --browser existing
|
|
11
11
|
cd partner-demo
|
|
12
|
-
npm install /secure/downloads/weaccelerateinc-agent-sdk-0.
|
|
12
|
+
npm install /secure/downloads/weaccelerateinc-agent-sdk-0.13.0.tgz
|
|
13
13
|
npm test
|
|
14
14
|
npm run smoke
|
|
15
15
|
```
|
|
@@ -225,7 +225,7 @@ export function createSyntheticDependencies({ purpose = 'sandbox_fill_only', pro
|
|
|
225
225
|
artifact: { format: 'zip', sha256: 'a'.repeat(64), bytes: 1234 },
|
|
226
226
|
bridge: { protocol: 'accelerate_extension_bridge_v1', sha256: 'b'.repeat(64) },
|
|
227
227
|
capabilities: { manual_card_fill: true, document_bound_single_use: true, autosave_disabled: true, automatic_submit: false, maximum_retention_ms: 480000 },
|
|
228
|
-
compatibility: { sdk_versions: ['0.10.1', '0.10.2', '0.10.3', '0.10.4', '0.11.0', '0.12.0'], executor_contract: 'accelerate_manual_checkout_v1' },
|
|
228
|
+
compatibility: { sdk_versions: ['0.10.1', '0.10.2', '0.10.3', '0.10.4', '0.11.0', '0.12.0', '0.13.0'], executor_contract: 'accelerate_manual_checkout_v1' },
|
|
229
229
|
qualifications: [{ provider: 'connector', scope: 'synthetic_only', evidence: 'docs/evidence/synthetic-starter.json' }],
|
|
230
230
|
}; // Fake metadata for this in-process fixture only; never load it in live mode.
|
|
231
231
|
const browser = { owner: context, browser: { provider: 'connector', connector_id: 'synthetic_cdp', browser_id: 'existing:browser:1', custody_mode: 'customer_backend_trusted' },
|
package/starter/README.md
CHANGED
|
@@ -6,12 +6,12 @@ The default runnable mode is **synthetic**. It uses the real SDK, managed MCP ad
|
|
|
6
6
|
|
|
7
7
|
## Install and run
|
|
8
8
|
|
|
9
|
-
Requires Node.js 22 or newer. Install the exact SDK 0.
|
|
9
|
+
Requires Node.js 22 or newer. Install the exact SDK 0.13.0 archive and checksum supplied by Accelerate; [release distribution](https://github.com/weaccelerateinc/accelerate/blob/main/products/agent-sdk/docs/releases.md) records verified availability. Do not assume npm publication.
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
npx --no-install accelerate-agent init ./accelerate-demo
|
|
13
13
|
cd accelerate-demo
|
|
14
|
-
npm install /absolute/path/to/
|
|
14
|
+
npm install /absolute/path/to/weaccelerateinc-agent-sdk-0.13.0.tgz
|
|
15
15
|
npm test
|
|
16
16
|
npm run smoke
|
|
17
17
|
```
|
package/starter/package.json
CHANGED