@alpic-ai/api 0.0.0-staging.gbec4a15 → 0.0.0-staging.gbeeddd3

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
@@ -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.32.0_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
  */
@@ -119,7 +119,12 @@ z$1.object({
119
119
  token_type: z$1.string(),
120
120
  expires_in: z$1.coerce.number().optional(),
121
121
  scope: z$1.string().optional(),
122
- refresh_token: z$1.string().optional()
122
+ refresh_token: z$1.string().optional(),
123
+ /**
124
+ * Not part of the wire format: the authorization server this value was obtained from, added by
125
+ * the client's `auth()` before it is stored and compared when it is read back.
126
+ */
127
+ issuer: z$1.string().optional().catch(void 0)
123
128
  }).strip();
124
129
  z$1.object({
125
130
  error: z$1.string(),
@@ -158,7 +163,12 @@ const OAuthClientInformationSchema = z$1.object({
158
163
  client_id: z$1.string(),
159
164
  client_secret: z$1.string().optional(),
160
165
  client_id_issued_at: z$1.number().optional(),
161
- client_secret_expires_at: z$1.number().optional()
166
+ client_secret_expires_at: z$1.number().optional(),
167
+ /**
168
+ * Not part of the wire format: the authorization server this value was obtained from, added by
169
+ * the client's `auth()` before it is stored and compared when it is read back.
170
+ */
171
+ issuer: z$1.string().optional().catch(void 0)
162
172
  }).strip();
163
173
  OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
164
174
  z$1.object({
@@ -540,6 +550,14 @@ z.enum([
540
550
  "DEBUG",
541
551
  "ERROR"
542
552
  ]);
553
+ const LOG_SEARCH_MAX_ESCAPED_LENGTH = 960;
554
+ function escapeLogSearchTerm(search) {
555
+ return [...search].flatMap((character) => [...new TextEncoder().encode(character)]).map((byte) => {
556
+ const character = String.fromCharCode(byte);
557
+ return /^[a-zA-Z0-9]$/.test(character) ? character : `\\x${byte.toString(16).toUpperCase().padStart(2, "0")}`;
558
+ }).join("");
559
+ }
560
+ 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
561
  /** Only names a vendor actually ships belong here: lookalikes like `claude-code-test` are customers' own scripts. */
544
562
  const MCP_CLIENT_GROUPS = [
545
563
  {
@@ -1211,7 +1229,7 @@ const chatgptTranslationLocaleSchema = z.enum([
1211
1229
  const negativeTestCaseSchema = z.object({
1212
1230
  scenario: z.string().min(1),
1213
1231
  userPrompt: z.string().min(1)
1214
- }).describe("Each case: Scenario + User prompt (the app should NOT trigger).");
1232
+ }).describe("Each case: Scenario + User prompt (the plugin should NOT trigger).");
1215
1233
  const negativeTestCaseDraftSchema = negativeTestCaseSchema.partial().extend({
1216
1234
  scenario: z.string().optional(),
1217
1235
  userPrompt: z.string().optional()
@@ -1240,28 +1258,28 @@ chatgptTranslationSchema.extend({ tagline: clampStringField(chatgptTaglineSchema
1240
1258
  const chatgptSubmissionFormDataSchema = z.object({
1241
1259
  logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
1242
1260
  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."),
1261
+ appName: z.string().describe("The name users will see in ChatGPT and in the Plugin Directory."),
1244
1262
  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)."),
1263
+ 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
1264
  category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
1247
- developerName: z.string().describe("Developer name shown publicly on the app's directory page."),
1265
+ developerName: z.string().describe("Developer name shown publicly on the plugin's directory page."),
1248
1266
  companyUrl: urlField.describe("Your company's main website URL."),
1249
1267
  supportChannel: supportChannelSchema.describe("Customer support URL or email address."),
1250
1268
  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."),
1269
+ termsOfServiceUrl: urlField.describe("URL to the plugin's terms of service."),
1270
+ 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."),
1271
+ 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
1272
  serverUrl: urlField.describe("URL of the MCP server."),
1255
1273
  authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
1256
1274
  tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
1257
1275
  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
1276
  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
1277
  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."),
1278
+ 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."),
1279
+ 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
1280
  translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
1263
1281
  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.")
1282
+ releaseNotes: z.string().describe("Publicly displayed on the plugin details page.")
1265
1283
  });
1266
1284
  const chatgptSubmissionDraftSchema = chatgptSubmissionFormDataSchema.partial().extend({
1267
1285
  tagline: z.string().optional(),
@@ -1599,7 +1617,8 @@ z.object({
1599
1617
  protocol: otlpProtocolSchema,
1600
1618
  headers: z.array(telemetryDestinationHeaderSchema),
1601
1619
  status: telemetryDestinationStatusSchema,
1602
- lastFailureReason: otlpPushFailureReasonSchema.nullable()
1620
+ lastFailureReason: otlpPushFailureReasonSchema.nullable(),
1621
+ isScopedToIntentionalRequestsOnly: z.boolean()
1603
1622
  });
1604
1623
  //#endregion
1605
1624
  //#region src/auth-scope.ts
@@ -2034,7 +2053,7 @@ const getLogsContractV1 = base.route({
2034
2053
  "WARNING",
2035
2054
  "DEBUG"
2036
2055
  ])).optional().describe("Filter by log level"),
2037
- search: z.string().optional().describe("Filter pattern to search for in log content"),
2056
+ search: logSearchSchema.optional().describe("Term to search for in log content"),
2038
2057
  nextToken: z.string().optional().describe("Pagination token from a previous response")
2039
2058
  })).output(z.object({
2040
2059
  logs: z.array(logEntrySchema),
@@ -2056,7 +2075,7 @@ const getLatestLogsContractV1 = base.route({
2056
2075
  "WARNING",
2057
2076
  "DEBUG"
2058
2077
  ])).optional().describe("Filter by log level"),
2059
- search: z.string().optional().describe("Filter pattern to search for in log content")
2078
+ search: logSearchSchema.optional().describe("Term to search for in log content")
2060
2079
  })).output(z.object({ logs: z.array(logEntrySchema) }));
2061
2080
  const getDeploymentLogsContractV1 = base.route({
2062
2081
  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.gbec4a15",
3
+ "version": "0.0.0-staging.gbeeddd3",
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.3"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "shx rm -rf dist && tsdown",