human-to-code 0.1.22 → 0.1.24

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 (62) hide show
  1. package/Readme.md +40 -9
  2. package/SECURITY.md +20 -5
  3. package/dist/agents/direct/generation-client.d.ts +22 -0
  4. package/dist/agents/direct/generation-client.d.ts.map +1 -1
  5. package/dist/agents/direct/generation-client.js +12 -0
  6. package/dist/agents/direct/generation-client.js.map +1 -1
  7. package/dist/agents/direct/index.d.ts +2 -0
  8. package/dist/agents/direct/index.d.ts.map +1 -1
  9. package/dist/agents/direct/index.js +2 -0
  10. package/dist/agents/direct/index.js.map +1 -1
  11. package/dist/agents/direct/integration-validation.d.ts +70 -0
  12. package/dist/agents/direct/integration-validation.d.ts.map +1 -0
  13. package/dist/agents/direct/integration-validation.js +382 -0
  14. package/dist/agents/direct/integration-validation.js.map +1 -0
  15. package/dist/agents/direct/language-relationships.d.ts +11 -0
  16. package/dist/agents/direct/language-relationships.d.ts.map +1 -0
  17. package/dist/agents/direct/language-relationships.js +55 -0
  18. package/dist/agents/direct/language-relationships.js.map +1 -0
  19. package/dist/agents/direct/presentation.d.ts +10 -1
  20. package/dist/agents/direct/presentation.d.ts.map +1 -1
  21. package/dist/agents/direct/presentation.js +27 -2
  22. package/dist/agents/direct/presentation.js.map +1 -1
  23. package/dist/agents/direct/project-contracts.d.ts.map +1 -1
  24. package/dist/agents/direct/project-contracts.js +44 -0
  25. package/dist/agents/direct/project-contracts.js.map +1 -1
  26. package/dist/agents/direct/project-memory.d.ts +2 -1
  27. package/dist/agents/direct/project-memory.d.ts.map +1 -1
  28. package/dist/agents/direct/project-memory.js +11 -59
  29. package/dist/agents/direct/project-memory.js.map +1 -1
  30. package/dist/agents/direct/staged-validation.d.ts +2 -0
  31. package/dist/agents/direct/staged-validation.d.ts.map +1 -1
  32. package/dist/agents/direct/staged-validation.js +22 -1
  33. package/dist/agents/direct/staged-validation.js.map +1 -1
  34. package/dist/agents/direct/types.d.ts +8 -0
  35. package/dist/agents/direct/types.d.ts.map +1 -1
  36. package/dist/cli.d.ts.map +1 -1
  37. package/dist/cli.js +99 -4
  38. package/dist/cli.js.map +1 -1
  39. package/dist/config/config.d.ts +5 -0
  40. package/dist/config/config.d.ts.map +1 -1
  41. package/dist/config/config.js +21 -0
  42. package/dist/config/config.js.map +1 -1
  43. package/dist/prompts/direct-conversion.d.ts.map +1 -1
  44. package/dist/prompts/direct-conversion.js +4 -3
  45. package/dist/prompts/direct-conversion.js.map +1 -1
  46. package/dist/prompts/direct-integration.d.ts +43 -0
  47. package/dist/prompts/direct-integration.d.ts.map +1 -0
  48. package/dist/prompts/direct-integration.js +79 -0
  49. package/dist/prompts/direct-integration.js.map +1 -0
  50. package/dist/prompts/direct-repair.d.ts +2 -0
  51. package/dist/prompts/direct-repair.d.ts.map +1 -1
  52. package/dist/prompts/direct-repair.js +4 -0
  53. package/dist/prompts/direct-repair.js.map +1 -1
  54. package/dist/prompts/index.d.ts +1 -0
  55. package/dist/prompts/index.d.ts.map +1 -1
  56. package/dist/prompts/index.js +1 -0
  57. package/dist/prompts/index.js.map +1 -1
  58. package/docs/ARCHITECTURE.md +10 -4
  59. package/docs/MODULES.md +7 -3
  60. package/docs/SCALABILITY.md +9 -0
  61. package/docs/roadmap/html-css.md +5 -1
  62. package/package.json +1 -1
