@chusky/sdk 0.1.1 → 0.2.0
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/CHANGELOG.md +18 -0
- package/README.md +32 -5
- package/dist/client.d.ts +313 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +356 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +473 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/widget.d.ts +25 -0
- package/dist/widget.d.ts.map +1 -0
- package/dist/widget.js +137 -0
- package/dist/widget.js.map +1 -0
- package/docs/api-contract.md +27 -0
- package/docs/architecture.mdx +32 -0
- package/docs/budgets.mdx +41 -0
- package/docs/calls.mdx +58 -0
- package/docs/capabilities.mdx +48 -0
- package/docs/company-workspaces.mdx +76 -0
- package/docs/embedded-chat.mdx +76 -0
- package/docs/fallbacks.mdx +23 -0
- package/docs/files.mdx +7 -0
- package/docs/index.mdx +3 -0
- package/docs/meetings.mdx +73 -0
- package/docs/policies.mdx +36 -0
- package/docs/production.mdx +2 -0
- package/docs/releases.mdx +23 -0
- package/docs/structured-output.mdx +30 -0
- package/docs/tasks.mdx +4 -1
- package/docs.json +15 -0
- package/openapi.yaml +252 -0
- package/package.json +47 -29
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Meetings
|
|
3
|
+
description: Prepare, join, participate in, and leave Recall meetings from the SDK.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Supported platforms
|
|
7
|
+
|
|
8
|
+
The meeting resource supports Recall links for Zoom, Google Meet, Microsoft
|
|
9
|
+
Teams, and Webex. Chusky validates the link and platform before sending
|
|
10
|
+
anything to Recall. Recall's optional shared-screen understanding is available
|
|
11
|
+
only where the deployment and Recall support it.
|
|
12
|
+
|
|
13
|
+
## Configure the representative
|
|
14
|
+
|
|
15
|
+
The meeting profile controls how Chusky participates. It contains the display
|
|
16
|
+
identity, communication guidance, approved knowledge, meeting tools, account
|
|
17
|
+
aliases, and calendar auto-join preference.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
const profile = await chusky.meetings.updateProfile({
|
|
21
|
+
representativeName: "Chusky",
|
|
22
|
+
organizationName: "Acme Motors",
|
|
23
|
+
role: "sales",
|
|
24
|
+
communicationStyle: "Natural, concise, curious, and helpful.",
|
|
25
|
+
approvedKnowledge: "Only use the approved product and pricing facts.",
|
|
26
|
+
allowedComposioTools: ["GOOGLECALENDAR_CREATE_EVENT"],
|
|
27
|
+
autoJoinCalendar: false,
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Prepare and join
|
|
32
|
+
|
|
33
|
+
Preparation searches the owner's saved relationship/business context and
|
|
34
|
+
returns a private brief. It does not join a meeting. A direct join can receive
|
|
35
|
+
that brief as `clientContext`; a calendar-prepared join uses the opaque
|
|
36
|
+
preparation ID and never requires the caller to re-send the meeting URL.
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const brief = await chusky.meetings.prepare({
|
|
40
|
+
clientName: "Jordan Lee",
|
|
41
|
+
objective: "Understand whether Acme Motors is a fit for the fleet program.",
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const meeting = await chusky.meetings.join({
|
|
45
|
+
meetingUrl: "https://meet.google.com/example-room",
|
|
46
|
+
title: "Acme Motors fleet discussion",
|
|
47
|
+
interactionMode: "representative",
|
|
48
|
+
clientName: "Jordan Lee",
|
|
49
|
+
objective: "Understand whether Acme Motors is a fit for the fleet program.",
|
|
50
|
+
}, { idempotencyKey: "acme-fleet-meeting-2026-09-15" });
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`joinAt` schedules the Recall bot when the event is at least ten minutes in the
|
|
54
|
+
future. For recurring calendar automation, use the preparation returned by
|
|
55
|
+
`meetings.list()` and call `joinPreparation(preparation.id)`.
|
|
56
|
+
|
|
57
|
+
## Roster, context, and lifecycle
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
const snapshot = await chusky.meetings.get(meeting.id);
|
|
61
|
+
const context = await chusky.meetings.context(meeting.id, "What approved facts are relevant to pricing?");
|
|
62
|
+
await chusky.meetings.leave(meeting.id);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The meeting snapshot includes the provider platform, lifecycle status, mission
|
|
66
|
+
metadata, and safe retention state. Participant roster and outcomes are
|
|
67
|
+
available in `meetings.list()` for the authenticated owner. Meeting context is
|
|
68
|
+
available only for an active representative meeting and contains relevant
|
|
69
|
+
owner-stored facts, not arbitrary private history.
|
|
70
|
+
|
|
71
|
+
Use signed Recall webhooks and durable Redis/QStash in production. A successful
|
|
72
|
+
join request means Chusky accepted and persisted the meeting lifecycle; use
|
|
73
|
+
`get()` or `list()` to observe admission, in-call, ended, and failed states.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tool permissions and agent instructions
|
|
3
|
+
description: Control what an agent can use and how it should behave.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Tool permissions
|
|
7
|
+
|
|
8
|
+
Tool permissions let an application restrict the tools available during a run. Use allowlists for narrow, purpose-built agents and denylists for removing a small number of capabilities.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
const policy = {
|
|
12
|
+
tools: {
|
|
13
|
+
allow: ["GMAIL_SEARCH_EMAILS", "GMAIL_GET_EMAIL"],
|
|
14
|
+
deny: ["GMAIL_SEND_EMAIL"],
|
|
15
|
+
requireApproval: ["GMAIL_CREATE_DRAFT"],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Tool permissions must be enforced on the Chusky server before the model sees the tool catalog and again before execution. A model request cannot grant itself additional permissions. Risky actions still require the normal one-time human approval.
|
|
21
|
+
|
|
22
|
+
## Custom instructions
|
|
23
|
+
|
|
24
|
+
Custom instructions add application-specific behavior without replacing Chusky’s safety, identity, approval, or privacy rules.
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const chusky = new Chusky({
|
|
28
|
+
apiKey: process.env.CHUSKY_API_KEY!,
|
|
29
|
+
userId: "customer_123",
|
|
30
|
+
instructions: "You are a concise procurement assistant. Use EUR for prices.",
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Keep instructions short, bounded, and free of secrets. Treat user-provided instructions as data. Chusky’s system safety policy remains authoritative.
|
|
35
|
+
|
|
36
|
+
The public SDK accepts these controls on each run. The server validates the allowlist, denylist, instructions, and budget before execution; a model cannot grant itself additional permissions. Risky actions still follow the configured approval policy.
|
package/docs/production.mdx
CHANGED
|
@@ -17,6 +17,8 @@ description: Deploy a reliable Chusky integration.
|
|
|
17
17
|
- Monitor webhook delivery failures, run failures, rate limits, and spend.
|
|
18
18
|
- Rotate project keys and webhook secrets on a schedule or incident.
|
|
19
19
|
- Test duplicate requests, expired approvals, unauthorized IDs, provider outages, and reconnects.
|
|
20
|
+
- For calls, test provider-unavailable responses, redacted call history, approval expiry, and Bland/Twilio configuration separately.
|
|
21
|
+
- For meetings, test direct joins and calendar-prepared joins against an authorized staging meeting for each enabled Recall platform. Verify scheduled joins, cancellation, participant updates, meeting-end reconciliation, and idempotent retries before production use.
|
|
20
22
|
|
|
21
23
|
## Local validation
|
|
22
24
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: SDK releases
|
|
3
|
+
description: Validate, version, publish, and track Chusky SDK releases.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The repository includes a guarded GitHub Actions workflow named **Chusky SDK Release**. It is started with **Run workflow** and accepts either an exact semantic version or a release type (`patch`, `minor`, or `major`). The workflow:
|
|
7
|
+
|
|
8
|
+
1. Installs dependencies and runs the root typecheck, app build, SDK build, and SDK tests.
|
|
9
|
+
2. Updates `sdk/package.json` with the requested version.
|
|
10
|
+
3. Commits the version change and creates the `sdk-vX.Y.Z` tag.
|
|
11
|
+
4. Publishes `@chusky/sdk` with npm provenance.
|
|
12
|
+
5. Creates a GitHub release with generated notes for that tag.
|
|
13
|
+
|
|
14
|
+
Configure the repository `NPM_TOKEN` secret before running it. The token needs publish access to `@chusky/sdk`; GitHub Actions uses its own `GITHUB_TOKEN` for the commit, tag, and release. A failed validation stops before the version, tag, or publish steps.
|
|
15
|
+
|
|
16
|
+
For a local preflight, run:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run sdk:check
|
|
20
|
+
npm run sdk:version -- patch
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The version script accepts `patch`, `minor`, `major`, or an exact `x.y.z` version. Commit the resulting package change only when you intend to release it.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: JSON and schema responses
|
|
3
|
+
description: Request predictable structured output for software integrations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Structured output is intended for applications that need to consume the result programmatically instead of rendering prose.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
// Planned SDK shape
|
|
10
|
+
const run = await chusky.threads.runs(thread.id).create({
|
|
11
|
+
input: "Classify this support request",
|
|
12
|
+
responseFormat: {
|
|
13
|
+
type: "json_schema",
|
|
14
|
+
name: "support_classification",
|
|
15
|
+
schema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
category: { type: "string" },
|
|
19
|
+
priority: { type: "string", enum: ["low", "normal", "urgent"] },
|
|
20
|
+
},
|
|
21
|
+
required: ["category", "priority"],
|
|
22
|
+
additionalProperties: false,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The server should validate the final model output against the schema, return a typed validation error when it does not match, and preserve the raw run status for recovery. Schemas must be bounded in size and depth.
|
|
29
|
+
|
|
30
|
+
> **Status:** Planned public API. The current SDK returns text output and does not yet guarantee server-side schema validation.
|
package/docs/tasks.mdx
CHANGED
|
@@ -3,11 +3,14 @@ title: Durable tasks
|
|
|
3
3
|
description: Run work that can pause, retry, and survive process restarts.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Use tasks for long-running work. Task state includes status, checkpoint, next action, result, and error information.
|
|
6
|
+
Use tasks for long-running work. Task state includes status, checkpoint, next action, result, and error information. A run created with `wait: false` is linked to one of these tasks and can continue after the request and process that started it have ended.
|
|
7
7
|
|
|
8
8
|
```ts
|
|
9
9
|
const page = await chusky.tasks.list({ limit: 20 });
|
|
10
10
|
const task = await chusky.tasks.get("task_123");
|
|
11
|
+
|
|
12
|
+
await chusky.tasks.retry(task.id);
|
|
13
|
+
await chusky.tasks.cancel(task.id);
|
|
11
14
|
```
|
|
12
15
|
|
|
13
16
|
Tasks are durable and retried by the server workflow layer. Treat `queued`, `running`, `blocked`, `completed`, `failed`, and `cancelled` as distinct states. A blocked task may require an approval or user input rather than a blind retry.
|
package/docs.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://mintlify.com/docs.json",
|
|
3
|
+
"name": "Chusky",
|
|
4
|
+
"colors": { "primary": "#111111", "light": "#f7f7f4", "dark": "#111111" },
|
|
5
|
+
"navigation": {
|
|
6
|
+
"tabs": [
|
|
7
|
+
{ "tab": "Documentation", "groups": [
|
|
8
|
+
{ "group": "Start here", "pages": ["docs/index", "docs/quickstart", "docs/concepts"] },
|
|
9
|
+
{ "group": "Build with Chusky", "pages": ["docs/company-workspaces", "docs/embedded-chat", "docs/calls", "docs/meetings", "docs/streaming", "docs/models", "docs/files", "docs/approvals", "docs/tasks", "docs/policies", "docs/structured-output", "docs/fallbacks", "docs/budgets", "docs/capabilities", "docs/architecture"] },
|
|
10
|
+
{ "group": "Production", "pages": ["docs/webhooks", "docs/security", "docs/errors", "docs/releases", "docs/production"] }
|
|
11
|
+
] },
|
|
12
|
+
{ "tab": "API Reference", "openapi": "openapi.yaml", "pages": ["docs/api-contract"] }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
package/openapi.yaml
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Chusky Developer API
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Self-hosted Chusky SDK API. Project/root API keys are server-side only. The first-party web dashboard may authenticate user-scoped resources with its Better Auth session cookie.
|
|
6
|
+
servers:
|
|
7
|
+
- url: https://your-chusky.example/v1
|
|
8
|
+
security:
|
|
9
|
+
- bearerAuth: []
|
|
10
|
+
paths:
|
|
11
|
+
/admin/projects:
|
|
12
|
+
get: { summary: List root-managed developer projects, responses: { '200': { description: OK } } }
|
|
13
|
+
post: { summary: Create a developer project and return its key exactly once, responses: { '201': { description: Created } } }
|
|
14
|
+
/admin/audit-events:
|
|
15
|
+
get: { summary: List root control-plane audit events, responses: { '200': { description: OK } } }
|
|
16
|
+
/admin/projects/{projectId}:
|
|
17
|
+
patch: { summary: Replace scopes for an active project, responses: { '200': { description: Updated } } }
|
|
18
|
+
delete: { summary: Revoke a developer project key, responses: { '204': { description: Revoked } } }
|
|
19
|
+
/admin/projects/{projectId}/rotate-key:
|
|
20
|
+
post: { summary: Replace a project key and return the new value exactly once, responses: { '201': { description: Rotated } } }
|
|
21
|
+
/account/projects:
|
|
22
|
+
get: { summary: List personal projects or projects attached to a verified organization member, responses: { '200': { description: OK } } }
|
|
23
|
+
post: { summary: Create a personal or organization project and return its key exactly once, responses: { '201': { description: Created }, '403': { description: Dashboard session, verified email, or organization admin required }, '409': { description: Active key limit reached } } }
|
|
24
|
+
/account/projects/{projectId}:
|
|
25
|
+
patch: { summary: Replace scopes for the authenticated owner's active project key, responses: { '200': { description: Updated }, '404': { description: Not found } } }
|
|
26
|
+
delete: { summary: Revoke the authenticated owner's project key, responses: { '204': { description: Revoked }, '404': { description: Not found } } }
|
|
27
|
+
/account/projects/{projectId}/rotate-key:
|
|
28
|
+
post: { summary: Rotate the authenticated owner's project key and return it exactly once, responses: { '201': { description: Rotated }, '404': { description: Not found } } }
|
|
29
|
+
/account/projects/{projectId}/company/runs:
|
|
30
|
+
get: { summary: List status-only company run summaries for a workspace owner or admin, responses: { '200': { description: OK }, '404': { description: Not found } } }
|
|
31
|
+
/account/projects/{projectId}/company/audit-events:
|
|
32
|
+
get: { summary: List bounded company project audit events for a workspace owner or admin, responses: { '200': { description: OK }, '404': { description: Not found } } }
|
|
33
|
+
/account/projects/{projectId}/company/usage:
|
|
34
|
+
get: { summary: Read company project usage for a workspace owner or admin, responses: { '200': { description: OK }, '404': { description: Not found } } }
|
|
35
|
+
/account/projects/{projectId}/policy:
|
|
36
|
+
get: { summary: Read an organization project policy as a verified member, responses: { '200': { description: OK }, '404': { description: Not found } } }
|
|
37
|
+
put: { summary: Replace project tool grants and per-run budgets as an owner or admin, responses: { '200': { description: Updated }, '400': { description: Invalid policy }, '404': { description: Not found } } }
|
|
38
|
+
/account/projects/{projectId}/agents:
|
|
39
|
+
get: { summary: List organization project agent profiles as a verified member, responses: { '200': { description: OK }, '404': { description: Not found } } }
|
|
40
|
+
post: { summary: Create a template-based company agent profile as an owner or admin, responses: { '201': { description: Created }, '404': { description: Not found } } }
|
|
41
|
+
/agents/templates:
|
|
42
|
+
get: { summary: List built-in company agent templates, responses: { '200': { description: OK } } }
|
|
43
|
+
/agents:
|
|
44
|
+
get: { summary: List agent profiles belonging to the current project key, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
45
|
+
post: { summary: Create a template-based agent profile within the current project, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Created }, '403': { description: Invalid template or grant } } }
|
|
46
|
+
/agents/{agentId}:
|
|
47
|
+
get: { summary: Get one current-project agent profile, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
48
|
+
patch: { summary: Update a current-project agent profile, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Updated } } }
|
|
49
|
+
delete: { summary: Delete a current-project agent profile, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
50
|
+
/account/overview:
|
|
51
|
+
get: { summary: Get the authenticated account overview, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
52
|
+
/account/models:
|
|
53
|
+
get: { summary: List models available to the authenticated account, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
54
|
+
/account/organizations/{organizationId}/branding:
|
|
55
|
+
get: { summary: Get safe workspace branding, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: organizationId, in: path, required: true, schema: { type: string } }], responses: { '200': { description: Branding } } }
|
|
56
|
+
put: { summary: Update safe workspace branding as an owner or admin, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: organizationId, in: path, required: true, schema: { type: string } }], responses: { '200': { description: Updated branding } } }
|
|
57
|
+
/account/preferences:
|
|
58
|
+
get: { summary: Get account model and voice preferences, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Preferences } } }
|
|
59
|
+
patch: { summary: Update account model and voice preferences, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated } } }
|
|
60
|
+
/account/voice-options:
|
|
61
|
+
get: { summary: List deployment-supported Flux and Bland voice options, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Voice catalogue and provider availability } } }
|
|
62
|
+
/account/telegram-link:
|
|
63
|
+
post: { summary: Create a Telegram linking code for the account, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Linking code } } }
|
|
64
|
+
/account/calls:
|
|
65
|
+
get: { summary: List account voice calls with redacted destinations, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
66
|
+
post: { summary: Create an approval-gated outbound voice call request, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Pending approval } } }
|
|
67
|
+
/meetings:
|
|
68
|
+
get: { summary: List owner-scoped Recall meeting preparations, meetings, participants, and contacts, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
69
|
+
post: { summary: Join or schedule a Recall meeting, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Meeting lifecycle record } } }
|
|
70
|
+
/meetings/prepare:
|
|
71
|
+
post: { summary: Generate a private client-bound meeting brief without joining, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Prepared meeting mission } } }
|
|
72
|
+
/meetings/profile:
|
|
73
|
+
get: { summary: Get the account meeting representative profile, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Profile } } }
|
|
74
|
+
patch: { summary: Update the account meeting representative profile, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated profile } } }
|
|
75
|
+
/meetings/preparations/{preparationId}/join:
|
|
76
|
+
post: { summary: Join a verified calendar meeting preparation without returning its URL, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: preparationId, in: path, required: true, schema: { type: string } }], responses: { '201': { description: Meeting lifecycle record } } }
|
|
77
|
+
/meetings/{meetingId}:
|
|
78
|
+
get: { summary: Get one owner-scoped Recall meeting, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: meetingId, in: path, required: true, schema: { type: string } }], responses: { '200': { description: Meeting lifecycle record }, '404': { description: Not found } } }
|
|
79
|
+
/meetings/{meetingId}/leave:
|
|
80
|
+
post: { summary: Ask Recall to leave an owner-scoped meeting, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }, { name: meetingId, in: path, required: true, schema: { type: string } }], responses: { '200': { description: Updated meeting lifecycle record } } }
|
|
81
|
+
/meetings/{meetingId}/context:
|
|
82
|
+
get: { summary: Query the active representative meeting's approved business and relationship context, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: meetingId, in: path, required: true, schema: { type: string } }, { name: query, in: query, required: true, schema: { type: string, maxLength: 500 } }], responses: { '200': { description: Meeting context } } }
|
|
83
|
+
/meetings/contacts/{contactId}:
|
|
84
|
+
delete: { summary: Delete an owner-scoped meeting follow-up contact, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: contactId, in: path, required: true, schema: { type: string } }], responses: { '204': { description: Deleted }, '404': { description: Not found } } }
|
|
85
|
+
/apps:
|
|
86
|
+
get: { summary: List connected app toolkits, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
87
|
+
/apps/{toolkit}/connect:
|
|
88
|
+
post: { summary: Start connecting an app toolkit, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: OAuth connection URL } } }
|
|
89
|
+
/apps/connections:
|
|
90
|
+
get: { summary: List connected Composio accounts, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
91
|
+
/apps/connections/{connectionId}:
|
|
92
|
+
delete: { summary: Disconnect an owned Composio account, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Disconnected } } }
|
|
93
|
+
/triggers:
|
|
94
|
+
get: { summary: List account triggers, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
95
|
+
post: { summary: Create an account trigger, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Created } } }
|
|
96
|
+
/triggers/catalog/toolkits:
|
|
97
|
+
get: { summary: List Composio trigger-capable app toolkits, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
98
|
+
/triggers/catalog/toolkits/{toolkit}:
|
|
99
|
+
get: { summary: List paginated trigger types for an app toolkit, parameters: [{ $ref: '#/components/parameters/UserId' }, { name: toolkit, in: path, required: true, schema: { type: string } }], responses: { '200': { description: OK } } }
|
|
100
|
+
/triggers/{triggerId}:
|
|
101
|
+
patch: { summary: Enable or disable an account trigger, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated } } }
|
|
102
|
+
delete: { summary: Delete an account trigger, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
103
|
+
/threads:
|
|
104
|
+
get:
|
|
105
|
+
summary: List a user's threads
|
|
106
|
+
parameters: [{ $ref: '#/components/parameters/UserId' }]
|
|
107
|
+
responses: { '200': { description: OK } }
|
|
108
|
+
post:
|
|
109
|
+
summary: Create a thread
|
|
110
|
+
parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }]
|
|
111
|
+
responses: { '201': { description: Created } }
|
|
112
|
+
/threads/{threadId}:
|
|
113
|
+
get: { summary: Get one thread, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
114
|
+
patch: { summary: Update thread metadata, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated } } }
|
|
115
|
+
delete: { summary: Delete an idle thread, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
116
|
+
/threads/{threadId}/runs:
|
|
117
|
+
get:
|
|
118
|
+
summary: List runs for a thread
|
|
119
|
+
parameters: [{ $ref: '#/components/parameters/UserId' }]
|
|
120
|
+
responses: { '200': { description: Cursor page } }
|
|
121
|
+
post:
|
|
122
|
+
summary: Run Chusky synchronously or queue a durable task with wait=false
|
|
123
|
+
parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }]
|
|
124
|
+
responses: { '201': { description: Created } }
|
|
125
|
+
/threads/{threadId}/runs/stream:
|
|
126
|
+
post:
|
|
127
|
+
summary: Stream an NDJSON agent run
|
|
128
|
+
parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }]
|
|
129
|
+
responses: { '200': { description: NDJSON stream } }
|
|
130
|
+
/threads/{threadId}/runs/{runId}:
|
|
131
|
+
get: { summary: Get a run, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
132
|
+
/threads/{threadId}/runs/{runId}/cancel:
|
|
133
|
+
post: { summary: Cancel a running run, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Cancelled } } }
|
|
134
|
+
/threads/{threadId}/runs/{runId}/resume:
|
|
135
|
+
post: { summary: Resume a failed, cancelled, or approval-paused run as a new durable run, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Resumed } } }
|
|
136
|
+
/threads/{threadId}/runs/{runId}/events:
|
|
137
|
+
get: { summary: Recover persisted run events, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
138
|
+
/threads/{threadId}/runs/{runId}/trace:
|
|
139
|
+
get: { summary: Inspect the durable model/tool/handoff trace; include_state=true returns the bounded checkpoint, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Durable trace } } }
|
|
140
|
+
/approvals/{approvalId}:
|
|
141
|
+
get: { summary: Get a pending approval, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
142
|
+
post: { summary: Approve or deny then resume safely, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Run result } } }
|
|
143
|
+
/tasks:
|
|
144
|
+
get: { summary: List tasks for an SDK user, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
145
|
+
/tasks/{taskId}:
|
|
146
|
+
get: { summary: Get one task, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
147
|
+
/tasks/{taskId}/retry:
|
|
148
|
+
post: { summary: Retry a failed, blocked, or cancelled task, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Requeued } } }
|
|
149
|
+
/tasks/{taskId}/cancel:
|
|
150
|
+
post: { summary: Cancel a queued or running task, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Cancelled } } }
|
|
151
|
+
/files:
|
|
152
|
+
post: { summary: Create a direct R2 upload URL, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Presigned URL } } }
|
|
153
|
+
/files/{fileId}:
|
|
154
|
+
get: { summary: Create a direct R2 download URL, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Presigned URL } } }
|
|
155
|
+
delete: { summary: Delete an owned R2 object and its file record, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
156
|
+
/files/{fileId}/complete:
|
|
157
|
+
post: { summary: Verify an uploaded R2 object before it becomes downloadable, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '200': { description: Verified file } } }
|
|
158
|
+
/audit-events:
|
|
159
|
+
get: { summary: List bounded SDK audit events, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
160
|
+
/company/runs:
|
|
161
|
+
get: { summary: List status-only run summaries aggregated across callers of this company project; requires company:read, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK }, '404': { description: Not a company project } } }
|
|
162
|
+
/company/audit-events:
|
|
163
|
+
get: { summary: List bounded project audit events; requires company:read, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK }, '404': { description: Not a company project } } }
|
|
164
|
+
/company/usage:
|
|
165
|
+
get: { summary: Get monthly completed-run and model-cost totals for this company project; requires company:read, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK }, '404': { description: Not a company project } } }
|
|
166
|
+
/usage:
|
|
167
|
+
get: { summary: Get current SDK-user usage totals, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
168
|
+
/webhooks:
|
|
169
|
+
get: { summary: List webhook subscriptions, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
170
|
+
post: { summary: Create an HTTPS webhook subscription, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Created } } }
|
|
171
|
+
/webhooks/{webhookId}:
|
|
172
|
+
patch: { summary: Enable or disable a webhook subscription, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated } } }
|
|
173
|
+
delete: { summary: Disable a webhook subscription, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Disabled } } }
|
|
174
|
+
/webhooks/{webhookId}/deliveries:
|
|
175
|
+
get: { summary: List bounded delivery attempts for a subscription, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
176
|
+
/webhooks/{webhookId}/deliveries/{deliveryId}/retry:
|
|
177
|
+
post: { summary: Requeue a failed webhook delivery, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Requeued } } }
|
|
178
|
+
/approvals:
|
|
179
|
+
get: { summary: List pending approvals for the SDK user, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
180
|
+
/tools:
|
|
181
|
+
get: { summary: List native and connected Composio tools, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
182
|
+
/tools/{slug}:
|
|
183
|
+
get: { summary: Get one tool by exact slug, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
184
|
+
/skills:
|
|
185
|
+
get: { summary: Search the trusted project skill catalogue, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
186
|
+
/skills/{name}/files:
|
|
187
|
+
get: { summary: List all files bundled in a skill, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
188
|
+
/skills/{name}/files/read:
|
|
189
|
+
get: { summary: Read a bounded text file from a skill, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
190
|
+
/artifacts:
|
|
191
|
+
get: { summary: List durable Daytona artifacts, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
192
|
+
/artifacts/{id}:
|
|
193
|
+
get: { summary: Get an artifact record, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
194
|
+
delete: { summary: Delete an owned artifact record, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
195
|
+
/artifacts/{id}/download:
|
|
196
|
+
get: { summary: Download an artifact from the persistent Daytona workspace, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Binary artifact bytes } } }
|
|
197
|
+
/videos:
|
|
198
|
+
get: { summary: List video generation jobs, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
199
|
+
post: { summary: Queue a durable video generation job, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '202': { description: Queued } } }
|
|
200
|
+
/videos/{id}:
|
|
201
|
+
get: { summary: Get video job status, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
202
|
+
/videos/{id}/cancel:
|
|
203
|
+
post: { summary: Cancel a queued video job, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Cancelled } } }
|
|
204
|
+
/workers:
|
|
205
|
+
get: { summary: List durable sub-agent delegations, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
206
|
+
post: { summary: Create a typed durable sub-agent delegation under Chusky supervision, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '202': { description: Queued } } }
|
|
207
|
+
/workers/{id}:
|
|
208
|
+
get: { summary: Get a sub-agent delegation and its contract, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
209
|
+
/workers/{id}/cancel:
|
|
210
|
+
post: { summary: Cancel a sub-agent delegation, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Cancelled } } }
|
|
211
|
+
/channels:
|
|
212
|
+
get: { summary: List verified channel connections, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
213
|
+
/channels/link-code:
|
|
214
|
+
post: { summary: Create a one-time link code for Slack, WhatsApp, or Sendblue, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Link instructions } } }
|
|
215
|
+
/channels/{provider}/{identityId}:
|
|
216
|
+
patch: { summary: Enable or disable proactive delivery for a linked channel, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated } } }
|
|
217
|
+
delete: { summary: Unlink an owned channel identity, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Unlinked } } }
|
|
218
|
+
/devices:
|
|
219
|
+
get: { summary: List active CLI devices without bearer tokens, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
220
|
+
/devices/{deviceId}:
|
|
221
|
+
delete: { summary: Revoke an owned CLI device, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Revoked } } }
|
|
222
|
+
/reminders:
|
|
223
|
+
get: { summary: List one-time reminders, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
224
|
+
post: { summary: Schedule a one-time reminder, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Scheduled } } }
|
|
225
|
+
/reminders/{id}:
|
|
226
|
+
delete: { summary: Cancel an owned reminder, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Cancelled } } }
|
|
227
|
+
/jobs:
|
|
228
|
+
get: { summary: List recurring schedules, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
229
|
+
post: { summary: Create a recurring QStash schedule, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Scheduled } } }
|
|
230
|
+
/jobs/{id}:
|
|
231
|
+
delete: { summary: Cancel an owned recurring schedule, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Cancelled } } }
|
|
232
|
+
/scratchpad:
|
|
233
|
+
get: { summary: Search private scratchpad notes, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
234
|
+
delete: { summary: Clear private scratchpad notes, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Cleared } } }
|
|
235
|
+
/scratchpad/{key}:
|
|
236
|
+
put: { summary: Write a private scratchpad note, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: Updated } } }
|
|
237
|
+
delete: { summary: Delete a private scratchpad note, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
238
|
+
/memory:
|
|
239
|
+
get: { summary: Search explicit structured memory, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
240
|
+
post: { summary: Save an explicit structured memory fact, parameters: [{ $ref: '#/components/parameters/UserId' }, { $ref: '#/components/parameters/IdempotencyKey' }], responses: { '201': { description: Saved } } }
|
|
241
|
+
/memory/{id}:
|
|
242
|
+
delete: { summary: Forget an owned memory fact, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '204': { description: Deleted } } }
|
|
243
|
+
/deliveries:
|
|
244
|
+
get: { summary: List outbound channel delivery receipts, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
245
|
+
/activity:
|
|
246
|
+
get: { summary: Get a bounded activity feed for polling dashboards, parameters: [{ $ref: '#/components/parameters/UserId' }], responses: { '200': { description: OK } } }
|
|
247
|
+
components:
|
|
248
|
+
securitySchemes:
|
|
249
|
+
bearerAuth: { type: http, scheme: bearer }
|
|
250
|
+
parameters:
|
|
251
|
+
UserId: { name: X-Chusky-User-Id, in: header, required: true, schema: { type: string, maxLength: 200 } }
|
|
252
|
+
IdempotencyKey: { name: Idempotency-Key, in: header, required: false, schema: { type: string, maxLength: 255 } }
|
package/package.json
CHANGED
|
@@ -1,36 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@chusky/sdk",
|
|
3
|
-
"version": "0.
|
|
1
|
+
{
|
|
2
|
+
"name": "@chusky/sdk",
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "TypeScript SDK for Chusky's developer API.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/zester4/chusky-sdk.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/zester4/chusky-sdk/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/zester4/chusky-sdk#readme",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
11
22
|
".": {
|
|
12
23
|
"types": "./dist/index.d.ts",
|
|
13
24
|
"import": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./widget": {
|
|
27
|
+
"types": "./dist/widget.d.ts",
|
|
28
|
+
"import": "./dist/widget.js"
|
|
14
29
|
}
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"README.md",
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md",
|
|
19
34
|
"docs",
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
"docs.json",
|
|
36
|
+
"openapi.yaml",
|
|
37
|
+
"CHANGELOG.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc -p tsconfig.json",
|
|
45
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
46
|
+
"test": "tsx --test --test-concurrency=1 tests/*.test.ts",
|
|
47
|
+
"prepublishOnly": "npm run typecheck && npm run build && npm test"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/node": "^22.0.0",
|
|
51
|
+
"tsx": "^4.19.0",
|
|
52
|
+
"typescript": "^5.7.0"
|
|
53
|
+
}
|
|
54
|
+
}
|