Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-testing-docs-integrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agentskit/integrations": patch
---

Document the public API.
6 changes: 1 addition & 5 deletions docs/stability/jsdoc-coverage-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@
".::ToolCallStatus",
".::ToolDefinition",
".::ToolExecutionContext",
".::useChat",
".::UseStreamOptions",
".::UseStreamReturn"
],
Expand Down Expand Up @@ -635,9 +634,7 @@
".::WebhookInput",
".::WebhookSecretAuthSpec",
".::whatsappIntegration",
".::whisperIntegration",
"./testing::validateAction",
"./testing::validateTrigger"
".::whisperIntegration"
],
"@agentskit/mcp": [
".::AgentsKitMcpServerOptions",
Expand Down Expand Up @@ -1098,7 +1095,6 @@
"@agentskit/svelte": [
".::ChatContainer",
".::CodeBlock",
".::createChatStore",
".::InputBar",
".::Markdown",
".::Message",
Expand Down
10 changes: 10 additions & 0 deletions packages/integrations/src/testing/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ function isObjectSchema(schema: JSONSchema7 | undefined): boolean {
return !!schema && schema.type === 'object'
}

/** Checks an action descriptor and returns every shape problem found.
* @param action Action descriptor to inspect.
* @param path Dotted path used as the problem location prefix.
* @returns Problems found, or an empty array when the action is valid.
*/
export function validateAction(action: IntegrationAction, path: string): ValidationProblem[] {
const problems: ValidationProblem[] = []
if (!ACTION_NAME_RE.test(action.name)) {
Expand All @@ -38,6 +43,11 @@ export function validateAction(action: IntegrationAction, path: string): Validat
return problems
}

/** Checks a trigger descriptor and returns every shape problem found.
* @param trigger Trigger descriptor to inspect.
* @param path Dotted path used as the problem location prefix.
* @returns Problems found, or an empty array when the trigger is valid.
*/
export function validateTrigger(trigger: IntegrationTrigger, path: string): ValidationProblem[] {
const problems: ValidationProblem[] = []
if (!trigger.name?.trim()) {
Expand Down
Loading