@ancha-labs/cli 0.4.4 → 0.4.5

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.
@@ -170,7 +170,7 @@ function connectDefaults(detected) {
170
170
  const started = Array.isArray(detected?.evidence) && detected.evidence.includes("package.json") && /^(?:npm|pnpm) start$/.test(String(detected?.suggestions?.command ?? ""));
171
171
  return started ? { taskInputKind: "command", state: "stateless" } : {};
172
172
  }
173
- var toolNames = { slack: "Slack", "open-meteo": "Open-Meteo", datadog: "Datadog", pagerduty: "PagerDuty", github: "GitHub", "linkedin-ads": "LinkedIn Ads", salesforce: "Salesforce", gong: "Gong", "google-ads": "Google Ads", "chatgpt-ads": "ChatGPT Ads", hubspot: "HubSpot", ga4: "Google Analytics", gmail: "Gmail", "google-drive": "Google Drive", "amazon-s3": "Amazon S3", linear: "Linear", okta: "Okta", stripe: "Stripe", clerk: "Clerk", "better-stack": "Better Stack", notion: "Notion", attio: "Attio", dropbox: "Dropbox", resend: "Resend", "microsoft-word": "Microsoft Word", shopify: "Shopify", lob: "Lob", paypal: "PayPal", jira: "Jira", kalshi: "Kalshi", intercom: "Intercom", zendesk: "Zendesk", "google-calendar": "Google Calendar", twilio: "Twilio", asana: "Asana", discord: "Discord", sentry: "Sentry", airtable: "Airtable" };
173
+ var toolNames = { slack: "Slack", "open-meteo": "Open-Meteo", datadog: "Datadog", pagerduty: "PagerDuty", github: "GitHub", "linkedin-ads": "LinkedIn Ads", salesforce: "Salesforce", gong: "Gong", "google-ads": "Google Ads", "chatgpt-ads": "ChatGPT Ads", hubspot: "HubSpot", ga4: "Google Analytics", gmail: "Gmail", "google-drive": "Google Drive", "amazon-s3": "Amazon S3", linear: "Linear", okta: "Okta", stripe: "Stripe", clerk: "Clerk", "better-stack": "Better Stack", notion: "Notion", attio: "Attio", dropbox: "Dropbox", resend: "Resend", "microsoft-word": "Microsoft Word", shopify: "Shopify", lob: "Lob", paypal: "PayPal", jira: "Jira", kalshi: "Kalshi", intercom: "Intercom", zendesk: "Zendesk", "google-calendar": "Google Calendar", twilio: "Twilio", asana: "Asana", discord: "Discord", sentry: "Sentry", airtable: "Airtable", netsuite: "NetSuite" };
174
174
  var toolName = (name) => toolNames[name] ?? name;
175
175
  var toolLinks = (names) => names.map((name) => `<a class="tool-chip" href="/tools/${encodeURIComponent(name)}" data-nav>${h(toolName(name))}</a>`).join("");
176
176
  var toolDescription = (name) => ({ slack: "Channels, messages and threads", datadog: "Monitors, metrics and logs", pagerduty: "Incidents, on-call and escalation", github: "Repositories, pull requests and deployments" })[name] ?? "API capabilities";
@@ -1589,8 +1589,8 @@ function startHeartbeat(ping, options = {}) {
1589
1589
  }
1590
1590
 
1591
1591
  // frontend/src/tool-meta.ts
