@alpic-ai/api 1.174.1 → 1.175.1

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 CHANGED
@@ -2346,8 +2346,8 @@ export declare const contract: {
2346
2346
  environmentId: z.ZodString;
2347
2347
  content: z.ZodString;
2348
2348
  source: z.ZodEnum<{
2349
- model: "model";
2350
2349
  user: "user";
2350
+ model: "model";
2351
2351
  }>;
2352
2352
  clientName: z.ZodNullable<z.ZodString>;
2353
2353
  clientId: z.ZodNullable<z.ZodString>;
@@ -4317,8 +4317,8 @@ export declare const contractForDocs: {
4317
4317
  environmentId: z.ZodString;
4318
4318
  content: z.ZodString;
4319
4319
  source: z.ZodEnum<{
4320
- model: "model";
4321
4320
  user: "user";
4321
+ model: "model";
4322
4322
  }>;
4323
4323
  clientName: z.ZodNullable<z.ZodString>;
4324
4324
  clientId: z.ZodNullable<z.ZodString>;
@@ -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.2_@opentelemetry+api@1.9.1/node_modules/@orpc/shared/dist/index.d.mts
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.2_@opentelemetry+api@1.9.1/node_modules/@orpc/client/dist/index.d.mts
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.2_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/server/dist/shared/server.qKsRrdxW.d.mts
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.2_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/server/dist/shared/server.C8_sRzQB.d.mts
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.2_@opentelemetry+api@1.9.1_ws@8.21.3/node_modules/@orpc/openapi/dist/shared/openapi.BGy4N6eR.d.mts
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.0_supports-color@7.2.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
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
  */
@@ -540,6 +540,14 @@ z.enum([
540
540
  "DEBUG",
541
541
  "ERROR"
542
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");
543
551
  /** Only names a vendor actually ships belong here: lookalikes like `claude-code-test` are customers' own scripts. */
544
552
  const MCP_CLIENT_GROUPS = [
545
553
  {
@@ -1211,7 +1219,7 @@ const chatgptTranslationLocaleSchema = z.enum([
1211
1219
  const negativeTestCaseSchema = z.object({
1212
1220
  scenario: z.string().min(1),
1213
1221
  userPrompt: z.string().min(1)
1214
- }).describe("Each case: Scenario + User prompt (the app should NOT trigger).");
1222
+ }).describe("Each case: Scenario + User prompt (the plugin should NOT trigger).");
1215
1223
  const negativeTestCaseDraftSchema = negativeTestCaseSchema.partial().extend({
1216
1224
  scenario: z.string().optional(),
1217
1225
  userPrompt: z.string().optional()
@@ -1240,28 +1248,28 @@ chatgptTranslationSchema.extend({ tagline: clampStringField(chatgptTaglineSchema
1240
1248
  const chatgptSubmissionFormDataSchema = z.object({
1241
1249
  logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
1242
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."),
1243
- appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
1251
+ appName: z.string().describe("The name users will see in ChatGPT and in the Plugin Directory."),
1244
1252
  tagline: chatgptTaglineSchema.describe("Plain-language phrase focused on function and user value, 30 chars max. Avoid generic superlatives like \"the best …\"."),
1245
- description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page. End it by naming the product categories or intents the app 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)."),
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)."),
1246
1254
  category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
1247
- developerName: z.string().describe("Developer name shown publicly on the app's directory page."),
1255
+ developerName: z.string().describe("Developer name shown publicly on the plugin's directory page."),
1248
1256
  companyUrl: urlField.describe("Your company's main website URL."),
1249
1257
  supportChannel: supportChannelSchema.describe("Customer support URL or email address."),
1250
1258
  privacyPolicyUrl: urlField.describe("URL to your privacy policy."),
1251
- termsOfServiceUrl: urlField.describe("URL to the app's terms of service."),
1252
- demoRecordingUrl: urlField.describe("URL to a video demonstrating the app, recorded via OpenAI Developer Mode. Cover all main use cases on web, iOS, and Android."),
1253
- appCommerceAndPurchasing: z.boolean().describe("Checkbox: 'My app links or directs users out of ChatGPT to make purchases.' Defaults to false. Verify the app does not offer digital goods."),
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."),
1254
1262
  serverUrl: urlField.describe("URL of the MCP server."),
1255
1263
  authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
1256
1264
  tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
1257
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."),
1258
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."),
1259
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."),
1260
- negativeTestCases: z.array(negativeTestCaseSchema).length(3).describe("Exactly 3 negative test cases: prompts where the app 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 app does not carry, the right brand or domain but an intent the app does not serve, or a boundary with a sibling app."),
1261
- screenshots: z.array(screenshotEntrySchema.extend({ prompt: z.string().max(75, { error: "Screenshot prompts are limited to 75 characters." }) })).max(3).describe("In-app screenshots paired with the user prompt that produced them (each prompt is 75 characters max). Widget apps must show the widget UI; non-widget apps show the model response. Min 1, max 3 entries, all public. Images: 706px wide, 400–860px tall, PNG."),
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."),
1262
1270
  translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
1263
1271
  allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
1264
- releaseNotes: z.string().describe("Publicly displayed on the app details page.")
1272
+ releaseNotes: z.string().describe("Publicly displayed on the plugin details page.")
1265
1273
  });
1266
1274
  const chatgptSubmissionDraftSchema = chatgptSubmissionFormDataSchema.partial().extend({
1267
1275
  tagline: z.string().optional(),
@@ -2034,7 +2042,7 @@ const getLogsContractV1 = base.route({
2034
2042
  "WARNING",
2035
2043
  "DEBUG"
2036
2044
  ])).optional().describe("Filter by log level"),
2037
- search: z.string().optional().describe("Filter pattern to search for in log content"),
2045
+ search: logSearchSchema.optional().describe("Term to search for in log content"),
2038
2046
  nextToken: z.string().optional().describe("Pagination token from a previous response")
2039
2047
  })).output(z.object({
2040
2048
  logs: z.array(logEntrySchema),
@@ -2056,7 +2064,7 @@ const getLatestLogsContractV1 = base.route({
2056
2064
  "WARNING",
2057
2065
  "DEBUG"
2058
2066
  ])).optional().describe("Filter by log level"),
2059
- search: z.string().optional().describe("Filter pattern to search for in log content")
2067
+ search: logSearchSchema.optional().describe("Term to search for in log content")
2060
2068
  })).output(z.object({ logs: z.array(logEntrySchema) }));
2061
2069
  const getDeploymentLogsContractV1 = base.route({
2062
2070
  path: "/v1/deployments/{deploymentId}/logs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.174.1",
3
+ "version": "1.175.1",
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.2",
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.2",
43
- "@orpc/zod": "^1.15.2",
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.1"
49
+ "vitest": "^5.0.2"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "shx rm -rf dist && tsdown",