@superglue/cli 1.1.261 → 1.1.262

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.
@@ -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.261",
4
+ "version": "1.1.262",
5
5
  "author": {
6
6
  "name": "superglue",
7
7
  "email": "hello@superglue.cloud"
package/dist/cli.js CHANGED
@@ -1210,7 +1210,7 @@ REQUIRED GCP PERMISSIONS:
1210
1210
 
1211
1211
  HEADERS: { "Authorization": "Bearer <<token>>", "Content-Type": "application/json" }`,keywords:["datasets","tables","queries","jobs","projects","schemas","rows","streaming","partitions","clustering","views","routines","models","data warehouse","sql","oauth"]},firebase:{name:"firebase",apiUrl:"https://firestore.googleapis.com",regex:"^.*(firebase|firestore).*$",icon:"firebase",docsUrl:"https://firebase.google.com/docs/reference/firebase-management/rest",openApiUrl:"https://firestore.googleapis.com/$discovery/rest?version=v1",preferredAuthType:"oauth2",oauth:{authUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",scopes:"https://www.googleapis.com/auth/firebase https://www.googleapis.com/auth/cloud-platform"},keywords:["firestore","realtime database","authentication","cloud functions","storage","hosting","documents","collections","users","projects","apps","query","oauth"]},salesforce:{name:"salesforce",apiUrl:"https://api.salesforce.com",regex:"^.*salesforce.*$",icon:"salesforce",docsUrl:"https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm",preferredAuthType:"oauth2",oauth:{authUrl:"https://login.salesforce.com/services/oauth2/authorize",tokenUrl:"https://login.salesforce.com/services/oauth2/token",managedEndpointHosts:["test.salesforce.com","*.my.salesforce.com"],scopes:"full",grant_type:"authorization_code",managed:!0},keywords:["accounts","contacts","leads","opportunities","cases","campaigns","products","price books","quotes","contracts","orders","custom objects","soql","query","search","sobjects","oauth"]},facebook:{name:"facebook",apiUrl:"https://graph.facebook.com",regex:"^.*facebook.*$",icon:"facebook",docsUrl:"https://developers.facebook.com/docs/graph-api",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.facebook.com/v18.0/dialog/oauth",tokenUrl:"https://graph.facebook.com/v18.0/oauth/access_token",scopes:"email public_profile pages_show_list pages_read_engagement pages_manage_metadata pages_read_user_content pages_manage_posts pages_manage_engagement business_management ads_management ads_read catalog_management leads_retrieval"},keywords:["pages","posts","comments","insights","ads","campaigns","audiences","business","catalog","events","groups","photos","videos","live videos","oauth"]},meta_ads:{name:"meta_ads",apiUrl:"https://graph.facebook.com",regex:"^.*(meta[_ .-]?ads|facebook[_ .-]?ads|marketing[_ .-]?api|/act_).*$",icon:"meta",docsUrl:"https://developers.facebook.com/docs/marketing-api/",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.facebook.com/v23.0/dialog/oauth",tokenUrl:"https://graph.facebook.com/v23.0/oauth/access_token",scopes:"ads_read ads_management business_management"},keywords:["meta ads","facebook ads","marketing api","ad accounts","campaigns","adsets","ads","adcreatives","insights","custom audiences","pixels","leadgen forms","product catalogs","spend","reach","oauth"],systemSpecificInstructions:`Ad account IDs are prefixed with act_ in all request paths (e.g. /v23.0/act_<ACCOUNT_ID>/insights, /act_<ACCOUNT_ID>/campaigns) \u2014 the numeric ID alone fails. With Standard Access, ads_read/ads_management only work for users who hold a role on the Meta app (suitable for development); serving arbitrary users requires Advanced Access, which needs business verification and App Review. Graph API versions sunset roughly two years after release \u2014 prefer the latest version in paths rather than copying versions from older examples.
1212
1212
  Tokens: Meta issues no refresh token, so superglue cannot renew a Meta token. User tokens from apps without Marketing API Standard Access expire about 60 days after sign-in; user tokens from apps with Standard Access have no time expiry. Meta reports a 60-day expiry at sign-in in both cases, so the stored expiry can be wrong. GET /v23.0/debug_token?input_token=<<{systemId}_access_token>> with the connection's own token returns the real expires_at (0 = no time expiry) and data_access_expires_at, with {systemId} replaced by the connected system id. Data access ends about 90 days after the user last signed in to the app, also for tokens without a time expiry; data calls then fail until the user reconnects. A password change, removing the app, or losing the role on the app invalidates the token (error code 190); only reconnecting fixes it.
1213
- Unattended use: for scheduled, webhook, or MCP runs, use a business integration system user token from Facebook Login for Business. It has no expiry by default, belongs to the client's business portfolio instead of a person, and stays valid after password changes. In a Business-type Meta app with Marketing API Standard Access, create a Facebook Login for Business configuration with the System-user access token type. Add config_id=<configuration ID> to the authorize URL and leave the scopes field empty; the configuration holds the permissions.`},instagram:{name:"instagram",apiUrl:"https://graph.facebook.com/v23.0/",regex:"^.*instagram.*$",icon:"instagram",docsUrl:"https://developers.facebook.com/docs/instagram-platform/",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.facebook.com/v23.0/dialog/oauth",tokenUrl:"https://graph.facebook.com/v23.0/oauth/access_token",scopes:"instagram_basic pages_show_list instagram_content_publish pages_read_engagement instagram_manage_comments instagram_manage_insights instagram_manage_messages business_management"},keywords:["instagram","instagram api","instagram graph api","media","posts","stories","comments","insights","hashtags","mentions","business discovery","content publishing","user media","account info","oauth"],systemSpecificInstructions:"There are two distinct Instagram APIs: this template targets the Instagram API with Facebook Login (host graph.facebook.com), which requires an Instagram professional (Business/Creator) account linked to a Facebook Page; hashtag search and business discovery are only available on this variant. The alternative Instagram API with Instagram Login uses host graph.instagram.com, needs no Facebook Page, and uses different tokens/scopes. The legacy Instagram Basic Display API was shut down in December 2024 and cannot be used."},twitter:{name:"twitter",apiUrl:"https://api.twitter.com",regex:"^https?:\\/\\/(?:[^/]+\\.)*(?:twitter\\.com|x\\.com)(?:[:/?#].*)?$",icon:"x",docsUrl:"https://docs.x.com/x-api/introduction",openApiUrl:"https://api.x.com/2/openapi.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://twitter.com/i/oauth2/authorize",tokenUrl:"https://api.twitter.com/2/oauth2/token",scopes:"tweet.read tweet.write users.read follows.read follows.write offline.access like.read like.write list.read list.write block.read block.write bookmark.read bookmark.write mute.read mute.write"},keywords:["tweets","users","followers","timeline","mentions","retweets","likes","lists","spaces","direct messages","trends","media","polls","oauth"]},linkedin:{name:"linkedin",apiUrl:"https://api.linkedin.com",regex:"^.*linkedin.*$",icon:"/logos/linkedin.svg",docsUrl:"https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.linkedin.com/oauth/v2/authorization",tokenUrl:"https://www.linkedin.com/oauth/v2/accessToken",scopes:"r_liteprofile r_emailaddress w_member_social r_fullprofile r_basicprofile rw_company_admin r_1st_connections r_ads r_ads_reporting r_organization_social rw_organization_admin w_organization_social r_events"},keywords:["profiles","connections","companies","shares","posts","articles","jobs","skills","endorsements","recommendations","groups","events","messaging","oauth"]},paypal:{name:"paypal",apiUrl:"https://api.paypal.com",regex:"^.*paypal.*$",icon:"paypal",docsUrl:"https://developer.paypal.com/api/rest",preferredAuthType:"api_key",keywords:["payments","orders","captures","refunds","payouts","invoices","subscriptions","plans","products","transactions","balances","webhooks","checkout","billing","query","search"]},square:{name:"square",apiUrl:"https://connect.squareup.com",regex:"^.*(square|squareup).*$",icon:"square",docsUrl:"https://developer.squareup.com/reference/square",openApiUrl:"https://raw.githubusercontent.com/square/connect-api-specification/refs/heads/master/api.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://connect.squareup.com/oauth2/authorize",tokenUrl:"https://connect.squareup.com/oauth2/token",scopes:"MERCHANT_PROFILE_READ PAYMENTS_READ PAYMENTS_WRITE CUSTOMERS_READ CUSTOMERS_WRITE INVENTORY_READ INVENTORY_WRITE ORDERS_READ ORDERS_WRITE ITEMS_READ ITEMS_WRITE EMPLOYEES_READ EMPLOYEES_WRITE TIMECARDS_READ TIMECARDS_WRITE"},keywords:["payments","customers","orders","catalog","inventory","locations","transactions","refunds","cards","checkout","invoices","subscriptions","terminals","employees","shifts","query","search","oauth"]},adyen:{name:"adyen",apiUrl:"https://checkout-test.adyen.com",regex:"^.*adyen.*$",icon:"adyen",docsUrl:"https://docs.adyen.com/api-explorer",openApiUrl:"https://raw.githubusercontent.com/Adyen/adyen-openapi/main/yaml/CheckoutService-v71.yaml",preferredAuthType:"api_key",keywords:["paymentMethods","sessions","payments","payments.details","cardDetails","recurringContracts","payouts","balanceTransfers","legalEntities","binLookup","storedValueCards","transferRules","terminalManagement","accountHolders","issuers"]},razorpay:{name:"razorpay",apiUrl:"https://api.razorpay.com",regex:"^.*razorpay.*$",icon:"razorpay",docsUrl:"https://razorpay.com/docs/api",preferredAuthType:"api_key",keywords:["payments","orders","customers","refunds","invoices","subscriptions","accounts","fund_accounts","payouts","virtual_accounts","mandates","disputes","settlements","payment_links","bin_lookup"]},plaid:{name:"plaid",apiUrl:"https://production.plaid.com",regex:"^.*plaid.*$",icon:"/logos/plaid.svg",docsUrl:"https://plaid.com/docs/api",openApiUrl:"https://raw.githubusercontent.com/plaid/plaid-openapi/master/2020-09-14.yml",preferredAuthType:"api_key",keywords:["items","accounts","institutions","link_tokens","access_tokens","transactions","auth","identity","assets","liabilities","income","user","processor_tokens","transfer","investments"]},zendesk:{name:"zendesk",apiUrl:"https://api.zendesk.com",regex:"^.*zendesk.*$",icon:"zendesk",docsUrl:"https://developer.zendesk.com/api-reference",openApiUrl:"https://developer.zendesk.com/zendesk/oas.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://{subdomain}.zendesk.com/oauth/authorizations/new",tokenUrl:"https://{subdomain}.zendesk.com/oauth/tokens",scopes:"read write tickets:read tickets:write users:read users:write organizations:read organizations:write hc:read hc:write chat:read chat:write"},keywords:["tickets","users","organizations","groups","agents","views","macros","triggers","automations","sla","custom fields","tags","satisfaction","help center","api key"]},freshdesk:{name:"freshdesk",apiUrl:"https://{domain}.freshdesk.com/api/v2",regex:"^.*freshdesk.*$",icon:"/logos/freshdesk.svg",docsUrl:"https://developers.freshdesk.com/api",preferredAuthType:"api_key",keywords:["tickets","contacts","agents","companies","groups","forums","solutions","categories","folders","articles","time entries","surveys","satisfaction","sla","escalations","api key"]},freshworks:{name:"freshworks",apiUrl:"https://{domain}.freshservice.com/api/v2",regex:"^.*(freshworks|freshservice).*$",icon:"/logos/freshworks.svg",docsUrl:"https://api.freshservice.com",preferredAuthType:"api_key",keywords:["tickets","requesters","agents","assets","changes","problems","releases","service catalog","service items","departments","locations","products","vendors","contracts","api key"]},servicenow:{name:"servicenow",apiUrl:"https://{instance}.service-now.com/api",regex:"^.*(servicenow|service-now).*$",icon:"servicenow",docsUrl:"https://developer.servicenow.com/dev.do#!/reference/api/latest/rest",preferredAuthType:"api_key",keywords:["incidents","problems","changes","requests","users","groups","cmdb","configuration items","service catalog","knowledge","tasks","approvals","sla","workflows","tables","api key"]},helpscout:{name:"helpscout",apiUrl:"https://api.helpscout.net",regex:"^.*helpscout.*$",icon:"helpscout",docsUrl:"https://developer.helpscout.com/mailbox-api",preferredAuthType:"api_key",keywords:["conversations","customers","mailboxes","threads","tags","teams","users","reports","satisfaction","ratings","workflows","saved replies","docs","beacon","api key"]},box:{name:"box",label:"Box",apiUrl:"https://api.box.com/2.0",extraApiUrls:["https://upload.box.com/api/2.0"],regex:"^https?:\\/\\/(?:[^/]+\\.)*box\\.com(?:[:/?#].*)?$",icon:"simpleicons:box",docsUrl:"https://developer.box.com/reference/",readOperations:["POST /2.0/metadata_queries/execute_read","POST /2.0/zip_downloads"],preferredAuthType:"oauth2",oauth:{authUrl:"https://account.box.com/api/oauth2/authorize",tokenUrl:"https://api.box.com/oauth2/token",scopes:"root_readwrite",managed:!0,tokenAuthMethod:"body",tokenContentType:"form"},systemSpecificInstructions:"superglue provides a managed Box OAuth app; users connect with their Box login and never need to create a Box app or supply a client ID or secret. File uploads go to https://upload.box.com/api/2.0, not the main API host. If authorization fails with an app-not-authorized error, the Box enterprise blocks unpublished apps; a Box admin must enable the app in Admin Console > Apps > Custom Apps Manager using the client ID. Refresh tokens rotate and expire after 60 days without use.",keywords:["files","folders","upload","download","sharing","links","metadata","search","collaborations","comments","tasks","enterprise","content","oauth"]},dropbox:{name:"dropbox",label:"Dropbox",apiUrl:"https://api.dropboxapi.com",extraApiUrls:["https://content.dropboxapi.com","https://notify.dropboxapi.com"],regex:"^.*dropbox.*$",icon:"dropbox",docsUrl:"https://www.dropbox.com/developers/documentation/http/documentation",readOperations:Iwe,preferredAuthType:"oauth2",oauth:{authUrl:"https://www.dropbox.com/oauth2/authorize?token_access_type=offline",tokenUrl:"https://api.dropboxapi.com/oauth2/token",scopes:"files.metadata.read files.metadata.write files.content.read files.content.write sharing.read sharing.write account_info.read",managed:!0,tokenAuthMethod:"body",tokenContentType:"form"},systemSpecificInstructions:"Uses the superglue managed Dropbox OAuth app. Downloads and uploads use https://content.dropboxapi.com/2 with arguments in the Dropbox-API-Arg header.",keywords:["files","folders","upload","download","sharing","links","metadata","search","sync","paper","users","teams","move","copy","delete","oauth"]},mailchimp:{name:"mailchimp",apiUrl:"https://api.mailchimp.com",regex:"^.*mailchimp.*$",icon:"mailchimp",docsUrl:"https://mailchimp.com/developer/marketing/api",openApiUrl:"https://api.mailchimp.com/schema/3.0/Swagger.json",preferredAuthType:"api_key",oauth:{authUrl:"https://login.mailchimp.com/oauth2/authorize",tokenUrl:"https://login.mailchimp.com/oauth2/token",scopes:"audiences:read audiences:write automations:read automations:write campaigns:read campaigns:write conversations:read conversations:write ecommerce:read ecommerce:write files:read files:write lists:read lists:write reports:read templates:read templates:write"},keywords:["lists","campaigns","templates","audiences","members","segments","tags","automations","reports","folders","merge fields","activities","ecommerce","batch","query","api key"]},jira:{name:"jira",label:"Jira",apiUrl:"https://{your-domain}.atlassian.net/rest/api",extraApiUrls:["https://api.atlassian.com/ex/jira","https://api.atlassian.com/oauth/token/accessible-resources"],regex:"^.*(jira|atlassian).*$",icon:"jira",docsUrl:"https://developer.atlassian.com/cloud/jira/platform/rest/v3",openApiUrl:"https://developer.atlassian.com/cloud/jira/platform/swagger-v3.json",readOperations:Cwe,preferredAuthType:"oauth2",oauth:{authUrl:"https://auth.atlassian.com/authorize",tokenUrl:"https://auth.atlassian.com/oauth/token",scopes:"read:jira-work write:jira-work read:jira-user write:jira-user read:jira-work-management write:jira-work-management read:servicedesk-request write:servicedesk-request manage:jira-project manage:jira-configuration manage:jira-data-provider offline_access",managed:!0},systemSpecificInstructions:"OAuth access tokens only work against https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3; get the cloud id from GET https://api.atlassian.com/oauth/token/accessible-resources. The /rest/api/3/search endpoint has been deprecated - Use GET /rest/api/3/search/jql with query parameter 'jql' for searching issues. MUST specify a project in the JQL query. Example: GET /rest/api/3/search/jql?jql=project=KAN&maxResults=100. The jql parameter accepts JQL queries like 'project=KEY', 'assignee=currentUser()', 'order by created DESC'. Always URL-encode the jql parameter value.",keywords:["issues","projects","boards","sprints","epics","users","workflows","fields","components","versions","priorities","statuses","comments","attachments","jql","query","search","oauth"]},confluence:{name:"confluence",apiUrl:"https://{your-domain}.atlassian.net/wiki/api/v2",regex:"^.*(confluence|atlassian).*$",icon:"confluence",docsUrl:"https://developer.atlassian.com/cloud/confluence/rest/v2",openApiUrl:"https://dac-static.atlassian.com/cloud/confluence/openapi-v2.v3.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://auth.atlassian.com/authorize",tokenUrl:"https://auth.atlassian.com/oauth/token",scopes:"read:confluence-content.all write:confluence-content read:confluence-space.summary write:confluence-space read:confluence-props write:confluence-props read:confluence-user write:confluence-user read:confluence-groups write:confluence-groups delete:confluence-content delete:confluence-space offline_access",managed:!0},systemSpecificInstructions:"Use the Confluence Cloud REST API v2 under /wiki/api/v2 instead of legacy /wiki/rest/api v1 endpoints when a v2 equivalent exists. With OAuth 2.0, fetch the cloud id from GET https://api.atlassian.com/oauth/token/accessible-resources and use https://api.atlassian.com/ex/confluence/{cloudId}/wiki/api/v2 as the system base URL. V2 list endpoints use cursor-based pagination; follow the Link header or _links.next URL until no next page remains.",keywords:["spaces","pages","content","attachments","comments","labels","templates","blueprints","macros","restrictions","versions","ancestors","descendants","children","oauth"]},quickbooks:{name:"quickbooks",apiUrl:"https://quickbooks.api.intuit.com",regex:"^(?!.*(sandbox|desktop|qbxml)).*(quickbooks|intuit).*$",readOperations:["POST /v3/company/*/query"],icon:"quickbooks",docsUrl:"https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/account",preferredAuthType:"oauth2",oauth:{authUrl:"https://appcenter.intuit.com/connect/oauth2",tokenUrl:"https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",scopes:"com.intuit.quickbooks.accounting",managed:!0,grant_type:"authorization_code",tokenAuthMethod:"basic_auth",tokenContentType:"form"},keywords:["accounts","invoices","customers","vendors","bills","payments","estimates","purchase orders","sales receipts","credit memos","journal entries","items","tax rates","employees","reports","oauth"],systemSpecificInstructions:"superglue provides a managed Intuit Production OAuth app for live QuickBooks Online companies. Users connect without supplying client credentials. For sandbox companies, use the QuickBooks Sandbox template. Payments or Payroll scopes can cause authorization errors such as access_denied when unavailable to the Intuit app or selected QuickBooks company."},quickbooks_sandbox:{name:"quickbooks_sandbox",label:"QuickBooks Sandbox",apiUrl:"https://sandbox-quickbooks.api.intuit.com",regex:"^.*(sandbox-quickbooks\\.api\\.intuit\\.com|quickbooks.*sandbox|intuit.*sandbox).*$",readOperations:["POST /v3/company/*/query"],icon:"quickbooks",docsUrl:"https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/account",preferredAuthType:"oauth2",oauth:{authUrl:"https://appcenter.intuit.com/connect/oauth2",tokenUrl:"https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",scopes:"com.intuit.quickbooks.accounting",grant_type:"authorization_code",tokenAuthMethod:"basic_auth",tokenContentType:"form"},keywords:["accounts","invoices","customers","vendors","bills","payments","estimates","purchase orders","sales receipts","credit memos","journal entries","items","tax rates","employees","reports","sandbox","oauth"],systemSpecificInstructions:"Use an Intuit app's Development client ID and client secret. Add the exact superglue OAuth callback URL to that app's Development redirect URIs. This template connects QuickBooks Online sandbox companies only. Payments or Payroll scopes can cause authorization errors such as access_denied when unavailable to the Intuit app or selected QuickBooks company."},ramp:{name:"ramp",apiUrl:"https://api.ramp.com/developer/v1",regex:"(^|.*\\b)(ramp|ramp\\.com|api\\.ramp\\.com|demo-api\\.ramp\\.com)(\\b.*|$)",icon:"ramp",docsUrl:"https://docs.ramp.com/developer-api/v1",openApiUrl:"https://docs.ramp.com/openapi/developer-api.json",preferredAuthType:"oauth2",oauth:{tokenUrl:"https://api.ramp.com/developer/v1/token",scopes:"transactions:read cards:read users:read business:read bills:read reimbursements:read vendors:read accounting:read receipts:read departments:read locations:read limits:read spend_programs:read statements:read transfers:read bank_accounts:read",grant_type:"client_credentials",tokenAuthMethod:"basic_auth",tokenContentType:"form"},keywords:["transactions","cards","users","business","bills","reimbursements","vendors","accounting","receipts","departments","locations","limits","spend_programs","statements","transfers","bank_accounts"],systemSpecificInstructions:`Ramp has separate production and sandbox API hosts. Production calls use https://api.ramp.com/developer/v1; sandbox calls use https://demo-api.ramp.com/developer/v1. Do not use the Ramp web app hosts (app.ramp.com or demo.ramp.com) for API calls.
1213
+ Unattended use: for scheduled, webhook, or MCP runs, use a business integration system user token from Facebook Login for Business. It has no expiry by default, belongs to the client's business portfolio instead of a person, and stays valid after password changes. In a Business-type Meta app with Marketing API Standard Access, create a Facebook Login for Business configuration with the System-user access token type. Add config_id=<configuration ID> to the authorize URL and leave the scopes field empty; the configuration holds the permissions.`},instagram:{name:"instagram",apiUrl:"https://graph.facebook.com/v23.0/",regex:"^.*instagram.*$",icon:"instagram",docsUrl:"https://developers.facebook.com/docs/instagram-platform/",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.facebook.com/v23.0/dialog/oauth",tokenUrl:"https://graph.facebook.com/v23.0/oauth/access_token",scopes:"instagram_basic pages_show_list instagram_content_publish pages_read_engagement instagram_manage_comments instagram_manage_insights instagram_manage_messages business_management"},keywords:["instagram","instagram api","instagram graph api","media","posts","stories","comments","insights","hashtags","mentions","business discovery","content publishing","user media","account info","oauth"],systemSpecificInstructions:"There are two distinct Instagram APIs: this template targets the Instagram API with Facebook Login (host graph.facebook.com), which requires an Instagram professional (Business/Creator) account linked to a Facebook Page; hashtag search and business discovery are only available on this variant. The alternative Instagram API with Instagram Login uses host graph.instagram.com, needs no Facebook Page, and uses different tokens/scopes. The legacy Instagram Basic Display API was shut down in December 2024 and cannot be used."},twitter:{name:"twitter",apiUrl:"https://api.twitter.com",regex:"^https?:\\/\\/(?:[^/]+\\.)*(?:twitter\\.com|x\\.com)(?:[:/?#].*)?$",icon:"x",docsUrl:"https://docs.x.com/x-api/introduction",openApiUrl:"https://api.x.com/2/openapi.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://twitter.com/i/oauth2/authorize",tokenUrl:"https://api.twitter.com/2/oauth2/token",scopes:"tweet.read tweet.write users.read follows.read follows.write offline.access like.read like.write list.read list.write block.read block.write bookmark.read bookmark.write mute.read mute.write"},keywords:["tweets","users","followers","timeline","mentions","retweets","likes","lists","spaces","direct messages","trends","media","polls","oauth"]},linkedin:{name:"linkedin",apiUrl:"https://api.linkedin.com",regex:"^.*linkedin.*$",icon:"/logos/linkedin.svg",docsUrl:"https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access",preferredAuthType:"oauth2",oauth:{authUrl:"https://www.linkedin.com/oauth/v2/authorization",tokenUrl:"https://www.linkedin.com/oauth/v2/accessToken",scopes:"r_liteprofile r_emailaddress w_member_social r_fullprofile r_basicprofile rw_company_admin r_1st_connections r_ads r_ads_reporting r_organization_social rw_organization_admin w_organization_social r_events"},keywords:["profiles","connections","companies","shares","posts","articles","jobs","skills","endorsements","recommendations","groups","events","messaging","oauth"]},paypal:{name:"paypal",apiUrl:"https://api.paypal.com",regex:"^.*paypal.*$",icon:"paypal",docsUrl:"https://developer.paypal.com/api/rest",preferredAuthType:"api_key",keywords:["payments","orders","captures","refunds","payouts","invoices","subscriptions","plans","products","transactions","balances","webhooks","checkout","billing","query","search"]},square:{name:"square",apiUrl:"https://connect.squareup.com",regex:"^.*(square|squareup).*$",icon:"square",docsUrl:"https://developer.squareup.com/reference/square",openApiUrl:"https://raw.githubusercontent.com/square/connect-api-specification/refs/heads/master/api.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://connect.squareup.com/oauth2/authorize",tokenUrl:"https://connect.squareup.com/oauth2/token",scopes:"MERCHANT_PROFILE_READ PAYMENTS_READ PAYMENTS_WRITE CUSTOMERS_READ CUSTOMERS_WRITE INVENTORY_READ INVENTORY_WRITE ORDERS_READ ORDERS_WRITE ITEMS_READ ITEMS_WRITE EMPLOYEES_READ EMPLOYEES_WRITE TIMECARDS_READ TIMECARDS_WRITE"},keywords:["payments","customers","orders","catalog","inventory","locations","transactions","refunds","cards","checkout","invoices","subscriptions","terminals","employees","shifts","query","search","oauth"]},adyen:{name:"adyen",apiUrl:"https://checkout-test.adyen.com",regex:"^.*adyen.*$",icon:"adyen",docsUrl:"https://docs.adyen.com/api-explorer",openApiUrl:"https://raw.githubusercontent.com/Adyen/adyen-openapi/main/yaml/CheckoutService-v71.yaml",preferredAuthType:"api_key",keywords:["paymentMethods","sessions","payments","payments.details","cardDetails","recurringContracts","payouts","balanceTransfers","legalEntities","binLookup","storedValueCards","transferRules","terminalManagement","accountHolders","issuers"]},razorpay:{name:"razorpay",apiUrl:"https://api.razorpay.com",regex:"^.*razorpay.*$",icon:"razorpay",docsUrl:"https://razorpay.com/docs/api",preferredAuthType:"api_key",keywords:["payments","orders","customers","refunds","invoices","subscriptions","accounts","fund_accounts","payouts","virtual_accounts","mandates","disputes","settlements","payment_links","bin_lookup"]},plaid:{name:"plaid",apiUrl:"https://production.plaid.com",regex:"^.*plaid.*$",icon:"/logos/plaid.svg",docsUrl:"https://plaid.com/docs/api",openApiUrl:"https://raw.githubusercontent.com/plaid/plaid-openapi/master/2020-09-14.yml",preferredAuthType:"api_key",keywords:["items","accounts","institutions","link_tokens","access_tokens","transactions","auth","identity","assets","liabilities","income","user","processor_tokens","transfer","investments"]},zendesk:{name:"zendesk",apiUrl:"https://api.zendesk.com",regex:"^.*zendesk.*$",icon:"zendesk",docsUrl:"https://developer.zendesk.com/api-reference",openApiUrl:"https://developer.zendesk.com/zendesk/oas.yaml",preferredAuthType:"api_key",oauth:{authUrl:"https://{subdomain}.zendesk.com/oauth/authorizations/new",tokenUrl:"https://{subdomain}.zendesk.com/oauth/tokens",scopes:"read write tickets:read tickets:write users:read users:write organizations:read organizations:write hc:read hc:write chat:read chat:write"},keywords:["tickets","users","organizations","groups","agents","views","macros","triggers","automations","sla","custom fields","tags","satisfaction","help center","api key"]},freshdesk:{name:"freshdesk",apiUrl:"https://{domain}.freshdesk.com/api/v2",regex:"^.*freshdesk.*$",icon:"/logos/freshdesk.svg",docsUrl:"https://developers.freshdesk.com/api",preferredAuthType:"api_key",keywords:["tickets","contacts","agents","companies","groups","forums","solutions","categories","folders","articles","time entries","surveys","satisfaction","sla","escalations","api key"]},freshworks:{name:"freshworks",apiUrl:"https://{domain}.freshservice.com/api/v2",regex:"^.*(freshworks|freshservice).*$",icon:"/logos/freshworks.svg",docsUrl:"https://api.freshservice.com",preferredAuthType:"api_key",keywords:["tickets","requesters","agents","assets","changes","problems","releases","service catalog","service items","departments","locations","products","vendors","contracts","api key"]},servicenow:{name:"servicenow",apiUrl:"https://{instance}.service-now.com/api",regex:"^.*(servicenow|service-now).*$",icon:"servicenow",docsUrl:"https://developer.servicenow.com/dev.do#!/reference/api/latest/rest",preferredAuthType:"api_key",keywords:["incidents","problems","changes","requests","users","groups","cmdb","configuration items","service catalog","knowledge","tasks","approvals","sla","workflows","tables","api key"]},helpscout:{name:"helpscout",apiUrl:"https://api.helpscout.net",regex:"^.*helpscout.*$",icon:"helpscout",docsUrl:"https://developer.helpscout.com/mailbox-api",preferredAuthType:"api_key",keywords:["conversations","customers","mailboxes","threads","tags","teams","users","reports","satisfaction","ratings","workflows","saved replies","docs","beacon","api key"]},box:{name:"box",label:"Box",apiUrl:"https://api.box.com/2.0",extraApiUrls:["https://upload.box.com/api/2.0"],regex:"^https?:\\/\\/(?:[^/]+\\.)*box\\.com(?:[:/?#].*)?$",icon:"simpleicons:box",docsUrl:"https://developer.box.com/reference/",readOperations:["POST /2.0/metadata_queries/execute_read","POST /2.0/zip_downloads"],preferredAuthType:"oauth2",oauth:{authUrl:"https://account.box.com/api/oauth2/authorize",tokenUrl:"https://api.box.com/oauth2/token",scopes:"root_readwrite",managed:!0,tokenAuthMethod:"body",tokenContentType:"form"},systemSpecificInstructions:"superglue provides a managed Box OAuth app; users connect with their Box login and never need to create a Box app or supply a client ID or secret. File uploads go to https://upload.box.com/api/2.0, not the main API host. If authorization fails with an app-not-authorized error, the Box enterprise blocks unpublished apps; a Box admin must enable the app in Admin Console > Apps > Custom Apps Manager using the client ID. Refresh tokens rotate and expire after 60 days without use.",keywords:["files","folders","upload","download","sharing","links","metadata","search","collaborations","comments","tasks","enterprise","content","oauth"]},dropbox:{name:"dropbox",label:"Dropbox",apiUrl:"https://api.dropboxapi.com",extraApiUrls:["https://content.dropboxapi.com","https://notify.dropboxapi.com"],regex:"^.*dropbox.*$",icon:"dropbox",docsUrl:"https://www.dropbox.com/developers/documentation/http/documentation",readOperations:Iwe,preferredAuthType:"oauth2",oauth:{authUrl:"https://www.dropbox.com/oauth2/authorize?token_access_type=offline",tokenUrl:"https://api.dropboxapi.com/oauth2/token",scopes:"files.metadata.read files.metadata.write files.content.read files.content.write sharing.read sharing.write account_info.read",managed:!0,tokenAuthMethod:"body",tokenContentType:"form"},systemSpecificInstructions:"Uses the superglue managed Dropbox OAuth app. Downloads and uploads use https://content.dropboxapi.com/2 with arguments in the Dropbox-API-Arg header.",keywords:["files","folders","upload","download","sharing","links","metadata","search","sync","paper","users","teams","move","copy","delete","oauth"]},mailchimp:{name:"mailchimp",apiUrl:"https://api.mailchimp.com",regex:"^.*mailchimp.*$",icon:"mailchimp",docsUrl:"https://mailchimp.com/developer/marketing/api",openApiUrl:"https://api.mailchimp.com/schema/3.0/Swagger.json",preferredAuthType:"api_key",oauth:{authUrl:"https://login.mailchimp.com/oauth2/authorize",tokenUrl:"https://login.mailchimp.com/oauth2/token",scopes:"audiences:read audiences:write automations:read automations:write campaigns:read campaigns:write conversations:read conversations:write ecommerce:read ecommerce:write files:read files:write lists:read lists:write reports:read templates:read templates:write"},keywords:["lists","campaigns","templates","audiences","members","segments","tags","automations","reports","folders","merge fields","activities","ecommerce","batch","query","api key"]},jira:{name:"jira",label:"Jira",apiUrl:"https://{your-domain}.atlassian.net/rest/api",extraApiUrls:["https://api.atlassian.com/ex/jira","https://api.atlassian.com/oauth/token/accessible-resources"],regex:"^.*(jira|atlassian).*$",icon:"jira",docsUrl:"https://developer.atlassian.com/cloud/jira/platform/rest/v3",openApiUrl:"https://developer.atlassian.com/cloud/jira/platform/swagger-v3.json",readOperations:Cwe,preferredAuthType:"oauth2",oauth:{authUrl:"https://auth.atlassian.com/authorize",tokenUrl:"https://auth.atlassian.com/oauth/token",scopes:"read:jira-work write:jira-work read:jira-user write:jira-user read:jira-work-management write:jira-work-management read:servicedesk-request write:servicedesk-request manage:jira-project manage:jira-configuration manage:jira-data-provider offline_access",managed:!0},systemSpecificInstructions:"OAuth access tokens only work against https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3; get the cloud id from GET https://api.atlassian.com/oauth/token/accessible-resources. The /rest/api/3/search endpoint has been deprecated - Use GET /rest/api/3/search/jql with query parameter 'jql' for searching issues. MUST specify a project in the JQL query. Example: GET /rest/api/3/search/jql?jql=project=KAN&maxResults=100. The jql parameter accepts JQL queries like 'project=KEY', 'assignee=currentUser()', 'order by created DESC'. Always URL-encode the jql parameter value.",keywords:["issues","projects","boards","sprints","epics","users","workflows","fields","components","versions","priorities","statuses","comments","attachments","jql","query","search","oauth"]},confluence:{name:"confluence",apiUrl:"https://{your-domain}.atlassian.net/wiki/api/v2",regex:"^.*(confluence|atlassian).*$",icon:"confluence",docsUrl:"https://developer.atlassian.com/cloud/confluence/rest/v2",openApiUrl:"https://dac-static.atlassian.com/cloud/confluence/openapi-v2.v3.json",preferredAuthType:"oauth2",oauth:{authUrl:"https://auth.atlassian.com/authorize",tokenUrl:"https://auth.atlassian.com/oauth/token",scopes:"read:confluence-content.all write:confluence-content read:confluence-space.summary write:confluence-space read:confluence-props write:confluence-props read:confluence-user write:confluence-user read:confluence-groups write:confluence-groups delete:confluence-content delete:confluence-space offline_access",managed:!0},systemSpecificInstructions:"Use the Confluence Cloud REST API v2 under /wiki/api/v2 instead of legacy /wiki/rest/api v1 endpoints when a v2 equivalent exists. With OAuth 2.0, fetch the cloud id from GET https://api.atlassian.com/oauth/token/accessible-resources and use https://api.atlassian.com/ex/confluence/{cloudId}/wiki/api/v2 as the system base URL. V2 list endpoints use cursor-based pagination; follow the Link header or _links.next URL until no next page remains.",keywords:["spaces","pages","content","attachments","comments","labels","templates","blueprints","macros","restrictions","versions","ancestors","descendants","children","oauth"]},quickbooks:{name:"quickbooks",apiUrl:"https://quickbooks.api.intuit.com",regex:"^(?!.*(sandbox|desktop|qbxml)).*(quickbooks|intuit).*$",readOperations:["POST /v3/company/*/query"],icon:"quickbooks",docsUrl:"https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/account",preferredAuthType:"oauth2",oauth:{authUrl:"https://appcenter.intuit.com/connect/oauth2",tokenUrl:"https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",scopes:"com.intuit.quickbooks.accounting",managed:!0,grant_type:"authorization_code",tokenAuthMethod:"basic_auth",tokenContentType:"form"},keywords:["accounts","invoices","customers","vendors","bills","payments","estimates","purchase orders","sales receipts","credit memos","journal entries","items","tax rates","employees","reports","oauth"],systemSpecificInstructions:"superglue provides a managed Intuit Production OAuth app for live QuickBooks Online companies. Users connect without supplying client credentials. For sandbox companies, use the QuickBooks Sandbox template. Payments or Payroll scopes can cause authorization errors such as access_denied when unavailable to the Intuit app or selected QuickBooks company. Queries (GET or POST /v3/company/{realmId}/query) and batches whose items have only bId and Query are reads that need no grant and run in read-only runs. A batch body with placeholders other than connection secrets, and every other POST, needs a grant."},quickbooks_sandbox:{name:"quickbooks_sandbox",label:"QuickBooks Sandbox",apiUrl:"https://sandbox-quickbooks.api.intuit.com",regex:"^.*(sandbox-quickbooks\\.api\\.intuit\\.com|quickbooks.*sandbox|intuit.*sandbox).*$",readOperations:["POST /v3/company/*/query"],icon:"quickbooks",docsUrl:"https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/account",preferredAuthType:"oauth2",oauth:{authUrl:"https://appcenter.intuit.com/connect/oauth2",tokenUrl:"https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",scopes:"com.intuit.quickbooks.accounting",grant_type:"authorization_code",tokenAuthMethod:"basic_auth",tokenContentType:"form"},keywords:["accounts","invoices","customers","vendors","bills","payments","estimates","purchase orders","sales receipts","credit memos","journal entries","items","tax rates","employees","reports","sandbox","oauth"],systemSpecificInstructions:"Use an Intuit app's Development client ID and client secret. Add the exact superglue OAuth callback URL to that app's Development redirect URIs. This template connects QuickBooks Online sandbox companies only. Payments or Payroll scopes can cause authorization errors such as access_denied when unavailable to the Intuit app or selected QuickBooks company. Queries (GET or POST /v3/company/{realmId}/query) and batches whose items have only bId and Query are reads that need no grant and run in read-only runs. A batch body with placeholders other than connection secrets, and every other POST, needs a grant."},ramp:{name:"ramp",apiUrl:"https://api.ramp.com/developer/v1",regex:"(^|.*\\b)(ramp|ramp\\.com|api\\.ramp\\.com|demo-api\\.ramp\\.com)(\\b.*|$)",icon:"ramp",docsUrl:"https://docs.ramp.com/developer-api/v1",openApiUrl:"https://docs.ramp.com/openapi/developer-api.json",preferredAuthType:"oauth2",oauth:{tokenUrl:"https://api.ramp.com/developer/v1/token",scopes:"transactions:read cards:read users:read business:read bills:read reimbursements:read vendors:read accounting:read receipts:read departments:read locations:read limits:read spend_programs:read statements:read transfers:read bank_accounts:read",grant_type:"client_credentials",tokenAuthMethod:"basic_auth",tokenContentType:"form"},keywords:["transactions","cards","users","business","bills","reimbursements","vendors","accounting","receipts","departments","locations","limits","spend_programs","statements","transfers","bank_accounts"],systemSpecificInstructions:`Ramp has separate production and sandbox API hosts. Production calls use https://api.ramp.com/developer/v1; sandbox calls use https://demo-api.ramp.com/developer/v1. Do not use the Ramp web app hosts (app.ramp.com or demo.ramp.com) for API calls.
1214
1214
 
1215
1215
  Create the developer app from the Ramp dashboard's Developer area with an Admin or Business Owner account, enable the Client Credentials grant for internal server-to-server integrations, configure only the required scopes, and copy the client ID and client secret. Sandbox access is not self-serve; the customer must request a sandbox from Ramp, and sandbox credentials do not work in production.
1216
1216
 
@@ -2251,7 +2251,7 @@ ${s}`;return}if(ZI(e,i,N$e)){O$e(e,o)&&(r.retry=e.toString("utf8",o));return}if(
2251
2251
  `);t.stack=r?`${r}
2252
2252
  ${o}`:i.stack}de.exports.fetch=function(e,r=void 0){return pFe(e,r).catch(n=>{throw RJ?xJ(n,RJ):n&&typeof n=="object"&&Error.captureStackTrace(n,de.exports.fetch),n})};de.exports.Headers=Rl().Headers;de.exports.Response=Of().Response;de.exports.Request=Cd().Request;de.exports.FormData=IE().FormData;var{setGlobalOrigin:fFe,getGlobalOrigin:hFe}=wB();de.exports.setGlobalOrigin=fFe;de.exports.getGlobalOrigin=hFe;var{CacheStorage:gFe}=EW(),{kConstruct:mFe}=It();de.exports.caches=new gFe(mFe);var{deleteCookie:yFe,getCookies:EFe,getSetCookies:IFe,setCookie:CFe,parseCookie:bFe}=RW();de.exports.deleteCookie=yFe;de.exports.getCookies=EFe;de.exports.getSetCookies=IFe;de.exports.setCookie=CFe;de.exports.parseCookie=bFe;var{parseMIMEType:SFe,serializeAMimeType:wFe}=Ci();de.exports.parseMIMEType=SFe;de.exports.serializeAMimeType=wFe;var{CloseEvent:_Fe,ErrorEvent:BFe,MessageEvent:vFe}=LI(),{WebSocket:QFe,ping:TFe}=uJ();de.exports.WebSocket=QFe;de.exports.CloseEvent=_Fe;de.exports.ErrorEvent=BFe;de.exports.MessageEvent=vFe;de.exports.ping=TFe;de.exports.WebSocketStream=yJ().WebSocketStream;de.exports.WebSocketError=iD().WebSocketError;de.exports.request=Gf(Nd.request);de.exports.stream=Gf(Nd.stream);de.exports.pipeline=Gf(Nd.pipeline);de.exports.connect=Gf(Nd.connect);de.exports.upgrade=Gf(Nd.upgrade);de.exports.MockClient=tFe;de.exports.MockCallHistory=rFe;de.exports.MockCallHistoryLog=nFe;de.exports.MockPool=oFe;de.exports.MockAgent=iFe;de.exports.SnapshotAgent=sFe;de.exports.mockErrors=aFe;var{EventSource:DFe}=DJ();de.exports.EventSource=DFe;function RFe(){globalThis.fetch=de.exports.fetch,globalThis.Headers=de.exports.Headers,globalThis.Response=de.exports.Response,globalThis.Request=de.exports.Request,globalThis.FormData=de.exports.FormData,globalThis.WebSocket=de.exports.WebSocket,globalThis.CloseEvent=de.exports.CloseEvent,globalThis.ErrorEvent=de.exports.ErrorEvent,globalThis.MessageEvent=de.exports.MessageEvent,globalThis.EventSource=de.exports.EventSource}de.exports.install=RFe});var PJ=I(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.SuperglueClient=xd.SuperglueHttpError=void 0;var Od=Bn(),In=kw(),kFe=I_(),NFe=W2(),OFe=zi(),aa=GA(),xFe=YA(),Vf=14400*1e3,Yf;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:t}=UJ();Yf=new t({headersTimeout:Vf,bodyTimeout:Vf})}catch{}function MJ(t){if(t?.aborted)throw t.reason??new DOMException("Aborted","AbortError")}var eC=class extends Error{constructor(e,r,n,i){super(e),this.status=r,this.code=n,this.details=i,this.name="SuperglueHttpError"}};xd.SuperglueHttpError=eC;var uD=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 kFe.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;MJ(r);let o=await this.refreshToken();return MJ(r),!o||o===n?i:(i.body?.cancel(),e(o))}isInfrastructureError(e){return(0,OFe.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 restData(...e){return(await this.restRequest(...e)).data}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,l=u=>{let d={Authorization:`Bearer ${u}`,...i};return a&&!c&&e!=="GET"&&(d["Content-Type"]="application/json"),fetch(s,{...o,method:e,headers:d,body:a?c?n:JSON.stringify(n):void 0,signal:o?.signal??AbortSignal.timeout(Vf),...Yf?{dispatcher:Yf}:{}})};return this.sendAuthorized(l,o?.signal)}async sendAuthorized(e,r){let n;try{n=await this.fetchWithAuthRetry(e,r)}catch(i){throw this.isInfrastructureError(i)&&this.onInfrastructureError?.(),i}if(!n.ok)throw await this.buildHttpError(n);return n}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(u=>({...u,contentLength:u.contentLength??this.getUploadContentLength(u.content)})),o=(await this.restRequest("POST","/v1/files/uploads",{process:r.process,...r.allowUnprocessed?{allowUnprocessed:!0}:{},files:n.map(({fileName:u,contentType:d,contentLength:A})=>({fileName:u,contentLength:A,...d?{contentType:d}:{}}))})).data.files;if(o.length!==n.length)throw await Promise.all(o.map(u=>this.deleteFileUpload(u.id).catch(()=>{}))),new Error("Upload response did not match the selected files");let s=await Promise.allSettled(o.map(async(u,d)=>{let A=n[d],p=await fetch(u.uploadUrl,{method:"PUT",body:A.content,headers:{...u.uploadHeaders,...A.contentType?{"Content-Type":A.contentType}:{}},signal:AbortSignal.timeout(Math.min(Vf,u.expiresIn*1e3))});if(!p.ok)throw new Error(`Upload failed for ${A.fileName}: ${p.status} ${p.statusText}`);return u.id})),a=s.flatMap(u=>u.status==="fulfilled"?[u.value]:[]),c=new Map;if(a.length>0)try{let u=await this.restRequest("POST","/v1/files/uploads/complete",{fileIds:a});c=new Map(u.data.files.map(d=>[d.id,d]))}catch(u){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:u instanceof Error?u.message:String(u)}]))}let l=o.map((u,d)=>{let A=s[d],p=n[d];return A.status==="rejected"?{id:u.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:A.reason instanceof Error?A.reason.message:String(A.reason)}:c.get(u.id)||{id:u.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:"Upload completion returned no result"}});return await Promise.all(l.filter(u=>u.status==="failed").map(u=>this.deleteFileUpload(u.id).catch(()=>{}))),l}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 eC(n,e.status,i,o)}async streamRequest(e,r,n){let i=e.includes("?")?"&":"?",o=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,s=l=>fetch(o,{method:"POST",headers:{Authorization:`Bearer ${l}`,Accept:"text/event-stream","Content-Type":"application/json"},body:JSON.stringify(r),signal:n??AbortSignal.timeout(Vf),...Yf?{dispatcher:Yf}:{}}),a;try{a=await this.fetchWithAuthRetry(s,n)}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}if(!a.ok)throw await this.buildHttpError(a);if(!(a.headers.get("content-type")||"").includes("text/event-stream")){let l=await a.text();return l?JSON.parse(l):void 0}try{return await(0,NFe.consumeEventStreamResult)(a)}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}}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 this.restData("GET",`/v1/memory-notes${n?`?${n}`:""}`)}async createMemoryNote(e){return this.restData("POST","/v1/memory-notes",e)}async updateMemoryNote(e,r){return this.restData("PATCH",`/v1/memory-notes/${encodeURIComponent(e)}`,r)}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,credentialsList:s,options:a,runId:c,systemIds:l,connectionId:u,systemAuth:d,createRun:A,parentToolId:p,stepIndex:f,stepId:h,signal:C,stream:B}){let T={step:e,payload:r,files:n,previousResults:i,credentials:o,credentialsList:s,options:a,runId:c,systemIds:l,connectionId:u,systemAuth:d,createRun:A,parentToolId:p,stepIndex:f,stepId:h};return B?this.streamRequest("/v1/tools/step/run",T,C):this.restRequest("POST","/v1/tools/step/run",T,void 0,C?{signal:C}: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:l,parentToolId:u,stepId:d,signal:A,stream:p}){let f={outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:l,parentToolId:u,stepId:d};return p?this.streamRequest("/v1/tools/transform/run",f,A):this.restRequest("POST","/v1/tools/transform/run",f,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:l,executionKind:u,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,aa.toUTCISOString)(c,"run.startedAt"),completedAt:(0,aa.toUTCISOString)(l,"run.completedAt"),executionKind:u,parentToolId:d,draftId:A})}async checkRunLimit(){return this.restData("POST","/v1/runs/check-limit")}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:Od.RunStatus.RUNNING,success:Od.RunStatus.SUCCESS,failed:Od.RunStatus.FAILED,aborted:Od.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:r[e.status]??Od.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??Od.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,aa.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,aa.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,aa.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,aa.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let r=(0,In.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,aa.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 getComputeUsage(e){let r=new URLSearchParams({from:(0,aa.toUTCISOString)(e.from,"computeUsage.from"),to:(0,aa.toUTCISOString)(e.to,"computeUsage.to")});return this.restRequest("GET",`/v1/usage/compute?${r.toString()}`,void 0,void 0,{signal:e.signal})}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,In.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,In.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,In.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,In.listAllPages)((r,n)=>this.listProjectSummaries({page:r,limit:n,...e!==void 0?{includeArchived:e}:{}}))}async listAllProjectTasks(e){return(0,In.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 this.restData(r?"PATCH":"POST",i,n)}async listAllProjectLabels(e){return(0,In.listAllPages)((r,n)=>this.restRequest("GET",`/v1/projects/${encodeURIComponent(e)}/labels?page=${r}&limit=${n}`))}async saveProjectLabel({projectId:e,labelId:r,input:n}){let i=`/v1/projects/${encodeURIComponent(e)}/labels${r?`/${encodeURIComponent(r)}`:""}`;return this.restData(r?"PATCH":"POST",i,n)}async deleteProjectLabel({projectId:e,labelId:r}){await this.restRequest("DELETE",`/v1/projects/${encodeURIComponent(e)}/labels/${encodeURIComponent(r)}`)}async listSchedules(e={}){let r=(0,In.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,In.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,xFe.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 listConnections(e={}){let r=(0,In.createListQueryParams)(e);e.systemId!==void 0&&r.set("systemId",e.systemId);let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/connections${n}`)}async listAllConnections(e={}){return(0,In.listAllPages)((r,n)=>this.listConnections({...e,page:r,limit:n}))}async createOAuthApp(e){return this.restData("POST","/v1/oauth-apps",e)}async updateOAuthApp(e,r){return this.restData("PUT",`/v1/oauth-apps/${encodeURIComponent(e)}`,r)}async deleteOAuthApp(e){await this.restRequest("DELETE",`/v1/oauth-apps/${encodeURIComponent(e)}`)}async listOAuthApps({systemId:e}={}){return(0,In.listAllPages)(async(r,n)=>{let i=new URLSearchParams({page:String(r),limit:String(n),...e?{systemId:e}:{}});return this.restRequest("GET",`/v1/oauth-apps?${i}`)})}async getConnectionSetup(e){return this.restData("GET",`/v1/connections/setup/${encodeURIComponent(e)}`)}async createConnection(e){return this.restData("POST","/v1/connections",e)}async replaceConnection(e,r){return this.restData("PUT",`/v1/connections/${encodeURIComponent(e)}`,{credentials:r})}async updateConnection(e,r){return this.restData("PATCH",`/v1/connections/${encodeURIComponent(e)}`,r)}async deleteConnection(e){await this.restRequest("DELETE",`/v1/connections/${encodeURIComponent(e)}`)}async setDefaultConnection(e){await this.restRequest("POST",`/v1/connections/${encodeURIComponent(e)}/default`)}async listSystems(e={}){let r=(0,In.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/systems${n}`)}async listAllSystems(e={}){return(0,In.listAllPages)((r,n)=>this.listSystems({...e,page:r,limit:n}))}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 describeOAuthProviderPage(e){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/provider-page`)).data}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}}}};xd.SuperglueClient=uD});var $J=I(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.UnquotedKeyStrategy=ur.TripleQuoteStrategy=ur.TrailingCommaStrategy=ur.SingleQuoteStrategy=ur.PythonLiteralStrategy=ur.CommentStrategy=ur.ResilientJsonParser=ur.RepairStrategy=void 0;ur.parseJsonResilient=UFe;ur.parseJSON=MFe;var Xi=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};ur.RepairStrategy=Xi;var tC=class extends Xi{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")}"`})}};ur.TripleQuoteStrategy=tC;var rC=class extends Xi{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")}};ur.PythonLiteralStrategy=rC;var nC=class extends Xi{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")}};ur.TrailingCommaStrategy=nC;var iC=class extends Xi{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}};ur.SingleQuoteStrategy=iC;var oC=class extends Xi{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')}};ur.UnquotedKeyStrategy=oC;var sC=class extends Xi{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}};ur.CommentStrategy=sC;var dD=class extends Xi{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`
2253
2253
  `: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}},AD=class extends Xi{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 l=r[c];if(o)s?s=!1:l==="\\"?s=!0:l==='"'&&(o=!1);else if(l==='"')o=!0;else if(l==="{")n++;else if(l==="}"){if(n--,n===0&&i===0&&c>0){a=c;break}}else if(l==="[")i++;else if(l==="]"&&(i--,i===0&&n===0&&c>0)){a=c;break}}return a>0&&a<r.length-1?r.substring(0,a+1):e}},Wf=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 tC,new iC,new dD,new AD,new rC,new nC,new oC,new sC]}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)}};ur.ResilientJsonParser=Wf;var LJ=new Wf;function UFe(t,e){return(e?new Wf(e):LJ).parse(t)}function MFe(t){let e=LJ.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}`)}});var jJ=I(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.MANAGED_OAUTH_APP_PREFIX=void 0;Qr.projectOAuthAppAuthentication=$Fe;Qr.withoutOAuthAppOwnedFields=FFe;Qr.hasOAuthClientChanged=jFe;Qr.isDynamicOAuthConfiguration=zFe;Qr.isReusableOAuthAppForTemplate=qFe;Qr.findOrganizationOAuthApp=HFe;Qr.getManagedOAuthTemplateId=FJ;Qr.getOAuthAppSharedConfiguration=GFe;Qr.copyOAuthAppConfiguration=YFe;Qr.encryptConnectionAuthentication=VFe;Qr.decryptConnectionAuthentication=WFe;Qr.isManagedOAuthEndpointAllowed=JFe;var PFe=kp(),LFe=zi();function $Fe(t){let{clientSecret:e,config:r,...n}=t,{extraHeaders:i,extraBodyParams:o,...s}=r??{};return{...n,...r?{config:s}:{}}}function FFe(t){if(!t.oauthAppId)return t;let{clientId:e,clientSecret:r,tokenUrl:n,...i}=t;return FJ(t)&&n?{...i,tokenUrl:n}:i}function jFe(t,e){return t.type!=="oauth2"?!1:e.type!=="oauth2"?!0:t.oauthAppId||e.oauthAppId?t.oauthAppId!==e.oauthAppId:t.clientId!==e.clientId}Qr.MANAGED_OAUTH_APP_PREFIX="managed:";function zFe({authentication:t,template:e}){return t.oauthClientMode==="dynamic"||!!e?.oauth?.registrationUrl&&!t.clientSecret}function qFe({app:t,template:e}){return!e?.oauth?.registrationUrl||!!t.clientSecretHash}function HFe({apps:t,systemId:e,templateId:r}){return t.filter(n=>n.source==="organization"&&(n.systemId===e||r!==void 0&&n.templateId===r)).sort((n,i)=>(n.createdAt??"").localeCompare(i.createdAt??""))[0]}function FJ(t){if(t?.type==="oauth2")return t.oauthAppId?.startsWith(Qr.MANAGED_OAUTH_APP_PREFIX)?t.oauthAppId.slice(Qr.MANAGED_OAUTH_APP_PREFIX.length):void 0}function GFe(t){let{grantType:e,scopes:r,oauthAppId:n,...i}=t;return i}function YFe({appAuthentication:t,authentication:e}){if(e?.type!=="oauth2")return{...t};let r=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...t,...r,config:{...t.config,...e.config}}}function VFe({authentication:t,encrypt:e}){if(t.type!=="oauth2")return t;let r={...t,config:{...t.config}};t.clientSecret!==void 0&&(r.clientSecret=e({value:t.clientSecret}).value);for(let n of["extraHeaders","extraBodyParams"]){let i=t.config?.[n];i!==void 0&&(r.config[n]=e({value:(0,LFe.safeStringify)(i)}).value)}return r}function WFe({authentication:t,decrypt:e}){if(t.type!=="oauth2")return t;let r={...t,config:{...t.config}};t.clientSecret!==void 0&&(r.clientSecret=e({value:t.clientSecret}).value);for(let n of["extraHeaders","extraBodyParams"]){let i=t.config?.[n];typeof i=="string"&&(r.config[n]=JSON.parse(e({value:i}).value))}return r}function JFe({templateId:t,endpoint:e,url:r}){let n=PFe.systems[t]?.oauth,i=n?.[e];if(!n?.managed||!i)return!1;try{let o=new URL(r),s=new URL(i);return o.protocol!=="https:"||o.port||o.username||o.password||o.hash||o.pathname!==s.pathname?!1:o.hostname===s.hostname||(n.managedEndpointHosts??[]).some(a=>a.startsWith("*.")?o.hostname.endsWith(a.slice(1)):o.hostname===a)}catch{return!1}}});var qJ=I(zJ=>{"use strict";Object.defineProperty(zJ,"__esModule",{value:!0})});var tn=I(re=>{"use strict";var ZFe=re&&re.__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]})),he=re&&re.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZFe(e,t,r)};Object.defineProperty(re,"__esModule",{value:!0});re.SSELogSubscriptionManager=re.SuperglueHttpError=re.SuperglueClient=void 0;he(JC(),re);he(WP(),re);he($m(),re);he(sL(),re);he(yL(),re);he(IL(),re);he(_L(),re);he(BL(),re);he(QL(),re);he(Sw(),re);he(t$(),re);he(r$(),re);he(Rg(),re);he(a$(),re);he(c$(),re);he(l$(),re);he(u$(),re);he(kw(),re);he(g$(),re);he(Nw(),re);he(I$(),re);he(Cu(),re);he(v$(),re);he(Ow(),re);he(bF(),re);he(l0(),re);he(p0(),re);he(wF(),re);he(_F(),re);he(vF(),re);he(b1(),re);he(w1(),re);he(_1(),re);he(v1(),re);he(Q1(),re);he(q1(),re);he(z0(),re);he(Ey(),re);he(j0(),re);he(W1(),re);he(Z1(),re);he(Z0(),re);he(o2(),re);he(Fm(),re);he(A2(),re);he(f2(),re);he(jm(),re);he(F0(),re);he(x2(),re);he(U2(),re);he(kp(),re);he($2(),re);he(F2(),re);he(j2(),re);he(H2(),re);he(Y2(),re);he(Bn(),re);he(zi(),re);he(V2(),re);he(u_(),re);he(GA(),re);he(YA(),re);var HJ=PJ();Object.defineProperty(re,"SuperglueClient",{enumerable:!0,get:function(){return HJ.SuperglueClient}});Object.defineProperty(re,"SuperglueHttpError",{enumerable:!0,get:function(){return HJ.SuperglueHttpError}});var KFe=I_();Object.defineProperty(re,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return KFe.SSELogSubscriptionManager}});he($J(),re);he(jJ(),re);he(qJ(),re)});var qC=require("commander");var Cn=De(require("fs")),VJ=De(require("os")),ca=De(require("path")),Jf=De(tn()),GJ=new Set(["runner","builder","admin"]),YJ={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function la(t){let e=ca.join(process.cwd(),".superglue"),r=VJ.homedir();if(!r)return e;let n=ca.join(r,".superglue");return t===!0?e:t===!1?n:Cn.existsSync(ca.join(e,"config.json"))?e:n}function pD(t){return ca.join(la(t),"config.json")}function aC(t){let e=pD(t);if(!Cn.existsSync(e))return{};try{return JSON.parse(Cn.readFileSync(e,"utf-8"))}catch{return{}}}function Ud(t){let e=aC(),r=t.apiKey||(0,Jf.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",n=t.endpoint||(0,Jf.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,Jf.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||n.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),o=(0,Jf.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),s=o&&GJ.has(o)?o:e.preset&&GJ.has(e.preset)?e.preset:"admin";return{...YJ,...e,apiKey:r,endpoint:n,webEndpoint:i,preset:s,output:{...YJ.output,...e.output}}}function cC(t,e){let r=la(e);Cn.existsSync(r)||Cn.mkdirSync(r,{recursive:!0}),Cn.writeFileSync(ca.join(r,"config.json"),JSON.stringify(t,null,2)+`
2254
- `,{mode:384})}function lC(t,e){let r=ca.join(la(e),"drafts");if(Cn.existsSync(r)||Cn.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=ca.resolve(t.output.directory);Cn.existsSync(n)||Cn.mkdirSync(n,{recursive:!0})}}var ID=De(tn());var fD=De(require("readline"));var ZJ=require("child_process"),KJ=require("util");var WJ={name:"@superglue/cli",version:"1.1.261",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 e1e=(0,KJ.promisify)(ZJ.exec),rn=WJ.version;function JJ(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function dC(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=JJ(r[o]||"0"),a=JJ(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 AC(){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 uC=null;function XJ(){we()&&(uC=AC())}async function eZ(){if(!(!we()||!uC)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([uC,t]);e&&dC(rn,e)<0&&(console.error(""),console.error(`${w.cyan}${w.bold} Update available: ${rn} \u2192 ${e}${w.reset}`),console.error(`${w.cyan} Run ${w.bold}sg update${w.reset}${w.cyan} to upgrade${w.reset}`),console.error(""))}catch{}uC=null}}async function tZ(){let t=await AC();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(dC(rn,t)>=0)return{success:!0,message:`Already on latest version (${rn})`};try{return await e1e("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${rn} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var we=()=>process.argv.includes("--table")&&process.stdout.isTTY,Di=()=>process.argv.includes("--full"),w={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 rZ(t,e){let r=e||t;return`\x1B]8;;${t}\x07${w.underline}${w.cyan}${r}${w.reset}\x1B]8;;\x07`}function nZ(){if(!we())return;let t=w.reset,e=w.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(u=>u===" "?" ":"\u2588").join(""),l=i.slice(s+1);console.log(` ${a}${r}${c}${t}${l}`)}),console.log(` ${e} CLI v${rn}${t}`),console.log("")}function dr(t){if(!we())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 ${w.cyan}${e[r++%e.length]}${w.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${w.dim}\u2502${w.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function ge(t){we()?pC(t):console.log(JSON.stringify(t,null,2))}function qe(t,e){we()?(console.log(` ${w.green}\u2713${w.reset} ${t}`),e&&pC(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function U(t,e){we()?(console.error(` ${w.red}\u2717${w.reset} ${t}`),e&&pC(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function Kn(t){we()&&console.log(` ${w.dim}${t}${w.reset}`)}function $l(t){we()&&(console.log(`
2254
+ `,{mode:384})}function lC(t,e){let r=ca.join(la(e),"drafts");if(Cn.existsSync(r)||Cn.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=ca.resolve(t.output.directory);Cn.existsSync(n)||Cn.mkdirSync(n,{recursive:!0})}}var ID=De(tn());var fD=De(require("readline"));var ZJ=require("child_process"),KJ=require("util");var WJ={name:"@superglue/cli",version:"1.1.262",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 e1e=(0,KJ.promisify)(ZJ.exec),rn=WJ.version;function JJ(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function dC(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=JJ(r[o]||"0"),a=JJ(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 AC(){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 uC=null;function XJ(){we()&&(uC=AC())}async function eZ(){if(!(!we()||!uC)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([uC,t]);e&&dC(rn,e)<0&&(console.error(""),console.error(`${w.cyan}${w.bold} Update available: ${rn} \u2192 ${e}${w.reset}`),console.error(`${w.cyan} Run ${w.bold}sg update${w.reset}${w.cyan} to upgrade${w.reset}`),console.error(""))}catch{}uC=null}}async function tZ(){let t=await AC();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(dC(rn,t)>=0)return{success:!0,message:`Already on latest version (${rn})`};try{return await e1e("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${rn} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var we=()=>process.argv.includes("--table")&&process.stdout.isTTY,Di=()=>process.argv.includes("--full"),w={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 rZ(t,e){let r=e||t;return`\x1B]8;;${t}\x07${w.underline}${w.cyan}${r}${w.reset}\x1B]8;;\x07`}function nZ(){if(!we())return;let t=w.reset,e=w.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(u=>u===" "?" ":"\u2588").join(""),l=i.slice(s+1);console.log(` ${a}${r}${c}${t}${l}`)}),console.log(` ${e} CLI v${rn}${t}`),console.log("")}function dr(t){if(!we())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 ${w.cyan}${e[r++%e.length]}${w.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${w.dim}\u2502${w.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function ge(t){we()?pC(t):console.log(JSON.stringify(t,null,2))}function qe(t,e){we()?(console.log(` ${w.green}\u2713${w.reset} ${t}`),e&&pC(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function U(t,e){we()?(console.error(` ${w.red}\u2717${w.reset} ${t}`),e&&pC(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function Kn(t){we()&&console.log(` ${w.dim}${t}${w.reset}`)}function $l(t){we()&&(console.log(`
2255
2255
  ${w.bold}${w.cyan}${t}${w.reset}`),console.log(` ${w.dim}${"\u2500".repeat(t.length)}${w.reset}`))}function mr(t,e,r){if(!we()){console.log(JSON.stringify({success:!0,total:r?.total??t.length,items:t}));return}if(t.length===0){console.log(`
