@inf-monkeys-tech/monkeys 1.1.55 → 1.1.57

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 (60) hide show
  1. package/lib/contracts/artifact-platform.d.ts +495 -0
  2. package/lib/contracts/artifact-platform.d.ts.map +1 -0
  3. package/lib/contracts/artifact-platform.js +311 -0
  4. package/lib/contracts/artifact-platform.js.map +1 -0
  5. package/lib/contracts/declarative-control-http.d.ts +398 -398
  6. package/lib/contracts/declarative-control.d.ts +41 -41
  7. package/lib/contracts/declarative-diagnostic.d.ts +2 -2
  8. package/lib/contracts/declarative-document-import.d.ts +7 -7
  9. package/lib/contracts/declarative-publication-job.d.ts +111 -111
  10. package/lib/contracts/declarative-publication-verification.d.ts +1 -1
  11. package/lib/contracts/design-board.d.ts +6 -6
  12. package/lib/contracts/engineering-artifacts.d.ts +359 -0
  13. package/lib/contracts/engineering-artifacts.d.ts.map +1 -0
  14. package/lib/contracts/engineering-artifacts.js +191 -0
  15. package/lib/contracts/engineering-artifacts.js.map +1 -0
  16. package/lib/contracts/index.d.ts +2 -0
  17. package/lib/contracts/index.d.ts.map +1 -1
  18. package/lib/contracts/index.js +2 -0
  19. package/lib/contracts/index.js.map +1 -1
  20. package/lib/contracts/menu.d.ts +10 -10
  21. package/lib/contracts/page-expression.d.ts +1 -1
  22. package/lib/contracts/render.d.ts +22 -22
  23. package/lib/contracts/tenant.d.ts +8 -8
  24. package/lib/contracts/theme.d.ts +1 -1
  25. package/lib/contracts/workflow-definition.d.ts +4 -4
  26. package/lib/esm/{chunk-66A4GGOV.mjs → chunk-5ZGNWCL4.mjs} +466 -307
  27. package/lib/esm/chunk-5ZGNWCL4.mjs.map +1 -0
  28. package/lib/esm/{chunk-RMZW3SVL.mjs → chunk-C3X5SSRD.mjs} +3 -3
  29. package/lib/esm/chunk-C3X5SSRD.mjs.map +1 -0
  30. package/lib/esm/{chunk-DIIMDX7F.mjs → chunk-FIZWECL6.mjs} +2878 -2609
  31. package/lib/esm/chunk-FIZWECL6.mjs.map +1 -0
  32. package/lib/esm/{chunk-TROZIHS4.mjs → chunk-HJNQDSLC.mjs} +2 -2
  33. package/lib/esm/{chunk-E6YPJ4DR.mjs → chunk-USWQ4YP5.mjs} +2 -2
  34. package/lib/esm/{chunk-ITGLKSCE.mjs → chunk-VYC47WKJ.mjs} +540 -3
  35. package/lib/esm/chunk-VYC47WKJ.mjs.map +1 -0
  36. package/lib/esm/contracts/index.mjs +66 -4
  37. package/lib/esm/index.mjs +86 -6
  38. package/lib/esm/index.mjs.map +1 -1
  39. package/lib/esm/runtime/index.mjs +21 -3
  40. package/lib/esm/schemas/index.mjs +63 -3
  41. package/lib/runtime/artifact-session.d.ts +54 -0
  42. package/lib/runtime/artifact-session.d.ts.map +1 -0
  43. package/lib/runtime/artifact-session.js +541 -0
  44. package/lib/runtime/artifact-session.js.map +1 -0
  45. package/lib/runtime/index.d.ts +1 -0
  46. package/lib/runtime/index.d.ts.map +1 -1
  47. package/lib/runtime/index.js +1 -0
  48. package/lib/runtime/index.js.map +1 -1
  49. package/lib/runtime/runtime-definition-wire.d.ts +44 -44
  50. package/lib/schemas/index.d.ts +48 -46
  51. package/lib/schemas/index.d.ts.map +1 -1
  52. package/lib/schemas/index.js +40 -8
  53. package/lib/schemas/index.js.map +1 -1
  54. package/package.json +2 -2
  55. package/lib/esm/chunk-66A4GGOV.mjs.map +0 -1
  56. package/lib/esm/chunk-DIIMDX7F.mjs.map +0 -1
  57. package/lib/esm/chunk-ITGLKSCE.mjs.map +0 -1
  58. package/lib/esm/chunk-RMZW3SVL.mjs.map +0 -1
  59. /package/lib/esm/{chunk-TROZIHS4.mjs.map → chunk-HJNQDSLC.mjs.map} +0 -0
  60. /package/lib/esm/{chunk-E6YPJ4DR.mjs.map → chunk-USWQ4YP5.mjs.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  DECLARATIVE_CONTROL_API_PREFIX,
3
3
  IsoDateTimeSchema,
4
4
  JsonObjectSchema
5
- } from "./chunk-DIIMDX7F.mjs";
5
+ } from "./chunk-FIZWECL6.mjs";
6
6
 
