@vinihcrosa/lumem-os 0.3.1 → 0.5.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.
Files changed (49) hide show
  1. package/README.md +7 -7
  2. package/bin/lumem.mjs +62 -4
  3. package/dist/server/main.mjs +11738 -7177
  4. package/dist/web/assets/{codemirror-setup-CZZ5OaWR.js → codemirror-setup-DJO1HmWW.js} +1 -1
  5. package/dist/web/assets/index-BV0JIdw9.css +32 -0
  6. package/dist/web/assets/index-Dzie5jh_.js +101 -0
  7. package/dist/web/index.html +2 -2
  8. package/drizzle/0014_tarefa_como_entidade.sql +33 -0
  9. package/drizzle/0015_quadro_de_sete_colunas.sql +33 -0
  10. package/drizzle/0016_ordem_na_coluna.sql +13 -0
  11. package/drizzle/0017_relogio_do_encalhe.sql +10 -0
  12. package/drizzle/0018_tetos_do_workspace.sql +26 -0
  13. package/drizzle/0019_comentario_de_tarefa.sql +15 -0
  14. package/drizzle/0020_esteira_tentativa_e_autonomia.sql +51 -0
  15. package/drizzle/0021_catalogo_de_agentes.sql +27 -0
  16. package/drizzle/0022_interruptor_da_esteira.sql +30 -0
  17. package/drizzle/0023_prompt_preparado.sql +49 -0
  18. package/drizzle/0024_motivo_do_bloqueio.sql +1 -0
  19. package/drizzle/0025_aviso_uma_vez.sql +1 -0
  20. package/drizzle/0026_pr_mesclada_sempre_remove.sql +1 -0
  21. package/drizzle/0027_issue_como_identidade.sql +6 -0
  22. package/drizzle/0028_marcos_no_tracker.sql +1 -0
  23. package/drizzle/0029_parecer_do_revisor.sql +22 -0
  24. package/drizzle/0030_papel_da_sessao_e_vaivem.sql +56 -0
  25. package/drizzle/0031_recibo_do_parecer.sql +14 -0
  26. package/drizzle/0032_turno_do_consumo.sql +1 -0
  27. package/drizzle/meta/0014_snapshot.json +1895 -0
  28. package/drizzle/meta/0015_snapshot.json +1895 -0
  29. package/drizzle/meta/0016_snapshot.json +1912 -0
  30. package/drizzle/meta/0017_snapshot.json +1920 -0
  31. package/drizzle/meta/0018_snapshot.json +1945 -0
  32. package/drizzle/meta/0019_snapshot.json +2039 -0
  33. package/drizzle/meta/0020_snapshot.json +2063 -0
  34. package/drizzle/meta/0021_snapshot.json +2249 -0
  35. package/drizzle/meta/0022_snapshot.json +2273 -0
  36. package/drizzle/meta/0023_snapshot.json +2291 -0
  37. package/drizzle/meta/0024_snapshot.json +2298 -0
  38. package/drizzle/meta/0025_snapshot.json +2305 -0
  39. package/drizzle/meta/0026_snapshot.json +2313 -0
  40. package/drizzle/meta/0027_snapshot.json +2357 -0
  41. package/drizzle/meta/0028_snapshot.json +2365 -0
  42. package/drizzle/meta/0029_snapshot.json +2506 -0
  43. package/drizzle/meta/0030_snapshot.json +2525 -0
  44. package/drizzle/meta/0031_snapshot.json +2623 -0
  45. package/drizzle/meta/0032_snapshot.json +2631 -0
  46. package/drizzle/meta/_journal.json +133 -0
  47. package/package.json +1 -1
  48. package/dist/web/assets/index-CQETGcam.js +0 -101
  49. package/dist/web/assets/index-D_7OuYm9.css +0 -32
package/README.md CHANGED
@@ -52,7 +52,7 @@ This is the path `pnpm smoke:install` exercises, one throwaway prefix at a time.
52
52
  | Node | 22 or newer |
53
53
  | git | 2.30 or newer — the whole product is worktrees |
54
54
  | An ACP agent | the `claude` CLI, for the agent conversation. The first-run screen installs the adapter for you |
55
- | OS | macOS and Linux. Windows is not supported ([why](docs/prd/distribution/prd.md)) |
55
+ | OS | macOS and Linux. Windows is not supported ([why](docs/features/014-distribution/prd.md)) |
56
56
 
