agenttwin 0.3.6 → 0.3.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.
Files changed (61) hide show
  1. package/README.md +17 -6
  2. package/dist/api.js +1515 -217
  3. package/dist/cli.js +2757 -642
  4. package/dist/dashboard/assets/dashboard/agent-home.css +130 -0
  5. package/dist/dashboard/assets/dashboard/golden-gate-portrait.png +0 -0
  6. package/dist/dashboard/assets/next/static/P_sIw5q7daW7e4IJEGveg/_buildManifest.js +1 -0
  7. package/dist/dashboard/assets/next/static/chunks/549-f8859485ba130d9c.js +1 -0
  8. package/dist/dashboard/assets/next/static/chunks/787-e53be69d23ff02f5.js +1 -0
  9. package/dist/dashboard/assets/next/static/chunks/app/_not-found/{page-5dc6a60918e8652d.js → page-95856eb81db7799b.js} +1 -1
  10. package/dist/dashboard/assets/next/static/chunks/app/account/password/page-ff06be670b822cfe.js +1 -0
  11. package/dist/dashboard/assets/next/static/chunks/app/dashboard/layout-64afdd8a8798e3b6.js +1 -0
  12. package/dist/dashboard/assets/next/static/chunks/app/dashboard/page-a11f5eeef34fdff9.js +1 -0
  13. package/dist/dashboard/assets/next/static/chunks/app/demo/{page-760a47a5e4dee43f.js → page-8a71f24127eb1e63.js} +1 -1
  14. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-df1468fc904db4f7.js +1 -0
  15. package/dist/dashboard/assets/next/static/chunks/app/layout-9da6df58ef40be60.js +1 -0
  16. package/dist/dashboard/assets/next/static/chunks/app/login/page-caa5c579f14ec911.js +1 -0
  17. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-e58bc195fd4bc31c.js +1 -0
  18. package/dist/dashboard/assets/next/static/chunks/app/page-df1d4cae513d5eed.js +1 -0
  19. package/dist/dashboard/assets/next/static/chunks/app/pricing/page-21130c3524f7e45e.js +1 -0
  20. package/dist/dashboard/assets/next/static/chunks/app/signup/page-caa5c579f14ec911.js +1 -0
  21. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/layout-2936df21408f38fd.js +1 -0
  22. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/page-04e82fd8f3044022.js +1 -0
  23. package/dist/dashboard/assets/next/static/chunks/app/v2/layout-dc60420b4d88dd63.js +1 -0
  24. package/dist/dashboard/assets/next/static/chunks/app/v2/login/page-d3a27a2684498e13.js +1 -0
  25. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-b48a6cab88bb7f78.js +1 -0
  26. package/dist/dashboard/assets/next/static/chunks/app/v2/page-ca672c49c2235ce2.js +1 -0
  27. package/dist/dashboard/assets/next/static/chunks/app/v2/signup/page-d3a27a2684498e13.js +1 -0
  28. package/dist/dashboard/assets/next/static/chunks/main-app-def27ec5d496405f.js +1 -0
  29. package/dist/dashboard/assets/next/static/chunks/webpack-29cc60ad58d8aefe.js +1 -0
  30. package/dist/dashboard/assets/next/static/css/0071f19b19d3d0c1.css +1 -0
  31. package/dist/dashboard/assets/next/static/css/138b575a572b2958.css +1 -0
  32. package/dist/dashboard/assets/next/static/css/1f0bd0855bbd1a14.css +1 -0
  33. package/dist/dashboard/assets/next/static/css/311920319a51fc90.css +1 -0
  34. package/dist/dashboard/assets/next/static/css/32d869ddee6d2dc1.css +1 -0
  35. package/dist/dashboard/assets/next/static/css/3f003235629d65a0.css +1 -0
  36. package/dist/dashboard/assets/next/static/css/4af3c8ca0da0f48b.css +1 -0
  37. package/dist/dashboard/assets/next/static/css/4fa51ab33fbc7e1b.css +1 -0
  38. package/dist/dashboard/assets/next/static/css/807e07644631d8e2.css +1 -0
  39. package/dist/dashboard/assets/next/static/css/97d686ac80c4018f.css +1 -0
  40. package/dist/dashboard/assets/next/static/css/98cc7bbbb43b84df.css +1 -0
  41. package/dist/dashboard/assets/next/static/css/c1117da59daa6ba9.css +1 -0
  42. package/dist/dashboard/assets/next/static/css/d99eecb7633d1200.css +1 -0
  43. package/dist/dashboard/assets/next/static/media/golden-gate-portrait.7941528f.png +0 -0
  44. package/dist/dashboard/index.html +1 -1
  45. package/dist/gateway.js +1534 -218
  46. package/dist/worker.js +316 -22
  47. package/dist/world-host.js +1090 -0
  48. package/package.json +6 -1
  49. package/dist/dashboard/assets/next/static/HZwGKKvvx_oO6caYggjFh/_buildManifest.js +0 -1
  50. package/dist/dashboard/assets/next/static/chunks/app/dashboard/layout-74603c2c8eaf0760.js +0 -1
  51. package/dist/dashboard/assets/next/static/chunks/app/dashboard/page-b79ed135f6bac5f7.js +0 -1
  52. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-80a0c2c82d5b4efd.js +0 -1
  53. package/dist/dashboard/assets/next/static/chunks/app/layout-1a40c59e535513d4.js +0 -1
  54. package/dist/dashboard/assets/next/static/chunks/app/page-de4735052adab906.js +0 -1
  55. package/dist/dashboard/assets/next/static/chunks/app/pricing/page-7703fc31d6dff0f7.js +0 -1
  56. package/dist/dashboard/assets/next/static/chunks/main-app-99295a8cc37e8a47.js +0 -1
  57. package/dist/dashboard/assets/next/static/chunks/webpack-f3b6dd27998e84ce.js +0 -1
  58. package/dist/dashboard/assets/next/static/css/1323d7da89b3fa5e.css +0 -1
  59. package/dist/dashboard/assets/next/static/css/9282330a2fd1ab73.css +0 -1
  60. package/dist/dashboard/assets/next/static/css/96e4f356a1159071.css +0 -1
  61. /package/dist/dashboard/assets/next/static/{HZwGKKvvx_oO6caYggjFh → P_sIw5q7daW7e4IJEGveg}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -10,10 +10,15 @@ Node.js 22.12+ is required. Run discovery from your project; npx installs the CL
