@astrale-os/cli 1.0.0-beta.0 → 1.0.0-beta.2
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/README.md +7 -11
- package/dist/astrale.js +3769 -3549
- package/dist/public/connect-core.js +396 -392
- package/dist/public/keys/index.js +371 -378
- package/dist/public/paths/index.js +371 -378
- package/dist/types/lib/idp.d.ts +6 -0
- package/dist/types/lib/meta.d.ts +2 -2
- package/package.json +6 -4
- package/src/admin/binding.ts +168 -0
- package/src/admin/catalog/__tests__/client.test.ts +2 -2
- package/src/admin/catalog/client.ts +4 -9
- package/src/admin/instance/__tests__/client.test.ts +5 -3
- package/src/admin/instance/client.ts +9 -27
- package/src/commands/__tests__/auth-login.test.ts +54 -1
- package/src/commands/__tests__/call.test.ts +5 -1
- package/src/commands/__tests__/domain-install-operation.test.ts +23 -7
- package/src/commands/__tests__/domain-install-owned.test.ts +5 -1
- package/src/commands/__tests__/domain-list.test.ts +83 -4
- package/src/commands/__tests__/install-identity-override.test.ts +30 -19
- package/src/commands/__tests__/studio-descriptor.test.ts +22 -0
- package/src/commands/__tests__/update.test.ts +73 -0
- package/src/commands/domain/install.ts +11 -15
- package/src/commands/domain/list.ts +17 -12
- package/src/commands/studio.ts +20 -0
- package/src/commands/update.ts +39 -13
- package/src/connection/__tests__/errors.test.ts +16 -12
- package/src/connection/__tests__/exchange.test.ts +6 -5
- package/src/connection/exchange.ts +5 -4
- package/src/lib/__tests__/domain-publication.test.ts +144 -0
- package/src/lib/__tests__/idp-session.test.ts +22 -0
- package/src/lib/__tests__/idp.test.ts +2 -0
- package/src/lib/__tests__/instance.test.ts +6 -0
- package/src/lib/__tests__/studio-server-deps.test.ts +53 -16
- package/src/lib/__tests__/update.test.ts +12 -0
- package/src/lib/domain-publication.ts +102 -0
- package/src/lib/idp.ts +5 -1
- package/src/lib/instance.ts +6 -1
- package/src/lib/login-flow.ts +13 -3
- package/src/lib/meta.ts +2 -2
- package/src/lib/update.ts +4 -4
- package/src/program/__tests__/program.test.ts +1 -1
- package/studio/client/dist/assets/{elk-api-D2xgMJvi.js → elk-api-lwhFo7vB.js} +1 -1
- package/studio/client/dist/assets/index-B-c-smo9.js +8 -0
- package/studio/client/dist/assets/index-BckHuAWk.js +81 -0
- package/studio/client/dist/assets/index-C4aNQ6dz.css +1 -0
- package/studio/client/dist/index.html +2 -2
- package/studio/package.json +3 -1
- package/studio/server/agent/bridge/stdio.ts +8 -1
- package/studio/server/agent/conversation.test.ts +10 -5
- package/studio/server/agent/conversation.ts +56 -8
- package/studio/server/agent/harness/codex/loadout.ts +18 -21
- package/studio/server/agent/harness/gateway/config.ts +20 -18
- package/studio/server/agent/harness/selection.ts +9 -1
- package/studio/server/agent/prompts/system.ts +3 -2
- package/studio/server/agent/prompts/turn.ts +13 -4
- package/studio/server/agent/run/completion.ts +2 -2
- package/studio/server/agent/run/preparation.ts +6 -5
- package/studio/server/agent/run/transcript.test.ts +35 -1
- package/studio/server/agent/run/transcript.ts +169 -3
- package/studio/server/agent/run/usage.test.ts +24 -0
- package/studio/server/agent/run/usage.ts +26 -1
- package/studio/server/api/canvas.ts +44 -0
- package/studio/server/api/comments.ts +85 -0
- package/studio/server/api/context.ts +61 -0
- package/studio/server/api/deployment.ts +39 -0
- package/studio/server/api/documents.ts +55 -0
- package/studio/server/api/domain.ts +59 -0
- package/studio/server/api/http.ts +45 -0
- package/studio/server/api/project.ts +57 -0
- package/studio/server/api/schema.ts +12 -0
- package/studio/server/api/views.ts +57 -0
- package/studio/server/api/workspace.ts +60 -0
- package/studio/server/api.test.ts +147 -0
- package/studio/server/api.ts +20 -422
- package/studio/server/cache.test.ts +111 -0
- package/studio/server/cache.ts +163 -9
- package/studio/server/cli-consumers.test.ts +494 -0
- package/studio/server/cli.test.ts +88 -0
- package/studio/server/cli.ts +240 -0
- package/studio/server/client-package.ts +25 -1
- package/studio/server/domain.test.ts +30 -2
- package/studio/server/domain.ts +14 -2
- package/studio/server/environment/dotenv-preview.test.ts +39 -0
- package/studio/server/environment/dotenv-preview.ts +27 -0
- package/studio/server/environment/files.test.ts +53 -0
- package/studio/server/{state/env.ts → environment/files.ts} +7 -48
- package/studio/server/{state → handoff}/copy.ts +21 -6
- package/studio/server/handoff/service.test.ts +22 -0
- package/studio/server/{state/handoff.ts → handoff/service.ts} +21 -14
- package/studio/server/instances/active.ts +72 -0
- package/studio/server/instances/deploy-record.test.ts +31 -0
- package/studio/server/instances/deploy-record.ts +37 -0
- package/studio/server/instances/deploy.ts +56 -0
- package/studio/server/{state/instance.test.ts → instances/probe.test.ts} +25 -21
- package/studio/server/instances/probe.ts +67 -0
- package/studio/server/instances/status.test.ts +12 -0
- package/studio/server/instances/status.ts +49 -0
- package/studio/server/introspect/anatomy/client-tree.ts +57 -0
- package/studio/server/introspect/anatomy/env-fields.ts +66 -0
- package/studio/server/introspect/anatomy/schema-definition.ts +53 -0
- package/studio/server/introspect/anatomy/source.ts +181 -0
- package/studio/server/introspect/anatomy/views/legacy.ts +232 -0
- package/studio/server/introspect/anatomy/views/routes.ts +105 -0
- package/studio/server/introspect/anatomy/views.ts +58 -0
- package/studio/server/introspect/anatomy-extras.test.ts +91 -4
- package/studio/server/introspect/anatomy-extras.ts +7 -726
- package/studio/server/introspect/anatomy.ts +46 -19
- package/studio/server/introspect/bundle.ts +15 -6
- package/studio/server/introspect/canonical-schema.test.ts +79 -0
- package/studio/server/introspect/canonical-schema.ts +80 -18
- package/studio/server/introspect/config-preview.test.ts +32 -0
- package/studio/server/introspect/config-preview.ts +119 -0
- package/studio/server/introspect/diff.test.ts +7 -11
- package/studio/server/introspect/diff.ts +28 -37
- package/studio/server/introspect/extractor.ts +8 -6
- package/studio/server/introspect/hash.ts +5 -2
- package/studio/server/introspect/overlay-tsmorph.ts +7 -1305
- package/studio/server/introspect/revision.test.ts +54 -0
- package/studio/server/introspect/revision.ts +49 -0
- package/studio/server/introspect/runtime.test.ts +63 -5
- package/studio/server/introspect/runtime.ts +49 -3
- package/studio/server/introspect/schema-ir-json.ts +181 -0
- package/studio/server/introspect/source-overlay/annotations.ts +14 -0
- package/studio/server/introspect/source-overlay/handlers.ts +681 -0
- package/studio/server/introspect/source-overlay/kernel-calls.ts +49 -0
- package/studio/server/introspect/source-overlay/project.ts +248 -0
- package/studio/server/introspect/source-overlay/spans.ts +360 -0
- package/studio/server/json.ts +46 -0
- package/studio/server/lifecycle.ts +5 -1
- package/studio/server/sse.test.ts +26 -0
- package/studio/server/sse.ts +4 -1
- package/studio/server/state/baseline.test.ts +212 -1
- package/studio/server/state/baseline.ts +145 -29
- package/studio/server/state/comments.test.ts +66 -1
- package/studio/server/state/comments.ts +173 -10
- package/studio/server/state/context.ts +34 -2
- package/studio/server/state/documents.ts +42 -1
- package/studio/server/state/integrations.ts +27 -1
- package/studio/server/state/layout.test.ts +34 -0
- package/studio/server/state/layout.ts +44 -17
- package/studio/server/state/settings.ts +29 -22
- package/studio/server/state/store.test.ts +122 -0
- package/studio/server/state/store.ts +66 -17
- package/studio/server/state/visibility.ts +22 -7
- package/studio/server/views/model.test.ts +57 -0
- package/studio/server/views/model.ts +66 -0
- package/studio/server/views/runtime.ts +40 -0
- package/studio/server/views/selection-repository.test.ts +31 -0
- package/studio/server/views/selection-repository.ts +60 -0
- package/studio/server/views/session.test.ts +73 -0
- package/studio/server/views/session.ts +166 -0
- package/studio/server/{state/views.test.ts → views/target.test.ts} +8 -159
- package/studio/server/views/target.ts +248 -0
- package/studio/server/watch.ts +1 -1
- package/studio/server/workspace/catalog.test.ts +17 -0
- package/studio/server/workspace/catalog.ts +43 -0
- package/studio/server/{state → workspace}/create.test.ts +1 -1
- package/studio/server/{state → workspace}/create.ts +1 -1
- package/studio/server/{state → workspace}/git.ts +1 -1
- package/studio/server/workspace/updates.ts +83 -0
- package/studio/server/workspace-state.ts +1 -1
- package/studio/shared/contracts/README.md +16 -0
- package/studio/shared/contracts/agent.ts +270 -0
- package/studio/shared/contracts/runtime.ts +50 -0
- package/studio/shared/contracts/schema.ts +462 -0
- package/studio/shared/contracts/surface.test.ts +319 -0
- package/studio/shared/contracts/workspace.ts +274 -0
- package/studio/shared/layout.test.ts +116 -0
- package/studio/shared/schema/identity.test.ts +58 -0
- package/studio/shared/schema/identity.ts +82 -0
- package/studio/shared/types.ts +11 -1099
- package/studio/tsconfig.json +1 -1
- package/viewer/dist/main.js +35 -35
- package/studio/client/dist/assets/index-BMdnsIJA.css +0 -1
- package/studio/client/dist/assets/index-D-vRV8w7.js +0 -8
- package/studio/client/dist/assets/index-LGSWRrk8.js +0 -81
- package/studio/server/state/catalog.ts +0 -117
- package/studio/server/state/instance.ts +0 -280
- package/studio/server/state/updates.ts +0 -63
- package/studio/server/state/views.ts +0 -535
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* diff.ts — structural diff of two
|
|
3
|
-
* Shared by change tracking (baseline) and data versioning. Pure.
|
|
2
|
+
* diff.ts — indicative structural diff of two Studio render IRs. Pure.
|
|
4
3
|
*
|
|
5
4
|
* Canonical V1 keeps optionality in the owning `required` arrays and nullability
|
|
6
|
-
* in each value schema. Legacy nullable projections remain supported.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* changes are breaking; pure additions and descriptions are additive.
|
|
5
|
+
* in each value schema. Legacy nullable projections remain supported. This
|
|
6
|
+
* inventory deliberately makes no installation or data-migration claim;
|
|
7
|
+
* only the Kernel Runtime can assess those transitions against installed data.
|
|
10
8
|
*/
|
|
11
9
|
import type {
|
|
12
10
|
IrClass,
|
|
@@ -75,7 +73,7 @@ export function diffSchemas(prev: SchemaIR | null, next: SchemaIR | null): Schem
|
|
|
75
73
|
},
|
|
76
74
|
)
|
|
77
75
|
) {
|
|
78
|
-
changes.push({ kind: 'schema-metadata-changed', target: next.domain
|
|
76
|
+
changes.push({ kind: 'schema-metadata-changed', target: next.domain })
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
diffValueRecord(prev.types ?? {}, next.types ?? {}, 'type', changes)
|
|
@@ -92,7 +90,7 @@ export function diffSchemas(prev: SchemaIR | null, next: SchemaIR | null): Schem
|
|
|
92
90
|
diffValueRecord(prev.policies ?? {}, next.policies ?? {}, 'policy', changes)
|
|
93
91
|
diffDependencies(prev.dependencies ?? [], next.dependencies ?? [], changes)
|
|
94
92
|
if (!same(prev.core, next.core) && (prev.core !== undefined || next.core !== undefined)) {
|
|
95
|
-
changes.push({ kind: 'core-changed', target: next.domain
|
|
93
|
+
changes.push({ kind: 'core-changed', target: next.domain })
|
|
96
94
|
}
|
|
97
95
|
return changes
|
|
98
96
|
}
|
|
@@ -105,14 +103,14 @@ function diffValueRecord(
|
|
|
105
103
|
): void {
|
|
106
104
|
for (const name of sortedKeys(next)) {
|
|
107
105
|
if (!(name in prev)) {
|
|
108
|
-
out.push({ kind: `${scope}-added`, target: name
|
|
106
|
+
out.push({ kind: `${scope}-added`, target: name })
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
109
|
for (const name of sortedKeys(prev)) {
|
|
112
110
|
if (!(name in next)) {
|
|
113
|
-
out.push({ kind: `${scope}-removed`, target: name
|
|
111
|
+
out.push({ kind: `${scope}-removed`, target: name })
|
|
114
112
|
} else if (!same(prev[name], next[name])) {
|
|
115
|
-
out.push({ kind: `${scope}-changed`, target: name
|
|
113
|
+
out.push({ kind: `${scope}-changed`, target: name })
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
116
|
}
|
|
@@ -123,18 +121,18 @@ function diffFunctions(
|
|
|
123
121
|
out: SchemaChange[],
|
|
124
122
|
): void {
|
|
125
123
|
for (const name of sortedKeys(next)) {
|
|
126
|
-
if (!prev[name]) out.push({ kind: 'function-added', target: name
|
|
124
|
+
if (!prev[name]) out.push({ kind: 'function-added', target: name })
|
|
127
125
|
}
|
|
128
126
|
for (const name of sortedKeys(prev)) {
|
|
129
127
|
if (!next[name]) {
|
|
130
|
-
out.push({ kind: 'function-removed', target: name
|
|
128
|
+
out.push({ kind: 'function-removed', target: name })
|
|
131
129
|
continue
|
|
132
130
|
}
|
|
133
131
|
if (!same(callableContract(prev[name]), callableContract(next[name]))) {
|
|
134
|
-
out.push({ kind: 'function-signature-changed', target: name
|
|
132
|
+
out.push({ kind: 'function-signature-changed', target: name })
|
|
135
133
|
}
|
|
136
134
|
if (prev[name].description !== next[name].description) {
|
|
137
|
-
out.push({ kind: 'function-metadata-changed', target: name
|
|
135
|
+
out.push({ kind: 'function-metadata-changed', target: name })
|
|
138
136
|
}
|
|
139
137
|
}
|
|
140
138
|
}
|
|
@@ -145,11 +143,11 @@ function diffViews(
|
|
|
145
143
|
out: SchemaChange[],
|
|
146
144
|
): void {
|
|
147
145
|
for (const name of sortedKeys(next)) {
|
|
148
|
-
if (!(name in prev)) out.push({ kind: 'view-added', target: name
|
|
146
|
+
if (!(name in prev)) out.push({ kind: 'view-added', target: name })
|
|
149
147
|
}
|
|
150
148
|
for (const name of sortedKeys(prev)) {
|
|
151
149
|
if (!(name in next)) {
|
|
152
|
-
out.push({ kind: 'view-removed', target: name
|
|
150
|
+
out.push({ kind: 'view-removed', target: name })
|
|
153
151
|
continue
|
|
154
152
|
}
|
|
155
153
|
if (
|
|
@@ -161,10 +159,10 @@ function diffViews(
|
|
|
161
159
|
},
|
|
162
160
|
)
|
|
163
161
|
) {
|
|
164
|
-
out.push({ kind: 'view-changed', target: name
|
|
162
|
+
out.push({ kind: 'view-changed', target: name })
|
|
165
163
|
}
|
|
166
164
|
if (prev[name].description !== next[name].description) {
|
|
167
|
-
out.push({ kind: 'view-metadata-changed', target: name
|
|
165
|
+
out.push({ kind: 'view-metadata-changed', target: name })
|
|
168
166
|
}
|
|
169
167
|
}
|
|
170
168
|
}
|
|
@@ -182,18 +180,17 @@ function diffDependencies(
|
|
|
182
180
|
)
|
|
183
181
|
for (const origin of sortedKeys(after)) {
|
|
184
182
|
if (!(origin in before)) {
|
|
185
|
-
out.push({ kind: 'dependency-added', target: origin
|
|
183
|
+
out.push({ kind: 'dependency-added', target: origin })
|
|
186
184
|
}
|
|
187
185
|
}
|
|
188
186
|
for (const origin of sortedKeys(before)) {
|
|
189
187
|
if (!(origin in after)) {
|
|
190
|
-
out.push({ kind: 'dependency-removed', target: origin
|
|
188
|
+
out.push({ kind: 'dependency-removed', target: origin })
|
|
191
189
|
} else if (before[origin] !== after[origin]) {
|
|
192
190
|
out.push({
|
|
193
191
|
kind: 'dependency-changed',
|
|
194
192
|
target: origin,
|
|
195
193
|
detail: `${before[origin]} → ${after[origin]}`,
|
|
196
|
-
breaking: true,
|
|
197
194
|
})
|
|
198
195
|
}
|
|
199
196
|
}
|
|
@@ -213,13 +210,13 @@ function diffMembers(
|
|
|
213
210
|
for (const name of sortedKeys(next)) {
|
|
214
211
|
if (!prev[name]) {
|
|
215
212
|
const k = memberKind(next[name])
|
|
216
|
-
out.push({ kind: `${k}-added` as SchemaChange['kind'], target: name
|
|
213
|
+
out.push({ kind: `${k}-added` as SchemaChange['kind'], target: name })
|
|
217
214
|
}
|
|
218
215
|
}
|
|
219
216
|
for (const name of sortedKeys(prev)) {
|
|
220
217
|
if (!next[name]) {
|
|
221
218
|
const k = memberKind(prev[name])
|
|
222
|
-
out.push({ kind: `${k}-removed` as SchemaChange['kind'], target: name
|
|
219
|
+
out.push({ kind: `${k}-removed` as SchemaChange['kind'], target: name })
|
|
223
220
|
continue
|
|
224
221
|
}
|
|
225
222
|
diffMemberBody(name, prev[name], next[name], out)
|
|
@@ -241,13 +238,12 @@ function diffMemberBody(
|
|
|
241
238
|
kind: 'prop-added',
|
|
242
239
|
target: `${name}.${p}`,
|
|
243
240
|
detail: required ? 'required' : 'optional',
|
|
244
|
-
breaking: required,
|
|
245
241
|
})
|
|
246
242
|
}
|
|
247
243
|
}
|
|
248
244
|
for (const p of sortedKeys(pa)) {
|
|
249
245
|
if (!pb[p]) {
|
|
250
|
-
out.push({ kind: 'prop-removed', target: `${name}.${p}
|
|
246
|
+
out.push({ kind: 'prop-removed', target: `${name}.${p}` })
|
|
251
247
|
continue
|
|
252
248
|
}
|
|
253
249
|
if (!same(pa[p], pb[p])) {
|
|
@@ -258,7 +254,6 @@ function diffMemberBody(
|
|
|
258
254
|
detail: baseChanged
|
|
259
255
|
? `${baseType(pa[p])} → ${baseType(pb[p])}`
|
|
260
256
|
: 'value constraints changed',
|
|
261
|
-
breaking: true,
|
|
262
257
|
})
|
|
263
258
|
}
|
|
264
259
|
const wasOpt = !propertyRequired(a, p)
|
|
@@ -268,7 +263,6 @@ function diffMemberBody(
|
|
|
268
263
|
kind: 'prop-required-changed',
|
|
269
264
|
target: `${name}.${p}`,
|
|
270
265
|
detail: wasOpt ? 'optional → required' : 'required → optional',
|
|
271
|
-
breaking: wasOpt && !nowOpt, // optional→required is breaking
|
|
272
266
|
})
|
|
273
267
|
}
|
|
274
268
|
}
|
|
@@ -280,20 +274,19 @@ function diffMemberBody(
|
|
|
280
274
|
out.push({
|
|
281
275
|
kind: 'method-added',
|
|
282
276
|
target: `${name}.${m}`,
|
|
283
|
-
breaking: b.type === 'interface' && mb[m].inheritance === 'abstract',
|
|
284
277
|
})
|
|
285
278
|
}
|
|
286
279
|
}
|
|
287
280
|
for (const m of sortedKeys(ma)) {
|
|
288
281
|
if (!mb[m]) {
|
|
289
|
-
out.push({ kind: 'method-removed', target: `${name}.${m}
|
|
282
|
+
out.push({ kind: 'method-removed', target: `${name}.${m}` })
|
|
290
283
|
continue
|
|
291
284
|
}
|
|
292
285
|
if (!same(callableContract(ma[m]), callableContract(mb[m]))) {
|
|
293
|
-
out.push({ kind: 'method-signature-changed', target: `${name}.${m}
|
|
286
|
+
out.push({ kind: 'method-signature-changed', target: `${name}.${m}` })
|
|
294
287
|
}
|
|
295
288
|
if (ma[m].description !== mb[m].description) {
|
|
296
|
-
out.push({ kind: 'method-metadata-changed', target: `${name}.${m}
|
|
289
|
+
out.push({ kind: 'method-metadata-changed', target: `${name}.${m}` })
|
|
297
290
|
}
|
|
298
291
|
}
|
|
299
292
|
|
|
@@ -302,11 +295,10 @@ function diffMemberBody(
|
|
|
302
295
|
out.push({
|
|
303
296
|
kind: `${kind}-contract-changed`,
|
|
304
297
|
target: name,
|
|
305
|
-
breaking: true,
|
|
306
298
|
})
|
|
307
299
|
}
|
|
308
300
|
if (!same(memberMetadata(a), memberMetadata(b))) {
|
|
309
|
-
out.push({ kind: 'definition-metadata-changed', target: name
|
|
301
|
+
out.push({ kind: 'definition-metadata-changed', target: name })
|
|
310
302
|
}
|
|
311
303
|
}
|
|
312
304
|
|
|
@@ -356,7 +348,6 @@ function canonical(value: unknown): unknown {
|
|
|
356
348
|
)
|
|
357
349
|
}
|
|
358
350
|
|
|
359
|
-
export function
|
|
360
|
-
|
|
361
|
-
return changes.some((c) => c.breaking) ? 'breaking' : 'additive'
|
|
351
|
+
export function structuralStatusOf(changes: SchemaChange[]): 'none' | 'changed' {
|
|
352
|
+
return changes.length === 0 ? 'none' : 'changed'
|
|
362
353
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* render state, never a crash.
|
|
12
12
|
*/
|
|
13
13
|
import {
|
|
14
|
-
|
|
14
|
+
admitCanonicalSchemaFromSdk,
|
|
15
15
|
findCanonicalDomainSchemaExport,
|
|
16
16
|
normalizeLegacySchemaIR,
|
|
17
17
|
projectCanonicalSchema,
|
|
@@ -39,15 +39,15 @@ async function main() {
|
|
|
39
39
|
const canonicalRoot = findCanonicalDomainSchemaExport(mod)
|
|
40
40
|
if (canonicalRoot) {
|
|
41
41
|
const domainSdk = await loadSdkSchema()
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
closureFromSdk(domainSdk, canonicalRoot),
|
|
45
|
-
)
|
|
42
|
+
const admission = admitCanonicalSchemaFromSdk(domainSdk, canonicalRoot)
|
|
43
|
+
const projected = projectCanonicalSchema(admission.root, admission.closure)
|
|
46
44
|
process.stdout.write(
|
|
47
45
|
JSON.stringify({
|
|
48
46
|
ok: true,
|
|
49
47
|
ir: projected.ir,
|
|
50
|
-
root:
|
|
48
|
+
root: admission.root,
|
|
49
|
+
schemaMode: admission.status === 'admitted' ? 'canonical-admitted' : 'canonical-preview',
|
|
50
|
+
revision: admission.revision,
|
|
51
51
|
importedInterfaces: projected.importedInterfaces,
|
|
52
52
|
}),
|
|
53
53
|
)
|
|
@@ -118,6 +118,8 @@ async function main() {
|
|
|
118
118
|
ok: true,
|
|
119
119
|
ir: normalizeLegacySchemaIR(ir),
|
|
120
120
|
root: null,
|
|
121
|
+
schemaMode: 'legacy',
|
|
122
|
+
revision: null,
|
|
121
123
|
importedInterfaces,
|
|
122
124
|
}),
|
|
123
125
|
)
|
|
@@ -15,7 +15,10 @@ function sortKeys(v: any): any {
|
|
|
15
15
|
return v
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Short, deterministic identity for Studio rendering/cache invalidation only.
|
|
20
|
+
* This is deliberately not the DSL-owned `schema.revision()`.
|
|
21
|
+
*/
|
|
22
|
+
export function renderFingerprintOf(value: unknown): string {
|
|
20
23
|
return 'sha-' + createHash('sha256').update(canonicalJSON(value)).digest('hex').slice(0, 12)
|
|
21
24
|
}
|