@ancha-labs/cli 0.4.30 → 0.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/lib/ancha.mjs +15564 -12544
- package/lib/assets/SKILL.md +10 -9
- package/lib/assets/agents-section.md +10 -9
- package/lib/assets/docs/cloud.md +10 -9
- package/lib/assets/docs/scenes.md +13 -1
- package/lib/assets/docs/setup.md +10 -9
- package/lib/assets/docs/tools.md +2 -0
- package/lib/assets/harbor/companion.mjs +10563 -8371
- package/lib/assets/templates/starter/oracle.mjs +1 -0
- package/lib/assets/templates/starter/tasks.json +1 -0
- package/lib/assets/ui/app.js +17 -7
- package/lib/mcp-entry.mjs +560 -135
- package/lib/worker.mjs +11491 -9076
- package/lib/world-server.mjs +10509 -8321
- package/package.json +1 -1
- package/third-party/QUICKBOOKS-V3-SDK-LICENSE +202 -0
|
@@ -29,6 +29,7 @@ const calls = [
|
|
|
29
29
|
['INTERCOM_API_URL', 'conversations?per_page=1', { ...bearer(env.INTERCOM_ACCESS_TOKEN), Accept: 'application/json' }],
|
|
30
30
|
['TWILIO_API_URL', `2010-04-01/Accounts/${env.TWILIO_ACCOUNT_SID}/Messages.json?PageSize=1`, basic(env.TWILIO_ACCOUNT_SID, env.TWILIO_AUTH_TOKEN)],
|
|
31
31
|
['HUBSPOT_API_URL', 'crm/v3/objects/companies?limit=1', bearer(env.HUBSPOT_ACCESS_TOKEN)],
|
|
32
|
+
['QUICKBOOKS_API_URL', `v3/company/${env.QUICKBOOKS_REALM_ID}/query?${new URLSearchParams({ query: "select * from Invoice where Balance > '0'", minorversion: '75' })}`, { ...bearer(env.QUICKBOOKS_ACCESS_TOKEN), Accept: 'application/json' }],
|
|
32
33
|
['NETSUITE_API_URL', 'services/rest/record/v1/customer?limit=1', bearer(env.NETSUITE_ACCESS_TOKEN)],
|
|
33
34
|
['LINKEDIN_ADS_API_URL', 'rest/adAccounts?q=search', { ...bearer(env.LINKEDIN_ADS_TOKEN), 'LinkedIn-Version': '202610', 'X-Restli-Protocol-Version': '2.0.0' }],
|
|
34
35
|
['GONG_API_URL', 'v2/calls?fromDateTime=2000-01-01T00:00:00Z&toDateTime=2100-01-01T00:00:00Z', basic(env.GONG_ACCESS_KEY, env.GONG_ACCESS_KEY_SECRET)],
|
|
@@ -23,5 +23,6 @@
|
|
|
23
23
|
"paypal": "PayPal: list subscriptions through the native REST API.",
|
|
24
24
|
"kalshi": "Kalshi: read the portfolio balance through the native Trade API.",
|
|
25
25
|
"intercom": "Intercom: list conversations through the native API.",
|
|
26
|
+
"quickbooks": "QuickBooks Online: list the company's open invoices.",
|
|
26
27
|
"twilio": "Twilio: list messages through the native REST API."
|
|
27
28
|
}
|
package/lib/assets/ui/app.js
CHANGED
|
@@ -180,7 +180,7 @@ function connectDefaults(detected) {
|
|
|
180
180
|
const started = Array.isArray(detected?.evidence) && detected.evidence.includes("package.json") && /^(?:npm|pnpm) start$/.test(String(detected?.suggestions?.command ?? ""));
|
|
181
181
|
return started ? { taskInputKind: "command", state: "stateless" } : {};
|
|
182
182
|
}
|
|
183
|
-
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", outlook: "Outlook", 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", "carrier-portal": "Carrier portal" };
|
|
183
|
+
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", outlook: "Outlook", 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", quickbooks: "QuickBooks Online", "carrier-portal": "Carrier portal" };
|
|
184
184
|
var toolName = (name) => toolNames[name] ?? name;
|
|
185
185
|
var toolLinks = (names) => names.map((name) => `<a class="tool-chip" href="/tools/${encodeURIComponent(name)}" data-nav>${h(toolName(name))}</a>`).join("");
|
|
186
186
|
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";
|
|
@@ -200,6 +200,8 @@ function sandboxActivity(o) {
|
|
|
200
200
|
|
|
201
201
|
// frontend/src/tool-logos.ts
|
|
202
202
|
var logos = {
|
|
203
|
+
// Original neutral ledger glyph.
|
|
204
|
+
"quickbooks": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" stroke="#4b5563" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="3" width="21" height="26" rx="2"/><path d="M11 3v26M3 9h6M3 16h6M3 23h6M15 10h8M15 16h8M15 22h8"/></svg>',
|
|
203
205
|
"slack": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#e01e5a" d="M53.841 161.32c0 14.832-11.987 26.82-26.819 26.82S.203 176.152.203 161.32c0-14.831 11.987-26.818 26.82-26.818H53.84zm13.41 0c0-14.831 11.987-26.818 26.819-26.818s26.819 11.987 26.819 26.819v67.047c0 14.832-11.987 26.82-26.82 26.82c-14.83 0-26.818-11.988-26.818-26.82z"/><path fill="#36c5f0" d="M94.07 53.638c-14.832 0-26.82-11.987-26.82-26.819S79.239 0 94.07 0s26.819 11.987 26.819 26.819v26.82zm0 13.613c14.832 0 26.819 11.987 26.819 26.819s-11.987 26.819-26.82 26.819H26.82C11.987 120.889 0 108.902 0 94.069c0-14.83 11.987-26.818 26.819-26.818z"/><path fill="#2eb67d" d="M201.55 94.07c0-14.832 11.987-26.82 26.818-26.82s26.82 11.988 26.82 26.82s-11.988 26.819-26.82 26.819H201.55zm-13.41 0c0 14.832-11.988 26.819-26.82 26.819c-14.831 0-26.818-11.987-26.818-26.82V26.82C134.502 11.987 146.489 0 161.32 0s26.819 11.987 26.819 26.819z"/><path fill="#ecb22e" d="M161.32 201.55c14.832 0 26.82 11.987 26.82 26.818s-11.988 26.82-26.82 26.82c-14.831 0-26.818-11.988-26.818-26.82V201.55zm0-13.41c-14.831 0-26.818-11.988-26.818-26.82c0-14.831 11.987-26.818 26.819-26.818h67.25c14.832 0 26.82 11.987 26.82 26.819s-11.988 26.819-26.82 26.819z"/></svg>',
|
|
204
206
|
"github": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 250"><path fill="#161614" d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0m-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931m6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66m4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08m7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27m9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622m10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868m10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403"/></svg>',
|
|
205
207
|
"datadog": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 275"><path fill="#632ca6" d="m214.434 194.558l-22.796-15.039l-19.016 31.766l-22.118-6.465l-19.474 29.723l.997 9.355l105.89-19.513l-6.15-66.163zm-98.745-28.523l16.99-2.336c2.748 1.235 4.66 1.706 7.956 2.544c5.136 1.334 11.074 2.617 19.872-1.814c2.047-1.015 6.314-4.915 8.038-7.14l69.605-12.624l7.1 85.94l-119.252 21.49zm129.293-30.967l-6.871 1.309L224.91 0L0 26.078l27.71 224.856l26.33-3.822c-2.104-3.002-5.378-6.634-10.967-11.282c-7.752-6.44-5.014-17.384-.436-24.294c6.051-11.674 37.23-26.51 35.463-45.168c-.634-6.785-1.71-15.613-8.011-21.669c-.238 2.514.19 4.928.19 4.928s-2.587-3.3-3.874-7.795c-1.279-1.728-2.285-2.277-3.646-4.583c-.971 2.665-.842 5.757-.842 5.757s-2.116-4.997-2.457-9.216c-1.253 1.887-1.568 5.472-1.568 5.472s-2.747-7.878-2.12-12.124c-1.253-3.692-4.972-11.022-3.922-27.676c6.862 4.807 21.975 3.667 27.861-5.01c1.953-2.876 3.296-10.72-.976-26.182c-2.742-9.912-9.532-24.674-12.18-30.276l-.315.23c1.396 4.512 4.272 13.967 5.378 18.558c3.343 13.907 4.237 18.753 2.669 25.167c-1.335 5.576-4.535 9.22-12.646 13.298c-8.111 4.09-18.879-5.865-19.557-6.414c-7.882-6.28-13.98-16.52-14.658-21.5c-.709-5.446 3.14-8.716 5.079-13.168c-2.777.79-5.87 2.202-5.87 2.202s3.693-3.822 8.245-7.126c1.888-1.248 2.993-2.043 4.98-3.693c-2.876-.047-5.213.035-5.213.035s4.798-2.592 9.77-4.48c-3.637-.159-7.122-.025-7.122-.025S48 36.288 56.454 32.777c5.813-2.384 11.492-1.68 14.684 2.937c4.19 6.046 8.59 9.329 17.915 11.363c5.727-2.54 7.464-3.84 14.66-5.805c6.33-6.966 11.302-7.865 11.302-7.865s-2.466 2.264-3.127 5.818c3.59-2.829 7.524-5.191 7.524-5.191s-1.525 1.878-2.946 4.867l.328.493c4.19-2.514 9.113-4.492 9.113-4.492s-1.408 1.78-3.057 4.081c3.161-.026 9.566.134 12.054.415c14.68.324 17.725-15.674 23.357-17.682c7.053-2.518 10.206-4.043 22.226 7.765c10.31 10.141 18.368 28.281 14.365 32.345c-3.356 3.374-9.973-1.317-17.307-10.456c-3.874-4.841-6.806-10.564-8.18-17.837c-1.157-6.138-5.666-9.696-5.666-9.696s2.613 5.83 2.613 10.965c0 2.808.35 13.299 4.85 19.19c-.445.86-.652 4.258-1.145 4.91c-5.234-6.327-16.477-10.853-18.312-12.188c6.206 5.084 20.468 16.762 25.944 27.961c5.183 10.586 2.13 20.291 4.75 22.8c.748.717 11.144 13.674 13.144 20.183c3.49 11.342.207 23.267-4.358 30.66l-12.754 1.987c-1.866-.518-3.123-.777-4.794-1.744c.924-1.633 2.755-5.701 2.772-6.544l-.72-1.26c-3.97 5.622-10.617 11.082-16.14 14.217c-7.23 4.099-15.562 3.464-20.987 1.788c-15.393-4.746-29.952-15.15-33.463-17.885c0 0-.108 2.181.552 2.674c3.879 4.38 12.772 12.296 21.37 17.82l-18.325 2.017l8.664 67.45c-3.84.548-4.44.82-8.642 1.416c-3.706-13.09-10.793-21.638-18.542-26.618c-6.832-4.392-16.256-5.381-25.274-3.593l-.58.674c6.272-.652 13.675.255 21.28 5.07c7.464 4.721 13.48 16.914 15.696 24.251c2.837 9.381 4.798 19.419-2.838 30.056c-5.429 7.563-21.28 11.74-34.09 2.7c3.421 5.502 8.042 9.998 14.27 10.845c9.243 1.257 18.015-.35 24.053-6.548c5.152-5.3 7.89-16.382 7.17-28.052l8.158-1.183l2.946 20.947L256 242.542zm-82.156-56.885c-.376.859-.972 1.425-.082 4.223l.052.16l.143.363l.371.838c1.602 3.278 3.36 6.366 6.306 7.947q1.14-.196 2.367-.255c2.764-.12 4.509.315 5.61.911c.1-.552.12-1.356.06-2.543c-.216-4.151.821-11.208-7.156-14.923c-3.01-1.395-7.235-.967-8.643.778c.255.034.484.086.666.147c2.133.738.69 1.472.306 2.354m22.364 38.724c-1.045-.58-5.934-.35-9.372.06c-6.548.773-13.618 3.04-15.164 4.25c-2.816 2.177-1.538 5.969.544 7.528c5.835 4.358 10.949 7.282 16.343 6.57c3.313-.437 6.237-5.685 8.306-10.444c1.416-3.278 1.416-6.815-.657-7.964m-57.965-33.59c1.844-1.753-9.195-4.055-17.764 1.789c-6.319 4.31-6.522 13.553-.471 18.792a15 15 0 0 0 1.568 1.188a51 51 0 0 1 6.098-2.423c3.913-1.27 7.17-1.927 9.843-2.277c1.279-1.43 2.769-3.947 2.397-8.508c-.51-6.19-5.191-5.209-1.671-8.56"/></svg>',
|
|
@@ -22059,6 +22061,7 @@ var TOOL_CATALOG = [
|
|
|
22059
22061
|
{ "name": "microsoft-word", "title": "Microsoft Word", "category": "Docs", "description": "Word documents in OneDrive through Microsoft Graph", "version": "Graph v1.0 drive items", "env": ["MICROSOFT_GRAPH_API_URL", "MICROSOFT_GRAPH_ACCESS_TOKEN"], "endpoints": [["GET", "/download/{token}"], ["GET", "/monitor/{token}"], ["GET", "/v1.0/me"], ["GET", "/v1.0/me/drive"], ["GET", "/v1.0/me/drive/items/{item-id}"], ["PATCH", "/v1.0/me/drive/items/{item-id}"], ["DELETE", "/v1.0/me/drive/items/{item-id}"], ["GET", "/v1.0/me/drive/items/{item-id}/children"], ["POST", "/v1.0/me/drive/items/{item-id}/children"], ["GET", "/v1.0/me/drive/items/{item-id}/content"], ["POST", "/v1.0/me/drive/items/{item-id}/copy"], ["POST", "/v1.0/me/drive/items/{item-id}/createLink"], ["POST", "/v1.0/me/drive/items/{item-id}/invite"], ["GET", "/v1.0/me/drive/items/{item-id}/permissions"], ["DELETE", "/v1.0/me/drive/items/{item-id}/permissions/{perm-id}"], ["GET", "/v1.0/me/drive/items/{item-id}/versions"], ["GET", "/v1.0/me/drive/items/{item-id}/versions/{version-id}/content"], ["POST", "/v1.0/me/drive/items/{item-id}/versions/{version-id}/restoreVersion"], ["PUT", "/v1.0/me/drive/items/{parent-id}:/{filename}:/content"], ["GET", "/v1.0/me/drive/recent"], ["GET", "/v1.0/me/drive/root/search(q='{text}')"]] },
|
|
22060
22062
|
{ "name": "airtable", "title": "Airtable", "category": "Databases", "description": "Bases of linked tables: records, views, formulas and comments", "version": "Web API v0", "env": ["AIRTABLE_API_URL", "AIRTABLE_ENDPOINT_URL", "AIRTABLE_API_KEY"], "endpoints": [["GET", "/v0/{baseId}/{tableIdOrName}"], ["POST", "/v0/{baseId}/{tableIdOrName}"], ["PUT", "/v0/{baseId}/{tableIdOrName}"], ["PATCH", "/v0/{baseId}/{tableIdOrName}"], ["DELETE", "/v0/{baseId}/{tableIdOrName}"], ["GET", "/v0/{baseId}/{tableIdOrName}/{recordId}"], ["PUT", "/v0/{baseId}/{tableIdOrName}/{recordId}"], ["PATCH", "/v0/{baseId}/{tableIdOrName}/{recordId}"], ["DELETE", "/v0/{baseId}/{tableIdOrName}/{recordId}"], ["GET", "/v0/{baseId}/{tableIdOrName}/{recordId}/comments"], ["POST", "/v0/{baseId}/{tableIdOrName}/{recordId}/comments"], ["PATCH", "/v0/{baseId}/{tableIdOrName}/{recordId}/comments/{rowCommentId}"], ["DELETE", "/v0/{baseId}/{tableIdOrName}/{recordId}/comments/{rowCommentId}"], ["POST", "/v0/{baseId}/{tableIdOrName}/listRecords"], ["GET", "/v0/meta/bases"], ["GET", "/v0/meta/bases/{baseId}/tables"], ["POST", "/v0/meta/bases/{baseId}/tables"], ["POST", "/v0/meta/bases/{baseId}/tables/{tableId}/fields"], ["PATCH", "/v0/meta/bases/{baseId}/tables/{tableId}/fields/{columnId}"], ["PATCH", "/v0/meta/bases/{baseId}/tables/{tableIdOrName}"], ["GET", "/v0/meta/whoami"]] },
|
|
22061
22063
|
{ "name": "netsuite", "title": "NetSuite", "category": "Finance", "description": "Order to cash and procure to pay: customers, vendors, invoices, payments, bills and SuiteQL", "version": "SuiteTalk REST record v1 and SuiteQL", "env": ["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", "NETSUITE_TOKEN_URL", "NETSUITE_CLIENT_ID", "NETSUITE_CLIENT_SECRET", "NETSUITE_CERTIFICATE_ID", "NETSUITE_PRIVATE_KEY"], "endpoints": [["GET", "/app/login/oauth2/authorize.nl"], ["POST", "/services/mcp/v1/all"], ["POST", "/services/mcp/v1/suiteapp/com.netsuite.mcpstandardtools"], ["GET", "/services/rest/async/v1/job/:id"], ["GET", "/services/rest/async/v1/job/:id/task"], ["GET", "/services/rest/async/v1/job/:id/task/:task"], ["GET", "/services/rest/async/v1/job/:id/task/:task/request"], ["GET", "/services/rest/async/v1/job/:id/task/:task/result"], ["GET", "/services/rest/auth/oauth2/v1/keys"], ["POST", "/services/rest/auth/oauth2/v1/revoke"], ["POST", "/services/rest/auth/oauth2/v1/token"], ["POST", "/services/rest/query/v1/suiteql"], ["GET", "/services/rest/record/v1/:type"], ["POST", "/services/rest/record/v1/:type"], ["POST", "/services/rest/record/v1/:type (Prefer: respond-async)"], ["PUT", "/services/rest/record/v1/:type/:externalId"], ["GET", "/services/rest/record/v1/:type/:id"], ["PATCH", "/services/rest/record/v1/:type/:id"], ["DELETE", "/services/rest/record/v1/:type/:id"], ["GET", "/services/rest/record/v1/:type/:id/:sublist"], ["GET", "/services/rest/record/v1/:type/:id/:sublist/:line"], ["POST", "/services/rest/record/v1/:type/:id/!transform/:target"], ["GET", "/services/rest/record/v1/metadata-catalog"]] },
|
|
22064
|
+
{ "name": "quickbooks", "title": "QuickBooks Online", "category": "Finance", "description": "Small-business books: customers, vendors, items, invoices, payments, bills, expenses, journal entries and reports", "version": "Accounting API v3, minor version 75", "env": ["QUICKBOOKS_API_URL", "QUICKBOOKS_REALM_ID", "QUICKBOOKS_ACCESS_TOKEN", "QUICKBOOKS_REFRESH_TOKEN", "QUICKBOOKS_CLIENT_ID", "QUICKBOOKS_CLIENT_SECRET", "QUICKBOOKS_TOKEN_URL"], "endpoints": [["POST", "/v3/company/{realmId}/{entity}"], ["GET", "/v3/company/{realmId}/{entity}/{id}"], ["POST", "/v3/company/{realmId}/{entity}/{id}/send"], ["POST", "/v3/company/{realmId}/batch"], ["GET", "/v3/company/{realmId}/cdc"], ["GET", "/v3/company/{realmId}/query"], ["POST", "/v3/company/{realmId}/query"], ["GET", "/v3/company/{realmId}/reports/{report}"], ["POST", "/oauth2/v1/tokens/bearer"], ["POST", "/oauth2/v1/tokens/revoke"], ["POST", "/v2/oauth2/tokens/revoke"]] },
|
|
22062
22065
|
{ "name": "carrier-portal", "title": "Carrier portal", "category": "Insurance", "description": "Larchmont Mutual agency website: policy search, documents and underwriting requests", "version": "Agency portal v1", "env": ["CARRIER_PORTAL_URL", "CARRIER_PORTAL_USERNAME", "CARRIER_PORTAL_PASSWORD", "CARRIER_PORTAL_AGENCY_CODE"], "endpoints": [["GET", "/documents/:id/download"], ["GET", "/messages"], ["POST", "/messages"], ["GET", "/policies"], ["GET", "/policies/:number"], ["GET", "/policies/:number/requests/add-vehicle"], ["POST", "/policies/:number/requests/add-vehicle"], ["GET", "/policies/:number/requests/additional-insured"], ["POST", "/policies/:number/requests/additional-insured"], ["GET", "/policies/:number/requests/certificate"], ["POST", "/policies/:number/requests/certificate"], ["GET", "/policies/:number/requests/loss-runs"], ["POST", "/policies/:number/requests/loss-runs"], ["GET", "/policies/:number/requests/mailing-address"], ["POST", "/policies/:number/requests/mailing-address"], ["GET", "/policies/:number/requests/remove-vehicle"], ["POST", "/policies/:number/requests/remove-vehicle"], ["GET", "/requests"], ["GET", "/requests/:reference"], ["GET", "/sign-in"], ["POST", "/sign-in"], ["POST", "/sign-out"], ["GET", "/"]] },
|
|
22063
22066
|
{ "name": "gmail", "title": "Gmail", "category": "Email", "description": "Mailboxes, threads, labels and drafts", "version": "v1", "env": ["GMAIL_API_URL", "GMAIL_ACCESS_TOKEN"], "endpoints": [["GET", "/.well-known/openid-configuration"], ["GET", "/gmail/v1/users/:userId/drafts"], ["POST", "/gmail/v1/users/:userId/drafts"], ["GET", "/gmail/v1/users/:userId/drafts/:id"], ["PUT", "/gmail/v1/users/:userId/drafts/:id"], ["DELETE", "/gmail/v1/users/:userId/drafts/:id"], ["POST", "/gmail/v1/users/:userId/drafts/send"], ["GET", "/gmail/v1/users/:userId/history"], ["GET", "/gmail/v1/users/:userId/labels"], ["POST", "/gmail/v1/users/:userId/labels"], ["GET", "/gmail/v1/users/:userId/labels/:id"], ["PATCH", "/gmail/v1/users/:userId/labels/:id"], ["DELETE", "/gmail/v1/users/:userId/labels/:id"], ["GET", "/gmail/v1/users/:userId/messages"], ["GET", "/gmail/v1/users/:userId/messages/:id"], ["POST", "/gmail/v1/users/:userId/messages/:id/modify"], ["POST", "/gmail/v1/users/:userId/messages/:id/trash"], ["POST", "/gmail/v1/users/:userId/messages/:id/untrash"], ["GET", "/gmail/v1/users/:userId/messages/:messageId/attachments/:id"], ["POST", "/gmail/v1/users/:userId/messages/batchModify"], ["POST", "/gmail/v1/users/:userId/messages/send"], ["GET", "/gmail/v1/users/:userId/profile"], ["GET", "/gmail/v1/users/:userId/settings/filters"], ["POST", "/gmail/v1/users/:userId/settings/filters"], ["GET", "/gmail/v1/users/:userId/settings/filters/:id"], ["DELETE", "/gmail/v1/users/:userId/settings/filters/:id"], ["GET", "/gmail/v1/users/:userId/settings/forwardingAddresses"], ["GET", "/gmail/v1/users/:userId/settings/sendAs"], ["GET", "/gmail/v1/users/:userId/settings/sendAs/:sendAsEmail"], ["POST", "/gmail/v1/users/:userId/stop"], ["GET", "/gmail/v1/users/:userId/threads"], ["GET", "/gmail/v1/users/:userId/threads/:id"], ["POST", "/gmail/v1/users/:userId/threads/:id/modify"], ["POST", "/gmail/v1/users/:userId/threads/:id/trash"], ["POST", "/gmail/v1/users/:userId/threads/:id/untrash"], ["POST", "/gmail/v1/users/:userId/watch"], ["GET", "/oauth2/v2/userinfo"]] },
|
|
22064
22067
|
{ "name": "outlook", "title": "Outlook", "category": "Email", "description": "Mailboxes, conversations, drafts and attachments through Microsoft Graph", "version": "Graph v1.0 mail", "env": ["MICROSOFT_GRAPH_API_URL", "MICROSOFT_GRAPH_ACCESS_TOKEN", "MICROSOFT_GRAPH_TOKEN_URL", "MICROSOFT_GRAPH_CLIENT_ID", "MICROSOFT_GRAPH_CLIENT_SECRET"], "endpoints": [["POST", "/{tenant}/oauth2/v2.0/token"], ["PUT", "/upload/{id}"], ["GET", "/v1.0/me"], ["GET", "/v1.0/me/mailFolders/{id}"], ["POST", "/v1.0/me/mailFolders/{id}"], ["PATCH", "/v1.0/me/mailFolders/{id}"], ["DELETE", "/v1.0/me/mailFolders/{id}"], ["GET", "/v1.0/me/mailFolders/{id}/messages"], ["GET", "/v1.0/me/mailFolders/{id}/messages/delta"], ["GET", "/v1.0/me/messages"], ["POST", "/v1.0/me/messages"], ["GET", "/v1.0/me/messages/{id}"], ["PATCH", "/v1.0/me/messages/{id}"], ["DELETE", "/v1.0/me/messages/{id}"], ["GET", "/v1.0/me/messages/{id}/attachments"], ["POST", "/v1.0/me/messages/{id}/attachments"], ["DELETE", "/v1.0/me/messages/{id}/attachments"], ["POST", "/v1.0/me/messages/{id}/attachments/createUploadSession"], ["POST", "/v1.0/me/messages/{id}/copy"], ["POST", "/v1.0/me/messages/{id}/createForward"], ["POST", "/v1.0/me/messages/{id}/createReply"], ["POST", "/v1.0/me/messages/{id}/createReplyAll"], ["POST", "/v1.0/me/messages/{id}/forward"], ["POST", "/v1.0/me/messages/{id}/move"], ["POST", "/v1.0/me/messages/{id}/reply"], ["POST", "/v1.0/me/messages/{id}/replyAll"], ["POST", "/v1.0/me/messages/{id}/send"], ["POST", "/v1.0/me/sendMail"]] },
|
|
@@ -22111,8 +22114,8 @@ function startHeartbeat(ping, options = {}) {
|
|
|
22111
22114
|
}
|
|
22112
22115
|
|
|
22113
22116
|
// frontend/src/tool-meta.ts
|
|
22114
|
-
var toolOrder = ["slack", "discord", "github", "linear", "jira", "asana", "notion", "microsoft-word", "airtable", "netsuite", "carrier-portal", "gmail", "outlook", "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"];
|
|
22115
|
-
var toolCategory = { slack: "Team chat", discord: "Community chat", asana: "Projects", airtable: "Databases", netsuite: "Finance", "carrier-portal": "Insurance", sentry: "Errors", github: "Code", gmail: "Email", outlook: "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" };
|
|
22117
|
+
var toolOrder = ["slack", "discord", "github", "linear", "jira", "asana", "notion", "microsoft-word", "airtable", "netsuite", "quickbooks", "carrier-portal", "gmail", "outlook", "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"];
|
|
22118
|
+
var toolCategory = { slack: "Team chat", discord: "Community chat", asana: "Projects", airtable: "Databases", netsuite: "Finance", quickbooks: "Finance", "carrier-portal": "Insurance", sentry: "Errors", github: "Code", gmail: "Email", outlook: "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" };
|
|
22116
22119
|
var starterCounts = {
|
|
22117
22120
|
slack: [["users", "Members"], ["channels", "Channels"], ["messages", "Messages"]],
|
|
22118
22121
|
github: [["repos", "Repositories"], ["pulls", "Pull requests"], ["issues", "Issues"], ["commits", "Commits"]],
|
|
@@ -22154,7 +22157,8 @@ var starterCounts = {
|
|
|
22154
22157
|
sentry: [["projects", "Projects"], ["issues", "Issues"], ["releases", "Releases"], ["members", "Members"]],
|
|
22155
22158
|
airtable: [["bases", "Bases"], ["tables", "Tables"], ["records", "Records"], ["comments", "Comments"]],
|
|
22156
22159
|
"carrier-portal": [["policies", "Policies"], ["claims", "Claims"], ["documents", "Documents"], ["requests", "Requests"]],
|
|
22157
|
-
netsuite: [["customers", "Customers"], ["vendors", "Vendors"], ["transactions", "Transactions"]]
|
|
22160
|
+
netsuite: [["customers", "Customers"], ["vendors", "Vendors"], ["transactions", "Transactions"]],
|
|
22161
|
+
quickbooks: [["Customer", "Customers"], ["Vendor", "Vendors"], ["Item", "Items"], ["Account", "Accounts"], ["Invoice", "Invoices"], ["Bill", "Bills"], ["Payment", "Payments"], ["JournalEntry", "Journal entries"]]
|
|
22158
22162
|
};
|
|
22159
22163
|
var list3 = (value) => Array.isArray(value) ? value : [];
|
|
22160
22164
|
var sum = (values) => values.reduce((total, n) => total + n, 0);
|
|
@@ -22180,7 +22184,7 @@ function starterCount(tool, key, state) {
|
|
|
22180
22184
|
}
|
|
22181
22185
|
|
|
22182
22186
|
// frontend/src/generated/coding-agent-skill.ts
|
|
22183
|
-
var codingAgentSkill = "---\nname: ancha\ndescription: Test, debug and fix an AI agent (a Slack bot, a support or on-call agent) against stateful replicas of the tools it uses, built from its production traces, and prove a fix with graded runs in the cloud. Use when asked to test an agent with Ancha, or in a repository that has ancha.yaml.\n---\n\n# Ancha\n\nAncha gives an AI agent the other side of its job: stateful replicas of the tools it uses (Slack, GitHub, Datadog, PagerDuty and more), seeded with one fictional company or rebuilt from a production trace, and checks that grade every attempt from the agent's calls and the world's end state. The verdict comes from the world, not from mocks you wrote yourself. `ancha run --on cloud` runs each attempt on a fresh machine of its own in Ancha's cloud.\n\n## Run the CLI\n\nBefore the CLI is installed, run every command as `npx -y @ancha-labs/cli <command>`. After `npm install -g @ancha-labs/cli` (Node 24 or newer), run `ancha <command>`. Never run `npx` with the bare name `ancha`: that npm name is not this package.\n\nAdd `--json` to every command. Runs print NDJSON events that end with `run_finished`; `ancha traces upload` prints the tests it made. `env list` and `sandbox list` return arrays; trace commands use the fields described in `ancha docs traces`. `ancha schema <kind> --json` prints the JSON Schema of `ancha.yaml`, test files (`scene.yaml`) and these outputs. If your command can time out, give `ancha run` an `--idempotency-key <key>`: running it again with the same key returns the same run instead of starting another.\n\n## First steps\n\n<!-- ancha:first-steps -->\n1. **Install the CLI and sign in.** It needs Node 24 or newer. Approve this computer in the browser, once.\n ```sh\n ancha --version || npm install -g @ancha-labs/cli\n ancha login\n ```\n2. **Set up the project.** Run it in the agent's project: it finds the command that starts the agent and how the agent takes its task, and writes both to `ancha.yaml`. It installs and runs nothing.\n ```sh\n ancha init\n ```\n - To name the command yourself: `ancha init --agent \"<the command that starts your agent>\"`.\n - To name its tools yourself (NetSuite, Slack, ...): `ancha init --tools netsuite,slack`.\n3. **Store the key it needs.** The agent's own model key, read from your shell, never from an argument: it is stored in your workspace and named under `agent.pass_env` in `ancha.yaml`, so the agent gets it in every cloud attempt.\n ```sh\n ancha secrets set ANTHROPIC_API_KEY\n ```\n4. **Upload your agent.** A fresh machine in the cloud installs the project's dependencies and starts the agent once with a task. It says the agent is ready, or shows the end of its log.\n ```sh\n ancha agent upload\n ```\n - The install follows the project's own manifests and lockfiles; `agent.install` in `ancha.yaml` sets the command instead.\n5. **Without production traces.** For an agent that uses NetSuite, `ancha init` writes a NetSuite world of a private-equity portfolio company (four subsidiaries, two currencies, thousands of transactions) and 25 tests: 10 read tasks and 15 write workflows.\n - Your data: `ancha world import netsuite <your exports> --id <id>` reads REST record JSON, SuiteQL results and saved search CSV into `ancha/worlds/<id>.yaml`; check it with `ancha world validate`. To write the seed yourself, `ancha twins seed netsuite` lists its fields.\n - Your evals: `ancha test import <file> --world <id>` (JSONL, JSON, CSV or YAML with a question and an expected answer).\n - One test from a sentence: `ancha test new \"<sentence>\" --world <id>`.\n6. **Upload traces.** A file or a folder of traces, runs that went fine and runs that failed: each trace becomes a test, in `scenes/from-traces/` and in your workspace.\n ```sh\n ancha traces upload ./traces\n ```\n - From Langfuse or LangSmith, with your keys on this computer: `ancha traces upload --from langfuse --limit 50`, or `--from langsmith`.\n - A trace of a run that went wrong can say what went wrong: `ancha traces upload <trace file> --expect \"<what went wrong>\"`, or for a test already made, `ancha pull <test id> --expect \"<what went wrong>\"`.\n - Traces your agent already sent to your workspace: `ancha traces`, then `ancha pull <trace id>`.\n - A test lists what one trace cannot settle: answer with `ancha pull <test id> --answer <question>=<answer>`.\n7. **Point the agent at the test's tools.** In a test, the agent calls Ancha instead of production:\n - Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.\n - Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.\n8. **Run your tests.** Every test, each attempt on a fresh machine. The run grades each attempt check by check and ends with the link to its result.\n ```sh\n ancha run\n ```\n - Your agent and its worlds run in the cloud, each attempt on a fresh machine of its own; a run keeps going when your laptop closes, and its results land in Runs.\n - `--attempts <n>` sets how many attempts each test gets, `--concurrency <n>` how many run at once.\n - `ancha wait <run id>` follows a run again from any terminal; `ancha explain <run id>` shows why a check failed.\n - `ancha status` shows which of these steps your workspace has done.\n9. **Fix the agent and keep the test.** Keep the failing run as the reference, fix the agent, and run again: exit 0 means every check passes and nothing regressed.\n ```sh\n ancha baseline save before --from <run id>\n ancha run --compare before\n ```\n - Commit `scenes/from-traces/` so every run, in CI too, keeps it fixed.\n10. **Run it on this computer.** While you develop, `ancha run --on local` runs the agent and its worlds on this computer, with the same checks.\n ```sh\n ancha run --on local --attempts 1\n ```\n - Here the agent gets the keys in `agent.pass_env` from your shell, and model-graded checks need `OPENROUTER_API_KEY`.\n<!-- /ancha:first-steps -->\n\n## Cloud runs\n\n- `ancha run --on cloud` sends the project as one bundle: the agent's files, without hidden directories, dependencies or credential-like files, and its tests with their worlds and checks, which stay with the grader and never reach the agent. Each attempt's machine installs the dependencies, runs the agent and grades it with the same engine as a run on this computer. `--attempts <n>` sets the attempts per test, `--concurrency <n>` how many run at once.\n- The agent gets the workspace's secrets for the names in `agent.pass_env`, and its network reaches its tools and its model providers. Model-graded checks and the people in a world run on the workspace's model credit.\n- The `run_finished` event carries `url` (the result in the workspace) and `summary`, with `counts` of the attempts: requested, completed, invalid, skipped and cancelled. Interrupting the command stops the following, never the run: `ancha wait <run id>` follows it again, and `--detach` returns once the run is accepted.\n- `ancha explain <run id> --json` shows each failed check: what was expected, what happened, and the calls and world events behind it. Read it before guessing from the code; many bugs only show up with the world's data and timing.\n- When every attempt ended before the agent did anything (it exited within seconds without a call, or its command could not start), the run, `ancha wait` and `ancha explain` say that first: \"Your agent didn't run\", the end of its log once, and the likely fix read from it, such as the `agent.env` line that gives the agent its task under the name it reads. `agentNeverRan` in the JSON carries the same. Make that fix first: the failed checks follow from it, and `ancha explain <run id> --all` lists them.\n- `ancha status --json` shows the workspace's three steps (agent uploaded, tests added, tests run in the cloud) and the next command. In CI, `ANCHA_SERVER_URL` and `ANCHA_API_KEY` replace the login. More: `ancha docs cloud`.\n\n## An app, not a command\n\nIf the AI feature lives inside an app (a web app or API server with its database, workers and scheduled jobs), don't wrap it in `agent.command`. Ancha starts the app once per attempt with `agent.start`, waits for `agent.ready_url`, delivers the tools' events to `agent.url`, and a scene's `world_rules.app_calls` call the app's own routes, such as its cron jobs, at a time. Read `ancha docs apps` before writing `ancha.yaml`. The start script gives the app a clean database, cache and seed every attempt: a new world has new URLs and tokens, and stale rows or sync cursors make an app silently do nothing.\n\n## More from production traces\n\n`ancha traces upload <file or folder> --json` sends the traces to the workspace, which rebuilds each one's world and checks, and writes each test to `scenes/from-traces/<name>/scene.yaml`: runs that went fine and runs that failed. `--from langfuse` or `--from langsmith` takes the newest traces there instead (`--limit`, `--since`), with the keys in this shell. For one trace of a failure, `--expect \"<what went wrong>\"` adds a check for it. A test lists the questions one trace cannot settle, each with the default it uses. Ask the user for the answers; don't guess them. Pass them with `ancha pull <test id> --answer <question>=<value>`. `ancha import --offline <trace file> --json` makes the tests on this computer instead, one per conversation, and uploads nothing; there, `--answer` and `--force` go on the import.\n\nA test from a run that failed should fail the same way production did. If it doesn't, run it on this computer: `ancha traces diff <trace file> latest` shows the calls production made and the attempt didn't, and the import also lists the app's own setup calls, which the start script or an `app_call` has to make.\n\nIf the user's workspace takes traces (their agents send them to it), each trace becomes a test there: `ancha pull --all --json` writes every test that is turned on (`--agent <name>` for one agent's), `ancha traces --failed --json` lists the ones where production failed a check, `ancha traces show <id> --json` previews the test, and `ancha pull <id> --json` writes one, with `--answer` for its questions. Checks you add to a pulled `scene.yaml` stay when you pull a newer version; any other edit stops the pull. More: `ancha docs traces`.\n\n## Other tests\n\nThe starter test `ancha init` writes when `scenes/` holds no tests only proves that the agent reaches each tool. For the agent's real job beyond its traces, `ancha test new \"<the test in one sentence>\" --json` drafts a test with people for the project's world (`ancha init --intent \"<company and scenario>\"` makes the world and a first test). Review its checks before you run it. To write a seed yourself, `ancha twins seed <tool> --json` prints the tool's fields, an example that validates as written, and the checks a test can make on it. More: `ancha docs scenes`.\n\n## The rule\n\nFix the agent, not the tests or their checks. `ancha.yaml` says how to start the agent and give it its task and keys: change it for that, never to make a check pass. The exception is a check that is wrong for the real API, such as a method the official SDK never sends. Then don't quietly edit it: tell the user, show the evidence (the call from `ancha explain`, the vendor's documentation), and change it only with their agreement.\n\nNever give the agent under test the tests, checks, seeds or reference companions (`oracle.mjs`, `null.mjs`), and never point it at a real SaaS API.\n\n## What the agent gets\n\nEach attempt gives the agent its tools as environment variables, with fake credentials that only work against the replicas:\n\n- Slack: `SLACK_API_URL` (ends in `/api/`), `SLACK_BOT_TOKEN`\n- GitHub: `GITHUB_API_URL`, `GITHUB_TOKEN`\n- Datadog: `DATADOG_API_URL`, `DD_API_KEY`, `DD_APP_KEY`\n- PagerDuty: `PAGERDUTY_API_URL`, `PAGERDUTY_API_TOKEN`, `PAGERDUTY_FROM_EMAIL`, `PAGERDUTY_ROUTING_KEY`\n- the same pattern for the other tools in the world; `ANCHA_TASK` carries a command-line task, and `ANCHA_TASK_FILE` names a file holding it. An agent that reads its task under another name gets it with `agent.env: { MY_TASK: \"{{task}}\" }` (`{{task_file}}` for the file); `ancha init` writes that line when it finds the name.\n\n`ancha connect <tool> --lang ts|py` prints the SDK settings. `ancha twins coverage <tool>` lists the endpoints each replica implements.\n\nGoogle clients (`googleapis`, `@googleapis/*`) take the replica's URL in each call's options: `drive.files.list(params, { rootUrl: process.env.GOOGLE_DRIVE_API_URL + '/' })`. A `rootUrl` set on the client keeps only the host; Ancha still routes those calls by their token, but the client sends file uploads to www.googleapis.com.\n\nThe agent's own keys are the names in `agent.pass_env` in `ancha.yaml`, such as `agent.pass_env: [OPENAI_API_KEY]`, and `agent.env` sets fixed values, such as the path of a key file. In the cloud each name comes from the workspace's secrets (`ancha secrets set NAME`). `ancha run --on local` starts the agent on this computer instead, with this computer's network and those names from this shell (or `--pass-env NAME`); `--on docker` seals it in a container (`agent.execution: { mode: container, image: node:24-slim }`, which needs Docker). An agent without its model key stops at its first model call.\n\n## When something fails\n\n- Exit 1: a check failed or the comparison regressed (a single check's drop counts, see `comparison.droppedChecks`). Run `ancha explain <run id> --json`.\n- Exit 2: usage, config, test file or authentication error, or a cancelled cloud run. `AUTH_INVALID` means `ancha login` again or a valid `ANCHA_API_KEY`; `CONFIG_INVALID` naming a workspace secret means `ancha secrets set NAME`. Read the `hint`.\n- Exit 3: infrastructure, or an attempt the harness couldn't run or grade. It counts as invalid, never as a failed check, so it's not the agent's fault; run again, and `ancha agent upload --json` if it repeats.\n- Exit 4, only with `--strict`: an endpoint coverage error or a verdict using simulated tool answers. The summary names the tests, trials and evaluated checks using those answers. `ancha explain` lists endpoint errors; `ancha twins coverage <tool>` shows the endpoint inventory.\n\nRead the error's stable `code` and `message`, then follow its `hint` when provided. More: `ancha docs`, `ancha docs <topic>` for setup, run, traces, explain, compare, scenes, integrations, cloud and playgrounds, and https://docs.ancha.io/coding-agents.\n\nTell the user what you ran, where it ran, the pass rate, the evidence and the result link. Never claim a fix until `ancha run --compare` exits 0.\n";
|
|
22187
|
+
var codingAgentSkill = "---\nname: ancha\ndescription: Test, debug and fix an AI agent (a Slack bot, a support or on-call agent) against stateful replicas of the tools it uses, built from its production traces, and prove a fix with graded runs in the cloud. Use when asked to test an agent with Ancha, or in a repository that has ancha.yaml.\n---\n\n# Ancha\n\nAncha gives an AI agent the other side of its job: stateful replicas of the tools it uses (Slack, GitHub, Datadog, PagerDuty and more), seeded with one fictional company or rebuilt from a production trace, and checks that grade every attempt from the agent's calls and the world's end state. The verdict comes from the world, not from mocks you wrote yourself. `ancha run --on cloud` runs each attempt on a fresh machine of its own in Ancha's cloud.\n\n## Run the CLI\n\nBefore the CLI is installed, run every command as `npx -y @ancha-labs/cli <command>`. After `npm install -g @ancha-labs/cli` (Node 24 or newer), run `ancha <command>`. Never run `npx` with the bare name `ancha`: that npm name is not this package.\n\nAdd `--json` to every command. Runs print NDJSON events that end with `run_finished`; `ancha traces upload` prints the tests it made. `env list` and `sandbox list` return arrays; trace commands use the fields described in `ancha docs traces`. `ancha schema <kind> --json` prints the JSON Schema of `ancha.yaml`, test files (`scene.yaml`) and these outputs. If your command can time out, give `ancha run` an `--idempotency-key <key>`: running it again with the same key returns the same run instead of starting another.\n\n## First steps\n\n<!-- ancha:first-steps -->\n1. **Install the CLI and sign in.** It needs Node 24 or newer. Approve this computer in the browser, once.\n ```sh\n ancha --version || npm install -g @ancha-labs/cli\n ancha login\n ```\n2. **Set up the project.** Run it in the agent's project: it finds the command that starts the agent and how the agent takes its task, and writes both to `ancha.yaml`. It installs and runs nothing.\n ```sh\n ancha init\n ```\n - To name the command yourself: `ancha init --agent \"<the command that starts your agent>\"`.\n - To name its tools yourself (NetSuite, Slack, ...): `ancha init --tools netsuite,slack`.\n3. **Point the agent at Ancha's tools.** In a test, the agent calls Ancha instead of production:\n - Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.\n - Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.\n4. **Store the key it needs.** The agent's own model key, read from your shell, never from an argument: it is stored in your workspace and named under `agent.pass_env` in `ancha.yaml`, so the agent gets it in every cloud attempt.\n ```sh\n ancha secrets set ANTHROPIC_API_KEY\n ```\n5. **Upload your agent.** A fresh machine in the cloud installs the project's dependencies and starts the agent once with a task. It says the agent is ready, or shows the end of its log.\n ```sh\n ancha agent upload\n ```\n - The install follows the project's own manifests and lockfiles; `agent.install` in `ancha.yaml` sets the command instead.\n6. **Without production traces.** For an agent that uses NetSuite, `ancha init` writes a NetSuite world of a private-equity portfolio company (four subsidiaries, two currencies, thousands of transactions) and 25 tests: 10 read tasks and 15 write workflows.\n - Your data: `ancha world import netsuite <your exports> --id <id>` reads REST record JSON, SuiteQL results and saved search CSV into `ancha/worlds/<id>.yaml`; check it with `ancha world validate`. To write the seed yourself, `ancha twins seed netsuite` lists its fields.\n - Your evals: `ancha test import <file>` (JSONL, JSON, CSV or YAML with a question and an expected answer) writes tests for the only world in `ancha/worlds/`, or the one `--world <id>` names; with none, `ancha init --on local --template starter` adds one.\n - One test from a sentence: `ancha test new \"<sentence>\" --world <id>`.\n7. **Upload traces.** A file or a folder of traces, runs that went fine and runs that failed: each trace becomes a test, in `scenes/from-traces/` and in your workspace.\n ```sh\n ancha traces upload ./traces\n ```\n - From Langfuse or LangSmith, with your keys on this computer: `ancha traces upload --from langfuse --limit 50`, or `--from langsmith`.\n - A trace of a run that went wrong can say what went wrong: `ancha traces upload <trace file> --expect \"<what went wrong>\"`, or for a test already made, `ancha pull <test id> --expect \"<what went wrong>\"`.\n - Traces your agent already sent to your workspace: `ancha traces`, then `ancha pull <trace id>`.\n - A test lists what one trace cannot settle: answer with `ancha pull <test id> --answer <question>=<answer>`.\n - A check marked `(optional)` is graded and shown, and the required checks decide the test; `ancha pull <test id> --answer checks.success=\"<end state>\"` makes completing the request decide it too.\n8. **Run your tests.** Every test, each attempt on a fresh machine. The run grades each attempt check by check and ends with the link to its result.\n ```sh\n ancha run\n ```\n - Your agent and its worlds run in the cloud, each attempt on a fresh machine of its own; a run keeps going when your laptop closes, and its results land in Runs.\n - `--attempts <n>` sets how many attempts each test gets, `--concurrency <n>` how many run at once.\n - `ancha wait <run id>` follows a run again from any terminal; `ancha explain <run id>` shows why a check failed.\n - `ancha status` shows which of these steps your workspace has done.\n9. **Fix the agent and keep the test.** Keep the failing run as the reference, fix the agent, and run again: exit 0 means every required check passes and nothing regressed.\n ```sh\n ancha baseline save before --from <run id>\n ancha run --compare before\n ```\n - Commit `scenes/from-traces/` so every run, in CI too, keeps it fixed.\n10. **Run it on this computer.** While you develop, `ancha run --on local` runs the agent and its worlds on this computer, with the same checks.\n ```sh\n ancha run --on local --attempts 1\n ```\n - Here the agent gets the keys in `agent.pass_env` from your shell, and model-graded checks need `OPENROUTER_API_KEY`.\n<!-- /ancha:first-steps -->\n\n## Cloud runs\n\n- `ancha run --on cloud` sends the project as one bundle: the agent's files, without hidden directories, dependencies or credential-like files, and its tests with their worlds and checks, which stay with the grader and never reach the agent. Each attempt's machine installs the dependencies, runs the agent and grades it with the same engine as a run on this computer. `--attempts <n>` sets the attempts per test, `--concurrency <n>` how many run at once.\n- The agent gets the workspace's secrets for the names in `agent.pass_env`, and its network reaches its tools and its model providers. Model-graded checks and the people in a world run on the workspace's model credit.\n- The `run_finished` event carries `url` (the result in the workspace) and `summary`, with `counts` of the attempts: requested, completed, invalid, skipped and cancelled. Interrupting the command stops the following, never the run: `ancha wait <run id>` follows it again, and `--detach` returns once the run is accepted.\n- `ancha explain <run id> --json` shows each failed check: what was expected, what happened, and the calls and world events behind it. Read it before guessing from the code; many bugs only show up with the world's data and timing.\n- When every attempt ended before the agent did anything (it exited within seconds without a call, or its command could not start), the run, `ancha wait` and `ancha explain` say that first: \"Your agent didn't run\", the end of its log once, and the likely fix read from it, such as the `agent.env` line that gives the agent its task under the name it reads. `agentNeverRan` in the JSON carries the same. Make that fix first: the failed checks follow from it, and `ancha explain <run id> --all` lists them.\n- `ancha status --json` shows the workspace's three steps (agent uploaded, tests added, tests run in the cloud) and the next command. In CI, `ANCHA_SERVER_URL` and `ANCHA_API_KEY` replace the login. More: `ancha docs cloud`.\n\n## An app, not a command\n\nIf the AI feature lives inside an app (a web app or API server with its database, workers and scheduled jobs), don't wrap it in `agent.command`. Ancha starts the app once per attempt with `agent.start`, waits for `agent.ready_url`, delivers the tools' events to `agent.url`, and a scene's `world_rules.app_calls` call the app's own routes, such as its cron jobs, at a time. Read `ancha docs apps` before writing `ancha.yaml`. The start script gives the app a clean database, cache and seed every attempt: a new world has new URLs and tokens, and stale rows or sync cursors make an app silently do nothing.\n\n## More from production traces\n\n`ancha traces upload <file or folder> --json` sends the traces to the workspace, which rebuilds each one's world and checks, and writes each test to `scenes/from-traces/<name>/scene.yaml`: runs that went fine and runs that failed. `--from langfuse` or `--from langsmith` takes the newest traces there instead (`--limit`, `--since`), with the keys in this shell. For one trace of a failure, `--expect \"<what went wrong>\"` adds a check for it. A test lists the questions one trace cannot settle, each with the default it uses. Ask the user for the answers; don't guess them. Pass them with `ancha pull <test id> --answer <question>=<value>`. `ancha import --offline <trace file> --json` makes the tests on this computer instead, one per conversation, and uploads nothing; there, `--answer` and `--force` go on the import.\n\nA test from a run that failed should fail the same way production did. If it doesn't, run it on this computer: `ancha traces diff <trace file> latest` shows the calls production made and the attempt didn't, and the import also lists the app's own setup calls, which the start script or an `app_call` has to make.\n\nIf the user's workspace takes traces (their agents send them to it), each trace becomes a test there: `ancha pull --all --json` writes every test that is turned on (`--agent <name>` for one agent's), `ancha traces --failed --json` lists the ones where production failed a check, `ancha traces show <id> --json` previews the test, and `ancha pull <id> --json` writes one, with `--answer` for its questions. Checks you add to a pulled `scene.yaml` stay when you pull a newer version; any other edit stops the pull. More: `ancha docs traces`.\n\n## Other tests\n\nThe starter test `ancha init` writes when `scenes/` holds no tests only proves that the agent reaches each tool. For the agent's real job beyond its traces, `ancha test new \"<the test in one sentence>\" --json` drafts a test with people for the project's world (`ancha init --intent \"<company and scenario>\"` makes the world and a first test). Review its checks before you run it. To write a seed yourself, `ancha twins seed <tool> --json` prints the tool's fields, an example that validates as written, and the checks a test can make on it. More: `ancha docs scenes`.\n\n## The rule\n\nFix the agent, not the tests or their checks. `ancha.yaml` says how to start the agent and give it its task and keys: change it for that, never to make a check pass. The exception is a check that is wrong for the real API, such as a method the official SDK never sends. Then don't quietly edit it: tell the user, show the evidence (the call from `ancha explain`, the vendor's documentation), and change it only with their agreement.\n\nNever give the agent under test the tests, checks, seeds or reference companions (`oracle.mjs`, `null.mjs`), and never point it at a real SaaS API.\n\n## What the agent gets\n\nEach attempt gives the agent its tools as environment variables, with fake credentials that only work against the replicas:\n\n- Slack: `SLACK_API_URL` (ends in `/api/`), `SLACK_BOT_TOKEN`\n- GitHub: `GITHUB_API_URL`, `GITHUB_TOKEN`\n- Datadog: `DATADOG_API_URL`, `DD_API_KEY`, `DD_APP_KEY`\n- PagerDuty: `PAGERDUTY_API_URL`, `PAGERDUTY_API_TOKEN`, `PAGERDUTY_FROM_EMAIL`, `PAGERDUTY_ROUTING_KEY`\n- the same pattern for the other tools in the world; `ANCHA_TASK` carries a command-line task, and `ANCHA_TASK_FILE` names a file holding it. An agent that reads its task under another name gets it with `agent.env: { MY_TASK: \"{{task}}\" }` (`{{task_file}}` for the file); `ancha init` writes that line when it finds the name.\n\n`ancha connect <tool> --lang ts|py` prints the SDK settings. `ancha twins coverage <tool>` lists the endpoints each replica implements.\n\nGoogle clients (`googleapis`, `@googleapis/*`) take the replica's URL in each call's options: `drive.files.list(params, { rootUrl: process.env.GOOGLE_DRIVE_API_URL + '/' })`. A `rootUrl` set on the client keeps only the host; Ancha still routes those calls by their token, but the client sends file uploads to www.googleapis.com.\n\nThe agent's own keys are the names in `agent.pass_env` in `ancha.yaml`, such as `agent.pass_env: [OPENAI_API_KEY]`, and `agent.env` sets fixed values, such as the path of a key file. In the cloud each name comes from the workspace's secrets (`ancha secrets set NAME`). `ancha run --on local` starts the agent on this computer instead, with this computer's network and those names from this shell (or `--pass-env NAME`); `--on docker` seals it in a container (`agent.execution: { mode: container, image: node:24-slim }`, which needs Docker). An agent without its model key stops at its first model call.\n\n## When something fails\n\n- Exit 1: a check failed or the comparison regressed (a single check's drop counts, see `comparison.droppedChecks`). Run `ancha explain <run id> --json`.\n- Exit 2: usage, config, test file or authentication error, or a cancelled cloud run. `AUTH_INVALID` means `ancha login` again or a valid `ANCHA_API_KEY`; `CONFIG_INVALID` naming a workspace secret means `ancha secrets set NAME`. Read the `hint`.\n- Exit 3: infrastructure, or an attempt the harness couldn't run or grade. It counts as invalid, never as a failed check, so it's not the agent's fault; run again, and `ancha agent upload --json` if it repeats.\n- Exit 4, only with `--strict`: an endpoint coverage error or a verdict using simulated tool answers. The summary names the tests, trials and evaluated checks using those answers. `ancha explain` lists endpoint errors; `ancha twins coverage <tool>` shows the endpoint inventory.\n\nRead the error's stable `code` and `message`, then follow its `hint` when provided. More: `ancha docs`, `ancha docs <topic>` for setup, run, traces, explain, compare, scenes, integrations, cloud and playgrounds, and https://docs.ancha.io/coding-agents.\n\nTell the user what you ran, where it ran, the pass rate, the evidence and the result link. Never claim a fix until `ancha run --compare` exits 0.\n";
|
|
22184
22188
|
|
|
22185
22189
|
// frontend/src/workspace-pages.ts
|
|
22186
22190
|
var startSentence = "Set up Ancha for this agent: read https://app.ancha.io/llms.txt and follow its first steps.";
|
|
@@ -22712,6 +22716,7 @@ var connectionFields = {
|
|
|
22712
22716
|
sentry: ["SENTRY_API_URL", "SENTRY_AUTH_TOKEN"],
|
|
22713
22717
|
airtable: ["AIRTABLE_API_URL", "AIRTABLE_ENDPOINT_URL", "AIRTABLE_API_KEY"],
|
|
22714
22718
|
"carrier-portal": ["CARRIER_PORTAL_URL", "CARRIER_PORTAL_USERNAME", "CARRIER_PORTAL_PASSWORD", "CARRIER_PORTAL_AGENCY_CODE"],
|
|
22719
|
+
quickbooks: ["QUICKBOOKS_API_URL", "QUICKBOOKS_REALM_ID", "QUICKBOOKS_ACCESS_TOKEN", "QUICKBOOKS_REFRESH_TOKEN", "QUICKBOOKS_CLIENT_ID", "QUICKBOOKS_CLIENT_SECRET", "QUICKBOOKS_TOKEN_URL"],
|
|
22715
22720
|
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", "NETSUITE_TOKEN_URL", "NETSUITE_CLIENT_ID", "NETSUITE_CLIENT_SECRET", "NETSUITE_CERTIFICATE_ID", "NETSUITE_PRIVATE_KEY"],
|
|
22716
22721
|
twilio: ["TWILIO_API_URL", "TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"]
|
|
22717
22722
|
};
|
|
@@ -22732,6 +22737,7 @@ var connectionNote = {
|
|
|
22732
22737
|
sentry: "Call SENTRY_API_URL/api/0/\u2026 with Authorization: Bearer SENTRY_AUTH_TOKEN; lists page through the Link header.",
|
|
22733
22738
|
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).",
|
|
22734
22739
|
"carrier-portal": "Open CARRIER_PORTAL_URL in a browser. Sign in with CARRIER_PORTAL_AGENCY_CODE, CARRIER_PORTAL_USERNAME and CARRIER_PORTAL_PASSWORD, then use Policy search, My requests and Messages.",
|
|
22740
|
+
quickbooks: "Build requests from QUICKBOOKS_API_URL + /v3/company/ + QUICKBOOKS_REALM_ID with Authorization: Bearer QUICKBOOKS_ACCESS_TOKEN and Accept: application/json; refresh tokens at QUICKBOOKS_TOKEN_URL.",
|
|
22735
22741
|
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. For OAuth 2.0, get tokens from NETSUITE_TOKEN_URL: client credentials with a JWT signed by NETSUITE_PRIVATE_KEY (kid NETSUITE_CERTIFICATE_ID, iss NETSUITE_CLIENT_ID), or the authorization code grant with NETSUITE_CLIENT_ID and NETSUITE_CLIENT_SECRET. SuiteQL needs Prefer: transient; creates return 204 with a Location header.",
|
|
22736
22742
|
"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.',
|
|
22737
22743
|
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.",
|
|
@@ -22742,7 +22748,7 @@ var connectionNote = {
|
|
|
22742
22748
|
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.",
|
|
22743
22749
|
"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."
|
|
22744
22750
|
};
|
|
22745
|
-
var awsLabels = { CARRIER_PORTAL_URL: "Portal URL", CARRIER_PORTAL_USERNAME: "Username", CARRIER_PORTAL_PASSWORD: "Password", CARRIER_PORTAL_AGENCY_CODE: "Agency code", 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" };
|
|
22751
|
+
var awsLabels = { QUICKBOOKS_REALM_ID: "Realm ID", QUICKBOOKS_REFRESH_TOKEN: "Refresh token", QUICKBOOKS_CLIENT_ID: "Client ID", QUICKBOOKS_CLIENT_SECRET: "Client secret", QUICKBOOKS_TOKEN_URL: "Token URL", CARRIER_PORTAL_URL: "Portal URL", CARRIER_PORTAL_USERNAME: "Username", CARRIER_PORTAL_PASSWORD: "Password", CARRIER_PORTAL_AGENCY_CODE: "Agency code", 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" };
|
|
22746
22752
|
var fields = connectionFields;
|
|
22747
22753
|
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");
|
|
22748
22754
|
function connectionsView(info, mode, tool) {
|
|
@@ -23112,6 +23118,10 @@ function shell(section, content) {
|
|
|
23112
23118
|
const nav2 = (items) => items.map(([id, name]) => `<a href="/${id}" data-nav class="nav-item ${section === id ? "active" : ""}" ${section === id ? 'aria-current="page"' : ""}>${name}</a>`).join("");
|
|
23113
23119
|
root.innerHTML = `<aside class="sidebar"><a href="/worlds" class="brand" data-nav>ancha</a><nav class="app-nav" aria-label="Main navigation">${nav2([["agents", "Agents"], ["playgrounds", "Runs"], ["worlds", "Worlds"], ["tools", "Tools"]])}</nav><div class="workspace"><span id="connection" class="connection warn" role="status"${failedProbes < 2 ? " hidden" : ""}>${failedProbes < 2 ? "" : "Can\u2019t reach the server. Retrying\u2026"}</span><a href="/help" data-nav>Help</a><a href="/settings" data-nav>Settings</a></div></aside><main id="main" tabindex="-1">${content}</main>`;
|
|
23114
23120
|
}
|
|
23121
|
+
function folderWorlds(worlds2) {
|
|
23122
|
+
if (!worlds2.length) return "";
|
|
23123
|
+
return `<section class="k-card" aria-labelledby="folder-worlds-title"><div class="k-card-head"><h2 id="folder-worlds-title">World files in this folder</h2></div><div class="k-scroll" role="region" aria-label="World files in this folder" tabindex="0"><table class="k-table wide"><thead><tr><th scope="col">World</th><th scope="col">Tools</th><th scope="col" class="num">People</th></tr></thead><tbody>${worlds2.map((world) => `<tr><td><span class="k-name">${h(String(world.id))}</span><code class="worlds-path" title="${h(String(world.path))}">${h(String(world.path))}</code>${world.error ? `<p class="error">${h(String(world.error))}</p>` : ""}</td><td>${worldToolsCell(world)}</td><td class="num">${h(world.people ?? "\u2014")}</td></tr>`).join("")}</tbody></table></div></section>`;
|
|
23124
|
+
}
|
|
23115
23125
|
function folderScenes(scenes) {
|
|
23116
23126
|
if (!scenes.length) return "";
|
|
23117
23127
|
return `<section class="k-card" aria-labelledby="folder-scenes-title"><div class="k-card-head"><h2 id="folder-scenes-title">Scenes in this folder</h2></div><div class="k-scroll" role="region" aria-label="Scenes in this folder" tabindex="0"><table class="k-table wide"><thead><tr><th scope="col">Scene</th><th scope="col">Tools</th><th scope="col">Path</th></tr></thead><tbody>${scenes.map((scene) => `<tr><td><a class="k-name" href="/worlds?scene=${enc2(String(scene.key))}" data-nav title="${h(String(scene.title || scene.id))}">${h(String(scene.title || scene.id))}</a></td><td>${worldToolIcons(scene)}</td><td><code class="worlds-path" title="${h(String(scene.path))}">${h(String(scene.path))}</code></td></tr>`).join("")}</tbody></table></div></section>`;
|
|
@@ -23228,7 +23238,7 @@ async function load() {
|
|
|
23228
23238
|
const sampleRun = !p[1] && !ownAgents.length ? ((await api("/playgrounds")).runs ?? []).slice().sort((a, b) => String(a.createdAt).localeCompare(String(b.createdAt)))[0] : void 0;
|
|
23229
23239
|
if (thisGeneration !== generation) return;
|
|
23230
23240
|
if (!p[1]) {
|
|
23231
|
-
document.querySelector("#worlds-page").innerHTML = (ownAgents.length ? "" : startCard(sampleRun?.id, Boolean(boot.hosted))) + worldsTable(worlds, worldTestCounts) + folderScenes(folder.scenes ?? []) + toolsCatalog(staticTools, Object.fromEntries(q), worlds);
|
|
23241
|
+
document.querySelector("#worlds-page").innerHTML = (ownAgents.length ? "" : startCard(sampleRun?.id, Boolean(boot.hosted))) + worldsTable(worlds, worldTestCounts) + folderWorlds(folder.worlds ?? []) + folderScenes(folder.scenes ?? []) + toolsCatalog(staticTools, Object.fromEntries(q), worlds);
|
|
23232
23242
|
bindToolsCatalog();
|
|
23233
23243
|
} else mountWorlds(document.querySelector("#worlds-page"), worlds, toolCatalog, p[1], api, go);
|
|
23234
23244
|
}
|