@codemation/host 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/{AppConfigFactory-CvpFScwB.js → AppConfigFactory-C6q-CSKb.js} +7 -6
  3. package/dist/{AppConfigFactory-CvpFScwB.js.map → AppConfigFactory-C6q-CSKb.js.map} +1 -1
  4. package/dist/{AppConfigFactory-LK76niPc.d.ts → AppConfigFactory-YnveXE9k.d.ts} +40 -4
  5. package/dist/{AppContainerFactory-BlLrm6_h.js → AppContainerFactory-qaqc-R1D.js} +21 -13
  6. package/dist/AppContainerFactory-qaqc-R1D.js.map +1 -0
  7. package/dist/{CodemationAppContext-CvWi5gey.d.ts → CodemationAppContext-DRu1Dpri.d.ts} +3 -3
  8. package/dist/{CodemationAuthoring.types-BuKNTDC1.d.ts → CodemationAuthoring.types-fBRppnmi.d.ts} +4 -4
  9. package/dist/{CodemationConfigNormalizer-CYdR0PR5.d.ts → CodemationConfigNormalizer-DVko3cVN.d.ts} +3 -3
  10. package/dist/{CodemationConsumerConfigLoader-C3nAj9Bj.d.ts → CodemationConsumerConfigLoader-DJWr86f-.d.ts} +2 -2
  11. package/dist/{CodemationPluginListMerger-D-gwVwtw.d.ts → CodemationPluginListMerger-DGc-jfa2.d.ts} +7 -7
  12. package/dist/{CredentialContractsRegistry-D7mcPed2.d.ts → CredentialContractsRegistry-DrMIDSw8.d.ts} +2 -2
  13. package/dist/{CredentialServices-DdCEP2xt.d.ts → CredentialServices-UfvHB-rN.d.ts} +4 -4
  14. package/dist/{ItemsInputNormalizer-D1WppVMU.d.ts → ItemsInputNormalizer-C-KHg9Mo.d.ts} +20 -1
  15. package/dist/{PublicFrontendBootstrapFactory-BMWqNM9a.d.ts → PublicFrontendBootstrapFactory-Cb2pLmDd.d.ts} +2 -2
  16. package/dist/{TelemetryContracts-BsOD_Y17.d.ts → TelemetryContracts-DbaNomrH.d.ts} +2 -2
  17. package/dist/{WorkflowPolicyUiPresentationFactory-DNE5oAI6.d.ts → WorkflowPolicyUiPresentationFactory-DQEY-h_S.d.ts} +2 -2
  18. package/dist/{WorkflowViewContracts-0ZgsHQdp.d.ts → WorkflowViewContracts-CzK2KFuz.d.ts} +6 -1
  19. package/dist/authoring.d.ts +4 -4
  20. package/dist/consumer.d.ts +5 -5
  21. package/dist/credentials.d.ts +5 -5
  22. package/dist/devServerSidecar.d.ts +2 -2
  23. package/dist/dto.d.ts +5 -5
  24. package/dist/{index-BlGs9e9Q.d.ts → index-BbBk26m0.d.ts} +2 -2
  25. package/dist/index.d.ts +15 -15
  26. package/dist/index.js +4 -4
  27. package/dist/mapping.d.ts +2 -2
  28. package/dist/nextServer.d.ts +12 -12
  29. package/dist/nextServer.js +2 -2
  30. package/dist/{persistenceServer-CpNFYa_q.js → persistenceServer-CmsIKnO9.js} +2 -2
  31. package/dist/{persistenceServer-CpNFYa_q.js.map → persistenceServer-CmsIKnO9.js.map} +1 -1
  32. package/dist/{persistenceServer-CIVt3UOX.d.ts → persistenceServer-vtJAGDat.d.ts} +2 -2
  33. package/dist/persistenceServer.d.ts +6 -6
  34. package/dist/persistenceServer.js +2 -2
  35. package/dist/{server-BK43OKxW.js → server-CJFfY67o.js} +3 -3
  36. package/dist/{server-BK43OKxW.js.map → server-CJFfY67o.js.map} +1 -1
  37. package/dist/{server-CQWdkT7t.d.ts → server-MUNGsBYK.d.ts} +5 -5
  38. package/dist/server.d.ts +10 -10
  39. package/dist/server.js +4 -4
  40. package/package.json +5 -5
  41. package/prisma/migrations/20260507120000_execution_instance_child_run_id/migration.sql +5 -0
  42. package/prisma/migrations.sqlite/20260507120000_execution_instance_child_run_id/migration.sql +5 -0
  43. package/prisma/schema.postgresql.prisma +1 -0
  44. package/prisma/schema.sqlite.prisma +1 -0
  45. package/prisma-generated/prisma-postgresql-client/edge.js +6 -5
  46. package/prisma-generated/prisma-postgresql-client/index-browser.js +2 -1
  47. package/prisma-generated/prisma-postgresql-client/index.d.ts +38 -2
  48. package/prisma-generated/prisma-postgresql-client/index.js +6 -5
  49. package/prisma-generated/prisma-postgresql-client/package.json +1 -1
  50. package/prisma-generated/prisma-postgresql-client/schema.prisma +1 -0
  51. package/prisma-generated/prisma-sqlite-client/edge.js +6 -5
  52. package/prisma-generated/prisma-sqlite-client/index-browser.js +2 -1
  53. package/prisma-generated/prisma-sqlite-client/index.d.ts +38 -2
  54. package/prisma-generated/prisma-sqlite-client/index.js +6 -5
  55. package/prisma-generated/prisma-sqlite-client/package.json +1 -1
  56. package/prisma-generated/prisma-sqlite-client/schema.prisma +1 -0
  57. package/src/application/contracts/WorkflowViewContracts.ts +5 -0
  58. package/src/application/mapping/WorkflowDefinitionMapper.ts +4 -0
  59. package/src/infrastructure/persistence/InMemoryWorkflowRunRepository.ts +1 -0
  60. package/src/infrastructure/persistence/PrismaWorkflowRunRepository.ts +7 -0
  61. package/dist/AppContainerFactory-BlLrm6_h.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-b708fc5a44cdec791f8903ca7af0faa8ee36ab36c4e12693b2e42c5a474e6685",
