@alpic-ai/api 0.0.0-staging.g49200ce → 0.0.0-staging.g493703e
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/index.d.mts +5 -5
- package/dist/index.mjs +23 -14
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -5869,11 +5869,11 @@ await logger(() => Promise.resolve('bar'));
|
|
|
5869
5869
|
*/
|
|
5870
5870
|
type Promisable<T> = T | PromiseLike<T>;
|
|
5871
5871
|
//#endregion
|
|
5872
|
-
//#region ../../node_modules/.pnpm/@orpc+shared@1.15.
|
|
5872
|
+
//#region ../../node_modules/.pnpm/@orpc+shared@1.15.4_@opentelemetry+api@1.9.1/node_modules/@orpc/shared/dist/index.d.mts
|
|
5873
5873
|
type MaybeOptionalOptions<TOptions> = Record<never, never> extends TOptions ? [options?: TOptions] : [options: TOptions];
|
|
5874
5874
|
type Value<T, TArgs extends any[] = []> = T | ((...args: TArgs) => T);
|
|
5875
5875
|
//#endregion
|
|
5876
|
-
//#region ../../node_modules/.pnpm/@orpc+client@1.15.
|
|
5876
|
+
//#region ../../node_modules/.pnpm/@orpc+client@1.15.4_@opentelemetry+api@1.9.1/node_modules/@orpc/client/dist/index.d.mts
|
|
5877
5877
|
declare const COMMON_ORPC_ERROR_DEFS: {
|
|
5878
5878
|
readonly BAD_REQUEST: {
|
|
5879
5879
|
readonly status: 400;
|
|
@@ -5986,7 +5986,7 @@ declare class ORPCError<TCode extends ORPCErrorCode, TData> extends Error {
|
|
|
5986
5986
|
}
|
|
5987
5987
|
type ORPCErrorJSON<TCode extends string, TData> = Pick<ORPCError<TCode, TData>, 'defined' | 'code' | 'status' | 'message' | 'data'>;
|
|
5988
5988
|
//#endregion
|
|
5989
|
-
//#region ../../node_modules/.pnpm/@orpc+server@1.15.
|
|
5989
|
+
//#region ../../node_modules/.pnpm/@orpc+server@1.15.4_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/server/dist/shared/server.qKsRrdxW.d.mts
|
|
5990
5990
|
type Context = Record<PropertyKey, any>;
|
|
5991
5991
|
type ORPCErrorConstructorMapItemOptions<TData> = Omit<ORPCErrorOptions<TData>, 'defined' | 'status'>;
|
|
5992
5992
|
type ORPCErrorConstructorMapItem<TCode extends ORPCErrorCode, TInData> = (...rest: MaybeOptionalOptions<ORPCErrorConstructorMapItemOptions<TInData>>) => ORPCError<TCode, TInData>;
|
|
@@ -6057,7 +6057,7 @@ interface Middleware<TInContext extends Context, TOutContext extends Context, TI
|
|
|
6057
6057
|
}
|
|
6058
6058
|
type AnyMiddleware = Middleware<any, any, any, any, any, any>;
|
|
6059
6059
|
//#endregion
|
|
6060
|
-
//#region ../../node_modules/.pnpm/@orpc+server@1.15.
|
|
6060
|
+
//#region ../../node_modules/.pnpm/@orpc+server@1.15.4_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/server/dist/shared/server.C8_sRzQB.d.mts
|
|
6061
6061
|
interface TraverseContractProcedureCallbackOptions {
|
|
6062
6062
|
contract: AnyContractProcedure | AnyProcedure;
|
|
6063
6063
|
path: readonly string[];
|
|
@@ -7091,7 +7091,7 @@ declare enum TypeName {
|
|
|
7091
7091
|
String = "string"
|
|
7092
7092
|
}
|
|
7093
7093
|
//#endregion
|
|
7094
|
-
//#region ../../node_modules/.pnpm/@orpc+openapi@1.15.
|
|
7094
|
+
//#region ../../node_modules/.pnpm/@orpc+openapi@1.15.4_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/openapi/dist/shared/openapi.BGy4N6eR.d.mts
|
|
7095
7095
|
interface SchemaConverterComponent {
|
|
7096
7096
|
allowedStrategies: readonly SchemaConvertOptions['strategy'][];
|
|
7097
7097
|
schema: AnySchema;
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import * as z$1 from "zod/v4";
|
|
3
3
|
import { oc } from "@orpc/contract";
|
|
4
4
|
import ms from "ms";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_supports-color@7.2.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
6
6
|
/**
|
|
7
7
|
* Reusable URL validation that disallows javascript: scheme
|
|
8
8
|
*/
|
|
@@ -420,7 +420,8 @@ z.object({
|
|
|
420
420
|
collectResponsePayload: z.boolean(),
|
|
421
421
|
collectErrorMessage: z.boolean(),
|
|
422
422
|
collectUserData: z.boolean(),
|
|
423
|
-
identityTraitKey: z.string().min(1).max(200).nullable()
|
|
423
|
+
identityTraitKey: z.string().min(1).max(200).nullable(),
|
|
424
|
+
leadEventName: z.string().min(1).max(200).nullable()
|
|
424
425
|
});
|
|
425
426
|
const feedbackSchema = z.object({
|
|
426
427
|
id: z.string(),
|
|
@@ -539,6 +540,14 @@ z.enum([
|
|
|
539
540
|
"DEBUG",
|
|
540
541
|
"ERROR"
|
|
541
542
|
]);
|
|
543
|
+
const LOG_SEARCH_MAX_ESCAPED_LENGTH = 960;
|
|
544
|
+
function escapeLogSearchTerm(search) {
|
|
545
|
+
return [...search].flatMap((character) => [...new TextEncoder().encode(character)]).map((byte) => {
|
|
546
|
+
const character = String.fromCharCode(byte);
|
|
547
|
+
return /^[a-zA-Z0-9]$/.test(character) ? character : `\\x${byte.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
548
|
+
}).join("");
|
|
549
|
+
}
|
|
550
|
+
const logSearchSchema = z.string().max(240, `Search must be 240 characters or fewer`).refine((search) => escapeLogSearchTerm(search).length <= LOG_SEARCH_MAX_ESCAPED_LENGTH, "Search is too complex; shorten it or use fewer special characters");
|
|
542
551
|
/** Only names a vendor actually ships belong here: lookalikes like `claude-code-test` are customers' own scripts. */
|
|
543
552
|
const MCP_CLIENT_GROUPS = [
|
|
544
553
|
{
|
|
@@ -1210,7 +1219,7 @@ const chatgptTranslationLocaleSchema = z.enum([
|
|
|
1210
1219
|
const negativeTestCaseSchema = z.object({
|
|
1211
1220
|
scenario: z.string().min(1),
|
|
1212
1221
|
userPrompt: z.string().min(1)
|
|
1213
|
-
}).describe("Each case: Scenario + User prompt (the
|
|
1222
|
+
}).describe("Each case: Scenario + User prompt (the plugin should NOT trigger).");
|
|
1214
1223
|
const negativeTestCaseDraftSchema = negativeTestCaseSchema.partial().extend({
|
|
1215
1224
|
scenario: z.string().optional(),
|
|
1216
1225
|
userPrompt: z.string().optional()
|
|
@@ -1239,28 +1248,28 @@ chatgptTranslationSchema.extend({ tagline: clampStringField(chatgptTaglineSchema
|
|
|
1239
1248
|
const chatgptSubmissionFormDataSchema = z.object({
|
|
1240
1249
|
logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
|
|
1241
1250
|
logoDark: z.string().optional().describe("Optional dark-mode logo icon. Square PNG, same specs as the light icon. Leave empty if the light icon also works on dark backgrounds."),
|
|
1242
|
-
appName: z.string().describe("The name users will see in ChatGPT and in the
|
|
1251
|
+
appName: z.string().describe("The name users will see in ChatGPT and in the Plugin Directory."),
|
|
1243
1252
|
tagline: chatgptTaglineSchema.describe("Plain-language phrase focused on function and user value, 30 chars max. Avoid generic superlatives like \"the best …\"."),
|
|
1244
|
-
description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the
|
|
1253
|
+
description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the plugin does and why people will love it. Appears publicly on the directory page. End it by naming the product categories or intents the plugin does NOT cover, so ChatGPT learns when not to route to it (define exclusions by absent categories or wrong intents, never by naming other brands)."),
|
|
1245
1254
|
category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
|
|
1246
|
-
developerName: z.string().describe("Developer name shown publicly on the
|
|
1255
|
+
developerName: z.string().describe("Developer name shown publicly on the plugin's directory page."),
|
|
1247
1256
|
companyUrl: urlField.describe("Your company's main website URL."),
|
|
1248
1257
|
supportChannel: supportChannelSchema.describe("Customer support URL or email address."),
|
|
1249
1258
|
privacyPolicyUrl: urlField.describe("URL to your privacy policy."),
|
|
1250
|
-
termsOfServiceUrl: urlField.describe("URL to the
|
|
1251
|
-
demoRecordingUrl: urlField.describe("URL to a video demonstrating the
|
|
1252
|
-
appCommerceAndPurchasing: z.boolean().describe("Checkbox: 'My
|
|
1259
|
+
termsOfServiceUrl: urlField.describe("URL to the plugin's terms of service."),
|
|
1260
|
+
demoRecordingUrl: urlField.describe("URL to a video demonstrating the plugin, recorded via OpenAI Developer Mode. Cover all main use cases on web, iOS, and Android."),
|
|
1261
|
+
appCommerceAndPurchasing: z.boolean().describe("Checkbox: 'My plugin links or directs users out of ChatGPT to make purchases.' Defaults to false. Verify the plugin does not offer digital goods."),
|
|
1253
1262
|
serverUrl: urlField.describe("URL of the MCP server."),
|
|
1254
1263
|
authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
|
|
1255
1264
|
tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
|
|
1256
1265
|
toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values. One short, specific sentence per hint describing what the tool actually does."),
|
|
1257
1266
|
skills: z.array(chatgptSkillSchema).optional().describe("Skills the server exposes over MCP (auto-populated from the production server's manifest). Left unset when the server does not advertise the skills extension, which is a different state from advertising it and exposing none."),
|
|
1258
1267
|
testCases: z.array(positiveTestCaseSchema).length(5).describe("Exactly 5 positive test cases. Each: Scenario, User prompt, Tool triggered, Expected output. Collectively cover the full capability across different flow stages (initial search or browse, market or locale handling, post-interaction detail, an action ChatGPT performs on the user's behalf, and a conversion or secondary tool) rather than five variations of the same first step."),
|
|
1259
|
-
negativeTestCases: z.array(negativeTestCaseSchema).length(3).describe("Exactly 3 negative test cases: prompts where the
|
|
1260
|
-
screenshots: z.array(screenshotEntrySchema.extend({ prompt: z.string().max(75, { error: "Screenshot prompts are limited to 75 characters." }) })).max(3).describe("In-
|
|
1268
|
+
negativeTestCases: z.array(negativeTestCaseSchema).length(3).describe("Exactly 3 negative test cases: prompts where the plugin should NOT trigger but the model might think it is relevant. These become production routing metadata that teaches ChatGPT when to stay silent, so pick tight near-misses: a product category the plugin does not carry, the right brand or domain but an intent the plugin does not serve, or a boundary with a sibling plugin."),
|
|
1269
|
+
screenshots: z.array(screenshotEntrySchema.extend({ prompt: z.string().max(75, { error: "Screenshot prompts are limited to 75 characters." }) })).max(3).describe("In-plugin screenshots paired with the user prompt that produced them (each prompt is 75 characters max). Widget plugins must show the widget UI; non-widget plugins show the model response. Min 1, max 3 entries, all public. Images: 706px wide, 400–860px tall, PNG."),
|
|
1261
1270
|
translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
|
|
1262
1271
|
allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
|
|
1263
|
-
releaseNotes: z.string().describe("Publicly displayed on the
|
|
1272
|
+
releaseNotes: z.string().describe("Publicly displayed on the plugin details page.")
|
|
1264
1273
|
});
|
|
1265
1274
|
const chatgptSubmissionDraftSchema = chatgptSubmissionFormDataSchema.partial().extend({
|
|
1266
1275
|
tagline: z.string().optional(),
|
|
@@ -2033,7 +2042,7 @@ const getLogsContractV1 = base.route({
|
|
|
2033
2042
|
"WARNING",
|
|
2034
2043
|
"DEBUG"
|
|
2035
2044
|
])).optional().describe("Filter by log level"),
|
|
2036
|
-
search:
|
|
2045
|
+
search: logSearchSchema.optional().describe("Term to search for in log content"),
|
|
2037
2046
|
nextToken: z.string().optional().describe("Pagination token from a previous response")
|
|
2038
2047
|
})).output(z.object({
|
|
2039
2048
|
logs: z.array(logEntrySchema),
|
|
@@ -2055,7 +2064,7 @@ const getLatestLogsContractV1 = base.route({
|
|
|
2055
2064
|
"WARNING",
|
|
2056
2065
|
"DEBUG"
|
|
2057
2066
|
])).optional().describe("Filter by log level"),
|
|
2058
|
-
search:
|
|
2067
|
+
search: logSearchSchema.optional().describe("Term to search for in log content")
|
|
2059
2068
|
})).output(z.object({ logs: z.array(logEntrySchema) }));
|
|
2060
2069
|
const getDeploymentLogsContractV1 = base.route({
|
|
2061
2070
|
path: "/v1/deployments/{deploymentId}/logs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-staging.
|
|
3
|
+
"version": "0.0.0-staging.g493703e",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"author": "Alpic",
|
|
34
34
|
"license": "ISC",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@orpc/contract": "^1.15.
|
|
36
|
+
"@orpc/contract": "^1.15.4",
|
|
37
37
|
"ms": "^2.1.3",
|
|
38
38
|
"zod": "^4.5.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@alpic-ai/domains": "0.0.0",
|
|
42
|
-
"@orpc/openapi": "^1.15.
|
|
43
|
-
"@orpc/zod": "^1.15.
|
|
42
|
+
"@orpc/openapi": "^1.15.4",
|
|
43
|
+
"@orpc/zod": "^1.15.4",
|
|
44
44
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
45
45
|
"@types/ms": "^2.1.0",
|
|
46
46
|
"shx": "^0.4.0",
|
|
47
47
|
"tsdown": "^0.23.0",
|
|
48
48
|
"typescript": "^6.0.3",
|
|
49
|
-
"vitest": "^5.0.
|
|
49
|
+
"vitest": "^5.0.2"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "shx rm -rf dist && tsdown",
|