57
57
  Nothing else: the two native dependencies (`better-sqlite3`, `node-pty`) ship
58
58
  prebuilt binaries, so a global install compiles nothing on the common platforms.
@@ -65,12 +65,12 @@ conversations, memory. `--state-dir` moves it.
65
65
 
66
66
  | | |
67
67
  |---|---|
68
- | [Projects and worktrees](docs/prd/walking-skeleton/prd.md) | register a repo by path or [clone it from a URL](docs/prd/project-from-url/prd.md); cut worktrees from the product instead of the terminal |
69
- | [Agent conversations over ACP](docs/prd/acp-sessions/prd.md) | plan, usage and cost, slash commands, an embedded terminal, and the conversation **on disk** — closing Lumem does not lose it |
70
- | [Files, diff and an editor](docs/prd/file-editor/prd.md) | browse the checkout, read the diff against the base branch, and edit with autosave |
71
- | [Project scripts](docs/prd/project-scripts/prd.md) | `setup`, `run`, `test` and `teardown` live in `<repo>/.lumem/project.toml`; a new worktree is born prepared, and one click brings the app up on a port reserved for that checkout |
72
- | [Workspace memory](docs/prd/workspace-memory/prd.md) | what the harness learned, versioned in git, behind a write gate and an inbox of proposals. The three switches that spend tokens ship **off** |
73
- | [Pull request status](docs/prd/pull-request-status/prd.md) | designed, not built: which of your worktrees is actually mergeable |
68
+ | [Projects and worktrees](docs/features/001-walking-skeleton/prd.md) | register a repo by path or [clone it from a URL](docs/features/011-project-from-url/prd.md); cut worktrees from the product instead of the terminal |
69
+ | [Agent conversations over ACP](docs/features/006-acp-sessions/prd.md) | plan, usage and cost, slash commands, an embedded terminal, and the conversation **on disk** — closing Lumem does not lose it |
70
+ | [Files, diff and an editor](docs/features/005-file-editor/prd.md) | browse the checkout, read the diff against the base branch, and edit with autosave |
71
+ | [Project scripts](docs/features/012-project-scripts/prd.md) | `setup`, `run`, `test` and `teardown` live in `<repo>/.lumem/project.toml`; a new worktree is born prepared, and one click brings the app up on a port reserved for that checkout |
72
+ | [Workspace memory](docs/features/007-workspace-memory/prd.md) | what the harness learned, versioned in git, behind a write gate and an inbox of proposals. The three switches that spend tokens ship **off** |
73
+ | [Pull request status](docs/features/013-pull-request-status/prd.md) | which of your worktrees is actually mergeable, read from the `gh` on your machine — Lumem never sees, asks for or stores a token |
74
74
 
75
75
  ## How it works
76
76
 
package/bin/lumem.mjs CHANGED
@@ -4335,6 +4335,27 @@ var acpEventSchema = external_exports.discriminatedUnion("type", [
4335
4335
  /** O tamanho do bloco, em caracteres — a marca d'água. */
4336
4336
  chars: external_exports.number().int().nonnegative()
4337
4337
  }),
