@ancha-labs/cli 0.4.38 → 0.4.40
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/lib/ancha.mjs +5634 -4337
- package/lib/assets/docs/cloud.md +7 -4
- package/lib/assets/docs/tools.md +1 -1
- package/lib/assets/harbor/companion.mjs +3532 -2656
- package/lib/assets/ui/app.js +1243 -1228
- package/lib/mcp-entry.mjs +59 -5
- package/lib/worker.mjs +4528 -3247
- package/lib/world-server.mjs +2230 -1592
- package/package.json +1 -1
package/lib/assets/docs/cloud.md
CHANGED
|
@@ -129,6 +129,8 @@ A run on this computer stays in `.ancha/runs/`; `ancha run --on local --upload`
|
|
|
129
129
|
|
|
130
130
|
## Secrets
|
|
131
131
|
|
|
132
|
+
The workspace machine picks up saved secrets when it starts.
|
|
133
|
+
|
|
132
134
|
The Agent page shows **Code**, the project's Git repository, and **Model key**, the provider key names stored in the workspace or configured under `agent.env`. Key values stay private. With no model key, it shows `ancha secrets set OPENAI_API_KEY`.
|
|
133
135
|
|
|
134
136
|
The agent's own keys, its model provider's for one, live in the workspace:
|
|
@@ -160,12 +162,13 @@ ancha run --on cloud
|
|
|
160
162
|
```
|
|
161
163
|
|
|
162
164
|
- Each test's world includes `quickbooks`.
|
|
163
|
-
- Each attempt
|
|
164
|
-
-
|
|
165
|
+
- The agent keeps its Composio code. Each attempt sets `COMPOSIO_BASE_URL` to Composio's API through the attempt's gateway (the Composio SDKs read it; a client built with an explicit base URL takes this value) and `COMPOSIO_API_KEY` to a key for this attempt; the gateway sends the project's key to Composio. `QUICKBOOKS_PUBLIC_URL` is this world's QuickBooks at an address Composio reaches for this attempt only; `QUICKBOOKS_ACCESS_TOKEN` and `QUICKBOOKS_REALM_ID` are the world's, as in any test with QuickBooks.
|
|
166
|
+
- Direct executions (`tools.execute`) reach the world whatever user ID or connected account the agent names: the gateway supplies the world's address and credentials on each call. An agent that already passes `custom_auth_params` keeps them: `base_url` is `QUICKBOOKS_PUBLIC_URL` with the world's `Authorization` and `x-quickbooks-realm-id` headers.
|
|
167
|
+
- Tool Router sessions reach the world through a QuickBooks connection the attempt creates in the project for its own user (`ancha-…`). Sessions are pinned to it, and the session's MCP URL points at the gateway, so an MCP client in the agent's process reaches the same session. When the attempt ends it deletes the sessions, the connection and its auth config.
|
|
165
168
|
- Before the agent starts, the attempt checks that `QUICKBOOKS_PUBLIC_URL` answers from outside.
|
|
166
|
-
- The gateway
|
|
169
|
+
- The gateway keeps every call on the world: a call that names another toolkit's tools, changes a session's connection, proxies a request or reaches another attempt's session gets `403 COMPOSIO_ROUTE_REFUSED` with a `reason`, and the attempt is invalid with `ROUTE_REFUSED`, so every result rests on calls inside the world.
|
|
167
170
|
- Composio's calls reach the world like the agent's own: the world's trace and the checks see them. An execution with no request reaching the world makes the attempt invalid with `ROUTE_NOT_REACHED`.
|
|
168
|
-
- The summary counts the route under `routes.quickbooks`: executions, how many reached the world, and
|
|
171
|
+
- The summary counts the route under `routes.quickbooks`: executions by path (`via.direct`, `via.session`, `via.mcp`), how many reached the world, refusals, sessions, and the test connection (`connection`, `cleanup`).
|
|
169
172
|
|
|
170
173
|
## CI
|
|
171
174
|
|
package/lib/assets/docs/tools.md
CHANGED
|
@@ -88,7 +88,7 @@ The new tools are LinkedIn Ads (202610), Salesforce (REST v67.0), Gong (v2), Goo
|
|
|
88
88
|
|
|
89
89
|
**NetSuite** (SuiteTalk REST record v1 and SuiteQL): customers, vendors, items, sales orders, invoices, credit memos, customer payments, vendor bills, bill payments and journal entries. Credit preferences govern credit purchases; named A/R and A/P journal lines participate in payments and aging. Select journal credits through a payment’s `credit` sublist, including zero-cash invoice settlement. Run `ancha connect netsuite --lang ts` (or `--lang py`). Point the client at `NETSUITE_API_URL` instead of `https://{account}.suitetalk.api.netsuite.com`; use `NETSUITE_RECORD_URL` for records and `NETSUITE_SUITEQL_URL` for queries. Send `NETSUITE_ACCESS_TOKEN` as a Bearer token, or sign OAuth 1.0 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`: the client credentials grant with a JWT signed by `NETSUITE_PRIVATE_KEY` (ES256, `kid` `NETSUITE_CERTIFICATE_ID`, `iss` `NETSUITE_CLIENT_ID`), or the authorization code grant (PKCE, refresh tokens) with `NETSUITE_CLIENT_ID` and `NETSUITE_CLIENT_SECRET` through `/app/login/oauth2/authorize.nl` on `NETSUITE_API_URL`. SuiteQL POSTs need `Prefer: transient` and a JSON body containing `q`; record creates return 204 with a `Location` header. `Prefer: respond-async` runs a request, or a batch of up to 100 records, as a job: poll `/services/rest/async/v1/job/{id}` until `completed` is true, then read each task's result. Agents that use NetSuite's AI Connector Service get Oracle's 25 MCP Standard Tools (records, record actions, reports, saved searches, SuiteQL, the File Cabinet and session information) at `NETSUITE_API_URL` plus `/services/mcp/v1/all`, with `NETSUITE_ACCESS_TOKEN` or an OAuth 2.0 token issued for the `mcp` scope; `ANCHA_MCP_NETSUITE_URL` and `ANCHA_MCP_NETSUITE_TOKEN` serve the same tools at the world's MCP endpoint.
|
|
90
90
|
|
|
91
|
-
**QuickBooks Online** (Accounting API v3): customers, vendors, accounts, service and non-inventory items, invoices, payments, bills, expenses, credits, deposits, transfers and
|
|
91
|
+
**QuickBooks Online** (Accounting API v3): customers, vendors, accounts, service and non-inventory items, invoices, payments, bills, expenses, credits, deposits, transfers, journal entries, time activities, attachments, tax agencies, tax codes and seeded exchange rates. Agents can upload and download attachments, retrieve transaction PDFs, query the books, read financial, sales and aging reports, retrieve changes through CDC and submit batches. Reports include ProfitAndLoss, ProfitAndLossDetail, BalanceSheet, TrialBalance, GeneralLedger, TransactionList, CashFlow, AccountList, CustomerSales, ItemSales, CustomerIncome, VendorExpenses, ClassSales, DepartmentSales, AgedReceivables, AgedReceivableDetail, AgedPayables, AgedPayableDetail, CustomerBalance, CustomerBalanceDetail, VendorBalance, VendorBalanceDetail and InventoryValuationSummary. Select `accounting_method=Accrual` or `Cash`; use `start_date`, `end_date`, `report_date` or `date_macro` to choose the reporting period. Run `ancha connect quickbooks --lang ts` (or `--lang py`). Point the client at `QUICKBOOKS_API_URL` and send requests to `/v3/company/{QUICKBOOKS_REALM_ID}/...`. Entity and report responses are JSON; send `Accept: application/xml` for XML. Transaction PDF routes return `application/pdf`. Upload attachments to `/upload` with `multipart/form-data`. Write entity bodies with `Content-Type: application/json`; updates take the current `Id` and `SyncToken`, with `sparse: true` to keep omitted fields. Use `QUICKBOOKS_ACCESS_TOKEN` as a Bearer token. Access tokens last one hour on the world's clock. Refresh by POSTing a form to `QUICKBOOKS_TOKEN_URL` with `grant_type=refresh_token` and `refresh_token` set to `QUICKBOOKS_REFRESH_TOKEN`, using HTTP Basic authentication with `QUICKBOOKS_CLIENT_ID` and `QUICKBOOKS_CLIENT_SECRET`; save the returned access and refresh tokens. Intuit and QuickBooks are registered trademarks of Intuit Inc. Ancha is not affiliated with or endorsed by Intuit.
|
|
92
92
|
|
|
93
93
|
Some replicas are measured against their vendor's own OpenAPI description: the official SDK calls every endpoint the replica claims and each response is checked. `ancha twins list --json` gives those replicas a `conformance` object (`claimed`, `exercised`, `sdkCalls`, `sdkFailures`, `mismatches`, `accepted`, and the pinned `source` descriptions); a difference is `accepted` only with a written reason. `ancha twins coverage <tool>` prints the same numbers under its table.
|
|
94
94
|
|