@sulala/agent 0.1.13 → 0.1.14
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/README.md +3 -3
- package/dashboard/dist/assets/index-DegBJNv6.css +1 -0
- package/dashboard/dist/assets/index-pVHpAj3h.js +83 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/agent/loop.d.ts.map +1 -1
- package/dist/agent/loop.js +21 -6
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/skill-generate.d.ts +1 -1
- package/dist/agent/skill-generate.d.ts.map +1 -1
- package/dist/agent/skill-generate.js +10 -3
- package/dist/agent/skill-generate.js.map +1 -1
- package/dist/agent/skill-install.d.ts +12 -1
- package/dist/agent/skill-install.d.ts.map +1 -1
- package/dist/agent/skill-install.js +130 -15
- package/dist/agent/skill-install.js.map +1 -1
- package/dist/agent/skills.d.ts +4 -3
- package/dist/agent/skills.d.ts.map +1 -1
- package/dist/agent/skills.js +53 -25
- package/dist/agent/skills.js.map +1 -1
- package/dist/agent/tool/spec-loader.d.ts +7 -0
- package/dist/agent/tool/spec-loader.d.ts.map +1 -0
- package/dist/agent/tool/spec-loader.js +540 -0
- package/dist/agent/tool/spec-loader.js.map +1 -0
- package/dist/agent/tools.d.ts.map +1 -1
- package/dist/agent/tools.integrations.test.js +4 -5
- package/dist/agent/tools.integrations.test.js.map +1 -1
- package/dist/agent/tools.js +144 -367
- package/dist/agent/tools.js.map +1 -1
- package/dist/ai/orchestrator.d.ts.map +1 -1
- package/dist/ai/orchestrator.js +82 -17
- package/dist/ai/orchestrator.js.map +1 -1
- package/dist/cli.d.ts +4 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +16 -8
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +20 -5
- package/dist/config.js.map +1 -1
- package/dist/db/index.d.ts +14 -7
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +108 -30
- package/dist/db/index.js.map +1 -1
- package/dist/gateway/server.d.ts.map +1 -1
- package/dist/gateway/server.js +141 -15
- package/dist/gateway/server.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/onboard-env.d.ts +1 -1
- package/dist/onboard-env.d.ts.map +1 -1
- package/dist/onboard-env.js +2 -0
- package/dist/onboard-env.js.map +1 -1
- package/dist/types.d.ts +5 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +1 -2
- package/dist/watcher/index.js.map +1 -1
- package/package.json +4 -5
- package/src/index.ts +1 -1
- package/context/00-rules.md +0 -1
- package/context/airtable.md +0 -35
- package/context/apple-notes.md +0 -99
- package/context/asana.md +0 -37
- package/context/bluesky.md +0 -46
- package/context/calendar.md +0 -63
- package/context/country-info.md +0 -13
- package/context/create-skill.md +0 -128
- package/context/discord.md +0 -30
- package/context/docs.md +0 -29
- package/context/drive.md +0 -49
- package/context/dropbox.md +0 -39
- package/context/facebook.md +0 -47
- package/context/fetch-form-api.md +0 -16
- package/context/figma.md +0 -30
- package/context/files.md +0 -30
- package/context/git.md +0 -37
- package/context/github.md +0 -58
- package/context/gmail.md +0 -52
- package/context/google.md +0 -28
- package/context/hellohub.md +0 -29
- package/context/jira.md +0 -46
- package/context/linear.md +0 -40
- package/context/news.md +0 -64
- package/context/notion.md +0 -45
- package/context/portal-integrations.md +0 -42
- package/context/post-to-x.md +0 -50
- package/context/sheets.md +0 -47
- package/context/slack.md +0 -48
- package/context/slides.md +0 -35
- package/context/stripe.md +0 -38
- package/context/tes.md +0 -7
- package/context/test.md +0 -7
- package/context/weather.md +0 -32
- package/context/zoom.md +0 -28
- package/dashboard/dist/assets/index-BTx-9jCj.css +0 -1
- package/dashboard/dist/assets/index-B_QGQ8c_.js +0 -83
- package/registry/apple-notes.md +0 -99
- package/registry/bluesky.md +0 -34
- package/registry/files.md +0 -30
- package/registry/git.md +0 -37
- package/registry/news.md +0 -64
- package/registry/skills-registry.json +0 -46
- package/registry/weather.md +0 -32
package/dist/watcher/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import chokidar from 'chokidar';
|
|
2
2
|
import { statSync } from 'fs';
|
|
3
3
|
import { config } from '../config.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getDb, log, upsertFileState, insertTask } from '../db/index.js';
|
|
5
5
|
import { getWatchFoldersFromAutomations } from '../workspace-automations.js';
|
|
6
6
|
import { enqueue } from '../scheduler/queue.js';
|
|
7
7
|
let watcher = null;
|
|
@@ -37,7 +37,6 @@ function emit(event, path, stats) {
|
|
|
37
37
|
export function startWatcher(folders = null, options = {}) {
|
|
38
38
|
if (watcher)
|
|
39
39
|
return watcher;
|
|
40
|
-
initDb(config.dbPath);
|
|
41
40
|
const paths = folders?.length ? folders : config.watchFolders;
|
|
42
41
|
if (!paths.length) {
|
|
43
42
|
console.log('[watcher] Not started — no watch folders configured');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/watcher/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAA4B,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/watcher/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAA4B,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAA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
|
1
1
|
{
|
|
2
2
|
"name": "@sulala/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Local AI orchestration platform — file watcher, task scheduler, AI layer, plugins",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"dist",
|
|
39
39
|
"bin",
|
|
40
40
|
"src/db/schema.sql",
|
|
41
|
-
"registry",
|
|
42
41
|
"context",
|
|
43
42
|
"dashboard/dist"
|
|
44
43
|
],
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"sulala": "bin/sulala.mjs"
|
|
51
50
|
},
|
|
52
51
|
"dependencies": {
|
|
53
|
-
"
|
|
52
|
+
"sql.js": "^1.14.0",
|
|
54
53
|
"chokidar": "^4.0.1",
|
|
55
54
|
"cors": "^2.8.5",
|
|
56
55
|
"dotenv": "^16.4.5",
|
|
@@ -58,7 +57,8 @@
|
|
|
58
57
|
"grammy": "^1.40.1",
|
|
59
58
|
"node-cron": "^3.0.3",
|
|
60
59
|
"openai": "^6.25.0",
|
|
61
|
-
"ws": "^8.18.0"
|
|
60
|
+
"ws": "^8.18.0",
|
|
61
|
+
"yaml": "^2.7.0"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
64
|
"@mariozechner/pi-agent-core": "0.54.0",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"electron": "^33.2.0",
|
|
70
70
|
"electron-builder": "^25.1.8",
|
|
71
71
|
"@eslint/js": "^10.0.1",
|
|
72
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
73
72
|
"@types/cors": "^2.8.19",
|
|
74
73
|
"@types/express": "^5.0.6",
|
|
75
74
|
"@types/node": "^25.3.1",
|
package/src/index.ts
CHANGED
|
@@ -88,7 +88,7 @@ async function runAgentJobAndNotify(payload: unknown): Promise<void> {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
async function main(): Promise<void> {
|
|
91
|
-
initDb(config.dbPath);
|
|
91
|
+
await initDb(config.dbPath);
|
|
92
92
|
if (process.env.SULALA_OLLAMA_AUTO_INSTALL === '1') {
|
|
93
93
|
ensureOllamaInstalled();
|
|
94
94
|
} else {
|
package/context/00-rules.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
You always respond in exactly two sentences. Never use one sentence or three; always exactly two.
|
package/context/airtable.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: airtable
|
|
3
|
-
description: Use Airtable (bases, records) via the Portal. When the user asks about Airtable bases or records, list connections with list_integrations_connections (provider airtable) and use run_command with curl to the Airtable API or gateway.
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "📊",
|
|
8
|
-
"requires": { "bins": ["curl"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Airtable
|
|
14
|
-
|
|
15
|
-
1. **list_integrations_connections** with `provider: "airtable"` → get `connection_id`.
|
|
16
|
-
2. **get_connection_token** with that `connection_id` → returns `accessToken` (do not curl the portal).
|
|
17
|
-
3. **run_command (curl)** with `Authorization: Bearer <accessToken>` and `Content-Type: application/json`.
|
|
18
|
-
|
|
19
|
-
Airtable API uses **base ID** and **table name or ID**. Add `api.airtable.com` to **ALLOWED_CURL_HOSTS**. Official docs: https://airtable.com/developers/web/api/introduction
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Bases and tables
|
|
24
|
-
|
|
25
|
-
- **List bases**: `GET https://api.airtable.com/v0/meta/bases`. Returns `bases[].id`, `bases[].name`. Use base `id` in table URLs.
|
|
26
|
-
- **List tables** (schema) in a base: `GET https://api.airtable.com/v0/meta/bases/<baseId>/tables`. Returns table names and field definitions.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Records
|
|
31
|
-
|
|
32
|
-
- **List records** (one table): `GET https://api.airtable.com/v0/<baseId>/<tableNameOrId>?maxRecords=20`. Optional: `?filterByFormula=<formula>`, `?sort[0][field]=Name`. Returns `records[].id`, `records[].fields`.
|
|
33
|
-
- **Create record**: `POST https://api.airtable.com/v0/<baseId>/<tableNameOrId>` with body `{"fields": {"Name": "Value", "OtherField": "Value"}}`. Field names must match the table schema.
|
|
34
|
-
|
|
35
|
-
Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Airtable in the Portal. Base must be shared with the connected account.
|
package/context/apple-notes.md
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: apple-notes
|
|
3
|
-
description: Manage Apple Notes via the `memo` CLI on macOS. Use when the user asks to add a note, list notes, search notes, or manage note folders.
|
|
4
|
-
homepage: https://github.com/antoniorodr/memo
|
|
5
|
-
metadata:
|
|
6
|
-
{
|
|
7
|
-
"sulala":
|
|
8
|
-
{
|
|
9
|
-
"emoji": "📝",
|
|
10
|
-
"os": ["darwin"],
|
|
11
|
-
"requires": { "bins": ["memo"] },
|
|
12
|
-
"install":
|
|
13
|
-
[
|
|
14
|
-
{
|
|
15
|
-
"id": "brew",
|
|
16
|
-
"kind": "brew",
|
|
17
|
-
"formula": "antoniorodr/memo/memo",
|
|
18
|
-
"bins": ["memo"],
|
|
19
|
-
"label": "Install memo via Homebrew",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
# Apple Notes CLI
|
|
27
|
-
|
|
28
|
-
Use `memo notes` to manage Apple Notes directly from the terminal. Create, view, edit, delete, search, move notes between folders, and export to HTML/Markdown.
|
|
29
|
-
|
|
30
|
-
Setup
|
|
31
|
-
|
|
32
|
-
- Install (Homebrew): `brew tap antoniorodr/memo && brew install antoniorodr/memo/memo`
|
|
33
|
-
- Manual (pip): `pip install .` (after cloning the repo)
|
|
34
|
-
- macOS-only; if prompted, grant Automation access to Notes.app.
|
|
35
|
-
|
|
36
|
-
View Notes
|
|
37
|
-
|
|
38
|
-
- List all notes: `memo notes`
|
|
39
|
-
- Filter by folder: `memo notes -f "Folder Name"`
|
|
40
|
-
- Search notes (fuzzy): `memo notes -s "query"`
|
|
41
|
-
|
|
42
|
-
Create Notes
|
|
43
|
-
|
|
44
|
-
- **Add a note (prefer AppleScript):** For "add a note titled X", use **run_command** with `binary: "osascript"` and the AppleScript in the section below. Do not use memo for non-interactive add.
|
|
45
|
-
- Add via memo (interactive only): `memo notes -a -f "FolderName"` — **requires** `-f` (folder). Opens the user's editor; memo does **not** accept title or body as arguments. Use only as fallback if osascript is unavailable.
|
|
46
|
-
|
|
47
|
-
Edit Notes
|
|
48
|
-
|
|
49
|
-
- Edit existing note: `memo notes -e`
|
|
50
|
-
- Interactive selection of note to edit.
|
|
51
|
-
|
|
52
|
-
Delete Notes
|
|
53
|
-
|
|
54
|
-
- Delete a note: `memo notes -d`
|
|
55
|
-
- Interactive selection of note to delete.
|
|
56
|
-
|
|
57
|
-
Move Notes
|
|
58
|
-
|
|
59
|
-
- Move note to folder: `memo notes -m`
|
|
60
|
-
- Interactive selection of note and destination folder.
|
|
61
|
-
|
|
62
|
-
Export Notes
|
|
63
|
-
|
|
64
|
-
- Export to HTML/Markdown: `memo notes -ex`
|
|
65
|
-
- Exports selected note; uses Mistune for markdown processing.
|
|
66
|
-
|
|
67
|
-
Limitations
|
|
68
|
-
|
|
69
|
-
- Cannot edit notes containing images or attachments.
|
|
70
|
-
- Interactive prompts may require terminal access.
|
|
71
|
-
|
|
72
|
-
Notes
|
|
73
|
-
|
|
74
|
-
- macOS-only.
|
|
75
|
-
- Requires Apple Notes.app to be accessible.
|
|
76
|
-
- For automation, grant permissions in System Settings > Privacy & Security > Automation.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## When the user asks you to add a note
|
|
81
|
-
|
|
82
|
-
Your goal is to get the note into Apple Notes. Use **run_command** only (no skill-specific tools). Add osascript and memo to ALLOWED_BINARIES.
|
|
83
|
-
|
|
84
|
-
**Prefer AppleScript for "add a note titled X".** Use the osascript one-liner below so the agent creates the note in one shot instead of trying memo (which is interactive and does not accept title as an argument).
|
|
85
|
-
|
|
86
|
-
1. **Adding a note directly (macOS)**
|
|
87
|
-
- Use **run_command** with `binary: "osascript"` and one `-e` argument containing this AppleScript. Replace TITLE and BODY with the user's note title and optional body; escape any double-quote in TITLE or BODY as backslash-quote (`\"`).
|
|
88
|
-
- Script (use `\n` for newlines in the string you pass):
|
|
89
|
-
`tell application "Notes"\ntell account "iCloud"\ntell folder "Notes"\nmake new note with properties {name:"TITLE", body:"BODY"}\nend tell\nend tell\nend tell`
|
|
90
|
-
- Example for "add apple note called buy saisai": args = `["-e", "tell application \"Notes\"\ntell account \"iCloud\"\ntell folder \"Notes\"\nmake new note with properties {name:\"buy saisai\", body:\"\"}\nend tell\nend tell\nend tell"]`
|
|
91
|
-
- On success, confirm: "Done — I added an Apple Note titled \"…\"."
|
|
92
|
-
- If osascript is not in ALLOWED_BINARIES or the command errors: give the user the note text and steps to run `memo notes -a -f "Notes"` in the terminal and paste the content when the editor opens.
|
|
93
|
-
|
|
94
|
-
2. **List and search**
|
|
95
|
-
- **run_command** with `binary: "memo"`, `args: ["notes"]` for list; `args: ["notes", "-s", "query"]` for search.
|
|
96
|
-
|
|
97
|
-
3. **Do not**
|
|
98
|
-
- Do not use run_command with memo `["notes", "-a", "title"]`; memo rejects extra arguments.
|
|
99
|
-
- Do not leave the user without a path to success: either add via osascript (run_command) or give text + steps for memo notes -a, or explain why (e.g. add osascript to ALLOWED_BINARIES).
|
package/context/asana.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: asana
|
|
3
|
-
description: Use Asana (workspaces, projects, tasks) via the Portal. When the user asks about Asana tasks or projects, list connections with list_integrations_connections (provider asana) and use run_command with curl to the Asana API or gateway.
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "✅",
|
|
8
|
-
"requires": { "bins": ["curl"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Asana
|
|
14
|
-
|
|
15
|
-
1. **list_integrations_connections** with `provider: "asana"` → get `connection_id`.
|
|
16
|
-
2. **get_connection_token** with that `connection_id` → returns `accessToken` (do not curl the portal).
|
|
17
|
-
3. **run_command (curl)** with `Authorization: Bearer <accessToken>` and `Content-Type: application/json`.
|
|
18
|
-
|
|
19
|
-
Base URL: `https://app.asana.com/api/1.0`. Add `app.asana.com` to **ALLOWED_CURL_HOSTS**. Official docs: https://developers.asana.com/reference/rest-api-reference
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Workspaces and projects
|
|
24
|
-
|
|
25
|
-
- **List workspaces**: `GET https://app.asana.com/api/1.0/workspaces`. Returns `data[].gid`, `data[].name`.
|
|
26
|
-
- **List projects** (in workspace): `GET https://app.asana.com/api/1.0/workspaces/<workspace_gid>/projects`. Returns `data[].gid`, `data[].name`.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Tasks
|
|
31
|
-
|
|
32
|
-
- **List tasks** (in project): `GET https://app.asana.com/api/1.0/projects/<project_gid>/tasks?opt_fields=name,completed,due_on,notes`. Returns `data[].gid`, `data[].name`, etc. Pagination: `offset`, `limit`.
|
|
33
|
-
- **Create task**: `POST https://app.asana.com/api/1.0/tasks` with header `Content-Type: application/json` and body `{"data": {"name": "Task title", "projects": ["<project_gid>"]}}`. The `projects` value must be an array of one or more project GID **strings** from `GET /workspaces/<workspace_gid>/projects` (e.g. `["1213334948480995"]`). Do **not** send `workspace` when sending `projects`—the API will error. Optional in `data`: `"notes": "Description"`, `"due_on": "YYYY-MM-DD"`. Flow: (1) GET `/workspaces` → pick a workspace `gid`, (2) GET `/workspaces/<workspace_gid>/projects` → pick a project `gid`, (3) POST `/tasks` with `{"data": {"name": "fix bug today", "projects": ["<project_gid>"]}}`.
|
|
34
|
-
- **Get task**: `GET https://app.asana.com/api/1.0/tasks/<task_gid>?opt_fields=name,completed,notes,due_on,projects`.
|
|
35
|
-
- **Update task** (mark complete, etc.): `PUT https://app.asana.com/api/1.0/tasks/<task_gid>` with body `{"data": {"completed": true}}` or `{"data": {"name": "New name"}}`.
|
|
36
|
-
|
|
37
|
-
Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Asana in the Portal.
|
package/context/bluesky.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: bluesky
|
|
3
|
-
description: Post to Bluesky (AT Protocol). Use when the user asks to post to Bluesky or share content on Bluesky. Use either (A) Portal OAuth connection and the Bluesky proxy, or (B) app password from skill config (BSKY_HANDLE, BSKY_APP_PASSWORD).
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "🦋",
|
|
8
|
-
"requires": { "bins": ["curl"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Bluesky
|
|
14
|
-
|
|
15
|
-
Two ways to post:
|
|
16
|
-
|
|
17
|
-
## (A) Portal OAuth (recommended)
|
|
18
|
-
|
|
19
|
-
1. **list_integrations_connections** with `provider: "bluesky"` → get `connection_id`.
|
|
20
|
-
2. **bluesky_post** with that `connection_id` and the post text (max 300 characters).
|
|
21
|
-
|
|
22
|
-
Use the **bluesky_post** tool for posting. Do not use run_command (curl) for Bluesky—the correct endpoint is the portal gateway bsky-request, and the tool calls it for you.
|
|
23
|
-
|
|
24
|
-
## (B) App password (skill config)
|
|
25
|
-
|
|
26
|
-
Set **BSKY_HANDLE** and **BSKY_APP_PASSWORD** (from bsky.app → Settings → App Passwords) in Skills → Bluesky config.
|
|
27
|
-
|
|
28
|
-
1. **Create session** to get access token:
|
|
29
|
-
```bash
|
|
30
|
-
curl -s -X POST "https://bsky.social/xrpc/com.atproto.server.createSession" \
|
|
31
|
-
-H "Content-Type: application/json" \
|
|
32
|
-
-d '{"identifier":"$BSKY_HANDLE","password":"$BSKY_APP_PASSWORD"}'
|
|
33
|
-
```
|
|
34
|
-
Response has `accessJwt` and `did`.
|
|
35
|
-
|
|
36
|
-
2. **Create post** (use the JWT and did from step 1):
|
|
37
|
-
```bash
|
|
38
|
-
curl -s -X POST "https://bsky.social/xrpc/com.atproto.repo.createRecord" \
|
|
39
|
-
-H "Content-Type: application/json" \
|
|
40
|
-
-H "Authorization: Bearer <accessJwt>" \
|
|
41
|
-
-d '{"repo":"<did>","collection":"app.bsky.feed.post","record":{"$type":"app.bsky.feed.post","text":"<post text>","createdAt":"<ISO8601>"}}'
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Add `bsky.social` to **ALLOWED_CURL_HOSTS**. Optional: **BSKY_PDS** (default https://bsky.social) for a custom PDS.
|
|
45
|
-
|
|
46
|
-
Official docs: https://docs.bsky.app/docs/api/atproto/
|
package/context/calendar.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: calendar
|
|
3
|
-
description: Use Google Calendar via the Portal. When the user asks to create a calendar event, add to calendar, list events, or check calendar, use this skill with list_integrations_connections (provider calendar) and run_command + curl. Do not use Apple Calendar, osascript, or local calendar apps—use Google Calendar via the Portal.
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "📅",
|
|
8
|
-
"requires": { "bins": ["curl"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Google Calendar
|
|
14
|
-
|
|
15
|
-
Use **list_integrations_connections** with `provider: "calendar"`, then **get_connection_token** to get an OAuth token (do not curl the portal from run_command—use the tool). Then call Calendar with that token.
|
|
16
|
-
|
|
17
|
-
1. **list_integrations_connections** with `provider: "calendar"` → get `connection_id`.
|
|
18
|
-
2. **get_connection_token** with that `connection_id` → returns `accessToken` (runs server-side).
|
|
19
|
-
3. **run_command (curl)** — call Calendar APIs with `Authorization: Bearer <accessToken>` for all requests below.
|
|
20
|
-
|
|
21
|
-
Add `www.googleapis.com` to **ALLOWED_CURL_HOSTS**.
|
|
22
|
-
|
|
23
|
-
Base URL: `https://www.googleapis.com/calendar/v3`
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## List calendars
|
|
28
|
-
|
|
29
|
-
`GET https://www.googleapis.com/calendar/v3/users/me/calendarList`. Use `items[].id` (e.g. `primary`) for listing events.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## List events
|
|
34
|
-
|
|
35
|
-
`GET https://www.googleapis.com/calendar/v3/calendars/<calendarId>/events?timeMin=<ISO8601>&timeMax=<ISO8601>&maxResults=20&singleEvents=true`. `calendarId` is often `primary`.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Create event
|
|
40
|
-
|
|
41
|
-
**Use this for all "create a calendar event" or "add to calendar" requests.**
|
|
42
|
-
|
|
43
|
-
`POST https://www.googleapis.com/calendar/v3/calendars/primary/events` with `Content-Type: application/json`, body:
|
|
44
|
-
|
|
45
|
-
`{"summary": "Event title", "description": "Optional description", "start": {"dateTime": "2025-03-04T21:00:00", "timeZone": "America/New_York"}, "end": {"dateTime": "2025-03-04T21:30:00", "timeZone": "America/New_York"}}`
|
|
46
|
-
|
|
47
|
-
- Example for "gym at 9 PM" today: use today's date, start 21:00, end 21:30 (or 22:00) in the user's timezone.
|
|
48
|
-
- All-day: use `"start": {"date": "2025-03-15"}`, `"end": {"date": "2025-03-16"}`.
|
|
49
|
-
- Times in ISO8601 with timezone (e.g. `America/New_York` or `UTC`).
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Update event
|
|
54
|
-
|
|
55
|
-
`PUT https://www.googleapis.com/calendar/v3/calendars/<calendarId>/events/<eventId>` with same body shape as create.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Delete event
|
|
60
|
-
|
|
61
|
-
`DELETE https://www.googleapis.com/calendar/v3/calendars/<calendarId>/events/<eventId>`.
|
|
62
|
-
|
|
63
|
-
Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Google Calendar in the Portal or dashboard Integrations.
|
package/context/country-info.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: country-info
|
|
3
|
-
description: Provides small info about various countries. Use when the user asks for information about a specific country.
|
|
4
|
-
---
|
|
5
|
-
# Country Info
|
|
6
|
-
|
|
7
|
-
Use when the user asks for small information about a country, such as facts, culture, and geography.
|
|
8
|
-
|
|
9
|
-
## How to use
|
|
10
|
-
- Ask for specific details about a country (e.g., "Tell me about Canada").
|
|
11
|
-
|
|
12
|
-
## Limits
|
|
13
|
-
- The information provided is brief and may not cover all aspects of the country.
|
package/context/create-skill.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-skill
|
|
3
|
-
description: Create a new Sulala skill when the user asks for one. Use write_file to create the .md file. Use when the user asks to create, add, or write a skill.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Create Sulala Skill
|
|
7
|
-
|
|
8
|
-
When the user asks to create a skill (e.g. "create a skill for X", "add a skill that does Y"), create it using **write_file**. Infer the skill from the request; ask only if critical details are missing.
|
|
9
|
-
|
|
10
|
-
## Skill format
|
|
11
|
-
|
|
12
|
-
Every Sulala skill is a `.md` file with YAML frontmatter and a markdown body:
|
|
13
|
-
|
|
14
|
-
```markdown
|
|
15
|
-
---
|
|
16
|
-
name: slug-or-name
|
|
17
|
-
description: One-line summary of when to use this skill. Include trigger terms.
|
|
18
|
-
---
|
|
19
|
-
# Skill Title
|
|
20
|
-
|
|
21
|
-
Use when the user asks for X, Y, or Z.
|
|
22
|
-
|
|
23
|
-
## How to use
|
|
24
|
-
- Commands, steps, or run_command examples
|
|
25
|
-
## Limits
|
|
26
|
-
- What not to do
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Required frontmatter:** `name` (slug, lowercase-hyphens), `description` (third person, includes WHAT and WHEN).
|
|
30
|
-
|
|
31
|
-
**Required when the skill uses run_command or external APIs:** `metadata` with `sulala.requires`:
|
|
32
|
-
- **bins** — list of CLI tools (e.g. `["curl", "jq"]`). Add these to ALLOWED_BINARIES. Always include if the skill uses run_command.
|
|
33
|
-
- **env** — list of required env var names for API keys (e.g. `["TMDB_ACCESS_TOKEN"]`). Users configure these in Skills config.
|
|
34
|
-
|
|
35
|
-
```yaml
|
|
36
|
-
metadata:
|
|
37
|
-
{
|
|
38
|
-
"sulala": {
|
|
39
|
-
"requires": {
|
|
40
|
-
"bins": ["curl"],
|
|
41
|
-
"env": ["TMDB_ACCESS_TOKEN"]
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Where to write
|
|
48
|
-
|
|
49
|
-
Use the **SKILL.md flow** (direct skill directory, not packaged .skill):
|
|
50
|
-
|
|
51
|
-
1. **Use the path from the Workspace section:** In "## Context" → **## Workspace**, the prompt gives **Your skill output directory**. Use that path with write_file: `<that-directory>/<slug>/SKILL.md`. It is already resolved for the current OS. Do **not** use `~` or `$HOME`; the tool does not expand them and would create a literal folder under the project.
|
|
52
|
-
2. Add `SKILL.md` with YAML frontmatter (`name`, `description`) and instructions.
|
|
53
|
-
3. Add any `scripts/`, `references/`, or `assets/` under that folder if needed.
|
|
54
|
-
4. Do **not** create skills under the project folder (e.g. `context/`) — they will be overwritten on project updates.
|
|
55
|
-
|
|
56
|
-
If write_file cannot write to the path from the Workspace section (e.g. permission or workspace root restriction), tell the user: "Create the skill at [that path], then refresh skills or restart the gateway."
|
|
57
|
-
|
|
58
|
-
## Steps
|
|
59
|
-
|
|
60
|
-
1. Infer purpose and name from the user's request.
|
|
61
|
-
2. Draft frontmatter (name, description) and body (when to use, how to use, limits).
|
|
62
|
-
3. Call **write_file** with `path` = the skill output directory from **## Workspace** + `/<slug>/SKILL.md` (e.g. `/Users/you/.sulala/workspace/skills/<slug>/SKILL.md`). Create the directory if needed.
|
|
63
|
-
4. Confirm: "Created skill at [path]. Refresh skills or restart the gateway to load it."
|
|
64
|
-
|
|
65
|
-
## Example (API skill with metadata)
|
|
66
|
-
|
|
67
|
-
User: "Create a skill that fetches movie data from TMDB"
|
|
68
|
-
|
|
69
|
-
Include **metadata** with `bins` (curl) and `env` (API key). Use write_file with the path from **## Workspace** + `/fetch-movie/SKILL.md`:
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
---
|
|
73
|
-
name: fetch-movie
|
|
74
|
-
description: Fetch movies using TMDB API via curl. Use when the user asks for movie details or to search movies by title.
|
|
75
|
-
metadata:
|
|
76
|
-
{
|
|
77
|
-
"sulala": {
|
|
78
|
-
"requires": {
|
|
79
|
-
"bins": ["curl"],
|
|
80
|
-
"env": ["TMDB_ACCESS_TOKEN"]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
# Fetch Movie
|
|
87
|
-
|
|
88
|
-
Use **run_command** with `curl` to get movie data from The Movie Database (TMDB) API. Add `curl` to ALLOWED_BINARIES. Store your TMDB API token in Skills config as `TMDB_ACCESS_TOKEN`.
|
|
89
|
-
|
|
90
|
-
## TMDB Search API
|
|
91
|
-
|
|
92
|
-
- **Search:** `curl -s -H "Authorization: Bearer $TMDB_ACCESS_TOKEN" "https://api.themoviedb.org/3/search/movie?query=QUERY"`
|
|
93
|
-
|
|
94
|
-
## Limits
|
|
95
|
-
|
|
96
|
-
- Do not expose the token in responses. Use the env var in run_command.
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Example (stock price)
|
|
100
|
-
|
|
101
|
-
User: "Create a skill that fetches stock prices"
|
|
102
|
-
|
|
103
|
-
Use write_file with the path from **## Workspace** + `/stock-price/SKILL.md`:
|
|
104
|
-
|
|
105
|
-
```markdown
|
|
106
|
-
---
|
|
107
|
-
name: stock-price
|
|
108
|
-
description: Fetches stock prices via API. Use when the user asks for stock quotes, share price, or market data.
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
# Stock Price
|
|
112
|
-
|
|
113
|
-
Use **run_command** with `curl` to call a stock API. Add `curl` to ALLOWED_BINARIES.
|
|
114
|
-
|
|
115
|
-
## Alpha Vantage (requires API key)
|
|
116
|
-
|
|
117
|
-
curl -s "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=AAPL&apikey=$ALPHA_VANTAGE_API_KEY"
|
|
118
|
-
|
|
119
|
-
## Limits
|
|
120
|
-
|
|
121
|
-
- Do not share API keys in responses.
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Tips
|
|
125
|
-
|
|
126
|
-
- Description: third person, specific, include trigger terms. Example: "Fetches weather for a city. Use when the user asks for weather, temperature, or forecast."
|
|
127
|
-
- Body: concise; if the skill uses run_command, say which binaries and add to ALLOWED_BINARIES.
|
|
128
|
-
- Slug: lowercase, hyphens only (e.g. `my-new-skill`).
|
package/context/discord.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: discord
|
|
3
|
-
description: Use Discord (servers, channels, send messages) via Settings → Channels. Do not use list_integrations_connections for Discord—it only lists OAuth apps. Use discord_list_guilds, discord_list_channels, and discord_send_message (token from Settings → Channels).
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "🎮",
|
|
8
|
-
"requires": { "env": ["DISCORD_BOT_TOKEN"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Discord
|
|
14
|
-
|
|
15
|
-
Discord is configured in **Settings → Channels (Discord)** or via **DISCORD_BOT_TOKEN** in the agent env. **Do not call list_integrations_connections for Discord**—that tool only returns OAuth connections (Gmail, Slack, etc.). Discord uses a bot token, not OAuth.
|
|
16
|
-
|
|
17
|
-
Use the dedicated tools (they use the token from Settings):
|
|
18
|
-
- **discord_list_guilds** — list servers (guilds) the bot is in. Returns guild id and name.
|
|
19
|
-
- **discord_list_channels** — list channels in a guild. Requires guild_id from discord_list_guilds. Returns channel id, name, type (0=text, 2=voice, 4=category).
|
|
20
|
-
- **discord_send_message** — send a message to a channel. Requires channel_id and content (max 2000 chars).
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Flow
|
|
25
|
-
|
|
26
|
-
1. **discord_list_guilds** — get server (guild) ids and names.
|
|
27
|
-
2. **discord_list_channels** with `guild_id` — get channel ids (type 0 = text channel).
|
|
28
|
-
3. **discord_send_message** with `channel_id` and `content` — send the message.
|
|
29
|
-
|
|
30
|
-
Requirements: Bot must be added to the server and have permissions to read channels and send messages.
|
package/context/docs.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docs
|
|
3
|
-
description: Use Google Docs via the Portal. When the user asks to list, create, or read Google Docs, use this skill with list_integrations_connections (provider docs) and run_command + curl.
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "📄",
|
|
8
|
-
"requires": { "bins": ["curl"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Google Docs
|
|
14
|
-
|
|
15
|
-
Use **list_integrations_connections** with `provider: "docs"`, then **get_connection_token** (do not curl the portal). Then call the API with that token.
|
|
16
|
-
|
|
17
|
-
1. **list_integrations_connections** with `provider: "docs"` → get `connection_id`.
|
|
18
|
-
2. **get_connection_token** with that `connection_id` → returns `accessToken`.
|
|
19
|
-
3. **run_command (curl)** with `Authorization: Bearer <accessToken>` for all requests.
|
|
20
|
-
|
|
21
|
-
Add `www.googleapis.com` to **ALLOWED_CURL_HOSTS**.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## List / create / read
|
|
26
|
-
|
|
27
|
-
List and create Docs via the Drive API (mimeType `application/vnd.google-apps.document`). Export to read: `GET https://www.googleapis.com/drive/v3/files/<id>/export?mimeType=text/plain` with `Authorization: Bearer <accessToken>`.
|
|
28
|
-
|
|
29
|
-
Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Google Docs in the Portal or dashboard Integrations.
|
package/context/drive.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: drive
|
|
3
|
-
description: Use Google Drive via the Portal. When the user asks to list files, create a folder, upload/download files, or manage Drive content, use this skill with list_integrations_connections (provider drive) and run_command + curl.
|
|
4
|
-
metadata:
|
|
5
|
-
{
|
|
6
|
-
"sulala": {
|
|
7
|
-
"emoji": "📁",
|
|
8
|
-
"requires": { "bins": ["curl"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Google Drive
|
|
14
|
-
|
|
15
|
-
Use **list_integrations_connections** with `provider: "drive"`, then **get_connection_token** (do not curl the portal). Then call Drive with that token.
|
|
16
|
-
|
|
17
|
-
1. **list_integrations_connections** with `provider: "drive"` → get `connection_id`.
|
|
18
|
-
2. **get_connection_token** with that `connection_id` → returns `accessToken`.
|
|
19
|
-
3. **run_command (curl)** with `Authorization: Bearer <accessToken>` for all requests below.
|
|
20
|
-
|
|
21
|
-
Add `www.googleapis.com` to **ALLOWED_CURL_HOSTS**.
|
|
22
|
-
|
|
23
|
-
Base URL: `https://www.googleapis.com/drive/v3`
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## List files
|
|
28
|
-
|
|
29
|
-
`GET https://www.googleapis.com/drive/v3/files?pageSize=20&q=<query>` (e.g. `q='root' in parents` for root; `q=trashed=false`). Returns `files[].id`, `name`, `mimeType`.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Create folder
|
|
34
|
-
|
|
35
|
-
`POST https://www.googleapis.com/drive/v3/files` with body `{"name": "FolderName", "mimeType": "application/vnd.google-apps.folder"}`. Optional: `"parents": ["<folderId>"]`.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Upload file (small)
|
|
40
|
-
|
|
41
|
-
Use multipart: one part JSON `{"name": "filename.txt", "parents": ["<folderId>"]}`, second part file content. Or use resumable upload (see Drive API docs).
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Download file
|
|
46
|
-
|
|
47
|
-
`GET https://www.googleapis.com/drive/v3/files/<fileId>?alt=media` with `Authorization: Bearer <token>` (binary response). For export of Google Docs/Sheets use `GET https://www.googleapis.com/drive/v3/files/<fileId>/export?mimeType=text/plain` (or other export type).
|
|
48
|
-
|
|
49
|
-
Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Google Drive in the Portal or dashboard Integrations.
|