human-to-code 0.1.23 → 0.1.26

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 (61) hide show
  1. package/Readme.md +42 -29
  2. package/SECURITY.md +29 -17
  3. package/dist/agents/direct/application.d.ts +10 -0
  4. package/dist/agents/direct/application.d.ts.map +1 -1
  5. package/dist/agents/direct/application.js +63 -5
  6. package/dist/agents/direct/application.js.map +1 -1
  7. package/dist/agents/direct/generation-client.d.ts +16 -5
  8. package/dist/agents/direct/generation-client.d.ts.map +1 -1
  9. package/dist/agents/direct/generation-client.js +9 -4
  10. package/dist/agents/direct/generation-client.js.map +1 -1
  11. package/dist/agents/direct/index.d.ts +1 -0
  12. package/dist/agents/direct/index.d.ts.map +1 -1
  13. package/dist/agents/direct/index.js +1 -0
  14. package/dist/agents/direct/index.js.map +1 -1
  15. package/dist/agents/direct/integration-validation.d.ts +38 -15
  16. package/dist/agents/direct/integration-validation.d.ts.map +1 -1
  17. package/dist/agents/direct/integration-validation.js +305 -207
  18. package/dist/agents/direct/integration-validation.js.map +1 -1
  19. package/dist/agents/direct/language-relationships.d.ts +11 -0
  20. package/dist/agents/direct/language-relationships.d.ts.map +1 -0
  21. package/dist/agents/direct/language-relationships.js +55 -0
  22. package/dist/agents/direct/language-relationships.js.map +1 -0
  23. package/dist/agents/direct/presentation.d.ts +2 -1
  24. package/dist/agents/direct/presentation.d.ts.map +1 -1
  25. package/dist/agents/direct/presentation.js +5 -3
  26. package/dist/agents/direct/presentation.js.map +1 -1
  27. package/dist/agents/direct/program-diagnostics.d.ts.map +1 -1
  28. package/dist/agents/direct/program-diagnostics.js +20 -1
  29. package/dist/agents/direct/program-diagnostics.js.map +1 -1
  30. package/dist/agents/direct/project-contracts.d.ts.map +1 -1
  31. package/dist/agents/direct/project-contracts.js +53 -0
  32. package/dist/agents/direct/project-contracts.js.map +1 -1
  33. package/dist/agents/direct/project-memory.d.ts +2 -1
  34. package/dist/agents/direct/project-memory.d.ts.map +1 -1
  35. package/dist/agents/direct/project-memory.js +11 -59
  36. package/dist/agents/direct/project-memory.js.map +1 -1
  37. package/dist/agents/direct/staged-validation.d.ts +2 -0
  38. package/dist/agents/direct/staged-validation.d.ts.map +1 -1
  39. package/dist/agents/direct/staged-validation.js +25 -3
  40. package/dist/agents/direct/staged-validation.js.map +1 -1
  41. package/dist/agents/direct/types.d.ts +8 -0
  42. package/dist/agents/direct/types.d.ts.map +1 -1
  43. package/dist/cli.d.ts.map +1 -1
  44. package/dist/cli.js +81 -18
  45. package/dist/cli.js.map +1 -1
  46. package/dist/prompts/direct-conversion.d.ts.map +1 -1
  47. package/dist/prompts/direct-conversion.js +4 -3
  48. package/dist/prompts/direct-conversion.js.map +1 -1
  49. package/dist/prompts/direct-integration.d.ts +28 -8
  50. package/dist/prompts/direct-integration.d.ts.map +1 -1
  51. package/dist/prompts/direct-integration.js +51 -17
  52. package/dist/prompts/direct-integration.js.map +1 -1
  53. package/dist/prompts/direct-repair.d.ts +2 -0
  54. package/dist/prompts/direct-repair.d.ts.map +1 -1
  55. package/dist/prompts/direct-repair.js +4 -0
  56. package/dist/prompts/direct-repair.js.map +1 -1
  57. package/docs/ARCHITECTURE.md +15 -8
  58. package/docs/MODULES.md +7 -6
  59. package/docs/SCALABILITY.md +12 -9
  60. package/docs/roadmap/html-css.md +4 -5
  61. package/package.json +1 -1
