Skip to content

Commit 99e736f

Browse files
committed
fix(sdk): correct the realtime token example and fail-fast the docs bundle
The realtime skill's TriggerButton example named its token `publicAccessToken` while passing it to useTaskTrigger, which contradicts the skill's own warning that a read token cannot trigger a task. Renamed to `triggerToken`. bundleSdkDocs now throws instead of warning when no doc sources are found, so a broken skills dir fails the build rather than shipping the SDK with missing docs.
1 parent 4ed7c1e commit 99e736f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/trigger-sdk/skills/realtime-and-frontend/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ Public Access Token.
119119
import { useTaskTrigger } from "@trigger.dev/react-hooks";
120120
import type { myTask } from "@/trigger/myTask";
121121

122-
export function TriggerButton({ publicAccessToken }: { publicAccessToken: string }) {
122+
export function TriggerButton({ triggerToken }: { triggerToken: string }) {
123123
const { submit, handle, isLoading } = useTaskTrigger<typeof myTask>("my-task", {
124-
accessToken: publicAccessToken,
124+
accessToken: triggerToken,
125125
});
126126
if (handle) return <div>Run ID: {handle.id}</div>;
127127
return (

scripts/bundleSdkDocs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ async function bundleSdkDocs() {
6868
const manifest = await collectManifest();
6969

7070
if (manifest.length === 0) {
71-
console.warn("[bundleSdkDocs] no doc sources found in skills/*/SKILL.md; skipping");
72-
return;
71+
// Fail the build rather than silently ship the SDK with stale or missing docs.
72+
throw new Error("[bundleSdkDocs] no doc sources found in skills/*/SKILL.md");
7373
}
7474

7575
// Rebuild from scratch so removed sources don't linger in the package.

0 commit comments

Comments
 (0)