package/Readme.md CHANGED
@@ -57,10 +57,11 @@ By default this runs the **direct converter**, not an instruction to rewrite the
57
57
  2. Reports marker-shaped requests in unsupported file types and refuses a `.human` request whose sibling output already exists. Intentionally ignored directories and symlinks remain outside discovery.
58
58
  3. Prints a receipt (the output languages actually selected for this worklist, provider, model, and exact source-to-output paths) and asks for confirmation. Nothing is written until you confirm — or pass `-y`/`--yes`. If no request is found it returns `NEEDS_INPUT`.
59
59
  4. On confirmation, converts each item with one model completion per unit, extracts one unambiguous code block, and validates the complete candidate before writing. JavaScript and TypeScript use the TypeScript parser; supported programming languages receive a deterministic structural syntax check. HTML and CSS receive the non-empty and code-fence gates because generic delimiter balancing misreads valid markup and stylesheet text. Inline validation compares the candidate with the original file and rejects only syntax errors introduced by that replacement, without blaming it for unchanged baseline errors.
60
- 5. For JavaScript/TypeScript output, additionally stages every accepted unit into an in-memory candidate overlay and type-checks the combined candidate project with the TypeScript Compiler API imports/exports, methods and properties, argument counts, literal unions, object shapes, readonly rules, and call compatibility across the generated files together. Diagnostics are compared against the unchanged baseline, so pre-existing project errors are never blamed on generated units. A dependency-connected group that introduces new cross-file errors receives at most one bounded repair request per whole-file unit (same provider and model); if it still fails, every generated unit in that group is rejected before application while units proven independent may still apply. Other direct languages keep their per-file validation level.
61
- 6. Applies each accepted item defensively: new sibling files use exclusive creation, inline markers must still match the bytes found during discovery, and multi-line replacements inherit the marker's indentation. A failing or stale item is skipped with a reason rather than aborting the rest.
60
+ 5. When `direct.reconcileIntegrations` is explicitly enabled, audits ProjectMemory-evidenced groups of generated files across every supported language. A strict-JSON, read-only audit checks concrete imports/includes, modules/packages/namespaces, exports/signatures/calls, schemas/configuration, routes/templates/assets/selectors, and other evidenced contracts. Reported issues receive one target-scoped repair each and one verification audit; an unresolved connected group is rejected before application. This phase is off by default, so it adds no requests or rejection behavior to an ordinary upgrade.
61
+ 6. For JavaScript/TypeScript output, additionally stages every accepted unit into an in-memory candidate overlay and type-checks the combined candidate project with the TypeScript Compiler API — imports/exports, methods and properties, argument counts, literal unions, object shapes, readonly rules, and call compatibility across the generated files together. Diagnostics are compared against the unchanged baseline, so pre-existing project errors are never blamed on generated units. A dependency-connected group that introduces new cross-file errors receives at most one bounded repair request per whole-file unit (same provider and model); if it still fails, every generated unit in that group is rejected before application while units proven independent may still apply. Other direct languages keep their per-file validation level.
62
+ 7. Applies each accepted item defensively: new sibling files use exclusive creation, inline markers must still match the bytes found during discovery, and multi-line replacements inherit the marker's indentation. A failing or stale item is skipped with a reason rather than aborting the rest.
62
63
 