2256
2256
  ${w.dim}0 results${w.reset}
2257
2257
  `);return}let n=e||Object.keys(t[0]),i=Di()?1/0:60,o=n.map(u=>Math.min(i,Math.max(u.length,...t.map(d=>String(d[u]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let s=n.map((u,d)=>`${w.bold}${w.cyan}${u.toUpperCase().padEnd(o[d])}${w.reset}`).join(" ");console.log(` ${s}`);let a=o.map(u=>`${w.dim}${"\u2500".repeat(u)}${w.reset}`).join(`${w.dim}\u2500\u2500${w.reset}`);console.log(` ${a}`);for(let u of t){let d=n.map((A,p)=>{let f=String(u[A]??"").replace(/[\n\r]+/g," ").trim();if(f.length>i){let C=`\u2026 (${f.length})`;f=f.slice(0,Math.max(0,i-C.length))+`${w.dim}${C}${w.reset}`}return A==="status"?`${{success:w.green,running:w.yellow,failed:w.red,aborted:w.red,error:w.red,pending:w.dim}[f.toLowerCase()]||""}${f.padEnd(o[p])}${w.reset}`:f.padEnd(o[p])}).join(" ");console.log(` ${d}`)}let c=r?.total??t.length,l=c===t.length?`${t.length} result${t.length===1?"":"s"}`:`${t.length} of ${c} result${c===1?"":"s"}`;console.log(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superglue/cli",
3
- "version": "1.1.261",
3
+ "version": "1.1.262",
4
4
  "bin": {
5
5
  "sg": "./dist/cli.js"
6
6
  },