@astrale-os/cli 1.0.0-beta.27 → 1.0.0-beta.29
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 +59 -3
- package/dist/astrale.js +1765 -1057
- package/dist/public/connect-core.js +86 -17
- package/dist/public/keys/index.js +69 -2
- package/dist/public/paths/index.js +67 -0
- package/dist/types/connection/session.d.ts +2 -2
- package/dist/types/lib/config.d.ts +6 -0
- package/dist/types/state/exchange-credentials.d.ts +6 -2
- package/dist/types/state/files.d.ts +2 -0
- package/dist/types/state/index.d.ts +3 -2
- package/dist/types/state/paths.d.ts +2 -0
- package/dist/types/state/session-routes.d.ts +10 -0
- package/package.json +2 -2
- package/src/commands/__tests__/domain-install-operation.test.ts +23 -0
- package/src/commands/__tests__/install-identity-override.test.ts +3 -3
- package/src/commands/auth/logout.ts +2 -1
- package/src/commands/browser.ts +29 -0
- package/src/commands/domain/install.ts +19 -11
- package/src/commands/get.ts +1 -1
- package/src/commands/identity/register.ts +3 -4
- package/src/commands/logs.ts +2 -5
- package/src/commands/session/analyze.ts +26 -4
- package/src/connection/.spec/architecture.md +9 -1
- package/src/connection/__tests__/auth.test.ts +1 -0
- package/src/connection/__tests__/credential.test.ts +1 -0
- package/src/connection/__tests__/exchange.test.ts +34 -10
- package/src/connection/__tests__/session.test.ts +5 -1
- package/src/connection/__tests__/target.test.ts +1 -0
- package/src/connection/exchange.ts +63 -38
- package/src/connection/session.ts +8 -1
- package/src/identity/__tests__/fixtures/registry-journey.ts +13 -1
- package/src/identity/__tests__/registry.test.ts +4 -0
- package/src/identity/registry.ts +2 -0
- package/src/lib/__tests__/browser-retention.test.ts +212 -0
- package/src/lib/__tests__/config.test.ts +27 -0
- package/src/lib/__tests__/skills.test.ts +8 -2
- package/src/lib/browser-retention.ts +210 -0
- package/src/lib/config.ts +12 -1
- package/src/program/__tests__/program.test.ts +1 -1
- package/src/state/.spec/api.d.ts +21 -2
- package/src/state/.spec/architecture.md +18 -4
- package/src/state/.spec/layout.ts +1 -0
- package/src/state/__tests__/exchange-credentials.test.ts +88 -42
- package/src/state/__tests__/files.test.ts +24 -1
- package/src/state/__tests__/fixtures/session-route-process.ts +93 -0
- package/src/state/__tests__/paths.test.ts +1 -0
- package/src/state/__tests__/session-routes.test.ts +138 -0
- package/src/state/exchange-credentials.ts +22 -9
- package/src/state/files.ts +41 -0
- package/src/state/index.ts +3 -1
- package/src/state/paths.ts +3 -0
- package/src/state/session-routes.ts +34 -0
- package/src/telemetry/__tests__/analyze-log.test.ts +38 -0
- package/src/telemetry/__tests__/retention.test.ts +267 -0
- package/src/telemetry/__tests__/settings.test.ts +102 -0
- package/src/telemetry/__tests__/store-scan.test.ts +128 -0
- package/src/telemetry/__tests__/trigger.test.ts +33 -4
- package/src/telemetry/analyze.ts +24 -2
- package/src/telemetry/recorder.ts +6 -3
- package/src/telemetry/retention.ts +176 -0
- package/src/telemetry/session.ts +18 -12
- package/src/telemetry/settings.ts +64 -11
- package/src/telemetry/store.ts +92 -9
- package/src/telemetry/trigger.ts +16 -28
- package/studio/client/dist/assets/index-BFVFs_8x.js +81 -0
- package/studio/client/dist/assets/index-DuB9iUdu.css +2 -0
- package/studio/client/dist/assets/schema-studio--a0kX3QU.css +1 -0
- package/studio/client/dist/assets/schema-studio-DH6oEWME.js +8 -0
- package/studio/client/dist/index.html +3 -3
- package/studio/package.json +1 -1
- package/studio/server/agent/prompts/anchors.test.ts +17 -4
- package/studio/server/agent/prompts/anchors.ts +3 -2
- package/studio/server/agent/prompts/system.test.ts +2 -3
- package/studio/server/agent/prompts/system.ts +3 -3
- package/studio/server/agent/run/preparation.ts +1 -1
- package/studio/server/api/context.ts +1 -1
- package/studio/server/api/deployment.ts +1 -1
- package/studio/server/api/views.ts +2 -2
- package/studio/server/api/workspace.ts +1 -1
- package/studio/server/cache.test.ts +3 -8
- package/studio/server/cache.ts +4 -45
- package/studio/server/handoff/copy.ts +1 -1
- package/studio/server/introspect/canonical-schema.test.ts +154 -128
- package/studio/server/introspect/canonical-schema.ts +183 -302
- package/studio/server/introspect/core.ts +14 -21
- package/studio/server/introspect/extractor.ts +11 -15
- package/studio/server/introspect/overlay-tsmorph.test.ts +1 -5
- package/studio/server/introspect/overlay-tsmorph.ts +0 -1
- package/studio/server/introspect/overlay.ts +3 -24
- package/studio/server/introspect/revision.test.ts +24 -28
- package/studio/server/introspect/revision.ts +10 -21
- package/studio/server/introspect/runtime.test.ts +14 -14
- package/studio/server/introspect/runtime.ts +1 -46
- package/studio/server/lifecycle.ts +4 -1
- package/studio/server/state/documents.test.ts +69 -0
- package/studio/server/state/documents.ts +57 -10
- package/studio/shared/contracts/schema.ts +10 -26
- package/studio/shared/contracts/surface.test.ts +2 -2
- package/studio/shared/contracts/workspace.ts +3 -0
- package/studio/shared/schema/identity.ts +0 -1
- package/viewer/dist/main.js +28 -28
- package/studio/client/dist/assets/index-C0FAnwNw.css +0 -2
- package/studio/client/dist/assets/index-CpBed0V1.js +0 -81
- package/studio/client/dist/assets/schema-studio-BilUNb6Z.css +0 -1
- package/studio/client/dist/assets/schema-studio-DJm9guI8.js +0 -8
- package/studio/server/introspect/core-extractor.ts +0 -30
- package/studio/server/introspect/overlay.test.ts +0 -44
- package/studio/server/introspect/source-overlay/annotations.ts +0 -14
package/README.md
CHANGED
|
@@ -87,12 +87,12 @@ Install the browser driver once:
|
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
npm install -g agent-browser && agent-browser install
|
|
90
|
-
npx skills add astrale-os/cli # installs
|
|
90
|
+
npx skills add astrale-os/cli # installs every Astrale skill published by this repository
|
|
91
91
|
npx skills add vercel-labs/agent-browser
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
To install just one
|
|
95
|
-
`npx skills add astrale-os/cli@astrale-
|
|
94
|
+
To install just one, select `astrale-cli`, `astrale-domain`, `astrale-frontend-design`, or
|
|
95
|
+
`astrale-services`, for example: `npx skills add astrale-os/cli@astrale-frontend-design`.
|
|
96
96
|
|
|
97
97
|
## Updating
|
|
98
98
|
|
|
@@ -148,6 +148,62 @@ CLI state lives under `~/.astrale/`:
|
|
|
148
148
|
- `identities.json`
|
|
149
149
|
- keypairs
|
|
150
150
|
- cached IdP sessions
|
|
151
|
+
- `sessions/` — locally recorded work sessions (see below)
|
|
152
|
+
|
|
153
|
+
### Session retention
|
|
154
|
+
|
|
155
|
+
Each invocation appends one line to a local session record under
|
|
156
|
+
`~/.astrale/sessions/`; `astrale session list` shows them. The store is swept
|
|
157
|
+
automatically against two bounds — sessions idle past `maxAgeDays` are dropped,
|
|
158
|
+
then the store is trimmed to `maxBytes`, oldest first. Both are optional:
|
|
159
|
+
|
|
160
|
+
```jsonc
|
|
161
|
+
// ~/.astrale/config.json
|
|
162
|
+
{
|
|
163
|
+
"telemetry": {
|
|
164
|
+
"enabled": true, // false disables recording (the sweep still runs)
|
|
165
|
+
"maxAgeDays": 30, // default
|
|
166
|
+
"maxBytes": 52428800 // default: 50 MB
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`ASTRALE_TELEMETRY_MAX_AGE_DAYS` and `ASTRALE_TELEMETRY_MAX_BYTES` override the
|
|
172
|
+
config for one invocation. Values that are not positive numbers are ignored in
|
|
173
|
+
favour of the default, so a typo cannot leave the store unbounded.
|
|
174
|
+
|
|
175
|
+
Once a session has been analyzed it is reduced to its durable artifacts —
|
|
176
|
+
`meta.json`, `events.jsonl`, `report.md`, the marker and a clamped
|
|
177
|
+
`analyzer.log`. The analyzer runs an agent with write access to the session
|
|
178
|
+
directory, so anything else it leaves there is scratch and is removed. The
|
|
179
|
+
prompt is kept only when the analysis failed, which is the one case where what
|
|
180
|
+
the analyzer was asked still matters.
|
|
181
|
+
|
|
182
|
+
### Browser-profile retention
|
|
183
|
+
|
|
184
|
+
`astrale browser` keeps one persistent Chromium profile per host under
|
|
185
|
+
`~/.astrale/browser/`, so the sign-in cookie survives between runs. That cookie
|
|
186
|
+
is a few kilobytes; the cache Chromium piles up around it is not, and Chromium
|
|
187
|
+
does not bound it (`--disk-cache-size` is ignored for a profile's HTTP cache).
|
|
188
|
+
|
|
189
|
+
Every `astrale browser` therefore sweeps the profiles first: one untouched for
|
|
190
|
+
longer than `maxProfileAgeDays` is removed outright — its cookie has expired
|
|
191
|
+
anyway — and one whose cache exceeds `maxCacheBytes` has its cache directories
|
|
192
|
+
emptied. Cookies, Local Storage, Preferences and Local State are never touched,
|
|
193
|
+
so you stay signed in. A profile held by a running browser is skipped.
|
|
194
|
+
|
|
195
|
+
```jsonc
|
|
196
|
+
// ~/.astrale/config.json
|
|
197
|
+
{
|
|
198
|
+
"browser": {
|
|
199
|
+
"maxCacheBytes": 52428800, // default: 50 MB, per profile, cache only
|
|
200
|
+
"maxProfileAgeDays": 30 // default
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Overridable per invocation with `ASTRALE_BROWSER_MAX_CACHE_BYTES` and
|
|
206
|
+
`ASTRALE_BROWSER_MAX_PROFILE_AGE_DAYS`.
|
|
151
207
|
|
|
152
208
|
## Development
|
|
153
209
|
|