63
- The direct converter writes code straight to the working tree. Its combined static compiler validation for JS/TS is stronger than syntax parsing, but it is still static analysis: it does **not** execute or import project code, run project builds or tests, prove runtime behavior or external-API grounding, execute code in a sandbox, create a `.strict.human.json` change contract, produce a `VERIFIED` run, or perform the guided pipeline's repository-wide secret scan only the indexed declarations it attaches to an inline prompt as context are secret-scanned (a finding is `SECURITY_BLOCKED`). For the reviewed contract → grounding → sandbox-validation lifecycle — where the `.strict.human.json` contract and the `VERIFIED`/`apply`/`rollback` machinery live — use `human-to-code guided` (see [The reviewed change contract](#the-reviewed-change-contract) and the [CLI](#cli) table).
64
+ The direct converter writes code straight to the working tree. Its combined static compiler validation for JS/TS is stronger than syntax parsing, but it is still static analysis: it does **not** execute or import project code, run project builds or tests, prove runtime behavior or external-API grounding, execute code in a sandbox, create a `.strict.human.json` change contract, produce a `VERIFIED` run, or perform the guided pipeline's repository-wide secret scan. Direct outbound FileMemory and optional integration-reconciliation candidate bundles are credential-scanned, while ProjectMemory omits credential-bearing contracts; these narrower gates are not a repository-wide proof. For the reviewed contract → grounding → sandbox-validation lifecycle — where the `.strict.human.json` contract and the `VERIFIED`/`apply`/`rollback` machinery live — use `human-to-code guided` (see [The reviewed change contract](#the-reviewed-change-contract) and the [CLI](#cli) table).
64
65
 
65
66
  No configured provider is needed to scan and preview. A default run selects loopback-local Ollama with `qwen2.5-coder:7b`, so a fresh `npx human-to-code .` never transmits code remotely by default. The model must already be installed; the tool never pulls it implicitly. To use another local model, OpenAI, or Ollama Cloud, create and edit a config (the command never overwrites one):
66
67
 
@@ -149,9 +150,11 @@ text generation work fine.
149
150
  all planned outputs succeed, stores the complete conversion plan and renders
150
151
  its target-relevant bounded subset with an explicit omitted count, supplies
151
152
  exact relative references to likely companion files, and summarizes relevant
152
- imports, exports/declarations, HTML ids/classes/references, CSS
153
- selectors/custom properties, DOM selectors, nearby web assets, language
154
- package/module conventions, and package metadata. It is
153
+ imports/includes, exports/declarations, modules/packages/namespaces,
154
+ language-specific references and manifests, plus markup ids/classes/assets,
155
+ stylesheet selectors/custom properties, and DOM selectors where relevant.
156
+ Ecosystem rules live in extensible profiles; the ProjectMemory and optional
157
+ reconciliation orchestration do not assume a web application. It is
155
158
  rebuilt for each run rather than persisted, so it cannot become a stale cache.
156
159
  Accepted candidates update the shared in-memory contracts before later files
157
160
  are generated.
@@ -165,6 +168,12 @@ text generation work fine.
165
168
  bounded repair attempt per whole-file unit); independent units still apply.
166
169
  Pre-existing baseline errors are never attributed to generated code. This is
167
170
  static compilation, not sandbox execution, runtime testing, or API grounding.
171
+ - **Optional cross-language reconciliation** —
172
+ `direct.reconcileIntegrations` defaults to `false`. When enabled, the host
173
+ forms bounded relationship groups from ProjectMemory, asks for one strict
174
+ read-only audit, repairs only named generated targets, and verifies once.
175
+ Independent files are not coupled merely because they share a run. The
176
+ receipt discloses conservative audit and target-repair ceilings.
168
177
  - **Clear, stable output** — a single truncated status line per marker
169
178
  (`✓ app.ts (inline @human, line 12)` / `⊘ skipped … : <reason>`), plus an
170
179
  in-place elapsed spinner while a completion is in flight.
@@ -178,12 +187,20 @@ references `styles.css` and `script.js`. After HTML is accepted, the CSS and
178
187
  JavaScript requests see its generated ids and classes as a compact contract.
179
188
  For a nested target, ProjectMemory computes the correct relative reference
180
189
  such as `../styles.css`; it does not assume every file lives at the root.
190
+ The same mechanism describes Python modules, Rust crate modules, Go packages,
191
+ Java/C# namespaces and types, C/C++ headers, Ruby loaders, and same-language
192
+ companions. Those conventions are profile data; the grouping, audit, repair,
193
+ and verification control flow is shared.
181
194
 
