@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
package/lib/assets/SKILL.md
CHANGED
|
@@ -27,20 +27,23 @@ Add `--json` to every command. Runs print NDJSON events that end with `run_finis
|
|
|
27
27
|
```
|
|
28
28
|
- To name the command yourself: `ancha init --agent "<the command that starts your agent>"`.
|
|
29
29
|
- To name its tools yourself (NetSuite, Slack, ...): `ancha init --tools netsuite,slack`.
|
|
30
|
-
3. **
|
|
30
|
+
3. **Point the agent at Ancha's tools.** In a test, the agent calls Ancha instead of production:
|
|
31
|
+
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
32
|
+
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
33
|
+
4. **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.
|
|
31
34
|
```sh
|
|
32
35
|
ancha secrets set ANTHROPIC_API_KEY
|
|
33
36
|
```
|
|
34
|
-
|
|
37
|
+
5. **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.
|
|
35
38
|
```sh
|
|
36
39
|
ancha agent upload
|
|
37
40
|
```
|
|
38
41
|
- The install follows the project's own manifests and lockfiles; `agent.install` in `ancha.yaml` sets the command instead.
|
|
39
|
-
|
|
42
|
+
6. **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.
|
|
40
43
|
- 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.
|
|
41
|
-
- Your evals: `ancha test import <file
|
|
44
|
+
- 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.
|
|
42
45
|
- One test from a sentence: `ancha test new "<sentence>" --world <id>`.
|
|
43
|
-
|
|
46
|
+
7. **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.
|
|
44
47
|
```sh
|
|
45
48
|
ancha traces upload ./traces
|
|
46
49
|
```
|
|
@@ -48,9 +51,7 @@ Add `--json` to every command. Runs print NDJSON events that end with `run_finis
|
|
|
48
51
|
- 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>"`.
|
|
49
52
|
- Traces your agent already sent to your workspace: `ancha traces`, then `ancha pull <trace id>`.
|
|
50
53
|
- A test lists what one trace cannot settle: answer with `ancha pull <test id> --answer <question>=<answer>`.
|
|
51
|
-
|
|
52
|
-
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
53
|
-
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
54
|
+
- 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.
|
|
54
55
|
8. **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.
|
|
55
56
|
```sh
|
|
56
57
|
ancha run
|
|
@@ -59,7 +60,7 @@ Add `--json` to every command. Runs print NDJSON events that end with `run_finis
|
|
|
59
60
|
- `--attempts <n>` sets how many attempts each test gets, `--concurrency <n>` how many run at once.
|
|
60
61
|
- `ancha wait <run id>` follows a run again from any terminal; `ancha explain <run id>` shows why a check failed.
|
|
61
62
|
- `ancha status` shows which of these steps your workspace has done.
|
|
62
|
-
9. **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.
|
|
63
|
+
9. **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.
|
|
63
64
|
```sh
|
|
64
65
|
ancha baseline save before --from <run id>
|
|
65
66
|
ancha run --compare before
|
|
@@ -12,20 +12,23 @@
|
|
|
12
12
|
```
|
|
13
13
|
- To name the command yourself: `ancha init --agent "<the command that starts your agent>"`.
|
|
14
14
|
- To name its tools yourself (NetSuite, Slack, ...): `ancha init --tools netsuite,slack`.
|
|
15
|
-
3. **
|
|
15
|
+
3. **Point the agent at Ancha's tools.** In a test, the agent calls Ancha instead of production:
|
|
16
|
+
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
17
|
+
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
18
|
+
4. **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.
|
|
16
19
|
```sh
|
|
17
20
|
ancha secrets set ANTHROPIC_API_KEY
|
|
18
21
|
```
|
|
19
|
-
|
|
22
|
+
5. **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.
|
|
20
23
|
```sh
|
|
21
24
|
ancha agent upload
|
|
22
25
|
```
|
|
23
26
|
- The install follows the project's own manifests and lockfiles; `agent.install` in `ancha.yaml` sets the command instead.
|
|
24
|
-
|
|
27
|
+
6. **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.
|
|
25
28
|
- 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.
|
|
26
|
-
- Your evals: `ancha test import <file
|
|
29
|
+
- 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.
|
|
27
30
|
- One test from a sentence: `ancha test new "<sentence>" --world <id>`.
|
|
28
|
-
|
|
31
|
+
7. **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.
|
|
29
32
|
```sh
|
|
30
33
|
ancha traces upload ./traces
|
|
31
34
|
```
|
|
@@ -33,9 +36,7 @@
|
|
|
33
36
|
- 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>"`.
|
|
34
37
|
- Traces your agent already sent to your workspace: `ancha traces`, then `ancha pull <trace id>`.
|
|
35
38
|
- A test lists what one trace cannot settle: answer with `ancha pull <test id> --answer <question>=<answer>`.
|
|
36
|
-
|
|
37
|
-
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
38
|
-
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
39
|
+
- 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.
|
|
39
40
|
8. **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.
|
|
40
41
|
```sh
|
|
41
42
|
ancha run
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
- `--attempts <n>` sets how many attempts each test gets, `--concurrency <n>` how many run at once.
|
|
45
46
|
- `ancha wait <run id>` follows a run again from any terminal; `ancha explain <run id>` shows why a check failed.
|
|
46
47
|
- `ancha status` shows which of these steps your workspace has done.
|
|
47
|
-
9. **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.
|
|
48
|
+
9. **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.
|
|
48
49
|
```sh
|
|
49
50
|
ancha baseline save before --from <run id>
|
|
50
51
|
ancha run --compare before
|
package/lib/assets/docs/cloud.md
CHANGED
|
@@ -20,20 +20,23 @@ Without `--on`, a project with `ancha.yaml` (or `--config`) runs in the workspac
|
|
|
20
20
|
```
|
|
21
21
|
- To name the command yourself: `ancha init --agent "<the command that starts your agent>"`.
|
|
22
22
|
- To name its tools yourself (NetSuite, Slack, ...): `ancha init --tools netsuite,slack`.
|
|
23
|
-
3. **
|
|
23
|
+
3. **Point the agent at Ancha's tools.** In a test, the agent calls Ancha instead of production:
|
|
24
|
+
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
25
|
+
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
26
|
+
4. **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.
|
|
24
27
|
```sh
|
|
25
28
|
ancha secrets set ANTHROPIC_API_KEY
|
|
26
29
|
```
|
|
27
|
-
|
|
30
|
+
5. **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.
|
|
28
31
|
```sh
|
|
29
32
|
ancha agent upload
|
|
30
33
|
```
|
|
31
34
|
- The install follows the project's own manifests and lockfiles; `agent.install` in `ancha.yaml` sets the command instead.
|
|
32
|
-
|
|
35
|
+
6. **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.
|
|
33
36
|
- 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.
|
|
34
|
-
- Your evals: `ancha test import <file
|
|
37
|
+
- 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.
|
|
35
38
|
- One test from a sentence: `ancha test new "<sentence>" --world <id>`.
|
|
36
|
-
|
|
39
|
+
7. **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.
|
|
37
40
|
```sh
|
|
38
41
|
ancha traces upload ./traces
|
|
39
42
|
```
|
|
@@ -41,9 +44,7 @@ Without `--on`, a project with `ancha.yaml` (or `--config`) runs in the workspac
|
|
|
41
44
|
- 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>"`.
|
|
42
45
|
- Traces your agent already sent to your workspace: `ancha traces`, then `ancha pull <trace id>`.
|
|
43
46
|
- A test lists what one trace cannot settle: answer with `ancha pull <test id> --answer <question>=<answer>`.
|
|
44
|
-
|
|
45
|
-
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
46
|
-
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
47
|
+
- 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.
|
|
47
48
|
8. **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.
|
|
48
49
|
```sh
|
|
49
50
|
ancha run
|
|
@@ -52,7 +53,7 @@ Without `--on`, a project with `ancha.yaml` (or `--config`) runs in the workspac
|
|
|
52
53
|
- `--attempts <n>` sets how many attempts each test gets, `--concurrency <n>` how many run at once.
|
|
53
54
|
- `ancha wait <run id>` follows a run again from any terminal; `ancha explain <run id>` shows why a check failed.
|
|
54
55
|
- `ancha status` shows which of these steps your workspace has done.
|
|
55
|
-
9. **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.
|
|
56
|
+
9. **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.
|
|
56
57
|
```sh
|
|
57
58
|
ancha baseline save before --from <run id>
|
|
58
59
|
ancha run --compare before
|
|
@@ -31,7 +31,7 @@ A version 2 test names a world (`ancha/worlds/<id>.yaml`: the company, its peopl
|
|
|
31
31
|
{"id": "ar-over-90", "question": "What is AR more than 90 days past due?", "expected": "$48,200.50 across 6 customers", "read_only": true}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
- The question is `question`, `input`, `prompt`, `query` or `task`; the expected answer is `expected`, `answer`, `ideal`, `output`, `reference` or `expected_output`. Optional: `id`, `read_only` (default true; false for an eval with `records`), `must_call` (`"METHOD /path"` or an MCP tool name), `numbers` (`[{ value, tolerance }]`), `contains`, `judge` (a rubric), `tags`, and `records`: the NetSuite state a write leaves, `[{ type, id or externalId, fields }]`. Other fields go in the test's header as comments.
|
|
34
|
+
- The question is `question`, `input`, `prompt`, `query` or `task`; the expected answer is `expected`, `answer`, `ideal`, `output`, `reference` or `expected_output`. Optional: `id`, `read_only` (default true; false for an eval with `records`), `must_call` (`"METHOD /path"` or an MCP tool name), `numbers` (`[{ value, tolerance, label? }]`), `contains`, `judge` (a rubric), `tags`, and `records`: the NetSuite state a write leaves, `[{ type, id or externalId, fields }]`. Other fields go in the test's header as comments.
|
|
35
35
|
- Each eval becomes a test whose task is the question, with an `answer` check: the `numbers` and `contains` it gives, or the numbers, document numbers (`INV-1043`) and quoted text of its expected answer. Numbers the question states and dates are left out. A test also gets `netsuite.unchanged` over every record type when it only reads and the world has NetSuite, a `trace.called` check for each `must_call`, and a `netsuite.record` check for each of its `records`. Write evals can also give `counts: [{type, count}]` and `unchanged: {types, except: [{type, id | externalId}]}` to check record counts and protect other records. `preserved: [{type, id, except_fields: [approvalStatus, status, lastModifiedDate]}]` protects the target record’s other fields. `includeSettlement: true` in a count includes zero-cash settlement records. A record check’s `apply` names the exact applied documents; `credit` names the exact credit sources, both as `[{doc, amount}]` (with `line` for line-level identities). A record named by `externalId` can be one the agent creates:
|
|
36
36
|
|
|
37
37
|
```json
|
|
@@ -42,6 +42,17 @@ A version 2 test names a world (`ancha/worlds/<id>.yaml`: the company, its peopl
|
|
|
42
42
|
- A CSV may name its columns anything, an Excel sheet saved as CSV among them: the import picks the question and expected-answer columns by their names and prints the ones it used, with the format it read.
|
|
43
43
|
- The same file gives the same tests every time. Importing again updates the tests it wrote and keeps any you edited; `--force` replaces those too. `--prefix <p>` puts `<p>-` before every id.
|
|
44
44
|
|
|
45
|
+
When an expected answer states at least two numbers with distinct local names, the import carries those names as labels. For example, `“Prescott Plumbing Supply Corp.” owes USD 383,257.63 against a credit limit of USD 342,000.00` produces this answer check:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
- id: answer
|
|
49
|
+
answer:
|
|
50
|
+
contains: [Prescott Plumbing Supply Corp.]
|
|
51
|
+
numbers:
|
|
52
|
+
- { value: 383257.63, tolerance: 0.005, label: owes }
|
|
53
|
+
- { value: 342000, tolerance: 0.005, label: credit limit }
|
|
54
|
+
```
|
|
55
|
+
|
|
45
56
|
## NetSuite state checks
|
|
46
57
|
|
|
47
58
|
Combine approval, protection of other records, and preservation of the target bill:
|
|
@@ -99,6 +110,7 @@ checks:
|
|
|
99
110
|
not_contains: [I could not]
|
|
100
111
|
```
|
|
101
112
|
|
|
113
|
+
- Each number accepts an optional `label`, trimmed to 1–40 characters, such as `balance` or `credit limit`. Labels catch expected amounts stated directly after the wrong name, such as swapping what a customer owes with its credit limit. Names match whole words without regard to letter case; a correct occurrence under the expected name preserves the number's match.
|
|
102
114
|
- `numbers` reads amounts as people write them: `1,240.00`, `$1,240`, `USD 1240`, `1,240.00 EUR`, `-1,240.00`, and `(1,240.00)` for a negative. A whole number in parentheses with no currency, such as `(5)`, counts as 5 or -5. Digits inside a word or an id (`Q3`, `INV-1043`) belong to that word. Write numbers in plain digits (`1240`, not `1.24e3`).
|
|
103
115
|
- Each number matches within `tolerance`, by default half the last decimal place of `value`: `"1,200.00"` allows ±0.005, `1240.5` ±0.05, `1200` ±0.5. Write `value` as text to keep trailing zeros, or set `tolerance`.
|
|
104
116
|
- An attempt with no final answer fails the check with "no final answer". `answer: {}` passes on any final answer.
|
package/lib/assets/docs/setup.md
CHANGED
|
@@ -18,20 +18,23 @@ Requirements: Node 24 or newer. Install once with `npm install -g @ancha-labs/cl
|
|
|
18
18
|
```
|
|
19
19
|
- To name the command yourself: `ancha init --agent "<the command that starts your agent>"`.
|
|
20
20
|
- To name its tools yourself (NetSuite, Slack, ...): `ancha init --tools netsuite,slack`.
|
|
21
|
-
3. **
|
|
21
|
+
3. **Point the agent at Ancha's tools.** In a test, the agent calls Ancha instead of production:
|
|
22
|
+
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
23
|
+
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
24
|
+
4. **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.
|
|
22
25
|
```sh
|
|
23
26
|
ancha secrets set ANTHROPIC_API_KEY
|
|
24
27
|
```
|
|
25
|
-
|
|
28
|
+
5. **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.
|
|
26
29
|
```sh
|
|
27
30
|
ancha agent upload
|
|
28
31
|
```
|
|
29
32
|
- The install follows the project's own manifests and lockfiles; `agent.install` in `ancha.yaml` sets the command instead.
|
|
30
|
-
|
|
33
|
+
6. **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.
|
|
31
34
|
- 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.
|
|
32
|
-
- Your evals: `ancha test import <file
|
|
35
|
+
- 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.
|
|
33
36
|
- One test from a sentence: `ancha test new "<sentence>" --world <id>`.
|
|
34
|
-
|
|
37
|
+
7. **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.
|
|
35
38
|
```sh
|
|
36
39
|
ancha traces upload ./traces
|
|
37
40
|
```
|
|
@@ -39,9 +42,7 @@ Requirements: Node 24 or newer. Install once with `npm install -g @ancha-labs/cl
|
|
|
39
42
|
- 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>"`.
|
|
40
43
|
- Traces your agent already sent to your workspace: `ancha traces`, then `ancha pull <trace id>`.
|
|
41
44
|
- A test lists what one trace cannot settle: answer with `ancha pull <test id> --answer <question>=<answer>`.
|
|
42
|
-
|
|
43
|
-
- Its clients for Slack, GitHub and the other tools Ancha replicates take the URLs and credentials Ancha supplies: `ancha connect <tool>` prints the settings.
|
|
44
|
-
- Its own functions: wrap them with `wrapTools` from `@ancha-labs/tools` (`ancha.wrap_tools` in Python), or serve them over MCP.
|
|
45
|
+
- 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.
|
|
45
46
|
8. **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.
|
|
46
47
|
```sh
|
|
47
48
|
ancha run
|
|
@@ -50,7 +51,7 @@ Requirements: Node 24 or newer. Install once with `npm install -g @ancha-labs/cl
|
|
|
50
51
|
- `--attempts <n>` sets how many attempts each test gets, `--concurrency <n>` how many run at once.
|
|
51
52
|
- `ancha wait <run id>` follows a run again from any terminal; `ancha explain <run id>` shows why a check failed.
|
|
52
53
|
- `ancha status` shows which of these steps your workspace has done.
|
|
53
|
-
9. **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.
|
|
54
|
+
9. **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.
|
|
54
55
|
```sh
|
|
55
56
|
ancha baseline save before --from <run id>
|
|
56
57
|
ancha run --compare before
|
package/lib/assets/docs/tools.md
CHANGED
|
@@ -86,6 +86,8 @@ The new tools are LinkedIn Ads (202610), Salesforce (REST v67.0), Gong (v2), Goo
|
|
|
86
86
|
|
|
87
87
|
**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.
|
|
88
88
|
|
|
89
|
+
**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.
|
|
90
|
+
|
|
89
91
|
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.
|
|
90
92
|
|
|
91
93
|
One coherent synthetic dataset per tool is the starting point. Reporting data is historical; changing a budget does not manufacture new impressions, leads or revenue. Delayed transcripts, review decisions, search visibility and reporting rows follow explicit deterministic mock rules. **+2 min** advances that simulated availability; it does not purchase or deliver advertising.
|