@inf-monkeys-tech/monkeys 1.1.56 → 1.1.58

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 (36) hide show
  1. package/lib/contracts/artifact-platform.d.ts +0 -2
  2. package/lib/contracts/artifact-platform.d.ts.map +1 -1
  3. package/lib/contracts/artifact-platform.js +1 -11
  4. package/lib/contracts/artifact-platform.js.map +1 -1
  5. package/lib/contracts/declarative-control-http.d.ts +47 -47
  6. package/lib/contracts/declarative-control.d.ts +3 -3
  7. package/lib/contracts/declarative-diagnostic.d.ts +2 -2
  8. package/lib/contracts/declarative-document-import.d.ts +2 -2
  9. package/lib/contracts/declarative-publication-job.d.ts +19 -19
  10. package/lib/contracts/declarative-publication-verification.d.ts +1 -1
  11. package/lib/esm/{chunk-Y7EZZ6IW.mjs → chunk-4D4UQIFA.mjs} +2 -2
  12. package/lib/esm/{chunk-4LC3ZXUP.mjs → chunk-JLTNBOQY.mjs} +3 -3
  13. package/lib/esm/{chunk-HJNQDSLC.mjs → chunk-MQOSI237.mjs} +2 -2
  14. package/lib/esm/{chunk-DQJODDRF.mjs → chunk-SK5C7NUN.mjs} +2 -2
  15. package/lib/esm/{chunk-74H5I3XN.mjs → chunk-SMJPC7BB.mjs} +34 -235
  16. package/lib/esm/chunk-SMJPC7BB.mjs.map +1 -0
  17. package/lib/esm/{chunk-FIZWECL6.mjs → chunk-WWNBSU45.mjs} +1 -12
  18. package/lib/esm/chunk-WWNBSU45.mjs.map +1 -0
  19. package/lib/esm/contracts/index.mjs +4 -6
  20. package/lib/esm/index.mjs +8 -16
  21. package/lib/esm/index.mjs.map +1 -1
  22. package/lib/esm/runtime/index.mjs +5 -11
  23. package/lib/esm/schemas/index.mjs +3 -3
  24. package/lib/runtime/artifact-session.d.ts +19 -4
  25. package/lib/runtime/artifact-session.d.ts.map +1 -1
  26. package/lib/runtime/artifact-session.js +38 -230
  27. package/lib/runtime/artifact-session.js.map +1 -1
  28. package/lib/runtime/runtime-definition-wire.d.ts +6 -6
  29. package/lib/schemas/index.d.ts +4 -4
  30. package/package.json +2 -2
  31. package/lib/esm/chunk-74H5I3XN.mjs.map +0 -1
  32. package/lib/esm/chunk-FIZWECL6.mjs.map +0 -1
  33. /package/lib/esm/{chunk-Y7EZZ6IW.mjs.map → chunk-4D4UQIFA.mjs.map} +0 -0
  34. /package/lib/esm/{chunk-4LC3ZXUP.mjs.map → chunk-JLTNBOQY.mjs.map} +0 -0
  35. /package/lib/esm/{chunk-HJNQDSLC.mjs.map → chunk-MQOSI237.mjs.map} +0 -0
  36. /package/lib/esm/{chunk-DQJODDRF.mjs.map → chunk-SK5C7NUN.mjs.map} +0 -0
@@ -520,9 +520,9 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
520
520
  code: z.ZodString;
521
521
  stage: z.ZodOptional<z.ZodEnum<{
522
522
  contract: "contract";
523
- document: "document";
524
523
  reference: "reference";
525
524
  runtime: "runtime";
525
+ document: "document";
526
526
  policy: "policy";
527
527
  }>>;
