replicas-engine 0.1.624 → 0.1.625
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/index.js
CHANGED
|
@@ -2101,6 +2101,7 @@ Use this when:
|
|
|
2101
2101
|
- The user asks for ClickHouse analytics or PostHog product data
|
|
2102
2102
|
- The user asks to invoke a connected Modal function
|
|
2103
2103
|
- The user asks to query or update a connected turbopuffer namespace
|
|
2104
|
+
- The user asks to analyze text with Pangram
|
|
2104
2105
|
- The user asks for Stripe customers, payments, invoices, subscriptions, or balances`;
|
|
2105
2106
|
var REFERENCE9 = `# Plugins
|
|
2106
2107
|
|
|
@@ -2183,6 +2184,17 @@ const results = await replicas.turbopuffer.query('products', {
|
|
|
2183
2184
|
\`\`\`
|
|
2184
2185
|
|
|
2185
2186
|
\`write\` mutates namespace data. Confirm the requested change before calling it.
|
|
2187
|
+
|
|
2188
|
+
## Pangram
|
|
2189
|
+
|
|
2190
|
+
Pangram is a native integration. Text sent to either method is processed by Pangram and consumes the connected account's credits:
|
|
2191
|
+
|
|
2192
|
+
\`\`\`ts
|
|
2193
|
+
const detection = await replicas.pangram.detect({ text });
|
|
2194
|
+
const plagiarism = await replicas.pangram.plagiarism(text);
|
|
2195
|
+
\`\`\`
|
|
2196
|
+
|
|
2197
|
+
Do not send private or sensitive text without the user's authorization.
|
|
2186
2198
|
`;
|
|
2187
2199
|
var PLUGINS_ABILITY = {
|
|
2188
2200
|
label: "Plugins",
|
|
@@ -10948,7 +10960,7 @@ var DEFAULT_CODEX_ARGS = [
|
|
|
10948
10960
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
10949
10961
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
10950
10962
|
var codexCliVersionEnsured = null;
|
|
10951
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
10963
|
+
var ENGINE_PACKAGE_VERSION = "0.1.625";
|
|
10952
10964
|
var INITIALIZE_METHOD = "initialize";
|
|
10953
10965
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
10954
10966
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
package/package.json
CHANGED
package/workspace-sdk/index.js
CHANGED
|
@@ -117,5 +117,12 @@ const turbopuffer = {
|
|
|
117
117
|
write: (namespace, params) => turbopufferRequest('write', namespace, params),
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
const pangramRequest = (operation, input) =>
|
|
121
|
+
request('/v1/engine/pangram', { method: 'POST', body: { operation, ...input } });
|
|
122
|
+
const pangram = {
|
|
123
|
+
detect: (input) => pangramRequest('detect', input),
|
|
124
|
+
plagiarism: (text) => pangramRequest('plagiarism', { text }),
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, turbopuffer, pangram };
|
|
121
128
|
export default replicas;
|
|
@@ -138,3 +138,26 @@ describe('@replicas/sdk', () => {
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
|
+
|
|
142
|
+
test('analyzes text with Pangram through the workspace gateway', async () => {
|
|
143
|
+
let observed: { path: string; body: unknown } | null = null;
|
|
144
|
+
const server = Bun.serve({
|
|
145
|
+
port: 0,
|
|
146
|
+
async fetch(request) {
|
|
147
|
+
observed = { path: new URL(request.url).pathname, body: await request.json() };
|
|
148
|
+
return Response.json({ prediction_short: 'Human' });
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
process.env.REPLICAS_MONOLITH_URL = server.url.toString().replace(/\/$/, '');
|
|
152
|
+
process.env.REPLICAS_ENGINE_SECRET = 'engine-secret';
|
|
153
|
+
process.env.REPLICAS_WORKSPACE_ID = 'workspace-1';
|
|
154
|
+
try {
|
|
155
|
+
await replicas.pangram.detect({ text: 'Example text' });
|
|
156
|
+
expect(observed).toEqual({
|
|
157
|
+
path: '/v1/engine/pangram',
|
|
158
|
+
body: { operation: 'detect', text: 'Example text' },
|
|
159
|
+
});
|
|
160
|
+
} finally {
|
|
161
|
+
server.stop(true);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
@@ -98,6 +98,13 @@ export declare const PLUGIN_CATALOG: readonly [{
|
|
|
98
98
|
readonly category: "business";
|
|
99
99
|
readonly name: "Stripe";
|
|
100
100
|
readonly description: "Manage customers, payments, invoices, subscriptions, and balances.";
|
|
101
|
+
}, {
|
|
102
|
+
readonly id: "pangram";
|
|
103
|
+
readonly toolkit: "pangram";
|
|
104
|
+
readonly authType: "api_key";
|
|
105
|
+
readonly category: "data";
|
|
106
|
+
readonly name: "Pangram";
|
|
107
|
+
readonly description: "Analyze text for AI generation and plagiarism signals.";
|
|
101
108
|
}, {
|
|
102
109
|
readonly id: "vercel";
|
|
103
110
|
readonly toolkit: "vercel";
|
|
@@ -188,6 +195,10 @@ export interface PluginConnectResponse {
|
|
|
188
195
|
export interface PluginConnectionDeleteResponse {
|
|
189
196
|
success: boolean;
|
|
190
197
|
}
|
|
198
|
+
export interface PangramAnalyzeRequest {
|
|
199
|
+
text: string;
|
|
200
|
+
publicDashboardLink?: boolean;
|
|
201
|
+
}
|
|
191
202
|
export interface WorkspacePluginSummary extends PluginCatalogItem {
|
|
192
203
|
connected: boolean;
|
|
193
204
|
scope?: PluginScope;
|
|
@@ -57,4 +57,8 @@ export interface ReplicasSdk {
|
|
|
57
57
|
query<T = unknown>(namespace: string, params: Record<string, unknown>): Promise<T>;
|
|
58
58
|
write<T = unknown>(namespace: string, params: Record<string, unknown>): Promise<T>;
|
|
59
59
|
};
|
|
60
|
+
pangram: {
|
|
61
|
+
detect<T = unknown>(input: import('./routes/plugins').PangramAnalyzeRequest): Promise<T>;
|
|
62
|
+
plagiarism<T = unknown>(text: string): Promise<T>;
|
|
63
|
+
};
|
|
60
64
|
}
|