@superglue/cli 1.1.173 → 1.1.174
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 +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superglue",
|
|
3
3
|
"description": "Build, test, and manage superglue tools via the sg CLI. Use when working with superglue tools, systems, APIs, SDKs, or the sg command.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.174",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "superglue",
|
|
7
7
|
"email": "hello@superglue.cloud"
|
package/dist/cli.js
CHANGED
|
@@ -745,7 +745,7 @@ Create the developer app from the Ramp dashboard's Developer area with an Admin
|
|
|
745
745
|
|
|
746
746
|
Token exchange is POST /developer/v1/token with form content, grant_type=client_credentials, and HTTP Basic auth using client_id:client_secret. Subsequent API calls use Authorization: Bearer <<access_token>>. Tokens are environment-bound and scope-bound; client-credentials tokens last 10 days.
|
|
747
747
|
|
|
748
|
-
For third-party or public multi-customer apps, use Ramp's authorization-code flow instead of Client Credentials: authorization endpoint https://api.ramp.com/v1/authorize and token endpoint https://api.ramp.com/developer/v1/token. Only users with Developer API authorization permissions, typically Admin or Business Owner users, can authorize apps. Sensitive scopes such as cards:read_vault require additional security review.`},remote:{name:"remote",apiUrl:"https://gateway.remote.com",regex:"^https?:\\/\\/(?:[^/]+\\.)*remote(?:-sandbox)?\\.com(?:[:/?#].*)?$",icon:"/logos/remote.svg",docsUrl:"https://developer.remote.com/docs/getting-started-with-remote",preferredAuthType:"api_key",keywords:["companies","employments","employees","contractors","countries","legal entities","expenses","payroll","onboarding","eligibility"],systemSpecificInstructions:"Remote customer API tokens are environment-specific: ra_live_ tokens work only with https://gateway.remote.com, while ra_test_ tokens work only with https://gateway.remote-sandbox.com. Company admins and owners generate tokens in Company Settings > Integrations & APIs > Integrations > Remote API. Send the token as Authorization: Bearer <token>; API routes begin with /v1/. This template targets customer API tokens; Remote partners may instead use OAuth flows."},xero:{name:"xero",apiUrl:"https://api.xero.com",regex:"^.*xero.*$",icon:"xero",docsUrl:"https://developer.xero.com/documentation/api/api-overview",openApiUrl:"https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/xero_accounting.yaml",preferredAuthType:"oauth2",oauth:{authUrl:"https://login.xero.com/identity/connect/authorize",tokenUrl:"https://identity.xero.com/connect/token",scopes:"accounting.transactions accounting.transactions.read accounting.reports.read accounting.journals.read accounting.settings accounting.settings.read accounting.contacts accounting.contacts.read accounting.attachments accounting.attachments.read payroll.employees payroll.payruns payroll.payslip payroll.timesheets payroll.settings"},keywords:["accounts","invoices","contacts","bills","credit notes","bank transactions","payments","receipts","journals","purchase orders","quotes","reports","tax rates","tracking categories","payroll","oauth"]},myob:{name:"myob",apiUrl:"https://api.myob.com/accountright",regex:"^.*myob.*$",icon:"simpleicons:myob",docsUrl:"https://developer.myob.com/api/myob-business-api/api-overview/",preferredAuthType:"oauth2",oauth:{authUrl:"https://secure.myob.com/oauth2/account/authorize",tokenUrl:"https://secure.myob.com/oauth2/v1/authorize",scopes:"sme-general-ledger sme-sales sme-timebilling sme-inventory sme-contacts-customer sme-contacts-supplier sme-contacts-personal sme-contacts-employee sme-banking sme-purchases sme-payroll sme-company-settings sme-company-file",tokenAuthMethod:"body",tokenContentType:"form"},keywords:["invoices","contacts","accounts","bank transactions","items","purchase orders","sale orders","payroll","employees","company files","general ledger","tax codes"],systemSpecificInstructions:"Every request needs three headers beyond the bearer token: x-myobapi-key (app's API key), x-myobapi-version: v2, and x-myobapi-cftoken (Base64 of company-file username:password, required even with OAuth \u2014 desktop AccountRight files have no OAuth and use only this header). After OAuth redirect, the businessId returned is the cf_uri (company file UID) that must prefix every subsequent request path under the accountright base. Register the app and get the API key/secret from the Developer tab at my.MYOB.com, not from api.myob.com itself."},docusign:{name:"docusign",apiUrl:"https://api.docusign.com",regex:"^.*docusign.*$",icon:"/logos/docusign.svg",docsUrl:"https://developers.docusign.com/docs/esign-rest-api",openApiUrl:"https://raw.githubusercontent.com/docusign/OpenAPI-Specifications/refs/heads/master/esignature.rest.swagger-v2.1.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://account.docusign.com/oauth/auth",tokenUrl:"https://account.docusign.com/oauth/token",scopes:"signature extended impersonation organization_read group_read permission_read user_read user_write account_read domain_read identity_provider_read user_data_redact asset_group_account_read asset_group_account_clone_write asset_group_account_clone_read"},keywords:["envelopes","documents","recipients","templates","signatures","tabs","brands","accounts","users","groups","powerforms","bulk send","connect","custom fields","oauth"]},deribit:{name:"deribit",apiUrl:"https://www.deribit.com/api/v2",regex:"^.*deribit.*$",icon:"deribit",docsUrl:"https://docs.deribit.com",preferredAuthType:"oauth2",oauth:{tokenUrl:"https://www.deribit.com/api/v2/public/auth",grant_type:"client_credentials",tokenContentType:"json"},keywords:["instruments","order_book","trades","orders","positions","accounts","wallet","deposits","withdrawals","market_data","options","futures","perpetuals"],systemSpecificInstructions:'Deribit uses a JSON-RPC 2.0 API over HTTPS. The token endpoint is /api/v2/public/auth \u2014 send client_id and client_secret as JSON body with grant_type: "client_credentials". Access tokens are Bearer tokens with a 900-second TTL; use /api/v2/public/auth with grant_type: "refresh_token" to renew. Deribit provides a testnet at https://test.deribit.com/api/v2 with separate credentials \u2014 register at test.deribit.com for a demo account.'},intercom:{name:"intercom",apiUrl:"https://api.intercom.io",regex:"^.*intercom.*$",icon:"intercom",docsUrl:"https://developers.intercom.com/intercom-api-reference",openApiUrl:"https://raw.githubusercontent.com/intercom/Intercom-OpenAPI/refs/heads/main/descriptions/2.9/api.intercom.io.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://app.intercom.com/oauth",tokenUrl:"https://api.intercom.io/auth/eagle/token",scopes:"inbox:read inbox:write users:read users:write companies:read companies:write contacts:read contacts:write conversations:read conversations:write help_center:read help_center:write teams:read teams:write tags:read tags:write segments:read events:write counts:read"},keywords:["contacts","conversations","messages","users","companies","events","tags","segments","articles","help center","teams","admins","inbox","notes","custom attributes","query","api key"]},asana:{name:"asana",apiUrl:"https://app.asana.com/api",regex:"^.*asana.*$",icon:"asana",docsUrl:"https://developers.asana.com/docs",openApiUrl:"https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://app.asana.com/-/oauth_authorize",tokenUrl:"https://app.asana.com/-/oauth_token",scopes:"default openid email profile",grant_type:"authorization_code",managed:!0},keywords:["tasks","projects","workspaces","teams","portfolios","goals","sections","tags","custom fields","stories","attachments","followers","assignee","due dates","query","search","api key"]},trello:{name:"trello",apiUrl:"https://api.trello.com",regex:"^.*trello.*$",icon:"trello",docsUrl:"https://developer.atlassian.com/cloud/trello/rest",openApiUrl:"https://developer.atlassian.com/cloud/trello/swagger.v3.json",preferredAuthType:"api_key",keywords:["boards","lists","cards","members","labels","checklists","attachments","comments","actions","organizations","teams","power-ups","custom fields","stickers","api key"]},notion:{name:"notion",label:"Notion",apiUrl:"https://api.notion.com",regex:"^.*notion.*$",icon:"notion",docsUrl:"https://developers.notion.com",openApiUrl:"https://raw.githubusercontent.com/cameronking4/notion-openapi-chatgpt-action/refs/heads/main/public/notion-openapi.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://api.notion.com/v1/oauth/authorize?owner=user",tokenUrl:"https://api.notion.com/v1/oauth/token",scopes:"read_content read_comments read_user",managed:!0,tokenAuthMethod:"basic_auth",tokenContentType:"json",extraHeaders:{"Notion-Version":"2022-06-28"}},systemSpecificInstructions:"Notion OAuth exposes only pages selected for the connection and their accessible children.",keywords:["pages","databases","blocks","users","workspaces","properties","rich text","search","comments","parent","children","query","filter","sort","api key"]},digitalocean:{name:"digitalocean",apiUrl:"https://api.digitalocean.com",regex:"^.*digitalocean.*$",icon:"digitalocean",docsUrl:"https://docs.digitalocean.com/reference/api",openApiUrl:"https://raw.githubusercontent.com/digitalocean/openapi/refs/heads/main/specification/DigitalOcean-public.v2.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://cloud.digitalocean.com/v1/oauth/authorize",tokenUrl:"https://cloud.digitalocean.com/v1/oauth/token",scopes:"read write admin"},keywords:["droplets","volumes","images","snapshots","regions","sizes","ssh_keys","domains","domain_records","certificates","firewalls","load_balancers","projects","tags","vpcs","api key"]},heroku:{name:"heroku",apiUrl:"https://api.heroku.com",regex:"^.*heroku.*$",icon:"/logos/heroku.svg",docsUrl:"https://devcenter.heroku.com/categories/platform-api",preferredAuthType:"api_key",oauth:{authUrl:"https://id.heroku.com/oauth/authorize",tokenUrl:"https://id.heroku.com/oauth/token",scopes:"global read write read-protected write-protected"},keywords:["apps","addons","builds","releases","config_vars","formations","dynos","buildpacks","domains","collaborators","keys","account","apps/~/addons","spaces","pipelines","api key"]},huggingface:{name:"huggingface",apiUrl:"https://huggingface.co",regex:"^.*huggingface.*$",icon:"huggingface",docsUrl:"https://huggingface.co/docs/hub/en/api",preferredAuthType:"api_key",keywords:["models","datasets","spaces","parameters","inference","fine-tuning","files","spaces","accounts","groups","api key"]},circleci:{name:"circleci",apiUrl:"https://circleci.com/api",regex:"^.*circleci.*$",icon:"circleci",docsUrl:"https://circleci.com/docs/api",openApiUrl:"https://circleci.com/api/v2/openapi.json",preferredAuthType:"api_key",keywords:["pipelines","workflows","jobs","projects","builds","artifacts","environment_variables","contexts","orbs","insights","schedules","checkouts","api key"]},travisci:{name:"travisci",apiUrl:"https://api.travis-ci.com",regex:"^.*(travis|travis-ci).*$",icon:"travisCI",docsUrl:"https://docs.travis-ci.com/api",preferredAuthType:"api_key",keywords:["builds","jobs","repositories","branches","requests","caches","env_vars","settings","logs","stages","beta_features","api key"]},wordpress:{name:"wordpress",apiUrl:"https://{your-site.com}/wp-json/wp/v2",regex:"^.*wordpress.*$",icon:"wordpress",docsUrl:"https://developer.wordpress.org/rest-api",openApiUrl:"https://developer.wordpress.com/docs/api/",preferredAuthType:"api_key",keywords:["posts","pages","media","users","categories","tags","comments","taxonomies","types","statuses","settings","themes","plugins","api key"]},cloudflare:{name:"cloudflare",apiUrl:"https://api.cloudflare.com",regex:"^.*cloudflare.*$",icon:"cloudflare",docsUrl:"https://developers.cloudflare.com/api",openApiUrl:"https://raw.githubusercontent.com/cloudflare/api-schemas/refs/heads/main/openapi.json",preferredAuthType:"api_key",keywords:["zones","dns_records","firewall_rules","page_rules","workers","certificates","load_balancers","rate_limits","waf","analytics","cache","ssl","api key"]},bigcommerce:{name:"bigcommerce",apiUrl:"https://api.bigcommerce.com",regex:"^.*bigcommerce.*$",icon:"bigcommerce",docsUrl:"https://developer.bigcommerce.com/docs/rest-management",preferredAuthType:"api_key",keywords:["products","categories","brands","orders","customers","carts","checkouts","coupons","price_lists","customer_groups","shipping","store_content","themes","api key"]},woocommerce:{name:"woocommerce",apiUrl:"https://{yourstore.com}/wp-json/wc/v3",regex:"^.*woocommerce.*$",icon:"woocommerce",docsUrl:"https://woocommerce.github.io/woocommerce-rest-api-docs",preferredAuthType:"api_key",keywords:["products","orders","customers","coupons","categories","shipping_classes","tax_classes","payment_gateways","shipping_zones","shipping_methods","product_variations","refunds","reports","api key"]},prestashop:{name:"prestashop",apiUrl:"https://{yourstore.com}/api",regex:"^.*prestashop.*$",icon:"prestashop",docsUrl:"https://devdocs.prestashop-project.org/8/webservice",preferredAuthType:"api_key",keywords:["products","categories","customers","addresses","carts","orders","carriers","countries","currencies","languages","manufacturers","suppliers","stocks","api key"]},squarespace:{name:"squarespace",apiUrl:"https://api.squarespace.com",regex:"^.*squarespace.*$",icon:"squarespace",docsUrl:"https://developers.squarespace.com/commerce-apis",preferredAuthType:"oauth2",oauth:{authUrl:"https://login.squarespace.com/api/1/login/oauth/provider/authorize",tokenUrl:"https://login.squarespace.com/api/1/login/oauth/provider/tokens",scopes:"website.products.read website.products.write website.orders.read website.orders.write website.inventory.read website.transactions.read website.store_settings.read email.campaigns.read email.campaigns.send"},keywords:["products","orders","inventory","transactions","profiles","store_pages","categories","discounts","gift_cards","abandoned_carts","webhooks","oauth"]},monday:{name:"monday",apiUrl:"https://api.monday.com/v2",regex:"^.*monday.*$",icon:"/logos/monday.svg",docsUrl:"https://developer.monday.com/api-reference/docs",preferredAuthType:"api_key",oauth:{authUrl:"https://auth.monday.com/oauth2/authorize",tokenUrl:"https://auth.monday.com/oauth2/token",scopes:"me:read users:read boards:read boards:write workspaces:read workspaces:write webhooks:write updates:read updates:write assets:read assets:write tags:read teams:read"},keywords:["boards","items","groups","columns","updates","users","workspaces","tags","files","activities","teams","subitems","graphql","mutations","query","api key"]},clickup:{name:"clickup",apiUrl:"https://api.clickup.com/api/v2",regex:"^.*clickup.*$",icon:"clickup",docsUrl:"https://clickup.com/api",openApiUrl:"https://developer.clickup.com/openapi/clickup-api-v2-reference.json",preferredAuthType:"api_key",oauth:{authUrl:"https://app.clickup.com/api",tokenUrl:"https://api.clickup.com/api/v2/oauth/token",scopes:"user:read user:write task:read task:write list:read list:write folder:read folder:write space:read space:write team:read team:write webhook:read webhook:write goal:read goal:write"},keywords:["tasks","lists","folders","spaces","teams","goals","views","statuses","priorities","tags","custom fields","time tracking","comments","checklists","dependencies","api key"]},typeform:{name:"typeform",apiUrl:"https://api.typeform.com",regex:"^.*typeform.*$",icon:"typeform",docsUrl:"https://developer.typeform.com",preferredAuthType:"oauth2",oauth:{authUrl:"https://api.typeform.com/oauth/authorize",tokenUrl:"https://api.typeform.com/oauth/token",scopes:"forms:read forms:write responses:read responses:write themes:read themes:write images:read images:write workspaces:read workspaces:write webhooks:read webhooks:write accounts:read offline"},keywords:["forms","responses","questions","fields","themes","images","workspaces","logic jumps","hidden fields","variables","calculations","insights","reports","oauth"]},figma:{name:"figma",apiUrl:"https://api.figma.com",regex:"^(.*\\.)?figma\\.com(/.*)?$",icon:"figma",docsUrl:"https://www.figma.com/developers/api",openApiUrl:"https://raw.githubusercontent.com/figma/rest-api-spec/refs/heads/main/openapi/openapi.yaml",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.figma.com/oauth",tokenUrl:"https://www.figma.com/api/oauth/token",scopes:"file_read file_write file_dev_resources:read file_dev_resources:write webhooks:write"},keywords:["files","projects","teams","components","styles","nodes","frames","pages","images","comments","versions","branches","libraries","plugins","oauth"]},contentful:{name:"contentful",apiUrl:"https://api.contentful.com",regex:"^(.*\\.)?contentful\\.com(/.*)?$",icon:"contentful",docsUrl:"https://www.contentful.com/developers/docs/references/content-management-api",preferredAuthType:"api_key",keywords:["spaces","environments","content types","entries","assets","locales","tags","webhooks","roles","api keys","content model","publishing","preview","api key"]},creatio:{name:"creatio",apiUrl:"https://<<instance>>.creatio.com/0/odata",regex:"^(.*\\.)?creatio\\.com(/.*)?$",icon:"/logos/creatio.ico",docsUrl:"https://academy.creatio.com/docs/developer/integrations_and_api/data_services/odata/overview",preferredAuthType:"oauth2",oauth:{authUrl:"https://<<instance>>.creatio.com/0/connect/authorize",tokenUrl:"https://<<instance>>.creatio.com/0/connect/token",scopes:"offline_access",grant_type:"authorization_code"},systemSpecificInstructions:`Creatio uses OIDC-compliant OAuth endpoints. The standard /ServiceModel/AuthService.svc/Authorize and /rest/oauth/token endpoints are behind IIS session auth and will NOT work for OAuth flows \u2014 you MUST use the /0/connect/* OIDC endpoints instead.
|
|
748
|
+
For third-party or public multi-customer apps, use Ramp's authorization-code flow instead of Client Credentials: authorization endpoint https://api.ramp.com/v1/authorize and token endpoint https://api.ramp.com/developer/v1/token. Only users with Developer API authorization permissions, typically Admin or Business Owner users, can authorize apps. Sensitive scopes such as cards:read_vault require additional security review.`},remote:{name:"remote",apiUrl:"https://gateway.remote.com",regex:"^https?:\\/\\/(?:[^/]+\\.)*remote(?:-sandbox)?\\.com(?:[:/?#].*)?$",icon:"/logos/remote.svg",docsUrl:"https://developer.remote.com/docs/getting-started-with-remote",preferredAuthType:"api_key",keywords:["companies","employments","employees","contractors","countries","legal entities","expenses","payroll","onboarding","eligibility"],systemSpecificInstructions:"Remote customer API tokens are environment-specific: ra_live_ tokens work only with https://gateway.remote.com, while ra_test_ tokens work only with https://gateway.remote-sandbox.com. Company admins and owners generate tokens in Company Settings > Integrations & APIs > Integrations > Remote API. Send the token as Authorization: Bearer <token>; API routes begin with /v1/. This template targets customer API tokens; Remote partners may instead use OAuth flows."},xero:{name:"xero",apiUrl:"https://api.xero.com",regex:"^.*xero.*$",icon:"xero",docsUrl:"https://developer.xero.com/documentation/api/api-overview",openApiUrl:"https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/xero_accounting.yaml",preferredAuthType:"oauth2",oauth:{authUrl:"https://login.xero.com/identity/connect/authorize",tokenUrl:"https://identity.xero.com/connect/token",scopes:"accounting.transactions accounting.transactions.read accounting.reports.read accounting.journals.read accounting.settings accounting.settings.read accounting.contacts accounting.contacts.read accounting.attachments accounting.attachments.read payroll.employees payroll.payruns payroll.payslip payroll.timesheets payroll.settings"},keywords:["accounts","invoices","contacts","bills","credit notes","bank transactions","payments","receipts","journals","purchase orders","quotes","reports","tax rates","tracking categories","payroll","oauth"]},myob:{name:"myob",apiUrl:"https://api.myob.com/accountright",regex:"^.*myob.*$",icon:"simpleicons:myob",docsUrl:"https://developer.myob.com/api/myob-business-api/api-overview/",preferredAuthType:"oauth2",oauth:{authUrl:"https://secure.myob.com/oauth2/account/authorize",tokenUrl:"https://secure.myob.com/oauth2/v1/authorize",scopes:"sme-general-ledger sme-sales sme-timebilling sme-inventory sme-contacts-customer sme-contacts-supplier sme-contacts-personal sme-contacts-employee sme-banking sme-purchases sme-payroll sme-company-settings sme-company-file",tokenAuthMethod:"body",tokenContentType:"form"},keywords:["invoices","contacts","accounts","bank transactions","items","purchase orders","sale orders","payroll","employees","company files","general ledger","tax codes"],systemSpecificInstructions:"Every request needs three headers beyond the bearer token: x-myobapi-key (app's API key), x-myobapi-version: v2, and x-myobapi-cftoken (Base64 of company-file username:password, required even with OAuth \u2014 desktop AccountRight files have no OAuth and use only this header). After OAuth redirect, the businessId returned is the cf_uri (company file UID) that must prefix every subsequent request path under the accountright base. Register the app and get the API key/secret from the Developer tab at my.MYOB.com, not from api.myob.com itself."},docusign:{name:"docusign",apiUrl:"https://api.docusign.com",regex:"^.*docusign.*$",icon:"/logos/docusign.svg",docsUrl:"https://developers.docusign.com/docs/esign-rest-api",openApiUrl:"https://raw.githubusercontent.com/docusign/OpenAPI-Specifications/refs/heads/master/esignature.rest.swagger-v2.1.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://account.docusign.com/oauth/auth",tokenUrl:"https://account.docusign.com/oauth/token",scopes:"signature extended impersonation organization_read group_read permission_read user_read user_write account_read domain_read identity_provider_read user_data_redact asset_group_account_read asset_group_account_clone_write asset_group_account_clone_read"},keywords:["envelopes","documents","recipients","templates","signatures","tabs","brands","accounts","users","groups","powerforms","bulk send","connect","custom fields","oauth"]},deribit:{name:"deribit",apiUrl:"https://www.deribit.com/api/v2",regex:"^.*deribit.*$",icon:"deribit",docsUrl:"https://docs.deribit.com",preferredAuthType:"oauth2",oauth:{tokenUrl:"https://www.deribit.com/api/v2/public/auth",grant_type:"client_credentials",tokenContentType:"json"},keywords:["instruments","order_book","trades","orders","positions","accounts","wallet","deposits","withdrawals","market_data","options","futures","perpetuals"],systemSpecificInstructions:'Deribit uses a JSON-RPC 2.0 API over HTTPS. The token endpoint is /api/v2/public/auth \u2014 send client_id and client_secret as JSON body with grant_type: "client_credentials". Access tokens are Bearer tokens with a 900-second TTL; use /api/v2/public/auth with grant_type: "refresh_token" to renew. Deribit provides a testnet at https://test.deribit.com/api/v2 with separate credentials \u2014 register at test.deribit.com for a demo account.'},intercom:{name:"intercom",apiUrl:"https://api.intercom.io",regex:"^.*intercom.*$",icon:"intercom",docsUrl:"https://developers.intercom.com/intercom-api-reference",openApiUrl:"https://raw.githubusercontent.com/intercom/Intercom-OpenAPI/refs/heads/main/descriptions/2.9/api.intercom.io.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://app.intercom.com/oauth",tokenUrl:"https://api.intercom.io/auth/eagle/token",scopes:"inbox:read inbox:write users:read users:write companies:read companies:write contacts:read contacts:write conversations:read conversations:write help_center:read help_center:write teams:read teams:write tags:read tags:write segments:read events:write counts:read"},keywords:["contacts","conversations","messages","users","companies","events","tags","segments","articles","help center","teams","admins","inbox","notes","custom attributes","query","api key"]},asana:{name:"asana",apiUrl:"https://app.asana.com/api",regex:"^.*asana.*$",icon:"asana",docsUrl:"https://developers.asana.com/docs",openApiUrl:"https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://app.asana.com/-/oauth_authorize",tokenUrl:"https://app.asana.com/-/oauth_token",scopes:"default openid email profile",grant_type:"authorization_code",managed:!0},keywords:["tasks","projects","workspaces","teams","portfolios","goals","sections","tags","custom fields","stories","attachments","followers","assignee","due dates","query","search","api key"]},trello:{name:"trello",apiUrl:"https://api.trello.com",regex:"^.*trello.*$",icon:"trello",docsUrl:"https://developer.atlassian.com/cloud/trello/rest",openApiUrl:"https://developer.atlassian.com/cloud/trello/swagger.v3.json",preferredAuthType:"api_key",keywords:["boards","lists","cards","members","labels","checklists","attachments","comments","actions","organizations","teams","power-ups","custom fields","stickers","api key"]},notion:{name:"notion",label:"Notion",apiUrl:"https://api.notion.com",regex:"^.*notion.*$",icon:"notion",docsUrl:"https://developers.notion.com",openApiUrl:"https://raw.githubusercontent.com/cameronking4/notion-openapi-chatgpt-action/refs/heads/main/public/notion-openapi.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://api.notion.com/v1/oauth/authorize?owner=user",tokenUrl:"https://api.notion.com/v1/oauth/token",scopes:"read_content read_comments read_user",managed:!0,tokenAuthMethod:"basic_auth",tokenContentType:"json",extraHeaders:{"Notion-Version":"2022-06-28"}},systemSpecificInstructions:"Notion OAuth exposes only pages selected for the connection and their accessible children.",keywords:["pages","databases","blocks","users","workspaces","properties","rich text","search","comments","parent","children","query","filter","sort","api key"]},digitalocean:{name:"digitalocean",apiUrl:"https://api.digitalocean.com",regex:"^.*digitalocean.*$",icon:"digitalocean",docsUrl:"https://docs.digitalocean.com/reference/api",openApiUrl:"https://raw.githubusercontent.com/digitalocean/openapi/refs/heads/main/specification/DigitalOcean-public.v2.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://cloud.digitalocean.com/v1/oauth/authorize",tokenUrl:"https://cloud.digitalocean.com/v1/oauth/token",scopes:"read write admin"},keywords:["droplets","volumes","images","snapshots","regions","sizes","ssh_keys","domains","domain_records","certificates","firewalls","load_balancers","projects","tags","vpcs","api key"]},heroku:{name:"heroku",apiUrl:"https://api.heroku.com",regex:"^.*heroku.*$",icon:"/logos/heroku.svg",docsUrl:"https://devcenter.heroku.com/categories/platform-api",preferredAuthType:"api_key",oauth:{authUrl:"https://id.heroku.com/oauth/authorize",tokenUrl:"https://id.heroku.com/oauth/token",scopes:"global read write read-protected write-protected"},keywords:["apps","addons","builds","releases","config_vars","formations","dynos","buildpacks","domains","collaborators","keys","account","apps/~/addons","spaces","pipelines","api key"]},huggingface:{name:"huggingface",apiUrl:"https://huggingface.co",regex:"^.*huggingface.*$",icon:"huggingface",docsUrl:"https://huggingface.co/docs/hub/en/api",preferredAuthType:"api_key",keywords:["models","datasets","spaces","parameters","inference","fine-tuning","files","spaces","accounts","groups","api key"]},circleci:{name:"circleci",apiUrl:"https://circleci.com/api",regex:"^.*circleci.*$",icon:"circleci",docsUrl:"https://circleci.com/docs/api",openApiUrl:"https://circleci.com/api/v2/openapi.json",preferredAuthType:"api_key",keywords:["pipelines","workflows","jobs","projects","builds","artifacts","environment_variables","contexts","orbs","insights","schedules","checkouts","api key"]},travisci:{name:"travisci",apiUrl:"https://api.travis-ci.com",regex:"^.*(travis|travis-ci).*$",icon:"travisCI",docsUrl:"https://docs.travis-ci.com/api",preferredAuthType:"api_key",keywords:["builds","jobs","repositories","branches","requests","caches","env_vars","settings","logs","stages","beta_features","api key"]},wordpress:{name:"wordpress",apiUrl:"https://{your-site.com}/wp-json/wp/v2",regex:"^.*wordpress.*$",icon:"wordpress",docsUrl:"https://developer.wordpress.org/rest-api",openApiUrl:"https://developer.wordpress.com/docs/api/",preferredAuthType:"api_key",keywords:["posts","pages","media","users","categories","tags","comments","taxonomies","types","statuses","settings","themes","plugins","api key"]},cloudflare:{name:"cloudflare",apiUrl:"https://api.cloudflare.com",regex:"^.*cloudflare.*$",icon:"cloudflare",docsUrl:"https://developers.cloudflare.com/api",openApiUrl:"https://raw.githubusercontent.com/cloudflare/api-schemas/refs/heads/main/openapi.json",preferredAuthType:"api_key",keywords:["zones","dns_records","firewall_rules","page_rules","workers","certificates","load_balancers","rate_limits","waf","analytics","cache","ssl","api key"]},bigcommerce:{name:"bigcommerce",apiUrl:"https://api.bigcommerce.com",regex:"^.*bigcommerce.*$",icon:"bigcommerce",docsUrl:"https://developer.bigcommerce.com/docs/rest-management",preferredAuthType:"api_key",keywords:["products","categories","brands","orders","customers","carts","checkouts","coupons","price_lists","customer_groups","shipping","store_content","themes","api key"]},woocommerce:{name:"woocommerce",apiUrl:"https://{yourstore.com}/wp-json/wc/v3",regex:"^.*woocommerce.*$",icon:"woocommerce",docsUrl:"https://woocommerce.github.io/woocommerce-rest-api-docs",preferredAuthType:"api_key",keywords:["products","orders","customers","coupons","categories","shipping_classes","tax_classes","payment_gateways","shipping_zones","shipping_methods","product_variations","refunds","reports","api key"]},prestashop:{name:"prestashop",apiUrl:"https://{yourstore.com}/api",regex:"^.*prestashop.*$",icon:"prestashop",docsUrl:"https://devdocs.prestashop-project.org/8/webservice",preferredAuthType:"api_key",keywords:["products","categories","customers","addresses","carts","orders","carriers","countries","currencies","languages","manufacturers","suppliers","stocks","api key"]},squarespace:{name:"squarespace",apiUrl:"https://api.squarespace.com",regex:"^.*squarespace.*$",icon:"squarespace",docsUrl:"https://developers.squarespace.com/commerce-apis",preferredAuthType:"oauth2",oauth:{authUrl:"https://login.squarespace.com/api/1/login/oauth/provider/authorize",tokenUrl:"https://login.squarespace.com/api/1/login/oauth/provider/tokens",scopes:"website.products.read website.products.write website.orders.read website.orders.write website.inventory.read website.transactions.read website.store_settings.read email.campaigns.read email.campaigns.send"},keywords:["products","orders","inventory","transactions","profiles","store_pages","categories","discounts","gift_cards","abandoned_carts","webhooks","oauth"]},monday:{name:"monday",apiUrl:"https://api.monday.com/v2",regex:"^.*monday.*$",icon:"/logos/monday.svg",docsUrl:"https://developer.monday.com/api-reference/docs",preferredAuthType:"api_key",oauth:{authUrl:"https://auth.monday.com/oauth2/authorize",tokenUrl:"https://auth.monday.com/oauth2/token",scopes:"me:read users:read boards:read boards:write workspaces:read workspaces:write webhooks:write updates:read updates:write assets:read assets:write tags:read teams:read"},keywords:["boards","items","groups","columns","updates","users","workspaces","tags","files","activities","teams","subitems","graphql","mutations","query","api key"]},clickup:{name:"clickup",apiUrl:"https://api.clickup.com/api/v2",regex:"^.*clickup.*$",icon:"clickup",docsUrl:"https://clickup.com/api",openApiUrl:"https://developer.clickup.com/openapi/clickup-api-v2-reference.json",preferredAuthType:"oauth2",oauth:{grant_type:"authorization_code",authUrl:"https://app.clickup.com/api",tokenUrl:"https://api.clickup.com/api/v2/oauth/token",managed:!0},keywords:["tasks","lists","folders","spaces","teams","goals","views","statuses","priorities","tags","custom fields","time tracking","comments","checklists","dependencies","api key","oauth"],systemSpecificInstructions:"superglue provides a managed ClickUp OAuth app; users connect with their ClickUp login and pick the Workspaces to authorize on the consent screen. ClickUp OAuth has no scopes and issues no refresh token; access tokens currently do not expire. Send OAuth tokens as Authorization: Bearer <<access_token>>. Alternatively, a personal API token (pk_...) works as Authorization: <<api_key>> without the Bearer prefix. GET /team lists the authorized Workspaces (called teams in API v2)."},typeform:{name:"typeform",apiUrl:"https://api.typeform.com",regex:"^.*typeform.*$",icon:"typeform",docsUrl:"https://developer.typeform.com",preferredAuthType:"oauth2",oauth:{authUrl:"https://api.typeform.com/oauth/authorize",tokenUrl:"https://api.typeform.com/oauth/token",scopes:"forms:read forms:write responses:read responses:write themes:read themes:write images:read images:write workspaces:read workspaces:write webhooks:read webhooks:write accounts:read offline"},keywords:["forms","responses","questions","fields","themes","images","workspaces","logic jumps","hidden fields","variables","calculations","insights","reports","oauth"]},figma:{name:"figma",apiUrl:"https://api.figma.com",regex:"^(.*\\.)?figma\\.com(/.*)?$",icon:"figma",docsUrl:"https://www.figma.com/developers/api",openApiUrl:"https://raw.githubusercontent.com/figma/rest-api-spec/refs/heads/main/openapi/openapi.yaml",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.figma.com/oauth",tokenUrl:"https://www.figma.com/api/oauth/token",scopes:"file_read file_write file_dev_resources:read file_dev_resources:write webhooks:write"},keywords:["files","projects","teams","components","styles","nodes","frames","pages","images","comments","versions","branches","libraries","plugins","oauth"]},contentful:{name:"contentful",apiUrl:"https://api.contentful.com",regex:"^(.*\\.)?contentful\\.com(/.*)?$",icon:"contentful",docsUrl:"https://www.contentful.com/developers/docs/references/content-management-api",preferredAuthType:"api_key",keywords:["spaces","environments","content types","entries","assets","locales","tags","webhooks","roles","api keys","content model","publishing","preview","api key"]},creatio:{name:"creatio",apiUrl:"https://<<instance>>.creatio.com/0/odata",regex:"^(.*\\.)?creatio\\.com(/.*)?$",icon:"/logos/creatio.ico",docsUrl:"https://academy.creatio.com/docs/developer/integrations_and_api/data_services/odata/overview",preferredAuthType:"oauth2",oauth:{authUrl:"https://<<instance>>.creatio.com/0/connect/authorize",tokenUrl:"https://<<instance>>.creatio.com/0/connect/token",scopes:"offline_access",grant_type:"authorization_code"},systemSpecificInstructions:`Creatio uses OIDC-compliant OAuth endpoints. The standard /ServiceModel/AuthService.svc/Authorize and /rest/oauth/token endpoints are behind IIS session auth and will NOT work for OAuth flows \u2014 you MUST use the /0/connect/* OIDC endpoints instead.
|
|
749
749
|
|
|
750
750
|
To discover the correct endpoints for any Creatio instance, fetch: https://<instance>.creatio.com/0/.well-known/openid-configuration
|
|
751
751
|
|
|
@@ -1764,7 +1764,7 @@ ${s}`;return}if(Cy(e,i,ZTe)){KTe(e,o)&&(r.retry=e.toString("utf8",o));return}if(
|
|
|
1764
1764
|
`);t.stack=r?`${r}
|
|
1765
1765
|
${o}`:i.stack}V.exports.fetch=function(e,r=void 0){return RRe(e,r).catch(n=>{throw pG?mG(n,pG):n&&typeof n=="object"&&Error.captureStackTrace(n,V.exports.fetch),n})};V.exports.Headers=oc().Headers;V.exports.Response=RA().Response;V.exports.Request=Uu().Request;V.exports.FormData=zg().FormData;var{setGlobalOrigin:kRe,getGlobalOrigin:NRe}=ZS();V.exports.setGlobalOrigin=kRe;V.exports.getGlobalOrigin=NRe;var{CacheStorage:ORe}=tH(),{kConstruct:URe}=$e();V.exports.caches=new ORe(URe);var{deleteCookie:MRe,getCookies:xRe,getSetCookies:LRe,setCookie:PRe,parseCookie:FRe}=pH();V.exports.deleteCookie=MRe;V.exports.getCookies=xRe;V.exports.getSetCookies=LRe;V.exports.setCookie=PRe;V.exports.parseCookie=FRe;var{parseMIMEType:$Re,serializeAMimeType:jRe}=In();V.exports.parseMIMEType=$Re;V.exports.serializeAMimeType=jRe;var{CloseEvent:qRe,ErrorEvent:zRe,MessageEvent:HRe}=uy(),{WebSocket:GRe,ping:YRe}=GH();V.exports.WebSocket=GRe;V.exports.CloseEvent=qRe;V.exports.ErrorEvent=zRe;V.exports.MessageEvent=HRe;V.exports.ping=YRe;V.exports.WebSocketStream=eG().WebSocketStream;V.exports.WebSocketError=Rv().WebSocketError;V.exports.request=qA(Yu.request);V.exports.stream=qA(Yu.stream);V.exports.pipeline=qA(Yu.pipeline);V.exports.connect=qA(Yu.connect);V.exports.upgrade=qA(Yu.upgrade);V.exports.MockClient=ERe;V.exports.MockCallHistory=IRe;V.exports.MockCallHistoryLog=CRe;V.exports.MockPool=SRe;V.exports.MockAgent=bRe;V.exports.SnapshotAgent=wRe;V.exports.mockErrors=BRe;var{EventSource:VRe}=AG();V.exports.EventSource=VRe;function JRe(){globalThis.fetch=V.exports.fetch,globalThis.Headers=V.exports.Headers,globalThis.Response=V.exports.Response,globalThis.Request=V.exports.Request,globalThis.FormData=V.exports.FormData,globalThis.WebSocket=V.exports.WebSocket,globalThis.CloseEvent=V.exports.CloseEvent,globalThis.ErrorEvent=V.exports.ErrorEvent,globalThis.MessageEvent=V.exports.MessageEvent,globalThis.EventSource=V.exports.EventSource}V.exports.install=JRe});var IG=m(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.SuperglueClient=Ju.SuperglueHttpError=void 0;var Vu=dr(),Dn=mb(),WRe=Yb(),ZRe=RL(),KRe=ln(),Vo=Lc(),XRe=Xl(),HA=14400*1e3,zA;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:t}=yG();zA=new t({headersTimeout:HA,bodyTimeout:HA})}catch{}function EG(t){if(t?.aborted)throw t.reason??new DOMException("Aborted","AbortError")}var wy=class extends Error{constructor(e,r,n,i){super(e),this.status=r,this.code=n,this.details=i,this.name="SuperglueHttpError"}};Ju.SuperglueHttpError=wy;var xv=class{constructor({apiKey:e,apiEndpoint:r,onInfrastructureError:n,refreshToken:i,sseTokenProvider:o,tokenProvider:s}){if(!e&&!s)throw new Error("SuperglueClient requires either apiKey or tokenProvider");this.tokenProvider=s??(async()=>e),this.apiEndpoint=r??"https://api.superglue.cloud",this.sseManager=new WRe.SSELogSubscriptionManager(this.apiEndpoint,o??this.tokenProvider,i),this.onInfrastructureError=n,this.refreshToken=i}async getApiKey(){return this.tokenProvider()}async fetchWithAuthRetry(e,r){let n=await this.getApiKey(),i=await e(n);if(i.status!==401||!this.refreshToken)return i;EG(r);let o=await this.refreshToken();return EG(r),!o||o===n?i:(i.body?.cancel(),e(o))}isInfrastructureError(e){return(0,KRe.isAbortError)(e)?!1:!!(e instanceof TypeError&&e.message.toLowerCase().includes("fetch")||e instanceof Error&&e.name==="TimeoutError")}async restRequest(e,r,n,i,o){let a=await(await this.restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o})).text();if(a)return JSON.parse(a)}async restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o}){let s=`${this.apiEndpoint.replace(/\/$/,"")}${r}`,a=n!=null,c=typeof FormData<"u"&&n instanceof FormData,u=d=>{let A={Authorization:`Bearer ${d}`,...i};return a&&!c&&e!=="GET"&&(A["Content-Type"]="application/json"),fetch(s,{...o,method:e,headers:A,body:a?c?n:JSON.stringify(n):void 0,signal:o?.signal??AbortSignal.timeout(HA),...zA?{dispatcher:zA}:{}})},l;try{l=await this.fetchWithAuthRetry(u,o?.signal)}catch(d){throw this.isInfrastructureError(d)&&this.onInfrastructureError?.(),d}if(!l.ok)throw await this.buildHttpError(l);return l}async uploadFiles(e,r){if(typeof r?.process!="boolean")throw new Error("process must be a boolean");if(e.length===0)return[];let n=e.map(l=>({...l,contentLength:l.contentLength??this.getUploadContentLength(l.content)})),o=(await this.restRequest("POST","/v1/files/uploads",{process:r.process,files:n.map(({fileName:l,contentType:d,contentLength:A})=>({fileName:l,contentLength:A,...d?{contentType:d}:{}}))})).data.files;if(o.length!==n.length)throw await Promise.all(o.map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),new Error("Upload response did not match the selected files");let s=await Promise.allSettled(o.map(async(l,d)=>{let A=n[d],p=await fetch(l.uploadUrl,{method:"PUT",body:A.content,headers:A.contentType?{"Content-Type":A.contentType}:void 0,signal:AbortSignal.timeout(Math.min(HA,l.expiresIn*1e3))});if(!p.ok)throw new Error(`Upload failed for ${A.fileName}: ${p.status} ${p.statusText}`);return l.id})),a=s.flatMap(l=>l.status==="fulfilled"?[l.value]:[]),c=new Map;if(a.length>0)try{let l=await this.restRequest("POST","/v1/files/uploads/complete",{fileIds:a});c=new Map(l.data.files.map(d=>[d.id,d]))}catch(l){c=new Map(a.map(d=>[d,{id:d,fileName:n[o.findIndex(A=>A.id===d)]?.fileName||d,contentLength:n[o.findIndex(A=>A.id===d)]?.contentLength||0,status:"failed",error:l instanceof Error?l.message:String(l)}]))}let u=o.map((l,d)=>{let A=s[d],p=n[d];return A.status==="rejected"?{id:l.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:A.reason instanceof Error?A.reason.message:String(A.reason)}:c.get(l.id)||{id:l.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:"Upload completion returned no result"}});return await Promise.all(u.filter(l=>l.status==="failed").map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),u}async deleteFileUpload(e){await this.restRequest("DELETE",`/v1/files/uploads/${encodeURIComponent(e)}`)}getUploadContentLength(e){return typeof e=="string"?new TextEncoder().encode(e).byteLength:e instanceof Uint8Array?e.byteLength:e.size}async buildHttpError(e){e.status>=500&&this.onInfrastructureError?.();let r=await e.text(),n=`HTTP ${e.status}: ${r}`,i,o;try{let s=JSON.parse(r);s&&typeof s=="object"&&!Array.isArray(s)&&(o=s),typeof s?.code=="string"&&(i=s.code);let a=s.error;typeof a=="string"?n=a:a&&typeof a=="object"&&(n=a.message||JSON.stringify(a))}catch{}return new wy(n,e.status,i,o)}async streamRequest(e,r,n){let i=e.includes("?")?"&":"?",o=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,s=u=>fetch(o,{method:"POST",headers:{Authorization:`Bearer ${u}`,Accept:"text/event-stream","Content-Type":"application/json"},body:JSON.stringify(r),signal:n??AbortSignal.timeout(HA),...zA?{dispatcher:zA}:{}}),a;try{a=await this.fetchWithAuthRetry(s,n)}catch(u){throw this.isInfrastructureError(u)&&this.onInfrastructureError?.(),u}if(!a.ok)throw await this.buildHttpError(a);if(!(a.headers.get("content-type")||"").includes("text/event-stream")){let u=await a.text();return u?JSON.parse(u):void 0}try{return await(0,ZRe.consumeEventStreamResult)(a)}catch(u){throw this.isInfrastructureError(u)&&this.onInfrastructureError?.(),u}}async subscribeToLogsSSE(e={}){return this.sseManager.subscribeToLogs(e)}async disconnect(){await this.sseManager.disconnect()}async listMemoryNotes(e={}){let r=new URLSearchParams;e.scope&&r.set("scope",e.scope),e.query&&r.set("query",e.query);let n=r.toString();return(await this.restRequest("GET",`/v1/memory-notes${n?`?${n}`:""}`)).data}async createMemoryNote(e){return(await this.restRequest("POST","/v1/memory-notes",e)).data}async updateMemoryNote(e,r){return(await this.restRequest("PATCH",`/v1/memory-notes/${encodeURIComponent(e)}`,r)).data}async deleteMemoryNote(e){await this.restRequest("DELETE",`/v1/memory-notes/${encodeURIComponent(e)}`)}async clearMemoryNotes(e){return(await this.restRequest("DELETE",`/v1/memory-notes?scope=${e}`)).data.deleted}async getMe(){return this.restRequest("GET","/v1/me")}async completeOnboarding(){return this.restRequest("POST","/v1/me/onboarding/complete")}async runTool(e){let r=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e.toolId)}/run`,{inputs:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture},void 0,e.signal?{signal:e.signal}:void 0);return{success:r.status==="success",data:r.data,error:r.error,tool:r.tool,stepResults:r.stepResults?.map(n=>({...n}))||[],...r.fileArtifacts&&r.fileArtifacts.length>0?{fileArtifacts:r.fileArtifacts}:{},...r.metadata?.warnings?.length?{warnings:r.metadata.warnings}:{}}}async runToolConfig(e){let r=e.createRun?"/v1/tools/run?createRun=true":"/v1/tools/run",n=await this.restRequest("POST",r,{tool:e.tool,payload:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture,executionKind:e.executionKind,parentToolId:e.parentToolId,draftId:e.draftId},e.traceId?{"X-Trace-Id":e.traceId}:void 0,e.signal?{signal:e.signal}:void 0);return{success:n.status?n.status==="success":n.success??!1,data:n.data,error:n.error,tool:n.tool||e.tool,stepResults:n.stepResults?.map(o=>({...o}))||[],...n.fileArtifacts&&n.fileArtifacts.length>0?{fileArtifacts:n.fileArtifacts}:{},...n.metadata?.warnings?.length?{warnings:n.metadata.warnings}:{}}}async abortToolExecution(e){return{success:!0,runId:(await this.restRequest("POST",`/v1/runs/${encodeURIComponent(e)}/cancel`)).runId}}async executeStep({step:e,payload:r,files:n,previousResults:i,credentials:o,options:s,runId:a,systemIds:c,credentialId:u,systemAuth:l,createRun:d,parentToolId:A,stepIndex:p,stepId:h,signal:g,stream:S}){let B={step:e,payload:r,files:n,previousResults:i,credentials:o,options:s,runId:a,systemIds:c,credentialId:u,systemAuth:l,createRun:d,parentToolId:A,stepIndex:p,stepId:h};return S?this.streamRequest("/v1/tools/step/run",B,g):this.restRequest("POST","/v1/tools/step/run",B,void 0,g?{signal:g}:void 0)}async abortStep(e){return this.restRequest("POST","/v1/tools/step/abort",{runId:e})}async executeTransformOnly({outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:u,parentToolId:l,stepId:d,signal:A,stream:p}){let h={outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:u,parentToolId:l,stepId:d};return p?this.streamRequest("/v1/tools/transform/run",h,A):this.restRequest("POST","/v1/tools/transform/run",h,void 0,A?{signal:A}:void 0)}async createRun({toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:c,completedAt:u,executionKind:l,parentToolId:d,draftId:A}){return this.restRequest("POST","/v1/runs",{toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:(0,Vo.toUTCISOString)(c,"run.startedAt"),completedAt:(0,Vo.toUTCISOString)(u,"run.completedAt"),executionKind:l,parentToolId:d,draftId:A})}async checkRunLimit(){return(await this.restRequest("POST","/v1/runs/check-limit")).data}async extract({file:e,envelope:r}){if(!e)throw new Error("File must be provided for extract.");let n=new FormData;n.append("file",e);let i=r?"/v1/extract?envelope=true":"/v1/extract";return this.restRequest("POST",i,n)}mapOpenAPIRunToRun(e){let r={running:Vu.RunStatus.RUNNING,success:Vu.RunStatus.SUCCESS,failed:Vu.RunStatus.FAILED,aborted:Vu.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:r[e.status]??Vu.RunStatus.FAILED,toolPayload:e.toolPayload,data:e.data,toolResult:e.data,error:e.error,stepResults:e.stepResults,options:e.options,requestSource:e.requestSource,traceId:e.traceId,resultStorageUri:e.resultStorageUri,userId:e.userId,userEmail:e.userEmail,userName:e.userName,metadata:{...e.metadata,executionKind:e.metadata?.executionKind??Vu.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,Vo.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,Vo.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,Vo.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,Vo.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let r=(0,Dn.createSearchListQueryParams)(e);e.toolId!==void 0&&r.set("toolId",e.toolId),e.searchUserIds?.length&&r.set("searchUserIds",e.searchUserIds.join(",")),e.includeTotal!==void 0&&r.set("includeTotal",String(e.includeTotal)),e.startedAfter!==void 0&&r.set("startedAfter",e.startedAfter instanceof Date?(0,Vo.toUTCISOString)(e.startedAfter,"run.startedAfter"):e.startedAfter),e.statuses!==void 0?r.set("status",e.statuses.join(",")):e.status!==void 0&&r.set("status",e.status),e.requestSources!==void 0&&r.set("requestSources",e.requestSources.join(",")),e.executionKinds!==void 0&&r.set("executionKinds",e.executionKinds.join(",")),e.userId!==void 0&&r.set("userId",e.userId),e.systemId!==void 0&&r.set("systemId",e.systemId),e.systemIds!==void 0&&r.set("systemIds",e.systemIds.join(","));let n=r.size>0?`?${r.toString()}`:"",i=await this.restRequest("GET",`/v1/runs${n}`,void 0,void 0,{signal:e.signal});return{data:i.data.map(o=>this.mapOpenAPIRunToRun(o)),total:i.total,page:i.page,limit:i.limit,hasMore:i.hasMore}}async getActivityCounts(e){let r=new URLSearchParams;e?.from&&r.set("from",e.from instanceof Date?(0,Vo.toUTCISOString)(e.from,"activity.from"):e.from),e?.to&&r.set("to",e.to instanceof Date?(0,Vo.toUTCISOString)(e.to,"activity.to"):e.to);let n=r.toString();return(await this.restRequest("GET",`/v1/activity/counts${n?`?${n}`:""}`,void 0,void 0,{signal:e?.signal})).counts}async getRun(e){try{let r=await this.restRequest("GET",`/v1/runs/${encodeURIComponent(e)}`);return this.mapOpenAPIRunToRun(r)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found"))return null;throw r}}async getTool(e){try{return await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}`)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found")||r.message?.includes("403")||r.message?.includes("not allowed"))return null;throw r}}async getToolState(e){return(await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/state`)).state}async setToolState(e,r){await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/state`,{state:r})}async deleteToolState(e){return(await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/state`)).deletedKeys}async archiveTool(e,r=!0){return this.updateTool(e,{archived:r})}async bulkArchiveTools(e,r=!0){return this.restRequest("POST","/v1/tools/bulk/archive",{ids:e,archived:r})}async bulkDeleteTools(e){return this.restRequest("POST","/v1/tools/bulk/delete",{ids:e})}async listTools(e={}){let r=(0,Dn.createListQueryParams)(e);e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived));let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/tools${n}`)}async listAllTools(e={}){return(0,Dn.listAllPages)((r,n)=>this.listTools({...e,page:r,limit:n}))}async createTool(e,r){return this.restRequest("POST","/v1/tools",{...r,id:e})}async updateTool(e,r){return this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}`,r)}async deleteTool(e){try{return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}`),!0}catch(r){if(r.message?.includes("404"))return!1;throw r}}async renameTool(e,r){return this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/rename`,{newId:r})}async getWorkflow(e){return this.getTool(e)}async archiveWorkflow(e,r=!0){return this.upsertWorkflow(e,{archived:r})}async createWorkflow(e,r){return this.createTool(e,r)}async updateWorkflow(e,r){return this.updateTool(e,r)}async upsertWorkflow(e,r){return await this.getTool(e)?this.updateTool(e,r):this.createTool(e,r)}async deleteWorkflow(e){return this.deleteTool(e)}async renameWorkflow(e,r){return this.renameTool(e,r)}async listProjectSummaries(e={}){let r=(0,Dn.createSearchListQueryParams)(e);return r.set("includeResources","false"),e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived)),this.restRequest("GET",`/v1/projects?${r.toString()}`)}async listAllProjectSummaries({includeArchived:e}={}){return(0,Dn.listAllPages)((r,n)=>this.listProjectSummaries({page:r,limit:n,...e!==void 0?{includeArchived:e}:{}}))}async listAllProjectTasks(e){return(0,Dn.listAllPages)((r,n)=>this.restRequest("GET",`/v1/projects/${encodeURIComponent(e)}/tasks?page=${r}&limit=${n}`))}async saveProjectTask({projectId:e,taskId:r,input:n}){let i=`/v1/projects/${encodeURIComponent(e)}/tasks${r?`/${encodeURIComponent(r)}`:""}`;return(await this.restRequest(r?"PATCH":"POST",i,n)).data}async listSchedules(e={}){let r=(0,Dn.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"",i=e.toolId?`/v1/tools/${encodeURIComponent(e.toolId)}/schedules${n}`:`/v1/schedules${n}`,o=await this.restRequest("GET",i);return{...o,data:o.data.map(s=>this.mapOpenAPIScheduleToToolSchedule(s))}}async listAllSchedules(e={}){return(0,Dn.listAllPages)((r,n)=>this.listSchedules({...e,page:r,limit:n}))}async getToolSchedule(e,r){try{let n=await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`);return this.mapOpenAPIScheduleToToolSchedule(n)}catch(n){if(n.message?.includes("404")||n.message?.includes("not found"))return null;throw n}}async createToolSchedule(e,r){let n=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/schedules`,{...r,timezone:r.timezone||(0,XRe.getRuntimeTimezone)()});return this.mapOpenAPIScheduleToToolSchedule(n)}async updateToolSchedule(e,r,n){let i=await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`,n);return this.mapOpenAPIScheduleToToolSchedule(i)}async deleteToolSchedule(e,r){return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`),!0}async bulkSetSchedulesEnabled(e,r){return this.restRequest("POST","/v1/schedules/bulk/enable",{ids:e,enabled:r})}async bulkDeleteSchedules(e){return this.restRequest("POST","/v1/schedules/bulk/delete",{ids:e})}async listCredentials(e={}){let r=(0,Dn.createListQueryParams)(e);e.systemId!==void 0&&r.set("systemId",e.systemId);let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/credentials${n}`)}async listAllCredentials(e={}){return(0,Dn.listAllPages)((r,n)=>this.listCredentials({...e,page:r,limit:n}))}async createCredentials(e){return(await this.restRequest("POST","/v1/credentials",e)).data}async replaceCredentials(e,r){return(await this.restRequest("PUT",`/v1/credentials/${encodeURIComponent(e)}`,{credentials:r})).data}async updateCredentials(e,r){return(await this.restRequest("PATCH",`/v1/credentials/${encodeURIComponent(e)}`,r)).data}async deleteCredentials(e){await this.restRequest("DELETE",`/v1/credentials/${encodeURIComponent(e)}`)}async setDefaultCredentials(e){await this.restRequest("POST",`/v1/credentials/${encodeURIComponent(e)}/default`)}async listSystems(e={}){let r=(0,Dn.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/systems${n}`)}async listAllSystems(e={}){return(0,Dn.listAllPages)((r,n)=>this.listSystems({...e,page:r,limit:n}))}async getSystem(e){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}`)).data}async createSystem(e){return(await this.restRequest("POST","/v1/systems",e)).data}async updateSystem(e,r){return(await this.restRequest("PATCH",`/v1/systems/${encodeURIComponent(e)}`,r)).data}async deleteSystem(e){return await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}`),!0}async bulkDeleteSystems(e){return this.restRequest("POST","/v1/systems/bulk/delete",{ids:e})}async listManagedOAuthTemplateIds(){return(await this.restRequest("GET","/v1/oauth2/managed-apps")).data.templateIds}async createOAuthExchange(e){return(await this.restRequest("POST","/v1/oauth/exchanges",e)).data}async completeOAuthExchange(e,r){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/complete`,r)).data}async searchSystemDocumentation(e,r){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/search`,{keywords:r})).data}async triggerSystemDocumentationScrapeJob(e,r){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/scrape`,r)).data}async fetchOpenApiSpec(e,r,n){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/openapi`,{url:r,link:n?.link})).data}async uploadSystemDocumentationFiles(e,r,n){let i=await this.uploadFiles(r,{process:!0}),o=i.flatMap(s=>s.status==="uploaded"?[s.id]:[]);if(o.length>0)try{await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/files`,{fileIds:o,link:n?.link!==!1})}catch(s){throw await Promise.all(o.map(a=>this.deleteFileUpload(a).catch(()=>{}))),s}if(!n?.settle){let s=i.filter(a=>a.status==="failed");if(s.length>0)throw new Error(s.map(a=>a.error).join("; "))}return i}async listSystemDocumentationFiles(e,r){let n=new URLSearchParams;r?.length&&n.set("fileIds",r.join(","));let i=n.size>0?`?${n.toString()}`:"";return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files${i}`)).data}async getSystemDocumentationFileContent(e,r,n){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(r)}/content?processed=${n.processed}`)).data}async deleteSystemDocumentationFile(e,r){await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(r)}`)}async generateCredentialsLink(e){try{return{success:!0,credentialsUrl:(await this.restRequest("POST","/v1/authenticate",e||{})).data.credentialsUrl}}catch(r){return{success:!1,error:r.message}}}};Ju.SuperglueClient=xv});var bG=m(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.UnquotedKeyStrategy=at.TripleQuoteStrategy=at.TrailingCommaStrategy=at.SingleQuoteStrategy=at.PythonLiteralStrategy=at.CommentStrategy=at.ResilientJsonParser=at.RepairStrategy=void 0;at.parseJsonResilient=eke;at.parseJSON=tke;at.isValidJson=rke;at.prettyPrintJson=nke;at.minifyJson=ike;var Yn=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};at.RepairStrategy=Yn;var By=class extends Yn{constructor(){super(...arguments),this.name="TripleQuoteRepair",this.description="Converts triple-quoted strings to proper JSON, parsing nested JSON content"}canApply(e){return/"""/.test(e)}apply(e){return e.replace(/"""([\s\S]*?)"""/g,(r,n)=>{let i=n.trim();if(i.startsWith("{")&&i.endsWith("}")||i.startsWith("[")&&i.endsWith("]"))try{let s=JSON.parse(i);return JSON.stringify(s)}catch{return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`}return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`})}};at.TripleQuoteStrategy=By;var Qy=class extends Yn{constructor(){super(...arguments),this.name="PythonLiteralRepair",this.description="Converts Python literals to JavaScript equivalents"}canApply(e){return/\b(None|True|False)\b/.test(e)}apply(e){return e.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false")}};at.PythonLiteralStrategy=Qy;var vy=class extends Yn{constructor(){super(...arguments),this.name="TrailingCommaRepair",this.description="Removes trailing commas from objects and arrays"}canApply(e){return/,\s*[}\]]/.test(e)}apply(e){return e.replace(/,(\s*[}\]])/g,"$1")}};at.TrailingCommaStrategy=vy;var _y=class extends Yn{constructor(){super(...arguments),this.name="SingleQuoteRepair",this.description="Converts single quotes to double quotes"}canApply(e){return/[{,]\s*'[^']*'\s*:/.test(e)||/:\s*'[^']*'/.test(e)}apply(e){let r=e.replace(/([{,]\s*)'([^']+)'(\s*:)/g,'$1"$2"$3');return r=r.replace(/(:\s*)'([^']+)'(\s*[,}])/g,'$1"$2"$3'),r}};at.SingleQuoteStrategy=_y;var Dy=class extends Yn{constructor(){super(...arguments),this.name="UnquotedKeyRepair",this.description="Adds quotes to unquoted object keys"}canApply(e){return/[{,]\s*[a-zA-Z_$][a-zA-Z0-9_$]*\s*:/.test(e)}apply(e){return e.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*:)/g,'$1"$2"$3')}};at.UnquotedKeyStrategy=Dy;var Ty=class extends Yn{constructor(){super(...arguments),this.name="CommentRemoval",this.description="Removes JavaScript-style comments"}canApply(e){return/\/\/.*$|\/\*[\s\S]*?\*\//m.test(e)}apply(e){let r=e.replace(/\/\/.*$/gm,"");return r=r.replace(/\/\*[\s\S]*?\*\//g,""),r}};at.CommentStrategy=Ty;var Lv=class extends Yn{constructor(){super(...arguments),this.name="UnescapedControlCharactersRepair",this.description="Escapes unescaped control characters (newlines, tabs, etc.) in JSON strings"}canApply(e){try{return JSON.parse(e),!1}catch(r){let n=r.message||"";return n.includes("control character")||n.includes("Bad control")||n.includes("Unexpected token")&&/[\n\r\t]/.test(e)}}apply(e){let r="",n=!1,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=o>0?e[o-1]:"";if(i){r+=s,i=!1;continue}if(s==="\\"&&n){r+=s,i=!0;continue}if(s==='"'&&a!=="\\"){n=!n,r+=s;continue}if(n)switch(s){case`
|
|
1766
1766
|
`:r+="\\n";break;case"\r":r+="\\r";break;case" ":r+="\\t";break;case"\b":r+="\\b";break;case"\f":r+="\\f";break;default:let c=s.charCodeAt(0);c<32?r+="\\u"+("0000"+c.toString(16)).slice(-4):r+=s}else r+=s}return r}},Pv=class extends Yn{constructor(){super(...arguments),this.name="TrailingCharactersRepair",this.description="Removes trailing characters after valid JSON structure"}canApply(e){let r=e.trim();if(!r.startsWith("{")&&!r.startsWith("["))return!1;let n=0,i=0,o=!1,s=!1;for(let a=0;a<r.length;a++){let c=r[a];if(o)s?s=!1:c==="\\"?s=!0:c==='"'&&(o=!1);else if(c==='"')o=!0;else if(c==="{")n++;else if(c==="}"){if(n--,n===0&&i===0&&a>0&&a<r.length-1)return!0}else if(c==="[")i++;else if(c==="]"&&(i--,i===0&&n===0&&a>0&&a<r.length-1))return!0}return!1}apply(e){let r=e.trim(),n=0,i=0,o=!1,s=!1,a=-1;for(let c=0;c<r.length;c++){let u=r[c];if(o)s?s=!1:u==="\\"?s=!0:u==='"'&&(o=!1);else if(u==='"')o=!0;else if(u==="{")n++;else if(u==="}"){if(n--,n===0&&i===0&&c>0){a=c;break}}else if(u==="[")i++;else if(u==="]"&&(i--,i===0&&n===0&&c>0)){a=c;break}}return a>0&&a<r.length-1?r.substring(0,a+1):e}},Wu=class{constructor(e={}){this.strategies=[],this.repairLog=[],this.options={attemptRepair:!0,maxDepth:10,preserveStringsOnFailure:!1,logRepairs:!1,...e},this.initializeDefaultStrategies(),e.customStrategies&&this.strategies.push(...e.customStrategies)}initializeDefaultStrategies(){this.strategies=[new By,new _y,new Lv,new Pv,new Qy,new vy,new Dy,new Ty]}parse(e){let r=Date.now();this.repairLog=[];let n=e instanceof Buffer?e.toString("utf8"):String(e);try{return{success:!0,data:JSON.parse(n),metadata:{parseTime:Date.now()-r,strategiesApplied:[]}}}catch(s){if(!this.options.attemptRepair)return{success:!1,error:`JSON parse error: ${s}`,metadata:{parseTime:Date.now()-r}}}let i=n,o=[];for(let s of this.strategies)if(s.canApply(i)){let a=i;if(i=s.apply(i),a!==i){o.push(s.name),this.repairLog.push(s.description),this.options.logRepairs&&console.log(`Applied ${s.name}: ${s.description}`);try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch{}}}try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch(s){let a=this.aggressiveFallback(i);return a.success?{...a,repairs:[...this.repairLog,"Applied aggressive fallback"],metadata:{parseTime:Date.now()-r,strategiesApplied:[...o,"AggressiveFallback"]}}:{success:!1,error:`Failed to parse JSON after applying ${o.length} strategies: ${s}`,repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}}aggressiveFallback(e){try{let r=e.indexOf("{"),n=e.indexOf("[");if(r===-1&&n===-1)return{success:!1,error:"No JSON-like structure found"};let i=r===-1?n:n===-1?r:Math.min(r,n),o=e.substring(i);for(let a of this.strategies)a.canApply(o)&&(o=a.apply(o));return{success:!0,data:JSON.parse(o)}}catch(r){return{success:!1,error:`Aggressive fallback failed: ${r}`}}}addStrategy(e){this.strategies.push(e)}removeStrategy(e){this.strategies=this.strategies.filter(r=>r.name!==e)}getStrategies(){return this.strategies.map(e=>e.name)}};at.ResilientJsonParser=Wu;var CG=new Wu;function eke(t,e){return(e?new Wu(e):CG).parse(t)}function tke(t){let e=CG.parse(t);if(e.success)return e.repairs&&e.repairs.length>0&&console.log("JSON parsed with repairs:",e.repairs),e.data;throw new Error(`Failed to parse JSON: ${e.error}`)}function rke(t){try{return JSON.parse(t),!0}catch{return!1}}function nke(t,e=2){return JSON.stringify(t,null,e)}function ike(t){let r=new Wu().parse(t);if(r.success)return JSON.stringify(r.data);throw new Error("Cannot minify invalid JSON")}});var ur=m(K=>{"use strict";var oke=K&&K.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),le=K&&K.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oke(e,t,r)};Object.defineProperty(K,"__esModule",{value:!0});K.SSELogSubscriptionManager=K.SuperglueHttpError=K.SuperglueClient=void 0;le(Mk(),K);le(tM(),K);le(pM(),K);le(hM(),K);le(IM(),K);le(CM(),K);le(SM(),K);le(bd(),K);le(nx(),K);le(ix(),K);le(ox(),K);le(sx(),K);le(mb(),K);le(cx(),K);le(dx(),K);le(Ax(),K);le(px(),K);le(Eb(),K);le(hx(),K);le(mx(),K);le(yx(),K);le(Ix(),K);le(cp(),K);le(bx(),K);le(Sx(),K);le(Bx(),K);le(Qx(),K);le(Dx(),K);le(Tx(),K);le(Ux(),K);le(xx(),K);le(Px(),K);le(rb(),K);le(Jx(),K);le(Zx(),K);le(zh(),K);le(lL(),K);le(gL(),K);le(mL(),K);le(qb(),K);le(CL(),K);le(bL(),K);le(QL(),K);le(_L(),K);le(dr(),K);le(ln(),K);le(DL(),K);le(TL(),K);le(og(),K);le(Lc(),K);le(Xl(),K);var SG=IG();Object.defineProperty(K,"SuperglueClient",{enumerable:!0,get:function(){return SG.SuperglueClient}});Object.defineProperty(K,"SuperglueHttpError",{enumerable:!0,get:function(){return SG.SuperglueHttpError}});var ske=Yb();Object.defineProperty(K,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return ske.SSELogSubscriptionManager}});le(bG(),K)});var fE=require("commander");var Br=pe(require("fs")),QG=pe(require("os")),Jo=pe(require("path")),GA=pe(ur()),wG=new Set(["runner","builder","admin"]),BG={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function Wo(t){let e=Jo.join(process.cwd(),".superglue"),r=QG.homedir();if(!r)return e;let n=Jo.join(r,".superglue");return t===!0?e:t===!1?n:Br.existsSync(Jo.join(e,"config.json"))?e:n}function Fv(t){return Jo.join(Wo(t),"config.json")}function Ry(t){let e=Fv(t);if(!Br.existsSync(e))return{};try{return JSON.parse(Br.readFileSync(e,"utf-8"))}catch{return{}}}function Zu(t){let e=Ry(),r=t.apiKey||(0,GA.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",n=t.endpoint||(0,GA.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,GA.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||n.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),o=(0,GA.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),s=o&&wG.has(o)?o:e.preset&&wG.has(e.preset)?e.preset:"admin";return{...BG,...e,apiKey:r,endpoint:n,webEndpoint:i,preset:s,output:{...BG.output,...e.output}}}function ky(t,e){let r=Wo(e);Br.existsSync(r)||Br.mkdirSync(r,{recursive:!0}),Br.writeFileSync(Jo.join(r,"config.json"),JSON.stringify(t,null,2)+`
|
|
1767
|
-
`,{mode:384})}function Ny(t,e){let r=Jo.join(Wo(e),"drafts");if(Br.existsSync(r)||Br.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=Jo.resolve(t.output.directory);Br.existsSync(n)||Br.mkdirSync(n,{recursive:!0})}}var Yv=pe(ur());var $v=pe(require("readline"));var DG=require("child_process"),TG=require("util");var vG={name:"@superglue/cli",version:"1.1.
|
|
1767
|
+
`,{mode:384})}function Ny(t,e){let r=Jo.join(Wo(e),"drafts");if(Br.existsSync(r)||Br.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=Jo.resolve(t.output.directory);Br.existsSync(n)||Br.mkdirSync(n,{recursive:!0})}}var Yv=pe(ur());var $v=pe(require("readline"));var DG=require("child_process"),TG=require("util");var vG={name:"@superglue/cli",version:"1.1.174",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var cke=(0,TG.promisify)(DG.exec),lr=vG.version;function _G(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function Uy(t,e){let r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let o=0;o<i;o++){let s=_G(r[o]||"0"),a=_G(n[o]||"0");if(s.numeric<a.numeric)return-1;if(s.numeric>a.numeric||s.prerelease===null&&a.prerelease!==null)return 1;if(s.prerelease!==null&&a.prerelease===null)return-1;if(s.prerelease!==null&&a.prerelease!==null){if(s.prerelease<a.prerelease)return-1;if(s.prerelease>a.prerelease)return 1}}return 0}async function My(){try{let t=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return t.ok&&(await t.json()).version||null}catch{return null}}var Oy=null;function RG(){re()&&(Oy=My())}async function kG(){if(!(!re()||!Oy)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([Oy,t]);e&&Uy(lr,e)<0&&(console.error(""),console.error(`${y.cyan}${y.bold} Update available: ${lr} \u2192 ${e}${y.reset}`),console.error(`${y.cyan} Run ${y.bold}sg update${y.reset}${y.cyan} to upgrade${y.reset}`),console.error(""))}catch{}Oy=null}}async function NG(){let t=await My();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(Uy(lr,t)>=0)return{success:!0,message:`Already on latest version (${lr})`};try{return await cke("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${lr} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var re=()=>process.argv.includes("--table")&&process.stdout.isTTY,Qr=()=>process.argv.includes("--full"),y={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function OG(t,e){let r=e||t;return`\x1B]8;;${t}\x07${y.underline}${y.cyan}${r}${y.reset}\x1B]8;;\x07`}function UG(){if(!re())return;let t=y.reset,e=y.dim,r="\x1B[47;30m",n=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),n.forEach(i=>{let o=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(o===-1)return console.log(" "+i);let a=i.slice(0,o),c=i.slice(o,s+1).split("").map(l=>l===" "?" ":"\u2588").join(""),u=i.slice(s+1);console.log(` ${a}${r}${c}${t}${u}`)}),console.log(` ${e} CLI v${lr}${t}`),console.log("")}function it(t){if(!re())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=0,n=t,i=()=>process.stdout.write("\r\x1B[2K"),o=()=>{process.stdout.write(`\r ${y.cyan}${e[r++%e.length]}${y.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${y.dim}\u2502${y.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function W(t){re()?xy(t):console.log(JSON.stringify(t,null,2))}function we(t,e){re()?(console.log(` ${y.green}\u2713${y.reset} ${t}`),e&&xy(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function _(t,e){re()?(console.error(` ${y.red}\u2717${y.reset} ${t}`),e&&xy(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function MG(t){re()&&console.log(` ${y.yellow}\u26A0${y.reset} ${t}`)}function Xt(t){re()&&console.log(` ${y.dim}${t}${y.reset}`)}function Zo(t){re()&&(console.log(`
|
|
1768
1768
|
${y.bold}${y.cyan}${t}${y.reset}`),console.log(` ${y.dim}${"\u2500".repeat(t.length)}${y.reset}`))}function vr(t,e,r){if(!re()){console.log(JSON.stringify({success:!0,total:r?.total??t.length,items:t}));return}if(t.length===0){console.log(`
|
|
1769
1769
|
${y.dim}0 results${y.reset}
|
|
1770
1770
|
`);return}let n=e||Object.keys(t[0]),i=Qr()?1/0:60,o=n.map(l=>Math.min(i,Math.max(l.length,...t.map(d=>String(d[l]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let s=n.map((l,d)=>`${y.bold}${y.cyan}${l.toUpperCase().padEnd(o[d])}${y.reset}`).join(" ");console.log(` ${s}`);let a=o.map(l=>`${y.dim}${"\u2500".repeat(l)}${y.reset}`).join(`${y.dim}\u2500\u2500${y.reset}`);console.log(` ${a}`);for(let l of t){let d=n.map((A,p)=>{let h=String(l[A]??"").replace(/[\n\r]+/g," ").trim();if(h.length>i){let S=`\u2026 (${h.length})`;h=h.slice(0,Math.max(0,i-S.length))+`${y.dim}${S}${y.reset}`}return A==="status"?`${{success:y.green,running:y.yellow,failed:y.red,aborted:y.red,error:y.red,pending:y.dim}[h.toLowerCase()]||""}${h.padEnd(o[p])}${y.reset}`:h.padEnd(o[p])}).join(" ");console.log(` ${d}`)}let c=r?.total??t.length,u=c===t.length?`${t.length} result${t.length===1?"":"s"}`:`${t.length} of ${c} result${c===1?"":"s"}`;console.log(`
|