10
10
 
11
11
  ```sh
12
12
  npx agenttwin init
13
- npx agenttwin example --out ./agenttwin-example
14
13
  ```
15
14
 
16
- `init` writes the inventory, workflow candidates, `agenttwin.config.json`, `ENVIRONMENT.md`, `REPLICATION.md`, and an offline browser report. Discovery is evidence, not an automatically executable environment. It never uploads source. `init --json --dry-run` writes nothing.
15
+ `init` discovers your repository and opens a persistent control menu. Bare `npx agenttwin` opens the same entry point. Select a reviewed world, inspect every service's support, run correctness checks, explore seeded faults, replay a failure, verify a source-only patch, save a regression, import an incident, or connect your account—all from this menu, without remembering flags or separate command names. `npx agenttwin refresh` updates discovery without executing application code. Existing advanced commands remain available to CI and coding agents.
16
+
17
+ Discovery writes the inventory, workflow candidates, `agenttwin.config.json`, `ENVIRONMENT.md`, `REPLICATION.md`, and an offline browser report. A discovered candidate is not an executable specification: the menu accepts a reviewed `agenttwin.world.json` with explicit bundled Node files, synthetic services, invocation and required outcomes. The optional demo is clearly labeled as synthetic. Redirected input and `--yes` only perform discovery; they never start the interactive execution loop. `init --json --dry-run` writes nothing. Account sharing is explicit; having an existing token does not automatically upload evidence during init.
18
+
19
+ Seeded exploration includes an unfaulted control and up to 31 timeout-after-write trials. A seed controls the selected service/path and delay, not OS scheduling or arbitrary application randomness. Each trial uses fresh service state. Captured application files, checks, fault cases and receipts stay under `.agenttwin/explorations/`. Replay uses the captured application; patch verification uses current application files with the captured checks and fault cases. Hash mismatches reject accidental snapshot edits. This is local evidence, not a tamper-proof security boundary; protected CI anchors saved regression checks in a trusted Git baseline. Unexercised fault targets and unsupported provider operations remain incomplete.
20
+
21
+ This guided entry point describes the current source checkout. It reaches public `npx` users only after this package is published; verify the installed version when using a registry release.
17
22
 
18
23
  Installed packages and source references are clues, not proof that an integration is active. Credentials, environment keys and deployment configuration are kept separately. Unmatched `.env` entries do not require setup and are never turned into services by an interactive prompt.
19
24
 
@@ -34,7 +39,7 @@ Run from your original repository so receipts stay in its `.agenttwin/runs/` dir
34
39
 
35
40
  ## Optional cloud execution through an AgentTwin API
36
41
 
37
- Your operator supplies the API URL and your individual token:
42
+ Sign in with `npx agenttwin login`. For an operator-managed API, you can instead supply its URL and individual token:
38
43
 
