@inf-monkeys-tech/monkeys 1.1.60 → 1.1.62

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 (83) hide show
  1. package/lib/contracts/agent-data.d.ts +2 -2
  2. package/lib/contracts/agent.d.ts +3 -3
  3. package/lib/contracts/artifact-platform.d.ts +6 -263
  4. package/lib/contracts/artifact-platform.d.ts.map +1 -1
  5. package/lib/contracts/artifact-platform.js +14 -113
  6. package/lib/contracts/artifact-platform.js.map +1 -1
  7. package/lib/contracts/bento-block.d.ts +616 -0
  8. package/lib/contracts/bento-block.d.ts.map +1 -0
  9. package/lib/contracts/bento-block.js +505 -0
  10. package/lib/contracts/bento-block.js.map +1 -0
  11. package/lib/contracts/declarative-control-http.d.ts +1090 -967
  12. package/lib/contracts/declarative-control-http.d.ts.map +1 -1
  13. package/lib/contracts/declarative-control.d.ts +173 -158
  14. package/lib/contracts/declarative-control.d.ts.map +1 -1
  15. package/lib/contracts/declarative-control.js +26 -1
  16. package/lib/contracts/declarative-control.js.map +1 -1
  17. package/lib/contracts/declarative-document-import.d.ts +75 -60
  18. package/lib/contracts/declarative-document-import.d.ts.map +1 -1
  19. package/lib/contracts/declarative-publication-job.d.ts +232 -208
  20. package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
  21. package/lib/contracts/index.d.ts +1 -0
  22. package/lib/contracts/index.d.ts.map +1 -1
  23. package/lib/contracts/index.js +1 -0
  24. package/lib/contracts/index.js.map +1 -1
  25. package/lib/contracts/menu.d.ts +16 -13
  26. package/lib/contracts/menu.d.ts.map +1 -1
  27. package/lib/contracts/page-expression.d.ts +5 -5
  28. package/lib/contracts/page.d.ts +50 -41
  29. package/lib/contracts/page.d.ts.map +1 -1
  30. package/lib/contracts/render.d.ts +66 -66
  31. package/lib/contracts/semantic.d.ts +16 -13
  32. package/lib/contracts/semantic.d.ts.map +1 -1
  33. package/lib/contracts/tenant.d.ts +86 -71
  34. package/lib/contracts/tenant.d.ts.map +1 -1
  35. package/lib/contracts/trend.d.ts +1 -1
  36. package/lib/contracts/unified-view.d.ts +26 -533
  37. package/lib/contracts/unified-view.d.ts.map +1 -1
  38. package/lib/contracts/unified-view.js +17 -316
  39. package/lib/contracts/unified-view.js.map +1 -1
  40. package/lib/contracts/workflow-definition.d.ts +10 -10
  41. package/lib/esm/{chunk-5IWBM5FS.mjs → chunk-EFVODA3P.mjs} +3521 -3402
  42. package/lib/esm/chunk-EFVODA3P.mjs.map +1 -0
  43. package/lib/esm/{chunk-QM3K7CWF.mjs → chunk-MAZ3HUFS.mjs} +152 -142
  44. package/lib/esm/chunk-MAZ3HUFS.mjs.map +1 -0
  45. package/lib/esm/{chunk-L7WP57HT.mjs → chunk-RWTW74VC.mjs} +2 -2
  46. package/lib/esm/{chunk-POHBVHPL.mjs → chunk-UPCRRS4I.mjs} +4 -2
  47. package/lib/esm/chunk-UPCRRS4I.mjs.map +1 -0
  48. package/lib/esm/contracts/index.mjs +40 -28
  49. package/lib/esm/index.mjs +46 -36
  50. package/lib/esm/index.mjs.map +1 -1
  51. package/lib/esm/runtime/index.mjs +7 -9
  52. package/lib/esm/schemas/index.mjs +26 -28
  53. package/lib/json-schema/bento-node.schema.json +1446 -0
  54. package/lib/json-schema/index.json +1 -0
  55. package/lib/json-schema/page-definition.schema.json +51 -64
  56. package/lib/json-schema/page-runtime-bundle.schema.json +97 -110
  57. package/lib/json-schema/page-runtime-descriptor.schema.json +51 -64
  58. package/lib/json-schema/page.schema.json +61 -74
  59. package/lib/json-schema/product-declaration.schema.json +17 -30
  60. package/lib/json-schema/tenant-product-config.schema.json +17 -30
  61. package/lib/json-schema/tenant-runtime-config.schema.json +17 -30
  62. package/lib/json-schema/view-ontology-record.schema.json +1141 -145
  63. package/lib/runtime/artifact-session.d.ts +5 -10
  64. package/lib/runtime/artifact-session.d.ts.map +1 -1
  65. package/lib/runtime/artifact-session.js +91 -78
  66. package/lib/runtime/artifact-session.js.map +1 -1
  67. package/lib/runtime/native-page-composition.d.ts +5 -2
  68. package/lib/runtime/native-page-composition.d.ts.map +1 -1
  69. package/lib/runtime/runtime-definition-wire.d.ts +90 -78
  70. package/lib/runtime/runtime-definition-wire.d.ts.map +1 -1
  71. package/lib/runtime/unified-view-compiler.d.ts +12 -16
  72. package/lib/runtime/unified-view-compiler.d.ts.map +1 -1
  73. package/lib/runtime/unified-view-compiler.js +69 -77
  74. package/lib/runtime/unified-view-compiler.js.map +1 -1
  75. package/lib/schemas/index.d.ts +235 -242
  76. package/lib/schemas/index.d.ts.map +1 -1
  77. package/lib/schemas/index.js +32 -30
  78. package/lib/schemas/index.js.map +1 -1
  79. package/package.json +2 -2
  80. package/lib/esm/chunk-5IWBM5FS.mjs.map +0 -1
  81. package/lib/esm/chunk-POHBVHPL.mjs.map +0 -1
  82. package/lib/esm/chunk-QM3K7CWF.mjs.map +0 -1
  83. /package/lib/esm/{chunk-L7WP57HT.mjs.map → chunk-RWTW74VC.mjs.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  PAGE_STREAM_MAX_FRAME_BYTES,
5
5
  PageStreamDescriptorSchema,
6
6
  PageStreamEventSchema
7
- } from "./chunk-L7WP57HT.mjs";
7
+ } from "./chunk-RWTW74VC.mjs";
8
8
  import {
9
9
  AccessPolicySchema,
10
10
  ActionProgramDefinitionSchema,
@@ -12,6 +12,7 @@ import {
12
12
  AgentSessionViewModelSchema,
13
13
  ApplicationHandoffSchema,
14
14
  ArtifactProfileSchema,
15
+ ArtifactViewSchema,
15
16
  CapabilityManifestSchema,
16
17
  CapabilityRegistryDocumentSchema,
17
18
  CapabilityRegistrySourceSchema,
@@ -90,7 +91,6 @@ import {
90
91
  VIEW_ONTOLOGY_ID,
91
92
  ViewOntologyRecordSchema,
92
93
  ViewProviderDescriptorSchema,
93
- ViewSpecSchema,
94
94
  WorkbenchReleaseSchema,
95
95
  WorkbenchRuntimeBundleSchema,
96
96
  WorkbenchSchema,
@@ -119,7 +119,7 @@ import {
119
119
  require_validation,
120
120
  require_validation_error,
121
121
  resolveThemeTokens
122
- } from "./chunk-5IWBM5FS.mjs";
122
+ } from "./chunk-EFVODA3P.mjs";
123
123
  import {
124
124
  __commonJS,
125
125
  __toESM
@@ -1082,12 +1082,12 @@ function buildArtifactCollabRoomId(key) {
1082
1082
  const tenant = key.tenantId ? `${key.tenantId}:` : "";
1083
1083
  return `artifact:${tenant}${key.teamId}:${key.ontologyId}:${key.artifactKind}:${key.recordId}`;
1084
1084
  }
1085
- function compileViewSpecToRenderTree(specInput, options = {}) {
1086
- const spec = ViewSpecSchema.parse(specInput);
1085
+ function compileBentoTreeToRenderTree(viewInput, options = {}) {
1086
+ const view = ArtifactViewSchema.parse(viewInput);
1087
1087
  const product = options.product ?? "studio";
1088
1088
  const ownerRepo = options.ownerRepo ?? "monkeys-studio";
1089
- const rootNodeId = `view.${spec.viewId}`;
1090
- const pageRef = { kind: "page", id: rootNodeId, ownerRepo };
1089
+ const rootPrefix = `bento.${view.viewId}`;
1090
+ const pageRef = { kind: "page", id: rootPrefix, ownerRepo };
1091
1091
  const defaultSurface = { frameOwner: "host", density: "default" };
1092
1092
  const defaultScroll = { owner: "surface", axis: "y", virtualizationBoundary: false };
1093
1093
  const defaultLifecycle = {
@@ -1097,73 +1097,87 @@ function compileViewSpecToRenderTree(specInput, options = {}) {
1097
1097
  deepLink: true,
1098
1098
  focusReturn: false
1099
1099
  };
1100
- const blockNodes = spec.blocks.map((block) => ({
1101
- contract: "RenderNode",
1102
- nodeId: `${rootNodeId}.block.${block.blockId}`,
1103
- kind: block.dataSource.kind === "artifact.body" ? "professional-provider" : block.dataSource.kind === "record.fields" ? "record" : "view",
1104
- version: 1,
1105
- ownerRepo,
1106
- parentNodeId: rootNodeId,
1107
- children: [],
1108
- slot: block.slot,
1109
- pageRef,
1110
- capabilityRef: {
1111
- kind: "capability",
1112
- id: block.capability,
1113
- version: 1,
1114
- ownerRepo
1115
- },
1116
- surface: defaultSurface,
1117
- scroll: block.dataSource.kind === "artifact.body" ? { owner: "provider", axis: "none", virtualizationBoundary: false } : defaultScroll,
1118
- activation: { activationId: `${rootNodeId}.activate.${block.blockId}`, mode: "inline" },
1119
- lifecycle: defaultLifecycle,
1120
- layout: { mode: "flex", direction: "column" },
1121
- responsive: [],
1122
- state: "idle",
1123
- renderModel: {
1124
- blockId: block.blockId,
1125
- dataSource: block.dataSource,
1126
- config: block.config,
1127
- ...block.title ? { title: block.title } : {}
1100
+ const nodes = [];
1101
+ const lowerNode = (node, parentNodeId) => {
1102
+ const nodeId = parentNodeId ? `${rootPrefix}.${node.id}` : `${rootPrefix}.root`;
1103
+ if (node.kind === "leaf") {
1104
+ const dsKind = node.block.dataSource?.kind;
1105
+ nodes.push({
1106
+ contract: "RenderNode",
1107
+ nodeId,
1108
+ kind: dsKind === "artifact.body" ? "professional-provider" : dsKind === "record.fields" ? "record" : "view",
1109
+ version: 1,
1110
+ ownerRepo,
1111
+ ...parentNodeId ? { parentNodeId } : {},
1112
+ children: [],
1113
+ slot: node.id,
1114
+ pageRef,
1115
+ capabilityRef: {
1116
+ kind: "capability",
1117
+ id: `monkeys.block.${node.block.customType ?? node.block.type}`,
1118
+ version: 1,
1119
+ ownerRepo
1120
+ },
1121
+ surface: defaultSurface,
1122
+ scroll: dsKind === "artifact.body" ? { owner: "provider", axis: "none", virtualizationBoundary: false } : defaultScroll,
1123
+ activation: { activationId: `${nodeId}.activate`, mode: "inline" },
1124
+ lifecycle: defaultLifecycle,
1125
+ layout: { mode: "flex", direction: "column" },
1126
+ responsive: [],
1127
+ state: "idle",
1128
+ renderModel: {
1129
+ bentoId: node.id,
1130
+ chrome: node.chrome ?? "panel",
1131
+ ...node.placement ? { placement: node.placement } : {},
1132
+ block: node.block
1133
+ }
1134
+ });
1135
+ return nodeId;
1128
1136
  }
1129
- }));
1130
- const rootLayout = spec.layout.mode === "split-horizontal" || spec.layout.mode === "three-pane" ? { mode: "flex", direction: "row" } : { mode: "flex", direction: "column" };
1131
- const rootNode = {
1132
- contract: "RenderNode",
1133
- nodeId: rootNodeId,
1134
- kind: "view",
1135
- version: 1,
1136
- ownerRepo,
1137
- children: blockNodes.map((node) => node.nodeId),
1138
- pageRef,
1139
- capabilityRef: {
1140
- kind: "capability",
1141
- id: "monkeys.view.host",
1137
+ const childIds = node.children.map((child) => lowerNode(child, nodeId));
1138
+ const isHorizontal = node.layout === "split" && (node.direction ?? "horizontal") === "horizontal";
1139
+ nodes.unshift({
1140
+ contract: "RenderNode",
1141
+ nodeId,
1142
+ kind: "view",
1142
1143
  version: 1,
1143
- ownerRepo
1144
- },
1145
- surface: defaultSurface,
1146
- scroll: { owner: "page", axis: "none", virtualizationBoundary: false },
1147
- activation: { activationId: `${rootNodeId}.activate`, mode: "inline" },
1148
- lifecycle: defaultLifecycle,
1149
- layout: rootLayout,
1150
- responsive: [],
1151
- state: "idle",
1152
- renderModel: {
1153
- viewId: spec.viewId,
1154
- title: spec.title,
1155
- subject: spec.subject,
1156
- ...spec.query ? { query: spec.query } : {},
1157
- layout: spec.layout,
1158
- wiring: spec.wiring
1159
- }
1144
+ ownerRepo,
1145
+ ...parentNodeId ? { parentNodeId } : {},
1146
+ children: childIds,
1147
+ pageRef,
1148
+ capabilityRef: {
1149
+ kind: "capability",
1150
+ id: `monkeys.bento.${node.layout}`,
1151
+ version: 1,
1152
+ ownerRepo
1153
+ },
1154
+ surface: defaultSurface,
1155
+ scroll: { owner: "page", axis: "none", virtualizationBoundary: false },
1156
+ activation: { activationId: `${nodeId}.activate`, mode: "inline" },
1157
+ lifecycle: defaultLifecycle,
1158
+ layout: isHorizontal ? { mode: "flex", direction: "row" } : { mode: "flex", direction: "column" },
1159
+ responsive: [],
1160
+ state: "idle",
1161
+ renderModel: {
1162
+ bentoId: node.id,
1163
+ layout: node.layout,
1164
+ ...node.direction ? { direction: node.direction } : {},
1165
+ ...node.columns ? { columns: node.columns } : {},
1166
+ ...node.chrome ? { chrome: node.chrome } : {},
1167
+ ...node.placement ? { placement: node.placement } : {},
1168
+ ...node.data ? { data: node.data } : {},
1169
+ ...node.wiring ? { wiring: node.wiring } : {}
1170
+ }
1171
+ });
1172
+ return nodeId;
1160
1173
  };
1174
+ const rootNodeId = lowerNode(view.root);
1161
1175
  return RenderTreeSchema.parse({
1162
1176
  contract: "RenderTree",
1163
- treeId: `tree.${spec.viewId}`,
1177
+ treeId: `tree.${view.viewId}`,
1164
1178
  product,
1165
1179
  rootNodeId,
1166
- nodes: [rootNode, ...blockNodes]
1180
+ nodes
1167
1181
  });
1168
1182
  }
1169
1183
  function createArtifactRegistry(initialProfiles = []) {
@@ -1171,7 +1185,9 @@ function createArtifactRegistry(initialProfiles = []) {
1171
1185
  const registerProfile = (profileInput, options = {}) => {
1172
1186
  const profile = ArtifactProfileSchema.parse(profileInput);
1173
1187
  if (profiles.has(profile.artifactKind) && !options.replace) {
1174
- throw new Error(`ArtifactProfile for kind "${profile.artifactKind}" is already registered.`);
1188
+ throw new Error(
1189
+ `ArtifactProfile for kind "${profile.artifactKind}" is already registered.`
1190
+ );
1175
1191
  }
1176
1192
  profiles.set(profile.artifactKind, profile);
1177
1193
  return profile;
@@ -1194,7 +1210,7 @@ function createArtifactRegistry(initialProfiles = []) {
1194
1210
  resolveView,
1195
1211
  compileView: (artifactKind, viewId, options) => {
1196
1212
  const view = resolveView(artifactKind, viewId);
1197
- return view ? compileViewSpecToRenderTree(view, options) : void 0;
1213
+ return view ? compileBentoTreeToRenderTree(view, options) : void 0;
1198
1214
  }
1199
1215
  });
1200
1216
  }
@@ -7765,21 +7781,21 @@ function nativePageMountPlan(page, catalogRevision) {
7765
7781
 
7766
7782
  // src/runtime/unified-view-compiler.ts
7767
7783
  var VIEW_LORO_KEYED_COLLECTIONS = [
7768
- { path: "ui.bentos", keyField: "bentoId" }
7784
+ { path: "root.children", keyField: "id" }
7769
7785
  ];
7770
7786
  function computeCanonicalViewHash(input) {
7771
7787
  return canonicalContentHash({
7772
7788
  boundOntologyId: input.boundOntologyId.trim(),
7773
7789
  data: input.data,
7774
- ui: input.ui
7790
+ root: input.root
7775
7791
  });
7776
7792
  }
7777
7793
  function buildDeterministicViewId(input) {
7778
7794
  return `view-${computeCanonicalViewHash(input).slice(0, 24)}`;
7779
7795
  }
7780
- function createSingleBentoViewRecord(params) {
7796
+ function createSingleBlockViewRecord(params) {
7781
7797
  const boundOntologyId = params.ontologyId.trim();
7782
- const bentoType = params.bentoType ?? "card";
7798
+ const blockType = params.blockType ?? "gallery";
7783
7799
  const data = {
7784
7800
  statements: {
7785
7801
  primary: {
@@ -7796,24 +7812,18 @@ function createSingleBentoViewRecord(params) {
7796
7812
  }
7797
7813
  }
7798
7814
  };
7799
- const ui = {
7800
- columns: 12,
7801
- rowHeight: 72,
7802
- bentos: [
7803
- {
7804
- bentoId: "primary",
7805
- bentoType,
7806
- x: 0,
7807
- y: 0,
7808
- w: 12,
7809
- h: 10,
7810
- statementId: "primary",
7811
- ...params.name ? { title: params.name } : {},
7812
- ...params.bentoProps ? { props: params.bentoProps } : {}
7813
- }
7814
- ]
7815
+ const root = {
7816
+ id: "primary",
7817
+ kind: "leaf",
7818
+ chrome: "none",
7819
+ block: {
7820
+ type: blockType,
7821
+ dataSource: { kind: "statement", statementId: "primary" },
7822
+ ...params.name ? { title: params.name } : {},
7823
+ ...params.blockConfig ? { config: params.blockConfig } : {}
7824
+ }
7815
7825
  };
7816
- const viewId = params.viewId?.trim() || buildDeterministicViewId({ boundOntologyId, data, ui });
7826
+ const viewId = params.viewId?.trim() || buildDeterministicViewId({ boundOntologyId, data, root });
7817
7827
  return ViewOntologyRecordSchema.parse({
7818
7828
  contract: "ViewOntologyRecord",
7819
7829
  schemaVersion: 1,
@@ -7823,7 +7833,7 @@ function createSingleBentoViewRecord(params) {
7823
7833
  ...params.description ? { description: params.description } : {},
7824
7834
  ...params.parentViewId ? { parentViewId: params.parentViewId } : {},
7825
7835
  data,
7826
- ui
7836
+ root
7827
7837
  });
7828
7838
  }
7829
7839
  function createSelectionShareViewRecord(params) {
@@ -7834,14 +7844,14 @@ function createSelectionShareViewRecord(params) {
7834
7844
  throw new Error("Selection share View requires at least one assetId.");
7835
7845
  }
7836
7846
  const where = uniqueIds.length === 1 ? { op: "field", field: "id", cmp: "eq", value: uniqueIds[0] } : { op: "field", field: "id", cmp: "in", value: uniqueIds };
7837
- const resolvedBentoType = params.bentoType ?? (uniqueIds.length === 1 ? "record-detail" : "card");
7838
- return createSingleBentoViewRecord({
7847
+ const resolvedBlockType = params.blockType ?? (uniqueIds.length === 1 ? "record-detail" : "gallery");
7848
+ return createSingleBlockViewRecord({
7839
7849
  viewId: params.viewId,
7840
7850
  ontologyId: params.ontologyId,
7841
7851
  name: params.name,
7842
7852
  where,
7843
7853
  select: params.select,
7844
- bentoType: resolvedBentoType
7854
+ blockType: resolvedBlockType
7845
7855
  });
7846
7856
  }
7847
7857
  function createWorkflowViewRecord(params) {
@@ -7868,31 +7878,44 @@ function createWorkflowViewRecord(params) {
7868
7878
  }
7869
7879
  }
7870
7880
  };
7871
- const ui2 = {
7872
- columns: 12,
7873
- rowHeight: 72,
7874
- bentos: [
7881
+ const root2 = {
7882
+ id: "workflow-preview",
7883
+ kind: "container",
7884
+ layout: "split",
7885
+ direction: "horizontal",
7886
+ chrome: "none",
7887
+ children: [
7875
7888
  {
7876
- bentoId: "form",
7877
- bentoType: "workflow-form",
7878
- x: 0,
7879
- y: 0,
7880
- w: 4,
7881
- h: 10,
7882
- actionStatementIds: ["execute_workflow"]
7889
+ id: "form",
7890
+ kind: "leaf",
7891
+ chrome: "panel",
7892
+ placement: { split: { size: "34%", minSize: 280 } },
7893
+ block: {
7894
+ type: "workflow-form",
7895
+ actionStatementIds: ["execute_workflow"]
7896
+ }
7883
7897
  },
7884
7898
  {
7885
- bentoId: "results",
7886
- bentoType: "workflow-waterfall",
7887
- x: 4,
7888
- y: 0,
7889
- w: 8,
7890
- h: 10,
7891
- statementId: "workflow_outputs"
7899
+ id: "results",
7900
+ kind: "leaf",
7901
+ chrome: "panel",
7902
+ placement: { split: { size: "66%" } },
7903
+ block: {
7904
+ type: "workflow-waterfall",
7905
+ dataSource: { kind: "statement", statementId: "workflow_outputs" }
7906
+ }
7907
+ }
7908
+ ],
7909
+ wiring: [
7910
+ {
7911
+ sourceNodeId: "form",
7912
+ event: "workflow.executed",
7913
+ targetNodeId: "results",
7914
+ action: "refresh"
7892
7915
  }
7893
7916
  ]
7894
7917
  };
7895
- const viewId2 = params.viewId?.trim() || buildDeterministicViewId({ boundOntologyId, data: data2, ui: ui2 });
7918
+ const viewId2 = params.viewId?.trim() || buildDeterministicViewId({ boundOntologyId, data: data2, root: root2 });
7896
7919
  return ViewOntologyRecordSchema.parse({
7897
7920
  contract: "ViewOntologyRecord",
7898
7921
  schemaVersion: 1,
@@ -7900,10 +7923,10 @@ function createWorkflowViewRecord(params) {
7900
7923
  boundOntologyId,
7901
7924
  ...params.name ? { name: params.name } : {},
7902
7925
  data: data2,
7903
- ui: ui2
7926
+ root: root2
7904
7927
  });
7905
7928
  }
7906
- const bentoTypeByPageType = {
7929
+ const blockTypeByPageType = {
7907
7930
  process: "workflow-canvas",
7908
7931
  log: "workflow-log",
7909
7932
  chat: "workflow-chat",
@@ -7918,22 +7941,16 @@ function createWorkflowViewRecord(params) {
7918
7941
  }
7919
7942
  }
7920
7943
  };
7921
- const ui = {
7922
- columns: 12,
7923
- rowHeight: 72,
7924
- bentos: [
7925
- {
7926
- bentoId: "main",
7927
- bentoType: bentoTypeByPageType[pageType],
7928
- x: 0,
7929
- y: 0,
7930
- w: 12,
7931
- h: 10,
7932
- actionStatementIds: ["workflow_binding"]
7933
- }
7934
- ]
7944
+ const root = {
7945
+ id: "main",
7946
+ kind: "leaf",
7947
+ chrome: "none",
7948
+ block: {
7949
+ type: blockTypeByPageType[pageType],
7950
+ actionStatementIds: ["workflow_binding"]
7951
+ }
7935
7952
  };
7936
- const viewId = params.viewId?.trim() || buildDeterministicViewId({ boundOntologyId, data, ui });
7953
+ const viewId = params.viewId?.trim() || buildDeterministicViewId({ boundOntologyId, data, root });
7937
7954
  return ViewOntologyRecordSchema.parse({
7938
7955
  contract: "ViewOntologyRecord",
7939
7956
  schemaVersion: 1,
@@ -7941,14 +7958,9 @@ function createWorkflowViewRecord(params) {
7941
7958
  boundOntologyId,
7942
7959
  ...params.name ? { name: params.name } : {},
7943
7960
  data,
7944
- ui
7961
+ root
7945
7962
  });
7946
7963
  }
7947
- function resolveViewHostShell(context) {
7948
- if (context.surface === "route") return "app-shell";
7949
- if (context.surface === "share") return context.linkPolicy?.shell ?? "share-shell";
7950
- return "none";
7951
- }
7952
7964
  var CAPABILITY_ORDER = [
7953
7965
  "read",
7954
7966
  "execute",
@@ -7958,10 +7970,9 @@ var CAPABILITY_ORDER = [
7958
7970
  function attenuateViewCapabilities(parentCapabilities, requestedCapabilities) {
7959
7971
  const allowed = new Set(parentCapabilities);
7960
7972
  if (!allowed.has("read")) return [];
7961
- const attenuated = CAPABILITY_ORDER.filter(
7973
+ return CAPABILITY_ORDER.filter(
7962
7974
  (cap) => cap === "read" || allowed.has(cap) && requestedCapabilities.includes(cap)
7963
7975
  );
7964
- return attenuated;
7965
7976
  }
7966
7977
 
7967
7978
  export {
@@ -7971,7 +7982,7 @@ export {
7971
7982
  createWorkflowCapabilityManifest,
7972
7983
  compileCapabilityRegistry,
7973
7984
  buildArtifactCollabRoomId,
7974
- compileViewSpecToRenderTree,
7985
+ compileBentoTreeToRenderTree,
7975
7986
  createArtifactRegistry,
7976
7987
  createAgentSessionEventProjection,
7977
7988
  projectAgentSessionEvents,
@@ -8110,10 +8121,9 @@ export {
8110
8121
  VIEW_LORO_KEYED_COLLECTIONS,
8111
8122
  computeCanonicalViewHash,
8112
8123
  buildDeterministicViewId,
8113
- createSingleBentoViewRecord,
8124
+ createSingleBlockViewRecord,
8114
8125
  createSelectionShareViewRecord,
8115
8126
  createWorkflowViewRecord,
8116
- resolveViewHostShell,
8117
8127
  attenuateViewCapabilities
8118
8128
  };
8119
- //# sourceMappingURL=chunk-QM3K7CWF.mjs.map
8129
+ //# sourceMappingURL=chunk-MAZ3HUFS.mjs.map