The Coline App SDK: apps, tools, file types and surfaces that run inside Coline workspaces, and public websites with Coline Sites. TypeScript, with an in-memory test workspace. MIT.
| 5 | * Tool metadata (plan §10.1) — the manifest artifact of a tool. |
| 6 | * |
| 7 | * `inputSchema` is JSON Schema, produced by the extraction step from the |
| 8 | * tool's Zod input (`z.toJSONSchema`). The executable `execute()` never |
| 9 | * appears here; it lives in the runtime artifact (plan §6.1). Result-card |
| 10 | * hints are deliberately absent in Phase 0 — cards land with Phase 1 and |
| 11 | * the field is additive. |
| 12 | */ |
| 13 |
| 14 | export const toolNameSchema = z |
| 15 | .string() |
| 16 | .trim() |
| 17 | .regex( |
| 18 | /^[a-z][a-z0-9-]*\.[a-z][a-z0-9_]*$/, |
| 19 | "Tool names are `{appKey}.{tool_name}`, lowercase snake_case.", |
| 20 | ) |
| 21 | .max(160); |
| 22 |
| 23 | export const appToolMetadataSchema = z.strictObject({ |
| 24 | name: toolNameSchema, |
| 25 | description: z.string().trim().min(1).max(1000), |
| 26 | inputSchema: z.record(z.string(), z.unknown()), |
| 27 | effect: toolEffectSchema, |
| 28 | }); |
| 29 |
| 30 | export type AppToolMetadata = z.infer<typeof appToolMetadataSchema>; |
| 31 |