@alpic-ai/api 0.0.0-dev.ge14aad6 → 0.0.0-dev.ge18b249

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
@@ -291,6 +291,9 @@ declare const chatgptSubmissionSchemaInternal: z.ZodObject<{
291
291
  openWorldJustification: z.ZodString;
292
292
  destructiveJustification: z.ZodString;
293
293
  }, z.core.$strip>>>;
294
+ skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
295
+ name: z.ZodString;
296
+ }, z.core.$strip>>>>;
294
297
  allowedCountries: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
295
298
  mode: z.ZodLiteral<"all">;
296
299
  }, z.core.$strip>, z.ZodObject<{
@@ -731,10 +734,10 @@ declare const chatgptSubmissionSchemaInternal: z.ZodObject<{
731
734
  url: z.ZodString;
732
735
  }, z.core.$strip>>>;
733
736
  testCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
734
- scenario: z.ZodOptional<z.ZodString>;
735
- userPrompt: z.ZodOptional<z.ZodString>;
736
737
  toolTriggered: z.ZodOptional<z.ZodOptional<z.ZodString>>;
737
738
  expectedOutput: z.ZodOptional<z.ZodOptional<z.ZodString>>;
739
+ scenario: z.ZodOptional<z.ZodString>;
740
+ userPrompt: z.ZodOptional<z.ZodString>;
738
741
  }, z.core.$strip>>>;
739
742
  negativeTestCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
740
743
  scenario: z.ZodOptional<z.ZodString>;
@@ -853,6 +856,9 @@ declare const chatgptSubmissionSchemaInternal: z.ZodObject<{
853
856
  openWorldJustification: z.ZodString;
854
857
  destructiveJustification: z.ZodString;
855
858
  }, z.core.$strip>>>;
859
+ skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
860
+ name: z.ZodString;
861
+ }, z.core.$strip>>>>;
856
862
  allowedCountries: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
857
863
  mode: z.ZodLiteral<"all">;
858
864
  }, z.core.$strip>, z.ZodObject<{
@@ -1293,10 +1299,10 @@ declare const chatgptSubmissionSchemaInternal: z.ZodObject<{
1293
1299
  url: z.ZodString;
1294
1300
  }, z.core.$strip>>>;
1295
1301
  testCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
1296
- scenario: z.ZodOptional<z.ZodString>;
1297
- userPrompt: z.ZodOptional<z.ZodString>;
1298
1302
  toolTriggered: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1299
1303
  expectedOutput: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1304
+ scenario: z.ZodOptional<z.ZodString>;
1305
+ userPrompt: z.ZodOptional<z.ZodString>;
1300
1306
  }, z.core.$strip>>>;
1301
1307
  negativeTestCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
1302
1308
  scenario: z.ZodOptional<z.ZodString>;
@@ -1531,6 +1537,9 @@ export declare const chatgptSubmissionUpdateSchema: z.ZodObject<{
1531
1537
  openWorldJustification: z.ZodString;
1532
1538
  destructiveJustification: z.ZodString;
1533
1539
  }, z.core.$strip>>>;
1540
+ skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
1541
+ name: z.ZodString;
1542
+ }, z.core.$strip>>>>;
1534
1543
  allowedCountries: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1535
1544
  mode: z.ZodLiteral<"all">;
1536
1545
  }, z.core.$strip>, z.ZodObject<{
@@ -1971,10 +1980,10 @@ export declare const chatgptSubmissionUpdateSchema: z.ZodObject<{
1971
1980
  url: z.ZodString;
1972
1981
  }, z.core.$strip>>>;
1973
1982
  testCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
1974
- scenario: z.ZodOptional<z.ZodString>;
1975
- userPrompt: z.ZodOptional<z.ZodString>;
1976
1983
  toolTriggered: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1977
1984
  expectedOutput: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1985
+ scenario: z.ZodOptional<z.ZodString>;
1986
+ userPrompt: z.ZodOptional<z.ZodString>;
1978
1987
  }, z.core.$strip>>>;
1979
1988
  negativeTestCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
1980
1989
  scenario: z.ZodOptional<z.ZodString>;
@@ -3262,6 +3271,20 @@ export declare const contract: {
3262
3271
  NOT_FOUND: {};
3263
3272
  }>, Record<never, never>>;
3264
3273
  };