7
7
  // src/contracts/page-stream.ts
8
8
  import { z } from "zod";
@@ -75,4 +75,4 @@ export {
75
75
  pageStreamRoutes,
76
76
  PageStreamControlResultSchema
77
77
  };
78
- //# sourceMappingURL=chunk-TROZIHS4.mjs.map
78
+ //# sourceMappingURL=chunk-HJNQDSLC.mjs.map
@@ -14,7 +14,7 @@ import {
14
14
  ManagedFileUriSchema,
15
15
  RevisionRefSchema,
16
16
  Sha256Schema
17
- } from "./chunk-DIIMDX7F.mjs";
17
+ } from "./chunk-FIZWECL6.mjs";
18
18
 
19
19
  // src/contracts/agent-data.ts
20
20
  import { z } from "zod";
@@ -573,4 +573,4 @@ export {
573
573
  PlatformNotificationSnapshotSchema,
574
574
  platformNotificationRoutes
575
575
  };
576
- //# sourceMappingURL=chunk-E6YPJ4DR.mjs.map
576
+ //# sourceMappingURL=chunk-USWQ4YP5.mjs.map
@@ -4,13 +4,14 @@ import {
4
4
  PAGE_STREAM_MAX_FRAME_BYTES,
5
5
  PageStreamDescriptorSchema,
6
6
  PageStreamEventSchema
7
- } from "./chunk-TROZIHS4.mjs";
7
+ } from "./chunk-HJNQDSLC.mjs";
8
8
  import {
9
9
  AccessPolicySchema,
10
10
  ActionProgramDefinitionSchema,
11
11
  AgentSessionEventSchema,
12
12
  AgentSessionViewModelSchema,
13
13
  ApplicationHandoffSchema,
14
+ ArtifactProfileSchema,
14
15
  CapabilityManifestSchema,
15
16
  CapabilityRegistryDocumentSchema,
16
17
  CapabilityRegistrySourceSchema,
@@ -87,6 +88,7 @@ import {
87
88
  TenantRuntimeConfigSchema,
88
89
  TenantScopeSchema,
89
90
  ViewProviderDescriptorSchema,
91
+ ViewSpecSchema,
90
92
  WorkbenchReleaseSchema,
91
93
  WorkbenchRuntimeBundleSchema,
92
94
  WorkbenchSchema,
@@ -115,7 +117,7 @@ import {
115
117
  require_validation,
116
118
  require_validation_error,
117
119
  resolveThemeTokens
118
- } from "./chunk-DIIMDX7F.mjs";
120
+ } from "./chunk-FIZWECL6.mjs";
119
121
  import {
120
122
  __commonJS,
121
123
  __toESM
@@ -1073,6 +1075,532 @@ var compileCapabilityRegistry = (sources) => {
1073
1075
  });
1074
1076
  };
1075
1077
 