182
195
  ProjectMemory is evidence for generation, not proof of correctness. Its prompt
183
196
  contract tells the model to connect genuine companions without importing every
184
- file it sees. JS/TS relationships still receive combined compiler validation;
185
- HTML/CSS relationships are not runtime-tested by the direct engine, so use the
186
- guided path when integration must be sandbox-verified.
197
+ file it sees. JS/TS relationships still receive combined compiler validation.
198
+ Cross-file relationships are not runtime-tested by the direct engine. The
199
+ optional `direct.reconcileIntegrations` pass audits compact contracts across
200
+ supported languages and verifies any target-scoped model repair once, but it is
201
+ deliberately off by default and is not a compiler, runtime, or sandbox proof for
202
+ Python, Rust, web projects, or any other ecosystem. Use the guided path when
203
+ integration must be sandbox-verified.
187
204
 
188
205
  ```bash
189
206
  # Deterministic engine — works with small models:
@@ -288,6 +305,9 @@ This complete local-Ollama example shows the policy fields:
288
305
  "maxRequests": 12,
289
306
  "maxRepairs": 2,
290
307
  "timeoutMs": 900000
308
+ },
309
+ "direct": {
310
+ "reconcileIntegrations": false
291
311
  }
292
312
  }
293
313
  ```
@@ -296,6 +316,17 @@ This complete local-Ollama example shows the policy fields:
296
316
 
297
317
  `humanFileExtensions` provides the strongest routing signal. Each entry binds one exact, portable project-relative `.human` path to an output extension; a leading dot is optional, and the extension's language must appear in `languages`. This prevents prompt vocabulary from changing the output: the example always routes `script.human` to `script.js`, even if its instruction repeatedly mentions stylesheets, CSS classes, colors, or themes. Recognized inner extensions are replaced when an explicit mapping is present, so mapping `page.html.human` to `js` produces `page.js`.
298
318
 
319
+ `direct.reconcileIntegrations` is an opt-in post-generation safety net. The
320
+ default `false` keeps the established ProjectMemory first pass unchanged and
321
+ adds no provider calls, checks, group coupling, or receipt fields. With `true`,
322
+ the receipt/JSON plan discloses conservative audit and target-repair ceilings.
323
+ ProjectMemory supplies structured relationships using extensible language
324
+ profiles; the generic orchestrator audits only connected generated groups,
325
+ validates strict JSON against real generated paths, repairs each named target at
326
+ most once, and performs at most one verification audit. A failed bounded cycle
327
+ rejects that evidenced group instead of writing a known-inconsistent partial
328
+ result.
329
+
299
330
  The direct engine uses `privacy.maxContextTokens` as the combined upper bound
300
331
  for FileMemory and ProjectMemory. ProjectMemory additionally caps each rendered
301
332
  block at 24,000 characters, reads at most 240 high-priority files for compact
package/SECURITY.md CHANGED
@@ -51,8 +51,9 @@ imported or executed and no project scripts run during this validation.
51
51
 
52
52
  Direct ProjectMemory is rebuilt from the static discovery inventory for each
53
53
  run. It may send project-relative filenames and compact source-derived
54
- contracts (declarations/imports, HTML ids/classes/references, CSS selectors,
55
- DOM selectors, and limited package metadata) to the selected model. It also
54
+ contracts (declarations/imports/includes, modules/packages/namespaces,
55
+ language-specific references, markup/style/asset contracts where relevant,
56
+ and limited package metadata) to the selected model. It also
56
57
  contains the planned post-conversion output tree and other `.human` purposes so
57
58
  the model can coordinate files. Protected paths, configured ignored/excluded
58
59
  paths, oversized/unreadable files, and credential-bearing contracts are
@@ -62,15 +63,29 @@ no `context --explain` preview. Remote direct conversion therefore remains
62
63
  blocked until explicit project-level remote-provider consent; use local Ollama
63
64
  or the guided flow when this compact context is not appropriate to transmit.
64
65
 