39
44
  ```sh
40
45
  export AGENTTWIN_API_URL=https://your-agenttwin-api.example.com
@@ -87,7 +92,7 @@ MIT license.
87
92
 
88
93
  `agenttwin init --yes` detects project dependencies, tooling and available connector configuration, then writes `.agenttwin/dashboard/index.html`. Open that file to review the detected environment without selecting every connector or uploading inventory. The dashboard includes its assets and an allowlisted discovery payload; account records, credential values and evidence paths are excluded. It starts with no saved run receipts. Detection does not verify provider access or implement an adapter.
89
94
 
90
- The website starts empty and does not import this repository’s inventory automatically. Connect your individual API account in Settings and run `npx agenttwin sync` with `AGENTTWIN_TOKEN` configured, or import discovery JSON manually. Removed detected resources stay excluded until a fresh discovery revision. The generated project dashboard loads its own embedded discovery.
95
+ The website starts empty and does not import this repository’s inventory automatically. Create an account on the website, connect your terminal with `npx agenttwin login`, and run `npx agenttwin sync`, or import discovery JSON manually. Removed detected resources stay excluded until a fresh discovery revision. The generated project dashboard loads its own embedded discovery.
91
96
 
92
97
  ## Prepare an actual discovered workflow
93
98
 
@@ -122,13 +127,19 @@ The output contains your unchanged source, a world spec, a SHA-256 manifest, and
122
127
  Supported mapping contracts: bounded Slack operations, PostgreSQL, Redis and custom JSON collections (`GET /path` / `POST /path`). Preparation rejects missing/unreviewed mappings and unsupported vendor SDK operations. Discovery and mappings remain user-reviewed declarations, not proof that every operation or dependency in arbitrary source was discovered. Hosted execution checks the declared assertions.
123
128
 
124
129
 
130
+ ### Updates
131
+
132
+ Interactive `npx agenttwin` and `npx agenttwin init` check the official npm registry on startup and automatically install and run a newer stable release in the same repository. Offline startup continues with an explicit warning. Updates do not run in CI, noninteractive/JSON mode, dry runs, or advanced automation commands. Set `AGENTTWIN_AUTO_UPDATE=0` to retain an installed release; checkouts ahead of the published release are never downgraded.
133
+
134
+ Older releases without this updater cannot update themselves. After the new release is published, bootstrap once with `npx --yes agenttwin@latest init`; normal guided use remains `npx agenttwin init`. npm can otherwise resolve a local or cached older package.
135
+
125
136
  ### Coding session and dashboard discovery
126
137
 
127
- Run `npx agenttwin init` inside your repository (Node.js 22.12+). Interactive init offers an OpenCode session when the CLI is installed; `npx agenttwin init --agent opencode` launches explicitly with your configured provider and its normal permission controls. Provider authentication and usage belong to your coding-agent account. Other coding agents can use `.agenttwin/AGENT-TASK.md`.
138
+ Run `npx agenttwin init` inside your repository (Node.js 22.12+). Interactive init opens the guided repository menu and offers account connection and reviewed project sharing. It does not launch another coding agent automatically. `npx agenttwin init --agent opencode` launches OpenCode explicitly with your configured provider and its normal permission controls. Provider authentication and usage belong to your coding-agent account. Other coding agents can use `.agenttwin/AGENT-TASK.md`.
128
139
 
129
140
  The session traces workflows across files, records intents and production failure hypotheses in `.agenttwin/WORKFLOWS.md`, and writes metadata to `.agenttwin/agent-discovery.json`. Static candidates retain their original evidence. Agent candidates remain unverified until the workflow is explicitly prepared and executed. Static discovery preserves distinct exported side-effect entrypoints, including repositories with 100 candidates; it does not prove that every business workflow has been found.
130
141
 
131
- After reviewing discovery, configure `AGENTTWIN_TOKEN` using your individual account token (never paste it into an agent prompt) and run `npx agenttwin sync`. Optional `AGENTTWIN_API_URL` selects your API. The website loads account discovery after you connect in Settings, then refreshes while visible. Sync sends names, operations and relative entrypoint metadata; application source uploads happen separately through reviewed bundles. Avoid sensitive names or identifiers in discovery metadata.
142
+ Create a workspace at https://agenttwin.si/signup/ or run `npx agenttwin login` from your repository. Run `npx agenttwin init`, review discovery, then choose account connection and approve sharing in the guided menu. Sign in in your browser and enter the code shown in the terminal when prompted. Terminal credentials are stored with owner-only permissions in `~/.agenttwin/credentials.json`, outside your repository. You can still supply `AGENTTWIN_TOKEN` for automation. Optional `AGENTTWIN_API_URL` selects your API. The website loads account discovery after you connect in Settings, then refreshes while visible. Sync sends names, operations and relative entrypoint metadata; application source uploads happen separately through reviewed bundles. Avoid sensitive names or identifiers in discovery metadata.
132
143
 
133
144
  To execute a workflow, supply an executable Node entrypoint, reviewed supported dependency mappings, synthetic fixtures and expected observable outcomes. Run `npx agenttwin prepare --file preparation.json`, review the bundle, and run it through your AgentTwin API or E2B account. Browser/desktop automation and arbitrary vendor SDKs require additional runtimes/adapters. The CLI is the default runner; select a hosted runner only when the workflow requires it. No local Docker is used.
134
145