@superglue/cli 1.1.24 → 1.1.26
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/.claude-plugin/plugin.json +1 -1
- package/dist/cli.js +428 -120
- package/dist/skills/superglue/SKILL.md +27 -20
- package/dist/skills/superglue/references/access-rules.md +15 -5
- package/dist/skills/superglue/references/http.md +3 -0
- package/dist/skills/superglue/references/odbc.md +39 -9
- package/dist/skills/superglue/references/superglue-info.md +25 -18
- package/package.json +1 -1
- package/skills/superglue/SKILL.md +27 -20
- package/skills/superglue/references/access-rules.md +15 -5
- package/skills/superglue/references/http.md +3 -0
- package/skills/superglue/references/odbc.md +39 -9
- package/skills/superglue/references/superglue-info.md +25 -18
|
@@ -147,9 +147,10 @@ Blocked commands print a clear error showing the current preset and how to chang
|
|
|
147
147
|
|
|
148
148
|
1. Search for an existing system first: `sg system find <query>`
|
|
149
149
|
2. If creating: `sg system create --name "..." --url "..." --credentials '{...}'`. Prefer `--template <id>` when one exists — it auto-fills URL and OAuth config
|
|
150
|
-
3. For OAuth: `sg system oauth --system-id <id> --scopes "..."` opens a browser flow. User approves → tokens saved automatically
|
|
151
|
-
4.
|
|
152
|
-
5.
|
|
150
|
+
3. For OAuth: `sg system oauth --system-id <id> [--scopes "..."]` opens a browser flow. User approves → tokens saved automatically
|
|
151
|
+
4. For user-owned non-OAuth credentials: `sg system credentials set --system-id <id> --credentials '{...}'`
|
|
152
|
+
5. Verify connectivity with `sg system call`
|
|
153
|
+
6. For updates: `sg system edit --id <id>` with the fields to change
|
|
153
154
|
|
|
154
155
|
### Running a Tool (Ad-hoc)
|
|
155
156
|
|
|
@@ -168,23 +169,24 @@ Streams live execution logs to the terminal. Use `--include-step-results` for ra
|
|
|
168
169
|
|
|
169
170
|
Agents familiar with the web tool names can map them directly to CLI commands:
|
|
170
171
|
|
|
171
|
-
| Web agent tool
|
|
172
|
-
|
|
|
173
|
-
| `build_tool`
|
|
174
|
-
| `edit_tool`
|
|
175
|
-
| `run_tool`
|
|
176
|
-
| `save_tool`
|
|
177
|
-
| `
|
|
178
|
-
| `create_system`
|
|
179
|
-
| `edit_system`
|
|
180
|
-
| `
|
|
181
|
-
|
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
|
|
|
186
|
-
|
|
187
|
-
|
|
172
|
+
| Web agent tool | CLI command | Notes |
|
|
173
|
+
| -------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------ |
|
|
174
|
+
| `build_tool` | `sg tool build --config '{...}'` | CLI is not AI-powered — you provide the full JSON config |
|
|
175
|
+
| `edit_tool` | `sg tool edit --tool <id> --patches '[...]'` | JSON Patch (RFC 6902). Use `--draft <id>` for drafts |
|
|
176
|
+
| `run_tool` | `sg tool run --tool <id>` / `--draft <id>` | Add `--include-step-results` to inspect per-step data |
|
|
177
|
+
| `save_tool` | `sg tool save --draft <draftId>` | Persists a draft to the database |
|
|
178
|
+
| `run_command` with `vfs` for `/org/tools/` | `sg tool find --id <id>` / `sg tool find <q>` | Full config with `--id`, compact search with a query string |
|
|
179
|
+
| `create_system` | `sg system create --name "..." --url "..."` | Use `--template <id>` when available |
|
|
180
|
+
| `edit_system` | `sg system edit --id <id> ...` | Supports `--env dev\|prod` |
|
|
181
|
+
| `run_command` with `vfs` for `/org/systems/` | `sg system find <query>` / `--id <id>` | Returns `storedCredentials` and system URL |
|
|
182
|
+
| Credentials VFS / user-owned credentials | `sg system credentials get/set/clear` | Manage current user's credentials for user-owned systems |
|
|
183
|
+
| `call_system` | `sg system call --url "..." --system-id <id>` | Authenticated ad-hoc calls for testing / schema introspection |
|
|
184
|
+
| `run_command search` | `sg system search-docs --system-id <id> -k` | Targeted keyword search over ingested system docs |
|
|
185
|
+
| `authenticate_oauth` | `sg system oauth --system-id <id> [--scopes]` | Opens browser flow. Supports `--grant-type client_credentials` too |
|
|
186
|
+
| `run_command` with `vfs` for `/org/runs/` | `sg run list` / `sg run get <runId>` | Filter `list` by `--tool`, `--status`, `--source`, `--limit` |
|
|
187
|
+
| (no direct equivalent) | `sg init`, `sg update`, `sg skill` | CLI-specific setup, updater, and this reference system |
|
|
188
|
+
|
|
189
|
+
Web-agent-only concepts with no CLI equivalent: `run_command`'s virtual filesystem (CLI uses concrete `sg` subcommands), `create_schedule`/`edit_schedule` (manage schedules via web app or REST API), `authenticate_oauth`'s dedicated MCP `authenticate` tool (CLI uses `sg system oauth`).
|
|
188
190
|
|
|
189
191
|
### Command Reference
|
|
190
192
|
|
|
@@ -215,6 +217,9 @@ sg system edit --id my_api --credentials '{...}'
|
|
|
215
217
|
sg system list
|
|
216
218
|
sg system find slack
|
|
217
219
|
sg system find --id my_api --env dev
|
|
220
|
+
sg system credentials get --system-id my_api
|
|
221
|
+
sg system credentials set --system-id my_api --credentials '{"api_key":"sk-xxx"}'
|
|
222
|
+
sg system credentials clear --system-id my_api
|
|
218
223
|
sg system call --url https://api.example.com/users --system-id my_api --method GET \
|
|
219
224
|
--headers '{"Authorization":"Bearer <<my_api_access_token>>"}'
|
|
220
225
|
sg system search-docs --system-id slack -k "send message channels"
|
|
@@ -437,6 +442,8 @@ Basic auth auto-encodes: if the value after `Basic ` isn't already base64, the e
|
|
|
437
442
|
**Credential lifecycle:**
|
|
438
443
|
|
|
439
444
|
- Pass ALL credentials (including secrets) via `--credentials '{"api_key":"...","client_secret":"..."}'` on create/edit
|
|
445
|
+
- For user-owned systems, use `sg system credentials set --system-id <id> --credentials '{...}'` to save credentials for the current API-key user
|
|
446
|
+
- Use `sg system credentials get --system-id <id>` to inspect current-user credential keys; values are masked unless `--reveal` is passed
|
|
440
447
|
- OAuth tokens (`access_token`, `refresh_token`) auto-refresh before each step execution
|
|
441
448
|
- Non-sensitive fields (`client_id`, `auth_url`, `token_url`) are stored alongside secrets in the same `--credentials` JSON
|
|
442
449
|
|
|
@@ -123,15 +123,25 @@ Every user has exactly **one** base role. There are three:
|
|
|
123
123
|
|
|
124
124
|
- **`admin`** — Full access to everything. Bypasses all RBAC checks. The admin role is **immutable** — it cannot be edited at all, nor can it be re-assigned.
|
|
125
125
|
- **`member`** — Default for org team members. Starts with `tools: "ALL"`, `systems: "ALL"`. Tool and system allowlists can be narrowed to restrict access. Name and description cannot be changed. Cannot be deleted.
|
|
126
|
-
- **`enduser`** — Default for end users
|
|
126
|
+
- **`enduser`** — Default for end users with Credentials-only access. Starts with `tools: []`, `systems: {}` (no access). Tool and system allowlists must be explicitly populated to grant access. Name and description cannot be changed. Cannot be deleted.
|
|
127
127
|
|
|
128
128
|
Base roles define the starting permissions that custom roles can extend or build on top of. Users can also have additional **custom roles** on top of their base role. Custom roles are fully editable (name, description, tools, systems) and can be created and deleted.
|
|
129
129
|
|
|
130
|
+
## Personal Roles
|
|
131
|
+
|
|
132
|
+
Admins can create a **personal role** for a specific user. A personal role is a per-user override that scopes which tools and systems that individual can access — independent of their base role and shared custom roles.
|
|
133
|
+
|
|
134
|
+
- Each user can have at most one personal role
|
|
135
|
+
- Personal roles follow the same structure as custom roles (tools allowlist, systems map, custom rules)
|
|
136
|
+
- Resolution: personal role permissions are unioned with the user's other roles (most permissive wins)
|
|
137
|
+
- Use case: giving a single team member access to a sensitive system without creating a shared role
|
|
138
|
+
- Managed via the **Personal Roles** tab in Access Rules (web app) or the REST API (`POST /v1/users/:userId/personal-role`)
|
|
139
|
+
|
|
130
140
|
### Auto-append on resource creation
|
|
131
141
|
|
|
132
|
-
When a user creates a new tool or system, the backend automatically adds it to the **creator's
|
|
142
|
+
When a user creates a new tool or system, the backend automatically adds it to the **creator's personal role**:
|
|
133
143
|
|
|
134
|
-
- New tool created → appended to the creator's
|
|
135
|
-
- New system created → appended to the creator's
|
|
144
|
+
- New tool created → appended to the creator's personal role's `tools` list
|
|
145
|
+
- New system created → appended to the creator's personal role's `systems` map with `read-write` access
|
|
136
146
|
|
|
137
|
-
This only affects the
|
|
147
|
+
This only affects the creator's personal role, not base roles or additional custom roles. It ensures that a user on a restricted allowlist automatically gets access to resources they create without granting those resources to everyone with the same base role.
|
|
@@ -29,6 +29,9 @@ All fields support `<<variable>>` and `<<(sourceData) => ...>>` expressions.
|
|
|
29
29
|
| `pagination` | no | See Pagination section |
|
|
30
30
|
| `systemId` | no | Links system credentials and URL. Omit for public APIs |
|
|
31
31
|
|
|
32
|
+
For APIs that require the same query key multiple times, use an array value:
|
|
33
|
+
`{ metadataHeaders: ["From", "Subject"] }` -> `?metadataHeaders=From&metadataHeaders=Subject`.
|
|
34
|
+
|
|
32
35
|
## Authentication
|
|
33
36
|
|
|
34
37
|
Credentials are never injected automatically. You must place auth headers explicitly using `<<systemId_credentialKey>>` syntax.
|
|
@@ -34,9 +34,9 @@ The path contains the **database name**. The ODBC driver is specified via the `D
|
|
|
34
34
|
|
|
35
35
|
**Supported drivers:**
|
|
36
36
|
|
|
37
|
-
| Driver | Database
|
|
38
|
-
| --------- |
|
|
39
|
-
| `FreeTDS` | SAP ASE (Sybase), SQL Server | 5000 |
|
|
37
|
+
| Driver | Database | Default Port |
|
|
38
|
+
| --------- | ------------------------------------------ | ------------ |
|
|
39
|
+
| `FreeTDS` | SAP ASE (Sybase), SQL Anywhere, SQL Server | 5000 |
|
|
40
40
|
|
|
41
41
|
Additional query parameters (beyond `DRIVER`) are passed through to the ODBC connection string as key=value pairs.
|
|
42
42
|
|
|
@@ -136,11 +136,41 @@ FreeTDS defaults to TDS 5.0 for Sybase connections. If you encounter protocol er
|
|
|
136
136
|
odbc://user:pass@host:5000/mydb?DRIVER=FreeTDS&TDS_Version=5.0
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
| TDS Version | Use Case
|
|
140
|
-
| ----------- |
|
|
141
|
-
| `5.0` | SAP ASE / Sybase
|
|
142
|
-
| `7.0` | SQL Server 7.0+
|
|
143
|
-
| `7.4` | SQL Server 2012+
|
|
139
|
+
| TDS Version | Use Case |
|
|
140
|
+
| ----------- | ---------------------------------- |
|
|
141
|
+
| `5.0` | SAP ASE / Sybase, SAP SQL Anywhere |
|
|
142
|
+
| `7.0` | SQL Server 7.0+ |
|
|
143
|
+
| `7.4` | SQL Server 2012+ |
|
|
144
|
+
|
|
145
|
+
### SAP SQL Anywhere
|
|
146
|
+
|
|
147
|
+
SQL Anywhere (SA16/SA17) works with FreeTDS using TDS version 5.0. Always specify `TDS_Version=5.0` explicitly:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
odbc://user:pass@host:2638/mydb?DRIVER=FreeTDS&TDS_Version=5.0
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Key differences from SAP ASE:
|
|
154
|
+
|
|
155
|
+
- Default port is **2638** (not 5000)
|
|
156
|
+
- Uses `TOP n` instead of `SET ROWCOUNT n` for row limiting: `SELECT TOP 10 * FROM table`
|
|
157
|
+
- Does not support `LIMIT` syntax
|
|
158
|
+
- `DB_NAME()` returns the current database name
|
|
159
|
+
- `sa_db_info()` lists all running databases on the server
|
|
160
|
+
- Only databases explicitly loaded by the server process are available — if you get "database not found", the database name must match the logical name the server assigned at startup (either from `-n` flag or the `.db` filename without extension)
|
|
161
|
+
|
|
162
|
+
### Database-Specific Error Codes
|
|
163
|
+
|
|
164
|
+
ODBC often surfaces error codes from the underlying database or driver. Do not treat those codes as generic ODBC meanings. If the message identifies a database engine, use that vendor's SQLCODE documentation instead of inferring from connection-string shape.
|
|
165
|
+
|
|
166
|
+
For SQL Anywhere errors surfaced through ODBC:
|
|
167
|
+
|
|
168
|
+
| SQLCODE | Meaning | Implication |
|
|
169
|
+
| ------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
170
|
+
| `-103` | Invalid user ID or password | The database was reached far enough to reject authentication. Do not treat this as a missing database name. |
|
|
171
|
+
| `-83` | Specified database not found | The database name/path could not be resolved. Check the database name, DBN/DBF settings, server name, and TDS/driver routing. |
|
|
172
|
+
|
|
173
|
+
For other ODBC-backed databases, look up the database/driver-specific error code before concluding what failed.
|
|
144
174
|
|
|
145
175
|
## Common Pitfalls
|
|
146
176
|
|
|
@@ -154,7 +184,7 @@ odbc://user:pass@host:5000/mydb?DRIVER=FreeTDS&TDS_Version=5.0
|
|
|
154
184
|
|
|
155
185
|
When an ODBC step fails and the cause is not obvious:
|
|
156
186
|
|
|
157
|
-
1. **Read the error message** — superglue includes
|
|
187
|
+
1. **Read the error message** — superglue includes a truncated query preview in the error. Check for syntax errors, missing columns, or type mismatches.
|
|
158
188
|
2. **Verify connection credentials** — use `sg system find` to confirm `storedCredentials` keys match the placeholders in your URL. Test connectivity with a simple `SELECT 1` via `sg system call`.
|
|
159
189
|
3. **Check database-side access** — connection refused or permission denied errors typically mean the database user lacks access. Verify with the user that the credentials have the required grants.
|
|
160
190
|
4. **Check driver availability** — if the error mentions "driver not found", the `DRIVER` query parameter does not match any registered driver in `/etc/odbcinst.ini`. Verify the driver name is correct and the driver is installed in the Docker image.
|
|
@@ -18,9 +18,11 @@ If the user is asking general questions (not building):
|
|
|
18
18
|
|
|
19
19
|
## Authentication
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
API, SDK, CLI, and webhook usage require an **API key**. MCP clients can use OAuth when supported, or API keys for non-interactive setup. Self-hosted deployments also need the API/MCP endpoint URL. There are no workspace IDs, project IDs, or other identifiers.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
MCP authentication is separate from API/SDK/CLI setup. For MCP OAuth, dynamic client registration, Langdock setup, and named server permissions, use the MCP documentation.
|
|
24
|
+
|
|
25
|
+
Users can generate and manage API keys in **My Credentials -> superglue API keys**. The API endpoint is displayed on the same page.
|
|
24
26
|
|
|
25
27
|
## Interfaces
|
|
26
28
|
|
|
@@ -34,30 +36,35 @@ Users can generate and manage API keys in **Control Panel → API Keys**. The AP
|
|
|
34
36
|
|
|
35
37
|
Tools can be triggered via webhook: `POST {apiEndpoint}/v1/hooks/{toolId}?token={apiKey}`
|
|
36
38
|
|
|
37
|
-
On superglue Cloud, the API endpoint is `https://api.superglue.cloud`. Self-hosted and enterprise deployments use their own API endpoint — users can find theirs under
|
|
39
|
+
On superglue Cloud, the API endpoint is `https://api.superglue.cloud`. Self-hosted and enterprise deployments use their own API endpoint — users can find theirs under My Credentials -> superglue API keys.
|
|
38
40
|
|
|
39
41
|
### OAuth Callback URL
|
|
40
42
|
|
|
41
43
|
OAuth flows require a callback URL: `{appEndpoint}/api/auth/callback`
|
|
42
44
|
|
|
43
|
-
On superglue Cloud, the app endpoint is `https://app.superglue.cloud`. Self-hosted and enterprise deployments use their own app URL. If a user doesn't know their endpoints, they can check the browser URL bar for the app endpoint, and
|
|
45
|
+
On superglue Cloud, the app endpoint is `https://app.superglue.cloud`. Self-hosted and enterprise deployments use their own app URL. If a user doesn't know their endpoints, they can check the browser URL bar for the app endpoint, and My Credentials -> superglue API keys for the API endpoint.
|
|
44
46
|
|
|
45
47
|
## Web App UI Layout
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- **
|
|
49
|
+
Use this section as the source of truth for high-level web app navigation. Do not invent UI locations that are not listed here.
|
|
50
|
+
|
|
51
|
+
The persistent left sidebar contains these top-level items:
|
|
52
|
+
|
|
53
|
+
- **Agent** (`/`) — primary AI chat assistant for building and debugging tools and systems.
|
|
54
|
+
- **Landscape** (`/landscape`) — graph overview of tools, systems, and their connections.
|
|
55
|
+
- **Tools** (`/tools`, detail at `/tools/{toolId}`) — saved tools; opens the tool playground for editing, testing, and running.
|
|
56
|
+
- **Systems** (`/systems`, detail at `/systems/{systemId}`) — connected external systems with credentials and documentation.
|
|
57
|
+
- **My Credentials** (`/credentials`) — credential management. The **My Credentials** section is for personal user-owned system credentials; the **superglue API keys** section is for API keys. Admins and members open it inside the normal app shell from the sidebar; end users only see this standalone credentials surface.
|
|
58
|
+
- **Runs** (`/runs`, detail at `/runs/{runId}`) — execution history for full, draft, and single-step tool runs. Runs is a top-level sidebar item, not a Control Panel sub-item.
|
|
59
|
+
- **Control Panel** (`/admin`) — expandable group for organization and account administration:
|
|
60
|
+
- **Overview** (`/admin`) — dashboard summary, including failed-run and schedule summaries.
|
|
61
|
+
- **Schedules** (`/admin?view=schedules`) — scheduled and recurring tool runs.
|
|
62
|
+
- **Access Rules** (`/admin/access`) — role and access-rule configuration; visible to admins on paid tiers. Use the access-rules reference for RBAC behavior, base roles, and personal roles.
|
|
63
|
+
- **Organization** (`/admin?view=organization`) — organization members, invites, and org-level settings; visible on paid tiers. Member management actions are admin-gated.
|
|
64
|
+
- **MCP Servers** (`/admin?view=mcp-servers`) — manage and export named MCP server endpoints. Use the MCP documentation for behavior, permissions, and client setup.
|
|
65
|
+
- **Notifications** (`/admin?view=notifications`) — user notification preferences and failure-alert channels.
|
|
66
|
+
|
|
67
|
+
Below the navigation, the sidebar shows the organization switcher and Sign Out. Depending on the plan, it also shows **Upgrade Plan** or **Subscription**; Subscription opens the external Stripe billing portal. There is no standalone Settings, Profile, or in-app Billing page.
|
|
61
68
|
|
|
62
69
|
## Internals
|
|
63
70
|
|
package/package.json
CHANGED
|
@@ -147,9 +147,10 @@ Blocked commands print a clear error showing the current preset and how to chang
|
|
|
147
147
|
|
|
148
148
|
1. Search for an existing system first: `sg system find <query>`
|
|
149
149
|
2. If creating: `sg system create --name "..." --url "..." --credentials '{...}'`. Prefer `--template <id>` when one exists — it auto-fills URL and OAuth config
|
|
150
|
-
3. For OAuth: `sg system oauth --system-id <id> --scopes "..."` opens a browser flow. User approves → tokens saved automatically
|
|
151
|
-
4.
|
|
152
|
-
5.
|
|
150
|
+
3. For OAuth: `sg system oauth --system-id <id> [--scopes "..."]` opens a browser flow. User approves → tokens saved automatically
|
|
151
|
+
4. For user-owned non-OAuth credentials: `sg system credentials set --system-id <id> --credentials '{...}'`
|
|
152
|
+
5. Verify connectivity with `sg system call`
|
|
153
|
+
6. For updates: `sg system edit --id <id>` with the fields to change
|
|
153
154
|
|
|
154
155
|
### Running a Tool (Ad-hoc)
|
|
155
156
|
|
|
@@ -168,23 +169,24 @@ Streams live execution logs to the terminal. Use `--include-step-results` for ra
|
|
|
168
169
|
|
|
169
170
|
Agents familiar with the web tool names can map them directly to CLI commands:
|
|
170
171
|
|
|
171
|
-
| Web agent tool
|
|
172
|
-
|
|
|
173
|
-
| `build_tool`
|
|
174
|
-
| `edit_tool`
|
|
175
|
-
| `run_tool`
|
|
176
|
-
| `save_tool`
|
|
177
|
-
| `
|
|
178
|
-
| `create_system`
|
|
179
|
-
| `edit_system`
|
|
180
|
-
| `
|
|
181
|
-
|
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
|
|
|
186
|
-
|
|
187
|
-
|
|
172
|
+
| Web agent tool | CLI command | Notes |
|
|
173
|
+
| -------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------ |
|
|
174
|
+
| `build_tool` | `sg tool build --config '{...}'` | CLI is not AI-powered — you provide the full JSON config |
|
|
175
|
+
| `edit_tool` | `sg tool edit --tool <id> --patches '[...]'` | JSON Patch (RFC 6902). Use `--draft <id>` for drafts |
|
|
176
|
+
| `run_tool` | `sg tool run --tool <id>` / `--draft <id>` | Add `--include-step-results` to inspect per-step data |
|
|
177
|
+
| `save_tool` | `sg tool save --draft <draftId>` | Persists a draft to the database |
|
|
178
|
+
| `run_command` with `vfs` for `/org/tools/` | `sg tool find --id <id>` / `sg tool find <q>` | Full config with `--id`, compact search with a query string |
|
|
179
|
+
| `create_system` | `sg system create --name "..." --url "..."` | Use `--template <id>` when available |
|
|
180
|
+
| `edit_system` | `sg system edit --id <id> ...` | Supports `--env dev\|prod` |
|
|
181
|
+
| `run_command` with `vfs` for `/org/systems/` | `sg system find <query>` / `--id <id>` | Returns `storedCredentials` and system URL |
|
|
182
|
+
| Credentials VFS / user-owned credentials | `sg system credentials get/set/clear` | Manage current user's credentials for user-owned systems |
|
|
183
|
+
| `call_system` | `sg system call --url "..." --system-id <id>` | Authenticated ad-hoc calls for testing / schema introspection |
|
|
184
|
+
| `run_command search` | `sg system search-docs --system-id <id> -k` | Targeted keyword search over ingested system docs |
|
|
185
|
+
| `authenticate_oauth` | `sg system oauth --system-id <id> [--scopes]` | Opens browser flow. Supports `--grant-type client_credentials` too |
|
|
186
|
+
| `run_command` with `vfs` for `/org/runs/` | `sg run list` / `sg run get <runId>` | Filter `list` by `--tool`, `--status`, `--source`, `--limit` |
|
|
187
|
+
| (no direct equivalent) | `sg init`, `sg update`, `sg skill` | CLI-specific setup, updater, and this reference system |
|
|
188
|
+
|
|
189
|
+
Web-agent-only concepts with no CLI equivalent: `run_command`'s virtual filesystem (CLI uses concrete `sg` subcommands), `create_schedule`/`edit_schedule` (manage schedules via web app or REST API), `authenticate_oauth`'s dedicated MCP `authenticate` tool (CLI uses `sg system oauth`).
|
|
188
190
|
|
|
189
191
|
### Command Reference
|
|
190
192
|
|
|
@@ -215,6 +217,9 @@ sg system edit --id my_api --credentials '{...}'
|
|
|
215
217
|
sg system list
|
|
216
218
|
sg system find slack
|
|
217
219
|
sg system find --id my_api --env dev
|
|
220
|
+
sg system credentials get --system-id my_api
|
|
221
|
+
sg system credentials set --system-id my_api --credentials '{"api_key":"sk-xxx"}'
|
|
222
|
+
sg system credentials clear --system-id my_api
|
|
218
223
|
sg system call --url https://api.example.com/users --system-id my_api --method GET \
|
|
219
224
|
--headers '{"Authorization":"Bearer <<my_api_access_token>>"}'
|
|
220
225
|
sg system search-docs --system-id slack -k "send message channels"
|
|
@@ -437,6 +442,8 @@ Basic auth auto-encodes: if the value after `Basic ` isn't already base64, the e
|
|
|
437
442
|
**Credential lifecycle:**
|
|
438
443
|
|
|
439
444
|
- Pass ALL credentials (including secrets) via `--credentials '{"api_key":"...","client_secret":"..."}'` on create/edit
|
|
445
|
+
- For user-owned systems, use `sg system credentials set --system-id <id> --credentials '{...}'` to save credentials for the current API-key user
|
|
446
|
+
- Use `sg system credentials get --system-id <id>` to inspect current-user credential keys; values are masked unless `--reveal` is passed
|
|
440
447
|
- OAuth tokens (`access_token`, `refresh_token`) auto-refresh before each step execution
|
|
441
448
|
- Non-sensitive fields (`client_id`, `auth_url`, `token_url`) are stored alongside secrets in the same `--credentials` JSON
|
|
442
449
|
|
|
@@ -123,15 +123,25 @@ Every user has exactly **one** base role. There are three:
|
|
|
123
123
|
|
|
124
124
|
- **`admin`** — Full access to everything. Bypasses all RBAC checks. The admin role is **immutable** — it cannot be edited at all, nor can it be re-assigned.
|
|
125
125
|
- **`member`** — Default for org team members. Starts with `tools: "ALL"`, `systems: "ALL"`. Tool and system allowlists can be narrowed to restrict access. Name and description cannot be changed. Cannot be deleted.
|
|
126
|
-
- **`enduser`** — Default for end users
|
|
126
|
+
- **`enduser`** — Default for end users with Credentials-only access. Starts with `tools: []`, `systems: {}` (no access). Tool and system allowlists must be explicitly populated to grant access. Name and description cannot be changed. Cannot be deleted.
|
|
127
127
|
|
|
128
128
|
Base roles define the starting permissions that custom roles can extend or build on top of. Users can also have additional **custom roles** on top of their base role. Custom roles are fully editable (name, description, tools, systems) and can be created and deleted.
|
|
129
129
|
|
|
130
|
+
## Personal Roles
|
|
131
|
+
|
|
132
|
+
Admins can create a **personal role** for a specific user. A personal role is a per-user override that scopes which tools and systems that individual can access — independent of their base role and shared custom roles.
|
|
133
|
+
|
|
134
|
+
- Each user can have at most one personal role
|
|
135
|
+
- Personal roles follow the same structure as custom roles (tools allowlist, systems map, custom rules)
|
|
136
|
+
- Resolution: personal role permissions are unioned with the user's other roles (most permissive wins)
|
|
137
|
+
- Use case: giving a single team member access to a sensitive system without creating a shared role
|
|
138
|
+
- Managed via the **Personal Roles** tab in Access Rules (web app) or the REST API (`POST /v1/users/:userId/personal-role`)
|
|
139
|
+
|
|
130
140
|
### Auto-append on resource creation
|
|
131
141
|
|
|
132
|
-
When a user creates a new tool or system, the backend automatically adds it to the **creator's
|
|
142
|
+
When a user creates a new tool or system, the backend automatically adds it to the **creator's personal role**:
|
|
133
143
|
|
|
134
|
-
- New tool created → appended to the creator's
|
|
135
|
-
- New system created → appended to the creator's
|
|
144
|
+
- New tool created → appended to the creator's personal role's `tools` list
|
|
145
|
+
- New system created → appended to the creator's personal role's `systems` map with `read-write` access
|
|
136
146
|
|
|
137
|
-
This only affects the
|
|
147
|
+
This only affects the creator's personal role, not base roles or additional custom roles. It ensures that a user on a restricted allowlist automatically gets access to resources they create without granting those resources to everyone with the same base role.
|
|
@@ -29,6 +29,9 @@ All fields support `<<variable>>` and `<<(sourceData) => ...>>` expressions.
|
|
|
29
29
|
| `pagination` | no | See Pagination section |
|
|
30
30
|
| `systemId` | no | Links system credentials and URL. Omit for public APIs |
|
|
31
31
|
|
|
32
|
+
For APIs that require the same query key multiple times, use an array value:
|
|
33
|
+
`{ metadataHeaders: ["From", "Subject"] }` -> `?metadataHeaders=From&metadataHeaders=Subject`.
|
|
34
|
+
|
|
32
35
|
## Authentication
|
|
33
36
|
|
|
34
37
|
Credentials are never injected automatically. You must place auth headers explicitly using `<<systemId_credentialKey>>` syntax.
|
|
@@ -34,9 +34,9 @@ The path contains the **database name**. The ODBC driver is specified via the `D
|
|
|
34
34
|
|
|
35
35
|
**Supported drivers:**
|
|
36
36
|
|
|
37
|
-
| Driver | Database
|
|
38
|
-
| --------- |
|
|
39
|
-
| `FreeTDS` | SAP ASE (Sybase), SQL Server | 5000 |
|
|
37
|
+
| Driver | Database | Default Port |
|
|
38
|
+
| --------- | ------------------------------------------ | ------------ |
|
|
39
|
+
| `FreeTDS` | SAP ASE (Sybase), SQL Anywhere, SQL Server | 5000 |
|
|
40
40
|
|
|
41
41
|
Additional query parameters (beyond `DRIVER`) are passed through to the ODBC connection string as key=value pairs.
|
|
42
42
|
|
|
@@ -136,11 +136,41 @@ FreeTDS defaults to TDS 5.0 for Sybase connections. If you encounter protocol er
|
|
|
136
136
|
odbc://user:pass@host:5000/mydb?DRIVER=FreeTDS&TDS_Version=5.0
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
| TDS Version | Use Case
|
|
140
|
-
| ----------- |
|
|
141
|
-
| `5.0` | SAP ASE / Sybase
|
|
142
|
-
| `7.0` | SQL Server 7.0+
|
|
143
|
-
| `7.4` | SQL Server 2012+
|
|
139
|
+
| TDS Version | Use Case |
|
|
140
|
+
| ----------- | ---------------------------------- |
|
|
141
|
+
| `5.0` | SAP ASE / Sybase, SAP SQL Anywhere |
|
|
142
|
+
| `7.0` | SQL Server 7.0+ |
|
|
143
|
+
| `7.4` | SQL Server 2012+ |
|
|
144
|
+
|
|
145
|
+
### SAP SQL Anywhere
|
|
146
|
+
|
|
147
|
+
SQL Anywhere (SA16/SA17) works with FreeTDS using TDS version 5.0. Always specify `TDS_Version=5.0` explicitly:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
odbc://user:pass@host:2638/mydb?DRIVER=FreeTDS&TDS_Version=5.0
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Key differences from SAP ASE:
|
|
154
|
+
|
|
155
|
+
- Default port is **2638** (not 5000)
|
|
156
|
+
- Uses `TOP n` instead of `SET ROWCOUNT n` for row limiting: `SELECT TOP 10 * FROM table`
|
|
157
|
+
- Does not support `LIMIT` syntax
|
|
158
|
+
- `DB_NAME()` returns the current database name
|
|
159
|
+
- `sa_db_info()` lists all running databases on the server
|
|
160
|
+
- Only databases explicitly loaded by the server process are available — if you get "database not found", the database name must match the logical name the server assigned at startup (either from `-n` flag or the `.db` filename without extension)
|
|
161
|
+
|
|
162
|
+
### Database-Specific Error Codes
|
|
163
|
+
|
|
164
|
+
ODBC often surfaces error codes from the underlying database or driver. Do not treat those codes as generic ODBC meanings. If the message identifies a database engine, use that vendor's SQLCODE documentation instead of inferring from connection-string shape.
|
|
165
|
+
|
|
166
|
+
For SQL Anywhere errors surfaced through ODBC:
|
|
167
|
+
|
|
168
|
+
| SQLCODE | Meaning | Implication |
|
|
169
|
+
| ------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
170
|
+
| `-103` | Invalid user ID or password | The database was reached far enough to reject authentication. Do not treat this as a missing database name. |
|
|
171
|
+
| `-83` | Specified database not found | The database name/path could not be resolved. Check the database name, DBN/DBF settings, server name, and TDS/driver routing. |
|
|
172
|
+
|
|
173
|
+
For other ODBC-backed databases, look up the database/driver-specific error code before concluding what failed.
|
|
144
174
|
|
|
145
175
|
## Common Pitfalls
|
|
146
176
|
|
|
@@ -154,7 +184,7 @@ odbc://user:pass@host:5000/mydb?DRIVER=FreeTDS&TDS_Version=5.0
|
|
|
154
184
|
|
|
155
185
|
When an ODBC step fails and the cause is not obvious:
|
|
156
186
|
|
|
157
|
-
1. **Read the error message** — superglue includes
|
|
187
|
+
1. **Read the error message** — superglue includes a truncated query preview in the error. Check for syntax errors, missing columns, or type mismatches.
|
|
158
188
|
2. **Verify connection credentials** — use `sg system find` to confirm `storedCredentials` keys match the placeholders in your URL. Test connectivity with a simple `SELECT 1` via `sg system call`.
|
|
159
189
|
3. **Check database-side access** — connection refused or permission denied errors typically mean the database user lacks access. Verify with the user that the credentials have the required grants.
|
|
160
190
|
4. **Check driver availability** — if the error mentions "driver not found", the `DRIVER` query parameter does not match any registered driver in `/etc/odbcinst.ini`. Verify the driver name is correct and the driver is installed in the Docker image.
|
|
@@ -18,9 +18,11 @@ If the user is asking general questions (not building):
|
|
|
18
18
|
|
|
19
19
|
## Authentication
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
API, SDK, CLI, and webhook usage require an **API key**. MCP clients can use OAuth when supported, or API keys for non-interactive setup. Self-hosted deployments also need the API/MCP endpoint URL. There are no workspace IDs, project IDs, or other identifiers.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
MCP authentication is separate from API/SDK/CLI setup. For MCP OAuth, dynamic client registration, Langdock setup, and named server permissions, use the MCP documentation.
|
|
24
|
+
|
|
25
|
+
Users can generate and manage API keys in **My Credentials -> superglue API keys**. The API endpoint is displayed on the same page.
|
|
24
26
|
|
|
25
27
|
## Interfaces
|
|
26
28
|
|
|
@@ -34,30 +36,35 @@ Users can generate and manage API keys in **Control Panel → API Keys**. The AP
|
|
|
34
36
|
|
|
35
37
|
Tools can be triggered via webhook: `POST {apiEndpoint}/v1/hooks/{toolId}?token={apiKey}`
|
|
36
38
|
|
|
37
|
-
On superglue Cloud, the API endpoint is `https://api.superglue.cloud`. Self-hosted and enterprise deployments use their own API endpoint — users can find theirs under
|
|
39
|
+
On superglue Cloud, the API endpoint is `https://api.superglue.cloud`. Self-hosted and enterprise deployments use their own API endpoint — users can find theirs under My Credentials -> superglue API keys.
|
|
38
40
|
|
|
39
41
|
### OAuth Callback URL
|
|
40
42
|
|
|
41
43
|
OAuth flows require a callback URL: `{appEndpoint}/api/auth/callback`
|
|
42
44
|
|
|
43
|
-
On superglue Cloud, the app endpoint is `https://app.superglue.cloud`. Self-hosted and enterprise deployments use their own app URL. If a user doesn't know their endpoints, they can check the browser URL bar for the app endpoint, and
|
|
45
|
+
On superglue Cloud, the app endpoint is `https://app.superglue.cloud`. Self-hosted and enterprise deployments use their own app URL. If a user doesn't know their endpoints, they can check the browser URL bar for the app endpoint, and My Credentials -> superglue API keys for the API endpoint.
|
|
44
46
|
|
|
45
47
|
## Web App UI Layout
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- **
|
|
49
|
+
Use this section as the source of truth for high-level web app navigation. Do not invent UI locations that are not listed here.
|
|
50
|
+
|
|
51
|
+
The persistent left sidebar contains these top-level items:
|
|
52
|
+
|
|
53
|
+
- **Agent** (`/`) — primary AI chat assistant for building and debugging tools and systems.
|
|
54
|
+
- **Landscape** (`/landscape`) — graph overview of tools, systems, and their connections.
|
|
55
|
+
- **Tools** (`/tools`, detail at `/tools/{toolId}`) — saved tools; opens the tool playground for editing, testing, and running.
|
|
56
|
+
- **Systems** (`/systems`, detail at `/systems/{systemId}`) — connected external systems with credentials and documentation.
|
|
57
|
+
- **My Credentials** (`/credentials`) — credential management. The **My Credentials** section is for personal user-owned system credentials; the **superglue API keys** section is for API keys. Admins and members open it inside the normal app shell from the sidebar; end users only see this standalone credentials surface.
|
|
58
|
+
- **Runs** (`/runs`, detail at `/runs/{runId}`) — execution history for full, draft, and single-step tool runs. Runs is a top-level sidebar item, not a Control Panel sub-item.
|
|
59
|
+
- **Control Panel** (`/admin`) — expandable group for organization and account administration:
|
|
60
|
+
- **Overview** (`/admin`) — dashboard summary, including failed-run and schedule summaries.
|
|
61
|
+
- **Schedules** (`/admin?view=schedules`) — scheduled and recurring tool runs.
|
|
62
|
+
- **Access Rules** (`/admin/access`) — role and access-rule configuration; visible to admins on paid tiers. Use the access-rules reference for RBAC behavior, base roles, and personal roles.
|
|
63
|
+
- **Organization** (`/admin?view=organization`) — organization members, invites, and org-level settings; visible on paid tiers. Member management actions are admin-gated.
|
|
64
|
+
- **MCP Servers** (`/admin?view=mcp-servers`) — manage and export named MCP server endpoints. Use the MCP documentation for behavior, permissions, and client setup.
|
|
65
|
+
- **Notifications** (`/admin?view=notifications`) — user notification preferences and failure-alert channels.
|
|
66
|
+
|
|
67
|
+
Below the navigation, the sidebar shows the organization switcher and Sign Out. Depending on the plan, it also shows **Upgrade Plan** or **Subscription**; Subscription opens the external Stripe billing portal. There is no standalone Settings, Profile, or in-app Billing page.
|
|
61
68
|
|
|
62
69
|
## Internals
|
|
63
70
|
|