66
+ Post-generation integration reconciliation is a separate explicit opt-in
67
+ (`direct.reconcileIntegrations`, default `false`). When disabled, it performs
68
+ no audit and sends no additional request. When enabled, ProjectMemory supplies
69
+ structured language relationships and the generic orchestrator forms bounded
70
+ generated-file groups. A read-only audit must return strict JSON whose target
71
+ and related paths are members of that exact group. Each reported target may
72
+ receive one bounded repair followed by one verification audit. Audit/repair
73
+ bundles are credential-scanned; file purposes, contracts, diagnostics, and
74
+ source are prompt-isolated as untrusted evidence. Malformed output, invented
75
+ paths, exhausted context, or unresolved issues reject the connected opt-in
76
+ group before writing. This is model-assisted static consistency checking, not
77
+ compiler, runtime, or sandbox verification.
78
+
65
79
  These controls prevent the specific malformed-output, overwrite, stale-range,
66
80
  indentation, and cross-file-contract failures they check. Static compilation
67
81
  is stronger than syntax parsing, but it does not prove runtime behavior,
68
82
  external-API grounding, project-wide security properties, or test success,
69
83
  and it never executes the candidate in a sandbox or claims `VERIFIED`. Other
70
84
  direct programming languages keep their per-file structural validation level;
71
- HTML and CSS use only the non-empty and code-fence gates. Use the
72
- guided contract and validation path when those stronger boundaries are
73
- required.
85
+ Non-JS/TS languages normally keep their per-file syntax/structure gates; the
86
+ optional generic reconciliation adds the bounded contract audit described
87
+ above. Use the guided contract and validation path when stronger boundaries
88
+ are required.
74
89
 
75
90
  ### The reviewed contract owns authority
76
91
 
@@ -1,13 +1,35 @@
1
+ import { type DirectIntegrationAuditFile, type DirectIntegrationIssue, type DirectIntegrationRelationship } from "../../prompts/direct-integration.ts";
1
2
  import { type DirectRepairDiagnostic, type DirectRepairRelatedFile } from "../../prompts/direct-repair.ts";
2
3
  import type { GenerateOptions } from "./types.ts";
3
4
  /** Send one direct-conversion request to OpenAI-compatible chat or Ollama. */
4
5
  export declare function generateCode(instruction: string, options: GenerateOptions): Promise<string>;
6
+ export interface IntegrationAuditGenerationRequest {
7
+ files: readonly DirectIntegrationAuditFile[];
8
+ relationships: readonly DirectIntegrationRelationship[];
9
+ projectMemory?: string;
10
+ }
11
+ /** Send one opt-in, read-only, cross-language integration audit request. */
12
+ export declare function generateIntegrationAudit(request: IntegrationAuditGenerationRequest, options: GenerateOptions): Promise<string>;
13
+ export interface IntegrationRepairGenerationRequest {
14
+ targetPath: string;
15
+ instruction: string;
16
+ currentCode: string;
17
+ issues: readonly DirectIntegrationIssue[];
18
+ relatedFiles: ReadonlyArray<{
19
+ path: string;
20
+ content: string;
21
+ }>;
22
+ projectMemory?: string;
23
+ }
24
+ /** Send one bounded target repair after a generic integration audit. */
25
+ export declare function generateIntegrationRepairCode(request: IntegrationRepairGenerationRequest, options: GenerateOptions): Promise<string>;
5
26
  export interface RepairGenerationRequest {
6
27
  targetPath: string;
7
28
  inline: boolean;
8
29
  instruction: string;
9
30
  currentCode: string;
10
31
  diagnostics: readonly DirectRepairDiagnostic[];
32
+ hints?: readonly string[];
11
33
  relatedFiles: readonly DirectRepairRelatedFile[];
12
34
  projectMemory?: string;
13
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generation-client.d.ts","sourceRoot":"","sources":["../../../src/agents/direct/generation-client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+ClD,8EAA8E;AAC9E,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAWjG;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC/C,YAAY,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,mFAAmF;AACnF,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAIjB"}
1
+ {"version":3,"file":"generation-client.d.ts","sourceRoot":"","sources":["../../../src/agents/direct/generation-client.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EACnC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+ClD,8EAA8E;AAC9E,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAWjG;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC7C,aAAa,EAAE,SAAS,6BAA6B,EAAE,CAAC;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,4EAA4E;AAC5E,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,iCAAiC,EAC1C,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,MAAM,WAAW,kCAAkC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC1C,YAAY,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wEAAwE;AACxE,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,kCAAkC,EAC3C,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAIjB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC/C,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,mFAAmF;AACnF,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAIjB"}
@@ -1,4 +1,5 @@
1
1
  import { buildDirectConversionPrompt } from "../../prompts/direct-conversion.js";
2
+ import { buildDirectIntegrationAuditPrompt, buildDirectIntegrationRepairPrompt, } from "../../prompts/direct-integration.js";
2
3
  import { buildDirectRepairPrompt, } from "../../prompts/direct-repair.js";
3
4
  import { languageProfile } from "./languages.js";
4
5
  import { stripCodeFence } from "./presentation.js";
@@ -60,6 +61,17 @@ export async function generateCode(instruction, options) {
60
61
  });
61
62
  return requestChatCompletion(prompt, options);
62
63
  }
