@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.
- package/README.md +1 -1
- package/dist/artifacts/prelude.js +10 -1
- package/dist/cli/api/execute.js +7 -7
- package/dist/cli/core/auth.d.ts +11 -1
- package/dist/cli/core/auth.js +48 -4
- package/dist/cli/core/errors.js +4 -0
- package/dist/cli/core/platform-client.d.ts +3 -2
- package/dist/cli/core/profile.d.ts +2 -2
- package/dist/cli/factory/apply-preview.d.ts +23 -6
- package/dist/cli/factory/apply-preview.js +70 -43
- package/dist/cli/factory/apply-render.js +12 -4
- package/dist/cli/factory/apply.d.ts +7 -2
- package/dist/cli/factory/apply.js +86 -29
- package/dist/cli/factory/diff.js +20 -12
- package/dist/cli/factory/image-upload.d.ts +90 -0
- package/dist/cli/factory/image-upload.js +489 -0
- package/dist/cli/factory/synth.d.ts +7 -0
- package/dist/cli/factory/synth.js +35 -0
- package/dist/cli/firstRun.d.ts +5 -5
- package/dist/cli/firstRun.js +18 -17
- package/dist/cli/main.d.ts +1 -1
- package/dist/cli/main.js +4 -3
- package/dist/cli/upload.d.ts +3 -1
- package/dist/cli/upload.js +9 -2
- package/dist/constructs/agent.d.ts +9 -1
- package/dist/constructs/agent.js +7 -0
- package/dist/constructs/compute-provider.js +2 -2
- package/dist/constructs/connection.d.ts +22 -16
- package/dist/constructs/connection.js +29 -92
- package/dist/constructs/connector.d.ts +3 -1
- package/dist/constructs/connector.js +2 -0
- package/dist/constructs/egress-preset.d.ts +7 -52
- package/dist/constructs/egress-preset.js +7 -91
- package/dist/constructs/environment.d.ts +47 -70
- package/dist/constructs/environment.js +103 -213
- package/dist/constructs/gateway-key.d.ts +4 -1
- package/dist/constructs/gateway-key.js +4 -3
- package/dist/constructs/interfaces.d.ts +10 -2
- package/dist/constructs/model-provider-key.js +2 -3
- package/dist/constructs/pipeline.d.ts +5 -2
- package/dist/constructs/pipeline.js +4 -0
- package/dist/constructs/references.d.ts +4 -0
- package/dist/constructs/references.js +20 -0
- package/dist/constructs/role.d.ts +32 -0
- package/dist/constructs/role.js +77 -0
- package/dist/constructs/rules.d.ts +4 -4
- package/dist/constructs/rules.js +3 -3
- package/dist/constructs/secret.d.ts +36 -13
- package/dist/constructs/secret.js +110 -14
- package/dist/constructs/service-account.d.ts +12 -0
- package/dist/constructs/service-account.js +23 -0
- package/dist/constructs/skill.d.ts +3 -1
- package/dist/constructs/skill.js +2 -0
- package/dist/constructs/team-membership.d.ts +43 -0
- package/dist/constructs/team-membership.js +59 -0
- package/dist/constructs/team.d.ts +40 -0
- package/dist/constructs/team.js +107 -0
- package/dist/constructs/trigger.d.ts +7 -4
- package/dist/constructs/trigger.js +4 -0
- package/dist/constructs/workflow.d.ts +1 -1
- package/dist/core/factory.d.ts +0 -7
- package/dist/core/factory.js +15 -53
- package/dist/core/gateway-key-recipe.js +23 -2
- package/dist/core/host-pattern.d.ts +5 -0
- package/dist/core/host-pattern.js +14 -0
- package/dist/core/labels.d.ts +1 -1
- package/dist/core/labels.js +1 -1
- package/dist/core/outbound-warning.d.ts +2 -2
- package/dist/core/outbound-warning.js +52 -41
- package/dist/core/plan.d.ts +14 -11
- package/dist/core/plan.js +12 -11
- package/dist/engine/apply-core.d.ts +71 -67
- package/dist/engine/apply-core.js +120 -95
- package/dist/engine/client.d.ts +12 -4
- package/dist/engine/client.js +8 -3
- package/dist/engine/compute-provider-reconcile.js +1 -1
- package/dist/engine/condition-references.d.ts +2 -2
- package/dist/engine/condition-references.js +6 -6
- package/dist/engine/connection-install-link-reconcile.d.ts +4 -3
- package/dist/engine/connection-install-link-reconcile.js +35 -28
- package/dist/engine/diff.d.ts +12 -14
- package/dist/engine/diff.js +247 -113
- package/dist/engine/gateway-key-reconcile.d.ts +12 -9
- package/dist/engine/gateway-key-reconcile.js +43 -36
- package/dist/engine/model-provider-key-reconcile.js +2 -2
- package/dist/engine/pipeline-reconcile.d.ts +8 -9
- package/dist/engine/pipeline-reconcile.js +14 -10
- package/dist/engine/reconcile.d.ts +7 -21
- package/dist/engine/reconcile.js +115 -215
- package/dist/engine/refusals.d.ts +14 -31
- package/dist/engine/refusals.js +32 -81
- package/dist/engine/role-membership-reconcile.d.ts +19 -0
- package/dist/engine/role-membership-reconcile.js +276 -0
- package/dist/engine/secrets-apply.d.ts +18 -4
- package/dist/engine/secrets-apply.js +39 -4
- package/dist/engine/trigger-reconcile.d.ts +22 -23
- package/dist/engine/trigger-reconcile.js +43 -65
- package/dist/engine/workflow-reconcile.d.ts +2 -2
- package/dist/engine/workflow-reconcile.js +5 -5
- package/dist/generated/cli-commands.json +15398 -11771
- package/dist/generated/cli-dispatch.d.ts +4 -3
- package/dist/generated/cli-dispatch.js +76 -62
- package/dist/index.d.ts +12 -7
- package/dist/index.js +5 -3
- package/dist/metrics/metric.d.ts +3 -3
- package/dist/metrics/metric.js +1 -1
- package/docs/REFERENCE.md +102 -95
- package/node_modules/@orchestraworks/client/dist/apis/AgentsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/AgentsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/ArtifactsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/ArtifactsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/ConnectionInstallLinksApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/ConnectionInstallLinksApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/ConnectionsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/ConnectionsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/EnvironmentsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/EnvironmentsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/FilesApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/FilesApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/ImagesApi.d.ts +88 -0
- package/node_modules/@orchestraworks/client/dist/apis/ImagesApi.js +239 -0
- package/node_modules/@orchestraworks/client/dist/apis/MetricsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/MetricsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/OrganizationsApi.d.ts +1 -15
- package/node_modules/@orchestraworks/client/dist/apis/OrganizationsApi.js +3 -49
- package/node_modules/@orchestraworks/client/dist/apis/PipelinesApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/PipelinesApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/ProviderConnectionIntentsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/ProviderConnectionIntentsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/SecretsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/SecretsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/SessionsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/SessionsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/SkillsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/SkillsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/TeamMembershipsApi.d.ts +96 -0
- package/node_modules/@orchestraworks/client/dist/apis/{GroupsApi.js → TeamMembershipsApi.js} +62 -59
- package/node_modules/@orchestraworks/client/dist/apis/TeamsApi.d.ts +93 -0
- package/node_modules/@orchestraworks/client/dist/apis/{ProjectsApi.js → TeamsApi.js} +55 -55
- package/node_modules/@orchestraworks/client/dist/apis/TriggersApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/TriggersApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/UsersApi.d.ts +0 -15
- package/node_modules/@orchestraworks/client/dist/apis/UsersApi.js +0 -49
- package/node_modules/@orchestraworks/client/dist/apis/VolumesApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/VolumesApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/WorkItemsApi.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/WorkItemsApi.js +4 -4
- package/node_modules/@orchestraworks/client/dist/apis/WorkflowsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/apis/WorkflowsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/apis/index.d.ts +3 -2
- package/node_modules/@orchestraworks/client/dist/apis/index.js +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/AgentsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/AgentsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/ArtifactsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/ArtifactsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionInstallLinksApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionInstallLinksApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/ConnectionsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/EnvironmentsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/EnvironmentsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/FilesApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/FilesApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/ImagesApi.d.ts +88 -0
- package/node_modules/@orchestraworks/client/dist/esm/apis/ImagesApi.js +235 -0
- package/node_modules/@orchestraworks/client/dist/esm/apis/MetricsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/MetricsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/OrganizationsApi.d.ts +1 -15
- package/node_modules/@orchestraworks/client/dist/esm/apis/OrganizationsApi.js +3 -49
- package/node_modules/@orchestraworks/client/dist/esm/apis/PipelinesApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/PipelinesApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/ProviderConnectionIntentsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/ProviderConnectionIntentsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/SecretsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/SecretsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/SessionsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/SessionsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/SkillsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/SkillsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/TeamMembershipsApi.d.ts +96 -0
- package/node_modules/@orchestraworks/client/dist/esm/apis/{GroupsApi.js → TeamMembershipsApi.js} +60 -57
- package/node_modules/@orchestraworks/client/dist/esm/apis/TeamsApi.d.ts +93 -0
- package/node_modules/@orchestraworks/client/dist/esm/apis/{ProjectsApi.js → TeamsApi.js} +53 -53
- package/node_modules/@orchestraworks/client/dist/esm/apis/TriggersApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/TriggersApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/UsersApi.d.ts +0 -15
- package/node_modules/@orchestraworks/client/dist/esm/apis/UsersApi.js +0 -49
- package/node_modules/@orchestraworks/client/dist/esm/apis/VolumesApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/VolumesApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/WorkItemsApi.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/WorkItemsApi.js +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/apis/WorkflowsApi.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/apis/WorkflowsApi.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/index.d.ts +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/apis/index.js +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/AddArtifactVersionRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Agent.d.ts +9 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/Agent.js +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ApiErrorDetail.d.ts +9 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/ApiErrorDetail.js +5 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Artifact.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Artifact.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ArtifactSummary.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ArtifactSummary.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/AssignAction.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/AssignAction.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/AssignWorkItemRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/AssignWorkItemRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ComputeProviderTarget.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/ComputeProviderTarget.js +2 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Connection.d.ts +16 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/Connection.js +8 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ConnectionInstallLink.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ConnectionInstallLink.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Connector.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Connector.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateAgentRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateAgentRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateArtifactRequest.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateArtifactRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionInstallLinkRequest.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionInstallLinkRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionRequest.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectionRequest.js +4 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectorRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateConnectorRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateDashboardRequest.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateDashboardRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateFileRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateFileRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateGatewayKeyRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateGatewayKeyRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateImageRequest.d.ts +38 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/{GroupMemberAgent.js → CreateImageRequest.js} +12 -16
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateMachineRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateMachineRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateMetricRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateMetricRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationInvitationRequest.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationInvitationRequest.js +3 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationMembershipRequest.d.ts +1 -8
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationMembershipRequest.js +0 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/CreatePipelineRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreatePipelineRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateProviderConnectionIntentRequest.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateProviderConnectionIntentRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateSecretRequest.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateSecretRequest.js +4 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateSessionRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateSessionRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateSkillRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateSkillRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamMembershipRequest.d.ts +65 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamMembershipRequest.js +61 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamRequest.d.ts +80 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateTeamRequest.js +64 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateTriggerRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateTriggerRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateVolumeRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateVolumeRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateWorkflowRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Dashboard.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Dashboard.js +6 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/DashboardChart.d.ts +45 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/DashboardChart.js +29 -5
- package/node_modules/@orchestraworks/client/dist/esm/models/DashboardChartQuery.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Delivery.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Delivery.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/EgressPolicyRule.d.ts +0 -13
- package/node_modules/@orchestraworks/client/dist/esm/models/EgressPolicyRule.js +0 -5
- package/node_modules/@orchestraworks/client/dist/esm/models/EntitlementTeamUsage.d.ts +58 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EntitlementTeamUsage.js +64 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Environment.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Environment.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentEgressPolicy.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/GatewayKey.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/GatewayKey.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Image.d.ts +113 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Image.js +91 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/InboundWebhookEdge.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/InboundWebhookEdge.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/InvitationTeamMembership.d.ts +44 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/InvitationTeamMembership.js +47 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/MachineEgressPolicyDiagnostics.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/MachineEgressRuleDiagnostics.d.ts +0 -6
- package/node_modules/@orchestraworks/client/dist/esm/models/MachineEgressRuleDiagnostics.js +0 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/MachineView.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/MachineView.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/MessageWorkItemRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Metric.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Metric.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/MetricValue.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/MetricValue.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ModelFile.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ModelFile.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationEntitlements.d.ts +7 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationEntitlements.js +5 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationInvitation.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationInvitation.js +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationMembership.d.ts +5 -5
- package/node_modules/@orchestraworks/client/dist/esm/models/OrganizationMembership.js +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/PageImage.d.ts +51 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/{PageProject.js → PageImage.js} +11 -11
- package/node_modules/@orchestraworks/client/dist/esm/models/PageTeam.d.ts +51 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/{PageGroupSummary.js → PageTeam.js} +11 -11
- package/node_modules/@orchestraworks/client/dist/esm/models/PageTeamMembership.d.ts +51 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/PageTeamMembership.js +56 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Pipeline.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Pipeline.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/PolicyAssignment.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/PolicyAssignment.js +4 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ProviderConnectionIntent.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ProviderConnectionIntent.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ReferenceSubject.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/ReferenceSubject.js +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Role.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Role.js +4 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Secret.d.ts +16 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/Secret.js +8 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/ServiceAccount.d.ts +7 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/ServiceAccount.js +1 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Session.d.ts +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Session.js +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/SessionSummary.d.ts +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/SessionSummary.js +3 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Skill.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Skill.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/SnapshotAnchor.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Team.d.ts +104 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/{GroupSummary.js → Team.js} +25 -15
- package/node_modules/@orchestraworks/client/dist/esm/models/TeamMembership.d.ts +83 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/TeamMembership.js +77 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Trigger.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Trigger.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/TriggerTarget.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateArtifactRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateConnectionRequest.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateConnectionRequest.js +2 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationInvitationRequest.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationInvitationRequest.js +3 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationMembershipRequest.d.ts +1 -8
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateOrganizationMembershipRequest.js +0 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateSecretRequest.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateSecretRequest.js +2 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamMembershipRequest.d.ts +47 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamMembershipRequest.js +51 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamRequest.d.ts +68 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateTeamRequest.js +58 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UserGrant.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/UserGrant.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Volume.d.ts +10 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/Volume.js +4 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemActivity.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemAssignment.d.ts +7 -7
- package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemAssignment.js +5 -5
- package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemDraftAssignment.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/WorkItemDraftAssignment.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Workflow.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/Workflow.js +2 -2
- package/node_modules/@orchestraworks/client/dist/esm/models/index.d.ts +13 -17
- package/node_modules/@orchestraworks/client/dist/esm/models/index.js +13 -17
- package/node_modules/@orchestraworks/client/dist/models/AddArtifactVersionRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/Agent.d.ts +9 -3
- package/node_modules/@orchestraworks/client/dist/models/Agent.js +3 -2
- package/node_modules/@orchestraworks/client/dist/models/ApiErrorDetail.d.ts +9 -1
- package/node_modules/@orchestraworks/client/dist/models/ApiErrorDetail.js +5 -1
- package/node_modules/@orchestraworks/client/dist/models/Artifact.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Artifact.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ArtifactSummary.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ArtifactSummary.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/AssignAction.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/AssignAction.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/AssignWorkItemRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/AssignWorkItemRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ComputeProviderTarget.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/models/ComputeProviderTarget.js +2 -0
- package/node_modules/@orchestraworks/client/dist/models/Connection.d.ts +16 -3
- package/node_modules/@orchestraworks/client/dist/models/Connection.js +8 -2
- package/node_modules/@orchestraworks/client/dist/models/ConnectionInstallLink.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ConnectionInstallLink.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Connector.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Connector.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateAgentRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateAgentRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateArtifactRequest.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/models/CreateArtifactRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateConnectionInstallLinkRequest.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/models/CreateConnectionInstallLinkRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateConnectionRequest.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateConnectionRequest.js +4 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateConnectorRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateConnectorRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateDashboardRequest.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/models/CreateDashboardRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateFileRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateFileRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateGatewayKeyRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateGatewayKeyRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateImageRequest.d.ts +38 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateImageRequest.js +54 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateMachineRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateMachineRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateMetricRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateMetricRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationInvitationRequest.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationInvitationRequest.js +3 -3
- package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationMembershipRequest.d.ts +1 -8
- package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationMembershipRequest.js +0 -3
- package/node_modules/@orchestraworks/client/dist/models/CreatePipelineRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreatePipelineRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateProviderConnectionIntentRequest.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/models/CreateProviderConnectionIntentRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateSecretRequest.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateSecretRequest.js +4 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateSessionRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateSessionRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateSkillRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateSkillRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateTeamMembershipRequest.d.ts +65 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateTeamMembershipRequest.js +69 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateTeamRequest.d.ts +80 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateTeamRequest.js +72 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateTriggerRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateTriggerRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateVolumeRequest.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateVolumeRequest.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/CreateWorkflowRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/Dashboard.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/models/Dashboard.js +6 -2
- package/node_modules/@orchestraworks/client/dist/models/DashboardChart.d.ts +45 -4
- package/node_modules/@orchestraworks/client/dist/models/DashboardChart.js +30 -6
- package/node_modules/@orchestraworks/client/dist/models/DashboardChartQuery.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/Delivery.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Delivery.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/EgressPolicyRule.d.ts +0 -13
- package/node_modules/@orchestraworks/client/dist/models/EgressPolicyRule.js +0 -5
- package/node_modules/@orchestraworks/client/dist/models/EntitlementTeamUsage.d.ts +58 -0
- package/node_modules/@orchestraworks/client/dist/models/EntitlementTeamUsage.js +72 -0
- package/node_modules/@orchestraworks/client/dist/models/Environment.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Environment.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentEgressPolicy.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/GatewayKey.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/GatewayKey.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Image.d.ts +113 -0
- package/node_modules/@orchestraworks/client/dist/models/Image.js +99 -0
- package/node_modules/@orchestraworks/client/dist/models/InboundWebhookEdge.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/InboundWebhookEdge.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/InvitationTeamMembership.d.ts +44 -0
- package/node_modules/@orchestraworks/client/dist/models/InvitationTeamMembership.js +54 -0
- package/node_modules/@orchestraworks/client/dist/models/MachineEgressPolicyDiagnostics.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/MachineEgressRuleDiagnostics.d.ts +0 -6
- package/node_modules/@orchestraworks/client/dist/models/MachineEgressRuleDiagnostics.js +0 -4
- package/node_modules/@orchestraworks/client/dist/models/MachineView.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/MachineView.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/MessageWorkItemRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/Metric.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Metric.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/MetricValue.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/MetricValue.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ModelFile.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ModelFile.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/OrganizationEntitlements.d.ts +7 -0
- package/node_modules/@orchestraworks/client/dist/models/OrganizationEntitlements.js +5 -0
- package/node_modules/@orchestraworks/client/dist/models/OrganizationInvitation.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/models/OrganizationInvitation.js +4 -4
- package/node_modules/@orchestraworks/client/dist/models/OrganizationMembership.d.ts +5 -5
- package/node_modules/@orchestraworks/client/dist/models/OrganizationMembership.js +4 -4
- package/node_modules/@orchestraworks/client/dist/models/PageImage.d.ts +51 -0
- package/node_modules/@orchestraworks/client/dist/models/{PageProject.js → PageImage.js} +16 -16
- package/node_modules/@orchestraworks/client/dist/models/PageTeam.d.ts +51 -0
- package/node_modules/@orchestraworks/client/dist/models/{PageGroupSummary.js → PageTeam.js} +16 -16
- package/node_modules/@orchestraworks/client/dist/models/PageTeamMembership.d.ts +51 -0
- package/node_modules/@orchestraworks/client/dist/models/PageTeamMembership.js +63 -0
- package/node_modules/@orchestraworks/client/dist/models/Pipeline.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Pipeline.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/PolicyAssignment.d.ts +8 -2
- package/node_modules/@orchestraworks/client/dist/models/PolicyAssignment.js +4 -2
- package/node_modules/@orchestraworks/client/dist/models/ProviderConnectionIntent.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ProviderConnectionIntent.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/ReferenceSubject.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/ReferenceSubject.js +1 -1
- package/node_modules/@orchestraworks/client/dist/models/Role.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/models/Role.js +4 -0
- package/node_modules/@orchestraworks/client/dist/models/Secret.d.ts +16 -3
- package/node_modules/@orchestraworks/client/dist/models/Secret.js +8 -2
- package/node_modules/@orchestraworks/client/dist/models/ServiceAccount.d.ts +7 -1
- package/node_modules/@orchestraworks/client/dist/models/ServiceAccount.js +1 -0
- package/node_modules/@orchestraworks/client/dist/models/Session.d.ts +3 -2
- package/node_modules/@orchestraworks/client/dist/models/Session.js +3 -2
- package/node_modules/@orchestraworks/client/dist/models/SessionSummary.d.ts +3 -2
- package/node_modules/@orchestraworks/client/dist/models/SessionSummary.js +3 -2
- package/node_modules/@orchestraworks/client/dist/models/Skill.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Skill.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/SnapshotAnchor.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/Team.d.ts +104 -0
- package/node_modules/@orchestraworks/client/dist/models/{GroupSummary.js → Team.js} +31 -21
- package/node_modules/@orchestraworks/client/dist/models/TeamMembership.d.ts +83 -0
- package/node_modules/@orchestraworks/client/dist/models/TeamMembership.js +85 -0
- package/node_modules/@orchestraworks/client/dist/models/Trigger.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Trigger.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/TriggerTarget.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/UpdateArtifactRequest.d.ts +1 -1
- package/node_modules/@orchestraworks/client/dist/models/UpdateConnectionRequest.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateConnectionRequest.js +2 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationInvitationRequest.d.ts +4 -4
- package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationInvitationRequest.js +3 -3
- package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationMembershipRequest.d.ts +1 -8
- package/node_modules/@orchestraworks/client/dist/models/UpdateOrganizationMembershipRequest.js +0 -3
- package/node_modules/@orchestraworks/client/dist/models/UpdateSecretRequest.d.ts +6 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateSecretRequest.js +2 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateTeamMembershipRequest.d.ts +47 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateTeamMembershipRequest.js +59 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateTeamRequest.d.ts +68 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateTeamRequest.js +66 -0
- package/node_modules/@orchestraworks/client/dist/models/UserGrant.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/UserGrant.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Volume.d.ts +10 -3
- package/node_modules/@orchestraworks/client/dist/models/Volume.js +4 -2
- package/node_modules/@orchestraworks/client/dist/models/WorkItemActivity.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/WorkItemAssignment.d.ts +7 -7
- package/node_modules/@orchestraworks/client/dist/models/WorkItemAssignment.js +5 -5
- package/node_modules/@orchestraworks/client/dist/models/WorkItemDraftAssignment.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/WorkItemDraftAssignment.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Workflow.d.ts +2 -2
- package/node_modules/@orchestraworks/client/dist/models/Workflow.js +2 -2
- package/node_modules/@orchestraworks/client/dist/models/index.d.ts +13 -17
- package/node_modules/@orchestraworks/client/dist/models/index.js +13 -17
- package/node_modules/@orchestraworks/client/package.json +1 -1
- package/package.json +4 -4
- package/skills/orchestra/SKILL.md +82 -67
- package/skills/orchestra-fdk/references/authoring.md +83 -45
- package/skills/orchestra-fdk/references/environment.md +214 -33
- package/skills/orchestra-fdk/references/troubleshooting.md +10 -8
- package/templates/bug-fix/main.ts +6 -1
- package/templates/engineering-team/README.md +10 -7
- package/templates/engineering-team/agents/engineer-agent.md +38 -16
- package/templates/engineering-team/lib/environment.ts +15 -3
- package/templates/engineering-team/main.ts +1 -1
- package/templates/todo-factory/main.ts +6 -1
- package/dist/constructs/project.d.ts +0 -33
- package/dist/constructs/project.js +0 -82
- package/node_modules/@orchestraworks/client/dist/apis/GroupsApi.d.ts +0 -95
- package/node_modules/@orchestraworks/client/dist/apis/ProjectsApi.d.ts +0 -93
- package/node_modules/@orchestraworks/client/dist/esm/apis/GroupsApi.d.ts +0 -95
- package/node_modules/@orchestraworks/client/dist/esm/apis/ProjectsApi.d.ts +0 -93
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateGroupRequest.d.ts +0 -82
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateGroupRequest.js +0 -74
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationRequest.d.ts +0 -53
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateOrganizationRequest.js +0 -50
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateProjectRequest.d.ts +0 -52
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateProjectRequest.js +0 -49
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateUserRequest.d.ts +0 -46
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateUserRequest.js +0 -47
- package/node_modules/@orchestraworks/client/dist/esm/models/CredentialBinding.d.ts +0 -57
- package/node_modules/@orchestraworks/client/dist/esm/models/CredentialBinding.js +0 -50
- package/node_modules/@orchestraworks/client/dist/esm/models/Group.d.ts +0 -106
- package/node_modules/@orchestraworks/client/dist/esm/models/Group.js +0 -92
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMember.d.ts +0 -40
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMember.js +0 -45
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberAgent.d.ts +0 -44
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberReference.d.ts +0 -38
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberReference.js +0 -43
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberUser.d.ts +0 -38
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupMemberUser.js +0 -45
- package/node_modules/@orchestraworks/client/dist/esm/models/GroupSummary.d.ts +0 -86
- package/node_modules/@orchestraworks/client/dist/esm/models/PageGroupSummary.d.ts +0 -51
- package/node_modules/@orchestraworks/client/dist/esm/models/PageProject.d.ts +0 -51
- package/node_modules/@orchestraworks/client/dist/esm/models/Project.d.ts +0 -76
- package/node_modules/@orchestraworks/client/dist/esm/models/Project.js +0 -69
- package/node_modules/@orchestraworks/client/dist/esm/models/RoleAssignment.d.ts +0 -38
- package/node_modules/@orchestraworks/client/dist/esm/models/RoleAssignment.js +0 -45
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateGroupRequest.d.ts +0 -70
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateGroupRequest.js +0 -60
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateProjectRequest.d.ts +0 -46
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateProjectRequest.js +0 -45
- package/node_modules/@orchestraworks/client/dist/models/CreateGroupRequest.d.ts +0 -82
- package/node_modules/@orchestraworks/client/dist/models/CreateGroupRequest.js +0 -82
- package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationRequest.d.ts +0 -53
- package/node_modules/@orchestraworks/client/dist/models/CreateOrganizationRequest.js +0 -57
- package/node_modules/@orchestraworks/client/dist/models/CreateProjectRequest.d.ts +0 -52
- package/node_modules/@orchestraworks/client/dist/models/CreateProjectRequest.js +0 -56
- package/node_modules/@orchestraworks/client/dist/models/CreateUserRequest.d.ts +0 -46
- package/node_modules/@orchestraworks/client/dist/models/CreateUserRequest.js +0 -54
- package/node_modules/@orchestraworks/client/dist/models/CredentialBinding.d.ts +0 -57
- package/node_modules/@orchestraworks/client/dist/models/CredentialBinding.js +0 -57
- package/node_modules/@orchestraworks/client/dist/models/Group.d.ts +0 -106
- package/node_modules/@orchestraworks/client/dist/models/Group.js +0 -100
- package/node_modules/@orchestraworks/client/dist/models/GroupMember.d.ts +0 -40
- package/node_modules/@orchestraworks/client/dist/models/GroupMember.js +0 -52
- package/node_modules/@orchestraworks/client/dist/models/GroupMemberAgent.d.ts +0 -44
- package/node_modules/@orchestraworks/client/dist/models/GroupMemberAgent.js +0 -58
- package/node_modules/@orchestraworks/client/dist/models/GroupMemberReference.d.ts +0 -38
- package/node_modules/@orchestraworks/client/dist/models/GroupMemberReference.js +0 -50
- package/node_modules/@orchestraworks/client/dist/models/GroupMemberUser.d.ts +0 -38
- package/node_modules/@orchestraworks/client/dist/models/GroupMemberUser.js +0 -52
- package/node_modules/@orchestraworks/client/dist/models/GroupSummary.d.ts +0 -86
- package/node_modules/@orchestraworks/client/dist/models/PageGroupSummary.d.ts +0 -51
- package/node_modules/@orchestraworks/client/dist/models/PageProject.d.ts +0 -51
- package/node_modules/@orchestraworks/client/dist/models/Project.d.ts +0 -76
- package/node_modules/@orchestraworks/client/dist/models/Project.js +0 -76
- package/node_modules/@orchestraworks/client/dist/models/RoleAssignment.d.ts +0 -38
- package/node_modules/@orchestraworks/client/dist/models/RoleAssignment.js +0 -52
- package/node_modules/@orchestraworks/client/dist/models/UpdateGroupRequest.d.ts +0 -70
- package/node_modules/@orchestraworks/client/dist/models/UpdateGroupRequest.js +0 -68
- package/node_modules/@orchestraworks/client/dist/models/UpdateProjectRequest.d.ts +0 -46
- package/node_modules/@orchestraworks/client/dist/models/UpdateProjectRequest.js +0 -52
package/dist/engine/reconcile.js
CHANGED
|
@@ -8,12 +8,13 @@ import { isEnvImportMarker, parseEnvImportMarker } from "../constructs/reference
|
|
|
8
8
|
import { isGatewayKeyRecipe } from "../core/gateway-key-recipe.js";
|
|
9
9
|
import { createLabels, labelsPatch, MANAGED_BY_LABEL_KEY, stampManagedBy } from "../core/labels.js";
|
|
10
10
|
import { isRefToken, parseRefToken, refToken } from "../core/tokens.js";
|
|
11
|
-
import { ApplyError, credentialValueWritten, defaultPrint,
|
|
11
|
+
import { ApplyError, credentialValueWritten, defaultPrint, createTeamResolver, describeTargetOrganization, failing, getBySlugOrUndefined, modelSettingsUnchanged, stampTeam, standbyCapacityUnchanged, subsetDeepEqual, } from "./apply-core.js";
|
|
12
12
|
import { preApprovalLevers, typedAtTerminalRemedy, } from "../cli/core/approval-policy.js";
|
|
13
|
-
import {
|
|
13
|
+
import { refuseIf, } from "./refusals.js";
|
|
14
14
|
import { assertSecretTransport } from "../cli/core/auth.js";
|
|
15
15
|
import { provenanceField } from "./provenance.js";
|
|
16
|
-
import { applyPipeline,
|
|
16
|
+
import { applyPipeline, teamIdOf } from "./pipeline-reconcile.js";
|
|
17
|
+
import { applyRole, applyTeam, applyTeamMemberships } from "./role-membership-reconcile.js";
|
|
17
18
|
import { decideGatewayKeys, gatewayKeyPendingWrites, writeGatewayKeys, } from "./gateway-key-reconcile.js";
|
|
18
19
|
import { applyComputeProvider } from "./compute-provider-reconcile.js";
|
|
19
20
|
import { decideModelProviderKeys, modelProviderKeyPendingWrites, writeModelProviderKeys, } from "./model-provider-key-reconcile.js";
|
|
@@ -21,7 +22,7 @@ import { applyCeremonyBackedConnection, isCeremonyBackedConnection, } from "./co
|
|
|
21
22
|
import { assertManagedChatConnectionForDesired } from "./connection-readiness.js";
|
|
22
23
|
import { removedConfigurationNotice } from "./connector-configuration.js";
|
|
23
24
|
import { PreflightError, PreflightRefusalError, readConnection, RedactedRefError, reservedProviderSecretIds, resolveSecretRef, validateConnectionImport, validateRefShape, } from "./preflight.js";
|
|
24
|
-
import { allRootSourceLabels, commandLineOccurrencesFor, containsCommandLineRecipe, decideSecretWrite, metadataInjectionChange, pendingSecretWrite, reconcileInjection, replacesLiveCredentialValue, resolveSecretValueSource, } from "./secrets-apply.js";
|
|
25
|
+
import { allRootSourceLabels, commandLineOccurrencesFor, containsCommandLineRecipe, declaredSecretHosts, decideSecretWrite, metadataHostsChange, metadataInjectionChange, pendingSecretWrite, reconcileInjection, replacesLiveCredentialValue, resolveSecretValueSource, } from "./secrets-apply.js";
|
|
25
26
|
import { collectCommandLineValues, } from "./command-line-values.js";
|
|
26
27
|
// These live in the leaf module `engine/apply-core.ts` so the per-kind reconcile lanes can share them
|
|
27
28
|
// without importing this monolith, which imports THEM — a cycle. Re-exported here so `engine/reconcile`
|
|
@@ -59,29 +60,10 @@ function resolveManagedToken(token, applied) {
|
|
|
59
60
|
}
|
|
60
61
|
return id;
|
|
61
62
|
}
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
const live = await getBySlugOrUndefined(() => apis.projects.getProject({ id: ref }));
|
|
68
|
-
if (live === undefined) {
|
|
69
|
-
throw new PreflightError(`project import '${ref}' was not found in this organization (import 404). Create it or fix the reference.`);
|
|
70
|
-
}
|
|
71
|
-
return live.id;
|
|
72
|
-
}
|
|
73
|
-
/** Synth already stamped every body symbolically, so this is a pure in-place resolve. */
|
|
74
|
-
function stampBodyProject(body, projectId) {
|
|
75
|
-
if (projectId !== undefined) {
|
|
76
|
-
body.projectId = projectId;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Carries NO `env`: the project-identity arm reads none, and supplying one would claim this lane holds
|
|
81
|
-
* credential-source evidence it does not have.
|
|
82
|
-
*/
|
|
83
|
-
function projectCtx(live, project) {
|
|
84
|
-
return { project, ...(live !== undefined ? { live } : {}) };
|
|
63
|
+
/** Carries no `env`: the team arm reads none, and supplying one would claim evidence this lane does not hold. */
|
|
64
|
+
async function teamCtx(teams, live, declared, resource, outcomes) {
|
|
65
|
+
const team = await teams.judged(declared, live, { kind: resource.kind, slug: resource.slug, op: "get" }, outcomes);
|
|
66
|
+
return { ...(team !== undefined ? { team } : {}), ...(live !== undefined ? { live } : {}) };
|
|
85
67
|
}
|
|
86
68
|
/**
|
|
87
69
|
* Reads memoize by the EFFECTIVE id/slug value, so direct and env-backed handles resolving to the same value
|
|
@@ -146,24 +128,24 @@ export class ConnectionResolutionContext {
|
|
|
146
128
|
* return shape, so every existing `ApplyOutcome[]`-returning caller is untouched; the workflow phase reuses
|
|
147
129
|
* the map it fills to resolve each agent assignment through the identical machinery.
|
|
148
130
|
*/
|
|
149
|
-
export async function reconcile(plan, apis, opts, appliedOut
|
|
131
|
+
export async function reconcile(plan, apis, opts, appliedOut) {
|
|
150
132
|
const outcomes = [];
|
|
151
133
|
const applied = appliedOut ?? new Map();
|
|
134
|
+
const teams = opts.teams ?? createTeamResolver(apis, applied);
|
|
152
135
|
const env = opts.env ?? process.env;
|
|
153
136
|
const connections = opts.connectionResolution ?? new ConnectionResolutionContext(apis, plan.imports, applied, env);
|
|
154
137
|
let reservedCache;
|
|
155
138
|
const reserved = async () => (reservedCache ??= await reservedProviderSecretIds(apis));
|
|
156
139
|
try {
|
|
157
140
|
const secrets = plan.resources.filter((r) => r.kind === "secret");
|
|
158
|
-
// (0)
|
|
159
|
-
//
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const desiredProject = desiredProjectOf(projectId);
|
|
141
|
+
// (0) Teams and roles FIRST: every team-able row resolves its team against them, secrets included, and
|
|
142
|
+
// a team-membership row names a custom role.
|
|
143
|
+
for (const resource of plan.resources) {
|
|
144
|
+
if (resource.kind === "team")
|
|
145
|
+
await applyTeam(resource, apis, outcomes, applied, teams);
|
|
146
|
+
if (resource.kind === "role")
|
|
147
|
+
await applyRole(resource, apis, outcomes, applied);
|
|
148
|
+
}
|
|
167
149
|
// (1) Transport guard BEFORE any API call. A pending write is knowable from env alone; a `gateway-key`
|
|
168
150
|
// or `model-provider-key` resource is not, so the PRESENCE of either kind is the check — a
|
|
169
151
|
// credential-bearing exchange will happen and neither credential is visible in the environment.
|
|
@@ -176,15 +158,16 @@ export async function reconcile(plan, apis, opts, appliedOut, projectOut) {
|
|
|
176
158
|
// (2a) The two credential kinds DECIDE: reads only, raising the named refusals for the states no write
|
|
177
159
|
// can fix. Both run before the secret phase so their value-free rows join the ONE consolidated
|
|
178
160
|
// confirmation below, and a refused pair is therefore never approved.
|
|
179
|
-
const gatewayKeys = await decideGatewayKeys(plan, apis, outcomes,
|
|
161
|
+
const gatewayKeys = await decideGatewayKeys(plan, apis, outcomes, teams);
|
|
180
162
|
const modelProviderKeys = await decideModelProviderKeys(plan, apis, env, outcomes);
|
|
181
163
|
// (2) Secrets: decide (reads only) → ONE confirm → the gated writes, so the consolidated prompt sees
|
|
182
164
|
// every pending write. The gateway-key and BYOK write phases run inside, right after that confirm.
|
|
183
|
-
await applySecrets(plan, apis, opts, env, outcomes, applied,
|
|
165
|
+
await applySecrets(plan, apis, opts, env, outcomes, applied, teams, gatewayKeys, modelProviderKeys);
|
|
184
166
|
// (3) The rest, in plan (topo) order.
|
|
185
167
|
for (const resource of plan.resources) {
|
|
186
168
|
switch (resource.kind) {
|
|
187
|
-
case "
|
|
169
|
+
case "team":
|
|
170
|
+
case "role":
|
|
188
171
|
break; // handled in (0)
|
|
189
172
|
case "gateway-key":
|
|
190
173
|
break; // handled in (2a)/(2)
|
|
@@ -193,33 +176,35 @@ export async function reconcile(plan, apis, opts, appliedOut, projectOut) {
|
|
|
193
176
|
case "secret":
|
|
194
177
|
break; // handled in (2)
|
|
195
178
|
case "connector":
|
|
196
|
-
await applyConnector(resource, apis, outcomes, applied,
|
|
179
|
+
await applyConnector(resource, apis, outcomes, applied, teams, opts.notices);
|
|
197
180
|
break;
|
|
198
181
|
case "connection":
|
|
199
|
-
await applyConnection(resource, apis, outcomes, applied, connections,
|
|
182
|
+
await applyConnection(resource, apis, outcomes, applied, connections, teams, opts);
|
|
200
183
|
break;
|
|
201
184
|
case "compute-provider":
|
|
202
185
|
await applyComputeProvider(resource, apis, outcomes, applied, opts.onComputeProviderKey);
|
|
203
186
|
break;
|
|
204
187
|
case "environment":
|
|
205
|
-
await applyEnvironment(resource, apis, outcomes, applied, reserved,
|
|
188
|
+
await applyEnvironment(resource, apis, outcomes, applied, reserved, teams);
|
|
206
189
|
break;
|
|
207
190
|
case "skill":
|
|
208
|
-
await applySkill(resource, apis, outcomes, applied,
|
|
191
|
+
await applySkill(resource, apis, outcomes, applied, teams);
|
|
209
192
|
break;
|
|
210
193
|
case "agent":
|
|
211
|
-
await applyAgent(resource, apis, outcomes, applied,
|
|
194
|
+
await applyAgent(resource, apis, outcomes, applied, teams, plan.factory, opts.provenance);
|
|
212
195
|
break;
|
|
213
196
|
case "pipeline":
|
|
214
197
|
await applyPipeline(resource, apis, outcomes, applied, {
|
|
215
|
-
|
|
216
|
-
desiredProject,
|
|
198
|
+
teams,
|
|
217
199
|
resolveAgentId: (ref) => resolveReferenceId(ref, "agent", applied, apis),
|
|
218
|
-
|
|
200
|
+
resolveTeamId: (ref) => teamIdOf(apis, ref),
|
|
219
201
|
...(opts.notices !== undefined ? { notices: opts.notices } : {}),
|
|
220
202
|
pending: opts.pendingPipelineWrites ?? [],
|
|
221
203
|
});
|
|
222
204
|
break;
|
|
205
|
+
case "team-membership":
|
|
206
|
+
await applyTeamMemberships(resource, apis, outcomes, applied, teams);
|
|
207
|
+
break;
|
|
223
208
|
case "workflow":
|
|
224
209
|
break; // its own phase, after the plan kinds
|
|
225
210
|
default:
|
|
@@ -243,55 +228,6 @@ export async function reconcile(plan, apis, opts, appliedOut, projectOut) {
|
|
|
243
228
|
throw new ApplyError(error?.message ?? String(error), [...outcomes], { cause: error });
|
|
244
229
|
}
|
|
245
230
|
}
|
|
246
|
-
/** `undefined` for a commons factory — nothing is stamped, and every body omits `projectId` entirely. */
|
|
247
|
-
async function resolveFactoryProjectId(plan, apis, outcomes, applied) {
|
|
248
|
-
const managed = plan.resources.find((r) => r.kind === "project");
|
|
249
|
-
if (managed !== undefined) {
|
|
250
|
-
return applyProject(managed, apis, outcomes, applied);
|
|
251
|
-
}
|
|
252
|
-
const imported = plan.imports.find((i) => i.kind === "project");
|
|
253
|
-
if (imported !== undefined) {
|
|
254
|
-
return resolveProjectReference(apis, imported.ref, applied);
|
|
255
|
-
}
|
|
256
|
-
return undefined;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* `name` and the declared labels are the orchestra-managed fields: a label key no apply declared, like the
|
|
260
|
-
* console-owned description, is never touched. No ownership marker is stamped on a project.
|
|
261
|
-
*/
|
|
262
|
-
async function applyProject(resource, apis, outcomes, applied) {
|
|
263
|
-
const payload = resource.payload;
|
|
264
|
-
const live = await failing(() => getBySlugOrUndefined(() => apis.projects.getProject({ id: resource.slug })), { kind: "project", slug: resource.slug, op: "get" }, outcomes);
|
|
265
|
-
let id;
|
|
266
|
-
let action;
|
|
267
|
-
if (live === undefined) {
|
|
268
|
-
const labels = createLabels(payload.labels);
|
|
269
|
-
const body = {
|
|
270
|
-
name: payload.name,
|
|
271
|
-
slug: resource.slug,
|
|
272
|
-
...(Object.keys(labels).length > 0 ? { labels } : {}),
|
|
273
|
-
};
|
|
274
|
-
const created = await failing(() => apis.projects.createProject({ createProjectRequest: body }), { kind: "project", slug: resource.slug, op: "create" }, outcomes);
|
|
275
|
-
id = created.id;
|
|
276
|
-
action = "created";
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
const labels = labelsPatch(payload.labels, live.labels);
|
|
280
|
-
if (subsetDeepEqual({ name: payload.name }, live) && labels === undefined) {
|
|
281
|
-
id = live.id;
|
|
282
|
-
action = "unchanged";
|
|
283
|
-
}
|
|
284
|
-
else {
|
|
285
|
-
const patch = { name: payload.name, ...(labels !== undefined ? { labels } : {}) };
|
|
286
|
-
const updated = await failing(() => apis.projects.updateProject({ id: live.id, updateProjectRequest: patch }), { kind: "project", slug: resource.slug, op: "update" }, outcomes);
|
|
287
|
-
id = updated.id;
|
|
288
|
-
action = "updated";
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
outcomes.push({ path: resource.path, kind: "project", slug: resource.slug, id, action });
|
|
292
|
-
applied.set(refToken("project", resource.path.split("/")), id);
|
|
293
|
-
return id;
|
|
294
|
-
}
|
|
295
231
|
// The remedy sentences a headless credential refusal offers come from the approval policy's own prose home,
|
|
296
232
|
// which is where every other surface that recommends a lever reads them from too. This module used to keep a
|
|
297
233
|
// second copy and the two had already drifted on word ORDER — a refusal recommending a lever spelled
|
|
@@ -398,7 +334,7 @@ function typedAtTerminalRows(modelProviderKeys, pendingSecrets) {
|
|
|
398
334
|
* decision loop below — its whole write protocol belongs to the gateway lane — and a DECLINED confirmation
|
|
399
335
|
* throws before any of the three write phases, leaving nothing stranded mid-protocol.
|
|
400
336
|
*/
|
|
401
|
-
async function applySecrets(plan, apis, opts, env, outcomes, applied,
|
|
337
|
+
async function applySecrets(plan, apis, opts, env, outcomes, applied, teams, gatewayKeys = [], modelProviderKeys = []) {
|
|
402
338
|
const secretPlans = [];
|
|
403
339
|
// Decision phase — reads only. No writes yet.
|
|
404
340
|
for (const resource of plan.resources) {
|
|
@@ -417,18 +353,7 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
417
353
|
// collection pass deliberately runs after the confirmation this decision feeds. Resolving it here would
|
|
418
354
|
// classify a real write as a no-op and it would never be collected.
|
|
419
355
|
const commandLinePending = containsCommandLineRecipe(resource.valueFrom);
|
|
420
|
-
|
|
421
|
-
// locally with no network read at all: otherwise a transient 401/5xx/offline `getSecret` would replace
|
|
422
|
-
// an actionable "your recipe is half-supplied" message with a transport error, for a declaration that
|
|
423
|
-
// never opted into the project axis. The `unset-source` arm needs to know whether the row EXISTS, so it
|
|
424
|
-
// is deliberately left to the full call after the read below — acting on it here would read "absent" off
|
|
425
|
-
// a row nobody has looked at and refuse a clean no-op.
|
|
426
|
-
if (projectId === undefined) {
|
|
427
|
-
const early = refusalOf("secret", resource, { env, project: desiredProject });
|
|
428
|
-
if (early?.code === "partially-supplied") {
|
|
429
|
-
throw refusalError(early, outcomes);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
356
|
+
const team = await teams.desired(resource.payload.teamId, { kind: "secret", slug, op: "get" }, outcomes);
|
|
432
357
|
const live = await failing(() => getBySlugOrUndefined(() => apis.secrets.getSecret({ id: slug })), {
|
|
433
358
|
kind: "secret",
|
|
434
359
|
slug,
|
|
@@ -440,23 +365,25 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
440
365
|
// outranks every other verdict, and `diff` reads the row unconditionally, so ordering it the other way
|
|
441
366
|
// made apply raise a bare `ApplyError` where `diff` reported `refused`.
|
|
442
367
|
//
|
|
443
|
-
// The classifier decides all three of this phase's refusals in one call, in that order: the
|
|
444
|
-
//
|
|
368
|
+
// The classifier decides all three of this phase's refusals in one call, in that order: the row in another
|
|
369
|
+
// team, then a composed recipe whose leaves are only PARTLY available (letting that fall through would
|
|
445
370
|
// resolve to `undefined`, read as "nothing supplied", and silently retain the stale live value), then a
|
|
446
371
|
// declared secret that is absent with nothing to write. Every leaf unset on an EXISTING secret is a clean
|
|
447
372
|
// no-op, none of the three. This lane DOES supply `env`, because two of those arms judge the credential
|
|
448
373
|
// SOURCE and the classifier gates them on holding an environment to judge against.
|
|
449
|
-
refuseIf(resource.kind, resource, { ...
|
|
374
|
+
refuseIf(resource.kind, resource, { ...(await teamCtx(teams, live, team, resource, outcomes)), env }, outcomes);
|
|
450
375
|
const resolvedValue = commandLinePending
|
|
451
376
|
? undefined
|
|
452
377
|
: resolveSecretValueSource(resource.valueFrom, env);
|
|
453
378
|
// Diffed against the live recipe so a value-less recipe edit still PATCHes instead of silently no-oping.
|
|
454
379
|
const desiredInjection = resource.payload.injection;
|
|
455
380
|
const injectionChange = metadataInjectionChange(desiredInjection, live?.injection);
|
|
381
|
+
const hostsChange = metadataHostsChange(declaredSecretHosts(resource.payload), live?.hosts);
|
|
456
382
|
const decision = decideSecretWrite(resolvedValue, live !== undefined, {
|
|
457
383
|
slug,
|
|
458
384
|
envName,
|
|
459
385
|
injectionChange,
|
|
386
|
+
hostsChange,
|
|
460
387
|
commandLinePending,
|
|
461
388
|
});
|
|
462
389
|
if (decision.kind === "skip-empty") {
|
|
@@ -468,6 +395,7 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
468
395
|
resource,
|
|
469
396
|
slug,
|
|
470
397
|
decision,
|
|
398
|
+
team,
|
|
471
399
|
value: resolvedValue,
|
|
472
400
|
id: live?.id,
|
|
473
401
|
liveInjection: live?.injection,
|
|
@@ -545,16 +473,19 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
545
473
|
// writes, because its paired Secret is a secret write the author just approved, and because a declined
|
|
546
474
|
// confirmation must strand nothing — no mint has happened at this point.
|
|
547
475
|
if (gatewayKeys.length > 0) {
|
|
548
|
-
await writeGatewayKeys(gatewayKeys, apis, outcomes, applied,
|
|
476
|
+
await writeGatewayKeys(gatewayKeys, apis, outcomes, applied, plan.factory);
|
|
549
477
|
}
|
|
550
|
-
// No
|
|
478
|
+
// No team is threaded: a BYOK row is organization-wide and has none.
|
|
551
479
|
if (modelProviderKeys.length > 0) {
|
|
552
480
|
await writeModelProviderKeys(modelProviderKeys, apis, env, outcomes, applied, commandLineValues, plan.factory);
|
|
553
481
|
}
|
|
554
482
|
// Write phase — creates and overwrites, in plan order.
|
|
555
483
|
for (const p of secretPlans) {
|
|
556
484
|
const desiredInjection = p.resource.payload.injection;
|
|
485
|
+
const desiredHosts = declaredSecretHosts(p.resource.payload);
|
|
557
486
|
if (p.decision.kind === "create") {
|
|
487
|
+
const placement = {};
|
|
488
|
+
stampTeam(placement, p.team);
|
|
558
489
|
const body = {
|
|
559
490
|
name: p.resource.payload.name,
|
|
560
491
|
slug: p.slug,
|
|
@@ -562,11 +493,12 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
562
493
|
value: p.value,
|
|
563
494
|
// The ordinary `Secret` construct declares no labels, so the map holds exactly the ownership marker.
|
|
564
495
|
labels: stampManagedBy(undefined, plan.factory),
|
|
565
|
-
// CREATE is the one moment a
|
|
566
|
-
//
|
|
567
|
-
...
|
|
496
|
+
// CREATE is the one moment a team is chosen. No update body carries it: once this row exists, its
|
|
497
|
+
// team is its identity.
|
|
498
|
+
...placement,
|
|
568
499
|
// Live is absent, so never a `null` clear here.
|
|
569
500
|
...(desiredInjection !== undefined ? { injection: desiredInjection } : {}),
|
|
501
|
+
...(desiredHosts !== undefined ? { hosts: desiredHosts } : {}),
|
|
570
502
|
};
|
|
571
503
|
const created = await failing(() => apis.secrets.createSecret({ createSecretRequest: body }), { kind: "secret", slug: p.slug, op: "create" }, outcomes);
|
|
572
504
|
p.id = created.id;
|
|
@@ -574,23 +506,27 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
574
506
|
else if (p.decision.kind === "overwrite") {
|
|
575
507
|
// An explicit `null` clears a live recipe the construct dropped while rotating the value.
|
|
576
508
|
const injection = reconcileInjection(desiredInjection, p.liveInjection);
|
|
577
|
-
// No
|
|
578
|
-
//
|
|
509
|
+
// No team: the decision phase proved the live team equals the declared one, so re-sending it would say
|
|
510
|
+
// nothing — and sending a different one would be a silent move.
|
|
579
511
|
const body = {
|
|
580
512
|
name: p.resource.payload.name,
|
|
581
513
|
description: p.resource.payload.description,
|
|
582
514
|
value: p.value,
|
|
583
515
|
...(injection !== undefined ? { injection } : {}),
|
|
516
|
+
...(desiredHosts !== undefined ? { hosts: desiredHosts } : {}),
|
|
584
517
|
};
|
|
585
518
|
await failing(() => apis.secrets.updateSecret({ id: p.id, updateSecretRequest: body }), { kind: "secret", slug: p.slug, op: "update" }, outcomes);
|
|
586
519
|
}
|
|
587
520
|
else if (p.decision.kind === "metadata-update") {
|
|
588
|
-
// The secret exists with no fresh value but its recipe changed: a value-less PATCH carrying
|
|
589
|
-
//
|
|
590
|
-
const body = {
|
|
521
|
+
// The secret exists with no fresh value but its recipe or hosts changed: a value-less PATCH carrying
|
|
522
|
+
// only the changed fields.
|
|
523
|
+
const body = {
|
|
524
|
+
...(p.decision.injection !== undefined ? { injection: p.decision.injection } : {}),
|
|
525
|
+
...(p.decision.hosts !== undefined ? { hosts: p.decision.hosts } : {}),
|
|
526
|
+
};
|
|
591
527
|
await failing(() => apis.secrets.updateSecret({ id: p.id, updateSecretRequest: body }), { kind: "secret", slug: p.slug, op: "update" }, outcomes);
|
|
592
528
|
}
|
|
593
|
-
// There is deliberately no fourth branch: `noop-resolve` writes nothing, because a
|
|
529
|
+
// There is deliberately no fourth branch: `noop-resolve` writes nothing, because a team mismatch is
|
|
594
530
|
// refused in the decision phase and moving the row was the only job its PATCH ever had.
|
|
595
531
|
}
|
|
596
532
|
for (const p of secretPlans) {
|
|
@@ -621,9 +557,10 @@ async function applySecrets(plan, apis, opts, env, outcomes, applied, projectId,
|
|
|
621
557
|
* REQUIRED one that notice would be a dead end — the platform rejects a create missing a required field — so
|
|
622
558
|
* apply refuses by name and asks for the field to be declared.
|
|
623
559
|
*/
|
|
624
|
-
async function applyConnector(resource, apis, outcomes, applied,
|
|
560
|
+
async function applyConnector(resource, apis, outcomes, applied, teams, notices) {
|
|
625
561
|
const body = clonePayload(resource.payload);
|
|
626
|
-
|
|
562
|
+
const team = await teams.desired(body.teamId, { kind: "connector", slug: resource.slug, op: "get" }, outcomes);
|
|
563
|
+
stampTeam(body, team);
|
|
627
564
|
for (const field of CONNECTOR_SECRET_WIRE_FIELDS) {
|
|
628
565
|
const ref = body[field];
|
|
629
566
|
if (typeof ref === "string" && ref !== "") {
|
|
@@ -641,8 +578,8 @@ async function applyConnector(resource, apis, outcomes, applied, projectId, desi
|
|
|
641
578
|
else {
|
|
642
579
|
const liveRecord = live;
|
|
643
580
|
// Nothing may classify or write a newly readable row until the ONE aggregate classifier has cleared it:
|
|
644
|
-
//
|
|
645
|
-
refuseIf(resource.kind, resource, { ...
|
|
581
|
+
// team identity first, then immutable-field drift.
|
|
582
|
+
refuseIf(resource.kind, resource, { ...(await teamCtx(teams, live, team, resource, outcomes)), resolvedDesired: body }, outcomes);
|
|
646
583
|
// Set-only updates cannot clear a stored override, so a removed optional CONFIGURATION prop is a printed
|
|
647
584
|
// human step — recorded BEFORE the unchanged/patch fork, because it applies to both.
|
|
648
585
|
const notice = removedConfigurationNotice(body, liveRecord, resource);
|
|
@@ -653,12 +590,12 @@ async function applyConnector(resource, apis, outcomes, applied, projectId, desi
|
|
|
653
590
|
action = "unchanged";
|
|
654
591
|
}
|
|
655
592
|
else {
|
|
656
|
-
// `slug` is the reconcile key, the immutable fields were just proven equal, and `
|
|
657
|
-
//
|
|
658
|
-
//
|
|
593
|
+
// `slug` is the reconcile key, the immutable fields were just proven equal, and `teamId` is identity
|
|
594
|
+
// the guard above already proved equal — so the create body sheds it rather than carrying a field that
|
|
595
|
+
// could only restate the team or silently move the row.
|
|
659
596
|
const patch = stripKeys(body, [
|
|
660
597
|
"slug",
|
|
661
|
-
"
|
|
598
|
+
"teamId",
|
|
662
599
|
...connectorImmutableFields(body.providerKey),
|
|
663
600
|
]);
|
|
664
601
|
const updated = await failing(() => apis.connectors.updateConnector({ id: live.id, updateConnectorRequest: patch }), { kind: "connector", slug: resource.slug, op: "update" }, outcomes);
|
|
@@ -704,9 +641,10 @@ async function resolveConnectorReference(ref, applied, apis, resource, outcomes)
|
|
|
704
641
|
* not exist until a human installs the App. Every other connection — a GitHub App declaration supplying a
|
|
705
642
|
* real `installationId` included — keeps the direct GET → POST/PATCH path below, byte for byte.
|
|
706
643
|
*/
|
|
707
|
-
async function applyConnection(resource, apis, outcomes, applied, connections,
|
|
644
|
+
async function applyConnection(resource, apis, outcomes, applied, connections, teams, opts) {
|
|
708
645
|
const body = clonePayload(resource.payload);
|
|
709
|
-
|
|
646
|
+
const team = await teams.desired(body.teamId, { kind: "connection", slug: resource.slug, op: "get" }, outcomes);
|
|
647
|
+
stampTeam(body, team);
|
|
710
648
|
// OAuth / webhook-secret connections carry no `secretId`, so there is nothing to resolve.
|
|
711
649
|
const auth = body.auth;
|
|
712
650
|
if (auth !== undefined && typeof auth.secretId === "string" && auth.secretId !== "") {
|
|
@@ -715,10 +653,18 @@ async function applyConnection(resource, apis, outcomes, applied, connections, p
|
|
|
715
653
|
if (auth !== undefined && typeof auth.connectorId === "string" && auth.connectorId !== "") {
|
|
716
654
|
auth.connectorId = await resolveConnectorReference(auth.connectorId, applied, apis, resource, outcomes);
|
|
717
655
|
}
|
|
718
|
-
// Taken AFTER ref resolution and
|
|
656
|
+
// Taken AFTER ref resolution and team stamping, so the lane receives exactly the body this function
|
|
719
657
|
// would otherwise have sent. It records its own outcome and `applied` entry.
|
|
720
658
|
if (isCeremonyBackedConnection(body)) {
|
|
721
|
-
|
|
659
|
+
// An install link reports Shared's id, so the ceremony lane matches links against Shared read.
|
|
660
|
+
const ceremonyTeam = team?.state === "shared"
|
|
661
|
+
? {
|
|
662
|
+
state: "resolved",
|
|
663
|
+
teamId: (await teams.shared({ kind: "connection", slug: resource.slug, op: "get" }, outcomes)).id,
|
|
664
|
+
shared: true,
|
|
665
|
+
}
|
|
666
|
+
: team;
|
|
667
|
+
await applyCeremonyBackedConnection(resource, body, apis, outcomes, applied, installLinkOptions(opts), ceremonyTeam);
|
|
722
668
|
return;
|
|
723
669
|
}
|
|
724
670
|
const live = await failing(() => getBySlugOrUndefined(() => apis.connections.getConnection({ id: resource.slug })), { kind: "connection", slug: resource.slug, op: "get" }, outcomes);
|
|
@@ -726,7 +672,7 @@ async function applyConnection(resource, apis, outcomes, applied, connections, p
|
|
|
726
672
|
// then the create-only OAuth app selection. Both compare CANONICAL ids — the resolution above already
|
|
727
673
|
// turned a managed token or an imported slug into one — so a valid repeat apply is never falsely refused.
|
|
728
674
|
refuseIf(resource.kind, resource, {
|
|
729
|
-
...
|
|
675
|
+
...(await teamCtx(teams, live, team, resource, outcomes)),
|
|
730
676
|
resolvedDesired: { body, ceremonyBacked: false },
|
|
731
677
|
}, outcomes);
|
|
732
678
|
let id;
|
|
@@ -766,13 +712,13 @@ async function applyConnection(resource, apis, outcomes, applied, connections, p
|
|
|
766
712
|
observed = live;
|
|
767
713
|
}
|
|
768
714
|
else {
|
|
769
|
-
// `provider`/`slug` are create-only, `status` is server-owned, and `
|
|
715
|
+
// `provider`/`slug` are create-only, `status` is server-owned, and `teamId` is identity the guard
|
|
770
716
|
// above already proved equal — none of the four is sent on PATCH.
|
|
771
717
|
const patch = stripKeys(body, [
|
|
772
718
|
"slug",
|
|
773
719
|
"provider",
|
|
774
720
|
"status",
|
|
775
|
-
"
|
|
721
|
+
"teamId",
|
|
776
722
|
]);
|
|
777
723
|
observed = await failing(() => apis.connections.updateConnection({ id: live.id, updateConnectionRequest: patch }), { kind: "connection", slug: resource.slug, op: "update" }, outcomes);
|
|
778
724
|
id = observed.id;
|
|
@@ -861,7 +807,7 @@ export function connectionUnchanged(desired, live) {
|
|
|
861
807
|
}
|
|
862
808
|
return subsetDeepEqual(compare, live);
|
|
863
809
|
}
|
|
864
|
-
/** The connection OWNS this credential, so — unlike
|
|
810
|
+
/** The connection OWNS this credential, so — unlike a pull credential — it is not checked as reserved. */
|
|
865
811
|
async function resolveConnectionSecret(ref, applied, apis, resource, outcomes) {
|
|
866
812
|
if (isRefToken(ref)) {
|
|
867
813
|
return resolveManagedToken(ref, applied);
|
|
@@ -893,64 +839,11 @@ function connectionExpectFor(imports, ref) {
|
|
|
893
839
|
}
|
|
894
840
|
return { provider, install: Object.keys(install).length > 0 ? install : undefined };
|
|
895
841
|
}
|
|
896
|
-
|
|
897
|
-
export function credentialBindingArm(binding) {
|
|
898
|
-
if (typeof binding.connectionId === "string" && binding.connectionId !== "") {
|
|
899
|
-
return "connection";
|
|
900
|
-
}
|
|
901
|
-
return "secret";
|
|
902
|
-
}
|
|
903
|
-
async function applyEnvironment(resource, apis, outcomes, applied, reserved, connections, projectId, desiredProject) {
|
|
842
|
+
async function applyEnvironment(resource, apis, outcomes, applied, reserved, teams) {
|
|
904
843
|
const body = clonePayload(resource.payload);
|
|
905
|
-
|
|
844
|
+
const team = await teams.desired(body.teamId, { kind: "environment", slug: resource.slug, op: "get" }, outcomes);
|
|
845
|
+
stampTeam(body, team);
|
|
906
846
|
const envPath = resource.path;
|
|
907
|
-
/**
|
|
908
|
-
* BOTH binding rules — pairwise-distinct, then connection-owned — are rules over ONE GROUP in the
|
|
909
|
-
* aggregate classifier, rather than checks repeated inline wherever a secret ref can appear. The two
|
|
910
|
-
* groups stay SEPARATE: pairwise-distinct is about the egress bindings, and folding the pull credential
|
|
911
|
-
* into the same group would refuse an environment that legally binds one secret both ways.
|
|
912
|
-
*/
|
|
913
|
-
const refuseBoundSecrets = async (secretRefs) => {
|
|
914
|
-
if (secretRefs.length === 0)
|
|
915
|
-
return; // the scan is lazy: no binding, no read
|
|
916
|
-
refuseIf(resource.kind, resource, {
|
|
917
|
-
project: desiredProject,
|
|
918
|
-
resolvedDesired: { secretRefs },
|
|
919
|
-
reservedProviderSecretIds: await reserved(),
|
|
920
|
-
}, outcomes);
|
|
921
|
-
};
|
|
922
|
-
// Construct paths and rule labels are named on failure — never the reference value.
|
|
923
|
-
const boundSecrets = [];
|
|
924
|
-
const egress = body.egressPolicy;
|
|
925
|
-
for (const rule of egress?.rules ?? []) {
|
|
926
|
-
const bindings = rule.credentialBindings ?? [];
|
|
927
|
-
for (const binding of bindings) {
|
|
928
|
-
const arm = credentialBindingArm(binding);
|
|
929
|
-
if (arm === "connection") {
|
|
930
|
-
// Not a secret, so it contributes to neither distinctness rule: one connection may back many rules.
|
|
931
|
-
binding.connectionId = await connections.resolve(binding.connectionId);
|
|
932
|
-
continue;
|
|
933
|
-
}
|
|
934
|
-
const ref = binding.secretId;
|
|
935
|
-
// Derived by the ONE helper `diff` names the same binding with, so preview and apply cannot word one
|
|
936
|
-
// refusal two ways — which they did, preview building only the imported-literal shape.
|
|
937
|
-
const label = egressCredentialBindingLabel(envPath, rule.name, ref, binding.header);
|
|
938
|
-
let id;
|
|
939
|
-
if (isRefToken(ref)) {
|
|
940
|
-
id = resolveManagedToken(ref, applied);
|
|
941
|
-
}
|
|
942
|
-
else {
|
|
943
|
-
validateRefShape(ref, label);
|
|
944
|
-
// The connection-owned check is the classifier's (below), not this resolver's: one rule, one
|
|
945
|
-
// wording, reachable from `orchestra fdk diff` too. The 404/expiry live checks stay here.
|
|
946
|
-
id = (await resolveSecretRef(apis, { value: ref, sourceLabel: label })).id;
|
|
947
|
-
}
|
|
948
|
-
binding.secretId = id;
|
|
949
|
-
boundSecrets.push({ id, label });
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
// A connection-owned secret can back no egress credential binding, on either resolution path.
|
|
953
|
-
await refuseBoundSecrets(boundSecrets);
|
|
954
847
|
// A slug the platform stores canonically must be canonical BEFORE it is compared against the live row, or
|
|
955
848
|
// every apply of a slug-authored reference would read as a swap. The durable home is an ordinary `/home`
|
|
956
849
|
// entry in this same list, so it needs no second resolution path of its own.
|
|
@@ -983,10 +876,13 @@ async function applyEnvironment(resource, apis, outcomes, applied, reserved, con
|
|
|
983
876
|
validateRefShape(pullRef, label);
|
|
984
877
|
launchSpec.imagePullSecretId = (await resolveSecretRef(apis, { value: pullRef, sourceLabel: label })).id;
|
|
985
878
|
}
|
|
986
|
-
//
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
879
|
+
// A connection's own credential is not usable as a registry pull credential.
|
|
880
|
+
const secretRefs = [{ id: launchSpec.imagePullSecretId, label }];
|
|
881
|
+
refuseIf(resource.kind, resource, {
|
|
882
|
+
...(await teamCtx(teams, undefined, team, resource, outcomes)),
|
|
883
|
+
resolvedDesired: { secretRefs },
|
|
884
|
+
reservedProviderSecretIds: await reserved(),
|
|
885
|
+
}, outcomes);
|
|
990
886
|
}
|
|
991
887
|
// A declared record's token, or an imported slug, becomes the record's id; `null` stays, naming hosted
|
|
992
888
|
// compute.
|
|
@@ -995,8 +891,8 @@ async function applyEnvironment(resource, apis, outcomes, applied, reserved, con
|
|
|
995
891
|
launchSpec.computeProviderId = await resolveReferenceId(providerRef, "compute-provider", applied, apis);
|
|
996
892
|
}
|
|
997
893
|
const live = await failing(() => getBySlugOrUndefined(() => apis.environments.getEnvironment({ id: resource.slug })), { kind: "environment", slug: resource.slug, op: "get" }, outcomes);
|
|
998
|
-
//
|
|
999
|
-
refuseIf(resource.kind, resource,
|
|
894
|
+
// A team is identity: settle it before the no-change compare or the PATCH.
|
|
895
|
+
refuseIf(resource.kind, resource, await teamCtx(teams, live, team, resource, outcomes), outcomes);
|
|
1000
896
|
let id;
|
|
1001
897
|
let action;
|
|
1002
898
|
if (live === undefined) {
|
|
@@ -1009,10 +905,10 @@ async function applyEnvironment(resource, apis, outcomes, applied, reserved, con
|
|
|
1009
905
|
action = "unchanged";
|
|
1010
906
|
}
|
|
1011
907
|
else {
|
|
1012
|
-
// `slug` is the reconcile key; `
|
|
908
|
+
// `slug` is the reconcile key; `teamId` is identity, proven equal above — neither is sent. The
|
|
1013
909
|
// platform refuses any update carrying `platform.runtime`, and the refusal above has proven a declared
|
|
1014
910
|
// one equal to the live one.
|
|
1015
|
-
const patch = stripKeys(body, ["slug", "
|
|
911
|
+
const patch = stripKeys(body, ["slug", "teamId"]);
|
|
1016
912
|
if (typeof patch.platform === "object" && patch.platform !== null) {
|
|
1017
913
|
patch.platform = stripKeys(patch.platform, ["runtime"]);
|
|
1018
914
|
}
|
|
@@ -1082,7 +978,7 @@ function sortByPath(refs) {
|
|
|
1082
978
|
return [...refs].sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
|
|
1083
979
|
}
|
|
1084
980
|
/**
|
|
1085
|
-
* `
|
|
981
|
+
* `teamId` is deliberately NOT part of this compare: the refusal classifier already proved the live team
|
|
1086
982
|
* equals the declared one, so comparing it again could only produce a second, divergent opinion.
|
|
1087
983
|
*/
|
|
1088
984
|
function skillUnchanged(displayName, fileRefs, live) {
|
|
@@ -1092,12 +988,15 @@ function skillUnchanged(displayName, fileRefs, live) {
|
|
|
1092
988
|
}
|
|
1093
989
|
return subsetDeepEqual(desired, live);
|
|
1094
990
|
}
|
|
1095
|
-
async function applySkill(resource, apis, outcomes, applied,
|
|
991
|
+
async function applySkill(resource, apis, outcomes, applied, teams) {
|
|
1096
992
|
const payload = resource.payload;
|
|
993
|
+
const team = await teams.desired(payload.teamId, { kind: "skill", slug: resource.slug, op: "get" }, outcomes);
|
|
994
|
+
const placement = {};
|
|
995
|
+
stampTeam(placement, team);
|
|
1097
996
|
// READ AND CLASSIFY BEFORE ANY FILE POST: the uploads below mint immutable `files` rows, so running them
|
|
1098
997
|
// first would leave orphaned rows behind every refusal, for a declaration that never owned this skill.
|
|
1099
998
|
const live = await failing(() => getBySlugOrUndefined(() => apis.skills.getSkill({ id: resource.slug })), { kind: "skill", slug: resource.slug, op: "get" }, outcomes);
|
|
1100
|
-
refuseIf(resource.kind, resource,
|
|
999
|
+
refuseIf(resource.kind, resource, await teamCtx(teams, live, team, resource, outcomes), outcomes);
|
|
1101
1000
|
const fileRefs = await uploadContentFiles(payload.files, apis, { kind: "skill", slug: resource.slug }, outcomes);
|
|
1102
1001
|
let id;
|
|
1103
1002
|
let action;
|
|
@@ -1106,7 +1005,7 @@ async function applySkill(resource, apis, outcomes, applied, projectId, desiredP
|
|
|
1106
1005
|
slug: resource.slug,
|
|
1107
1006
|
files: fileRefs,
|
|
1108
1007
|
...(payload.displayName !== undefined ? { displayName: payload.displayName } : {}),
|
|
1109
|
-
...
|
|
1008
|
+
...placement,
|
|
1110
1009
|
};
|
|
1111
1010
|
const created = await failing(() => apis.skills.createSkill({ createSkillRequest: createBody }), { kind: "skill", slug: resource.slug, op: "create" }, outcomes);
|
|
1112
1011
|
id = created.id;
|
|
@@ -1117,8 +1016,8 @@ async function applySkill(resource, apis, outcomes, applied, projectId, desiredP
|
|
|
1117
1016
|
action = "unchanged";
|
|
1118
1017
|
}
|
|
1119
1018
|
else {
|
|
1120
|
-
// Whole-list `files` replacement plus the optional cosmetic `displayName`; no `
|
|
1121
|
-
//
|
|
1019
|
+
// Whole-list `files` replacement plus the optional cosmetic `displayName`; no `teamId`, because a
|
|
1020
|
+
// team is identity and never a move. A live displayName cannot be CLEARED by omission — the subset
|
|
1122
1021
|
// compare ignores live-only keys — an accepted cosmetic residual.
|
|
1123
1022
|
const patch = {
|
|
1124
1023
|
files: fileRefs,
|
|
@@ -1147,9 +1046,10 @@ export function agentUnchanged(desired, live) {
|
|
|
1147
1046
|
standbyCapacityUnchanged(desiredStandby, liveStandby) &&
|
|
1148
1047
|
subsetDeepEqual(desiredRest, { ...liveRest, skillIds: liveSkillIds }));
|
|
1149
1048
|
}
|
|
1150
|
-
async function applyAgent(resource, apis, outcomes, applied,
|
|
1049
|
+
async function applyAgent(resource, apis, outcomes, applied, teams, factory, provenance) {
|
|
1151
1050
|
const body = clonePayload(resource.payload);
|
|
1152
|
-
|
|
1051
|
+
const team = await teams.desired(body.teamId, { kind: "agent", slug: resource.slug, op: "get" }, outcomes);
|
|
1052
|
+
stampTeam(body, team);
|
|
1153
1053
|
// Compared and written apart from the body, because an update merges them into the live map: the stamp rides
|
|
1154
1054
|
// the patch too, which is what makes an ADOPTED agent missing the marker read as drift and get stamped.
|
|
1155
1055
|
const declaredLabels = body.labels;
|
|
@@ -1162,7 +1062,7 @@ async function applyAgent(resource, apis, outcomes, applied, projectId, desiredP
|
|
|
1162
1062
|
// READ AND CLASSIFY BEFORE ANY FILE POST, as the skill lane does: a refusal must leave no `files` rows
|
|
1163
1063
|
// behind. The reference resolution above is reads only, so it may stay where it is.
|
|
1164
1064
|
const live = await failing(() => getBySlugOrUndefined(() => apis.agents.getAgent({ id: resource.slug })), { kind: "agent", slug: resource.slug, op: "get" }, outcomes);
|
|
1165
|
-
refuseIf(resource.kind, resource,
|
|
1065
|
+
refuseIf(resource.kind, resource, await teamCtx(teams, live, team, resource, outcomes), outcomes);
|
|
1166
1066
|
body.memoryFiles = await uploadContentFiles(body.memoryFiles ?? [], apis, { kind: "agent", slug: resource.slug }, outcomes);
|
|
1167
1067
|
let id;
|
|
1168
1068
|
let action;
|
|
@@ -1186,11 +1086,11 @@ async function applyAgent(resource, apis, outcomes, applied, projectId, desiredP
|
|
|
1186
1086
|
}
|
|
1187
1087
|
else {
|
|
1188
1088
|
const labels = labelsPatch(declaredLabels, live.labels, managed);
|
|
1189
|
-
// `slug` and `harness` are create-only and `
|
|
1089
|
+
// `slug` and `harness` are create-only and `teamId` is identity the guard above proved equal.
|
|
1190
1090
|
// `UpdateAgentRequest` carries no `harness`, so the refusal above is what stops a declaration that moved
|
|
1191
1091
|
// it from silently reconciling forever.
|
|
1192
1092
|
const patch = {
|
|
1193
|
-
...stripKeys(body, ["slug", "
|
|
1093
|
+
...stripKeys(body, ["slug", "teamId", "harness"]),
|
|
1194
1094
|
...(labels !== undefined ? { labels } : {}),
|
|
1195
1095
|
...provenanceField(provenance),
|
|
1196
1096
|
};
|