@orchestraworks/cli 0.5.5 → 0.5.8

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 (610) hide show
  1. package/README.md +1 -1
  2. package/dist/artifacts/prelude.js +10 -1
  3. package/dist/cli/api/execute.js +7 -7
  4. package/dist/cli/core/auth.d.ts +11 -1
  5. package/dist/cli/core/auth.js +48 -4
  6. package/dist/cli/core/errors.js +4 -0
  7. package/dist/cli/core/platform-client.d.ts +3 -2
  8. package/dist/cli/core/profile.d.ts +2 -2
  9. package/dist/cli/factory/apply-preview.d.ts +23 -6
  10. package/dist/cli/factory/apply-preview.js +70 -43
  11. package/dist/cli/factory/apply-render.js +12 -4
  12. package/dist/cli/factory/apply.d.ts +7 -2
  13. package/dist/cli/factory/apply.js +86 -29
  14. package/dist/cli/factory/diff.js +20 -12
  15. package/dist/cli/factory/image-upload.d.ts +90 -0
  16. package/dist/cli/factory/image-upload.js +489 -0
  17. package/dist/cli/factory/synth.d.ts +7 -0
  18. package/dist/cli/factory/synth.js +35 -0
  19. package/dist/cli/firstRun.d.ts +5 -5
  20. package/dist/cli/firstRun.js +18 -17
  21. package/dist/cli/main.d.ts +1 -1
  22. package/dist/cli/main.js +4 -3
  23. package/dist/cli/upload.d.ts +3 -1
  24. package/dist/cli/upload.js +9 -2
  25. package/dist/constructs/agent.d.ts +9 -1
  26. package/dist/constructs/agent.js +7 -0
  27. package/dist/constructs/compute-provider.js +2 -2
  28. package/dist/constructs/connection.d.ts +22 -16
  29. package/dist/constructs/connection.js +29 -92
  30. package/dist/constructs/connector.d.ts +3 -1
  31. package/dist/constructs/connector.js +2 -0
  32. package/dist/constructs/egress-preset.d.ts +7 -52
  33. package/dist/constructs/egress-preset.js +7 -91
  34. package/dist/constructs/environment.d.ts +47 -70
  35. package/dist/constructs/environment.js +103 -213
  36. package/dist/constructs/gateway-key.d.ts +4 -1
  37. package/dist/constructs/gateway-key.js +4 -3
  38. package/dist/constructs/interfaces.d.ts +10 -2
  39. package/dist/constructs/model-provider-key.js +2 -3
  40. package/dist/constructs/pipeline.d.ts +5 -2
  41. package/dist/constructs/pipeline.js +4 -0
  42. package/dist/constructs/references.d.ts +4 -0
  43. package/dist/constructs/references.js +20 -0
  44. package/dist/constructs/role.d.ts +32 -0
  45. package/dist/constructs/role.js +77 -0
  46. package/dist/constructs/rules.d.ts +4 -4
  47. package/dist/constructs/rules.js +3 -3
  48. package/dist/constructs/secret.d.ts +36 -13
  49. package/dist/constructs/secret.js +110 -14
  50. package/dist/constructs/service-account.d.ts +12 -0
  51. package/dist/constructs/service-account.js +23 -0
  52. package/dist/constructs/skill.d.ts +3 -1
  53. package/dist/constructs/skill.js +2 -0
  54. package/dist/constructs/team-membership.d.ts +43 -0
  55. package/dist/constructs/team-membership.js +59 -0
  56. package/dist/constructs/team.d.ts +40 -0
  57. package/dist/constructs/team.js +107 -0
  58. package/dist/constructs/trigger.d.ts +7 -4
  59. package/dist/constructs/trigger.js +4 -0
  60. package/dist/constructs/workflow.d.ts +1 -1
  61. package/dist/core/factory.d.ts +0 -7
  62. package/dist/core/factory.js +15 -53
  63. package/dist/core/gateway-key-recipe.js +23 -2
  64. package/dist/core/host-pattern.d.ts +5 -0
  65. package/dist/core/host-pattern.js +14 -0
  66. package/dist/core/labels.d.ts +1 -1
  67. package/dist/core/labels.js +1 -1
  68. package/dist/core/outbound-warning.d.ts +2 -2
  69. package/dist/core/outbound-warning.js +52 -41
  70. package/dist/core/plan.d.ts +14 -11
  71. package/dist/core/plan.js +12 -11
  72. package/dist/engine/apply-core.d.ts +71 -67
  73. package/dist/engine/apply-core.js +120 -95
  74. package/dist/engine/client.d.ts +12 -4
  75. package/dist/engine/client.js +8 -3
  76. package/dist/engine/compute-provider-reconcile.js +1 -1
  77. package/dist/engine/condition-references.d.ts +2 -2
  78. package/dist/engine/condition-references.js +6 -6
  79. package/dist/engine/connection-install-link-reconcile.d.ts +4 -3
  80. package/dist/engine/connection-install-link-reconcile.js +35 -28
  81. package/dist/engine/diff.d.ts +12 -14
  82. package/dist/engine/diff.js +247 -113
  83. package/dist/engine/gateway-key-reconcile.d.ts +12 -9
  84. package/dist/engine/gateway-key-reconcile.js +43 -36
  85. package/dist/engine/model-provider-key-reconcile.js +2 -2
  86. package/dist/engine/pipeline-reconcile.d.ts +8 -9
  87. package/dist/engine/pipeline-reconcile.js +14 -10
  88. package/dist/engine/reconcile.d.ts +7 -21
  89. package/dist/engine/reconcile.js +115 -215
  90. package/dist/engine/refusals.d.ts +14 -31
  91. package/dist/engine/refusals.js +32 -81
  92. package/dist/engine/role-membership-reconcile.d.ts +19 -0
  93. package/dist/engine/role-membership-reconcile.js +276 -0
  94. package/dist/engine/secrets-apply.d.ts +18 -4
  95. package/dist/engine/secrets-apply.js +39 -4
  96. package/dist/engine/trigger-reconcile.d.ts +22 -23
  97. package/dist/engine/trigger-reconcile.js +43 -65
  98. package/dist/engine/workflow-reconcile.d.ts +2 -2
  99. package/dist/engine/workflow-reconcile.js +5 -5
  100. package/dist/generated/cli-commands.json +15398 -11771
  101. package/dist/generated/cli-dispatch.d.ts +4 -3
  102. package/dist/generated/cli-dispatch.js +76 -62
  103. package/dist/index.d.ts +12 -7
  104. package/dist/index.js +5 -3
  105. package/dist/metrics/metric.d.ts +3 -3
  106. package/dist/metrics/metric.js +1 -1
  107. package/docs/REFERENCE.md +102 -95
  108. package/node_modules/@orchestraworks/client/dist/apis/AgentsApi.d.ts +1 -1
  109. package/node_modules/@orchestraworks/client/dist/apis/AgentsApi.js +2 -2
  110. package/node_modules/@orchestraworks/client/dist/apis/ArtifactsApi.d.ts +1 -1
  111. package/node_modules/@orchestraworks/client/dist/apis/ArtifactsApi.js +2 -2
  112. package/node_modules/@orchestraworks/client/dist/apis/ConnectionInstallLinksApi.d.ts +1 -1
  113. package/node_modules/@orchestraworks/client/dist/apis/ConnectionInstallLinksApi.js +2 -2
  114. package/node_modules/@orchestraworks/client/dist/apis/ConnectionsApi.d.ts +1 -1
  115. package/node_modules/@orchestraworks/client/dist/apis/ConnectionsApi.js +2 -2
  116. package/node_modules/@orchestraworks/client/dist/apis/EnvironmentsApi.d.ts +1 -1
  117. package/node_modules/@orchestraworks/client/dist/apis/EnvironmentsApi.js +2 -2
  118. package/node_modules/@orchestraworks/client/dist/apis/FilesApi.d.ts +1 -1
  119. package/node_modules/@orchestraworks/client/dist/apis/FilesApi.js +2 -2
  120. package/node_modules/@orchestraworks/client/dist/apis/ImagesApi.d.ts +88 -0
  121. package/node_modules/@orchestraworks/client/dist/apis/ImagesApi.js +239 -0
  122. package/node_modules/@orchestraworks/client/dist/apis/MetricsApi.d.ts +1 -1
  123. package/node_modules/@orchestraworks/client/dist/apis/MetricsApi.js +2 -2
  124. package/node_modules/@orchestraworks/client/dist/apis/OrganizationsApi.d.ts +1 -15
  125. package/node_modules/@orchestraworks/client/dist/apis/OrganizationsApi.js +3 -49
  126. package/node_modules/@orchestraworks/client/dist/apis/PipelinesApi.d.ts +1 -1
  127. package/node_modules/@orchestraworks/client/dist/apis/PipelinesApi.js +2 -2
  128. package/node_modules/@orchestraworks/client/dist/apis/ProviderConnectionIntentsApi.d.ts +1 -1
  129. package/node_modules/@orchestraworks/client/dist/apis/ProviderConnectionIntentsApi.js +2 -2
  130. package/node_modules/@orchestraworks/client/dist/apis/SecretsApi.d.ts +1 -1
  131. package/node_modules/@orchestraworks/client/dist/apis/SecretsApi.js +2 -2
  132. package/node_modules/@orchestraworks/client/dist/apis/SessionsApi.d.ts +1 -1
  133. package/node_modules/@orchestraworks/client/dist/apis/SessionsApi.js +2 -2
  134. package/node_modules/@orchestraworks/client/dist/apis/SkillsApi.d.ts +1 -1
  135. package/node_modules/@orchestraworks/client/dist/apis/SkillsApi.js +2 -2
  136. package/node_modules/@orchestraworks/client/dist/apis/TeamMembershipsApi.d.ts +96 -0
  137. package/node_modules/@orchestraworks/client/dist/apis/{GroupsApi.js → TeamMembershipsApi.js} +62 -59
  138. package/node_modules/@orchestraworks/client/dist/apis/TeamsApi.d.ts +93 -0
  139. package/node_modules/@orchestraworks/client/dist/apis/{ProjectsApi.js → TeamsApi.js} +55 -55
  140. package/node_modules/@orchestraworks/client/dist/apis/TriggersApi.d.ts +1 -1
  141. package/node_modules/@orchestraworks/client/dist/apis/TriggersApi.js +2 -2
  142. package/node_modules/@orchestraworks/client/dist/apis/UsersApi.d.ts +0 -15
  143. package/node_modules/@orchestraworks/client/dist/apis/UsersApi.js +0 -49
  144. package/node_modules/@orchestraworks/client/dist/apis/VolumesApi.d.ts +1 -1
  145. package/node_modules/@orchestraworks/client/dist/apis/VolumesApi.js +2 -2
  146. package/node_modules/@orchestraworks/client/dist/apis/WorkItemsApi.d.ts +2 -2
  147. package/node_modules/@orchestraworks/client/dist/apis/WorkItemsApi.js +4 -4
  148. package/node_modules/@orchestraworks/client/dist/apis/WorkflowsApi.d.ts +1 -1
  149. package/node_modules/@orchestraworks/client/dist/apis/WorkflowsApi.js +2 -2
  150. package/node_modules/@orchestraworks/client/dist/apis/index.d.ts +3 -2
  151. package/node_modules/@orchestraworks/client/dist/apis/index.js +3 -2
  152. package/node_modules/@orchestraworks/client/dist/esm/apis/AgentsApi.d.ts +1 -1
  153. package/node_modules/@orchestraworks/client/dist/esm/apis/AgentsApi.js +2 -2
  154. package/node_modules/@orchestraworks/client/dist/esm/apis/ArtifactsApi.d.ts +1 -1
  155. package/node_modules/@orchestraworks/client/dist/esm/apis/ArtifactsApi.js +2 -2
  156. package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionInstallLinksApi.d.ts +1 -1
  157. package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionInstallLinksApi.js +2 -2
  158. package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionsApi.d.ts +1 -1
  159. package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionsApi.js +2 -2
  160. package/node_modules/@orchestraworks/client/dist/esm/apis/EnvironmentsApi.d.ts +1 -1
  161. package/node_modules/@orchestraworks/client/dist/esm/apis/EnvironmentsApi.js +2 -2
  162. package/node_modules/@orchestraworks/client/dist/esm/apis/FilesApi.d.ts +1 -1
  163. package/node_modules/@orchestraworks/client/dist/esm/apis/FilesApi.js +2 -2
  164. package/node_modules/@orchestraworks/client/dist/esm/apis/ImagesApi.d.ts +88 -0
  165. package/node_modules/@orchestraworks/client/dist/esm/apis/ImagesApi.js +235 -0
  166. package/node_modules/@orchestraworks/client/dist/esm/apis/MetricsApi.d.ts +1 -1
  167. package/node_modules/@orchestraworks/client/dist/esm/apis/MetricsApi.js +2 -2
  168. package/node_modules/@orchestraworks/client/dist/esm/apis/OrganizationsApi.d.ts +1 -15
  169. package/node_modules/@orchestraworks/client/dist/esm/apis/OrganizationsApi.js +3 -49
  170. package/node_modules/@orchestraworks/client/dist/esm/apis/PipelinesApi.d.ts +1 -1
  171. package/node_modules/@orchestraworks/client/dist/esm/apis/PipelinesApi.js +2 -2
  172. package/node_modules/@orchestraworks/client/dist/esm/apis/ProviderConnectionIntentsApi.d.ts +1 -1
  173. package/node_modules/@orchestraworks/client/dist/esm/apis/ProviderConnectionIntentsApi.js +2 -2
  174. package/node_modules/@orchestraworks/client/dist/esm/apis/SecretsApi.d.ts +1 -1
  175. package/node_modules/@orchestraworks/client/dist/esm/apis/SecretsApi.js +2 -2
  176. package/node_modules/@orchestraworks/client/dist/esm/apis/SessionsApi.d.ts +1 -1
  177. package/node_modules/@orchestraworks/client/dist/esm/apis/SessionsApi.js +2 -2
  178. package/node_modules/@orchestraworks/client/dist/esm/apis/SkillsApi.d.ts +1 -1
  179. package/node_modules/@orchestraworks/client/dist/esm/apis/SkillsApi.js +2 -2
  180. package/node_modules/@orchestraworks/client/dist/esm/apis/TeamMembershipsApi.d.ts +96 -0
  181. package/node_modules/@orchestraworks/client/dist/esm/apis/{GroupsApi.js → TeamMembershipsApi.js} +60 -57
  182. package/node_modules/@orchestraworks/client/dist/esm/apis/TeamsApi.d.ts +93 -0
  183. package/node_modules/@orchestraworks/client/dist/esm/apis/{ProjectsApi.js → TeamsApi.js} +53 -53
  184. package/node_modules/@orchestraworks/client/dist/esm/apis/TriggersApi.d.ts +1 -1
  185. package/node_modules/@orchestraworks/client/dist/esm/apis/TriggersApi.js +2 -2
  186. package/node_modules/@orchestraworks/client/dist/esm/apis/UsersApi.d.ts +0 -15
  187. package/node_modules/@orchestraworks/client/dist/esm/apis/UsersApi.js +0 -49
  188. package/node_modules/@orchestraworks/client/dist/esm/apis/VolumesApi.d.ts +1 -1
  189. package/node_modules/@orchestraworks/client/dist/esm/apis/VolumesApi.js +2 -2
  190. package/node_modules/@orchestraworks/client/dist/esm/apis/WorkItemsApi.d.ts +2 -2
  191. package/node_modules/@orchestraworks/client/dist/esm/apis/WorkItemsApi.js +4 -4
  192. package/node_modules/@orchestraworks/client/dist/esm/apis/WorkflowsApi.d.ts +1 -1
  193. package/node_modules/@orchestraworks/client/dist/esm/apis/WorkflowsApi.js +2 -2
  194. package/node_modules/@orchestraworks/client/dist/esm/apis/index.d.ts +3 -2
  195. package/node_modules/@orchestraworks/client/dist/esm/apis/index.js +3 -2
  196. package/node_modules/@orchestraworks/client/dist/esm/models/AddArtifactVersionRequest.d.ts +1 -1
  197. package/node_modules/@orchestraworks/client/dist/esm/models/Agent.d.ts +9 -3
  198. package/node_modules/@orchestraworks/client/dist/esm/models/Agent.js +3 -2
  199. package/node_modules/@orchestraworks/client/dist/esm/models/ApiErrorDetail.d.ts +9 -1
  200. package/node_modules/@orchestraworks/client/dist/esm/models/ApiErrorDetail.js +5 -1
  201. package/node_modules/@orchestraworks/client/dist/esm/models/Artifact.d.ts +2 -2
  202. package/node_modules/@orchestraworks/client/dist/esm/models/Artifact.js +2 -2
  203. package/node_modules/@orchestraworks/client/dist/esm/models/ArtifactSummary.d.ts +2 -2
  204. package/node_modules/@orchestraworks/client/dist/esm/models/ArtifactSummary.js +2 -2
  205. package/node_modules/@orchestraworks/client/dist/esm/models/AssignAction.d.ts +1 -1
  206. package/node_modules/@orchestraworks/client/dist/esm/models/AssignAction.js +2 -2
  207. package/node_modules/@orchestraworks/client/dist/esm/models/AssignWorkItemRequest.d.ts +2 -2
  208. package/node_modules/@orchestraworks/client/dist/esm/models/AssignWorkItemRequest.js +2 -2
  209. package/node_modules/@orchestraworks/client/dist/esm/models/ComputeProviderTarget.d.ts +6 -0
  210. package/node_modules/@orchestraworks/client/dist/esm/models/ComputeProviderTarget.js +2 -0
  211. package/node_modules/@orchestraworks/client/dist/esm/models/Connection.d.ts +16 -3
  212. package/node_modules/@orchestraworks/client/dist/esm/models/Connection.js +8 -2
  213. package/node_modules/@orchestraworks/client/dist/esm/models/ConnectionInstallLink.d.ts +2 -2
  214. package/node_modules/@orchestraworks/client/dist/esm/models/ConnectionInstallLink.js +2 -2
  215. package/node_modules/@orchestraworks/client/dist/esm/models/Connector.d.ts +2 -2
  216. package/node_modules/@orchestraworks/client/dist/esm/models/Connector.js +2 -2
  217. package/node_modules/@orchestraworks/client/dist/esm/models/CreateAgentRequest.d.ts +2 -2
  218. package/node_modules/@orchestraworks/client/dist/esm/models/CreateAgentRequest.js +2 -2
  219. package/node_modules/@orchestraworks/client/dist/esm/models/CreateArtifactRequest.d.ts +4 -4
  220. package/node_modules/@orchestraworks/client/dist/esm/models/CreateArtifactRequest.js +2 -2
  221. package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionInstallLinkRequest.d.ts +3 -3
  222. package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionInstallLinkRequest.js +2 -2
  223. package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionRequest.d.ts +8 -2
  224. package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionRequest.js +4 -2
  225. package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectorRequest.d.ts +2 -2
  226. package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectorRequest.js +2 -2
  227. package/node_modules/@orchestraworks/client/dist/esm/models/CreateDashboardRequest.d.ts +3 -3
  228. package/node_modules/@orchestraworks/client/dist/esm/models/CreateDashboardRequest.js +2 -2
  229. package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.d.ts +2 -2
  230. package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.js +2 -2
  231. package/node_modules/@orchestraworks/client/dist/esm/models/CreateFileRequest.d.ts +2 -2
  232. package/node_modules/@orchestraworks/client/dist/esm/models/CreateFileRequest.js +2 -2
  233. package/node_modules/@orchestraworks/client/dist/esm/models/CreateGatewayKeyRequest.d.ts +2 -2
  234. package/node_modules/@orchestraworks/client/dist/esm/models/CreateGatewayKeyRequest.js +2 -2
  235. package/node_modules/@orchestraworks/client/dist/esm/models/CreateImageRequest.d.ts +38 -0
  236. package/node_modules/@orchestraworks/client/dist/esm/models/{GroupMemberAgent.js → CreateImageRequest.js} +12 -16
  237. package/node_modules/@orchestraworks/client/dist/esm/models/CreateMachineRequest.d.ts +2 -2
  238. package/node_modules/@orchestraworks/client/dist/esm/models/CreateMachineRequest.js +2 -2
  239. package/node_modules/@orchestraworks/client/dist/esm/models/CreateMetricRequest.d.ts +2 -2
  240. package/node_modules/@orchestraworks/client/dist/esm/models/CreateMetricRequest.js +2 -2
  241. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationInvitationRequest.d.ts +4 -4
  242. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationInvitationRequest.js +3 -3
  243. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationMembershipRequest.d.ts +1 -8
  244. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationMembershipRequest.js +0 -3
  245. package/node_modules/@orchestraworks/client/dist/esm/models/CreatePipelineRequest.d.ts +2 -2
  246. package/node_modules/@orchestraworks/client/dist/esm/models/CreatePipelineRequest.js +2 -2
  247. package/node_modules/@orchestraworks/client/dist/esm/models/CreateProviderConnectionIntentRequest.d.ts +3 -3
  248. package/node_modules/@orchestraworks/client/dist/esm/models/CreateProviderConnectionIntentRequest.js +2 -2
  249. package/node_modules/@orchestraworks/client/dist/esm/models/CreateSecretRequest.d.ts +8 -2
  250. package/node_modules/@orchestraworks/client/dist/esm/models/CreateSecretRequest.js +4 -2
  251. package/node_modules/@orchestraworks/client/dist/esm/models/CreateSessionRequest.d.ts +2 -2
  252. package/node_modules/@orchestraworks/client/dist/esm/models/CreateSessionRequest.js +2 -2
  253. package/node_modules/@orchestraworks/client/dist/esm/models/CreateSkillRequest.d.ts +2 -2
  254. package/node_modules/@orchestraworks/client/dist/esm/models/CreateSkillRequest.js +2 -2
  255. package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamMembershipRequest.d.ts +65 -0
  256. package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamMembershipRequest.js +61 -0
  257. package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamRequest.d.ts +80 -0
  258. package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamRequest.js +64 -0
  259. package/node_modules/@orchestraworks/client/dist/esm/models/CreateTriggerRequest.d.ts +2 -2
  260. package/node_modules/@orchestraworks/client/dist/esm/models/CreateTriggerRequest.js +2 -2
  261. package/node_modules/@orchestraworks/client/dist/esm/models/CreateVolumeRequest.d.ts +2 -2
  262. package/node_modules/@orchestraworks/client/dist/esm/models/CreateVolumeRequest.js +2 -2
  263. package/node_modules/@orchestraworks/client/dist/esm/models/CreateWorkflowRequest.d.ts +1 -1
  264. package/node_modules/@orchestraworks/client/dist/esm/models/Dashboard.d.ts +8 -2
  265. package/node_modules/@orchestraworks/client/dist/esm/models/Dashboard.js +6 -2
  266. package/node_modules/@orchestraworks/client/dist/esm/models/DashboardChart.d.ts +45 -4
  267. package/node_modules/@orchestraworks/client/dist/esm/models/DashboardChart.js +29 -5
  268. package/node_modules/@orchestraworks/client/dist/esm/models/DashboardChartQuery.d.ts +1 -1
  269. package/node_modules/@orchestraworks/client/dist/esm/models/Delivery.d.ts +2 -2
  270. package/node_modules/@orchestraworks/client/dist/esm/models/Delivery.js +2 -2
  271. package/node_modules/@orchestraworks/client/dist/esm/models/EgressPolicyRule.d.ts +0 -13
  272. package/node_modules/@orchestraworks/client/dist/esm/models/EgressPolicyRule.js +0 -5
  273. package/node_modules/@orchestraworks/client/dist/esm/models/EntitlementTeamUsage.d.ts +58 -0
  274. package/node_modules/@orchestraworks/client/dist/esm/models/EntitlementTeamUsage.js +64 -0
  275. package/node_modules/@orchestraworks/client/dist/esm/models/Environment.d.ts +2 -2
  276. package/node_modules/@orchestraworks/client/dist/esm/models/Environment.js +2 -2
  277. package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentEgressPolicy.d.ts +1 -1
  278. package/node_modules/@orchestraworks/client/dist/esm/models/GatewayKey.d.ts +2 -2
  279. package/node_modules/@orchestraworks/client/dist/esm/models/GatewayKey.js +2 -2
  280. package/node_modules/@orchestraworks/client/dist/esm/models/Image.d.ts +113 -0
  281. package/node_modules/@orchestraworks/client/dist/esm/models/Image.js +91 -0
  282. package/node_modules/@orchestraworks/client/dist/esm/models/InboundWebhookEdge.d.ts +2 -2
  283. package/node_modules/@orchestraworks/client/dist/esm/models/InboundWebhookEdge.js +2 -2
  284. package/node_modules/@orchestraworks/client/dist/esm/models/InvitationTeamMembership.d.ts +44 -0
  285. package/node_modules/@orchestraworks/client/dist/esm/models/InvitationTeamMembership.js +47 -0
  286. package/node_modules/@orchestraworks/client/dist/esm/models/MachineEgressPolicyDiagnostics.d.ts +1 -1
  287. package/node_modules/@orchestraworks/client/dist/esm/models/MachineEgressRuleDiagnostics.d.ts +0 -6
  288. package/node_modules/@orchestraworks/client/dist/esm/models/MachineEgressRuleDiagnostics.js +0 -4
  289. package/node_modules/@orchestraworks/client/dist/esm/models/MachineView.d.ts +2 -2
  290. package/node_modules/@orchestraworks/client/dist/esm/models/MachineView.js +2 -2
  291. package/node_modules/@orchestraworks/client/dist/esm/models/MessageWorkItemRequest.d.ts +1 -1
  292. package/node_modules/@orchestraworks/client/dist/esm/models/Metric.d.ts +2 -2
  293. package/node_modules/@orchestraworks/client/dist/esm/models/Metric.js +2 -2
  294. package/node_modules/@orchestraworks/client/dist/esm/models/MetricValue.d.ts +2 -2
  295. package/node_modules/@orchestraworks/client/dist/esm/models/MetricValue.js +2 -2
  296. package/node_modules/@orchestraworks/client/dist/esm/models/ModelFile.d.ts +2 -2
  297. package/node_modules/@orchestraworks/client/dist/esm/models/ModelFile.js +2 -2
  298. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationEntitlements.d.ts +7 -0
  299. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationEntitlements.js +5 -0
  300. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationInvitation.d.ts +4 -4
  301. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationInvitation.js +4 -4
  302. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationMembership.d.ts +5 -5
  303. package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationMembership.js +4 -4
  304. package/node_modules/@orchestraworks/client/dist/esm/models/PageImage.d.ts +51 -0
  305. package/node_modules/@orchestraworks/client/dist/esm/models/{PageProject.js → PageImage.js} +11 -11
  306. package/node_modules/@orchestraworks/client/dist/esm/models/PageTeam.d.ts +51 -0
  307. package/node_modules/@orchestraworks/client/dist/esm/models/{PageGroupSummary.js → PageTeam.js} +11 -11
  308. package/node_modules/@orchestraworks/client/dist/esm/models/PageTeamMembership.d.ts +51 -0
  309. package/node_modules/@orchestraworks/client/dist/esm/models/PageTeamMembership.js +56 -0
  310. package/node_modules/@orchestraworks/client/dist/esm/models/Pipeline.d.ts +2 -2
  311. package/node_modules/@orchestraworks/client/dist/esm/models/Pipeline.js +2 -2
  312. package/node_modules/@orchestraworks/client/dist/esm/models/PolicyAssignment.d.ts +8 -2
  313. package/node_modules/@orchestraworks/client/dist/esm/models/PolicyAssignment.js +4 -2
  314. package/node_modules/@orchestraworks/client/dist/esm/models/ProviderConnectionIntent.d.ts +2 -2
  315. package/node_modules/@orchestraworks/client/dist/esm/models/ProviderConnectionIntent.js +2 -2
  316. package/node_modules/@orchestraworks/client/dist/esm/models/ReferenceSubject.d.ts +1 -1
  317. package/node_modules/@orchestraworks/client/dist/esm/models/ReferenceSubject.js +1 -1
  318. package/node_modules/@orchestraworks/client/dist/esm/models/Role.d.ts +6 -0
  319. package/node_modules/@orchestraworks/client/dist/esm/models/Role.js +4 -0
  320. package/node_modules/@orchestraworks/client/dist/esm/models/Secret.d.ts +16 -3
  321. package/node_modules/@orchestraworks/client/dist/esm/models/Secret.js +8 -2
  322. package/node_modules/@orchestraworks/client/dist/esm/models/ServiceAccount.d.ts +7 -1
  323. package/node_modules/@orchestraworks/client/dist/esm/models/ServiceAccount.js +1 -0
  324. package/node_modules/@orchestraworks/client/dist/esm/models/Session.d.ts +3 -2
  325. package/node_modules/@orchestraworks/client/dist/esm/models/Session.js +3 -2
  326. package/node_modules/@orchestraworks/client/dist/esm/models/SessionSummary.d.ts +3 -2
  327. package/node_modules/@orchestraworks/client/dist/esm/models/SessionSummary.js +3 -2
  328. package/node_modules/@orchestraworks/client/dist/esm/models/Skill.d.ts +2 -2
  329. package/node_modules/@orchestraworks/client/dist/esm/models/Skill.js +2 -2
  330. package/node_modules/@orchestraworks/client/dist/esm/models/SnapshotAnchor.d.ts +1 -1
  331. package/node_modules/@orchestraworks/client/dist/esm/models/Team.d.ts +104 -0
  332. package/node_modules/@orchestraworks/client/dist/esm/models/{GroupSummary.js → Team.js} +25 -15
  333. package/node_modules/@orchestraworks/client/dist/esm/models/TeamMembership.d.ts +83 -0
  334. package/node_modules/@orchestraworks/client/dist/esm/models/TeamMembership.js +77 -0
  335. package/node_modules/@orchestraworks/client/dist/esm/models/Trigger.d.ts +2 -2
  336. package/node_modules/@orchestraworks/client/dist/esm/models/Trigger.js +2 -2
  337. package/node_modules/@orchestraworks/client/dist/esm/models/TriggerTarget.d.ts +1 -1
  338. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateArtifactRequest.d.ts +1 -1
  339. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateConnectionRequest.d.ts +6 -0
  340. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateConnectionRequest.js +2 -0
  341. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationInvitationRequest.d.ts +4 -4
  342. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationInvitationRequest.js +3 -3
  343. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationMembershipRequest.d.ts +1 -8
  344. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationMembershipRequest.js +0 -3
  345. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateSecretRequest.d.ts +6 -0
  346. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateSecretRequest.js +2 -0
  347. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamMembershipRequest.d.ts +47 -0
  348. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamMembershipRequest.js +51 -0
  349. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamRequest.d.ts +68 -0
  350. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamRequest.js +58 -0
  351. package/node_modules/@orchestraworks/client/dist/esm/models/UserGrant.d.ts +2 -2
  352. package/node_modules/@orchestraworks/client/dist/esm/models/UserGrant.js +2 -2
  353. package/node_modules/@orchestraworks/client/dist/esm/models/Volume.d.ts +10 -3
  354. package/node_modules/@orchestraworks/client/dist/esm/models/Volume.js +4 -2
  355. package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemActivity.d.ts +2 -2
  356. package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemAssignment.d.ts +7 -7
  357. package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemAssignment.js +5 -5
  358. package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemDraftAssignment.d.ts +2 -2
  359. package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemDraftAssignment.js +2 -2
  360. package/node_modules/@orchestraworks/client/dist/esm/models/Workflow.d.ts +2 -2
  361. package/node_modules/@orchestraworks/client/dist/esm/models/Workflow.js +2 -2
  362. package/node_modules/@orchestraworks/client/dist/esm/models/index.d.ts +13 -17
  363. package/node_modules/@orchestraworks/client/dist/esm/models/index.js +13 -17
  364. package/node_modules/@orchestraworks/client/dist/models/AddArtifactVersionRequest.d.ts +1 -1
  365. package/node_modules/@orchestraworks/client/dist/models/Agent.d.ts +9 -3
  366. package/node_modules/@orchestraworks/client/dist/models/Agent.js +3 -2
  367. package/node_modules/@orchestraworks/client/dist/models/ApiErrorDetail.d.ts +9 -1
  368. package/node_modules/@orchestraworks/client/dist/models/ApiErrorDetail.js +5 -1
  369. package/node_modules/@orchestraworks/client/dist/models/Artifact.d.ts +2 -2
  370. package/node_modules/@orchestraworks/client/dist/models/Artifact.js +2 -2
  371. package/node_modules/@orchestraworks/client/dist/models/ArtifactSummary.d.ts +2 -2
  372. package/node_modules/@orchestraworks/client/dist/models/ArtifactSummary.js +2 -2
  373. package/node_modules/@orchestraworks/client/dist/models/AssignAction.d.ts +1 -1
  374. package/node_modules/@orchestraworks/client/dist/models/AssignAction.js +2 -2
  375. package/node_modules/@orchestraworks/client/dist/models/AssignWorkItemRequest.d.ts +2 -2
  376. package/node_modules/@orchestraworks/client/dist/models/AssignWorkItemRequest.js +2 -2
  377. package/node_modules/@orchestraworks/client/dist/models/ComputeProviderTarget.d.ts +6 -0
  378. package/node_modules/@orchestraworks/client/dist/models/ComputeProviderTarget.js +2 -0
  379. package/node_modules/@orchestraworks/client/dist/models/Connection.d.ts +16 -3
  380. package/node_modules/@orchestraworks/client/dist/models/Connection.js +8 -2
  381. package/node_modules/@orchestraworks/client/dist/models/ConnectionInstallLink.d.ts +2 -2
  382. package/node_modules/@orchestraworks/client/dist/models/ConnectionInstallLink.js +2 -2
  383. package/node_modules/@orchestraworks/client/dist/models/Connector.d.ts +2 -2
  384. package/node_modules/@orchestraworks/client/dist/models/Connector.js +2 -2
  385. package/node_modules/@orchestraworks/client/dist/models/CreateAgentRequest.d.ts +2 -2
  386. package/node_modules/@orchestraworks/client/dist/models/CreateAgentRequest.js +2 -2
  387. package/node_modules/@orchestraworks/client/dist/models/CreateArtifactRequest.d.ts +4 -4
  388. package/node_modules/@orchestraworks/client/dist/models/CreateArtifactRequest.js +2 -2
  389. package/node_modules/@orchestraworks/client/dist/models/CreateConnectionInstallLinkRequest.d.ts +3 -3
  390. package/node_modules/@orchestraworks/client/dist/models/CreateConnectionInstallLinkRequest.js +2 -2
  391. package/node_modules/@orchestraworks/client/dist/models/CreateConnectionRequest.d.ts +8 -2
  392. package/node_modules/@orchestraworks/client/dist/models/CreateConnectionRequest.js +4 -2
  393. package/node_modules/@orchestraworks/client/dist/models/CreateConnectorRequest.d.ts +2 -2
  394. package/node_modules/@orchestraworks/client/dist/models/CreateConnectorRequest.js +2 -2
  395. package/node_modules/@orchestraworks/client/dist/models/CreateDashboardRequest.d.ts +3 -3
  396. package/node_modules/@orchestraworks/client/dist/models/CreateDashboardRequest.js +2 -2
  397. package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.d.ts +2 -2
  398. package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.js +2 -2
  399. package/node_modules/@orchestraworks/client/dist/models/CreateFileRequest.d.ts +2 -2
  400. package/node_modules/@orchestraworks/client/dist/models/CreateFileRequest.js +2 -2
  401. package/node_modules/@orchestraworks/client/dist/models/CreateGatewayKeyRequest.d.ts +2 -2
  402. package/node_modules/@orchestraworks/client/dist/models/CreateGatewayKeyRequest.js +2 -2
  403. package/node_modules/@orchestraworks/client/dist/models/CreateImageRequest.d.ts +38 -0
  404. package/node_modules/@orchestraworks/client/dist/models/CreateImageRequest.js +54 -0
  405. package/node_modules/@orchestraworks/client/dist/models/CreateMachineRequest.d.ts +2 -2
  406. package/node_modules/@orchestraworks/client/dist/models/CreateMachineRequest.js +2 -2
  407. package/node_modules/@orchestraworks/client/dist/models/CreateMetricRequest.d.ts +2 -2
  408. package/node_modules/@orchestraworks/client/dist/models/CreateMetricRequest.js +2 -2
  409. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationInvitationRequest.d.ts +4 -4
  410. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationInvitationRequest.js +3 -3
  411. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationMembershipRequest.d.ts +1 -8
  412. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationMembershipRequest.js +0 -3
  413. package/node_modules/@orchestraworks/client/dist/models/CreatePipelineRequest.d.ts +2 -2
  414. package/node_modules/@orchestraworks/client/dist/models/CreatePipelineRequest.js +2 -2
  415. package/node_modules/@orchestraworks/client/dist/models/CreateProviderConnectionIntentRequest.d.ts +3 -3
  416. package/node_modules/@orchestraworks/client/dist/models/CreateProviderConnectionIntentRequest.js +2 -2
  417. package/node_modules/@orchestraworks/client/dist/models/CreateSecretRequest.d.ts +8 -2
  418. package/node_modules/@orchestraworks/client/dist/models/CreateSecretRequest.js +4 -2
  419. package/node_modules/@orchestraworks/client/dist/models/CreateSessionRequest.d.ts +2 -2
  420. package/node_modules/@orchestraworks/client/dist/models/CreateSessionRequest.js +2 -2
  421. package/node_modules/@orchestraworks/client/dist/models/CreateSkillRequest.d.ts +2 -2
  422. package/node_modules/@orchestraworks/client/dist/models/CreateSkillRequest.js +2 -2
  423. package/node_modules/@orchestraworks/client/dist/models/CreateTeamMembershipRequest.d.ts +65 -0
  424. package/node_modules/@orchestraworks/client/dist/models/CreateTeamMembershipRequest.js +69 -0
  425. package/node_modules/@orchestraworks/client/dist/models/CreateTeamRequest.d.ts +80 -0
  426. package/node_modules/@orchestraworks/client/dist/models/CreateTeamRequest.js +72 -0
  427. package/node_modules/@orchestraworks/client/dist/models/CreateTriggerRequest.d.ts +2 -2
  428. package/node_modules/@orchestraworks/client/dist/models/CreateTriggerRequest.js +2 -2
  429. package/node_modules/@orchestraworks/client/dist/models/CreateVolumeRequest.d.ts +2 -2
  430. package/node_modules/@orchestraworks/client/dist/models/CreateVolumeRequest.js +2 -2
  431. package/node_modules/@orchestraworks/client/dist/models/CreateWorkflowRequest.d.ts +1 -1
  432. package/node_modules/@orchestraworks/client/dist/models/Dashboard.d.ts +8 -2
  433. package/node_modules/@orchestraworks/client/dist/models/Dashboard.js +6 -2
  434. package/node_modules/@orchestraworks/client/dist/models/DashboardChart.d.ts +45 -4
  435. package/node_modules/@orchestraworks/client/dist/models/DashboardChart.js +30 -6
  436. package/node_modules/@orchestraworks/client/dist/models/DashboardChartQuery.d.ts +1 -1
  437. package/node_modules/@orchestraworks/client/dist/models/Delivery.d.ts +2 -2
  438. package/node_modules/@orchestraworks/client/dist/models/Delivery.js +2 -2
  439. package/node_modules/@orchestraworks/client/dist/models/EgressPolicyRule.d.ts +0 -13
  440. package/node_modules/@orchestraworks/client/dist/models/EgressPolicyRule.js +0 -5
  441. package/node_modules/@orchestraworks/client/dist/models/EntitlementTeamUsage.d.ts +58 -0
  442. package/node_modules/@orchestraworks/client/dist/models/EntitlementTeamUsage.js +72 -0
  443. package/node_modules/@orchestraworks/client/dist/models/Environment.d.ts +2 -2
  444. package/node_modules/@orchestraworks/client/dist/models/Environment.js +2 -2
  445. package/node_modules/@orchestraworks/client/dist/models/EnvironmentEgressPolicy.d.ts +1 -1
  446. package/node_modules/@orchestraworks/client/dist/models/GatewayKey.d.ts +2 -2
  447. package/node_modules/@orchestraworks/client/dist/models/GatewayKey.js +2 -2
  448. package/node_modules/@orchestraworks/client/dist/models/Image.d.ts +113 -0
  449. package/node_modules/@orchestraworks/client/dist/models/Image.js +99 -0
  450. package/node_modules/@orchestraworks/client/dist/models/InboundWebhookEdge.d.ts +2 -2
  451. package/node_modules/@orchestraworks/client/dist/models/InboundWebhookEdge.js +2 -2
  452. package/node_modules/@orchestraworks/client/dist/models/InvitationTeamMembership.d.ts +44 -0
  453. package/node_modules/@orchestraworks/client/dist/models/InvitationTeamMembership.js +54 -0
  454. package/node_modules/@orchestraworks/client/dist/models/MachineEgressPolicyDiagnostics.d.ts +1 -1
  455. package/node_modules/@orchestraworks/client/dist/models/MachineEgressRuleDiagnostics.d.ts +0 -6
  456. package/node_modules/@orchestraworks/client/dist/models/MachineEgressRuleDiagnostics.js +0 -4
  457. package/node_modules/@orchestraworks/client/dist/models/MachineView.d.ts +2 -2
  458. package/node_modules/@orchestraworks/client/dist/models/MachineView.js +2 -2
  459. package/node_modules/@orchestraworks/client/dist/models/MessageWorkItemRequest.d.ts +1 -1
  460. package/node_modules/@orchestraworks/client/dist/models/Metric.d.ts +2 -2
  461. package/node_modules/@orchestraworks/client/dist/models/Metric.js +2 -2
  462. package/node_modules/@orchestraworks/client/dist/models/MetricValue.d.ts +2 -2
  463. package/node_modules/@orchestraworks/client/dist/models/MetricValue.js +2 -2
  464. package/node_modules/@orchestraworks/client/dist/models/ModelFile.d.ts +2 -2
  465. package/node_modules/@orchestraworks/client/dist/models/ModelFile.js +2 -2
  466. package/node_modules/@orchestraworks/client/dist/models/OrganizationEntitlements.d.ts +7 -0
  467. package/node_modules/@orchestraworks/client/dist/models/OrganizationEntitlements.js +5 -0
  468. package/node_modules/@orchestraworks/client/dist/models/OrganizationInvitation.d.ts +4 -4
  469. package/node_modules/@orchestraworks/client/dist/models/OrganizationInvitation.js +4 -4
  470. package/node_modules/@orchestraworks/client/dist/models/OrganizationMembership.d.ts +5 -5
  471. package/node_modules/@orchestraworks/client/dist/models/OrganizationMembership.js +4 -4
  472. package/node_modules/@orchestraworks/client/dist/models/PageImage.d.ts +51 -0
  473. package/node_modules/@orchestraworks/client/dist/models/{PageProject.js → PageImage.js} +16 -16
  474. package/node_modules/@orchestraworks/client/dist/models/PageTeam.d.ts +51 -0
  475. package/node_modules/@orchestraworks/client/dist/models/{PageGroupSummary.js → PageTeam.js} +16 -16
  476. package/node_modules/@orchestraworks/client/dist/models/PageTeamMembership.d.ts +51 -0
  477. package/node_modules/@orchestraworks/client/dist/models/PageTeamMembership.js +63 -0
  478. package/node_modules/@orchestraworks/client/dist/models/Pipeline.d.ts +2 -2
  479. package/node_modules/@orchestraworks/client/dist/models/Pipeline.js +2 -2
  480. package/node_modules/@orchestraworks/client/dist/models/PolicyAssignment.d.ts +8 -2
  481. package/node_modules/@orchestraworks/client/dist/models/PolicyAssignment.js +4 -2
  482. package/node_modules/@orchestraworks/client/dist/models/ProviderConnectionIntent.d.ts +2 -2
  483. package/node_modules/@orchestraworks/client/dist/models/ProviderConnectionIntent.js +2 -2
  484. package/node_modules/@orchestraworks/client/dist/models/ReferenceSubject.d.ts +1 -1
  485. package/node_modules/@orchestraworks/client/dist/models/ReferenceSubject.js +1 -1
  486. package/node_modules/@orchestraworks/client/dist/models/Role.d.ts +6 -0
  487. package/node_modules/@orchestraworks/client/dist/models/Role.js +4 -0
  488. package/node_modules/@orchestraworks/client/dist/models/Secret.d.ts +16 -3
  489. package/node_modules/@orchestraworks/client/dist/models/Secret.js +8 -2
  490. package/node_modules/@orchestraworks/client/dist/models/ServiceAccount.d.ts +7 -1
  491. package/node_modules/@orchestraworks/client/dist/models/ServiceAccount.js +1 -0
  492. package/node_modules/@orchestraworks/client/dist/models/Session.d.ts +3 -2
  493. package/node_modules/@orchestraworks/client/dist/models/Session.js +3 -2
  494. package/node_modules/@orchestraworks/client/dist/models/SessionSummary.d.ts +3 -2
  495. package/node_modules/@orchestraworks/client/dist/models/SessionSummary.js +3 -2
  496. package/node_modules/@orchestraworks/client/dist/models/Skill.d.ts +2 -2
  497. package/node_modules/@orchestraworks/client/dist/models/Skill.js +2 -2
  498. package/node_modules/@orchestraworks/client/dist/models/SnapshotAnchor.d.ts +1 -1
  499. package/node_modules/@orchestraworks/client/dist/models/Team.d.ts +104 -0
  500. package/node_modules/@orchestraworks/client/dist/models/{GroupSummary.js → Team.js} +31 -21
  501. package/node_modules/@orchestraworks/client/dist/models/TeamMembership.d.ts +83 -0
  502. package/node_modules/@orchestraworks/client/dist/models/TeamMembership.js +85 -0
  503. package/node_modules/@orchestraworks/client/dist/models/Trigger.d.ts +2 -2
  504. package/node_modules/@orchestraworks/client/dist/models/Trigger.js +2 -2
  505. package/node_modules/@orchestraworks/client/dist/models/TriggerTarget.d.ts +1 -1
  506. package/node_modules/@orchestraworks/client/dist/models/UpdateArtifactRequest.d.ts +1 -1
  507. package/node_modules/@orchestraworks/client/dist/models/UpdateConnectionRequest.d.ts +6 -0
  508. package/node_modules/@orchestraworks/client/dist/models/UpdateConnectionRequest.js +2 -0
  509. package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationInvitationRequest.d.ts +4 -4
  510. package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationInvitationRequest.js +3 -3
  511. package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationMembershipRequest.d.ts +1 -8
  512. package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationMembershipRequest.js +0 -3
  513. package/node_modules/@orchestraworks/client/dist/models/UpdateSecretRequest.d.ts +6 -0
  514. package/node_modules/@orchestraworks/client/dist/models/UpdateSecretRequest.js +2 -0
  515. package/node_modules/@orchestraworks/client/dist/models/UpdateTeamMembershipRequest.d.ts +47 -0
  516. package/node_modules/@orchestraworks/client/dist/models/UpdateTeamMembershipRequest.js +59 -0
  517. package/node_modules/@orchestraworks/client/dist/models/UpdateTeamRequest.d.ts +68 -0
  518. package/node_modules/@orchestraworks/client/dist/models/UpdateTeamRequest.js +66 -0
  519. package/node_modules/@orchestraworks/client/dist/models/UserGrant.d.ts +2 -2
  520. package/node_modules/@orchestraworks/client/dist/models/UserGrant.js +2 -2
  521. package/node_modules/@orchestraworks/client/dist/models/Volume.d.ts +10 -3
  522. package/node_modules/@orchestraworks/client/dist/models/Volume.js +4 -2
  523. package/node_modules/@orchestraworks/client/dist/models/WorkItemActivity.d.ts +2 -2
  524. package/node_modules/@orchestraworks/client/dist/models/WorkItemAssignment.d.ts +7 -7
  525. package/node_modules/@orchestraworks/client/dist/models/WorkItemAssignment.js +5 -5
  526. package/node_modules/@orchestraworks/client/dist/models/WorkItemDraftAssignment.d.ts +2 -2
  527. package/node_modules/@orchestraworks/client/dist/models/WorkItemDraftAssignment.js +2 -2
  528. package/node_modules/@orchestraworks/client/dist/models/Workflow.d.ts +2 -2
  529. package/node_modules/@orchestraworks/client/dist/models/Workflow.js +2 -2
  530. package/node_modules/@orchestraworks/client/dist/models/index.d.ts +13 -17
  531. package/node_modules/@orchestraworks/client/dist/models/index.js +13 -17
  532. package/node_modules/@orchestraworks/client/package.json +1 -1
  533. package/package.json +4 -4
  534. package/skills/orchestra/SKILL.md +82 -67
  535. package/skills/orchestra-fdk/references/authoring.md +83 -45
  536. package/skills/orchestra-fdk/references/environment.md +214 -33
  537. package/skills/orchestra-fdk/references/troubleshooting.md +10 -8
  538. package/templates/bug-fix/main.ts +6 -1
  539. package/templates/engineering-team/README.md +10 -7
  540. package/templates/engineering-team/agents/engineer-agent.md +38 -16
  541. package/templates/engineering-team/lib/environment.ts +15 -3
  542. package/templates/engineering-team/main.ts +1 -1
  543. package/templates/todo-factory/main.ts +6 -1
  544. package/dist/constructs/project.d.ts +0 -33
  545. package/dist/constructs/project.js +0 -82
  546. package/node_modules/@orchestraworks/client/dist/apis/GroupsApi.d.ts +0 -95
  547. package/node_modules/@orchestraworks/client/dist/apis/ProjectsApi.d.ts +0 -93
  548. package/node_modules/@orchestraworks/client/dist/esm/apis/GroupsApi.d.ts +0 -95
  549. package/node_modules/@orchestraworks/client/dist/esm/apis/ProjectsApi.d.ts +0 -93
  550. package/node_modules/@orchestraworks/client/dist/esm/models/CreateGroupRequest.d.ts +0 -82
  551. package/node_modules/@orchestraworks/client/dist/esm/models/CreateGroupRequest.js +0 -74
  552. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationRequest.d.ts +0 -53
  553. package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationRequest.js +0 -50
  554. package/node_modules/@orchestraworks/client/dist/esm/models/CreateProjectRequest.d.ts +0 -52
  555. package/node_modules/@orchestraworks/client/dist/esm/models/CreateProjectRequest.js +0 -49
  556. package/node_modules/@orchestraworks/client/dist/esm/models/CreateUserRequest.d.ts +0 -46
  557. package/node_modules/@orchestraworks/client/dist/esm/models/CreateUserRequest.js +0 -47
  558. package/node_modules/@orchestraworks/client/dist/esm/models/CredentialBinding.d.ts +0 -57
  559. package/node_modules/@orchestraworks/client/dist/esm/models/CredentialBinding.js +0 -50
  560. package/node_modules/@orchestraworks/client/dist/esm/models/Group.d.ts +0 -106
  561. package/node_modules/@orchestraworks/client/dist/esm/models/Group.js +0 -92
  562. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMember.d.ts +0 -40
  563. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMember.js +0 -45
  564. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberAgent.d.ts +0 -44
  565. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberReference.d.ts +0 -38
  566. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberReference.js +0 -43
  567. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberUser.d.ts +0 -38
  568. package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberUser.js +0 -45
  569. package/node_modules/@orchestraworks/client/dist/esm/models/GroupSummary.d.ts +0 -86
  570. package/node_modules/@orchestraworks/client/dist/esm/models/PageGroupSummary.d.ts +0 -51
  571. package/node_modules/@orchestraworks/client/dist/esm/models/PageProject.d.ts +0 -51
  572. package/node_modules/@orchestraworks/client/dist/esm/models/Project.d.ts +0 -76
  573. package/node_modules/@orchestraworks/client/dist/esm/models/Project.js +0 -69
  574. package/node_modules/@orchestraworks/client/dist/esm/models/RoleAssignment.d.ts +0 -38
  575. package/node_modules/@orchestraworks/client/dist/esm/models/RoleAssignment.js +0 -45
  576. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateGroupRequest.d.ts +0 -70
  577. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateGroupRequest.js +0 -60
  578. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateProjectRequest.d.ts +0 -46
  579. package/node_modules/@orchestraworks/client/dist/esm/models/UpdateProjectRequest.js +0 -45
  580. package/node_modules/@orchestraworks/client/dist/models/CreateGroupRequest.d.ts +0 -82
  581. package/node_modules/@orchestraworks/client/dist/models/CreateGroupRequest.js +0 -82
  582. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationRequest.d.ts +0 -53
  583. package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationRequest.js +0 -57
  584. package/node_modules/@orchestraworks/client/dist/models/CreateProjectRequest.d.ts +0 -52
  585. package/node_modules/@orchestraworks/client/dist/models/CreateProjectRequest.js +0 -56
  586. package/node_modules/@orchestraworks/client/dist/models/CreateUserRequest.d.ts +0 -46
  587. package/node_modules/@orchestraworks/client/dist/models/CreateUserRequest.js +0 -54
  588. package/node_modules/@orchestraworks/client/dist/models/CredentialBinding.d.ts +0 -57
  589. package/node_modules/@orchestraworks/client/dist/models/CredentialBinding.js +0 -57
  590. package/node_modules/@orchestraworks/client/dist/models/Group.d.ts +0 -106
  591. package/node_modules/@orchestraworks/client/dist/models/Group.js +0 -100
  592. package/node_modules/@orchestraworks/client/dist/models/GroupMember.d.ts +0 -40
  593. package/node_modules/@orchestraworks/client/dist/models/GroupMember.js +0 -52
  594. package/node_modules/@orchestraworks/client/dist/models/GroupMemberAgent.d.ts +0 -44
  595. package/node_modules/@orchestraworks/client/dist/models/GroupMemberAgent.js +0 -58
  596. package/node_modules/@orchestraworks/client/dist/models/GroupMemberReference.d.ts +0 -38
  597. package/node_modules/@orchestraworks/client/dist/models/GroupMemberReference.js +0 -50
  598. package/node_modules/@orchestraworks/client/dist/models/GroupMemberUser.d.ts +0 -38
  599. package/node_modules/@orchestraworks/client/dist/models/GroupMemberUser.js +0 -52
  600. package/node_modules/@orchestraworks/client/dist/models/GroupSummary.d.ts +0 -86
  601. package/node_modules/@orchestraworks/client/dist/models/PageGroupSummary.d.ts +0 -51
  602. package/node_modules/@orchestraworks/client/dist/models/PageProject.d.ts +0 -51
  603. package/node_modules/@orchestraworks/client/dist/models/Project.d.ts +0 -76
  604. package/node_modules/@orchestraworks/client/dist/models/Project.js +0 -76
  605. package/node_modules/@orchestraworks/client/dist/models/RoleAssignment.d.ts +0 -38
  606. package/node_modules/@orchestraworks/client/dist/models/RoleAssignment.js +0 -52
  607. package/node_modules/@orchestraworks/client/dist/models/UpdateGroupRequest.d.ts +0 -70
  608. package/node_modules/@orchestraworks/client/dist/models/UpdateGroupRequest.js +0 -68
  609. package/node_modules/@orchestraworks/client/dist/models/UpdateProjectRequest.d.ts +0 -46
  610. package/node_modules/@orchestraworks/client/dist/models/UpdateProjectRequest.js +0 -52