1078
+ // src/runtime/artifact-session.ts
1079
+ function buildArtifactCollabRoomId(key) {
1080
+ const tenant = key.tenantId ? `${key.tenantId}:` : "";
1081
+ return `artifact:${tenant}${key.teamId}:${key.ontologyId}:${key.artifactKind}:${key.recordId}`;
1082
+ }
1083
+ function compileViewSpecToRenderTree(specInput, options = {}) {
1084
+ const spec = ViewSpecSchema.parse(specInput);
1085
+ const product = options.product ?? "studio";
1086
+ const ownerRepo = options.ownerRepo ?? "monkeys-studio";
1087
+ const rootNodeId = `view.${spec.viewId}`;
1088
+ const pageRef = { kind: "page", id: rootNodeId, ownerRepo };
1089
+ const defaultSurface = { frameOwner: "host", density: "default" };
1090
+ const defaultScroll = { owner: "surface", axis: "y", virtualizationBoundary: false };
1091
+ const defaultLifecycle = {
1092
+ mountPolicy: "when-active",
1093
+ queryPolicy: "when-active",
1094
+ retainOnDeactivate: true,
1095
+ deepLink: true,
1096
+ focusReturn: false
1097
+ };
1098
+ const blockNodes = spec.blocks.map((block) => ({
1099
+ contract: "RenderNode",
1100
+ nodeId: `${rootNodeId}.block.${block.blockId}`,
1101
+ kind: block.dataSource.kind === "artifact.body" ? "professional-provider" : block.dataSource.kind === "record.fields" ? "record" : "view",
1102
+ version: 1,
1103
+ ownerRepo,
1104
+ parentNodeId: rootNodeId,
1105
+ children: [],
1106
+ slot: block.slot,
1107
+ pageRef,
1108
+ capabilityRef: {
1109
+ kind: "capability",
1110
+ id: block.capability,
1111
+ version: 1,
1112
+ ownerRepo
1113
+ },
1114
+ surface: defaultSurface,
1115
+ scroll: block.dataSource.kind === "artifact.body" ? { owner: "provider", axis: "none", virtualizationBoundary: false } : defaultScroll,
1116
+ activation: { activationId: `${rootNodeId}.activate.${block.blockId}`, mode: "inline" },
1117
+ lifecycle: defaultLifecycle,
1118
+ layout: { mode: "flex", direction: "column" },
1119
+ responsive: [],
1120
+ state: "idle",
1121
+ renderModel: {
1122
+ blockId: block.blockId,
1123
+ dataSource: block.dataSource,
1124
+ config: block.config,
1125
+ ...block.title ? { title: block.title } : {}
1126
+ }
1127
+ }));
1128
+ const rootLayout = spec.layout.mode === "split-horizontal" || spec.layout.mode === "three-pane" ? { mode: "flex", direction: "row" } : { mode: "flex", direction: "column" };
1129
+ const rootNode = {
1130
+ contract: "RenderNode",
1131
+ nodeId: rootNodeId,
1132
+ kind: "view",
1133
+ version: 1,
1134
+ ownerRepo,
1135
+ children: blockNodes.map((node) => node.nodeId),
1136
+ pageRef,
1137
+ capabilityRef: {
1138
+ kind: "capability",
1139
+ id: "monkeys.view.host",
1140
+ version: 1,
1141
+ ownerRepo
1142
+ },
1143
+ surface: defaultSurface,
1144
+ scroll: { owner: "page", axis: "none", virtualizationBoundary: false },
1145
+ activation: { activationId: `${rootNodeId}.activate`, mode: "inline" },
1146
+ lifecycle: defaultLifecycle,
1147
+ layout: rootLayout,
1148
+ responsive: [],
1149
+ state: "idle",
1150
+ renderModel: {
1151
+ viewId: spec.viewId,
1152
+ title: spec.title,
1153
+ subject: spec.subject,
1154
+ ...spec.query ? { query: spec.query } : {},
1155
+ layout: spec.layout,
1156
+ wiring: spec.wiring
1157
+ }
1158
+ };
1159
+ return RenderTreeSchema.parse({
1160
+ contract: "RenderTree",
1161
+ treeId: `tree.${spec.viewId}`,
1162
+ product,
1163
+ rootNodeId,
1164
+ nodes: [rootNode, ...blockNodes]
1165
+ });
1166
+ }
1167
+ var DESIGN_BOARD_ARTIFACT_PROFILE = ArtifactProfileSchema.parse({
1168
+ contract: "ArtifactProfile",
1169
+ schemaVersion: 1,
1170
+ artifactKind: "board",
1171
+ bodySchemaRef: "design-board-document@1",
1172
+ storageMode: "loro-aggregate",
1173
+ crdtCodec: "loro-v1",
1174
+ defaultViewId: "board.canvas",
1175
+ views: [
1176
+ {
1177
+ contract: "ViewSpec",
1178
+ schemaVersion: 1,
1179
+ viewId: "board.canvas",
1180
+ title: { "zh-CN": "\u753B\u677F\u89C6\u56FE", "en-US": "Canvas View" },
1181
+ subject: {
1182
+ kind: "artifact",
1183
+ ontologyId: "DesignProjects",
1184
+ artifactKind: "board",
1185
+ recordIdParam: "designBoardId"
1186
+ },
1187
+ query: { source: "self" },
1188
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1189
+ blocks: [
1190
+ {
1191
+ blockId: "canvas",
1192
+ capability: "monkeys.design-board.editor",
1193
+ slot: "main",
1194
+ dataSource: { kind: "artifact.body", session: "loro" },
1195
+ config: {}
1196
+ }
1197
+ ],
1198
+ wiring: []
1199
+ },
1200
+ {
1201
+ contract: "ViewSpec",
1202
+ schemaVersion: 1,
1203
+ viewId: "board.linesheet",
1204
+ title: { "zh-CN": "Linesheet \u89C6\u56FE", "en-US": "Linesheet View" },
1205
+ subject: {
1206
+ kind: "artifact",
1207
+ ontologyId: "DesignProjects",
1208
+ artifactKind: "board",
1209
+ recordIdParam: "designBoardId"
1210
+ },
1211
+ query: { source: "relation", relationPath: "linesheet_items" },
1212
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1213
+ blocks: [
1214
+ {
1215
+ blockId: "linesheet",
1216
+ capability: "studio.capability.workflow-page.linesheet",
1217
+ slot: "main",
1218
+ dataSource: { kind: "artifact.body", session: "loro", slice: "linesheet" },
1219
+ config: {}
1220
+ }
1221
+ ],
1222
+ wiring: []
1223
+ },
1224
+ {
1225
+ contract: "ViewSpec",
1226
+ schemaVersion: 1,
1227
+ viewId: "board.properties",
1228
+ title: { "zh-CN": "\u5C5E\u6027\u4E0E\u7248\u672C", "en-US": "Properties & History" },
1229
+ subject: {
1230
+ kind: "artifact",
1231
+ ontologyId: "DesignProjects",
1232
+ artifactKind: "board",
1233
+ recordIdParam: "designBoardId"
1234
+ },
1235
+ query: { source: "self" },
1236
+ layout: {
1237
+ mode: "split-horizontal",
1238
+ regions: [
1239
+ { id: "properties", slot: "left", size: "50%" },
1240
+ { id: "history", slot: "right", size: "50%" }
1241
+ ]
1242
+ },
1243
+ blocks: [
1244
+ {
1245
+ blockId: "properties",
1246
+ capability: "monkeys.design.record-detail",
1247
+ slot: "left",
1248
+ dataSource: { kind: "record.fields", recordRef: "subject" },
1249
+ config: {}
1250
+ },
1251
+ {
1252
+ blockId: "history",
1253
+ capability: "monkeys.design.record-history",
1254
+ slot: "right",
1255
+ dataSource: { kind: "record.fields", recordRef: "subject" },
1256
+ config: {}
1257
+ }
1258
+ ],
1259
+ wiring: []
1260
+ }
1261
+ ]
1262
+ });
1263
+ var WORKFLOW_ARTIFACT_PROFILE = ArtifactProfileSchema.parse({
1264
+ contract: "ArtifactProfile",
1265
+ schemaVersion: 1,
1266
+ artifactKind: "workflow",
1267
+ bodySchemaRef: "workflow-definition@1",
1268
+ storageMode: "loro-aggregate",
1269
+ crdtCodec: "loro-v1",
1270
+ defaultViewId: "workflow.process",
1271
+ views: [
1272
+ {
1273
+ contract: "ViewSpec",
1274
+ schemaVersion: 1,
1275
+ viewId: "workflow.process",
1276
+ title: { "zh-CN": "\u6D41\u7A0B\u89C6\u56FE", "en-US": "Process View" },
1277
+ subject: {
1278
+ kind: "artifact",
1279
+ ontologyId: "workflow-definitions",
1280
+ artifactKind: "workflow",
1281
+ recordIdParam: "workflowId"
1282
+ },
1283
+ query: { source: "self" },
1284
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1285
+ blocks: [
1286
+ {
1287
+ blockId: "flow-dag",
1288
+ capability: "studio.capability.workflow-page.process",
1289
+ slot: "main",
1290
+ dataSource: { kind: "artifact.body", session: "loro" },
1291
+ config: {}
1292
+ }
1293
+ ],
1294
+ wiring: []
1295
+ },
1296
+ {
1297
+ contract: "ViewSpec",
1298
+ schemaVersion: 1,
1299
+ viewId: "workflow.preview",
1300
+ title: { "zh-CN": "\u8868\u5355\u89C6\u56FE", "en-US": "Form View" },
1301
+ subject: {
1302
+ kind: "artifact",
1303
+ ontologyId: "workflow-definitions",
1304
+ artifactKind: "workflow",
1305
+ recordIdParam: "workflowId"
1306
+ },
1307
+ query: { source: "relation", relationPath: "runs" },
1308
+ layout: {
1309
+ mode: "split-horizontal",
1310
+ regions: [
1311
+ { id: "form", slot: "left", size: "34%", minSize: 320, collapsible: true },
1312
+ { id: "waterfall", slot: "right", size: "66%" }
1313
+ ]
1314
+ },
1315
+ blocks: [
1316
+ {
1317
+ blockId: "run-form",
1318
+ capability: "studio.capability.workflow-run-form",
1319
+ slot: "left",
1320
+ dataSource: { kind: "collection.query", queryRef: "view.query", relationPath: "runs", mode: "create" },
1321
+ config: {}
1322
+ },
1323
+ {
1324
+ blockId: "run-waterfall",
1325
+ capability: "studio.capability.workflow-run-waterfall",
1326
+ slot: "right",
1327
+ dataSource: { kind: "collection.query", queryRef: "view.query", relationPath: "runs", mode: "read" },
1328
+ config: {}
1329
+ }
1330
+ ],
1331
+ wiring: [
1332
+ {
1333
+ sourceBlockId: "run-form",
1334
+ event: "run.started",
1335
+ targetBlockId: "run-waterfall",
1336
+ action: "collection.prependPlaceholder"
1337
+ }
1338
+ ]
1339
+ },
1340
+ {
1341
+ contract: "ViewSpec",
1342
+ schemaVersion: 1,
1343
+ viewId: "workflow.log",
1344
+ title: { "zh-CN": "\u65E5\u5FD7\u89C6\u56FE", "en-US": "Log View" },
1345
+ subject: {
1346
+ kind: "artifact",
1347
+ ontologyId: "workflow-definitions",
1348
+ artifactKind: "workflow",
1349
+ recordIdParam: "workflowId"
1350
+ },
1351
+ query: { source: "relation", relationPath: "runs" },
1352
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1353
+ blocks: [
1354
+ {
1355
+ blockId: "run-log-table",
1356
+ capability: "studio.capability.workflow-page.log",
1357
+ slot: "main",
1358
+ dataSource: { kind: "collection.query", queryRef: "view.query", relationPath: "runs", mode: "read" },
1359
+ config: {}
1360
+ }
1361
+ ],
1362
+ wiring: []
1363
+ },
1364
+ {
1365
+ contract: "ViewSpec",
1366
+ schemaVersion: 1,
1367
+ viewId: "workflow.chat",
1368
+ title: { "zh-CN": "\u5BF9\u8BDD\u89C6\u56FE", "en-US": "Chat View" },
1369
+ subject: {
1370
+ kind: "artifact",
1371
+ ontologyId: "workflow-definitions",
1372
+ artifactKind: "workflow",
1373
+ recordIdParam: "workflowId"
1374
+ },
1375
+ query: { source: "relation", relationPath: "sessions" },
1376
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1377
+ blocks: [
1378
+ {
1379
+ blockId: "chat-stream",
1380
+ capability: "studio.capability.workflow-page.chat",
1381
+ slot: "main",
1382
+ dataSource: { kind: "collection.query", queryRef: "view.query", relationPath: "sessions", mode: "read-write" },
1383
+ config: {}
1384
+ }
1385
+ ],
1386
+ wiring: []
1387
+ }
1388
+ ]
1389
+ });
1390
+ var DOCUMENT_ARTIFACT_PROFILE = ArtifactProfileSchema.parse({
1391
+ contract: "ArtifactProfile",
1392
+ schemaVersion: 1,
1393
+ artifactKind: "document",
1394
+ bodySchemaRef: "markdown-document@1",
1395
+ storageMode: "loro-aggregate",
1396
+ crdtCodec: "loro-v1",
1397
+ defaultViewId: "document.editor",
1398
+ views: [
1399
+ {
1400
+ contract: "ViewSpec",
1401
+ schemaVersion: 1,
1402
+ viewId: "document.editor",
1403
+ title: { "zh-CN": "\u6587\u6863\u89C6\u56FE", "en-US": "Document View" },
1404
+ subject: { kind: "artifact", ontologyId: "documents", artifactKind: "document", recordIdParam: "documentId" },
1405
+ query: { source: "self" },
1406
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1407
+ blocks: [
1408
+ {
1409
+ blockId: "markdown",
1410
+ capability: "monkeys.design.markdown-document",
1411
+ slot: "main",
1412
+ dataSource: { kind: "artifact.body", session: "loro" },
1413
+ config: {}
1414
+ }
1415
+ ],
1416
+ wiring: []
1417
+ }
1418
+ ]
1419
+ });
1420
+ var CAD_ASSEMBLY_ARTIFACT_PROFILE = ArtifactProfileSchema.parse({
1421
+ contract: "ArtifactProfile",
1422
+ schemaVersion: 1,
1423
+ artifactKind: "cad.assembly",
1424
+ bodySchemaRef: "cad-artifact-document@1",
1425
+ storageMode: "loro-aggregate",
1426
+ crdtCodec: "loro-v1",
1427
+ defaultViewId: "cad.viewport3d",
1428
+ views: [
1429
+ {
1430
+ contract: "ViewSpec",
1431
+ schemaVersion: 1,
1432
+ viewId: "cad.viewport3d",
1433
+ title: { "zh-CN": "3D \u5EFA\u6A21\u89C6\u56FE", "en-US": "3D Modeling View" },
1434
+ subject: { kind: "artifact", ontologyId: "cad-assemblies", artifactKind: "cad.assembly", recordIdParam: "artifactId" },
1435
+ query: { source: "self" },
1436
+ layout: {
1437
+ mode: "three-pane",
1438
+ regions: [
1439
+ { id: "tree", slot: "left", size: 280, collapsible: true },
1440
+ { id: "viewport", slot: "main" },
1441
+ { id: "inspector", slot: "right", size: 320, collapsible: true }
1442
+ ]
1443
+ },
1444
+ blocks: [
1445
+ {
1446
+ blockId: "feature-tree",
1447
+ capability: "studio.capability.cad.feature-tree",
1448
+ slot: "left",
1449
+ dataSource: { kind: "artifact.body", session: "loro", slice: "features" },
1450
+ config: {}
1451
+ },
1452
+ {
1453
+ blockId: "viewport-3d",
1454
+ capability: "studio.capability.cad.viewport-3d",
1455
+ slot: "main",
1456
+ dataSource: { kind: "artifact.body", session: "loro" },
1457
+ config: {}
1458
+ },
1459
+ {
1460
+ blockId: "inspector",
1461
+ capability: "monkeys.design.record-detail",
1462
+ slot: "right",
1463
+ dataSource: { kind: "record.fields", recordRef: "$state.selectedNodeId" },
1464
+ config: {}
1465
+ }
1466
+ ],
1467
+ wiring: [
1468
+ {
1469
+ sourceBlockId: "feature-tree",
1470
+ event: "node.selected",
1471
+ targetBlockId: "viewport-3d",
1472
+ action: "viewport.highlightNode"
1473
+ }
1474
+ ]
1475
+ },
1476
+ {
1477
+ contract: "ViewSpec",
1478
+ schemaVersion: 1,
1479
+ viewId: "cad.bom",
1480
+ title: { "zh-CN": "BOM \u89C6\u56FE", "en-US": "BOM View" },
1481
+ subject: { kind: "artifact", ontologyId: "cad-assemblies", artifactKind: "cad.assembly", recordIdParam: "artifactId" },
1482
+ query: { source: "relation", relationPath: "parts" },
1483
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1484
+ blocks: [
1485
+ {
1486
+ blockId: "bom-table",
1487
+ capability: "monkeys.design.ontology-table",
1488
+ slot: "main",
1489
+ dataSource: { kind: "collection.query", queryRef: "view.query", relationPath: "parts", mode: "read-write" },
1490
+ config: {}
1491
+ }
1492
+ ],
1493
+ wiring: []
1494
+ }
1495
+ ]
1496
+ });
1497
+ var EDA_CIRCUIT_ARTIFACT_PROFILE = ArtifactProfileSchema.parse({
1498
+ contract: "ArtifactProfile",
1499
+ schemaVersion: 1,
1500
+ artifactKind: "eda.circuit",
1501
+ bodySchemaRef: "eda-circuit-document@1",
1502
+ storageMode: "loro-aggregate",
1503
+ crdtCodec: "loro-v1",
1504
+ defaultViewId: "eda.schematic",
1505
+ views: [
1506
+ {
1507
+ contract: "ViewSpec",
1508
+ schemaVersion: 1,
1509
+ viewId: "eda.schematic",
1510
+ title: { "zh-CN": "\u539F\u7406\u56FE\u89C6\u56FE", "en-US": "Schematic View" },
1511
+ subject: { kind: "artifact", ontologyId: "eda-circuits", artifactKind: "eda.circuit", recordIdParam: "artifactId" },
1512
+ query: { source: "self" },
1513
+ layout: {
1514
+ mode: "three-pane",
1515
+ regions: [
1516
+ { id: "library", slot: "left", size: 280, collapsible: true },
1517
+ { id: "schematic", slot: "main" },
1518
+ { id: "inspector", slot: "right", size: 320, collapsible: true }
1519
+ ]
1520
+ },
1521
+ blocks: [
1522
+ {
1523
+ blockId: "component-library",
1524
+ capability: "monkeys.design.ontology-table",
1525
+ slot: "left",
1526
+ dataSource: { kind: "collection.query", queryRef: "global.electronic-components", mode: "read" },
1527
+ config: {}
1528
+ },
1529
+ {
1530
+ blockId: "schematic-canvas",
1531
+ capability: "studio.capability.eda.schematic-editor",
1532
+ slot: "main",
1533
+ dataSource: { kind: "artifact.body", session: "loro", slice: "schematic" },
1534
+ config: {}
1535
+ },
1536
+ {
1537
+ blockId: "inspector",
1538
+ capability: "monkeys.design.record-detail",
1539
+ slot: "right",
1540
+ dataSource: { kind: "record.fields", recordRef: "$state.selectedComponentId" },
1541
+ config: {}
1542
+ }
1543
+ ],
1544
+ wiring: [
1545
+ {
1546
+ sourceBlockId: "schematic-canvas",
1547
+ event: "component.selected",
1548
+ targetStateKey: "selectedComponentId",
1549
+ action: "state.set"
1550
+ }
1551
+ ]
1552
+ },
1553
+ {
1554
+ contract: "ViewSpec",
1555
+ schemaVersion: 1,
1556
+ viewId: "eda.pcb",
1557
+ title: { "zh-CN": "PCB \u89C6\u56FE", "en-US": "PCB Layout View" },
1558
+ subject: { kind: "artifact", ontologyId: "eda-circuits", artifactKind: "eda.circuit", recordIdParam: "artifactId" },
1559
+ query: { source: "self" },
1560
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1561
+ blocks: [
1562
+ {
1563
+ blockId: "pcb-canvas",
1564
+ capability: "studio.capability.eda.pcb-editor",
1565
+ slot: "main",
1566
+ dataSource: { kind: "artifact.body", session: "loro", slice: "pcb" },
1567
+ config: {}
1568
+ }
1569
+ ],
1570
+ wiring: []
1571
+ },
1572
+ {
1573
+ contract: "ViewSpec",
1574
+ schemaVersion: 1,
1575
+ viewId: "eda.bom",
1576
+ title: { "zh-CN": "BOM / \u7F51\u8868\u89C6\u56FE", "en-US": "BOM & Netlist View" },
1577
+ subject: { kind: "artifact", ontologyId: "eda-circuits", artifactKind: "eda.circuit", recordIdParam: "artifactId" },
1578
+ query: { source: "relation", relationPath: "bom_items" },
1579
+ layout: { mode: "single", regions: [{ id: "main", slot: "main" }] },
1580
+ blocks: [
1581
+ {
1582
+ blockId: "bom-table",
1583
+ capability: "monkeys.design.ontology-table",
1584
+ slot: "main",
1585
+ dataSource: { kind: "collection.query", queryRef: "view.query", relationPath: "bom_items", mode: "read-write" },
1586
+ config: {}
1587
+ }
1588
+ ],
1589
+ wiring: []
1590
+ }
1591
+ ]
1592
+ });
1593
+ var BUILTIN_ARTIFACT_PROFILES = Object.freeze({
1594
+ board: DESIGN_BOARD_ARTIFACT_PROFILE,
1595
+ workflow: WORKFLOW_ARTIFACT_PROFILE,
1596
+ document: DOCUMENT_ARTIFACT_PROFILE,
1597
+ "cad.assembly": CAD_ASSEMBLY_ARTIFACT_PROFILE,
1598
+ "eda.circuit": EDA_CIRCUIT_ARTIFACT_PROFILE
1599
+ });
1600
+ function resolveBuiltinArtifactProfile(artifactKind) {
1601
+ return BUILTIN_ARTIFACT_PROFILES[artifactKind];
1602
+ }
1603
+
1076
1604
  // src/runtime/agent-session-projector.ts
