@ancha-labs/cli 0.4.5 → 0.4.7
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 +3 -1
- package/lib/ancha.mjs +22048 -16473
- package/lib/assets/docs/run.md +1 -1
- package/lib/assets/docs/tools.md +4 -4
- package/lib/assets/harbor/companion.mjs +19319 -13764
- package/lib/assets/ui/app.js +2 -2
- package/lib/mcp-entry.mjs +591 -139
- package/lib/worker.mjs +20017 -14448
- package/lib/world-server.mjs +19368 -13815
- package/package.json +1 -1
package/lib/assets/docs/run.md
CHANGED
|
@@ -20,7 +20,7 @@ agent:
|
|
|
20
20
|
pass_env: [OPENAI_API_KEY] # names only; values come from this shell at run time
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
`--pass-env NAME` (repeatable) adds names for one run. `--inherit-env` passes the whole shell environment, as before 0.1.2, and prints a warning. The run's first line says what the agent got: `running locally; agent not sealed (network open, <n> variables from this shell)`. When an agent crashes, the summary quotes the end of its log, and if the log names a variable this shell has but the agent didn't get, it says so: `OPENROUTER_API_KEY is set in this shell but was withheld from the agent: pass it with --pass-env OPENROUTER_API_KEY or list it under agent.pass_env in ancha.yaml`.
|
|
23
|
+
`--pass-env NAME` (repeatable) adds names for one run. `--inherit-env` passes the whole shell environment, as before 0.1.2, and prints a warning. The run's first line says what the agent got: `running locally; agent not sealed (network open, <n> variables from this shell)`. When an agent crashes (it exits non-zero on its own), its trial fails whatever its checks say, and the summary quotes the end of its log, and if the log names a variable this shell has but the agent didn't get, it says so: `OPENROUTER_API_KEY is set in this shell but was withheld from the agent: pass it with --pass-env OPENROUTER_API_KEY or list it under agent.pass_env in ancha.yaml`.
|
|
24
24
|
|
|
25
25
|
## Agents that wait for people
|
|
26
26
|
|
package/lib/assets/docs/tools.md
CHANGED
|
@@ -45,7 +45,7 @@ Run `ancha connect <tool> --lang ts` for the selected native HTTP setup. Google
|
|
|
45
45
|
|
|
46
46
|
The new tools are LinkedIn Ads (202610), Salesforce (REST v67.0), Gong (v2), Google Ads (v26), ChatGPT Ads (Advertiser API v1), HubSpot (CRM v3), and Google Analytics (Data API v1beta REST). `ancha twins coverage <tool> --json` lists each one's supported operations. Slack, GitHub, Datadog, PagerDuty and Open-Meteo are available too.
|
|
47
47
|
|
|
48
|
-
**NetSuite** (SuiteTalk REST record v1 and SuiteQL): customers, vendors, items, sales orders, invoices, credit memos, customer payments, vendor bills, bill payments and journal entries. 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`. SuiteQL POSTs need `Prefer: transient` and a JSON body containing `q`; record creates return 204 with a `Location` header.
|
|
48
|
+
**NetSuite** (SuiteTalk REST record v1 and SuiteQL): customers, vendors, items, sales orders, invoices, credit memos, customer payments, vendor bills, bill payments and journal entries. 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.
|
|
49
49
|
|
|
50
50
|
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.
|
|
51
51
|
|
|
@@ -53,13 +53,13 @@ One coherent synthetic dataset per tool is the starting point. Reporting data is
|
|
|
53
53
|
|
|
54
54
|
## MCP and fresh attempts
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
`ancha mcp config --env <id> --json` prints the MCP endpoints of a world from `ancha world up`. `configuration.mcpServers` has an HTTP entry per tool (its URL and an `Authorization` header) for Claude Code and the Claude Agent SDK, `clients.openaiAgentsSdk` the same servers for the OpenAI Agents SDK, and `stdioConfiguration` a command entry per tool for hosts that start a process. Merge the entries you need into your MCP host settings; `--tool <name>` prints one tool. No production credential is required.
|
|
57
57
|
|
|
58
|
-
`ancha mcp serve --
|
|
58
|
+
`ancha mcp serve --tool <name>` bridges a tool's endpoint over stdio from the variables an agent gets in a run (`ANCHA_MCP_<TOOL>_URL` and `ANCHA_MCP_<TOOL>_TOKEN`, or `ANCHA_MCP_URL` and `ANCHA_MCP_TOKEN`). Do not append `--json`: stdout is reserved for the protocol. The pinned official TypeScript SDK implements framing and negotiation. `ancha-slack-v1` lists 26 tools for channels, messages, threads, reactions and users: 19 named after Slack API methods (`slack_chat_postMessage`, ...) and 7 under the names Slack's MCP server uses (`slack_send_message`, `slack_read_channel`, ...). These call the same native API and generate the same trace. Native errors return tool errors; nonexistent tools return protocol errors. The profile exposes no reset, destroy, evaluation or arbitrary-URL capability.
|
|
59
59
|
|
|
60
60
|
It supports plain-text message writes. The native Slack API separately supports its documented blocks and HTTP/Socket event delivery in managed trials.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
In a run, each tool with an MCP endpoint gives the agent `ANCHA_MCP_<TOOL>_URL` and `ANCHA_MCP_<TOOL>_TOKEN` (`ANCHA_MCP_SLACK_URL`, ...), also available as `{{<tool>.mcp_url}}` and `{{<tool>.mcp_token}}` in the agent command; managed attempts also get a private `ANCHA_CONNECTION_MANIFEST` path. The agent connects its MCP client to those endpoints or configures a native client. Inspect captured tool activity.
|
|
63
63
|
|
|
64
64
|
**Manage → Create fresh copy** and `sandbox fork <id>` copy the original configuration and seed, excluding exploratory mutations. `--count 10` allocates ten separate worlds; it does not launch agents. For graded repetition, use **Agents → Run scenario** or `ancha agent run` / `ancha test run` with the existing scenario runner. An empty checklist in an exploratory sandbox is never agent success.
|
|
65
65
|
|