528
528
  severity: z.ZodOptional<z.ZodEnum<{
@@ -4517,7 +4517,7 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
4517
4517
  code: string;
4518
4518
  path: string;
4519
4519
  message: string;
4520
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
4520
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
4521
4521
  severity?: "error" | "warning" | "info" | undefined;
4522
4522
  blocking?: boolean | undefined;
4523
4523
  recovery?: string[] | undefined;
@@ -7368,7 +7368,7 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
7368
7368
  code: string;
7369
7369
  path: string;
7370
7370
  message: string;
7371
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
7371
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
7372
7372
  severity?: "error" | "warning" | "info" | undefined;
7373
7373
  blocking?: boolean | undefined;
7374
7374
  recovery?: string[] | undefined;
@@ -10107,9 +10107,9 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
10107
10107
  code: z.ZodString;
10108
10108
  stage: z.ZodOptional<z.ZodEnum<{
10109
10109
  contract: "contract";
10110
- document: "document";
10111
10110
  reference: "reference";
10112
10111
  runtime: "runtime";
10112
+ document: "document";
10113
10113
  policy: "policy";
10114
10114
  }>>;
10115
10115
  severity: z.ZodOptional<z.ZodEnum<{
@@ -11428,9 +11428,9 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
11428
11428
  code: z.ZodString;
11429
11429
  stage: z.ZodOptional<z.ZodEnum<{
11430
11430
  contract: "contract";
11431
- document: "document";
11432
11431
  reference: "reference";
11433
11432
  runtime: "runtime";
11433
+ document: "document";
11434
11434
  policy: "policy";
11435
11435
  }>>;
11436
11436
  severity: z.ZodOptional<z.ZodEnum<{
@@ -15456,7 +15456,7 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
15456
15456
  code: string;
15457
15457
  path: string;
15458
15458
  message: string;
15459
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
15459
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
15460
15460
  severity?: "error" | "warning" | "info" | undefined;
15461
15461
  blocking?: boolean | undefined;
15462
15462
  recovery?: string[] | undefined;
@@ -18307,7 +18307,7 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
18307
18307
  code: string;
18308
18308
  path: string;
18309
18309
  message: string;
18310
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
18310
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
18311
18311
  severity?: "error" | "warning" | "info" | undefined;
18312
18312
  blocking?: boolean | undefined;
18313
18313
  recovery?: string[] | undefined;
@@ -21046,9 +21046,9 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
21046
21046
  code: z.ZodString;
21047
21047
  stage: z.ZodOptional<z.ZodEnum<{
21048
21048
  contract: "contract";
21049
- document: "document";
21050
21049
  reference: "reference";
21051
21050
  runtime: "runtime";
21051
+ document: "document";
21052
21052
  policy: "policy";
21053
21053
  }>>;
21054
21054
  severity: z.ZodOptional<z.ZodEnum<{
@@ -22367,9 +22367,9 @@ export declare const DeclarativePublicationJobOperationStateSchema: z.ZodObject<
22367
22367
  code: z.ZodString;
22368
22368
  stage: z.ZodOptional<z.ZodEnum<{
22369
22369
  contract: "contract";
22370
- document: "document";
22371
22370
  reference: "reference";
22372
22371
  runtime: "runtime";
22372
+ document: "document";
22373
22373
  policy: "policy";
22374
22374
  }>>;
22375
22375
  severity: z.ZodOptional<z.ZodEnum<{
@@ -22683,9 +22683,9 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
22683
22683
  code: z.ZodString;
22684
22684
  stage: z.ZodOptional<z.ZodEnum<{
22685
22685
  contract: "contract";
22686
- document: "document";
22687
22686
  reference: "reference";
22688
22687
  runtime: "runtime";
22688
+ document: "document";
22689
22689
  policy: "policy";
22690
22690
  }>>;
22691
22691
  severity: z.ZodOptional<z.ZodEnum<{
@@ -26680,7 +26680,7 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
26680
26680
  code: string;
26681
26681
  path: string;
26682
26682
  message: string;
26683
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
26683
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
26684
26684
  severity?: "error" | "warning" | "info" | undefined;
26685
26685
  blocking?: boolean | undefined;
26686
26686
  recovery?: string[] | undefined;
@@ -29531,7 +29531,7 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
29531
29531
  code: string;
29532
29532
  path: string;
29533
29533
  message: string;
29534
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
29534
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
29535
29535
  severity?: "error" | "warning" | "info" | undefined;
29536
29536
  blocking?: boolean | undefined;
29537
29537
  recovery?: string[] | undefined;
@@ -32270,9 +32270,9 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
32270
32270
  code: z.ZodString;
32271
32271
  stage: z.ZodOptional<z.ZodEnum<{
32272
32272
  contract: "contract";
32273
- document: "document";
32274
32273
  reference: "reference";
32275
32274
  runtime: "runtime";
32275
+ document: "document";
32276
32276
  policy: "policy";
32277
32277
  }>>;
32278
32278
  severity: z.ZodOptional<z.ZodEnum<{
@@ -33591,9 +33591,9 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
33591
33591
  code: z.ZodString;
33592
33592
  stage: z.ZodOptional<z.ZodEnum<{
33593
33593
  contract: "contract";
33594
- document: "document";
33595
33594
  reference: "reference";
33596
33595
  runtime: "runtime";
33596
+ document: "document";
33597
33597
  policy: "policy";
33598
33598
  }>>;
33599
33599
  severity: z.ZodOptional<z.ZodEnum<{
@@ -37619,7 +37619,7 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
37619
37619
  code: string;
37620
37620
  path: string;
37621
37621
  message: string;
37622
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
37622
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
37623
37623
  severity?: "error" | "warning" | "info" | undefined;
37624
37624
  blocking?: boolean | undefined;
37625
37625
  recovery?: string[] | undefined;
@@ -40470,7 +40470,7 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
40470
40470
  code: string;
40471
40471
  path: string;
40472
40472
  message: string;
40473
- stage?: "contract" | "document" | "reference" | "runtime" | "policy" | undefined;
40473
+ stage?: "contract" | "reference" | "runtime" | "document" | "policy" | undefined;
40474
40474
  severity?: "error" | "warning" | "info" | undefined;
40475
40475
  blocking?: boolean | undefined;
40476
40476
  recovery?: string[] | undefined;
@@ -43209,9 +43209,9 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
43209
43209
  code: z.ZodString;
43210
43210
  stage: z.ZodOptional<z.ZodEnum<{
43211
43211
  contract: "contract";
43212
- document: "document";
43213
43212
  reference: "reference";
43214
43213
  runtime: "runtime";
43214
+ document: "document";
43215
43215
  policy: "policy";
43216
43216
  }>>;
43217
43217
  severity: z.ZodOptional<z.ZodEnum<{
@@ -44530,9 +44530,9 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
44530
44530
  code: z.ZodString;
44531
44531
  stage: z.ZodOptional<z.ZodEnum<{
44532
44532
  contract: "contract";
44533
- document: "document";
44534
44533
  reference: "reference";
44535
44534
  runtime: "runtime";
44535
+ document: "document";
44536
44536
  policy: "policy";
44537
44537
  }>>;
44538
44538
  severity: z.ZodOptional<z.ZodEnum<{
@@ -44571,9 +44571,9 @@ export declare const DeclarativePublicationJobSchema: z.ZodObject<{
44571
44571
  code: z.ZodString;
44572
44572
  stage: z.ZodOptional<z.ZodEnum<{
44573
44573
  contract: "contract";
44574
- document: "document";
44575
44574
  reference: "reference";
44576
44575
  runtime: "runtime";
44576
+ document: "document";
44577
44577
  policy: "policy";
44578
44578
  }>>;
44579
44579
  severity: z.ZodOptional<z.ZodEnum<{
@@ -189,9 +189,9 @@ export declare const DeclarativePublicationVerificationSchema: z.ZodObject<{
189
189
  code: z.ZodString;
190
190
  stage: z.ZodOptional<z.ZodEnum<{
191
191
  contract: "contract";
192
- document: "document";
193
192
  reference: "reference";
194
193
  runtime: "runtime";
194
+ document: "document";
195
195
  policy: "policy";
196
196
  }>>;
197
197
  severity: z.ZodOptional<z.ZodEnum<{
@@ -13,7 +13,7 @@ import {
13
13
  RevisionRefSchema,
14
14
  Sha256Schema,
15
15
  TenantScopeSchema
16
- } from "./chunk-FIZWECL6.mjs";
16
+ } from "./chunk-WWNBSU45.mjs";
17
17
 
18
18
  // src/contracts/artifact.ts
19
19
  import { z } from "zod";
@@ -1077,4 +1077,4 @@ export {
1077
1077
  WorkflowCompletionCommitSchema,
1078
1078
  WorkflowCompletionReceiptSchema
1079
1079
  };
1080
- //# sourceMappingURL=chunk-Y7EZZ6IW.mjs.map
1080
+ //# sourceMappingURL=chunk-4D4UQIFA.mjs.map
@@ -36,7 +36,7 @@ import {
36
36
  WorkflowCompletionCommitSchema,
37
37
  WorkflowCompletionReceiptSchema,
38
38
  WorkflowPublicationSchema
39
- } from "./chunk-Y7EZZ6IW.mjs";
39
+ } from "./chunk-4D4UQIFA.mjs";
40
40
  import {
41
41
  ActionProgramArtifactSchema,
42
42
  ActionProgramDefinitionSchema,
@@ -101,7 +101,7 @@ import {
101
101
  WorkbenchSchema,
102
102
  WorkflowColumnBindingSchema,
103
103
  WorkflowDefinitionSchema
104
- } from "./chunk-FIZWECL6.mjs";
104
+ } from "./chunk-WWNBSU45.mjs";
105
105
 
106
106
  // src/schemas/index.ts
107
107
  var canonicalContractSchemas = {
@@ -210,4 +210,4 @@ var canonicalContractSchemas = {
210
210
  export {
211
211
  canonicalContractSchemas
212
212
  };
213
- //# sourceMappingURL=chunk-4LC3ZXUP.mjs.map
213
+ //# sourceMappingURL=chunk-JLTNBOQY.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  DECLARATIVE_CONTROL_API_PREFIX,
3
3
  IsoDateTimeSchema,
4
4
  JsonObjectSchema
5
- } from "./chunk-FIZWECL6.mjs";
5
+ } from "./chunk-WWNBSU45.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-HJNQDSLC.mjs.map
78
+ //# sourceMappingURL=chunk-MQOSI237.mjs.map
@@ -14,7 +14,7 @@ import {
14
14
  ManagedFileUriSchema,
15
15
  RevisionRefSchema,
16
16
  Sha256Schema
17
- } from "./chunk-FIZWECL6.mjs";
17
+ } from "./chunk-WWNBSU45.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-DQJODDRF.mjs.map
576
+ //# sourceMappingURL=chunk-SK5C7NUN.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  PAGE_STREAM_MAX_FRAME_BYTES,
5
5
  PageStreamDescriptorSchema,
6
6
  PageStreamEventSchema
7
- } from "./chunk-HJNQDSLC.mjs";
7
+ } from "./chunk-MQOSI237.mjs";
8
8
  import {
9
9
  AccessPolicySchema,
10
10
  ActionProgramDefinitionSchema,
@@ -117,7 +117,7 @@ import {
117
117
  require_validation,
118
118
  require_validation_error,
119
119
  resolveThemeTokens
120
- } from "./chunk-FIZWECL6.mjs";
120
+ } from "./chunk-WWNBSU45.mjs";
121
121
  import {
122
122
  __commonJS,
123
123
  __toESM
@@ -1164,235 +1164,37 @@ function compileViewSpecToRenderTree(specInput, options = {}) {
1164
1164
  nodes: [rootNode, ...blockNodes]
1165
1165
  });
1166
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: []
1167
+ function createArtifactRegistry(initialProfiles = []) {
1168
+ const profiles = /* @__PURE__ */ new Map();
1169
+ const registerProfile = (profileInput, options = {}) => {
1170
+ const profile = ArtifactProfileSchema.parse(profileInput);
1171
+ if (profiles.has(profile.artifactKind) && !options.replace) {
1172
+ throw new Error(`ArtifactProfile for kind "${profile.artifactKind}" is already registered.`);
1173
+ }
1174
+ profiles.set(profile.artifactKind, profile);
1175
+ return profile;
1176
+ };
1177
+ for (const profile of initialProfiles) {
1178
+ registerProfile(profile);
1179
+ }
1180
+ const getProfile = (artifactKind) => profiles.get(artifactKind);
1181
+ const resolveView = (artifactKind, viewId) => {
1182
+ const profile = profiles.get(artifactKind);
1183
+ if (!profile) return void 0;
1184
+ const targetId = viewId ?? profile.defaultViewId;
1185
+ return profile.views.find((view) => view.viewId === targetId);
1186
+ };
1187
+ return Object.freeze({
1188
+ registerProfile,
1189
+ unregisterProfile: (artifactKind) => profiles.delete(artifactKind),
1190
+ getProfile,
1191
+ listProfiles: () => Object.freeze(Array.from(profiles.values())),
1192
+ resolveView,
1193
+ compileView: (artifactKind, viewId, options) => {
1194
+ const view = resolveView(artifactKind, viewId);
1195
+ return view ? compileViewSpecToRenderTree(view, options) : void 0;
1387
1196
  }
1388
- ]
1389
- });
1390
- var BUILTIN_ARTIFACT_PROFILES = Object.freeze({
1391
- board: DESIGN_BOARD_ARTIFACT_PROFILE,
1392
- workflow: WORKFLOW_ARTIFACT_PROFILE
1393
- });
1394
- function resolveBuiltinArtifactProfile(artifactKind) {
1395
- return BUILTIN_ARTIFACT_PROFILES[artifactKind];
1197
+ });
1396
1198
  }
1397
1199
 
1398
1200
  // src/runtime/agent-session-projector.ts
@@ -7964,10 +7766,7 @@ export {
7964
7766
  compileCapabilityRegistry,
7965
7767
  buildArtifactCollabRoomId,
7966
7768
  compileViewSpecToRenderTree,
7967
- DESIGN_BOARD_ARTIFACT_PROFILE,
7968
- WORKFLOW_ARTIFACT_PROFILE,
7969
- BUILTIN_ARTIFACT_PROFILES,
7970
- resolveBuiltinArtifactProfile,
7769
+ createArtifactRegistry,
7971
7770
  createAgentSessionEventProjection,
7972
7771
  projectAgentSessionEvents,
7973
7772
  toAgentSessionViewModel,
@@ -8103,4 +7902,4 @@ export {
8103
7902
  pageMountParentHref,
8104
7903
  nativePageMountPlan
8105
7904
  };
8106
- //# sourceMappingURL=chunk-74H5I3XN.mjs.map
7905
+ //# sourceMappingURL=chunk-SMJPC7BB.mjs.map