@ultimat3/cli 31.20.0 → 31.22.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 (39) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.md +11 -6
  3. package/package.json +29 -29
  4. package/src/cmd-db.ts +5 -18
  5. package/src/cmd-doctor.ts +8 -3
  6. package/src/cmd-mcp.ts +6 -1
  7. package/src/cmd-verify.ts +19 -15
  8. package/src/db-schema-dump.ts +20 -0
  9. package/src/dev-lock.ts +26 -5
  10. package/src/doctor-guards.ts +27 -12
  11. package/src/drift-store.ts +28 -2
  12. package/src/error-codes-doctor.ts +9 -5
  13. package/src/guards.ts +66 -28
  14. package/src/lint-findings.ts +34 -10
  15. package/src/mcp-agent-host.ts +107 -0
  16. package/src/mcp-errors.ts +4 -0
  17. package/src/mcp-host.ts +23 -1
  18. package/src/mcp-request-statements.ts +129 -0
  19. package/src/mcp-ui.ts +1 -2
  20. package/src/messages.ts +0 -2
  21. package/src/runtime-cache.ts +12 -3
  22. package/src/schema-dump-drift.ts +78 -4
  23. package/src/templates/guard-repo-await-in-loop-test.ts +89 -0
  24. package/src/templates/guard-repo-await-in-loop.ts +214 -0
  25. package/src/templates/guard-repo-unbounded-test.ts +56 -0
  26. package/src/templates/guard-repo-unbounded.ts +197 -0
  27. package/src/templates/scaffold-claude-agents.ts +4 -4
  28. package/src/templates/scaffold-claude-hook.ts +40 -0
  29. package/src/templates/scaffold-claude.ts +22 -6
  30. package/src/templates/scaffold-docs.ts +2 -7
  31. package/src/templates/scaffold-guards.ts +6 -0
  32. package/src/verify-changed.ts +32 -5
  33. package/src/verify-checks.ts +26 -7
  34. package/src/verify-progress.ts +32 -1
  35. package/wiki/CLI-Reference.md +19 -8
  36. package/wiki/MCP-And-AI.md +7 -3
  37. package/wiki/Tutorial-02-First-Feature.md +1 -1
  38. package/wiki/Upgrading.md +7 -0
  39. package/src/retry-memo.ts +0 -37
package/src/retry-memo.ts DELETED
@@ -1,37 +0,0 @@
1
- // One in-flight attempt, shared — and a FAILED one not kept. `started ??= boot()` caches the
2
- // rejection with the value, so a Postgres that refused a connection once answered every later
3
- // call in the session with that same error and no retry was possible short of restarting the host.
4
-
5
- /**
6
- * A lazily made attempt that may be made again.
7
- *
8
- * `started()` is the half `??=` has no spelling for: it answers the attempt already in flight or
9
- * already made, and `undefined` when nobody has asked yet — so a `close()` can stop what was
10
- * booted without BOOTING one in order to stop it.
11
- */
12
- export interface RetryMemo<T> {
13
- get(): Promise<T>;
14
- started(): Promise<T> | undefined;
15
- }
16
-
17
- /**
18
- * `start` runs at most once per SUCCESS. `@ultimat3/db`'s `pgliteClient` states the rule this
19
- * generalises — "a failed boot must not be cached" — and the clearing handler is attached at
20
- * creation for the reason that matters: it therefore runs ahead of every caller's own `await`
21
- * continuation, so by the time anyone sees the rejection the slot is already empty and the next
22
- * call really does start a new attempt. Cleared inside the caller's `catch` instead, there is a
23
- * window in which a second call is handed the dead promise.
24
- */
25
- export function retryMemo<T>(start: () => Promise<T>): RetryMemo<T> {
26
- let attempt: Promise<T> | undefined;
27
- return {
28
- get(): Promise<T> {
29
- attempt ??= start().catch((error: unknown) => {
30
- attempt = undefined;
31
- throw error;
32
- });
33
- return attempt;
34
- },
35
- started: (): Promise<T> | undefined => attempt,
36
- };
37
- }