@@ -0,0 +1,489 @@
1
+ // Apply's hosted-image phase: a declared image whose tag has no registry path is built into an OCI layout,
2
+ // its manifest is offered to `POST /images`, the blobs the platform does not hold go up through the File
3
+ // API, and apply waits until the platform has copied the image before an environment may name it.
4
+ //
5
+ // Two rules here are not style. The build runs on the `orchestra-oci` builder, created when absent and never made
6
+ // the default, because the default `docker` driver cannot export an OCI layout. And each image reaches
7
+ // `READY` before the next one builds, so a failure names one image and leaves the later ones untouched.
8
+ import { createHash } from "node:crypto";
9
+ import { existsSync, mkdtempSync, readFileSync, rmSync, statSync } from "node:fs";
10
+ import { tmpdir } from "node:os";
11
+ import { join, resolve } from "node:path";
12
+ import { hostedImageName, isHostedImageTag } from "../../constructs/references.js";
13
+ import { httpStatusOf } from "../../engine/client.js";
14
+ import { readApiError } from "../core/errors.js";
15
+ import { objectStoreFetch } from "../core/platform-client.js";
16
+ import { uploadFile } from "../upload.js";
17
+ import { imageBuildSpecs } from "./docker.js";
18
+ export const OCI_BUILDER = "orchestra-oci";
19
+ export const HOSTED_PLATFORM = "linux/amd64";
20
+ export const POLL_INTERVAL_MS = 5_000;
21
+ export const POLL_TIMEOUT_MS = 30 * 60_000;
22
+ const BLOBS_MISSING = "IMAGE_BLOBS_MISSING";
23
+ const QUOTA_EXCEEDED = "QUOTA_EXCEEDED";
24
+ const IMAGE_COUNT_DIMENSION = "IMAGES";
25
+ const LIST_PAGE_SIZE = 100;
26
+ /** Carries the images already `READY`, so the abort message says what landed. */
27
+ export class ImageUploadError extends Error {
28
+ ready;
29
+ constructor(message, ready = []) {
30
+ super(ready.length > 0 ? `${message} Already READY: [${ready.join(", ")}].` : message);
31
+ this.ready = ready;
32
+ this.name = "ImageUploadError";
33
+ }
34
+ }
35
+ export function hostedSpecs(specs) {
36
+ return specs.filter((spec) => isHostedImageTag(spec.ref));
37
+ }
38
+ export async function readHostedImages(images, names) {
39
+ const wanted = new Set(names);
40
+ const newestReady = new Map();
41
+ try {
42
+ for (let page = 0;; page += 1) {
43
+ const listed = await images.listImages({
44
+ name: [...wanted],
45
+ status: ["READY"],
46
+ page,
47
+ limit: LIST_PAGE_SIZE,
48
+ });
49
+ // The platform lists newest first, so the first unmarked row of a name is its newest. A marked image is
50
+ // being deleted, and an environment naming it would fail at reconcile.
51
+ for (const image of listed.data) {
52
+ if (image.deleteRequestedAt === undefined && !newestReady.has(image.name))
53
+ newestReady.set(image.name, image);
54
+ }
55
+ const done = [...wanted].every((name) => newestReady.has(name));
56
+ if (done || listed.data.length === 0 || (page + 1) * listed.limit >= listed.total)
57
+ break;
58
+ }
59
+ }
60
+ catch (error) {
61
+ const status = httpStatusOf(error);
62
+ const api = await readApiError(error);
63
+ if (status === 501) {
64
+ return { available: false, message: api?.message ?? "this platform keeps no images" };
65
+ }
66
+ throw new ImageUploadError(`cannot read the platform's images: ${describeFailure(status, api, error)}`);
67
+ }
68
+ return { available: true, newestReady };
69
+ }
70
+ /** The reference of the newest `READY` image for each hosted tag that has one, keyed by tag. */
71
+ function readyReferences(specs, hosted) {
72
+ const pins = new Map();
73
+ if (!hosted.available)
74
+ return pins;
75
+ for (const spec of hostedSpecs(specs)) {
76
+ const ready = hosted.newestReady.get(hostedImageName(spec.ref));
77
+ if (ready !== undefined)
78
+ pins.set(spec.ref, ready.reference);
79
+ }
80
+ return pins;
81
+ }
82
+ /** A copy of the plan whose environments name the image reference in place of each pinned tag. */
83
+ export function pinHostedReferences(plan, pins) {
84
+ if (pins.size === 0)
85
+ return plan;
86
+ const pinned = structuredClone(plan);
87
+ for (const resource of pinned.resources) {
88
+ if (resource.kind !== "environment")
89
+ continue;
90
+ const spec = resource.payload.provisionSpec;
91
+ if (spec === undefined || typeof spec.image !== "string")
92
+ continue;
93
+ const reference = pins.get(spec.image);
94
+ if (reference !== undefined)
95
+ spec.image = reference;
96
+ }
97
+ return pinned;
98
+ }
99
+ /** Reads `/images` once when the plan declares a hosted image, and pins each tag to its newest READY image. */
100
+ export async function pinNewestReadyImages(plan, images) {
101
+ const declared = hostedSpecs(imageBuildSpecs(plan));
102
+ if (declared.length === 0)
103
+ return { declared, pins: new Map(), plan };
104
+ const hosted = await readHostedImages(images, declared.map((spec) => hostedImageName(spec.ref)));
105
+ const pins = readyReferences(declared, hosted);
106
+ return { declared, hosted, pins, plan: pinHostedReferences(plan, pins) };
107
+ }
108
+ /** Every refusal that needs no write: the declared platform, buildx, and a builder that starts. */
109
+ export async function prepareOciBuilder(specs, runner) {
110
+ for (const spec of specs) {
111
+ if (spec.platform !== undefined && spec.platform !== HOSTED_PLATFORM) {
112
+ throw new ImageUploadError(`image '${spec.ref}' declares the platform '${spec.platform}', and the platform keeps only ` +
113
+ `${HOSTED_PLATFORM} images. Remove the platform, or set it to ${HOSTED_PLATFORM}.`);
114
+ }
115
+ }
116
+ const buildx = await runner.run(["buildx", "version"]);
117
+ if (buildx.code !== 0) {
118
+ throw new ImageUploadError(`docker buildx is not available (${lastLine(buildx.output)}). Install the Docker buildx plugin, or pass ` +
119
+ `--no-docker-build to name the newest READY image of each declared image.`);
120
+ }
121
+ const existing = await runner.run(["buildx", "inspect", OCI_BUILDER]);
122
+ if (existing.code !== 0) {
123
+ const created = await runner.run(["buildx", "create", "--name", OCI_BUILDER, "--driver", "docker-container"]);
124
+ if (created.code !== 0) {
125
+ throw new ImageUploadError(`cannot create the '${OCI_BUILDER}' buildx builder: ${lastLine(created.output)}`);
126
+ }
127
+ }
128
+ const started = await runner.run(["buildx", "inspect", "--bootstrap", OCI_BUILDER]);
129
+ if (started.code !== 0) {
130
+ throw new ImageUploadError(`the '${OCI_BUILDER}' buildx builder cannot start: ${lastLine(started.output)}. Start Docker, or pass ` +
131
+ `--no-docker-build to name the newest READY image of each declared image.`);
132
+ }
133
+ }
134
+ /** Paths resolve against the factory directory; values are data, never shell. */
135
+ export function ociBuildArgv(spec, appDir, layoutDir) {
136
+ const argv = [
137
+ "buildx",
138
+ "build",
139
+ "--builder",
140
+ OCI_BUILDER,
141
+ "--platform",
142
+ HOSTED_PLATFORM,
143
+ "--provenance=false",
144
+ "--sbom=false",
145
+ "--output",
146
+ `type=oci,dest=${layoutDir},tar=false`,
147
+ "-f",
148
+ resolve(appDir, spec.dockerfile),
149
+ ];
150
+ for (const [key, value] of Object.entries(spec.buildArgs)) {
151
+ argv.push("--build-arg", `${key}=${value}`);
152
+ }
153
+ argv.push(resolve(appDir, spec.context));
154
+ return argv;
155
+ }
156
+ /**
157
+ * Builds, uploads and waits for each image in order; answers each tag's image reference. The Files uploaded
158
+ * for the `READY` images are deleted once, after the last image, so a later image may still use an earlier
159
+ * one's File as a held blob; they are deleted when a later image stops the run too.
160
+ */
161
+ export async function uploadHostedImages(specs, appDir, deps) {
162
+ const references = new Map();
163
+ const uploaded = [];
164
+ try {
165
+ for (const spec of specs) {
166
+ const landed = await uploadOne(spec, appDir, deps);
167
+ references.set(spec.ref, landed.reference);
168
+ uploaded.push(landed.uploaded);
169
+ }
170
+ }
171
+ catch (error) {
172
+ await deleteUploadedFiles(uploaded, deps);
173
+ throw new ImageUploadError(error instanceof Error ? error.message : String(error), [...references.keys()]);
174
+ }
175
+ await deleteUploadedFiles(uploaded, deps);
176
+ return references;
177
+ }
178
+ async function uploadOne(spec, appDir, deps) {
179
+ const { runner, io } = deps;
180
+ const name = hostedImageName(spec.ref);
181
+ const work = mkdtempSync(join(deps.tempDir ?? tmpdir(), "orchestra-image-"));
182
+ try {
183
+ const layoutDir = join(work, "layout");
184
+ io.out(`Building ${spec.ref} for ${HOSTED_PLATFORM} with the '${OCI_BUILDER}' builder...`);
185
+ const build = await runner.run(ociBuildArgv(spec, appDir, layoutDir), { stream: true });
186
+ if (build.code !== 0)
187
+ throw await buildFailure(spec, build, runner);
188
+ const layout = readOciLayout(layoutDir);
189
+ const { image: created, uploaded } = await createImage(name, layout, deps);
190
+ const ready = await waitUntilReady(created, uploaded, deps);
191
+ io.out(`Image '${name}' is READY: ${ready.reference}`);
192
+ return { reference: ready.reference, uploaded: { name, fileIds: uploaded } };
193
+ }
194
+ finally {
195
+ rmSync(work, { recursive: true, force: true });
196
+ }
197
+ }
198
+ async function deleteUploadedFiles(uploaded, deps) {
199
+ for (const { name, fileIds } of uploaded) {
200
+ for (const id of fileIds) {
201
+ try {
202
+ await deps.files.deleteFile({ id });
203
+ }
204
+ catch (error) {
205
+ deps.io.err(`warning: image '${name}' is READY, but the File ${id} uploaded for it was not deleted: ` +
206
+ `${describeFailure(httpStatusOf(error), await readApiError(error), error)}. ` +
207
+ `Run 'orchestra files delete ${id}' to delete it.`);
208
+ }
209
+ }
210
+ }
211
+ }
212
+ /** The images a hosted build names: each build argument's value, and each `FROM` that is not an earlier stage. */
213
+ export function imagesNamedBy(spec, appDir) {
214
+ const named = Object.entries(spec.buildArgs).map(([key, value]) => ({
215
+ ref: value,
216
+ how: `takes the build argument ${key} naming`,
217
+ }));
218
+ let text;
219
+ try {
220
+ text = readFileSync(resolve(appDir, spec.dockerfile), "utf8");
221
+ }
222
+ catch {
223
+ return named;
224
+ }
225
+ const argDefaults = new Map();
226
+ const stages = new Set();
227
+ for (const line of dockerfileInstructions(text)) {
228
+ const arg = /^ARG\s+([A-Za-z_][A-Za-z0-9_]*)=(\S+)/i.exec(line);
229
+ if (arg !== null) {
230
+ if (!argDefaults.has(arg[1]))
231
+ argDefaults.set(arg[1], unquote(arg[2]));
232
+ continue;
233
+ }
234
+ const from = /^FROM\s+(.*)$/i.exec(line);
235
+ if (from === null)
236
+ continue;
237
+ const words = from[1].split(/\s+/).filter((word) => word !== "" && !word.startsWith("--"));
238
+ if (words.length === 0)
239
+ continue;
240
+ const image = words[0].replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)/g, (_match, braced, bare) => {
241
+ const key = braced ?? bare ?? "";
242
+ return spec.buildArgs[key] ?? argDefaults.get(key) ?? "";
243
+ });
244
+ if (!stages.has(image))
245
+ named.push({ ref: image, how: "is built FROM" });
246
+ if (words.length >= 3 && words[1].toLowerCase() === "as")
247
+ stages.add(words[2]);
248
+ }
249
+ return named;
250
+ }
251
+ /** Joins `\` continuations and drops comment lines, so each entry is one instruction. */
252
+ function dockerfileInstructions(text) {
253
+ const instructions = [];
254
+ let pending = "";
255
+ for (const raw of text.split(/\r?\n/)) {
256
+ const line = raw.trim();
257
+ if (line.startsWith("#"))
258
+ continue;
259
+ if (line.endsWith("\\")) {
260
+ pending += `${line.slice(0, -1)} `;
261
+ continue;
262
+ }
263
+ instructions.push(`${pending}${line}`.trim());
264
+ pending = "";
265
+ }
266
+ if (pending !== "")
267
+ instructions.push(pending.trim());
268
+ return instructions;
269
+ }
270
+ function unquote(value) {
271
+ return value.replace(/^(["'])(.*)\1$/, "$2");
272
+ }
273
+ const UNRESOLVED_BASE = /failed to resolve source metadata for (\S+): /;
274
+ /** A base the registry does not have but the local store does is the one failure the author can act on by name. */
275
+ async function buildFailure(spec, build, runner) {
276
+ const base = UNRESOLVED_BASE.exec(build.output)?.[1];
277
+ if (base !== undefined) {
278
+ const short = base.replace(/^docker\.io\/library\//, "");
279
+ for (const candidate of new Set([base, short])) {
280
+ const local = await runner.run(["image", "inspect", candidate]);
281
+ if (local.code === 0) {
282
+ return new ImageUploadError(`image '${spec.ref}' is built FROM '${short}', which is only in this machine's Docker image store. The ` +
283
+ `'${OCI_BUILDER}' builder pulls every base from a registry: push '${short}' to a registry and name it ` +
284
+ `there in FROM.`);
285
+ }
286
+ }
287
+ }
288
+ return new ImageUploadError(`docker buildx build failed for declared image '${spec.ref}' (exit ${build.code}).`);
289
+ }
290
+ const IMAGE_MANIFEST_TYPES = new Set([
291
+ "application/vnd.oci.image.manifest.v1+json",
292
+ "application/vnd.docker.distribution.manifest.v2+json",
293
+ ]);
294
+ const IMAGE_INDEX_TYPES = new Set([
295
+ "application/vnd.oci.image.index.v1+json",
296
+ "application/vnd.docker.distribution.manifest.list.v2+json",
297
+ ]);
298
+ /** Bounds a JSON document read whole from the layout; the platform takes a manifest of at most 256 KiB. */
299
+ const MAX_JSON_BYTES = 4 * 1024 * 1024;
300
+ export function readOciLayout(dir) {
301
+ const index = readJson(dir, "index.json");
302
+ const chosen = chooseManifest(dir, index.manifests ?? [], 0);
303
+ if (chosen === undefined) {
304
+ throw new ImageUploadError(`the build wrote no ${HOSTED_PLATFORM} image manifest to its OCI layout.`);
305
+ }
306
+ const bytes = readSmall(dir, blobPath(chosen.digest));
307
+ if (`sha256:${createHash("sha256").update(bytes).digest("hex")}` !== chosen.digest) {
308
+ throw new ImageUploadError(`the OCI layout's manifest does not hash to ${chosen.digest}.`);
309
+ }
310
+ const manifest = bytes.toString("utf8");
311
+ const parsed = JSON.parse(manifest);
312
+ const blobs = new Map();
313
+ for (const blob of [...(parsed.config !== undefined ? [parsed.config] : []), ...(parsed.layers ?? [])]) {
314
+ blobs.set(blob.digest, blob);
315
+ }
316
+ return { dir, manifest, digest: chosen.digest, blobs };
317
+ }
318
+ function chooseManifest(dir, descriptors, depth) {
319
+ const images = descriptors.filter((d) => (d.mediaType === undefined || IMAGE_MANIFEST_TYPES.has(d.mediaType)) &&
320
+ d.annotations?.["vnd.docker.reference.type"] !== "attestation-manifest");
321
+ const matches = (d) => d.platform?.os === "linux" && d.platform?.architecture === "amd64";
322
+ const explicit = images.find(matches);
323
+ if (explicit !== undefined)
324
+ return explicit;
325
+ const unlabelled = images.filter((d) => d.platform === undefined);
326
+ if (unlabelled.length === 1 && images.length === 1)
327
+ return unlabelled[0];
328
+ if (depth >= 2)
329
+ return undefined;
330
+ for (const nested of descriptors.filter((d) => d.mediaType !== undefined && IMAGE_INDEX_TYPES.has(d.mediaType))) {
331
+ const inner = readJson(dir, blobPath(nested.digest));
332
+ const found = chooseManifest(dir, inner.manifests ?? [], depth + 1);
333
+ if (found !== undefined)
334
+ return found;
335
+ }
336
+ return undefined;
337
+ }
338
+ function blobPath(digest) {
339
+ const [algorithm, hex] = digest.split(":");
340
+ return `blobs/${algorithm}/${hex}`;
341
+ }
342
+ function readSmall(dir, name) {
343
+ const path = join(dir, name);
344
+ if (!existsSync(path)) {
345
+ throw new ImageUploadError(`the build's OCI layout holds no ${name}.`);
346
+ }
347
+ const size = statSync(path).size;
348
+ if (size > MAX_JSON_BYTES) {
349
+ throw new ImageUploadError(`the build's OCI layout holds a ${size}-byte ${name}, too large to read.`);
350
+ }
351
+ return readFileSync(path);
352
+ }
353
+ function readJson(dir, name) {
354
+ const bytes = readSmall(dir, name);
355
+ try {
356
+ return JSON.parse(bytes.toString("utf8"));
357
+ }
358
+ catch {
359
+ throw new ImageUploadError(`the build's OCI layout holds a ${name} that is not JSON.`);
360
+ }
361
+ }
362
+ async function createImage(name, layout, deps) {
363
+ const uploaded = [];
364
+ for (let attempt = 1;; attempt += 1) {
365
+ let missing;
366
+ try {
367
+ const image = await deps.images.createImage({ createImageRequest: { name, manifest: layout.manifest } });
368
+ return { image, uploaded };
369
+ }
370
+ catch (error) {
371
+ const api = await readApiError(error);
372
+ if (api?.code !== BLOBS_MISSING || attempt !== 1) {
373
+ throw keepingFiles(createFailure(name, layout, httpStatusOf(error), api, error), name, uploaded);
374
+ }
375
+ missing = missingDigestsOf(api);
376
+ }
377
+ try {
378
+ await uploadBlobs(name, missing, layout, deps, uploaded);
379
+ }
380
+ catch (error) {
381
+ throw keepingFiles(error, name, uploaded);
382
+ }
383
+ }
384
+ }
385
+ /** A failure after the first upload names the Files this run stored, which nothing else deletes. */
386
+ function keepingFiles(error, name, uploaded) {
387
+ const message = error instanceof Error ? error.message : String(error);
388
+ return new ImageUploadError(`${message}${keptFilesNote(name, uploaded)}`);
389
+ }
390
+ function missingDigestsOf(api) {
391
+ const listed = api.details?.missingDigests;
392
+ return Array.isArray(listed) ? listed.filter((digest) => typeof digest === "string") : [];
393
+ }
394
+ /**
395
+ * Adds to `created` the id of each File this call stores as it stores it, so a failure partway still knows
396
+ * them; a File that already held the bytes is left out.
397
+ */
398
+ async function uploadBlobs(name, digests, layout, deps, created) {
399
+ deps.io.out(`Uploading ${digests.length} blob(s) of image '${name}' that the platform does not hold...`);
400
+ for (const digest of digests) {
401
+ const descriptor = layout.blobs.get(digest);
402
+ const path = join(layout.dir, blobPath(digest));
403
+ if (descriptor === undefined || !existsSync(path)) {
404
+ throw new ImageUploadError(`the platform asked for blob ${digest} of image '${name}', which its OCI layout does not hold.`);
405
+ }
406
+ try {
407
+ const stored = await uploadFile(path, {
408
+ apis: { files: deps.files },
409
+ fetchApi: objectStoreFetch(deps.fetchApi),
410
+ io: deps.io,
411
+ filename: digest.replace(":", "-"),
412
+ ...(descriptor.mediaType !== undefined ? { contentType: descriptor.mediaType } : {}),
413
+ });
414
+ if (!stored.alreadyStored)
415
+ created.push(stored.fileId);
416
+ }
417
+ catch (error) {
418
+ const api = await readApiError(error);
419
+ throw new ImageUploadError(`blob ${digest} of image '${name}' (${descriptor.size} bytes) was not uploaded: ` +
420
+ `${api?.message ?? error.message}`);
421
+ }
422
+ }
423
+ }
424
+ function createFailure(name, layout, status, api, error) {
425
+ if (api?.code === BLOBS_MISSING) {
426
+ return new ImageUploadError(`the platform still holds no copy of blob(s) ${missingDigestsOf(api).join(", ")} of image '${name}' ` +
427
+ `after the upload.`);
428
+ }
429
+ if (api?.code === QUOTA_EXCEEDED && api.details?.dimension === IMAGE_COUNT_DIMENSION) {
430
+ return new ImageUploadError(`image '${name}' does not fit the organization's image count: it holds ${String(api.details?.current)} ` +
431
+ `of the ${String(api.details?.limit)} images its images.maxCount limit allows. Delete an image, or ask ` +
432
+ `for a higher limit.`);
433
+ }
434
+ if (api?.code === QUOTA_EXCEEDED) {
435
+ const layerBytes = [...layout.blobs.values()].reduce((sum, blob) => sum + blob.size, 0);
436
+ return new ImageUploadError(`image '${name}' does not fit the organization's image storage: the plan allows ` +
437
+ `${String(api.details?.limit)} bytes, ${String(api.details?.current)} bytes are in use, and this image ` +
438
+ `holds ${layerBytes} bytes, of which the runtime's own layers do not count.`);
439
+ }
440
+ return new ImageUploadError(`the platform refused image '${name}': ${describeFailure(status, api, error)}`);
441
+ }
442
+ /**
443
+ * A stopped image keeps the Files this run uploaded for it: the platform deletes no File, and a later run that
444
+ * finds the image already copying uploads nothing, so it has no File of its own to delete. The message names them.
445
+ */
446
+ async function waitUntilReady(image, uploaded, deps) {
447
+ const sleep = deps.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms)));
448
+ const now = deps.now ?? Date.now;
449
+ const deadline = now() + POLL_TIMEOUT_MS;
450
+ const kept = keptFilesNote(image.name, uploaded);
451
+ let current = image;
452
+ for (;;) {
453
+ if (current.status === "READY")
454
+ return current;
455
+ if (current.status === "FAILED") {
456
+ throw new ImageUploadError(`the platform could not copy image '${current.name}' (${current.digest}): ` +
457
+ `${current.failureReason ?? "no reason given"}` +
458
+ `${current.failureMessage !== undefined ? `: ${current.failureMessage}` : ""}.${kept}`);
459
+ }
460
+ if (now() >= deadline) {
461
+ throw new ImageUploadError(`image '${current.name}' (${current.digest}) is still ${current.status} after ` +
462
+ `${POLL_TIMEOUT_MS / 60_000} minutes. Run apply again to wait for it.${kept}`);
463
+ }
464
+ await sleep(POLL_INTERVAL_MS);
465
+ try {
466
+ current = await deps.images.getImage({ id: current.id });
467
+ }
468
+ catch (error) {
469
+ throw new ImageUploadError(`cannot read image '${current.name}': ` +
470
+ `${describeFailure(httpStatusOf(error), await readApiError(error), error)}.${kept}`);
471
+ }
472
+ }
473
+ }
474
+ function keptFilesNote(name, fileIds) {
475
+ if (fileIds.length === 0)
476
+ return "";
477
+ return (` The Files this apply uploaded for image '${name}' stay until you delete them: ${fileIds.join(", ")}. ` +
478
+ `Run 'orchestra files delete <id>' for each one.`);
479
+ }
480
+ function describeFailure(status, api, error) {
481
+ if (api !== undefined) {
482
+ return `${api.status ?? status ?? "no status"}${api.code !== undefined ? ` ${api.code}` : ""}: ${api.message}`;
483
+ }
484
+ return status !== undefined ? `HTTP ${status}` : error.message;
485
+ }
486
+ function lastLine(output) {
487
+ const lines = output.trim().split(/\r?\n/);
488
+ return lines[lines.length - 1] || "no output";
489
+ }
@@ -1,3 +1,4 @@
1
+ import type { PlanDocument } from "../../core/plan.js";
1
2
  import { type CliIo } from "../core/output.js";
2
3
  /** `dir` is a test seam — commander never supplies it; it defaults to `process.cwd()`. */
3
4
  export interface SynthCommandOptions {
@@ -11,3 +12,9 @@ export interface SynthCommandOptions {
11
12
  export declare function synthCommand(options?: SynthCommandOptions, io?: CliIo): Promise<void>;
12
13
  /** A missing or invalid file reads as zero triggers, so a summary line never fails the command. */
13
14
  export declare function describeTriggers(outDir: string): string;
15
+ /**
16
+ * A hosted image is built by the `orchestra-oci` builder, which pulls every base from a registry and never reads
17
+ * the local Docker image store, so a hosted image built on another hosted image of the same factory cannot
18
+ * build. An unreadable Dockerfile is left to the build to report.
19
+ */
20
+ export declare function hostedImageRefusals(plan: PlanDocument, appDir: string): string[];
@@ -1,7 +1,10 @@
1
1
  // Synth is local-only and touches no platform state, so the shared auth flags are accepted but unused.
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { join, resolve } from "node:path";
4
+ import { hostedImageName, isHostedImageTag } from "../../constructs/references.js";
4
5
  import { loadConfig, runFactoryForPlan } from "./config.js";
6
+ import { imageBuildSpecs } from "./docker.js";
7
+ import { imagesNamedBy } from "./image-upload.js";
5
8
  import { defaultIo, printWarnings } from "../core/output.js";
6
9
  /** The artifacts are written by the factory program's own beforeExit auto-synth, not by this handler. */
7
10
  export async function synthCommand(options = {}, io = defaultIo) {
@@ -9,6 +12,10 @@ export async function synthCommand(options = {}, io = defaultIo) {
9
12
  const effective = options.out !== undefined ? { ...config, outDir: options.out } : config;
10
13
  const result = await runFactoryForPlan(effective);
11
14
  printWarnings(result.warnings, io);
15
+ const refusals = hostedImageRefusals(result.plan, effective.cwd);
16
+ if (refusals.length > 0) {
17
+ throw new Error(refusals.join("\n"));
18
+ }
12
19
  const outDir = resolve(effective.cwd, effective.outDir);
13
20
  const triggerSuffix = describeTriggers(outDir);
14
21
  io.out(`Synthesized ${result.plan.resources.length} resource(s) and ${result.plan.imports.length} import(s)` +
@@ -27,3 +34,31 @@ export function describeTriggers(outDir) {
27
34
  return "";
28
35
  }
29
36
  }
37
+ /**
38
+ * A hosted image is built by the `orchestra-oci` builder, which pulls every base from a registry and never reads
39
+ * the local Docker image store, so a hosted image built on another hosted image of the same factory cannot
40
+ * build. An unreadable Dockerfile is left to the build to report.
41
+ */
42
+ export function hostedImageRefusals(plan, appDir) {
43
+ const hosted = imageBuildSpecs(plan).filter((spec) => isHostedImageTag(spec.ref));
44
+ const hostedByRef = new Map(hosted.map((spec) => [normalizedImageRef(spec.ref), spec.ref]));
45
+ const refusals = [];
46
+ for (const spec of hosted) {
47
+ for (const named of imagesNamedBy(spec, appDir)) {
48
+ const other = hostedByRef.get(normalizedImageRef(named.ref));
49
+ if (other === undefined || other === spec.ref)
50
+ continue;
51
+ refusals.push(`image '${spec.ref}' ${named.how} '${other}', another image this factory uploads as ` +
52
+ `'${hostedImageName(other)}'. The builder that uploads images cannot read an image that exists only ` +
53
+ `on this machine: build both in one Dockerfile, or give '${other}' a registry path.`);
54
+ }
55
+ }
56
+ return refusals;
57
+ }
58
+ /** Docker Hub's implicit `library/` path and `latest` tag, written out so two spellings of one image compare equal. */
59
+ function normalizedImageRef(ref) {
60
+ const bare = ref.replace(/^(?:docker\.io\/)?library\//, "").replace(/^docker\.io\//, "");
61
+ const lastSlash = bare.lastIndexOf("/");
62
+ const tagged = bare.includes("@") || bare.indexOf(":", lastSlash + 1) !== -1;
63
+ return tagged ? bare : `${bare}:latest`;
64
+ }
@@ -17,7 +17,7 @@ export type MachineRole = (typeof MACHINE_ROLES)[number];
17
17
  export declare const HARNESS_FAMILIES: readonly string[];
18
18
  /** The flags that answer the questions, alongside the sign-in's own. */
19
19
  export interface InterviewFlags extends AuthFlags {
20
- project?: string;
20
+ team?: string;
21
21
  role?: string;
22
22
  harness?: string;
23
23
  /** commander's `--no-browser` negation, passed through to the sign-in. */
@@ -45,7 +45,7 @@ export declare class InterviewInputError extends Error {
45
45
  constructor(message: string);
46
46
  }
47
47
  /**
48
- * Runs the questions in the accepted order — sign in, organization and project, role, harness families —
48
+ * Runs the questions in the accepted order — sign in, organization and team, role, harness families —
49
49
  * and records every answer in the profile. A question whose flag is set is not asked; a question that
50
50
  * cannot be asked because there is no terminal (or because `--yes` says the flags are the whole answer) is
51
51
  * an error naming its flag, unless not naming it has a defined meaning of its own.
@@ -56,9 +56,9 @@ export interface FirstRunGateDeps extends InterviewDeps {
56
56
  }
57
57
  /**
58
58
  * The pre-command gate: the interview runs on a machine where a person is present and nothing is
59
- * configured. A credential supplied by the environment — an exported token, or the marker the platform sets
60
- * on a machine where the egress stamps the authorization — skips the interview and nothing else, so a
61
- * command's own rules are untouched either way.
59
+ * configured. A credential supplied by the environment — an exported token, the token file the worker
60
+ * names, written yet or not, or the marker the platform sets on a machine where the egress stamps the
61
+ * authorization — skips the interview and nothing else, so a command's own rules are untouched either way.
62
62
  *
63
63
  * The terminal is checked first, so a run with no person to ask touches neither the disk nor the network.
64
64
  */
@@ -55,7 +55,7 @@ function parseHarnesses(declared) {
55
55
  .filter((name) => name !== "");
56
56
  }
57
57
  /**
58
- * Runs the questions in the accepted order — sign in, organization and project, role, harness families —
58
+ * Runs the questions in the accepted order — sign in, organization and team, role, harness families —
59
59
  * and records every answer in the profile. A question whose flag is set is not asked; a question that
60
60
  * cannot be asked because there is no terminal (or because `--yes` says the flags are the whole answer) is
61
61
  * an error naming its flag, unless not naming it has a defined meaning of its own.
@@ -73,7 +73,7 @@ export async function runFirstRunInterview(flags, deps = {}) {
73
73
  const declaredRole = parseRole(flags.role);
74
74
  if (declaredRole !== "image") {
75
75
  await signIn(flags, { env, io, askable, loadProfile, login: deps.login ?? loginCommand }, profileName);
76
- await recordProject(flags, { io, askable, ask, loadProfile, saveProfile }, profileName);
76
+ await recordTeam(flags, { io, askable, ask, loadProfile, saveProfile }, profileName);
77
77
  }
78
78
  const role = declaredRole ?? (await askRole({ io, askable, ask }));
79
79
  const harnesses = role === "laptop" ? [] : await resolveHarnesses(flags, { io, askable, ask });
@@ -113,22 +113,21 @@ async function signIn(flags, context, profileName) {
113
113
  }
114
114
  }
115
115
  /**
116
- * A project is a grouping inside the organization and not naming one is itself an answer — the
117
- * organization's shared commons — so an absent `--project` with no terminal is never an error.
116
+ * A team is a grouping inside the organization and not naming one is itself an answer, Shared, so an
117
+ * absent `--team` with no terminal is never an error.
118
118
  */
119
- async function recordProject(flags, context, profileName) {
120
- let projectId = firstPresent(flags.project);
121
- if (projectId === undefined && context.askable) {
122
- const answer = await context.ask("Which project should this machine's work belong to? Give an id or slug, or press Enter for the " +
123
- "organization's shared commons: ");
124
- projectId = answer === "" ? undefined : answer;
125
- }
126
- if (projectId === undefined) {
119
+ async function recordTeam(flags, context, profileName) {
120
+ let teamId = firstPresent(flags.team);
121
+ if (teamId === undefined && context.askable) {
122
+ const answer = await context.ask("Which team should this machine's work belong to? Give an id or slug, or press Enter for Shared: ");
123
+ teamId = answer === "" ? undefined : answer;
124
+ }
125
+ if (teamId === undefined) {
127
126
  return;
128
127
  }
129
128
  const stored = context.loadProfile(profileName);
130
129
  if (stored !== undefined) {
131
- context.saveProfile(profileName, { ...stored, projectId });
130
+ context.saveProfile(profileName, { ...stored, teamId });
132
131
  }
133
132
  }
134
133
  async function askRole(context) {
@@ -169,9 +168,9 @@ async function resolveHarnesses(flags, context) {
169
168
  }
170
169
  /**
171
170
  * The pre-command gate: the interview runs on a machine where a person is present and nothing is
172
- * configured. A credential supplied by the environment — an exported token, or the marker the platform sets
173
- * on a machine where the egress stamps the authorization — skips the interview and nothing else, so a
174
- * command's own rules are untouched either way.
171
+ * configured. A credential supplied by the environment — an exported token, the token file the worker
172
+ * names, written yet or not, or the marker the platform sets on a machine where the egress stamps the
173
+ * authorization — skips the interview and nothing else, so a command's own rules are untouched either way.
175
174
  *
176
175
  * The terminal is checked first, so a run with no person to ask touches neither the disk nor the network.
177
176
  */
@@ -180,7 +179,9 @@ export async function runFirstRunIfNeeded(flags, deps = {}) {
180
179
  if ((deps.isTTY ?? process.stdin.isTTY === true) !== true) {
181
180
  return;
182
181
  }
183
- if (firstPresent(env[AUTH_ENV.token]) !== undefined || firstPresent(env[AUTH_ENV.edgeInjected]) !== undefined) {
182
+ if (firstPresent(env[AUTH_ENV.token]) !== undefined ||
183
+ firstPresent(env[AUTH_ENV.tokenFile]) !== undefined ||
184
+ firstPresent(env[AUTH_ENV.edgeInjected]) !== undefined) {
184
185
  return;
185
186
  }
186
187
  const loadProfile = deps.loadProfile ?? loadProfileFromDisk;