replicas-engine 0.1.686 → 0.1.687
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/dist/src/{chunk-SC7MWNN2.js → chunk-X6R4RI77.js} +14 -2
- package/dist/src/headless-agent.js +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
- package/workspace-sdk/index.js +3 -1
- package/workspace-sdk/index.test.ts +23 -0
- package/workspace-sdk/shared/routes/plugin-catalog.d.ts +1 -1
- package/workspace-sdk/shared/workspace-sdk.d.ts +3 -0
|
@@ -2586,6 +2586,7 @@ Use this when:
|
|
|
2586
2586
|
- The user asks to discover which external services are connected
|
|
2587
2587
|
- The user asks to create or control an E2B sandbox
|
|
2588
2588
|
- The user asks to invoke a connected Modal function
|
|
2589
|
+
- The user asks to access Vercel projects, deployments, domains, logs, or infrastructure
|
|
2589
2590
|
- The user asks to query or update a connected turbopuffer namespace
|
|
2590
2591
|
- The user asks for PlanetScale organizations, databases, branches, or Insights data
|
|
2591
2592
|
- The user asks to analyze text with Pangram`;
|
|
@@ -2653,6 +2654,17 @@ const databases = await replicas.planetscale.request('/organizations/acme/databa
|
|
|
2653
2654
|
|
|
2654
2655
|
OAuth scopes control permitted operations. Confirm mutations before using POST, PUT, PATCH, or DELETE.
|
|
2655
2656
|
|
|
2657
|
+
## Vercel
|
|
2658
|
+
|
|
2659
|
+
Vercel is a native access-token integration. Pass a relative path from the Vercel REST API, including a \`teamId\` query parameter for team-owned resources:
|
|
2660
|
+
|
|
2661
|
+
\`\`\`ts
|
|
2662
|
+
const projects = await replicas.vercel.request('/v9/projects?teamId=team_123');
|
|
2663
|
+
const deployments = await replicas.vercel.request('/v6/deployments?teamId=team_123');
|
|
2664
|
+
\`\`\`
|
|
2665
|
+
|
|
2666
|
+
Confirm mutations before using POST, PUT, PATCH, or DELETE.
|
|
2667
|
+
|
|
2656
2668
|
## Modal
|
|
2657
2669
|
|
|
2658
2670
|
Modal is a native integration and uses its official JavaScript SDK behind the Replicas gateway. Invoke a deployed function by name:
|
|
@@ -3734,7 +3746,7 @@ var EXPLICIT_PLUGIN_CATALOG = [
|
|
|
3734
3746
|
},
|
|
3735
3747
|
{
|
|
3736
3748
|
id: "vercel",
|
|
3737
|
-
backend: "
|
|
3749
|
+
backend: "native",
|
|
3738
3750
|
toolkit: "vercel",
|
|
3739
3751
|
authType: "api_key",
|
|
3740
3752
|
category: "data",
|
|
@@ -6743,7 +6755,7 @@ var DEFAULT_CODEX_ARGS = [
|
|
|
6743
6755
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
6744
6756
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
6745
6757
|
var codexCliVersionEnsured = null;
|
|
6746
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
6758
|
+
var ENGINE_PACKAGE_VERSION = "0.1.687";
|
|
6747
6759
|
var INITIALIZE_METHOD = "initialize";
|
|
6748
6760
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
6749
6761
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
package/workspace-sdk/index.js
CHANGED
|
@@ -116,6 +116,8 @@ const turbopuffer = {
|
|
|
116
116
|
|
|
117
117
|
const planetscale = providerClient('/v1/engine/planetscale/api');
|
|
118
118
|
|
|
119
|
+
const vercel = providerClient('/v1/engine/vercel/api');
|
|
120
|
+
|
|
119
121
|
const pangramRequest = (operation, input) =>
|
|
120
122
|
request('/v1/engine/pangram', { method: 'POST', body: { operation, ...input } });
|
|
121
123
|
const pangram = {
|
|
@@ -132,5 +134,5 @@ const e2b = {
|
|
|
132
134
|
kill: (sandboxId) => request('/v1/engine/e2b', { method: 'POST', body: { operation: 'kill', sandboxId } }),
|
|
133
135
|
};
|
|
134
136
|
|
|
135
|
-
export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, pangram, planetscale, turbopuffer, e2b };
|
|
137
|
+
export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, pangram, planetscale, vercel, turbopuffer, e2b };
|
|
136
138
|
export default replicas;
|
|
@@ -161,6 +161,29 @@ describe('@replicas/sdk', () => {
|
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
|
|
164
|
+
test('calls Vercel through the workspace gateway', async () => {
|
|
165
|
+
let observed: { path: string; body: unknown } | null = null;
|
|
166
|
+
const server = Bun.serve({
|
|
167
|
+
port: 0,
|
|
168
|
+
async fetch(request) {
|
|
169
|
+
observed = { path: new URL(request.url).pathname, body: await request.json() };
|
|
170
|
+
return Response.json({ projects: [] });
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
process.env.REPLICAS_MONOLITH_URL = server.url.toString().replace(/\/$/, '');
|
|
174
|
+
process.env.REPLICAS_ENGINE_SECRET = 'engine-secret';
|
|
175
|
+
process.env.REPLICAS_WORKSPACE_ID = 'workspace-1';
|
|
176
|
+
try {
|
|
177
|
+
await replicas.vercel.request('/v9/projects?teamId=team_1');
|
|
178
|
+
expect(observed).toEqual({
|
|
179
|
+
path: '/v1/engine/vercel/api',
|
|
180
|
+
body: { path: '/v9/projects?teamId=team_1' },
|
|
181
|
+
});
|
|
182
|
+
} finally {
|
|
183
|
+
server.stop(true);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
164
187
|
test('runs E2B commands through the workspace gateway', async () => {
|
|
165
188
|
let observed: { path: string; body: unknown } | null = null;
|
|
166
189
|
const server = Bun.serve({
|
|
@@ -139,7 +139,7 @@ export declare const PLUGIN_CATALOG: readonly [{
|
|
|
139
139
|
readonly description: "Analyze text for AI generation and plagiarism signals.";
|
|
140
140
|
}, {
|
|
141
141
|
readonly id: "vercel";
|
|
142
|
-
readonly backend: "
|
|
142
|
+
readonly backend: "native";
|
|
143
143
|
readonly toolkit: "vercel";
|
|
144
144
|
readonly authType: "api_key";
|
|
145
145
|
readonly category: "data";
|
|
@@ -60,6 +60,9 @@ export interface ReplicasSdk {
|
|
|
60
60
|
planetscale: {
|
|
61
61
|
request<T = unknown>(path: string, options?: ProviderRequestOptions): Promise<T>;
|
|
62
62
|
};
|
|
63
|
+
vercel: {
|
|
64
|
+
request<T = unknown>(path: string, options?: ProviderRequestOptions): Promise<T>;
|
|
65
|
+
};
|
|
63
66
|
pangram: {
|
|
64
67
|
detect<T = unknown>(input: import('./routes/plugins').PangramAnalyzeRequest): Promise<T>;
|
|
65
68
|
plagiarism<T = unknown>(text: string): Promise<T>;
|