3274
+ list: {
3275
+ v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3276
+ projectId: z.ZodString;
3277
+ environmentId: z.ZodOptional<z.ZodString>;
3278
+ platform: z.ZodOptional<z.ZodEnum<{
3279
+ chatgpt: "chatgpt";
3280
+ claudeai: "claudeai";
3281
+ }>>;
3282
+ }, z.core.$strip>, z.ZodArray<z.ZodType<Submission, unknown, z.core.$ZodTypeInternals<Submission, unknown>>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
3283
+ BAD_REQUEST: {};
3284
+ }>, {
3285
+ NOT_FOUND: {};
3286
+ }>, Record<never, never>>;
3287
+ };
3265
3288
  get: {
3266
3289
  v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3267
3290
  submissionId: z.ZodString;
@@ -3397,6 +3420,9 @@ export declare const contract: {
3397
3420
  openWorldJustification: z.ZodString;
3398
3421
  destructiveJustification: z.ZodString;
3399
3422
  }, z.core.$strip>>>;
3423
+ skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
3424
+ name: z.ZodString;
3425
+ }, z.core.$strip>>>>;
3400
3426
  allowedCountries: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3401
3427
  mode: z.ZodLiteral<"all">;
3402
3428
  }, z.core.$strip>, z.ZodObject<{
@@ -3837,10 +3863,10 @@ export declare const contract: {
3837
3863
  url: z.ZodString;
3838
3864
  }, z.core.$strip>>>;
3839
3865
  testCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
3840
- scenario: z.ZodOptional<z.ZodString>;
3841
- userPrompt: z.ZodOptional<z.ZodString>;
3842
3866
  toolTriggered: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3843
3867
  expectedOutput: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3868
+ scenario: z.ZodOptional<z.ZodString>;
3869
+ userPrompt: z.ZodOptional<z.ZodString>;
3844
3870
  }, z.core.$strip>>>;
3845
3871
  negativeTestCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
3846
3872
  scenario: z.ZodOptional<z.ZodString>;
@@ -5123,6 +5149,20 @@ export declare const contractForDocs: {
5123
5149
  NOT_FOUND: {};
5124
5150
  }>, Record<never, never>>;
5125
5151
  };
5152
+ list: {
5153
+ v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5154
+ projectId: z.ZodString;
5155
+ environmentId: z.ZodOptional<z.ZodString>;
5156
+ platform: z.ZodOptional<z.ZodEnum<{
5157
+ chatgpt: "chatgpt";
5158
+ claudeai: "claudeai";
5159
+ }>>;
5160
+ }, z.core.$strip>, z.ZodArray<z.ZodType<Submission, unknown, z.core.$ZodTypeInternals<Submission, unknown>>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
5161
+ BAD_REQUEST: {};
5162
+ }>, {
5163
+ NOT_FOUND: {};
5164
+ }>, Record<never, never>>;
5165
+ };
5126
5166
  get: {
5127
5167
  v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5128
5168
  submissionId: z.ZodString;
@@ -5258,6 +5298,9 @@ export declare const contractForDocs: {
5258
5298
  openWorldJustification: z.ZodString;
5259
5299
  destructiveJustification: z.ZodString;
5260
5300
  }, z.core.$strip>>>;
5301
+ skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
5302
+ name: z.ZodString;
5303
+ }, z.core.$strip>>>>;
5261
5304
  allowedCountries: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5262
5305
  mode: z.ZodLiteral<"all">;
5263
5306
  }, z.core.$strip>, z.ZodObject<{
@@ -5698,10 +5741,10 @@ export declare const contractForDocs: {
5698
5741
  url: z.ZodString;
5699
5742
  }, z.core.$strip>>>;
5700
5743
  testCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
5701
- scenario: z.ZodOptional<z.ZodString>;
5702
- userPrompt: z.ZodOptional<z.ZodString>;
5703
5744
  toolTriggered: z.ZodOptional<z.ZodOptional<z.ZodString>>;
5704
5745
  expectedOutput: z.ZodOptional<z.ZodOptional<z.ZodString>>;
5746
+ scenario: z.ZodOptional<z.ZodString>;
5747
+ userPrompt: z.ZodOptional<z.ZodString>;
5705
5748
  }, z.core.$strip>>>;