1077
1605
  function createAgentSessionEventProjection(sessionId) {
1078
1606
  return {
@@ -7640,6 +8168,15 @@ export {
7640
8168
  createOpenApiCapabilityRegistrySource,
7641
8169
  createWorkflowCapabilityManifest,
7642
8170
  compileCapabilityRegistry,
8171
+ buildArtifactCollabRoomId,
8172
+ compileViewSpecToRenderTree,
8173
+ DESIGN_BOARD_ARTIFACT_PROFILE,
8174
+ WORKFLOW_ARTIFACT_PROFILE,
8175
+ DOCUMENT_ARTIFACT_PROFILE,
8176
+ CAD_ASSEMBLY_ARTIFACT_PROFILE,
8177
+ EDA_CIRCUIT_ARTIFACT_PROFILE,
8178
+ BUILTIN_ARTIFACT_PROFILES,
8179
+ resolveBuiltinArtifactProfile,
7643
8180
  createAgentSessionEventProjection,
7644
8181
  projectAgentSessionEvents,
7645
8182
  toAgentSessionViewModel,
@@ -7775,4 +8312,4 @@ export {
7775
8312
  pageMountParentHref,
7776
8313
  nativePageMountPlan
7777
8314
  };
7778
- //# sourceMappingURL=chunk-ITGLKSCE.mjs.map
8315
+ //# sourceMappingURL=chunk-VYC47WKJ.mjs.map