4338
+ /**
4339
+ * O teto do workspace falou (`028` §6, Parte 3 — T16).
4340
+ *
4341
+ * Ele **aparece na conversa**, e não só numa tela de configuração, pela mesma
4342
+ * razão que a memória injetada aparece: o que o daemon faz por conta própria
4343
+ * tem de ser legível no lugar onde a consequência acontece.
4344
+ *
4345
+ * `warn` é o turno de quem **conduz** — o número vai junto e a conversa segue.
4346
+ * `block` é o da esteira, que para. A Q45 registra por que os dois existem: o
4347
+ * mesmo número, a mesma leitura, verbos diferentes.
4348
+ */
4349
+ external_exports.object({
4350
+ type: external_exports.literal("budget"),
4351
+ outcome: external_exports.enum(["warn", "block"]),
4352
+ /** Qual teto segurou. O bloqueio nomeia, senão mexer nele é adivinhação. */
4353
+ cap: external_exports.enum(["cost-per-task", "cost-per-day", "turns-per-session"]),
4354
+ limit: external_exports.number().nonnegative(),
4355
+ spent: external_exports.number().nonnegative(),
4356
+ /** A frase pronta, porque quem monta a frase é quem sabe a unidade. */
4357
+ message: external_exports.string()
4358
+ }),
4338
4359
  /**
4339
4360
  * An event the daemon received and could not name.
4340
4361
  *
@@ -4462,14 +4483,51 @@ var CLAUDE_ADAPTER = {
4462
4483
  // Duas strings porque não são a mesma string, e é exatamente essa a armadilha:
4463
4484
  // o pacote é escopado e o binário não.
4464
4485
  command: "claude-agent-acp",
4465
- pinnedVersion: "0.40.0",
4466
- cli: { command: "claude", install: null },
4467
- apiKeyEnv: ["ANTHROPIC_API_KEY"]
4486
+ /*
4487
+ * Medido em 2026-09-08, e a medição é o motivo de não ser `0.40.0`.
4488
+ *
4489
+ * O adaptador **embute** o runtime: `0.40.0` depende de
4490
+ * `@anthropic-ai/claude-agent-sdk@0.3.160`, que é o Claude Code `2.1.160`, e a
4491
+ * API recusa o modelo default desta conta com *"version 2.1.251 or newer is
4492
+ * required"*. Quem responde `session/prompt` é o SDK de dentro, então o
4493
+ * `claude` do PATH — `2.1.263` na máquina que mediu — não salva.
4494
+ *
4495
+ * `0.75.1` traz o SDK `0.3.257`. O estudo, com as duas versões lado a lado,
4496
+ * está em `docs/project/claude-agent-acp-0.75.md`.
4497
+ */
4498
+ pinnedVersion: "0.75.1",
4499
+ /*
4500
+ * `null` desde 2026-09-08, e isto **reverte** o que estava escrito no §
4501
+ * `cli` opcional acima: *"o `claude-agent-acp`, ao contrário, é um adaptador que
4502
+ * dirige um binário que tem que existir"*. Era verdade no `0.40.0`. Deixou de
4503
+ * ser, e a medição é o motivo — três vezes, no `0.75.1`:
4504
+ *
4505
+ * - com o `claude` fora do PATH (só `node` nele), `initialize` e `session/new`
4506
+ * fecham e ele lista os cinco modelos, Opus 5 incluído;
4507
+ * - o daemon em execução spawna
4508
+ * `@anthropic-ai/claude-agent-sdk-darwin-arm64/claude` — o binário de **dentro**
4509
+ * do pacote, nunca o do PATH;
4510
+ * - os `authMethods` que ele oferece têm `args: ["--cli", "auth", "login",
4511
+ * "--claudeai"]`. O `--cli` é do próprio adaptador; não há um `claude` a chamar.
4512
+ *
4513
+ * O que o processo filho ainda precisa do PATH é o keychain: com só `node`,
4514
+ * `session/prompt` responde `Authentication required`; com `/usr/bin/security` ao
4515
+ * lado, o mesmo turno fecha em `end_turn`. Isso é ambiente, não proveniência — a
4516
+ * distinção está na [Q3](../../../docs/features/027-adapter-provenance/open-questions.md).
4517
+ */
4518
+ cli: null,
4519
+ // Medido: `0.40.0` embutia o `0.3.160` e `0.75.1` embute o `0.3.257`, e o
4520
+ // número depois do `0.3.` é o do Claude Code que a API cobra na recusa.
4521
+ runtime: "@anthropic-ai/claude-agent-sdk",
4522
+ apiKeyEnv: ["ANTHROPIC_API_KEY"],
4523
+ // Medido na Q43, e é o único dos cinco que fecha o laço: `default`, `plan`,
4524
+ // `acceptEdits` e `dontAsk` param no primeiro `Edit` esperando alguém.
4525
+ autonomousMode: "bypassPermissions"
4468
4526
  };
4469
4527
  var DEFAULT_ADAPTER_ID = CLAUDE_ADAPTER.id;
4470
4528
 
4471
4529
  // ../shared/src/constants.ts
4472
- var LUMEM_VERSION = "0.3.1";
4530
+ var LUMEM_VERSION = "0.5.0";
4473
4531
 
4474
4532
  // ../shared/src/pty-protocol.ts
4475
4533
  var ptySessionStateSchema = external_exports.enum(["running", "exited"]);