@vendoai/apps 0.4.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.
- package/LICENSE +202 -0
- package/README.md +8 -0
- package/dist/adapter-conformance.d.ts +48 -0
- package/dist/adapter-conformance.d.ts.map +1 -0
- package/dist/adapter-conformance.js +196 -0
- package/dist/adapter-conformance.js.map +1 -0
- package/dist/agent-tools.d.ts +10 -0
- package/dist/agent-tools.d.ts.map +1 -0
- package/dist/agent-tools.js +252 -0
- package/dist/agent-tools.js.map +1 -0
- package/dist/app-data.d.ts +23 -0
- package/dist/app-data.d.ts.map +1 -0
- package/dist/app-data.js +129 -0
- package/dist/app-data.js.map +1 -0
- package/dist/app-token.d.ts +24 -0
- package/dist/app-token.d.ts.map +1 -0
- package/dist/app-token.js +61 -0
- package/dist/app-token.js.map +1 -0
- package/dist/audit.d.ts +11 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +19 -0
- package/dist/audit.js.map +1 -0
- package/dist/automation-plan.d.ts +43 -0
- package/dist/automation-plan.d.ts.map +1 -0
- package/dist/automation-plan.js +212 -0
- package/dist/automation-plan.js.map +1 -0
- package/dist/bench/client.d.ts +43 -0
- package/dist/bench/client.d.ts.map +1 -0
- package/dist/bench/client.js +129 -0
- package/dist/bench/client.js.map +1 -0
- package/dist/bench/fixtures.d.ts +42 -0
- package/dist/bench/fixtures.d.ts.map +1 -0
- package/dist/bench/fixtures.js +146 -0
- package/dist/bench/fixtures.js.map +1 -0
- package/dist/bench/judge.d.ts +9 -0
- package/dist/bench/judge.d.ts.map +1 -0
- package/dist/bench/judge.js +71 -0
- package/dist/bench/judge.js.map +1 -0
- package/dist/bench/metrics.d.ts +32 -0
- package/dist/bench/metrics.d.ts.map +1 -0
- package/dist/bench/metrics.js +172 -0
- package/dist/bench/metrics.js.map +1 -0
- package/dist/bench/prompts.d.ts +17 -0
- package/dist/bench/prompts.d.ts.map +1 -0
- package/dist/bench/prompts.js +100 -0
- package/dist/bench/prompts.js.map +1 -0
- package/dist/bench/report.d.ts +43 -0
- package/dist/bench/report.d.ts.map +1 -0
- package/dist/bench/report.js +74 -0
- package/dist/bench/report.js.map +1 -0
- package/dist/bench/runner.d.ts +15 -0
- package/dist/bench/runner.d.ts.map +1 -0
- package/dist/bench/runner.js +26 -0
- package/dist/bench/runner.js.map +1 -0
- package/dist/bench/toolfork.d.ts +18 -0
- package/dist/bench/toolfork.d.ts.map +1 -0
- package/dist/bench/toolfork.js +125 -0
- package/dist/bench/toolfork.js.map +1 -0
- package/dist/box-agent.d.ts +78 -0
- package/dist/box-agent.d.ts.map +1 -0
- package/dist/box-agent.js +137 -0
- package/dist/box-agent.js.map +1 -0
- package/dist/box-env.d.ts +26 -0
- package/dist/box-env.d.ts.map +1 -0
- package/dist/box-env.js +52 -0
- package/dist/box-env.js.map +1 -0
- package/dist/call.d.ts +23 -0
- package/dist/call.d.ts.map +1 -0
- package/dist/call.js +45 -0
- package/dist/call.js.map +1 -0
- package/dist/cloud.d.ts +4917 -0
- package/dist/cloud.d.ts.map +1 -0
- package/dist/cloud.js +16 -0
- package/dist/cloud.js.map +1 -0
- package/dist/e2b/index.d.ts +30 -0
- package/dist/e2b/index.d.ts.map +1 -0
- package/dist/e2b/index.js +273 -0
- package/dist/e2b/index.js.map +1 -0
- package/dist/egress-approval.d.ts +73 -0
- package/dist/egress-approval.d.ts.map +1 -0
- package/dist/egress-approval.js +74 -0
- package/dist/egress-approval.js.map +1 -0
- package/dist/engine.d.ts +188 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +1507 -0
- package/dist/engine.js.map +1 -0
- package/dist/fn.d.ts +22 -0
- package/dist/fn.d.ts.map +1 -0
- package/dist/fn.js +108 -0
- package/dist/fn.js.map +1 -0
- package/dist/history.d.ts +21 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +158 -0
- package/dist/history.js.map +1 -0
- package/dist/inclient.d.ts +48 -0
- package/dist/inclient.d.ts.map +1 -0
- package/dist/inclient.js +68 -0
- package/dist/inclient.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/interchange.d.ts +17 -0
- package/dist/interchange.d.ts.map +1 -0
- package/dist/interchange.js +133 -0
- package/dist/interchange.js.map +1 -0
- package/dist/machine-lifecycle.d.ts +102 -0
- package/dist/machine-lifecycle.d.ts.map +1 -0
- package/dist/machine-lifecycle.js +360 -0
- package/dist/machine-lifecycle.js.map +1 -0
- package/dist/manifest.d.ts +42 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +53 -0
- package/dist/manifest.js.map +1 -0
- package/dist/open.d.ts +45 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +245 -0
- package/dist/open.js.map +1 -0
- package/dist/parked-action.d.ts +51 -0
- package/dist/parked-action.d.ts.map +1 -0
- package/dist/parked-action.js +29 -0
- package/dist/parked-action.js.map +1 -0
- package/dist/persistence.d.ts +41 -0
- package/dist/persistence.d.ts.map +1 -0
- package/dist/persistence.js +86 -0
- package/dist/persistence.js.map +1 -0
- package/dist/pins.d.ts +231 -0
- package/dist/pins.d.ts.map +1 -0
- package/dist/pins.js +213 -0
- package/dist/pins.js.map +1 -0
- package/dist/pipeline.d.ts +142 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +1014 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/prewired-schema.d.ts +16 -0
- package/dist/prewired-schema.d.ts.map +1 -0
- package/dist/prewired-schema.js +48 -0
- package/dist/prewired-schema.js.map +1 -0
- package/dist/redaction.d.ts +13 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +67 -0
- package/dist/redaction.js.map +1 -0
- package/dist/runtime.d.ts +463 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1715 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sandbox.d.ts +90 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +2 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/schedules.d.ts +89 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +334 -0
- package/dist/schedules.js.map +1 -0
- package/dist/secret-exposure.d.ts +55 -0
- package/dist/secret-exposure.d.ts.map +1 -0
- package/dist/secret-exposure.js +53 -0
- package/dist/secret-exposure.js.map +1 -0
- package/dist/ship-diff.d.ts +47 -0
- package/dist/ship-diff.d.ts.map +1 -0
- package/dist/ship-diff.js +39 -0
- package/dist/ship-diff.js.map +1 -0
- package/dist/testing/fake-box.d.ts +67 -0
- package/dist/testing/fake-box.d.ts.map +1 -0
- package/dist/testing/fake-box.js +166 -0
- package/dist/testing/fake-box.js.map +1 -0
- package/dist/testing/fake-sandbox-v2.d.ts +59 -0
- package/dist/testing/fake-sandbox-v2.d.ts.map +1 -0
- package/dist/testing/fake-sandbox-v2.js +121 -0
- package/dist/testing/fake-sandbox-v2.js.map +1 -0
- package/dist/testing/fake-sandbox.d.ts +94 -0
- package/dist/testing/fake-sandbox.d.ts.map +1 -0
- package/dist/testing/fake-sandbox.js +239 -0
- package/dist/testing/fake-sandbox.js.map +1 -0
- package/dist/testing/guard-fixture.d.ts +19 -0
- package/dist/testing/guard-fixture.d.ts.map +1 -0
- package/dist/testing/guard-fixture.js +134 -0
- package/dist/testing/guard-fixture.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +8 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/memory-store.d.ts +5 -0
- package/dist/testing/memory-store.d.ts.map +1 -0
- package/dist/testing/memory-store.js +4 -0
- package/dist/testing/memory-store.js.map +1 -0
- package/dist/testing/scripted-model.d.ts +32 -0
- package/dist/testing/scripted-model.d.ts.map +1 -0
- package/dist/testing/scripted-model.js +112 -0
- package/dist/testing/scripted-model.js.map +1 -0
- package/dist/testing/seed-app-row.d.ts +4 -0
- package/dist/testing/seed-app-row.d.ts.map +1 -0
- package/dist/testing/seed-app-row.js +7 -0
- package/dist/testing/seed-app-row.js.map +1 -0
- package/dist/unified-diff.d.ts +13 -0
- package/dist/unified-diff.d.ts.map +1 -0
- package/dist/unified-diff.js +127 -0
- package/dist/unified-diff.js.map +1 -0
- package/dist/version-hash.d.ts +9 -0
- package/dist/version-hash.d.ts.map +1 -0
- package/dist/version-hash.js +12 -0
- package/dist/version-hash.js.map +1 -0
- package/package.json +84 -0
package/dist/pins.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { type AppDocument, type AppId, type IsoDateTime, type Json, type Pin } from "@vendoai/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/** 06-apps §8 — source captured from one host remixable component slot. */
|
|
4
|
+
export interface PinBaseline {
|
|
5
|
+
slot: string;
|
|
6
|
+
source: string;
|
|
7
|
+
hash: string;
|
|
8
|
+
exportable: boolean;
|
|
9
|
+
capturedAt: IsoDateTime;
|
|
10
|
+
sourceImports?: Record<string, string>;
|
|
11
|
+
subSources?: Record<string, PinSubSource>;
|
|
12
|
+
sampleProps?: Record<string, Json>;
|
|
13
|
+
styles?: PinStyle[];
|
|
14
|
+
}
|
|
15
|
+
/** Captured source-owned virtual module plus its own resolved import table. */
|
|
16
|
+
export interface PinSubSource {
|
|
17
|
+
source: string;
|
|
18
|
+
imports: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/** One inert host stylesheet snapshot captured from a canonical app root. */
|
|
21
|
+
export interface PinStyle {
|
|
22
|
+
path: string;
|
|
23
|
+
css: string;
|
|
24
|
+
}
|
|
25
|
+
/** 06-apps §8 — validated persisted representation of a captured host baseline. */
|
|
26
|
+
export declare const pinBaselineSchema: z.ZodObject<{
|
|
27
|
+
slot: z.ZodString;
|
|
28
|
+
source: z.ZodString;
|
|
29
|
+
hash: z.ZodString;
|
|
30
|
+
exportable: z.ZodBoolean;
|
|
31
|
+
capturedAt: z.ZodString;
|
|
32
|
+
sourceImports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
33
|
+
subSources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
34
|
+
source: z.ZodString;
|
|
35
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
36
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
37
|
+
source: z.ZodString;
|
|
38
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
39
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
40
|
+
source: z.ZodString;
|
|
41
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
42
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
43
|
+
sampleProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
44
|
+
styles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
css: z.ZodString;
|
|
47
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
48
|
+
path: z.ZodString;
|
|
49
|
+
css: z.ZodString;
|
|
50
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
css: z.ZodString;
|
|
53
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
54
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
55
|
+
slot: z.ZodString;
|
|
56
|
+
source: z.ZodString;
|
|
57
|
+
hash: z.ZodString;
|
|
58
|
+
exportable: z.ZodBoolean;
|
|
59
|
+
capturedAt: z.ZodString;
|
|
60
|
+
sourceImports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61
|
+
subSources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
62
|
+
source: z.ZodString;
|
|
63
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
64
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
65
|
+
source: z.ZodString;
|
|
66
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
67
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
68
|
+
source: z.ZodString;
|
|
69
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
70
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
71
|
+
sampleProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
72
|
+
styles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
73
|
+
path: z.ZodString;
|
|
74
|
+
css: z.ZodString;
|
|
75
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
76
|
+
path: z.ZodString;
|
|
77
|
+
css: z.ZodString;
|
|
78
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
79
|
+
path: z.ZodString;
|
|
80
|
+
css: z.ZodString;
|
|
81
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
82
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
83
|
+
slot: z.ZodString;
|
|
84
|
+
source: z.ZodString;
|
|
85
|
+
hash: z.ZodString;
|
|
86
|
+
exportable: z.ZodBoolean;
|
|
87
|
+
capturedAt: z.ZodString;
|
|
88
|
+
sourceImports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
subSources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
90
|
+
source: z.ZodString;
|
|
91
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
92
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
93
|
+
source: z.ZodString;
|
|
94
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
95
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
96
|
+
source: z.ZodString;
|
|
97
|
+
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
98
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
99
|
+
sampleProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
100
|
+
styles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
101
|
+
path: z.ZodString;
|
|
102
|
+
css: z.ZodString;
|
|
103
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
css: z.ZodString;
|
|
106
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
107
|
+
path: z.ZodString;
|
|
108
|
+
css: z.ZodString;
|
|
109
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
110
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
111
|
+
/** Internal stable generated-component name for one captured host slot. */
|
|
112
|
+
export declare const pinComponentName: (slot: string) => string;
|
|
113
|
+
/** Whether the fork entry source exposes the default export the jail renders:
|
|
114
|
+
`export default …`, `export { X as default }`, or `export { default } from …`
|
|
115
|
+
— but NOT a renamed re-export like `export { default as X } from …`, which
|
|
116
|
+
exposes only the named binding. */
|
|
117
|
+
export declare const hasDefaultExport: (rawSource: string) => boolean;
|
|
118
|
+
/**
|
|
119
|
+
* ENG-348 — the generated-component entry source a fork ships. The jail entry
|
|
120
|
+
* renders only a default export, but a host may register a NAMED export as
|
|
121
|
+
* remixable and sync captures its module verbatim; forking that capture as-is
|
|
122
|
+
* crashes at render ("must have a React default export"). Synthesize the
|
|
123
|
+
* default export by aliasing the captured component's named export. A source
|
|
124
|
+
* that already has a default export — or offers no component-cased export to
|
|
125
|
+
* alias — passes through verbatim.
|
|
126
|
+
*/
|
|
127
|
+
export declare const pinForkSource: (source: string) => string;
|
|
128
|
+
/** 06-apps §8 — unified source diff proposed for host approval. */
|
|
129
|
+
export interface PinShipRequest {
|
|
130
|
+
appId: AppId;
|
|
131
|
+
slot: string;
|
|
132
|
+
baseHash: string;
|
|
133
|
+
diff: string;
|
|
134
|
+
}
|
|
135
|
+
/** 06-apps §8 — validated wire representation of a pin ship request. */
|
|
136
|
+
export declare const pinShipRequestSchema: z.ZodObject<{
|
|
137
|
+
appId: z.ZodString;
|
|
138
|
+
slot: z.ZodString;
|
|
139
|
+
baseHash: z.ZodString;
|
|
140
|
+
diff: z.ZodString;
|
|
141
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
142
|
+
appId: z.ZodString;
|
|
143
|
+
slot: z.ZodString;
|
|
144
|
+
baseHash: z.ZodString;
|
|
145
|
+
diff: z.ZodString;
|
|
146
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
147
|
+
appId: z.ZodString;
|
|
148
|
+
slot: z.ZodString;
|
|
149
|
+
baseHash: z.ZodString;
|
|
150
|
+
diff: z.ZodString;
|
|
151
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
152
|
+
/** 06-apps §8 — immutable host approval for one baseline-to-version transition. */
|
|
153
|
+
export interface PinApproval {
|
|
154
|
+
slot: string;
|
|
155
|
+
baseHash: string;
|
|
156
|
+
approvedHash: string;
|
|
157
|
+
approvedBy: string;
|
|
158
|
+
at: IsoDateTime;
|
|
159
|
+
}
|
|
160
|
+
/** 06-apps §8 — validated wire representation of a host pin approval. */
|
|
161
|
+
export declare const pinApprovalSchema: z.ZodObject<{
|
|
162
|
+
slot: z.ZodString;
|
|
163
|
+
baseHash: z.ZodString;
|
|
164
|
+
approvedHash: z.ZodString;
|
|
165
|
+
approvedBy: z.ZodString;
|
|
166
|
+
at: z.ZodString;
|
|
167
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
168
|
+
slot: z.ZodString;
|
|
169
|
+
baseHash: z.ZodString;
|
|
170
|
+
approvedHash: z.ZodString;
|
|
171
|
+
approvedBy: z.ZodString;
|
|
172
|
+
at: z.ZodString;
|
|
173
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
174
|
+
slot: z.ZodString;
|
|
175
|
+
baseHash: z.ZodString;
|
|
176
|
+
approvedHash: z.ZodString;
|
|
177
|
+
approvedBy: z.ZodString;
|
|
178
|
+
at: z.ZodString;
|
|
179
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
180
|
+
/** 06-apps §9 — approval to mount one exact app version in the host page. */
|
|
181
|
+
export interface InClientApproval {
|
|
182
|
+
appId: AppId;
|
|
183
|
+
versionHash: string;
|
|
184
|
+
approvedBy: string;
|
|
185
|
+
at: IsoDateTime;
|
|
186
|
+
}
|
|
187
|
+
/** 06-apps §9 — validated wire representation of an in-client approval. */
|
|
188
|
+
export declare const inClientApprovalSchema: z.ZodObject<{
|
|
189
|
+
appId: z.ZodString;
|
|
190
|
+
versionHash: z.ZodString;
|
|
191
|
+
approvedBy: z.ZodString;
|
|
192
|
+
at: z.ZodString;
|
|
193
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
194
|
+
appId: z.ZodString;
|
|
195
|
+
versionHash: z.ZodString;
|
|
196
|
+
approvedBy: z.ZodString;
|
|
197
|
+
at: z.ZodString;
|
|
198
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
199
|
+
appId: z.ZodString;
|
|
200
|
+
versionHash: z.ZodString;
|
|
201
|
+
approvedBy: z.ZodString;
|
|
202
|
+
at: z.ZodString;
|
|
203
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
204
|
+
/**
|
|
205
|
+
* 06-apps §8 — one drifted pin: the host component changed (or its baseline
|
|
206
|
+
* disappeared) under a fork, so the fork's `base` no longer names the source
|
|
207
|
+
* the host is running. SERVER-AUTHORITATIVE when it rides an open() payload:
|
|
208
|
+
* only `detectPinDrift` over the composition's loaded baselines writes it.
|
|
209
|
+
*/
|
|
210
|
+
export interface PinDrift {
|
|
211
|
+
slot: string;
|
|
212
|
+
/** The generated-component name the fork ships under (`pinComponentName`). */
|
|
213
|
+
component: string;
|
|
214
|
+
/** The baseline hash the pin was forked from (`Pin.base`). */
|
|
215
|
+
baseHash: string;
|
|
216
|
+
/** The hash of the currently captured host baseline, when one exists. */
|
|
217
|
+
baselineHash?: string;
|
|
218
|
+
reason: "baseline-changed" | "baseline-missing";
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* 06-apps §8 — "a host update to the component marks the pin drifted". Pure
|
|
222
|
+
* over the app document and the composition's loaded baselines so the opener,
|
|
223
|
+
* the edit path, and the rebase surface all report the same verdict.
|
|
224
|
+
*/
|
|
225
|
+
export declare const detectPinDrift: (doc: AppDocument, baselines: readonly PinBaseline[]) => PinDrift[];
|
|
226
|
+
/**
|
|
227
|
+
* 06-apps §7–§8 — require explicit host permission for every exported pin.
|
|
228
|
+
* Missing baselines fail closed because an artifact export must never strip pins.
|
|
229
|
+
*/
|
|
230
|
+
export declare const assertPinsExportable: (pins: readonly Pin[], baselines: readonly PinBaseline[]) => void;
|
|
231
|
+
//# sourceMappingURL=pins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pins.d.ts","sourceRoot":"","sources":["../src/pins.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,GAAG,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC1C,WAAW,CA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MmB,CAAC;AAElD,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,WAAW,CAAC;CACjB;AAED,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;gCAKmB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;CACjD;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,KAAK,WAAW,EAChB,WAAW,SAAS,WAAW,EAAE,KAChC,QAAQ,EAUT,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,SAAS,GAAG,EAAE,EACpB,WAAW,SAAS,WAAW,EAAE,KAChC,IAaF,CAAC"}
|
package/dist/pins.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { VendoError, appIdSchema, isoDateTimeSchema, sha256Hex, } from "@vendoai/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const pinSubSourceSchema = z.object({
|
|
4
|
+
source: z.string(),
|
|
5
|
+
imports: z.record(z.string()),
|
|
6
|
+
}).passthrough();
|
|
7
|
+
const pinStyleSchema = z.object({
|
|
8
|
+
path: z.string(),
|
|
9
|
+
css: z.string(),
|
|
10
|
+
}).passthrough();
|
|
11
|
+
/** 06-apps §8 — validated persisted representation of a captured host baseline. */
|
|
12
|
+
export const pinBaselineSchema = z.object({
|
|
13
|
+
slot: z.string(),
|
|
14
|
+
source: z.string(),
|
|
15
|
+
hash: z.string().startsWith("sha256:"),
|
|
16
|
+
exportable: z.boolean(),
|
|
17
|
+
capturedAt: isoDateTimeSchema,
|
|
18
|
+
sourceImports: z.record(z.string()).optional(),
|
|
19
|
+
subSources: z.record(pinSubSourceSchema).optional(),
|
|
20
|
+
sampleProps: z.record(z.unknown()).optional(),
|
|
21
|
+
styles: z.array(pinStyleSchema).optional(),
|
|
22
|
+
}).passthrough();
|
|
23
|
+
/** Internal stable generated-component name for one captured host slot. */
|
|
24
|
+
export const pinComponentName = (slot) => {
|
|
25
|
+
const stem = (slot.match(/[A-Za-z0-9]+/g) ?? [])
|
|
26
|
+
.map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`)
|
|
27
|
+
.join("") || "Slot";
|
|
28
|
+
// The hash suffix prevents punctuation-only normalization collisions while
|
|
29
|
+
// keeping the name a valid generated-component PascalCase identifier.
|
|
30
|
+
return `Pinned${stem}${sha256Hex(slot).slice(0, 8)}`;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Blank comment and string/template contents (length-preserving) so export
|
|
34
|
+
* detection never matches commented-out or quoted code. (Adapted from the
|
|
35
|
+
* `stripComments` helper sync's extraction carried before it moved onto the
|
|
36
|
+
* TypeScript AST — actions may not be imported here.)
|
|
37
|
+
*/
|
|
38
|
+
const blankCommentsAndStrings = (source) => {
|
|
39
|
+
let output = "";
|
|
40
|
+
let quote = null;
|
|
41
|
+
let escaped = false;
|
|
42
|
+
for (let index = 0; index < source.length; index += 1) {
|
|
43
|
+
const character = source[index];
|
|
44
|
+
const next = source[index + 1];
|
|
45
|
+
if (quote) {
|
|
46
|
+
if (escaped) {
|
|
47
|
+
escaped = false;
|
|
48
|
+
output += " ";
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (character === "\\") {
|
|
52
|
+
escaped = true;
|
|
53
|
+
output += " ";
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (character === quote) {
|
|
57
|
+
quote = null;
|
|
58
|
+
output += character;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
output += character === "\n" ? "\n" : " ";
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (character === "'" || character === "\"" || character === "`") {
|
|
65
|
+
quote = character;
|
|
66
|
+
output += character;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (character === "/" && next === "/") {
|
|
70
|
+
while (index < source.length && source[index] !== "\n") {
|
|
71
|
+
output += " ";
|
|
72
|
+
index += 1;
|
|
73
|
+
}
|
|
74
|
+
if (index < source.length)
|
|
75
|
+
output += "\n";
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (character === "/" && next === "*") {
|
|
79
|
+
output += " ";
|
|
80
|
+
index += 2;
|
|
81
|
+
while (index < source.length && !(source[index] === "*" && source[index + 1] === "/")) {
|
|
82
|
+
output += source[index] === "\n" ? "\n" : " ";
|
|
83
|
+
index += 1;
|
|
84
|
+
}
|
|
85
|
+
if (index < source.length)
|
|
86
|
+
output += " ";
|
|
87
|
+
index += 1;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
output += character;
|
|
91
|
+
}
|
|
92
|
+
return output;
|
|
93
|
+
};
|
|
94
|
+
const EXPORT_LIST = /\bexport\s*\{([^}]*)\}/gu;
|
|
95
|
+
/** Whether the fork entry source exposes the default export the jail renders:
|
|
96
|
+
`export default …`, `export { X as default }`, or `export { default } from …`
|
|
97
|
+
— but NOT a renamed re-export like `export { default as X } from …`, which
|
|
98
|
+
exposes only the named binding. */
|
|
99
|
+
export const hasDefaultExport = (rawSource) => {
|
|
100
|
+
const source = blankCommentsAndStrings(rawSource);
|
|
101
|
+
// `export default interface …` (and any type-level default) is erased from
|
|
102
|
+
// the emitted JavaScript, so it is not a runtime default export.
|
|
103
|
+
if (/\bexport\s+default\b(?!\s+(?:interface|type)\b)/u.test(source))
|
|
104
|
+
return true;
|
|
105
|
+
for (const match of source.matchAll(EXPORT_LIST)) {
|
|
106
|
+
for (const entry of match[1].split(",")) {
|
|
107
|
+
const trimmed = entry.trim();
|
|
108
|
+
// A `type` entry is erased from the emitted JavaScript — no runtime default.
|
|
109
|
+
if (/^type\s/u.test(trimmed))
|
|
110
|
+
continue;
|
|
111
|
+
const [local, exported] = trimmed.split(/\s+as\s+/u).map((part) => part.trim());
|
|
112
|
+
if ((exported ?? local) === "default")
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return false;
|
|
117
|
+
};
|
|
118
|
+
/** Every named-export binding: the local name to alias plus the exported name. */
|
|
119
|
+
const namedExportBindings = (source) => {
|
|
120
|
+
const bindings = [];
|
|
121
|
+
const declaration = /\bexport\s+(?:async\s+)?(?:function\s*\*?|const|let|var|class)\s+([A-Za-z_$][\w$]*)/gu;
|
|
122
|
+
for (const match of source.matchAll(declaration)) {
|
|
123
|
+
bindings.push({ local: match[1], exported: match[1], at: match.index ?? 0 });
|
|
124
|
+
}
|
|
125
|
+
// Local export lists only — a `from` re-export has no local binding to alias.
|
|
126
|
+
const list = /\bexport\s*\{([^}]*)\}(?!\s*from\b)/gu;
|
|
127
|
+
for (const match of source.matchAll(list)) {
|
|
128
|
+
for (const entry of match[1].split(",")) {
|
|
129
|
+
const [local, exported] = entry.trim().split(/\s+as\s+/u).map((part) => part.trim());
|
|
130
|
+
if (!local || !/^[A-Za-z_$][\w$]*$/u.test(local))
|
|
131
|
+
continue;
|
|
132
|
+
bindings.push({ local, exported: exported ?? local, at: match.index ?? 0 });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return bindings.sort((left, right) => left.at - right.at);
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* ENG-348 — the generated-component entry source a fork ships. The jail entry
|
|
139
|
+
* renders only a default export, but a host may register a NAMED export as
|
|
140
|
+
* remixable and sync captures its module verbatim; forking that capture as-is
|
|
141
|
+
* crashes at render ("must have a React default export"). Synthesize the
|
|
142
|
+
* default export by aliasing the captured component's named export. A source
|
|
143
|
+
* that already has a default export — or offers no component-cased export to
|
|
144
|
+
* alias — passes through verbatim.
|
|
145
|
+
*/
|
|
146
|
+
export const pinForkSource = (source) => {
|
|
147
|
+
if (hasDefaultExport(source))
|
|
148
|
+
return source;
|
|
149
|
+
const component = namedExportBindings(blankCommentsAndStrings(source))
|
|
150
|
+
.find(({ exported }) => /^[A-Z]/u.test(exported));
|
|
151
|
+
if (component === undefined)
|
|
152
|
+
return source;
|
|
153
|
+
return `${source}\nexport { ${component.local} as default };\n`;
|
|
154
|
+
};
|
|
155
|
+
/** 06-apps §8 — validated wire representation of a pin ship request. */
|
|
156
|
+
export const pinShipRequestSchema = z.object({
|
|
157
|
+
appId: appIdSchema,
|
|
158
|
+
slot: z.string(),
|
|
159
|
+
baseHash: z.string(),
|
|
160
|
+
diff: z.string(),
|
|
161
|
+
}).passthrough();
|
|
162
|
+
/** 06-apps §8 — validated wire representation of a host pin approval. */
|
|
163
|
+
export const pinApprovalSchema = z.object({
|
|
164
|
+
slot: z.string(),
|
|
165
|
+
baseHash: z.string(),
|
|
166
|
+
approvedHash: z.string(),
|
|
167
|
+
approvedBy: z.string(),
|
|
168
|
+
at: isoDateTimeSchema,
|
|
169
|
+
}).passthrough();
|
|
170
|
+
/** 06-apps §9 — validated wire representation of an in-client approval. */
|
|
171
|
+
export const inClientApprovalSchema = z.object({
|
|
172
|
+
appId: appIdSchema,
|
|
173
|
+
versionHash: z.string(),
|
|
174
|
+
approvedBy: z.string(),
|
|
175
|
+
at: isoDateTimeSchema,
|
|
176
|
+
}).passthrough();
|
|
177
|
+
/**
|
|
178
|
+
* 06-apps §8 — "a host update to the component marks the pin drifted". Pure
|
|
179
|
+
* over the app document and the composition's loaded baselines so the opener,
|
|
180
|
+
* the edit path, and the rebase surface all report the same verdict.
|
|
181
|
+
*/
|
|
182
|
+
export const detectPinDrift = (doc, baselines) => (doc.pins ?? []).flatMap((pin) => {
|
|
183
|
+
const baseline = baselines.find((candidate) => candidate.slot === pin.slot);
|
|
184
|
+
if (baseline?.hash === pin.base)
|
|
185
|
+
return [];
|
|
186
|
+
return [{
|
|
187
|
+
slot: pin.slot,
|
|
188
|
+
component: pinComponentName(pin.slot),
|
|
189
|
+
baseHash: pin.base,
|
|
190
|
+
...(baseline === undefined ? {} : { baselineHash: baseline.hash }),
|
|
191
|
+
reason: baseline === undefined ? "baseline-missing" : "baseline-changed",
|
|
192
|
+
}];
|
|
193
|
+
});
|
|
194
|
+
/**
|
|
195
|
+
* 06-apps §7–§8 — require explicit host permission for every exported pin.
|
|
196
|
+
* Missing baselines fail closed because an artifact export must never strip pins.
|
|
197
|
+
*/
|
|
198
|
+
export const assertPinsExportable = (pins, baselines) => {
|
|
199
|
+
for (const pin of pins) {
|
|
200
|
+
const baseline = baselines.find((candidate) => candidate.slot === pin.slot);
|
|
201
|
+
if (baseline?.hash === pin.base && baseline.exportable === true)
|
|
202
|
+
continue;
|
|
203
|
+
const reason = baseline === undefined
|
|
204
|
+
? "missing-baseline"
|
|
205
|
+
: baseline.hash !== pin.base ? "baseline-hash-mismatch" : "baseline-forbids-export";
|
|
206
|
+
throw new VendoError("blocked", `pin ${pin.slot} is not exportable`, {
|
|
207
|
+
slot: pin.slot,
|
|
208
|
+
base: pin.base,
|
|
209
|
+
reason,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=pins.js.map
|
package/dist/pins.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pins.js","sourceRoot":"","sources":["../src/pins.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,SAAS,GAMV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,OAAO,EAAE,CAAC,CAAC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, type TreeNode, type TreeV2, type WireCompileResult } from "@vendoai/core";
|
|
2
|
+
import type { GeneratedAppDocument, GenerationDependencies, HostToolInfo } from "./engine.js";
|
|
3
|
+
/** W4 pipeline (spec §How a generation runs) — engine-internal knobs.
|
|
4
|
+
* `structuredRepair` (adopt-now) replaces free-form repair regeneration with
|
|
5
|
+
* one strict tool-use call over the closed fix space; on by default.
|
|
6
|
+
* `regionParallel` (outline + parallel section writers) and `endPass`
|
|
7
|
+
* (no-think polish read-through) are opt-in flags while being measured. */
|
|
8
|
+
export interface PipelineConfig {
|
|
9
|
+
structuredRepair?: boolean;
|
|
10
|
+
regionParallel?: boolean;
|
|
11
|
+
endPass?: boolean;
|
|
12
|
+
/** v4 wave — the rewritten create contract (single-voice sections, principles
|
|
13
|
+
* stated once, worked exemplars; scar-tissue rules retired to validators +
|
|
14
|
+
* repair). Opt-in while the A/B against the current contract is measured. */
|
|
15
|
+
promptRewrite?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** W4 pipeline — opt-in per-stage diagnostics: rounds, no-valid-fix
|
|
18
|
+
* take-rate, region-parallel fallback reasons, end-pass adoption, wall-clock
|
|
19
|
+
* per stage. Powers live measurement and production observability. */
|
|
20
|
+
export type PipelineEvent = {
|
|
21
|
+
stage: "repair";
|
|
22
|
+
rounds: number;
|
|
23
|
+
repaired: boolean;
|
|
24
|
+
noValidFix: number;
|
|
25
|
+
ms: number;
|
|
26
|
+
} | {
|
|
27
|
+
stage: "region-parallel";
|
|
28
|
+
fallback?: "no-outline" | "sections-failed" | "assembly-invalid";
|
|
29
|
+
sectionsPlanned?: number;
|
|
30
|
+
sectionsLanded?: number;
|
|
31
|
+
ms: number;
|
|
32
|
+
} | {
|
|
33
|
+
stage: "end-pass";
|
|
34
|
+
applied: boolean;
|
|
35
|
+
ms: number;
|
|
36
|
+
};
|
|
37
|
+
/** The engine's create validation, passed in as a callback so pipeline.ts
|
|
38
|
+
* never imports engine internals (engine → pipeline stays one-directional). */
|
|
39
|
+
export type CreateValidator = (compiled: WireCompileResult) => Promise<{
|
|
40
|
+
document?: GeneratedAppDocument;
|
|
41
|
+
issues: string[];
|
|
42
|
+
}>;
|
|
43
|
+
export interface PipelineContext {
|
|
44
|
+
deps: GenerationDependencies;
|
|
45
|
+
hostComponents: readonly string[];
|
|
46
|
+
validate: CreateValidator;
|
|
47
|
+
/** Milliseconds origin of the surrounding create() for onTiming events. */
|
|
48
|
+
startedAt: number;
|
|
49
|
+
}
|
|
50
|
+
/** Button labels that promise a state change. A Button carrying one of these
|
|
51
|
+
* is a submit/primary affordance: it must DO something (a mutating host tool
|
|
52
|
+
* bound to real context) or honestly say it can't — a no-op submit is the
|
|
53
|
+
* facade class. Read-only verbs (view/show/open) and dismiss verbs
|
|
54
|
+
* (cancel/clear/close) are deliberately excluded. */
|
|
55
|
+
export declare const SUBMIT_LABEL: RegExp;
|
|
56
|
+
export declare const isMutatingRisk: (risk: string | undefined) => boolean;
|
|
57
|
+
export declare const hasPayload: (payload: unknown) => boolean;
|
|
58
|
+
/** Every {action,payload?} binding reachable in a node's props, with the prop
|
|
59
|
+
* it sits under (actions can nest inside arrays/objects, not just top-level
|
|
60
|
+
* on* attributes). */
|
|
61
|
+
export declare const actionBindingsInProps: (props: Record<string, unknown>) => Array<{
|
|
62
|
+
prop: string;
|
|
63
|
+
action: string;
|
|
64
|
+
payload: unknown;
|
|
65
|
+
}>;
|
|
66
|
+
/** One structured action-honesty failure (the string rendering lives in
|
|
67
|
+
* engine.actionIssues; this shape feeds the repair fix space). W3 adds the
|
|
68
|
+
* law-2 grounding kinds: an action must name a REAL tool, and its payload
|
|
69
|
+
* fields must be the tool's REAL input parameters. */
|
|
70
|
+
export interface ActionFault {
|
|
71
|
+
nodeId: string;
|
|
72
|
+
kind: "dead-submit" | "missing-payload" | "read-only-submit" | "unknown-tool" | "ungrounded-payload";
|
|
73
|
+
prop?: string;
|
|
74
|
+
action?: string;
|
|
75
|
+
label?: string;
|
|
76
|
+
/** ungrounded-payload — the payload keys the tool's input schema does not declare. */
|
|
77
|
+
unknownFields?: string[];
|
|
78
|
+
/** ungrounded-payload — the tool's real input parameter names. */
|
|
79
|
+
allowedFields?: string[];
|
|
80
|
+
/** ungrounded-payload — REQUIRED input parameters absent from the payload. */
|
|
81
|
+
missingFields?: string[];
|
|
82
|
+
}
|
|
83
|
+
export declare const actionFaults: (tree: TreeV2, tools: readonly HostToolInfo[] | undefined) => ActionFault[];
|
|
84
|
+
/** The data-classed prop names of one node: Kit prop classes for adopted Kit
|
|
85
|
+
* names, the legacy map for the old prewired set, schema-derived for host
|
|
86
|
+
* catalog components. */
|
|
87
|
+
export declare const dataClassedProps: (node: TreeNode, catalog: NormalizedCatalog) => readonly string[];
|
|
88
|
+
export interface LiteralDataFault {
|
|
89
|
+
nodeId: string;
|
|
90
|
+
component: string;
|
|
91
|
+
prop: string;
|
|
92
|
+
}
|
|
93
|
+
/** Law 1 — every data-classed prop present on a node must be a `$path` /
|
|
94
|
+
* `$state` binding. A literal there is hand-typed business data. */
|
|
95
|
+
export declare const literalDataFaults: (tree: TreeV2, catalog: NormalizedCatalog) => LiteralDataFault[];
|
|
96
|
+
export declare const NO_VALID_FIX = "__no_valid_fix__";
|
|
97
|
+
export interface StructuredRepairResult {
|
|
98
|
+
document?: GeneratedAppDocument;
|
|
99
|
+
/** Strict-call rounds actually spent (spliced or not). */
|
|
100
|
+
rounds: number;
|
|
101
|
+
issues: string[];
|
|
102
|
+
/** How many fixes resolved to the no-valid-fix/Disclaimer arm. */
|
|
103
|
+
noValidFixCount: number;
|
|
104
|
+
}
|
|
105
|
+
/** v3 pipeline step 5 — structured repair. Compile errors with a closed fix
|
|
106
|
+
* space are fixed by ONE strict tool-use call per round (max `maxRounds`),
|
|
107
|
+
* spliced deterministically into the canonical tree, re-printed, re-compiled
|
|
108
|
+
* and re-validated. Anything outside the closed space (or a failed call)
|
|
109
|
+
* returns with `document` unset and the caller falls back to today's
|
|
110
|
+
* free-form regeneration loop. */
|
|
111
|
+
export declare const structuredRepair: (compiled: WireCompileResult, userRequest: string, context: PipelineContext, maxRounds?: number) => Promise<StructuredRepairResult>;
|
|
112
|
+
export declare const endPassViolations: (base: TreeV2, patched: TreeV2, baseComponents: Record<string, string>, patchedComponents: Record<string, string>) => string[];
|
|
113
|
+
/** Same fence tolerance as engine.ts's extractWire, for <Edit> documents
|
|
114
|
+
* (shared by the edit dialect and the end pass). */
|
|
115
|
+
export declare const extractEdit: (text: string) => string;
|
|
116
|
+
/** v3 pipeline step 6, sharpened in v4 — the end pass. Runs only under the
|
|
117
|
+
* `endPass` flag (default flips when the v4 A/B earns it); a patch survives
|
|
118
|
+
* only if it compiles clean, applies at most 4 ops, and the patched app
|
|
119
|
+
* re-validates — otherwise the original document ships untouched.
|
|
120
|
+
* Structurally cannot break the app. */
|
|
121
|
+
export declare const endPass: (document: GeneratedAppDocument, userRequest: string, context: PipelineContext) => Promise<GeneratedAppDocument>;
|
|
122
|
+
export interface RegionParallelResult {
|
|
123
|
+
document?: GeneratedAppDocument;
|
|
124
|
+
/** Why the parallel path yielded no document (measurement + fallback). */
|
|
125
|
+
fallback?: "no-outline" | "sections-failed" | "assembly-invalid";
|
|
126
|
+
sectionsPlanned?: number;
|
|
127
|
+
sectionsLanded?: number;
|
|
128
|
+
}
|
|
129
|
+
export interface RegionParallelHooks {
|
|
130
|
+
/** The engine's streamWire, bound to deps/system: returns raw wire text. */
|
|
131
|
+
generateSection: (prompt: string) => Promise<string | undefined>;
|
|
132
|
+
/** Forwarded partial emission (already resident-suppressed by the engine). */
|
|
133
|
+
emitPartial?: (assembledWire: string) => void;
|
|
134
|
+
userRequest: string;
|
|
135
|
+
}
|
|
136
|
+
/** v3 pipeline steps 1+3 — outline then N parallel per-section writers whose
|
|
137
|
+
* outputs assemble (in outline order) into one wire document that goes
|
|
138
|
+
* through the normal whole-app validation. Any planning/assembly failure
|
|
139
|
+
* returns fallback info and the engine's single-stream lane takes over —
|
|
140
|
+
* never blocks. */
|
|
141
|
+
export declare const regionParallelCreate: (context: PipelineContext, hooks: RegionParallelHooks) => Promise<RegionParallelResult>;
|
|
142
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,iBAAiB,EAEtB,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;;;4EAI4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;kFAE8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;uEAEuE;AACvE,MAAM,MAAM,aAAa,GACrB;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACtF;IAAE,KAAK,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC7J;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD;gFACgF;AAChF,MAAM,MAAM,eAAe,GAAG,CAC5B,QAAQ,EAAE,iBAAiB,KACxB,OAAO,CAAC;IAAE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