@superglue/cli 1.1.164 → 1.1.165

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.
@@ -44,10 +44,10 @@ Read these on demand — they are authoritative for their topic and kept in sync
44
44
 
45
45
  **Authentication & Credentials**
46
46
 
47
- - Authentication must ALWAYS be explicitly configured — nothing is injected automatically in any protocol.
48
- - HTTP: include auth headers using `<<systemId_credentialKey>>` (e.g. `"Authorization": "Bearer <<my_api_access_token>>"`). `sg system find --id <id>` prints each secret's exact placeholder; `sg system call` rejects bare `<<credentialKey>>` placeholders before sending.
47
+ - `sg system call --system-id <id> --url <url>` selects your credential (starred, then your oldest, then a shared one), refreshes OAuth tokens, and adds the `Authorization` header for `oauth2`, `basic_auth`, and `api_key` systems. The output reports `credential` and `auth`; `auth.applied: "unavailable"` names what is missing. Pass `--credential-id` to use a specific credential. `--url` is the absolute URL, or `<<systemId_url>>` plus the path for tenant-specific hosts.
48
+ - Pass `--headers` with `<<systemId_credentialKey>>` placeholders only when the API expects another header or a query parameter; that replaces the default header. `sg system find --id <id>` prints each secret's exact placeholder; `sg system call` rejects bare `<<credentialKey>>` placeholders before sending.
49
+ - Saved tool steps inject nothing: put the auth header or connection string in the step config.
49
50
  - Databases/Redis/file servers: embed credential placeholders in the connection URL (e.g. `postgres://<<sys_user>>:<<sys_pass>>@host/db`).
50
- - OAuth: token refresh is automatic, but the header must still be explicit.
51
51
 
52
52
  **Saving tools**
53
53
 