5706
5749
  negativeTestCases: z.ZodOptional<z.ZodArray<z.ZodObject<{
5707
5750
  scenario: z.ZodOptional<z.ZodString>;
package/dist/index.mjs CHANGED
@@ -885,7 +885,10 @@ const positiveTestCaseSchema = z.object({
885
885
  toolTriggered: z.string().optional().describe("The tool this prompt should invoke."),
886
886
  expectedOutput: z.string().optional().describe("What the user should see, including post-interaction behaviour where relevant.")
887
887
  }).describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
888
- const positiveTestCaseDraftSchema = positiveTestCaseSchema.partial();
888
+ const positiveTestCaseDraftSchema = positiveTestCaseSchema.partial().extend({
889
+ scenario: z.string().optional(),
890
+ userPrompt: z.string().optional()
891
+ });
889
892
  const blankPositiveTestCase = () => ({
890
893
  scenario: "",
891
894
  userPrompt: "",
@@ -1208,11 +1211,15 @@ const negativeTestCaseSchema = z.object({
1208
1211
  scenario: z.string().min(1),
1209
1212
  userPrompt: z.string().min(1)
1210
1213
  }).describe("Each case: Scenario + User prompt (the app should NOT trigger).");
1211
- const negativeTestCaseDraftSchema = negativeTestCaseSchema.partial();
1214
+ const negativeTestCaseDraftSchema = negativeTestCaseSchema.partial().extend({
1215
+ scenario: z.string().optional(),
1216
+ userPrompt: z.string().optional()
1217
+ });
1212
1218
  const blankNegativeTestCase = () => ({
1213
1219
  scenario: "",
1214
1220
  userPrompt: ""
1215
1221
  });
1222
+ const chatgptSkillSchema = z.object({ name: z.string() }).describe("A skill discovered on the MCP server, by name.");
1216
1223
  const chatgptToolJustificationSchema = z.object({
1217
1224
  toolName: z.string(),
1218
1225
  readOnlyJustification: z.string().describe("One sentence on what the tool reads and returns."),
@@ -1247,6 +1254,7 @@ const chatgptSubmissionFormDataSchema = z.object({
1247
1254
  authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
1248
1255
  tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
1249
1256
  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
+ 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."),
1250
1258
  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."),
1251
1259
  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."),
1252
1260
  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."),
@@ -1273,6 +1281,7 @@ const chatgptPrefillFormDataSchema = chatgptSubmissionFormDataSchema.pick({
1273
1281
  developerName: true,
1274
1282
  serverUrl: true,
1275
1283
  tools: true,
1284
+ skills: true,
1276
1285
  authentication: true
1277
1286
  });
1278
1287
  /** Source of truth for `SubmissionPrefillService.generate({ platform: "chatgpt" })`. */
@@ -2372,6 +2381,18 @@ const createSubmissionContractV1 = base.route({
2372
2381
  environmentId: z.string().describe("The ID of the environment to build the package from"),
2373
2382
  platform: platformSchema.describe(PLATFORM_DESCRIPTION)
2374
2383
  })).output(submissionSchema);
2384
+ const listSubmissionsContractV1 = base.route({
2385
+ path: "/v1/projects/{projectId}/submissions",
2386
+ method: "GET",
2387
+ summary: "List submission packages",
2388
+ description: "List the submission packages of a project, grouped by directory and most recently updated first, optionally narrowed to one environment or one directory",
2389
+ tags: ["submissions"],
2390
+ successDescription: "The list of submission packages"
2391
+ }).errors({ NOT_FOUND: {} }).input(z.object({
2392
+ projectId: z.string().describe("The ID of the project"),
2393
+ environmentId: z.string().optional().describe("Filter by environment ID"),
2394
+ platform: platformSchema.optional().describe(PLATFORM_DESCRIPTION)
2395
+ })).output(z.array(submissionSchema));
2375
2396
  const getSubmissionContractV1 = base.route({
2376
2397
  path: "/v1/submissions/{submissionId}",
2377
2398
  method: "GET",
@@ -2454,6 +2475,7 @@ const contract = {
2454
2475
  },
2455
2476
  submissions: {
2456
2477
  create: { v1: createSubmissionContractV1 },
2478
+ list: { v1: listSubmissionsContractV1 },
2457
2479
  get: { v1: getSubmissionContractV1 },
2458
2480
  update: { v1: updateSubmissionContractV1 }
2459
2481
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-dev.ge14aad6",
3
+ "version": "0.0.0-dev.ge18b249",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -46,7 +46,7 @@
46
46
  "shx": "^0.4.0",
47
47
  "tsdown": "^0.23.0",
48
48
  "typescript": "^6.0.3",
49
- "vitest": "^4.1.11"
49
+ "vitest": "^5.0.0"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "shx rm -rf dist && tsdown",