agenttwin 0.3.18 → 0.3.19
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/README.md +51 -10
- package/dist/api.js +267 -61
- package/dist/dashboard/assets/next/static/JSI_XeT8MHbUAs8aF59pe/_buildManifest.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/_not-found/{page-4fac636e5cfc0494.js → page-43db8aef3fa81958.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/{compare/page-bbf125ee6ef16d17.js → about/page-3f5dbcdbf95bb2fc.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/account/password/{page-d1baf10bff8f328c.js → page-c2ce3c796c817ca1.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/api-policy/{page-bbf125ee6ef16d17.js → page-3f5dbcdbf95bb2fc.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/auth/{page-bbf125ee6ef16d17.js → page-3f5dbcdbf95bb2fc.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-mockoon/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-pact/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-testcontainers/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-wiremock/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/choose-first-agent-workflow-test/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/clean-baseline-before-fault-injection/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/idempotency-keys-and-safe-retries/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/keep-real-service-tests-with-digital-twins/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/keploy-alternatives-for-database-and-payment-workflows/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/layout-563d8763d65d66b5.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/read-workflow-test-receipts/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/reset-test-environment-between-runs/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/simulate-timeouts-and-duplicate-events/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/test-boundaries-for-ai-agents/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/workflow-testing-evaluation-checklist/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/blog/write-better-workflow-assertions/page-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/{about/page-bbf125ee6ef16d17.js → compare/page-3f5dbcdbf95bb2fc.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/contact/page-3f5dbcdbf95bb2fc.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/dashboard/layout-1afe915ed22ac5ed.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/dashboard/page-0eb9937f1e5e9c1e.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/demo/page-4dc63755e0013e7c.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/developers/page-3f5dbcdbf95bb2fc.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-1800a8f06aeb4acb.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/enterprise/page-1fd02494889ae794.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/guides/page-3f5dbcdbf95bb2fc.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/{layout-b924dc5a0d35506b.js → layout-993a96283a3ceb07.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/login/page-d6d4276397724d29.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/onboarding/{page-8eb71ef88bdd9396.js → page-bc480c9258e5cc4d.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/page-2e622bb9a3459541.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/pricing/{page-5970ed83a07bed67.js → page-40f352fe5093a0ff.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/privacy/page-3f5dbcdbf95bb2fc.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/sandbox/page-3f5dbcdbf95bb2fc.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/signup/page-d6d4276397724d29.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/sitemap.xml/route-11a5fdc2662ff51d.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/layout-a5cf565e017886d3.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/page-34574448d210c775.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/layout-abbd9f3b8811f559.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/login/page-4f4a342a4c28f9de.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/{page-d20759b1be50643f.js → page-f04c0b236abaead3.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/page-3905446ec0206fb5.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/signup/page-4f4a342a4c28f9de.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/what-is-agenttwin/page-3f5dbcdbf95bb2fc.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/{main-app-9030513b2ea7c6ba.js → main-app-1ec13ceef4a34729.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/{webpack-f293c9680eabd154.js → webpack-d20e6727e78cdbc8.js} +1 -1
- package/dist/dashboard/assets/next/static/css/{14eee9340ebc5f8b.css → 7263c178012081d9.css} +1 -1
- package/dist/dashboard/assets/next/static/css/77c0c440ebb56bc4.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/engine.js +2468 -1647
- package/dist/gateway.js +267 -61
- package/dist/worker.js +449 -252
- package/dist/world-host.js +471 -265
- package/package.json +5 -2
- package/dist/dashboard/assets/next/static/EvU7zdQimTNRzxI3sTw-q/_buildManifest.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-mockoon/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-pact/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-testcontainers/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/agenttwin-vs-wiremock/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/keploy-alternatives-for-database-and-payment-workflows/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/layout-434c5265a09af3b9.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/reset-test-environment-between-runs/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/blog/simulate-timeouts-and-duplicate-events/page-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/contact/page-bbf125ee6ef16d17.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/dashboard/layout-1632d9fae63c9cd6.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/dashboard/page-6894a8a3e5ba859a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/demo/page-c1267bf857a3fca8.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/developers/page-bbf125ee6ef16d17.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-5cec0850a8226e15.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/enterprise/page-f21347075a09d6d4.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/guides/page-bbf125ee6ef16d17.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/login/page-65179e6b5aba8504.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/page-648a42537e0af8ae.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/privacy/page-bbf125ee6ef16d17.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/sandbox/page-bbf125ee6ef16d17.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/signup/page-65179e6b5aba8504.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/sitemap.xml/route-ba841d868e5d124a.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/layout-bf73782281ca3196.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/page-dcce64b2a778b11d.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/layout-c9122f78d0d3c100.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/login/page-5b17dafd5bf2fe36.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/page-fee1ecf1d39d4204.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/signup/page-5b17dafd5bf2fe36.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/what-is-agenttwin/page-bbf125ee6ef16d17.js +0 -1
- package/dist/dashboard/assets/next/static/css/f27d5fbb1f484d9d.css +0 -1
- /package/dist/dashboard/assets/next/static/{EvU7zdQimTNRzxI3sTw-q → JSI_XeT8MHbUAs8aF59pe}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# AgentTwin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AgentTwin builds digital twins for testing AI agents. Its current Node.js CLI discovers project dependencies and prepares supported workflows with synthetic services, fault conditions and final-state checks.
|
|
4
4
|
|
|
5
|
-
The default runner executes reviewed bundled Node code on your computer, with fresh in-process HTTP twins.
|
|
5
|
+
The default `run` runner executes reviewed bundled Node code on your computer, with fresh in-process HTTP twins; the sample `demo` uses that runtime. The `test` command runs reviewed application workflows in Docker and requires a running Docker engine. Select a cloud runner explicitly when a workflow needs one. The E2B key belongs to the runtime operator; users of the hosted API receive separate revocable AgentTwin tokens.
|
|
6
6
|
|
|
7
7
|
## Install and discover
|
|
8
8
|
|
|
@@ -75,15 +75,15 @@ Edit a world JSON file, listing only the built application files to upload. Bund
|
|
|
75
75
|
|
|
76
76
|
Use the generated `AGENTTWIN_<SERVICE>_URL` and `AGENTTWIN_<SERVICE>_TOKEN` values to configure your test clients. Production accounts, OAuth sessions, `.env` files and host credentials are not copied. Tokens and service state are fresh per run. Source files may contain hardcoded secrets; review the explicit upload list and bundle before uploading it.
|
|
77
77
|
|
|
78
|
-
Supported now:
|
|
78
|
+
Supported now (run `npx agenttwin contracts` for every operation and limit):
|
|
79
79
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
- Cloud runner: real
|
|
84
|
-
-
|
|
80
|
+
- Payments: Stripe customers, payment intents, charges and refunds (full, partial, over-refund errors). `charge.refunded` events are recorded, not pushed as webhooks.
|
|
81
|
+
- Models: OpenAI chat completions and Anthropic messages return scripted responses (text and tool calls) from the world file. Nothing is generated; unscripted or streaming calls make the run incomplete.
|
|
82
|
+
- Messaging and work tools: Slack, Discord, Twilio, Gmail, Google Calendar, GitHub, GitLab, Linear, Jira, Notion, HubSpot, Shopify, Zendesk, Datadog, Composio, plus generic JSON collections for your own APIs.
|
|
83
|
+
- Cloud runner: real PostgreSQL 15 (seed SQL, `DATABASE_URL`, SELECT assertions) and real Redis (string-key assertions).
|
|
84
|
+
- Faults: timeout after a committed write, blackhole, server error and duplicate write. Final-state assertions verify side effects.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Every twin is a bounded subset, not a vendor clone. Unsupported operations return 501 and are never forwarded to a real service. There is no automatic cloning of arbitrary software, provider account provisioning, browser workflow runtime or automatic regression-code generation.
|
|
87
87
|
|
|
88
88
|
## Discovery and reports
|
|
89
89
|
|
|
@@ -175,10 +175,51 @@ Runs a sample cleanly, detects duplicate tickets under a lost write response, ap
|
|
|
175
175
|
|
|
176
176
|
### Optional command telemetry
|
|
177
177
|
|
|
178
|
-
Telemetry is off by default. Set `AGENTTWIN_TELEMETRY=1` to send minimal command events to AgentTwin’s existing Umami project at `https://analytics.agenttwin.si`. Events are tagged `cli` and use `/cli/<command>` paths. Override `AGENTTWIN_UMAMI_HOST` and `AGENTTWIN_UMAMI_WEBSITE_ID` to use another project. Umami uses its
|
|
178
|
+
Telemetry is off by default. Set `AGENTTWIN_TELEMETRY=1` to send minimal command events to AgentTwin’s existing Umami project at `https://analytics.agenttwin.si`. Events are tagged `cli` and use `/cli/<command>` paths. Override `AGENTTWIN_UMAMI_HOST` and `AGENTTWIN_UMAMI_WEBSITE_ID` to use another project. Umami uses its [documented HTTP collection API](https://docs.umami.is/docs/api/sending-stats); no account password or personal API token is required.
|
|
179
179
|
|
|
180
180
|
PostHog remains optional: set `AGENTTWIN_TELEMETRY_PROVIDER=posthog`, `AGENTTWIN_TELEMETRY=1` and `AGENTTWIN_POSTHOG_KEY` to its public ingestion key. `AGENTTWIN_POSTHOG_HOST` selects the ingestion origin (HTTPS required outside loopback). `DO_NOT_TRACK=1` or `AGENTTWIN_TELEMETRY_DISABLED=1` overrides opt-in.
|
|
181
181
|
|
|
182
182
|
Command metrics include category, CLI version, Node major, platform, duration, exit category and fixed telemetry event names. Unexpected command exceptions also emit an allowlisted error type, up to eight shipped entrypoint filename/line/column locations, and a fingerprint computed only from those sanitized fields. Customer-code frames, function names and absolute paths are discarded. Pinged deployment endpoints are not part of this minimal schema. Each process gets a fresh random identifier to correlate command start and finish; there is no persistent machine identity. Arguments, source, repository names, paths, email, exception messages and raw crash stacks are never collected. A start with no finish can indicate interruption; it is not proof of abandonment. Requests time out after 750 ms and cannot change command results. The Umami ingestion URL and website ID are public configuration, bundled for opted-in users; telemetry remains disabled until explicitly enabled. The collector receives the network request and applies its normal server-side privacy policy. Missing finishes indicate possible interruption, not proven abandonment.
|
|
183
183
|
|
|
184
184
|
`agenttwin test` reuses the test selected during `init`; it still requires the proposal’s separate approval. Alternatively, save a reviewed workflow-test scenario as `agenttwin.test.json` in your repository. Explicit `--file` and `--preparation` override automatic selection. A missing or unreviewed test stops with setup instructions; it never silently runs the sample.
|
|
185
|
+
|
|
186
|
+
## Audit export (Phase 2 source build; not yet published)
|
|
187
|
+
|
|
188
|
+
```sh
|
|
189
|
+
agenttwin audit export --file path/to/run.json --world path/to/agenttwin.world.json --out audit.json --fault none
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Recomputes the existing verifier before exporting a bounded JSON summary. Use the same fault and scenario selection as the original run; omit `--fault` to use the world's default. PostgreSQL evidence requires Docker for independent SQL recomputation. The output fingerprints the receipt, world, optional scenario and selection. It omits raw state, application output, source filenames and verifier detail text; creates a private file; and refuses to overwrite existing files. Exit 0 means verified, 1 means failed or invalid, and 2 means stale evidence or inputs changing during verification. Usage errors exit 3. The original receipts remain unchanged. This is local evidence, not a signature, compliance certification, safety score or zero-retention guarantee.
|
|
193
|
+
|
|
194
|
+
## Verify a proposed repair (Phase 2 source build; not yet published)
|
|
195
|
+
|
|
196
|
+
```sh
|
|
197
|
+
agenttwin repair verify --regression .agenttwin/regressions/mail.json \
|
|
198
|
+
--revision FULL_BROKEN_COMMIT_SHA --baseline FULL_TRUSTED_CHECKS_SHA \
|
|
199
|
+
--patch proposed.patch --json
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Supply a reviewed source patch from your developer or coding agent. Both revisions must exist locally. Set `AGENTTWIN_RUNNER_IMAGE` to a reviewed digest-pinned Node image; PostgreSQL workflows also need `AGENTTWIN_POSTGRES_IMAGE`. The command reproduces an isolated assertion or policy failure, then runs the patched source against exactly the same baseline-owned invocation, fixtures and checks. A healthy original, ineffective patch or unavailable runtime cannot earn a verified repair. Existing protected-runtime limitations still apply, including unsupported browser/background and Redis checks.
|
|
203
|
+
|
|
204
|
+
Only modifications to existing application source in the regression's recorded closure are accepted. Changes to fixtures, saved checks, package metadata, permissions, added or deleted files are rejected. An alternate Git index creates an unreferenced candidate commit without changing your branch, working files or staged changes; hooks and package scripts are not run by patch staging. This does not protect against another process concurrently modifying the repository.
|
|
205
|
+
|
|
206
|
+
Evidence is saved privately under `.agenttwin/repairs/<id>/`: `report.json` and the proposed patch, plus an exact baseline `regression.json` only after successful verification. These local files can contain synthetic state, source changes and application output; nothing is uploaded. Review and commit the captured regression before using it as a permanent CI check. Keep the original revision and patch: the unreferenced candidate commit can be garbage-collected. Exit 0 means verified, 1 rejected, 2 incomplete, 3 invalid usage. No automatic patch generation, source edit, merge or production deployment is performed. Passing the recorded checks does not prove all application behavior.
|
|
207
|
+
|
|
208
|
+
## Generate and verify a repair (Phase 2 source build; not yet published)
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
agenttwin repair run --agent codex --regression .agenttwin/regressions/mail.json \
|
|
212
|
+
--revision FULL_BROKEN_COMMIT_SHA --baseline FULL_TRUSTED_CHECKS_SHA --json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Explicitly selecting `--agent codex` starts your installed native Codex client with its existing account. This shares a bounded snapshot of the recorded application source and assertion/policy evidence with that client and its configured model provider. Review the source before sharing it; embedded source secrets cannot be reliably identified automatically. Provider environment variables and Git tokens are excluded from the child environment. The native client still uses its normal home/auth directory. Its command sandbox is read-only, with user configuration and rules disabled; this is not a confidentiality boundary against a malicious coding client or source instructions. Do not use untrusted clients or put production credentials in source. `AGENTTWIN_CODEX_BIN` may select your trusted native executable.
|
|
216
|
+
|
|
217
|
+
The original isolated assertion or policy failure must reproduce before the agent starts. Source is limited to 128 recorded files and 512 KiB of complete context; oversized contexts stop rather than silently dropping code. Codex returns a structured proposal with complete contents for changed source files. AgentTwin validates that proposal, creates a patch in disposable staging and runs the existing trusted verifier. The agent cannot supply the grading verdict or change trusted checks. Failed/empty proposals, authentication failures, quota limits, timeouts and missing output cannot earn a verified repair. The source must already be runnable in the supported Docker runtime; source execution failures and unsupported runtimes are not automatically repaired by this version.
|
|
218
|
+
|
|
219
|
+
Requires a native Codex version supporting `exec`, `--ignore-user-config`, `--ignore-rules`, `--ephemeral`, `--sandbox read-only` and structured output flags. Default timeout is five minutes; `--timeout-ms` accepts 30,000–900,000. Temporary proposal files are removed. Private `generation.json` records hashes and transport status alongside verification evidence; transport failures retain local failure evidence without accepting a repair. Raw client diagnostics are not uploaded or copied to command output. Review the generated patch and commit the captured regression before using it in CI. This command does not change your working source, staged changes or branch, or automatically merge/deploy a patch. Native-model generation is distinct from independent Docker verification; fake-provider orchestration tests do not prove a live model can repair a customer workflow.
|
|
220
|
+
|
|
221
|
+
## Prepare CI after a verified repair (Phase 2 source build; not yet published)
|
|
222
|
+
|
|
223
|
+
Add `--install-ci --tooling-revision FULL_REVIEWED_AGENTTWIN_SHA --check-name mail-retries` to `repair verify` or `repair run` to prepare a named GitHub Actions workflow after verification succeeds. The working regression must exactly match the committed trusted baseline; a rejected repair, changed regression, unsupported CI runtime or existing workflow prevents installation. A CI setup error returns an incomplete status while preserving the verified repair evidence.
|
|
224
|
+
|
|
225
|
+
Review the proposed patch, regression, generated workflow, fixtures and pinned tooling. The installer does not apply the patch, commit files, enable branch protection or merge anything. Put the reviewed regression and workflow on the target base before requiring the check; the initial installation PR can fail because its base does not yet contain the regression. The private action requires repository access, a pinned runner image and a protected workflow. This feature does not itself prove customer-PR enforcement.
|