replicas-engine 0.1.685 → 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-CTILMS27.js → chunk-X6R4RI77.js} +21 -8
- 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
|
@@ -2175,7 +2175,7 @@ If none of these apply, don't upload.
|
|
|
2175
2175
|
|
|
2176
2176
|
\`replicas media upload\` is always the first delivery action. When the current task has an external destination, every other delivery step follows only after that command succeeds. For every file:
|
|
2177
2177
|
|
|
2178
|
-
1. First, run \`replicas media upload\` with the original file. Do not begin any destination upload until the command succeeds. This creates the canonical dashboard copy and prints
|
|
2178
|
+
1. First, run \`replicas media upload\` with the original file. Do not begin any destination upload until the command succeeds. This creates the canonical dashboard copy and prints a chat embed plus a per-file dashboard link. With public access, the printed Forge embed is the chat embed and is also safe to use on GitHub.
|
|
2179
2179
|
2. Include the printed embed line in the Replicas chat reply, followed by the matching **View in Replicas** link. HTML uses its printed page link instead of an image embed.
|
|
2180
2180
|
3. Identify every destination in the task and attempt to upload the same original bytes there. Use the destination's inline representation from the table below; do not replace the file with a Replicas link.
|
|
2181
2181
|
4. Put the **View in Replicas** dashboard link next to the destination embed as a secondary link.
|
|
@@ -2215,10 +2215,11 @@ replicas media upload /tmp/before.png /tmp/after.png --name "Before fix" --name
|
|
|
2215
2215
|
|
|
2216
2216
|
Names are normalized to hyphen-case (spaces become hyphens, e.g. \`Login page\` is stored as \`login-page\`). Give every asset a **distinct** name \u2014 duplicates are not rejected, but Replicas keeps the first as-is and adds a \`-1\`, \`-2\` suffix to later collisions, which produces confusing lists, so pick unique names yourself.
|
|
2217
2217
|
|
|
2218
|
-
For each media file, the CLI prints
|
|
2218
|
+
For each media file, the CLI prints an embed line and a dashboard link:
|
|
2219
2219
|
|
|
2220
|
-
1.
|
|
2221
|
-
2. \`
|
|
2220
|
+
1. Default and organization access print \`Replicas chat embed: \`; this authenticated URL renders inline in Replicas chat **only** \u2014 see below.
|
|
2221
|
+
2. Public access (\`--access public\` or \`--share\`) prints \`\` as the Forge embed instead. This is the public, stable bearer URL to paste into GitHub.
|
|
2222
|
+
3. \`View in Replicas: <deep-link>\` is a per-file dashboard URL of the form \`https://replicas.dev/workspaces/<workspace-id>?media=<media-id>\` that opens directly to that specific file.
|
|
2222
2223
|
|
|
2223
2224
|
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
2224
2225
|
|
|
@@ -2238,7 +2239,7 @@ Use public access only when the media must render without Replicas authenticatio
|
|
|
2238
2239
|
replicas media upload screenshot.png --name "Login page" --access public
|
|
2239
2240
|
\`\`\`
|
|
2240
2241
|
|
|
2241
|
-
\`--share\` remains an alias for \`--access public\`. Public access prints
|
|
2242
|
+
\`--share\` remains an alias for \`--access public\`. Public access prints the raw \`Forge embed\` Markdown instead of the authenticated chat-only embed for image, video, or audio media, backed by an opt-in bearer URL. Anyone with that unguessable URL can view the asset until it is rotated or revoked. HTML pages only support organization access. Use \`replicas media share <media-id>\` to rotate a public media URL and \`replicas media revoke <media-id>\` to revoke it.
|
|
2242
2243
|
|
|
2243
2244
|
## The URLs the CLI gives you \u2014 and where each one is allowed
|
|
2244
2245
|
|
|
@@ -2246,7 +2247,7 @@ replicas media upload screenshot.png --name "Login page" --access public
|
|
|
2246
2247
|
|---|---|---|
|
|
2247
2248
|
| \`https://api.replicas.dev/v1/media/<id>\` (inside \`\`) | Authenticated API redirect to a presigned blob \u2014 requires the Replicas chat session | **Only** in the Replicas chat reply. Nowhere else. |
|
|
2248
2249
|
| \`https://replicas.dev/organizations/<organization-id>/media/<media-id>\` | Organization-only page printed by \`--access organization\` | Pull requests and other places where every viewer belongs to the Replicas organization. |
|
|
2249
|
-
| \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | GitHub embeds for image, video, or audio media. |
|
|
2250
|
+
| \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | The Replicas chat reply and GitHub embeds, for image, video, or audio media. |
|
|
2250
2251
|
| \`https://replicas.dev/workspaces/<workspace-id>?media=<media-id>\` | Authenticated dashboard deep link that opens the media file in the workspace | Everywhere external: Slack, GitHub, GitLab, Linear, PR bodies, comments, emails. |
|
|
2251
2252
|
|
|
2252
2253
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
@@ -2585,6 +2586,7 @@ Use this when:
|
|
|
2585
2586
|
- The user asks to discover which external services are connected
|
|
2586
2587
|
- The user asks to create or control an E2B sandbox
|
|
2587
2588
|
- The user asks to invoke a connected Modal function
|
|
2589
|
+
- The user asks to access Vercel projects, deployments, domains, logs, or infrastructure
|
|
2588
2590
|
- The user asks to query or update a connected turbopuffer namespace
|
|
2589
2591
|
- The user asks for PlanetScale organizations, databases, branches, or Insights data
|
|
2590
2592
|
- The user asks to analyze text with Pangram`;
|
|
@@ -2652,6 +2654,17 @@ const databases = await replicas.planetscale.request('/organizations/acme/databa
|
|
|
2652
2654
|
|
|
2653
2655
|
OAuth scopes control permitted operations. Confirm mutations before using POST, PUT, PATCH, or DELETE.
|
|
2654
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
|
+
|
|
2655
2668
|
## Modal
|
|
2656
2669
|
|
|
2657
2670
|
Modal is a native integration and uses its official JavaScript SDK behind the Replicas gateway. Invoke a deployed function by name:
|
|
@@ -3733,7 +3746,7 @@ var EXPLICIT_PLUGIN_CATALOG = [
|
|
|
3733
3746
|
},
|
|
3734
3747
|
{
|
|
3735
3748
|
id: "vercel",
|
|
3736
|
-
backend: "
|
|
3749
|
+
backend: "native",
|
|
3737
3750
|
toolkit: "vercel",
|
|
3738
3751
|
authType: "api_key",
|
|
3739
3752
|
category: "data",
|
|
@@ -6742,7 +6755,7 @@ var DEFAULT_CODEX_ARGS = [
|
|
|
6742
6755
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
6743
6756
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
6744
6757
|
var codexCliVersionEnsured = null;
|
|
6745
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
6758
|
+
var ENGINE_PACKAGE_VERSION = "0.1.687";
|
|
6746
6759
|
var INITIALIZE_METHOD = "initialize";
|
|
6747
6760
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
6748
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>;
|