64
+ /** Send one opt-in, read-only, cross-language integration audit request. */
65
+ export async function generateIntegrationAudit(request, options) {
66
+ const prompt = buildDirectIntegrationAuditPrompt(request);
67
+ return requestChatCompletion(prompt, options);
68
+ }
69
+ /** Send one bounded target repair after a generic integration audit. */
70
+ export async function generateIntegrationRepairCode(request, options) {
71
+ const profile = languageProfile(options.language);
72
+ const prompt = buildDirectIntegrationRepairPrompt({ languageLabel: profile.label, ...request });
73
+ return requestChatCompletion(prompt, options);
74
+ }
63
75
  /** Send one bounded cross-file repair request with the same provider and model. */
64
76
  export async function generateRepairCode(request, options) {
65
77
  const profile = languageProfile(options.language);
@@ -1 +1 @@
1
- {"version":3,"file":"generation-client.js","sourceRoot":"","sources":["../../../src/agents/direct/generation-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAuB,MAAM,oCAAoC,CAAC;AACtG,OAAO,EACL,uBAAuB,GAGxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,0EAA0E;AAC1E,KAAK,UAAU,qBAAqB,CAAC,MAAsB,EAAE,OAAwB;IACnF,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,2BAA2B,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,mBAAmB,EAAE;YACvD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACzE;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,QAAQ,EAAE;oBACR,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,C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kC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,OAAO,qBAAqB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AAaD,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAgC,EAChC,OAAwB;IAExB,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,uBAAuB,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,OAAO,qBAAqB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
@@ -5,6 +5,7 @@ export * from "./marker-parser.ts";
5
5
  export * from "./file-memory.ts";
6
6
  export * from "./project-memory.ts";
7
7
  export * from "./project-contracts.ts";
8
+ export * from "./language-relationships.ts";
8
9
  export * from "./discovery.ts";
9
10
  export * from "./presentation.ts";
10
11
  export * from "./generation-client.ts";
@@ -15,5 +16,6 @@ export * from "./candidate-validation.ts";
15
16
  export * from "./candidate-overlay.ts";
16
17
  export * from "./program-diagnostics.ts";
17
18
  export * from "./dependency-graph.ts";
19
+ export * from "./integration-validation.ts";
18
20
  export * from "./staged-validation.ts";
19
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/direct/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/direct/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}
@@ -5,6 +5,7 @@ export * from "./marker-parser.js";
5
5
  export * from "./file-memory.js";
6
6
  export * from "./project-memory.js";
7
7
  export * from "./project-contracts.js";
8
+ export * from "./language-relationships.js";
8
9
  export * from "./discovery.js";
9
10
  export * from "./presentation.js";
10
11
  export * from "./generation-client.js";
@@ -15,5 +16,6 @@ export * from "./candidate-validation.js";
15
16
  export * from "./candidate-overlay.js";
16
17
  export * from "./program-diagnostics.js";
17
18
  export * from "./dependency-graph.js";
19
+ export * from "./integration-validation.js";
18
20
  export * from "./staged-validation.js";
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/direct/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/direct/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { DirectIntegrationAuditFile, DirectIntegrationIssue, DirectIntegrationRelationship } from "../../prompts/direct-integration.ts";
2
+ import type { ConversionUnit, GeneratedConversionUnit, ProjectMemoryProvider, ProjectRelationship } from "./types.ts";
3
+ export interface IntegrationAuditRequest {
4
+ /** Representative unit used for provider defaults and target-specific memory. */
5
+ unit: ConversionUnit;
6
+ units: ConversionUnit[];
7
+ files: DirectIntegrationAuditFile[];
8
+ relationships: DirectIntegrationRelationship[];
9
+ projectMemory?: string;
10
+ }
11
+ export interface IntegrationRepairRequest {
12
+ unit: ConversionUnit;
13
+ targetPath: string;
14
+ instruction: string;
15
+ currentCode: string;
16
+ issues: DirectIntegrationIssue[];
17
+ relatedFiles: Array<{
18
+ path: string;
19
+ content: string;
20
+ }>;
21
+ projectMemory?: string;
22
+ }
23
+ export interface IntegrationAuditResult {
24
+ status: "consistent" | "issues";
25
+ issues: DirectIntegrationIssue[];
26
+ }
27
+ export type IntegrationProgress = {
28
+ kind: "integration-audit";
29
+ unit: ConversionUnit;
30
+ pass: number;
31
+ files: number;
32
+ } | {
33
+ kind: "integration-repair";
34
+ unit: ConversionUnit;
35
+ attempt: number;
36
+ issues: number;
37
+ } | {
38
+ kind: "reject";
39
+ unit: ConversionUnit;
40
+ reason: string;
41
+ };
42
+ export interface IntegrationValidationOptions {
43
+ audit?: (request: IntegrationAuditRequest) => Promise<string>;
44
+ repair?: (request: IntegrationRepairRequest) => Promise<string>;
45
+ /** Initial audit plus one verification audit by default. */
46
+ maxAuditPassesPerGroup?: number;
47
+ /** One target-scoped repair per generated file by default. */
48
+ maxRepairAttemptsPerUnit?: number;
49
+ contextCharBudget?: number;
50
+ projectMemory?: ProjectMemoryProvider;
51
+ onProgress?: (event: IntegrationProgress) => void;
52
+ }
53
+ export interface IntegrationValidationOutcome {
54
+ results: GeneratedConversionUnit[];
55
+ auditRequests: number;
56
+ repairRequests: number;
57
+ checkedGroups: number;
58
+ }
59
+ /** Strictly validate the model's audit JSON against the exact generated group. */
60
+ export declare function parseIntegrationAuditOutput(output: string, allowedPaths: ReadonlySet<string>): IntegrationAuditResult;
61
+ /** Conservative pre-run ceiling: two audits and one repair per whole-file unit. */
62
+ export declare function potentialIntegrationRequests(units: readonly ConversionUnit[]): {
63
+ auditUpTo: number;
64
+ repairUpTo: number;
65
+ };
66
+ /** Audit, repair, and verify generated relationship groups without writing. */
67
+ export declare function reconcileGeneratedIntegrations(generated: readonly GeneratedConversionUnit[], options?: IntegrationValidationOptions): Promise<IntegrationValidationOutcome>;
68
+ /** Helper for tests and alternative ProjectMemory implementations. */
69
+ export declare function generatedRelationshipsFor(unit: ConversionUnit, projectMemory: ProjectMemoryProvider): readonly ProjectRelationship[];
70
+ //# sourceMappingURL=integration-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-validation.d.ts","sourceRoot":"","sources":["../../../src/agents/direct/integration-validation.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EACtB,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACpC,aAAa,EAAE,6BAA6B,EAAE,CAAC;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,YAAY,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE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