Skip to content

Commit 168a6a8

Browse files
Point the factory result override at its removal issue
The `FactoryRunResult` override and its boundary cast are scaffolding for a schema limitation, not a permanent part of the surface. Name the tracking issue in both docblocks so whoever regenerates after the schema change knows exactly what to delete.
1 parent 8d59bea commit 168a6a8

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

nodejs/src/factory.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ import type { FactoryLimits, FactoryMeta } from "./types.js";
2323
* array — but the schema models the field as an opaque node, which the
2424
* generator renders as an object. Narrowing the correction to this surface
2525
* keeps the `x-opaque-json` handling unchanged for every other consumer.
26+
*
27+
* This override is temporary. Once the schema distinguishes an opaque JSON
28+
* value from an opaque in-process value and that ships in a CLI release,
29+
* regenerating produces the right type directly, and this declaration, the
30+
* `toPublicFactoryRunResult` boundary helper, and the casts around it should
31+
* all be deleted. Tracked by github/copilot-agent-runtime#14122.
2632
*/
2733
export type FactoryRunResult = Omit<WireFactoryRunResult, "result"> & {
2834
/** Completed factory result. */

nodejs/src/session.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ class FactoryProgressBuffer {
297297
* corrects that for the factory surface without changing `x-opaque-json`
298298
* handling for any other consumer, so the boundary needs a cast rather than a
299299
* conversion.
300+
*
301+
* Delete this along with the {@link FactoryRunResult} override once the schema
302+
* distinguishes opaque JSON values from opaque in-process values —
303+
* github/copilot-agent-runtime#14122.
300304
*/
301305
function toPublicFactoryRunResult(envelope: WireFactoryRunResult): FactoryRunResult {
302306
return envelope as FactoryRunResult;

0 commit comments

Comments
 (0)