@superglue/cli 1.1.254 → 1.1.256
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 +145 -145
- package/dist/skills/superglue/SKILL.md +9 -11
- package/package.json +1 -1
- package/skills/superglue/SKILL.md +9 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superglue
|
|
3
|
-
description: "Build, test, deploy and integrate superglue tools
|
|
3
|
+
description: "Build, test, deploy, and integrate superglue tools with the sg CLI and superglue SDKs. Load before running any sg command or writing superglue SDK, REST, or webhook integration code, then run `sg skill <topic>` for the protocols and topics involved."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# superglue CLI (`sg`) — Agent Reference
|
|
@@ -30,7 +30,7 @@ Read these on demand — they are authoritative for their topic and kept in sync
|
|
|
30
30
|
| `sg skill access-rules` | RBAC roles, resource grants, and tool/credential permissions (enterprise only) |
|
|
31
31
|
| `sg skill superglue-email` | Custom report and notification emails with attachments through superglue's email service |
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Before You Start
|
|
34
34
|
|
|
35
35
|
**Pre-requisites for using the CLI**
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ Read these on demand — they are authoritative for their topic and kept in sync
|
|
|
40
40
|
|
|
41
41
|
**Calling systems and running tools**
|
|
42
42
|
|
|
43
|
-
1.
|
|
43
|
+
1. Pull the relevant system context with `sg system find` before calling system endpoints and before building tools.
|
|
44
44
|
2. Consult provider documentation when an API or service behavior is unclear.
|
|
45
45
|
|
|
46
46
|
**Authentication & Credentials**
|
|
@@ -146,8 +146,6 @@ Blocked commands print a clear error showing the current preset and how to chang
|
|
|
146
146
|
|
|
147
147
|
Systems are derived: a connection namespace is derived from existing connections. There is no system record to create or edit; you create and edit your connection.
|
|
148
148
|
|
|
149
|
-
Removed commands (`sg system create`, `edit`, `credentials`, and `search-docs`) return a deprecation error with `sg update` and replacement guidance. Removed system API endpoints return HTTP 410 with the same guidance. Run `sg update`, then use connection commands; use `sg system find --id <id>` for system knowledge. Legacy `/credentials` API aliases remain available with deprecation headers.
|
|
150
|
-
|
|
151
149
|
Match accessible owned and shared connections to the requested account, tenant, and environment, even across different system IDs. Respect an explicit connection choice or request for separate access. Otherwise, prefer suitable existing access; ask only when the account or connection choice is unclear. Defaults apply within one system ID and do not establish authentication or suitability.
|
|
152
150
|
|
|
153
151
|
1. Read the relevant tool's namespace first, then inspect existing namespaces with `sg system find <query>`. List accessible connections in each candidate namespace with `sg system connection list --system-id <id>`. Reuse an existing id for the same logical service; preserve IDs referenced by saved tools. For a new namespace, use the template id, not its display name. Without a template, choose a descriptive id. Keep account labels in connection names; separate namespaces when tools need distinct services or environments.
|
|
@@ -157,7 +155,7 @@ Match accessible owned and shared connections to the requested account, tenant,
|
|
|
157
155
|
5. Verify connectivity with `sg system call`
|
|
158
156
|
6. For updates: re-run `sg system connection set --system-id <id>` with the fields to change. When the namespace holds several connections, pass `--connection-id <id>` from `sg system connection list` to `set`, `clear`, `oauth`, and `call`; without it, `set` and `oauth` target your default or oldest owned connection
|
|
159
157
|
|
|
160
|
-
A connection linked to an OAuth app uses the app's client ID, client secret, and token URL; app secret rotations reach every linked connection. Other authentication fields are copied on selection and stay connection-specific; scope edits remain local. Changing the client ID or token URL detaches the connection and requires its own client secret; `--oauth-app-id ""` also detaches and must be sent together with the connection's own client secret.
|
|
158
|
+
A connection linked to an OAuth app uses the app's client ID, client secret, and token URL; app secret rotations reach every linked connection. Other authentication fields are copied on selection and stay connection-specific; scope edits remain local. Changing the client ID or token URL detaches the connection and requires its own client secret; `--oauth-app-id ""` also detaches and must be sent together with the connection's own client secret. Linking, switching, or detaching an app, or changing the client ID, deletes the connection's OAuth tokens; authorize again afterward. Other authentication changes keep tokens and supplemental secrets. Managed secrets stay hidden and restricted to approved provider endpoints. Every org member can use any organization OAuth app; its creator and administrators edit it. Client credentials connections keep their own client ID and secret and never take `--oauth-app-id`.
|
|
161
159
|
|
|
162
160
|
When selecting an OAuth app on an existing non-OAuth connection, also pass `--authentication '{"type":"oauth2"}'`. An app-only update to a non-OAuth connection returns a validation error.
|
|
163
161
|
|
|
@@ -448,7 +446,7 @@ Object/array return values are `JSON.stringify`'d automatically when spliced int
|
|
|
448
446
|
|
|
449
447
|
```javascript
|
|
450
448
|
sourceData = {
|
|
451
|
-
// Payload fields at
|
|
449
|
+
// Payload fields at root level, not under sourceData.payload
|
|
452
450
|
userId: "123",
|
|
453
451
|
date: "2024-01-15",
|
|
454
452
|
|
|
@@ -483,7 +481,7 @@ sourceData = {
|
|
|
483
481
|
- Batch continuation: process a large import in manageable batches and save the next cursor, so each scheduled run continues where the previous run stopped.
|
|
484
482
|
- Polling-based change detection: poll an API on a schedule, compare its version or fingerprint with the previous result, and trigger follow-up work only when it changes. This is useful when the provider lacks the required webhook.
|
|
485
483
|
- Incremental syncs and dedupe: store a timestamp or cursor for new records, or a bounded set such as `persistedState.seenIds`.
|
|
486
|
-
- State gives at-least-once execution with progress tracking, never exactly-once: crashes, concurrent-run conflicts, and state resets all cause re-processing, which re-executes side effects. Steps that write to external systems
|
|
484
|
+
- State gives at-least-once execution with progress tracking, never exactly-once: crashes, concurrent-run conflicts, and state resets all cause re-processing, which re-executes side effects. Steps that write to external systems must be replay-safe — upsert by a stable external id or pass an idempotency key — or duplicates will land in the target system.
|
|
487
485
|
- Keep set-valued keys bounded (e.g. keep only the most recent ~1,000 ids): an unbounded set eventually exceeds the 64KB value limit, which rejects the tool's entire state write on every run.
|
|
488
486
|
- Never copy credential values into state — state is stored unencrypted and readable by anyone with read access to the tool.
|
|
489
487
|
- Inspect current state via `sg tool state get <toolId>` (values matching known connection secrets are masked); reset it via `sg tool state reset <toolId>`. A reset wins over in-flight runs: their updates to pre-reset keys are discarded as conflicts; only keys they newly add are kept.
|
|
@@ -502,13 +500,13 @@ Safe naming: payload inputs get specific, domain-flavored names (`customerId`, `
|
|
|
502
500
|
|
|
503
501
|
### Step Result Envelopes
|
|
504
502
|
|
|
505
|
-
**Every** step result is wrapped in `{ currentItem, data, success }`.
|
|
503
|
+
**Every** step result is wrapped in `{ currentItem, data, success }`. Account for it when writing data selectors or transforms.
|
|
506
504
|
|
|
507
505
|
- **Object selector (or none)** — access via `sourceData.stepId.data`
|
|
508
506
|
- **Array selector (loop)** — array of envelopes: `sourceData.stepId.map(i => i.data)`
|
|
509
507
|
- **Paginated step** — all pages merged into a single `.data` field: access via `sourceData.stepId.data`. Do NOT `.map()` over it — returns a single object if one result, array if multiple (unwrapped from single-element array).
|
|
510
508
|
|
|
511
|
-
|
|
509
|
+
Read step results through `.data`: `sourceData.stepId.results` hits the envelope, not the API response.
|
|
512
510
|
|
|
513
511
|
### Data Selectors
|
|
514
512
|
|
|
@@ -561,7 +559,7 @@ All user-provided JS runs in an isolated Deno sandbox.
|
|
|
561
559
|
|
|
562
560
|
### Connections and placeholders
|
|
563
561
|
|
|
564
|
-
Secrets are referenced by name as `<<systemId_credentialKey>>` and resolved from the selected connection at execution time.
|
|
562
|
+
Secrets are referenced by name as `<<systemId_credentialKey>>` and resolved from the selected connection at execution time. Reference them explicitly:
|
|
565
563
|
|
|
566
564
|
```
|
|
567
565
|
System id="stripe", selected connection has secret named: api_key
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superglue
|
|
3
|
-
description: "Build, test, deploy and integrate superglue tools
|
|
3
|
+
description: "Build, test, deploy, and integrate superglue tools with the sg CLI and superglue SDKs. Load before running any sg command or writing superglue SDK, REST, or webhook integration code, then run `sg skill <topic>` for the protocols and topics involved."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# superglue CLI (`sg`) — Agent Reference
|
|
@@ -30,7 +30,7 @@ Read these on demand — they are authoritative for their topic and kept in sync
|
|
|
30
30
|
| `sg skill access-rules` | RBAC roles, resource grants, and tool/credential permissions (enterprise only) |
|
|
31
31
|
| `sg skill superglue-email` | Custom report and notification emails with attachments through superglue's email service |
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Before You Start
|
|
34
34
|
|
|
35
35
|
**Pre-requisites for using the CLI**
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ Read these on demand — they are authoritative for their topic and kept in sync
|
|
|
40
40
|
|
|
41
41
|
**Calling systems and running tools**
|
|
42
42
|
|
|
43
|
-
1.
|
|
43
|
+
1. Pull the relevant system context with `sg system find` before calling system endpoints and before building tools.
|
|
44
44
|
2. Consult provider documentation when an API or service behavior is unclear.
|
|
45
45
|
|
|
46
46
|
**Authentication & Credentials**
|
|
@@ -146,8 +146,6 @@ Blocked commands print a clear error showing the current preset and how to chang
|
|
|
146
146
|
|
|
147
147
|
Systems are derived: a connection namespace is derived from existing connections. There is no system record to create or edit; you create and edit your connection.
|
|
148
148
|
|
|
149
|
-
Removed commands (`sg system create`, `edit`, `credentials`, and `search-docs`) return a deprecation error with `sg update` and replacement guidance. Removed system API endpoints return HTTP 410 with the same guidance. Run `sg update`, then use connection commands; use `sg system find --id <id>` for system knowledge. Legacy `/credentials` API aliases remain available with deprecation headers.
|
|
150
|
-
|
|
151
149
|
Match accessible owned and shared connections to the requested account, tenant, and environment, even across different system IDs. Respect an explicit connection choice or request for separate access. Otherwise, prefer suitable existing access; ask only when the account or connection choice is unclear. Defaults apply within one system ID and do not establish authentication or suitability.
|
|
152
150
|
|
|
153
151
|
1. Read the relevant tool's namespace first, then inspect existing namespaces with `sg system find <query>`. List accessible connections in each candidate namespace with `sg system connection list --system-id <id>`. Reuse an existing id for the same logical service; preserve IDs referenced by saved tools. For a new namespace, use the template id, not its display name. Without a template, choose a descriptive id. Keep account labels in connection names; separate namespaces when tools need distinct services or environments.
|
|
@@ -157,7 +155,7 @@ Match accessible owned and shared connections to the requested account, tenant,
|
|
|
157
155
|
5. Verify connectivity with `sg system call`
|
|
158
156
|
6. For updates: re-run `sg system connection set --system-id <id>` with the fields to change. When the namespace holds several connections, pass `--connection-id <id>` from `sg system connection list` to `set`, `clear`, `oauth`, and `call`; without it, `set` and `oauth` target your default or oldest owned connection
|
|
159
157
|
|
|
160
|
-
A connection linked to an OAuth app uses the app's client ID, client secret, and token URL; app secret rotations reach every linked connection. Other authentication fields are copied on selection and stay connection-specific; scope edits remain local. Changing the client ID or token URL detaches the connection and requires its own client secret; `--oauth-app-id ""` also detaches and must be sent together with the connection's own client secret.
|
|
158
|
+
A connection linked to an OAuth app uses the app's client ID, client secret, and token URL; app secret rotations reach every linked connection. Other authentication fields are copied on selection and stay connection-specific; scope edits remain local. Changing the client ID or token URL detaches the connection and requires its own client secret; `--oauth-app-id ""` also detaches and must be sent together with the connection's own client secret. Linking, switching, or detaching an app, or changing the client ID, deletes the connection's OAuth tokens; authorize again afterward. Other authentication changes keep tokens and supplemental secrets. Managed secrets stay hidden and restricted to approved provider endpoints. Every org member can use any organization OAuth app; its creator and administrators edit it. Client credentials connections keep their own client ID and secret and never take `--oauth-app-id`.
|
|
161
159
|
|
|
162
160
|
When selecting an OAuth app on an existing non-OAuth connection, also pass `--authentication '{"type":"oauth2"}'`. An app-only update to a non-OAuth connection returns a validation error.
|
|
163
161
|
|
|
@@ -448,7 +446,7 @@ Object/array return values are `JSON.stringify`'d automatically when spliced int
|
|
|
448
446
|
|
|
449
447
|
```javascript
|
|
450
448
|
sourceData = {
|
|
451
|
-
// Payload fields at
|
|
449
|
+
// Payload fields at root level, not under sourceData.payload
|
|
452
450
|
userId: "123",
|
|
453
451
|
date: "2024-01-15",
|
|
454
452
|
|
|
@@ -483,7 +481,7 @@ sourceData = {
|
|
|
483
481
|
- Batch continuation: process a large import in manageable batches and save the next cursor, so each scheduled run continues where the previous run stopped.
|
|
484
482
|
- Polling-based change detection: poll an API on a schedule, compare its version or fingerprint with the previous result, and trigger follow-up work only when it changes. This is useful when the provider lacks the required webhook.
|
|
485
483
|
- Incremental syncs and dedupe: store a timestamp or cursor for new records, or a bounded set such as `persistedState.seenIds`.
|
|
486
|
-
- State gives at-least-once execution with progress tracking, never exactly-once: crashes, concurrent-run conflicts, and state resets all cause re-processing, which re-executes side effects. Steps that write to external systems
|
|
484
|
+
- State gives at-least-once execution with progress tracking, never exactly-once: crashes, concurrent-run conflicts, and state resets all cause re-processing, which re-executes side effects. Steps that write to external systems must be replay-safe — upsert by a stable external id or pass an idempotency key — or duplicates will land in the target system.
|
|
487
485
|
- Keep set-valued keys bounded (e.g. keep only the most recent ~1,000 ids): an unbounded set eventually exceeds the 64KB value limit, which rejects the tool's entire state write on every run.
|
|
488
486
|
- Never copy credential values into state — state is stored unencrypted and readable by anyone with read access to the tool.
|
|
489
487
|
- Inspect current state via `sg tool state get <toolId>` (values matching known connection secrets are masked); reset it via `sg tool state reset <toolId>`. A reset wins over in-flight runs: their updates to pre-reset keys are discarded as conflicts; only keys they newly add are kept.
|
|
@@ -502,13 +500,13 @@ Safe naming: payload inputs get specific, domain-flavored names (`customerId`, `
|
|
|
502
500
|
|
|
503
501
|
### Step Result Envelopes
|
|
504
502
|
|
|
505
|
-
**Every** step result is wrapped in `{ currentItem, data, success }`.
|
|
503
|
+
**Every** step result is wrapped in `{ currentItem, data, success }`. Account for it when writing data selectors or transforms.
|
|
506
504
|
|
|
507
505
|
- **Object selector (or none)** — access via `sourceData.stepId.data`
|
|
508
506
|
- **Array selector (loop)** — array of envelopes: `sourceData.stepId.map(i => i.data)`
|
|
509
507
|
- **Paginated step** — all pages merged into a single `.data` field: access via `sourceData.stepId.data`. Do NOT `.map()` over it — returns a single object if one result, array if multiple (unwrapped from single-element array).
|
|
510
508
|
|
|
511
|
-
|
|
509
|
+
Read step results through `.data`: `sourceData.stepId.results` hits the envelope, not the API response.
|
|
512
510
|
|
|
513
511
|
### Data Selectors
|
|
514
512
|
|
|
@@ -561,7 +559,7 @@ All user-provided JS runs in an isolated Deno sandbox.
|
|
|
561
559
|
|
|
562
560
|
### Connections and placeholders
|
|
563
561
|
|
|
564
|
-
Secrets are referenced by name as `<<systemId_credentialKey>>` and resolved from the selected connection at execution time.
|
|
562
|
+
Secrets are referenced by name as `<<systemId_credentialKey>>` and resolved from the selected connection at execution time. Reference them explicitly:
|
|
565
563
|
|
|
566
564
|
```
|
|
567
565
|
System id="stripe", selected connection has secret named: api_key
|