@ancha-labs/cli 0.4.36 → 0.4.38

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.
@@ -142,6 +142,31 @@ ancha secrets unset OPENAI_API_KEY
142
142
 
143
143
  Run in the agent's project, `ancha secrets set` also names each one under `agent.pass_env` in `ancha.yaml`. A secret's value has at least 8 characters; shorter settings belong under `agent.env`. A cloud run gives the agent those names with the values they had when the run was accepted, so a later change leaves accepted runs as they were. When the workspace lacks one, the run stops before any machine starts, with `CONFIG_INVALID` and the `ancha secrets set` command to run. Setting and removing secrets takes an admin key; the one `ancha login` saves is.
144
144
 
145
+ ## Tools reached through Composio
146
+
147
+ An agent that runs QuickBooks tools through Composio keeps that path in cloud runs: the agent calls Composio, and Composio's servers call the world's QuickBooks.
148
+
149
+ ```yaml
150
+ agent:
151
+ routes:
152
+ quickbooks: composio
153
+ pass_env: [COMPOSIO_API_KEY]
154
+ ```
155
+
156
+ ```sh
157
+ export COMPOSIO_API_KEY=… # the project's Composio key, from this shell
158
+ ancha secrets set COMPOSIO_API_KEY
159
+ ancha run --on cloud
160
+ ```
161
+
162
+ - Each test's world includes `quickbooks`.
163
+ - Each attempt gives the agent `COMPOSIO_BASE_URL`, Composio's API through the attempt's gateway, and `QUICKBOOKS_PUBLIC_URL`, 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.
164
+ - The agent's Composio client takes `COMPOSIO_BASE_URL` as its base URL, and each QuickBooks execution passes `custom_auth_params` (`customAuthParams` in the TypeScript SDK): `base_url` is `QUICKBOOKS_PUBLIC_URL`, and the two header parameters are `Authorization: Bearer <QUICKBOOKS_ACCESS_TOKEN>` and `x-quickbooks-realm-id: <QUICKBOOKS_REALM_ID>`.
165
+ - Before the agent starts, the attempt checks that `QUICKBOOKS_PUBLIC_URL` answers from outside.
166
+ - The gateway passes QuickBooks executions aimed at this world and Composio's QuickBooks catalog reads, with a user id of the attempt's own (`ancha-…`). Any other Composio call 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
+ - 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 refusals.
169
+
145
170
  ## CI
146
171
 
147
172
  Set two variables; no login or browser is needed:
@@ -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 journal entries. Agents can query the books, read accrual financial and aging reports, retrieve changes through CDC and submit batches. 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}/...`. Send `Accept: application/json` for JSON responses; XML is the default. 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.
91
+ **QuickBooks Online** (Accounting API v3): customers, vendors, accounts, service and non-inventory items, invoices, payments, bills, expenses, credits, deposits, transfers and journal entries. Agents can query the books, read accrual financial and aging reports, retrieve changes through CDC and submit batches. 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}/...`. Responses are JSON; send `Accept: application/xml` for XML. 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