@@ -89,10 +89,11 @@ between releases:
89
89
  - **Minimal production dependencies.** HTTP, hashing, JSON, process handling,
90
90
  provider access, and orchestration use Node built-ins. TypeScript is the one
91
91
  deliberate runtime compiler dependency for direct JS/TS candidate validation,
92
- both per-file syntax checks and the combined candidate-project type check;
92
+ both per-file syntax checks and the combined TypeScript/opted-in-JavaScript check;
93
93
  `@types/node` ships with it so `node:` builtin imports resolve in target
94
94
  projects without their own type dependencies. Combined validation builds a
95
- TypeScript program over the project's JS/TS files per staged pass, so its
95
+ TypeScript program over the project's JS/TS files per staged pass (without
96
+ forcing semantic `checkJs` on plain JavaScript), so its
96
97
  cost grows with project size — the walk is bounded and `skipLibCheck` is
97
98
  forced, but very large repositories pay a real compile cost per conversion
98
99
  run. Adding another runtime dependency changes the supply-chain posture and
@@ -105,13 +106,15 @@ between releases:
105
106
  whole repositories or introduce a persistent embedding cache as a shortcut.
106
107
  A new relationship rule must provide an exact relative path, remain evidence
107
108
  rather than authority, and ship with an adversarial false-relationship test.
108
- - **Integration reconciliation stays opt-in and bounded.** The default direct
109
- path relies on ProjectMemory and does not add a second provider pass. With
110
- `direct.reconcileIntegrations` enabled, eligible generated HTML targets are
111
- counted before confirmation, already-consistent targets add zero requests,
112
- and each target has at most one reconciliation request. Expand this checker
113
- only with deterministic, low-false-positive diagnostics and an explicit
114
- receipt ceiling; never turn it into an unbounded model review loop.
109
+ - **Integration reconciliation stays generic, opt-in, and bounded.** The
110
+ default direct path relies on ProjectMemory and adds no second provider pass.
111
+ With `direct.reconcileIntegrations` enabled, language profiles provide
112
+ structured relationship edges, small connected components are audited
113
+ together, and large components split into bounded target neighborhoods.
114
+ Strict audit JSON may name only supplied paths; each target is repaired at
115
+ most once and each group is verified at most once. Conservative audit/repair
116
+ ceilings appear before confirmation. New ecosystems extend relationship and
117
+ contract profiles rather than adding scenario branches to orchestration.
115
118
  - **Errors are typed and named.** Each layer exports its own error classes
116
119
  (`ArtifactValidationError`, `ProviderError`, `PatchSafetyError`, …) so the
117
120
  CLI can map failures to exit codes without string matching. Error messages
@@ -12,11 +12,10 @@ files to an HTML request with exact relative references, then carries accepted
12
12
  HTML ids/classes/references forward as compact contracts for later CSS and
13
13
  JavaScript requests. This is generation context, not the link-graph validation
14
14
  planned below. An optional direct safety net is also available through
15
- `direct.reconcileIntegrations`: it checks that generated whole-file HTML loads
16
- conventional same-directory generated CSS/browser-JavaScript companions and
17
- uses at most one bounded reconciliation request when an exact reference is
18
- missing. It defaults off and is narrower than the future complete static-web
19
- link graph.
15
+ `direct.reconcileIntegrations`: the same generic cross-language auditor used for
16
+ Python, Rust, JS/TS, and other supported relationships can audit the structured
17
+ HTML/CSS/JavaScript edges supplied by ProjectMemory. It defaults off and remains
18
+ narrower than the future deterministic complete static-web link graph.
20
19
 
21
20
  ## Target profile
22
21
  - `Ecosystem`: `static-web`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "human-to-code",
3
- "version": "0.1.23",
3
+ "version": "0.1.26",
4
4
  "description": "Safely turn reviewed natural-language change contracts into validated code patches.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",