1592
- var toolOrder = ["slack", "discord", "github", "linear", "jira", "asana", "notion", "microsoft-word", "airtable", "gmail", "resend", "lob", "twilio", "google-calendar", "google-drive", "dropbox", "amazon-s3", "okta", "clerk", "stripe", "paypal", "shopify", "kalshi", "datadog", "sentry", "better-stack", "pagerduty", "hubspot", "salesforce", "attio", "intercom", "zendesk", "gong", "ga4", "google-ads", "linkedin-ads", "chatgpt-ads", "open-meteo"];
1593
- var toolCategory = { slack: "Team chat", discord: "Community chat", asana: "Projects", airtable: "Databases", sentry: "Errors", github: "Code", gmail: "Email", resend: "Email", "google-drive": "Files", dropbox: "Files", "amazon-s3": "Files", linear: "Issues", okta: "Identity", clerk: "Identity", stripe: "Payments", paypal: "Payments", shopify: "Commerce", lob: "Mail", jira: "Issues", kalshi: "Markets", intercom: "Support", zendesk: "Support", "google-calendar": "Calendar", twilio: "SMS & voice", notion: "Docs", "microsoft-word": "Docs", datadog: "Monitoring", "better-stack": "Uptime", pagerduty: "Incidents", hubspot: "CRM", salesforce: "CRM", attio: "CRM", gong: "Sales calls", ga4: "Analytics", "google-ads": "Ads", "linkedin-ads": "Ads", "chatgpt-ads": "Ads", "open-meteo": "Weather" };
1592
+ var toolOrder = ["slack", "discord", "github", "linear", "jira", "asana", "notion", "microsoft-word", "airtable", "netsuite", "gmail", "resend", "lob", "twilio", "google-calendar", "google-drive", "dropbox", "amazon-s3", "okta", "clerk", "stripe", "paypal", "shopify", "kalshi", "datadog", "sentry", "better-stack", "pagerduty", "hubspot", "salesforce", "attio", "intercom", "zendesk", "gong", "ga4", "google-ads", "linkedin-ads", "chatgpt-ads", "open-meteo"];
1593
+ var toolCategory = { slack: "Team chat", discord: "Community chat", asana: "Projects", airtable: "Databases", netsuite: "Finance", sentry: "Errors", github: "Code", gmail: "Email", resend: "Email", "google-drive": "Files", dropbox: "Files", "amazon-s3": "Files", linear: "Issues", okta: "Identity", clerk: "Identity", stripe: "Payments", paypal: "Payments", shopify: "Commerce", lob: "Mail", jira: "Issues", kalshi: "Markets", intercom: "Support", zendesk: "Support", "google-calendar": "Calendar", twilio: "SMS & voice", notion: "Docs", "microsoft-word": "Docs", datadog: "Monitoring", "better-stack": "Uptime", pagerduty: "Incidents", hubspot: "CRM", salesforce: "CRM", attio: "CRM", gong: "Sales calls", ga4: "Analytics", "google-ads": "Ads", "linkedin-ads": "Ads", "chatgpt-ads": "Ads", "open-meteo": "Weather" };
1594
1594
  var starterCounts = {
1595
1595
  slack: [["users", "Members"], ["channels", "Channels"], ["messages", "Messages"]],
1596
1596
  github: [["repos", "Repositories"], ["pulls", "Pull requests"], ["issues", "Issues"], ["commits", "Commits"]],
@@ -1629,7 +1629,8 @@ var starterCounts = {
1629
1629
  asana: [["projects", "Projects"], ["tasks", "Tasks"], ["subtasks", "Subtasks"], ["comments", "Comments"]],
1630
1630
  discord: [["channels", "Channels"], ["threads", "Threads"], ["messages", "Messages"], ["members", "Members"]],
1631
1631
  sentry: [["projects", "Projects"], ["issues", "Issues"], ["releases", "Releases"], ["members", "Members"]],
1632
- airtable: [["bases", "Bases"], ["tables", "Tables"], ["records", "Records"], ["comments", "Comments"]]
1632
+ airtable: [["bases", "Bases"], ["tables", "Tables"], ["records", "Records"], ["comments", "Comments"]],
1633
+ netsuite: [["customers", "Customers"], ["vendors", "Vendors"], ["transactions", "Transactions"]]
1633
1634
  };
1634
1635
  var list3 = (value) => Array.isArray(value) ? value : [];
1635
1636
  var sum = (values) => values.reduce((total, n) => total + n, 0);
@@ -2164,6 +2165,7 @@ var connectionFields = {
2164
2165
  discord: ["DISCORD_API_URL", "DISCORD_BOT_TOKEN"],
2165
2166
  sentry: ["SENTRY_API_URL", "SENTRY_AUTH_TOKEN"],
2166
2167
  airtable: ["AIRTABLE_API_URL", "AIRTABLE_ENDPOINT_URL", "AIRTABLE_API_KEY"],
2168
+ netsuite: ["NETSUITE_API_URL", "NETSUITE_RECORD_URL", "NETSUITE_SUITEQL_URL", "NETSUITE_ACCOUNT_ID", "NETSUITE_CONSUMER_KEY", "NETSUITE_CONSUMER_SECRET", "NETSUITE_TOKEN_ID", "NETSUITE_TOKEN_SECRET", "NETSUITE_ACCESS_TOKEN"],
2167
2169
  twilio: ["TWILIO_API_URL", "TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"]
2168
2170
  };
2169
2171
  var connectionNote = {
@@ -2182,6 +2184,7 @@ var connectionNote = {
2182
2184
  discord: "Send Authorization: Bot DISCORD_BOT_TOKEN to DISCORD_API_URL plus the path (it ends in /api/v10).",
2183
2185
  sentry: "Call SENTRY_API_URL/api/0/\u2026 with Authorization: Bearer SENTRY_AUTH_TOKEN; lists page through the Link header.",
2184
2186
  airtable: "The airtable.js client reads AIRTABLE_ENDPOINT_URL and AIRTABLE_API_KEY itself. Over HTTP, send AIRTABLE_API_KEY as a Bearer token to AIRTABLE_API_URL (it ends in /v0).",
2187
+ netsuite: "Point the client at NETSUITE_API_URL; use NETSUITE_RECORD_URL for records and NETSUITE_SUITEQL_URL for queries. Send NETSUITE_ACCESS_TOKEN as a Bearer token, or sign TBA requests with HMAC-SHA256 using NETSUITE_ACCOUNT_ID as realm and NETSUITE_CONSUMER_KEY, NETSUITE_CONSUMER_SECRET, NETSUITE_TOKEN_ID and NETSUITE_TOKEN_SECRET. SuiteQL needs Prefer: transient; creates return 204 with a Location header.",
2185
2188
  "google-calendar": 'calendar({ version: "v3", auth }) with GOOGLE_CALENDAR_ACCESS_TOKEN as the OAuth access token, and GOOGLE_CALENDAR_API_URL + "/" as each request\u2019s rootUrl.',
2186
2189
  twilio: "twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, { httpClient }), where the httpClient sends https://api.twilio.com to TWILIO_API_URL, and Verify and Lookup to TWILIO_API_URL plus /verify and /lookups.",
2187
2190
  intercom: "new IntercomClient({ token: INTERCOM_ACCESS_TOKEN, baseUrl: INTERCOM_API_URL }).",
@@ -2190,7 +2193,7 @@ var connectionNote = {
2190
2193
  dropbox: "new Dropbox({ accessToken: DROPBOX_ACCESS_TOKEN, fetch }), where fetch replaces https://api.dropboxapi.com and https://content.dropboxapi.com with DROPBOX_API_URL before sending.",
2191
2194
  "better-stack": "There is no official Uptime SDK: send each request to BETTER_STACK_API_URL plus its /api/v2 or /api/v3 path, with Authorization: Bearer BETTER_STACK_API_TOKEN."
2192
2195
  };
2193
- var awsLabels = { AWS_ENDPOINT_URL_S3: "Endpoint URL", AWS_ACCESS_KEY_ID: "Access key ID", AWS_SECRET_ACCESS_KEY: "Secret access key", AWS_REGION: "Region", OKTA_ORG_URL: "Org URL", OKTA_API_TOKEN: "API token", STRIPE_SECRET_KEY: "Secret key", CLERK_SECRET_KEY: "Secret key", BETTER_STACK_API_TOKEN: "API token", NOTION_TOKEN: "Integration token", SHOPIFY_API_VERSION: "API version", LOB_ASSETS_URL: "Assets URL", PAYPAL_CLIENT_ID: "Client ID", PAYPAL_CLIENT_SECRET: "Client secret", JIRA_BASE_URL: "Site URL", JIRA_EMAIL: "Email", JIRA_API_TOKEN: "API token", KALSHI_API_KEY_ID: "API key ID", KALSHI_PRIVATE_KEY: "Private key", ZENDESK_EMAIL: "Email", ZENDESK_API_TOKEN: "API token", TWILIO_ACCOUNT_SID: "Account SID", TWILIO_AUTH_TOKEN: "Auth token", DISCORD_BOT_TOKEN: "Bot token", SENTRY_AUTH_TOKEN: "Auth token", AIRTABLE_ENDPOINT_URL: "Endpoint URL" };
2196
+ var awsLabels = { AWS_ENDPOINT_URL_S3: "Endpoint URL", AWS_ACCESS_KEY_ID: "Access key ID", AWS_SECRET_ACCESS_KEY: "Secret access key", AWS_REGION: "Region", OKTA_ORG_URL: "Org URL", OKTA_API_TOKEN: "API token", STRIPE_SECRET_KEY: "Secret key", CLERK_SECRET_KEY: "Secret key", BETTER_STACK_API_TOKEN: "API token", NOTION_TOKEN: "Integration token", SHOPIFY_API_VERSION: "API version", LOB_ASSETS_URL: "Assets URL", PAYPAL_CLIENT_ID: "Client ID", PAYPAL_CLIENT_SECRET: "Client secret", JIRA_BASE_URL: "Site URL", JIRA_EMAIL: "Email", JIRA_API_TOKEN: "API token", KALSHI_API_KEY_ID: "API key ID", KALSHI_PRIVATE_KEY: "Private key", ZENDESK_EMAIL: "Email", ZENDESK_API_TOKEN: "API token", TWILIO_ACCOUNT_SID: "Account SID", TWILIO_AUTH_TOKEN: "Auth token", DISCORD_BOT_TOKEN: "Bot token", SENTRY_AUTH_TOKEN: "Auth token", AIRTABLE_ENDPOINT_URL: "Endpoint URL", NETSUITE_RECORD_URL: "Record URL", NETSUITE_SUITEQL_URL: "SuiteQL URL", NETSUITE_ACCOUNT_ID: "Account ID", NETSUITE_CONSUMER_KEY: "Consumer key", NETSUITE_CONSUMER_SECRET: "Consumer secret", NETSUITE_TOKEN_ID: "Token ID", NETSUITE_TOKEN_SECRET: "Token secret" };
2194
2197
  var fields = connectionFields;
2195
2198
  var connectionLabel = (key) => awsLabels[key] ?? (key.endsWith("URL") ? "API URL" : key.endsWith("ENDPOINT") ? "gRPC endpoint" : key.endsWith("FROM_EMAIL") ? "Caller email" : key === "DD_APP_KEY" ? "Application key" : key === "GONG_ACCESS_KEY" ? "Access key" : key.endsWith("SECRET") ? "Access key secret" : key.endsWith("API_KEY") ? "API key" : "Access token");
2196
2199
  function connectionsView(info, mode, tool) {
@@ -2448,7 +2451,7 @@ async function startWorkspace() {
2448
2451
  await load();
2449
2452
  if (result2.state !== "capped") waitForWorkspace();
2450
2453
  }
2451
- var betaNote = () => '<p class="beta-note">Hosted runs of your own agent are in private beta for this workspace. Run <code>ancha run</code> on your computer, or <a href="/account#hosted">request access in Settings</a>.</p>';
2454
+ var betaNote = () => '<p class="beta-note">Run <code>ancha run</code> on your computer, or <a href="/account#hosted">request access in Settings</a>.</p>';
2452
2455
  var poll = (path2) => api(path2, void 0, void 0, true);
2453
2456
  function path() {
2454
2457
  return location.pathname.split("/").filter(Boolean).map(decodeURIComponent);
@@ -2926,7 +2929,7 @@ function renderTools(selected) {
2926
2929
  const row2 = (c) => `<li title="${h(`${c.method} ${c.path}${c.notes ? ` \u2014 ${c.notes}` : ""}`)}"><code>${h(c.method)}</code><span>${h(c.path).replaceAll("/", "/<wbr>")}</span></li>`;
2927
2930
  const endpoints = coverage.length ? `<section class="tool-aside-section"><h2>Endpoints <span>${coverage.length}</span></h2><ul class="cov-list">${sorted.slice(0, 10).map(row2).join("")}</ul>${coverage.length > 10 ? `<details class="cov-more"><summary>All ${coverage.length} endpoints</summary><ul class="cov-list">${sorted.slice(10).map(row2).join("")}</ul></details>` : ""}</section>` : "";
2928
2931
  const connect = env.length ? `<section class="tool-aside-section"><h2>Connect your agent</h2><p>Your agent reads these at start; point your client at the URL instead of the real service.</p><dl class="env-list">${env.map((key) => `<div><dt><code>${h(key)}</code></dt><dd>${h(connectionLabel(key))}</dd></div>`).join("")}</dl>${connectionNote[tool.name] ? `<p class="hint">${h(connectionNote[tool.name])}</p>` : ""}</section>` : "";
2929
- const limits = (d.limitations ?? []).length ? `<section class="tool-aside-section"><h2>Limits</h2><ul class="tool-limits">${(d.limitations ?? []).map((x) => `<li>${h(x)}</li>`).join("")}</ul></section>` : "";
2932
+ const limits = (d.limitations ?? []).length ? `<section class="tool-aside-section"><ul class="tool-limits">${(d.limitations ?? []).map((x) => `<li>${h(x)}</li>`).join("")}</ul></section>` : "";
2930
2933
  const preview = viewMode2() ? waitingForToolPreview() : previewCache.has(tool.name) ? toolView(starterObservation, tool.name, { ...Object.fromEntries(new URLSearchParams(location.search)), baseHref: "/tools/" + enc2(tool.name), embedded: true }) : `<p class="loading" role="status">Loading ${h(toolName(tool.name))}\u2026</p>`;
2931
2934
  shell("tools", `<a class="back" data-nav href="/tools">\u2190 All tools</a><header class="page-head tool-hero"><div class="tool-hero-id">${toolLogo(tool.name)}<div><h1>${h(toolName(tool.name))}</h1><p class="page-meta">${h(toolCategory[tool.name] ?? "Tool")} \xB7 ${h(d.description ?? toolDescription(tool.name))}</p></div></div>${viewMode2() ? "" : '<div class="actions"><a class="button-link primary" data-nav href="/worlds/new">Use in a world</a></div>'}</header><p class="tool-intro">A replica of the ${h(toolName(tool.name))} API with its own data. Every attempt starts from a fresh copy of what is below, and every call your agent makes is recorded.</p>${!viewMode2() && previewCache.has(tool.name) ? starterStats(tool.name) : ""}<div class="tool-page"><section class="tool-main"><h2 class="tool-main-title">Starter data</h2>${preview}</section><aside class="tool-aside">${connect}${endpoints}${limits}</aside></div>`);
2932
2935
  }