@alpic-ai/api 0.0.0-dev.gf22191e → 0.0.0-dev.gf24c182
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 +53 -4714
- package/dist/index.mjs +5 -69
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1213,6 +1213,7 @@ const blankNegativeTestCase = () => ({
|
|
|
1213
1213
|
scenario: "",
|
|
1214
1214
|
userPrompt: ""
|
|
1215
1215
|
});
|
|
1216
|
+
const chatgptSkillSchema = z.object({ name: z.string() }).describe("A skill discovered on the MCP server, by name.");
|
|
1216
1217
|
const chatgptToolJustificationSchema = z.object({
|
|
1217
1218
|
toolName: z.string(),
|
|
1218
1219
|
readOnlyJustification: z.string().describe("One sentence on what the tool reads and returns."),
|
|
@@ -1247,6 +1248,7 @@ const chatgptSubmissionFormDataSchema = z.object({
|
|
|
1247
1248
|
authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
|
|
1248
1249
|
tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
|
|
1249
1250
|
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."),
|
|
1251
|
+
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
1252
|
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
1253
|
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
1254
|
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 +1275,7 @@ const chatgptPrefillFormDataSchema = chatgptSubmissionFormDataSchema.pick({
|
|
|
1273
1275
|
developerName: true,
|
|
1274
1276
|
serverUrl: true,
|
|
1275
1277
|
tools: true,
|
|
1278
|
+
skills: true,
|
|
1276
1279
|
authentication: true
|
|
1277
1280
|
});
|
|
1278
1281
|
/** Source of truth for `SubmissionPrefillService.generate({ platform: "chatgpt" })`. */
|
|
@@ -1507,10 +1510,8 @@ const chatgptSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
|
|
|
1507
1510
|
formData: chatgptSubmissionDraftSchema,
|
|
1508
1511
|
prefillSnapshot: chatgptSubmissionDraftSchema.nullable().default(null)
|
|
1509
1512
|
});
|
|
1510
|
-
|
|
1513
|
+
z.discriminatedUnion("platform", [claudeSubmissionSchemaInternal, chatgptSubmissionSchemaInternal]);
|
|
1511
1514
|
z.union([claudeSubmissionDraftSchema, chatgptSubmissionDraftSchema]);
|
|
1512
|
-
/** Discriminated on `platform`, which pins the shape of `formData`: a Claude submission cannot carry chatgpt-only fields, and vice-versa. */
|
|
1513
|
-
const submissionSchema = submissionSchemaInternal;
|
|
1514
1515
|
z.literal([
|
|
1515
1516
|
100,
|
|
1516
1517
|
75,
|
|
@@ -2357,45 +2358,6 @@ const getBeaconContractV1 = base.route({
|
|
|
2357
2358
|
createdAt: z.coerce.date(),
|
|
2358
2359
|
report: auditReportWithScreenshotsSchema.nullable()
|
|
2359
2360
|
}));
|
|
2360
|
-
const PLATFORM_DESCRIPTION = "The directory the package targets: `chatgpt` for the OpenAI App Directory, `claudeai` for the Anthropic MCP Directory";
|
|
2361
|
-
const submissionIdSchema = z.string().describe("The ID of the submission package");
|
|
2362
|
-
const claudeSubmissionUpdateSchema = claudeSubmissionDraftSchema.strict();
|
|
2363
|
-
const chatgptSubmissionUpdateSchema = chatgptSubmissionDraftSchema.strict();
|
|
2364
|
-
const createSubmissionContractV1 = base.route({
|
|
2365
|
-
path: "/v1/submissions",
|
|
2366
|
-
method: "POST",
|
|
2367
|
-
summary: "Create a submission package",
|
|
2368
|
-
description: "Create a submission package for an environment. Alpic reads the environment's live MCP server and prefills every field it can infer, so the response already carries the populated package. The environment must have a successful deployment and must not require authentication.",
|
|
2369
|
-
tags: ["submissions"],
|
|
2370
|
-
successDescription: "The created submission package, with its prefilled fields"
|
|
2371
|
-
}).errors({ NOT_FOUND: {} }).input(z.object({
|
|
2372
|
-
environmentId: z.string().describe("The ID of the environment to build the package from"),
|
|
2373
|
-
platform: platformSchema.describe(PLATFORM_DESCRIPTION)
|
|
2374
|
-
})).output(submissionSchema);
|
|
2375
|
-
const getSubmissionContractV1 = base.route({
|
|
2376
|
-
path: "/v1/submissions/{submissionId}",
|
|
2377
|
-
method: "GET",
|
|
2378
|
-
summary: "Get a submission package",
|
|
2379
|
-
description: "Get a submission package by ID, including its form data and the prefill it started from",
|
|
2380
|
-
tags: ["submissions"],
|
|
2381
|
-
successDescription: "The submission package"
|
|
2382
|
-
}).errors({ NOT_FOUND: {} }).input(z.object({ submissionId: submissionIdSchema })).output(submissionSchema);
|
|
2383
|
-
const updateSubmissionContractV1 = base.route({
|
|
2384
|
-
path: "/v1/submissions/{submissionId}",
|
|
2385
|
-
method: "PUT",
|
|
2386
|
-
summary: "Update a submission package",
|
|
2387
|
-
description: "Update the form data of a submission package. Only the fields you send are changed; the rest are left as they are. Unknown field names are rejected rather than ignored, so a typo fails the call. `platform` must match the package's own platform.",
|
|
2388
|
-
tags: ["submissions"],
|
|
2389
|
-
successDescription: "The updated submission package"
|
|
2390
|
-
}).errors({ NOT_FOUND: {} }).input(z.discriminatedUnion("platform", [z.object({
|
|
2391
|
-
submissionId: submissionIdSchema,
|
|
2392
|
-
platform: z.literal("claudeai").describe(PLATFORM_DESCRIPTION),
|
|
2393
|
-
formData: claudeSubmissionUpdateSchema
|
|
2394
|
-
}), z.object({
|
|
2395
|
-
submissionId: submissionIdSchema,
|
|
2396
|
-
platform: z.literal("chatgpt").describe(PLATFORM_DESCRIPTION),
|
|
2397
|
-
formData: chatgptSubmissionUpdateSchema
|
|
2398
|
-
})])).output(submissionSchema);
|
|
2399
2361
|
const contract = {
|
|
2400
2362
|
teams: {
|
|
2401
2363
|
list: { v1: listTeamsContractV1 },
|
|
@@ -2451,11 +2413,6 @@ const contract = {
|
|
|
2451
2413
|
beacon: {
|
|
2452
2414
|
create: { v1: createBeaconContractV1 },
|
|
2453
2415
|
get: { v1: getBeaconContractV1 }
|
|
2454
|
-
},
|
|
2455
|
-
submissions: {
|
|
2456
|
-
create: { v1: createSubmissionContractV1 },
|
|
2457
|
-
get: { v1: getSubmissionContractV1 },
|
|
2458
|
-
update: { v1: updateSubmissionContractV1 }
|
|
2459
2416
|
}
|
|
2460
2417
|
};
|
|
2461
2418
|
const { uploadArtifact: _discard, ...deploymentsForDocs } = contract.deployments;
|
|
@@ -2463,26 +2420,5 @@ const contractForDocs = {
|
|
|
2463
2420
|
...contract,
|
|
2464
2421
|
deployments: deploymentsForDocs
|
|
2465
2422
|
};
|
|
2466
|
-
/** Shared by the served `openapi.json` and the snapshot test that guards it, so the two cannot drift. */
|
|
2467
|
-
const OPENAPI_DOC_OPTIONS = {
|
|
2468
|
-
info: {
|
|
2469
|
-
title: "Alpic API",
|
|
2470
|
-
version: "1.0.0"
|
|
2471
|
-
},
|
|
2472
|
-
servers: [{ url: "https://api.alpic.ai" }],
|
|
2473
|
-
security: [{ bearerAuth: [] }],
|
|
2474
|
-
components: { securitySchemes: { bearerAuth: {
|
|
2475
|
-
type: "http",
|
|
2476
|
-
description: "Bearer token for authentication. Use an API key from the API Keys page in team settings, or an OAuth access token.",
|
|
2477
|
-
scheme: "bearer"
|
|
2478
|
-
} } },
|
|
2479
|
-
commonSchemas: {
|
|
2480
|
-
Submission: { schema: submissionSchema },
|
|
2481
|
-
ClaudeSubmissionFormData: { schema: claudeSubmissionDraftSchema },
|
|
2482
|
-
ChatgptSubmissionFormData: { schema: chatgptSubmissionDraftSchema },
|
|
2483
|
-
ClaudeSubmissionFormDataUpdate: { schema: claudeSubmissionUpdateSchema },
|
|
2484
|
-
ChatgptSubmissionFormDataUpdate: { schema: chatgptSubmissionUpdateSchema }
|
|
2485
|
-
}
|
|
2486
|
-
};
|
|
2487
2423
|
//#endregion
|
|
2488
|
-
export {
|
|
2424
|
+
export { AUTH_SCOPE_ANY, AUTH_SCOPE_USER, INTENT_CATEGORY_COLORS, PLATFORM_LABELS, buildSettingsSchema, contract, contractForDocs, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, intentCategoryColorSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.gf24c182",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
45
45
|
"@types/ms": "^2.1.0",
|
|
46
46
|
"shx": "^0.4.0",
|
|
47
|
-
"tsdown": "^0.
|
|
47
|
+
"tsdown": "^0.22.14",
|
|
48
48
|
"typescript": "^6.0.3",
|
|
49
49
|
"vitest": "^4.1.11"
|
|
50
50
|
},
|