@hlix/cli 0.6.0 → 0.7.0

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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var s="@hlix/cli",i="0.7.0",n="SEE LICENSE IN LICENSE",a="Hlix Code and the hlix control-plane CLI.",r=["hlix","cli","agents"],l="https://hlix.ai",p="module",o="./dist/index.js",c={hlix:"./dist/index.js"},d=["dist","skills","LICENSE","THIRD_PARTY_NOTICES"],u={node:">=22.19.0"},m={access:"public"},b={build:"rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --splitting --packages external --minify --banner '#!/usr/bin/env node'",test:'bun test src --path-ignore-patterns "**/*.integration.test.ts" --timeout 20000',typecheck:"tsc --noEmit",prepublishOnly:"bun run typecheck && bun run build && bun run test","test:integration":"NODE_ENV=test bun run ../../apps/backend/scripts/with-aimock.ts -- bun run ../../apps/backend/scripts/with-test-db.ts -- bun test --isolate --preload ../../apps/backend/test/helpers/pool-lifecycle.ts --timeout 60000 .integration.test.ts"},h={"@earendil-works/pi-tui":"0.85.1","@mastra/acp":"^0.4.1","@mastra/core":"1.71.0","@mastra/docker":"^0.9.0","@mastra/libsql":"1.23.0","@mastra/mcp":"2.1.0","@mastra/memory":"1.30.0",ignore:"7.0.8","jsonc-parser":"3.3.1","openapi-fetch":"^0.17.0","smol-toml":"1.8.0",yaml:"2.9.0",zod:"4.5.4"},g={"@hlix/sdk":"^0.2.0","@hlix/shared":"*","@types/bun":"latest",typescript:"^7.0.2"},k={name:s,version:i,license:n,description:a,keywords:r,homepage:l,type:p,main:o,bin:c,files:d,engines:u,publishConfig:m,scripts:b,dependencies:h,devDependencies:g};export{c as bin,k as default,h as dependencies,a as description,g as devDependencies,u as engines,d as files,l as homepage,r as keywords,n as license,o as main,s as name,m as publishConfig,b as scripts,p as type,i as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlix/cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Hlix Code and the hlix control-plane CLI.",
6
6
  "keywords": [
@@ -36,13 +36,16 @@
36
36
  "dependencies": {
37
37
  "@earendil-works/pi-tui": "0.85.1",
38
38
  "@mastra/acp": "^0.4.1",
39
- "@mastra/core": "1.67.0",
40
- "@mastra/docker": "^0.8.0",
39
+ "@mastra/core": "1.71.0",
40
+ "@mastra/docker": "^0.9.0",
41
41
  "@mastra/libsql": "1.23.0",
42
- "@mastra/mcp": "1.18.0",
42
+ "@mastra/mcp": "2.1.0",
43
43
  "@mastra/memory": "1.30.0",
44
44
  "ignore": "7.0.8",
45
+ "jsonc-parser": "3.3.1",
45
46
  "openapi-fetch": "^0.17.0",
47
+ "smol-toml": "1.8.0",
48
+ "yaml": "2.9.0",
46
49
  "zod": "4.5.4"
47
50
  },
48
51
  "devDependencies": {
@@ -187,9 +187,10 @@ hlix standards [--json] # instruction files, skills, commands, MCP
187
187
  hlix rules [--edit] [--global] [--json] # the rules files the coding agent reads; --edit opens one in $EDITOR
188
188
  hlix projects list [--json] # projects in the workspace
189
189
  hlix projects get [project-id] [--json]
190
+ hlix projects delete <id|name> [--yes] [--json]
190
191
  hlix init [folder] [--project <id>] [--json] # create committed project configuration; --project binds an existing cloud project
191
192
  hlix terminal [project-id] [--print] [--web] [--json] # shell into the project's Coding Workspace (ssh here, or the browser terminal)
192
- hlix import [folder] [--dry-run] [--env-file <path>] [--history preserve] [--no-connect-origin] [--attach] [--yes] [--json]
193
+ hlix import [folder] [--dry-run] [--env-file <path>] [--history preserve|sanitize] [--include <path>] [--no-connect-origin] [--attach] [--yes] [--json]
193
194
  hlix sync [--dry-run] [--json] # push or pull when only one side changed
194
195
  hlix pull [--force] [--yes] [--dry-run] [--json]
195
196
  hlix push [--dry-run] [--json] # compare-and-swap a new immutable revision
@@ -223,14 +224,24 @@ agent/skill/MCP resources, and Git-history findings, but never secret values.
223
224
  Hlix collects every project-local dotenv and credential file. It applies the
224
225
  standard development dotenv precedence automatically and preserves every other
225
226
  profile encrypted; `--env-file` is an explicit override.
226
- The default history policy aborts on possible historical secrets. Explicit
227
- `--history preserve` keeps the full Git history after showing the risk. An
228
- example file (`.env.example` and its family) is never a finding, and a registry
229
- config such as `.npmrc` is one only when the committed blob held a real value
230
- rather than a `${VAR}` placeholder. A pattern matched inside a test, fixture or
231
- snapshot file, in documentation, on a line that defines a detector's own
232
- pattern, or whose value spells out that it is fake, is listed as a warning and
233
- does not block, so `--history preserve` is not the answer to it.
227
+ Git history is preserved by default. Possible historical secrets are warnings,
228
+ with at most five redacted commit-and-file findings. To leave old commits out,
229
+ use `--history sanitize` to upload a current-tree snapshot without changing local Git history. `--history preserve`
230
+ and the legacy `--history abort-on-findings` remain accepted; neither blocks on
231
+ historical findings. Nested repositories and declared submodules import their
232
+ working files without their own Git metadata or history. Ignored nested
233
+ repositories are skipped silently.
234
+
235
+ Ordinary files over the upload limit are skipped with a named hint. If needed, history is omitted, then the largest folders are skipped until the snapshot fits. Import, init, and push refresh a marked Hlix-managed block in `.hlixignore` from shared stack detection and verified local generated paths. Personal lines outside the block are preserved byte-for-byte; `!` overrides outside the block take precedence even above it. Automatic rules never cover tracked files or secrets. Declared tools identify untracked build output without generation comments: Vite literal build.outDir or dist, Next .next (plus out for a default static export), Nuxt .nuxt/.output, Astro dist, Turbo .turbo, TypeScript literal tsconfig outDir, Webpack/Parcel dist defaults, and Rollup configured output.dir. Python build/dist/egg-info needs a declared build backend. Resolve output paths per package and configured root, applying recognized build-command output flags first. Unresolved root/config/CLI overrides disable inference for that tool rather than reverting to a default; configuration code is never executed. Track authored files in declared output directories or use ! overrides to keep them visible. Composer vendor requires a valid lockfile; local path dependencies stay visible. Untracked agent scratch and external nested repos are eligible only when they are not project source. Unknown paths stay visible. A refresh removes broad rules for folders that acquired tracked files or secrets; source outside declared build outputs stays visible. Human output adds one line: `Hlix ignored 6 generated folders — see .hlixignore`. Dry runs do not refresh files, and linked ignore targets or malformed blocks are left untouched. Folders with a managed block use these rules instead of blanket generated-directory exclusions. `--include <path>` restores one ignored path and persists it for later push/sync scans, subject to upload limits; it never includes Git metadata or bypasses secret protection. Push leaves the cloud unchanged when skipping would remove an existing cloud file. Symlinked `.hlixignore` files are read from their targets; an unreadable target leaves uploads unchanged with a permission warning.
236
+
237
+ Never delete .git folders or files to get past this; use .hlixignore instead.
238
+
239
+ The human scan report is ordered: uploaded / skipped / secrets / warnings /
240
+ blocked. The secrets line says files move encrypted. Protected working-tree files are named individually; their values are
241
+ never printed. The JSON dry run retains the full environment and file report.
242
+ The upload manifest summarizes skip lists longer than 5,000 entries; local
243
+ reports and push protection retain every skipped path.
244
+
234
245
  Current environment values are sent only in the authenticated finalization
235
246
  request and stored encrypted; they are never placed in the Git bundle.
236
247
 
@@ -271,8 +282,7 @@ the project already has cloud files, `hlix pull` brings them down and becomes
271
282
  that base. If it has none — a project created in the dashboard — `hlix push`
272
283
  (or `hlix sync`) uploads the folder as revision 1 and builds the project's
273
284
  Coding Workspace from it. Only a project with no revision at all can be
274
- bootstrapped that way: a second bootstrap push exits `conflict`, and so does a
275
- folder with no base whose project does have a revision (pull first). `hlix
285
+ bootstrapped that way: if the cloud already has a revision but this folder has no base, push leaves both copies unchanged and reports that it needs a pull first. `hlix
276
286
  pull` on a project with no cloud files exits `not_found` and names the way
277
287
  forward.
278
288
 
@@ -326,7 +336,7 @@ Branch on `error.code`, never on `error.message`. Codes: `unauthenticated`,
326
336
  `forbidden`, `not_found`, `conflict`, `invalid_request`, `bad_request`,
327
337
  `rate_limited`, `not_implemented`, `server_error`, `unreachable`,
328
338
  `missing_argument`, `invalid_usage`, `approval_required`, `cancelled`, `unknown_command`,
329
- `workspace_mismatch`, `not_initialized`, `scan_blocked`, `already_imported`,
339
+ `workspace_mismatch`, `not_initialized`, `scan_blocked`,
330
340
  `workspace_required`, `invalid_base_url`, `missing_credential`, `unknown`.
331
341
 
332
342
  That list is the complete set — `skill.test.ts` compares it against every code
@@ -391,3 +401,23 @@ of yours.
391
401
  - **No `tasks logs`.** The log endpoint is not part of the published API
392
402
  contract, and there is no log stream to follow. `tasks watch` streams task
393
403
  *status*, which is a different thing and is named accordingly.
404
+
405
+ ### Import recovery and project deletion
406
+
407
+ An interrupted import resumes the saved session in `.hlix/import.json` on the
408
+ next `hlix import` in that folder. Keep that file and `.hlix/import.bundle`
409
+ until it succeeds. A finalize timeout polls the same import for up to ten
410
+ minutes; rerun the command if the wait ends. Secret values are re-read from
411
+ local files only if finalization has not started. Restore changed files before
412
+ resuming an upload; completed imports bind without rescanning. If the server
413
+ confirms an unfinished session has expired, the CLI discards its saved recovery
414
+ files, reports it, and starts a fresh import. A completed or still-finalizing
415
+ session is never replaced just because its upload deadline passed.
416
+
417
+ `hlix projects delete <id|name>` prints the selected project's name
418
+ before deleting it. Names must match exactly and be unique; otherwise use the
419
+ ID. Interactive deletion asks for confirmation. Non-interactive deletion,
420
+ `--json`, and deletion of this folder's bound project require `--yes`.
421
+ Deletion removes the cloud project; local files are kept.
422
+
423
+ `push --dry-run` reports conflicts with exit 0 and makes no changes. The nonzero conflict verdict described above applies to `pull` and `sync`. Missing local push bindings and unreadable import recovery records likewise produce explicit no-op reports; no replacement project or upload is created.