@amalgm/browser 0.1.2-preview.37556586459 → 0.1.2-preview.39017048402
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/CHANGELOG.md +4 -0
- package/PURPOSE.md +16 -15
- package/README.md +19 -37
- package/dist/src/adapters/http/request.d.ts +0 -1
- package/dist/src/adapters/http/request.js +0 -7
- package/dist/src/adapters/http/request.js.map +1 -1
- package/dist/src/adapters/http/server.js +1 -15
- package/dist/src/adapters/http/server.js.map +1 -1
- package/dist/src/adapters/http/types.d.ts +0 -3
- package/dist/src/adapters/mcp/server.js +1 -28
- package/dist/src/adapters/mcp/server.js.map +1 -1
- package/dist/src/adapters/mcp/types.d.ts +0 -1
- package/dist/src/artifacts.d.ts +3 -4
- package/dist/src/artifacts.js +5 -9
- package/dist/src/artifacts.js.map +1 -1
- package/dist/src/cookies/database.d.ts +0 -1
- package/dist/src/cookies/database.js +5 -24
- package/dist/src/cookies/database.js.map +1 -1
- package/dist/src/defaults.d.ts +3 -16
- package/dist/src/defaults.js +12 -42
- package/dist/src/defaults.js.map +1 -1
- package/dist/src/index.d.ts +2 -4
- package/dist/src/index.js +1 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/persistence/sqlite-registry.d.ts +1 -5
- package/dist/src/persistence/sqlite-registry.js +1 -24
- package/dist/src/persistence/sqlite-registry.js.map +1 -1
- package/dist/src/ports.d.ts +0 -1
- package/dist/src/product-service.d.ts +0 -1
- package/dist/src/product-service.js +1 -1
- package/dist/src/product-service.js.map +1 -1
- package/dist/src/recording/service.d.ts +2 -2
- package/dist/src/recording/service.js +4 -9
- package/dist/src/recording/service.js.map +1 -1
- package/dist/src/types.d.ts +0 -1
- package/docs/ACTIONS.md +1 -2
- package/docs/ARCHITECTURE.md +5 -6
- package/docs/AXIOMS.md +1 -1
- package/docs/COMPATIBILITY.md +0 -6
- package/docs/MCP.md +7 -6
- package/docs/OPERATIONS.md +12 -26
- package/docs/README.md +3 -3
- package/docs/REALTIME_BOUNDARY.md +4 -5
- package/docs/RECORDING.md +5 -7
- package/docs/REST.md +7 -14
- package/docs/SDK.md +9 -11
- package/docs/SHELL_INTEGRATION.md +2 -8
- package/docs/TESTING.md +8 -8
- package/docs/TOOLBOX_INTEGRATION.md +1 -1
- package/docs/TROUBLESHOOTING.md +4 -13
- package/examples/basic.ts +3 -1
- package/package.json +5 -13
- package/skills/use-amalgm-browser/SKILL.md +11 -37
- package/skills/use-amalgm-browser/references/actions.md +1 -1
- package/dist/bin/amalgm-browser-mcp.d.ts +0 -2
- package/dist/bin/amalgm-browser-mcp.js +0 -4
- package/dist/bin/amalgm-browser-mcp.js.map +0 -1
- package/dist/bin/amalgm-browser-rest.d.ts +0 -2
- package/dist/bin/amalgm-browser-rest.js +0 -10
- package/dist/bin/amalgm-browser-rest.js.map +0 -1
- package/dist/bin/amalgm-browser.d.ts +0 -2
- package/dist/bin/amalgm-browser.js +0 -4
- package/dist/bin/amalgm-browser.js.map +0 -1
- package/dist/src/adapters/cli/actions.d.ts +0 -6
- package/dist/src/adapters/cli/actions.js +0 -56
- package/dist/src/adapters/cli/actions.js.map +0 -1
- package/dist/src/adapters/cli/args.d.ts +0 -8
- package/dist/src/adapters/cli/args.js +0 -41
- package/dist/src/adapters/cli/args.js.map +0 -1
- package/dist/src/adapters/cli/help.d.ts +0 -1
- package/dist/src/adapters/cli/help.js +0 -26
- package/dist/src/adapters/cli/help.js.map +0 -1
- package/dist/src/adapters/cli/resources.d.ts +0 -4
- package/dist/src/adapters/cli/resources.js +0 -94
- package/dist/src/adapters/cli/resources.js.map +0 -1
- package/dist/src/adapters/cli/run.d.ts +0 -7
- package/dist/src/adapters/cli/run.js +0 -114
- package/dist/src/adapters/cli/run.js.map +0 -1
- package/dist/src/cli.d.ts +0 -2
- package/dist/src/cli.js +0 -3
- package/dist/src/cli.js.map +0 -1
- package/dist/src/migration/legacy-cookies.d.ts +0 -2
- package/dist/src/migration/legacy-cookies.js +0 -60
- package/dist/src/migration/legacy-cookies.js.map +0 -1
- package/dist/src/migration/legacy-crypto.d.ts +0 -1
- package/dist/src/migration/legacy-crypto.js +0 -35
- package/dist/src/migration/legacy-crypto.js.map +0 -1
- package/dist/src/migration/legacy-migration.d.ts +0 -19
- package/dist/src/migration/legacy-migration.js +0 -75
- package/dist/src/migration/legacy-migration.js.map +0 -1
- package/dist/src/migration/legacy-rows.d.ts +0 -4
- package/dist/src/migration/legacy-rows.js +0 -58
- package/dist/src/migration/legacy-rows.js.map +0 -1
- package/docs/CLI.md +0 -93
- package/docs/MIGRATION.md +0 -71
package/docs/MIGRATION.md
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Migration
|
|
2
|
-
|
|
3
|
-
Browser keeps existing user state through a versioned, one-time import from
|
|
4
|
-
the legacy Engine database. The import only reads that database and records
|
|
5
|
-
itself as `engine-browser-v1` metadata in the new registry.
|
|
6
|
-
|
|
7
|
-
## Automatic path
|
|
8
|
-
|
|
9
|
-
When `createBrowser()` is not given `root`, it looks for `amalgm.db` in the
|
|
10
|
-
directory above the resolved root (for example `$AMALGM_DIR/amalgm.db`). An
|
|
11
|
-
explicit root does not guess a database; pass `legacyDatabaseFile` to opt in,
|
|
12
|
-
or `false` to turn the import off.
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
const browser = createBrowser({
|
|
16
|
-
root: '/state/browser',
|
|
17
|
-
legacyDatabaseFile: '/state/amalgm.db',
|
|
18
|
-
});
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
The importer opens the old database read-only and imports inside one
|
|
22
|
-
new-registry transaction:
|
|
23
|
-
|
|
24
|
-
- ordinary `browser_auth_bundles`, after hash and AES-GCM verification;
|
|
25
|
-
- the `browser-cookie-source` bundle, into the account's cookie jar as
|
|
26
|
-
records and tombstones;
|
|
27
|
-
- `browser_login_sessions`, with the token hashes of pending and active ones.
|
|
28
|
-
|
|
29
|
-
Legacy profiles are not imported. Everything imported belongs to the runtime's
|
|
30
|
-
account, so a user signed in before the upgrade stays signed in after it.
|
|
31
|
-
|
|
32
|
-
The legacy key comes from `AMALGM_BROWSER_AUTH_KEY` (64 hex characters) or
|
|
33
|
-
`auth-bundles/keys/local-device.key`. The source database path is recorded
|
|
34
|
-
only after success. A second start reports `already-migrated` and changes
|
|
35
|
-
nothing. A failure rolls back SQLite metadata and leaves the source untouched.
|
|
36
|
-
|
|
37
|
-
The registry also imports `registry-v1.json` once when present and never
|
|
38
|
-
deletes that file.
|
|
39
|
-
|
|
40
|
-
## State reused in place
|
|
41
|
-
|
|
42
|
-
- the `$AMALGM_DIR/browser` root
|
|
43
|
-
- project `.amalgm/recordings` directories
|
|
44
|
-
- the Electron ad-block cache and settings under `userData/browser/adblock`
|
|
45
|
-
|
|
46
|
-
Native browsing now selects `persist:amalgm-browser-<account hash>`. The old
|
|
47
|
-
unscoped `persist:amalgm-browser` partition is retained but is not adopted into
|
|
48
|
-
an account: it has no reliable account owner. Verified legacy cookies imported
|
|
49
|
-
into the runtime's account jar reach the new native partition through its
|
|
50
|
-
ordinary cookie adapter.
|
|
51
|
-
|
|
52
|
-
## Verification checklist
|
|
53
|
-
|
|
54
|
-
1. Stop all legacy Browser writers.
|
|
55
|
-
2. Back up the Engine database and the Browser directory.
|
|
56
|
-
3. Run the import against a copy first.
|
|
57
|
-
4. Compare bundle, login, cookie-record, and tombstone counts.
|
|
58
|
-
5. Browse a site the user was signed in to and confirm the sign-in carried
|
|
59
|
-
over.
|
|
60
|
-
6. Load a named auth bundle and confirm only its declared domains load.
|
|
61
|
-
7. Confirm the database, key, and encrypted files are private and the source
|
|
62
|
-
is unchanged.
|
|
63
|
-
8. Start again and confirm the import is a no-op.
|
|
64
|
-
|
|
65
|
-
Encrypted legacy fixtures exercise this sequence in the test suite.
|
|
66
|
-
|
|
67
|
-
## Non-destructive rollback
|
|
68
|
-
|
|
69
|
-
Before cutover, discard the new Browser root and continue from the untouched
|
|
70
|
-
legacy source. After cutover writes, restore the complete pre-cutover backup
|
|
71
|
-
rather than mixing formats or replaying selected files.
|