@@ -240,7 +240,7 @@ Agents familiar with the web agent (its native tools and the `superglue` node mo
240
240
  | `tools.writeSystem` (superglue/approved; saved) | `sg system edit --id <id> ...` | Edits the system with that exact ID |
241
241
  | `run_command` with `vfs` for `/org/systems/` | `sg system find <query>` / `--id <id>` | Returns secret-key presence and the system URL |
242
242
  | Credentials VFS / saved credentials | `sg system credentials get/set/clear` | Manage the current user's credentials for a system |
243
- | `tools.callSystem` | `sg system call --url "..." --system-id <id>` | Authenticated ad-hoc calls for testing / schema introspection |
243
+ | `tools.callSystem` | `sg system call --system-id <id> --url <url>` | Ad-hoc calls; credential and auth header are added server-side |
244
244
  | `run_command search` | `sg system search-docs --system-id <id> -k` | Targeted keyword search over ingested system docs |
245
245
  | `authenticate_oauth` | `sg system oauth --system-id <id> [--scopes]` | Opens browser flow. Supports `--grant-type client_credentials` too |
246
246
  | `run_command` with `vfs` for `/org/runs/` | `sg run list` / `sg run get <runId>` | Filter `list` by `--tool`, `--status`, `--source`, `--limit` |
@@ -293,8 +293,8 @@ sg system find --id my_api
293
293
  sg system credentials get --system-id my_api
294
294
  sg system credentials set --system-id my_api --credentials '{"api_key":"sk-xxx"}'
295
295
  sg system credentials clear --system-id my_api
296
- sg system call --url https://api.example.com/users --system-id my_api --method GET \
297
- --headers '{"Authorization":"Bearer <<my_api_access_token>>"}'
296
+ sg system call --system-id my_api --url "<<my_api_url>>/users"
297
+ sg system call --system-id my_api --url https://api.example.com/users --headers '{"X-API-Key":"<<my_api_api_key>>"}'
298
298
  sg system search-docs --system-id slack -k "send message channels"
299
299
  sg system oauth --system-id gmail --scopes "https://www.googleapis.com/auth/gmail.modify"
300
300
  sg system oauth --system-id my_api --grant-type client_credentials --scopes "read write"
@@ -552,7 +552,7 @@ System id="stripe", selected credential has secret named: api_key
552
552
  → Available as: <<stripe_api_key>>
553
553
  ```
554
554
 
555
- **Auth header patterns:**
555
+ **Auth header patterns for tool steps** (`sg system call` adds the Bearer or Basic header itself):
556
556
 
557
557
  ```json
558
558
  {"Authorization": "Bearer <<stripe_api_key>>"}
@@ -34,13 +34,13 @@ For APIs that require the same query key multiple times, use an array value:
34
34
 
35
35
  ## Authentication
36
36
 
37
- Credentials are never injected automatically. You must place auth headers explicitly using `<<systemId_credentialKey>>` syntax.
37
+ Saved tool steps never inject credentials: place auth headers explicitly with `<<systemId_credentialKey>>` placeholders. `sg system call` adds the `Authorization` header itself for `oauth2` (Bearer), `basic_auth` (Basic), and `api_key` (Bearer) systems; pass your own header only when the API expects a different one.
38
38
 
39
39
  ```javascript
40
- // Bearer token (including OAuth — token refresh is automatic, header is not)
40
+ // Bearer token (including OAuth — token refresh is automatic, the step header is not)
41
41
  { "Authorization": "Bearer <<systemId_access_token>>" }
42
42
 
43
- // API key
43
+ // API key in a custom header
44
44
  { "X-API-Key": "<<systemId_api_key>>" }
45
45
 
46
46
  // Basic Auth — auto-encoded to Base64, do NOT manually encode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superglue/cli",
3
- "version": "1.1.164",
3
+ "version": "1.1.165",
4
4
  "bin": {
5
5
  "sg": "./dist/cli.js"
6
6
  },
@@ -44,10 +44,10 @@ Read these on demand — they are authoritative for their topic and kept in sync
44
44
 
45
45
  **Authentication & Credentials**
46
46
 
47
- - Authentication must ALWAYS be explicitly configured — nothing is injected automatically in any protocol.
48
- - HTTP: include auth headers using `<<systemId_credentialKey>>` (e.g. `"Authorization": "Bearer <<my_api_access_token>>"`). `sg system find --id <id>` prints each secret's exact placeholder; `sg system call` rejects bare `<<credentialKey>>` placeholders before sending.
47
+ - `sg system call --system-id <id> --url <url>` selects your credential (starred, then your oldest, then a shared one), refreshes OAuth tokens, and adds the `Authorization` header for `oauth2`, `basic_auth`, and `api_key` systems. The output reports `credential` and `auth`; `auth.applied: "unavailable"` names what is missing. Pass `--credential-id` to use a specific credential. `--url` is the absolute URL, or `<<systemId_url>>` plus the path for tenant-specific hosts.
48
+ - Pass `--headers` with `<<systemId_credentialKey>>` placeholders only when the API expects another header or a query parameter; that replaces the default header. `sg system find --id <id>` prints each secret's exact placeholder; `sg system call` rejects bare `<<credentialKey>>` placeholders before sending.
49
+ - Saved tool steps inject nothing: put the auth header or connection string in the step config.
49
50
  - Databases/Redis/file servers: embed credential placeholders in the connection URL (e.g. `postgres://<<sys_user>>:<<sys_pass>>@host/db`).
50
- - OAuth: token refresh is automatic, but the header must still be explicit.
51
51
 
52
52
  **Saving tools**
53
53
 
@@ -240,7 +240,7 @@ Agents familiar with the web agent (its native tools and the `superglue` node mo
240
240
  | `tools.writeSystem` (superglue/approved; saved) | `sg system edit --id <id> ...` | Edits the system with that exact ID |
241
241
  | `run_command` with `vfs` for `/org/systems/` | `sg system find <query>` / `--id <id>` | Returns secret-key presence and the system URL |
242
242
  | Credentials VFS / saved credentials | `sg system credentials get/set/clear` | Manage the current user's credentials for a system |
243
- | `tools.callSystem` | `sg system call --url "..." --system-id <id>` | Authenticated ad-hoc calls for testing / schema introspection |
243
+ | `tools.callSystem` | `sg system call --system-id <id> --url <url>` | Ad-hoc calls; credential and auth header are added server-side |
244
244
  | `run_command search` | `sg system search-docs --system-id <id> -k` | Targeted keyword search over ingested system docs |
245
245
  | `authenticate_oauth` | `sg system oauth --system-id <id> [--scopes]` | Opens browser flow. Supports `--grant-type client_credentials` too |
246
246
  | `run_command` with `vfs` for `/org/runs/` | `sg run list` / `sg run get <runId>` | Filter `list` by `--tool`, `--status`, `--source`, `--limit` |
@@ -293,8 +293,8 @@ sg system find --id my_api
293
293
  sg system credentials get --system-id my_api
294
294
  sg system credentials set --system-id my_api --credentials '{"api_key":"sk-xxx"}'
295
295
  sg system credentials clear --system-id my_api
296
- sg system call --url https://api.example.com/users --system-id my_api --method GET \
297
- --headers '{"Authorization":"Bearer <<my_api_access_token>>"}'
296
+ sg system call --system-id my_api --url "<<my_api_url>>/users"
297
+ sg system call --system-id my_api --url https://api.example.com/users --headers '{"X-API-Key":"<<my_api_api_key>>"}'
298
298
  sg system search-docs --system-id slack -k "send message channels"
299
299
  sg system oauth --system-id gmail --scopes "https://www.googleapis.com/auth/gmail.modify"
300
300
  sg system oauth --system-id my_api --grant-type client_credentials --scopes "read write"
@@ -552,7 +552,7 @@ System id="stripe", selected credential has secret named: api_key
552
552
  → Available as: <<stripe_api_key>>
553
553
  ```
554
554
 
555
- **Auth header patterns:**
555
+ **Auth header patterns for tool steps** (`sg system call` adds the Bearer or Basic header itself):
556
556
 
557
557
  ```json
558
558
  {"Authorization": "Bearer <<stripe_api_key>>"}
@@ -34,13 +34,13 @@ For APIs that require the same query key multiple times, use an array value:
34
34
 
35
35
  ## Authentication
36
36
 
37
- Credentials are never injected automatically. You must place auth headers explicitly using `<<systemId_credentialKey>>` syntax.
37
+ Saved tool steps never inject credentials: place auth headers explicitly with `<<systemId_credentialKey>>` placeholders. `sg system call` adds the `Authorization` header itself for `oauth2` (Bearer), `basic_auth` (Basic), and `api_key` (Bearer) systems; pass your own header only when the API expects a different one.
38
38
 
39
39
  ```javascript
40
- // Bearer token (including OAuth — token refresh is automatic, header is not)
40
+ // Bearer token (including OAuth — token refresh is automatic, the step header is not)
41
41
  { "Authorization": "Bearer <<systemId_access_token>>" }
42
42
 
43
- // API key
43
+ // API key in a custom header
44
44
  { "X-API-Key": "<<systemId_api_key>>" }
45
45
 
46
46
  // Basic Auth — auto-encoded to Base64, do NOT manually encode