2
+ "name": "prisma-client-24b46c8e91122e4534d61d8dbe4a532cd64a32672708af7495f2eff7644bcf14",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -107,6 +107,7 @@ model ExecutionInstance {
107
107
  iterationId String? @map("iteration_id")
108
108
  itemIndex Int? @map("item_index")
109
109
  parentInvocationId String? @map("parent_invocation_id")
110
+ childRunId String? @map("child_run_id")
110
111
 
111
112
  run Run @relation(fields: [runId], references: [runId], onDelete: Cascade)
112
113
 
@@ -23,6 +23,11 @@ export type WorkflowNodeDto = Readonly<{
23
23
  * mailbox / fixture file / data source the test cases originate from.
24
24
  */
25
25
  description?: string;
26
+ /**
27
+ * When present, the node is a SubWorkflow invocation targeting this workflow id. Surfaced in
28
+ * the properties panel as an "Open in editor" navigation link.
29
+ */
30
+ referencedWorkflowId?: string;
26
31
  }>;
27
32
 
28
33
  export type WorkflowEdgeDto = Readonly<{
@@ -133,6 +133,7 @@ export class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition,
133
133
  ? ((node.config as { triggerKind?: "live" | "test" }).triggerKind ?? "live")
134
134
  : undefined;
135
135
  const description = (node.config as { description?: string }).description;
136
+ const referencedWorkflowId = (node.config as { workflowId?: string }).workflowId;
136
137
  nodes.push({
137
138
  id: node.id,
138
139
  kind: node.kind,
@@ -145,6 +146,9 @@ export class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition,
145
146
  ...this.nodePortFieldsFromConfig(node.config),
146
147
  ...(triggerKind ? { triggerKind } : {}),
147
148
  ...(typeof description === "string" && description.trim().length > 0 ? { description } : {}),
149
+ ...(typeof referencedWorkflowId === "string" && referencedWorkflowId.trim().length > 0
150
+ ? { referencedWorkflowId }
151
+ : {}),
148
152
  });
149
153
  if (AgentConfigInspector.isAgentNodeConfig(node.config)) {
150
154
  this.appendVirtualConnectionNodes(
@@ -119,6 +119,7 @@ export class InMemoryWorkflowRunRepository implements WorkflowRunRepository, Wor
119
119
  inputJson: snapshot.inputsByPort as never,
120
120
  outputJson: snapshot.outputs as never,
121
121
  error: snapshot.error,
122
+ ...(snapshot.childRunId !== undefined ? { childRunId: snapshot.childRunId } : {}),
122
123
  }),
123
124
  );
124
125
  const invocationInstances: ExecutionInstanceDto[] = (state.connectionInvocations ?? []).map(
@@ -52,6 +52,7 @@ type ExecutionInstanceRow = {
52
52
  iterationId: string | null;
53
53
  itemIndex: number | null;
54
54
  parentInvocationId: string | null;
55
+ childRunId: string | null;
55
56
  };
56
57
 
57
58
  type RunWorkItemRecord = {
@@ -345,6 +346,7 @@ export class PrismaWorkflowRunRepository implements WorkflowRunRepository, Workf
345
346
  inputTruncated: instance.inputTruncated,
346
347
  outputTruncated: instance.outputTruncated,
347
348
  usedPinnedOutput: instance.usedPinnedOutput,
349
+ childRunId: instance.childRunId,
348
350
  },
349
351
  });
350
352
  continue;
@@ -510,6 +512,9 @@ export class PrismaWorkflowRunRepository implements WorkflowRunRepository, Workf
510
512
  inputsByPort,
511
513
  outputs,
512
514
  error,
515
+ ...(row.childRunId !== null && row.childRunId !== undefined
516
+ ? { childRunId: row.childRunId as NodeExecutionSnapshot["childRunId"] }
517
+ : {}),
513
518
  };
514
519
  }
515
520
 
@@ -564,6 +569,7 @@ export class PrismaWorkflowRunRepository implements WorkflowRunRepository, Workf
564
569
  iterationId: row.iterationId ?? undefined,
565
570
  itemIndex: row.itemIndex ?? undefined,
566
571
  parentInvocationId: row.parentInvocationId ?? undefined,
572
+ ...(row.childRunId !== null && row.childRunId !== undefined ? { childRunId: row.childRunId } : {}),
567
573
  };
568
574
  }
569
575
 
@@ -636,6 +642,7 @@ export class PrismaWorkflowRunRepository implements WorkflowRunRepository, Workf
636
642
  inputStorageKind: "inline",
637
643
  outputStorageKind: "inline",
638
644
  usedPinnedOutput: snap.usedPinnedOutput ?? null,
645
+ childRunId: snap.childRunId ?? null,
639
646
  });
640
647
  }
641
648
  let cIdx = 0;