@kici-dev/engine 0.1.26 → 0.1.27

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 (48) hide show
  1. package/dist/approval/types.d.ts +3 -3
  2. package/dist/approval/types.js +3 -3
  3. package/dist/audit/access-log-policy.js +12 -11
  4. package/dist/audit/retention-policy.js +24 -22
  5. package/dist/context/host-match.d.ts +25 -0
  6. package/dist/{environment → context}/host-match.js +1 -1
  7. package/dist/context/index.d.ts +6 -0
  8. package/dist/context/index.js +5 -0
  9. package/dist/context/multi-context.d.ts +30 -0
  10. package/dist/context/multi-context.js +38 -0
  11. package/dist/context/scope-resolver.d.ts +46 -0
  12. package/dist/{environment → context}/scope-resolver.js +6 -6
  13. package/dist/context/scope-template.d.ts +18 -0
  14. package/dist/{environment → context}/scope-template.js +1 -1
  15. package/dist/context/types.d.ts +119 -0
  16. package/dist/{environment → context}/types.js +3 -3
  17. package/dist/dev-ops/operations.d.ts +1 -1
  18. package/dist/dev-ops/operations.js +1 -1
  19. package/dist/env/environment-allowlist.d.ts +23 -0
  20. package/dist/env/environment-allowlist.js +35 -1
  21. package/dist/fanout/materialize.js +2 -2
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +8 -8
  24. package/dist/metrics/metric-catalog.generated.d.ts +15 -10
  25. package/dist/metrics/metric-catalog.generated.js +18 -12
  26. package/dist/protocol/dashboard-api-errors.d.ts +12 -0
  27. package/dist/protocol/dashboard-api-errors.js +13 -0
  28. package/dist/protocol/dashboard-write-operations.d.ts +22 -22
  29. package/dist/protocol/dashboard-write-operations.js +52 -52
  30. package/dist/protocol/messages/access-log.d.ts +65 -60
  31. package/dist/protocol/messages/access-log.js +13 -12
  32. package/dist/protocol/messages/agent-run-result.d.ts +2 -2
  33. package/dist/protocol/messages/agent-run-result.js +1 -1
  34. package/dist/protocol/messages/auth.d.ts +7 -7
  35. package/dist/protocol/messages/capabilities.d.ts +7 -7
  36. package/dist/protocol/messages/dashboard.d.ts +235 -233
  37. package/dist/protocol/messages/dashboard.js +191 -191
  38. package/dist/protocol/messages/execution-status.d.ts +9 -9
  39. package/dist/protocol/messages/execution-status.js +8 -8
  40. package/dist/protocol/messages/platform-orchestrator.d.ts +75 -74
  41. package/dist/protocol/session-policy.d.ts +20 -0
  42. package/dist/protocol/session-policy.js +25 -0
  43. package/dist/trigger/types.d.ts +7 -6
  44. package/dist/trigger/types.js +2 -1
  45. package/package.json +15 -7
  46. package/sbom.spdx.json +5 -5
  47. package/dist/environment/index.js +0 -5
  48. package/dist/environment/multi-env.js +0 -38
@@ -107,17 +107,17 @@ const dashboardJobDetailSchema = z.object({
107
107
  /** Labels used for agent routing (e.g. ["kici:os:linux", "kici:arch:x64"]). */
108
108
  runsOnLabels: z.array(z.string()).nullable().optional(),
109
109
  /**
110
- * Ordered bound deployment-environment names for this job, in merge order
111
- * (later environments override earlier on key collisions). A `(dynamic)`
110
+ * Ordered bound deployment-context names for this job, in merge order
111
+ * (later contexts override earlier on key collisions). A `(dynamic)`
112
112
  * entry marks an element resolved at runtime. null/absent = no binding.
113
113
  */
114
- environments: z.array(z.string()).nullable().optional(),
114
+ contexts: z.array(z.string()).nullable().optional(),
115
115
  /**
116
- * Bound environments skipped on a test/local run (non-test or unconfigured).
116
+ * Bound contexts skipped on a test/local run (non-test or unconfigured).
117
117
  * null/absent when nothing was skipped.
118
118
  */
119
- skippedEnvironments: z.array(z.string()).nullable().optional(),
120
- /** User-visible warning naming the skipped test-run environments. null/absent when none. */
119
+ skippedContexts: z.array(z.string()).nullable().optional(),
120
+ /** User-visible warning naming the skipped test-run contexts. null/absent when none. */
121
121
  envWarning: z.string().nullable().optional(),
122
122
  /** Aggregated step outputs (step-keyed map). Present when job completed successfully with outputs. */
123
123
  outputs: z.record(z.string(), z.record(z.string(), z.unknown())).nullable().optional(),
@@ -354,8 +354,8 @@ const dashboardRunSummarySchema = z.object({
354
354
  triggerEvent: z.string().optional(),
355
355
  commitMessage: z.string().optional(),
356
356
  jobCount: z.number().optional(),
357
- /** Distinct bound deployment-environment names across the run's jobs (first-seen order). */
358
- environments: z.array(z.string()).optional(),
357
+ /** Distinct bound deployment-context names across the run's jobs (first-seen order). */
358
+ contexts: z.array(z.string()).optional(),
359
359
  startedAt: z.string().optional(),
360
360
  completedAt: z.string().optional(),
361
361
  durationMs: z.number().optional(),
@@ -757,15 +757,15 @@ const dashboardEventDlqDiscardResponseSchema = z.object({
757
757
  discarded: z.boolean().optional(),
758
758
  error: z.string().optional()
759
759
  });
760
- const environmentTypeSchema = z.enum(["fixed", "glob"]);
760
+ const contextTypeSchema = z.enum(["fixed", "glob"]);
761
761
  const concurrencyStrategySchema = z.enum(["queue", "cancel-pending"]);
762
- /** List all environments for the org. */
763
- const envListRequestSchema = z.object({
764
- type: z.literal("dashboard.environments.list"),
762
+ /** List all contexts for the org. */
763
+ const contextListRequestSchema = z.object({
764
+ type: z.literal("dashboard.contexts.list"),
765
765
  requestId: z.string(),
766
766
  actor: actorPrincipalSchema,
767
767
  /**
768
- * When true, each returned environment carries its reachable secret key
768
+ * When true, each returned context carries its reachable secret key
769
769
  * names (never values) in `secretKeys`. Used by the developer CLI's
770
770
  * `kici secrets list` / `kici types` commands.
771
771
  */
@@ -774,27 +774,27 @@ const envListRequestSchema = z.object({
774
774
  * Target org the read must be scoped to, carried per-request by the Platform
775
775
  * (the validated `:orgId` path param). The orchestrator honors this over its
776
776
  * static connection-level org so a Platform-first `kici run remote` org —
777
- * anchored only by `remote_sources` — sees its own environments even when the
777
+ * anchored only by `remote_sources` — sees its own contexts even when the
778
778
  * orchestrator's connection also serves a webhook source for a different org.
779
779
  * Absent on the legacy customer-dashboard path, where the connection org is
780
780
  * already the request org.
781
781
  */
782
782
  orgId: z.string().optional()
783
783
  });
784
- const envListResponseSchema = z.object({
785
- type: z.literal("dashboard.environments.list.response"),
784
+ const contextListResponseSchema = z.object({
785
+ type: z.literal("dashboard.contexts.list.response"),
786
786
  requestId: z.string(),
787
- environments: z.array(z.object({
787
+ contexts: z.array(z.object({
788
788
  id: z.string(),
789
789
  name: z.string(),
790
- type: environmentTypeSchema,
790
+ type: contextTypeSchema,
791
791
  globPattern: z.string().nullable(),
792
792
  enabled: z.boolean(),
793
793
  allowLocalExecution: z.boolean(),
794
794
  createdAt: z.coerce.string(),
795
795
  updatedAt: z.coerce.string(),
796
796
  /**
797
- * Distinct secret key names reachable from this environment's scope
797
+ * Distinct secret key names reachable from this context's scope
798
798
  * bindings (never values). Present only when the request set
799
799
  * `includeSecrets: true`.
800
800
  */
@@ -802,20 +802,20 @@ const envListResponseSchema = z.object({
802
802
  })).optional(),
803
803
  error: z.string().optional()
804
804
  });
805
- /** Get a single environment by ID. */
806
- const envGetRequestSchema = z.object({
807
- type: z.literal("dashboard.environments.get"),
805
+ /** Get a single context by ID. */
806
+ const contextGetRequestSchema = z.object({
807
+ type: z.literal("dashboard.contexts.get"),
808
808
  requestId: z.string(),
809
809
  actor: actorPrincipalSchema,
810
- environmentId: z.string()
810
+ contextId: z.string()
811
811
  });
812
- const envGetResponseSchema = z.object({
813
- type: z.literal("dashboard.environments.get.response"),
812
+ const contextGetResponseSchema = z.object({
813
+ type: z.literal("dashboard.contexts.get.response"),
814
814
  requestId: z.string(),
815
- environment: z.object({
815
+ context: z.object({
816
816
  id: z.string(),
817
817
  name: z.string(),
818
- type: environmentTypeSchema,
818
+ type: contextTypeSchema,
819
819
  globPattern: z.string().nullable(),
820
820
  branchRestrictions: z.array(z.string()).nullable(),
821
821
  concurrencyLimit: z.number().nullable(),
@@ -830,13 +830,13 @@ const envGetResponseSchema = z.object({
830
830
  }).optional(),
831
831
  error: z.string().optional()
832
832
  });
833
- /** Create a new environment. */
834
- const envCreateRequestSchema = z.object({
835
- type: z.literal("dashboard.environments.create"),
833
+ /** Create a new context. */
834
+ const contextCreateRequestSchema = z.object({
835
+ type: z.literal("dashboard.contexts.create"),
836
836
  requestId: z.string(),
837
837
  actor: actorPrincipalSchema,
838
838
  name: z.string(),
839
- envType: environmentTypeSchema,
839
+ contextType: contextTypeSchema,
840
840
  globPattern: z.string().optional(),
841
841
  branchRestrictions: z.array(z.string()).optional(),
842
842
  concurrencyLimit: z.number().optional(),
@@ -846,21 +846,21 @@ const envCreateRequestSchema = z.object({
846
846
  holdExpirySeconds: z.number().optional(),
847
847
  enabled: z.boolean().optional()
848
848
  });
849
- const envCreateResponseSchema = z.object({
850
- type: z.literal("dashboard.environments.create.response"),
849
+ const contextCreateResponseSchema = z.object({
850
+ type: z.literal("dashboard.contexts.create.response"),
851
851
  requestId: z.string(),
852
- environmentId: z.string().optional(),
852
+ contextId: z.string().optional(),
853
853
  error: z.string().optional()
854
854
  });
855
- /** Update an existing environment. */
856
- const envUpdateRequestSchema = z.object({
857
- type: z.literal("dashboard.environments.update"),
855
+ /** Update an existing context. */
856
+ const contextUpdateRequestSchema = z.object({
857
+ type: z.literal("dashboard.contexts.update"),
858
858
  requestId: z.string(),
859
859
  actor: actorPrincipalSchema,
860
- environmentId: z.string(),
860
+ contextId: z.string(),
861
861
  updates: z.object({
862
862
  name: z.string().optional(),
863
- envType: environmentTypeSchema.optional(),
863
+ contextType: contextTypeSchema.optional(),
864
864
  globPattern: z.string().nullable().optional(),
865
865
  branchRestrictions: z.array(z.string()).nullable().optional(),
866
866
  concurrencyLimit: z.number().nullable().optional(),
@@ -871,57 +871,57 @@ const envUpdateRequestSchema = z.object({
871
871
  enabled: z.boolean().optional()
872
872
  })
873
873
  });
874
- const envUpdateResponseSchema = z.object({
875
- type: z.literal("dashboard.environments.update.response"),
874
+ const contextUpdateResponseSchema = z.object({
875
+ type: z.literal("dashboard.contexts.update.response"),
876
876
  requestId: z.string(),
877
877
  error: z.string().optional()
878
878
  });
879
- /** Set an environment's test-run access flag (allowLocalExecution). */
880
- const envTestAccessSetRequestSchema = z.object({
881
- type: z.literal("dashboard.environments.test_access.set"),
879
+ /** Set an context's test-run access flag (allowLocalExecution). */
880
+ const contextTestAccessSetRequestSchema = z.object({
881
+ type: z.literal("dashboard.contexts.test_access.set"),
882
882
  requestId: z.string(),
883
883
  actor: actorPrincipalSchema,
884
- environmentId: z.string(),
884
+ contextId: z.string(),
885
885
  allowLocalExecution: z.boolean()
886
886
  });
887
- const envTestAccessSetResponseSchema = z.object({
888
- type: z.literal("dashboard.environments.test_access.set.response"),
887
+ const contextTestAccessSetResponseSchema = z.object({
888
+ type: z.literal("dashboard.contexts.test_access.set.response"),
889
889
  requestId: z.string(),
890
890
  error: z.string().optional()
891
891
  });
892
- /** Delete an environment. */
893
- const envDeleteRequestSchema = z.object({
894
- type: z.literal("dashboard.environments.delete"),
892
+ /** Delete an context. */
893
+ const contextDeleteRequestSchema = z.object({
894
+ type: z.literal("dashboard.contexts.delete"),
895
895
  requestId: z.string(),
896
896
  actor: actorPrincipalSchema,
897
- environmentId: z.string()
897
+ contextId: z.string()
898
898
  });
899
899
  /**
900
- * Machine-readable codes for environment-delete rejections.
900
+ * Machine-readable codes for context-delete rejections.
901
901
  *
902
902
  * Three-category response taxonomy on dashboard responses, each mapped to a
903
903
  * distinct HTTP status by the Platform proxy: a bare free-text `error` is the
904
- * human message and maps to 400; a missing result (e.g. environment not found)
904
+ * human message and maps to 400; a missing result (e.g. context not found)
905
905
  * maps to 404; an `errorCode` flags a specific business rejection mapped to a
906
906
  * non-400/404 status — here `pending_held_runs` → 409. The sibling precedent is
907
907
  * the rerun response's `errorCode` (`runArchivedNotRerunnable` → 410) above.
908
908
  */
909
- const EnvDeleteErrorCode = z.enum(["pending_held_runs"]);
910
- const envDeleteResponseSchema = z.object({
911
- type: z.literal("dashboard.environments.delete.response"),
909
+ const ContextDeleteErrorCode = z.enum(["pending_held_runs"]);
910
+ const contextDeleteResponseSchema = z.object({
911
+ type: z.literal("dashboard.contexts.delete.response"),
912
912
  requestId: z.string(),
913
913
  error: z.string().optional(),
914
- errorCode: EnvDeleteErrorCode.optional()
914
+ errorCode: ContextDeleteErrorCode.optional()
915
915
  });
916
- /** List variables for an environment. */
917
- const envVarsListRequestSchema = z.object({
918
- type: z.literal("dashboard.environments.variables.list"),
916
+ /** List variables for an context. */
917
+ const contextVarsListRequestSchema = z.object({
918
+ type: z.literal("dashboard.contexts.variables.list"),
919
919
  requestId: z.string(),
920
920
  actor: actorPrincipalSchema,
921
- environmentId: z.string()
921
+ contextId: z.string()
922
922
  });
923
- const envVarsListResponseSchema = z.object({
924
- type: z.literal("dashboard.environments.variables.list.response"),
923
+ const contextVarsListResponseSchema = z.object({
924
+ type: z.literal("dashboard.contexts.variables.list.response"),
925
925
  requestId: z.string(),
926
926
  variables: z.array(z.object({
927
927
  key: z.string(),
@@ -930,44 +930,44 @@ const envVarsListResponseSchema = z.object({
930
930
  })).optional(),
931
931
  error: z.string().optional()
932
932
  });
933
- /** Set (create or update) a variable on an environment. */
934
- const envVarSetRequestSchema = z.object({
935
- type: z.literal("dashboard.environments.variables.set"),
933
+ /** Set (create or update) a variable on an context. */
934
+ const contextVarSetRequestSchema = z.object({
935
+ type: z.literal("dashboard.contexts.variables.set"),
936
936
  requestId: z.string(),
937
937
  actor: actorPrincipalSchema,
938
- environmentId: z.string(),
938
+ contextId: z.string(),
939
939
  key: z.string(),
940
940
  value: z.string(),
941
941
  locked: z.boolean().optional()
942
942
  });
943
- const envVarSetResponseSchema = z.object({
944
- type: z.literal("dashboard.environments.variables.set.response"),
943
+ const contextVarSetResponseSchema = z.object({
944
+ type: z.literal("dashboard.contexts.variables.set.response"),
945
945
  requestId: z.string(),
946
946
  error: z.string().optional()
947
947
  });
948
- /** Delete a variable from an environment. */
949
- const envVarDeleteRequestSchema = z.object({
950
- type: z.literal("dashboard.environments.variables.delete"),
948
+ /** Delete a variable from an context. */
949
+ const contextVarDeleteRequestSchema = z.object({
950
+ type: z.literal("dashboard.contexts.variables.delete"),
951
951
  requestId: z.string(),
952
952
  actor: actorPrincipalSchema,
953
- environmentId: z.string(),
953
+ contextId: z.string(),
954
954
  key: z.string()
955
955
  });
956
- const envVarDeleteResponseSchema = z.object({
957
- type: z.literal("dashboard.environments.variables.delete.response"),
956
+ const contextVarDeleteResponseSchema = z.object({
957
+ type: z.literal("dashboard.contexts.variables.delete.response"),
958
958
  requestId: z.string(),
959
959
  error: z.string().optional()
960
960
  });
961
- /** List source overrides for an environment + routing key. */
962
- const envSourceOverridesListRequestSchema = z.object({
963
- type: z.literal("dashboard.environments.source-overrides.list"),
961
+ /** List source overrides for an context + routing key. */
962
+ const contextSourceOverridesListRequestSchema = z.object({
963
+ type: z.literal("dashboard.contexts.source-overrides.list"),
964
964
  requestId: z.string(),
965
965
  actor: actorPrincipalSchema,
966
- environmentId: z.string(),
966
+ contextId: z.string(),
967
967
  routingKey: z.string()
968
968
  });
969
- const envSourceOverridesListResponseSchema = z.object({
970
- type: z.literal("dashboard.environments.source-overrides.list.response"),
969
+ const contextSourceOverridesListResponseSchema = z.object({
970
+ type: z.literal("dashboard.contexts.source-overrides.list.response"),
971
971
  requestId: z.string(),
972
972
  overrides: z.array(z.object({
973
973
  key: z.string(),
@@ -976,77 +976,77 @@ const envSourceOverridesListResponseSchema = z.object({
976
976
  error: z.string().optional()
977
977
  });
978
978
  /** Set a source override variable. */
979
- const envSourceOverrideSetRequestSchema = z.object({
980
- type: z.literal("dashboard.environments.source-overrides.set"),
979
+ const contextSourceOverrideSetRequestSchema = z.object({
980
+ type: z.literal("dashboard.contexts.source-overrides.set"),
981
981
  requestId: z.string(),
982
982
  actor: actorPrincipalSchema,
983
- environmentId: z.string(),
983
+ contextId: z.string(),
984
984
  routingKey: z.string(),
985
985
  key: z.string(),
986
986
  value: z.string()
987
987
  });
988
- const envSourceOverrideSetResponseSchema = z.object({
989
- type: z.literal("dashboard.environments.source-overrides.set.response"),
988
+ const contextSourceOverrideSetResponseSchema = z.object({
989
+ type: z.literal("dashboard.contexts.source-overrides.set.response"),
990
990
  requestId: z.string(),
991
991
  error: z.string().optional()
992
992
  });
993
993
  /** Delete a source override variable. */
994
- const envSourceOverrideDeleteRequestSchema = z.object({
995
- type: z.literal("dashboard.environments.source-overrides.delete"),
994
+ const contextSourceOverrideDeleteRequestSchema = z.object({
995
+ type: z.literal("dashboard.contexts.source-overrides.delete"),
996
996
  requestId: z.string(),
997
997
  actor: actorPrincipalSchema,
998
- environmentId: z.string(),
998
+ contextId: z.string(),
999
999
  routingKey: z.string(),
1000
1000
  key: z.string()
1001
1001
  });
1002
- const envSourceOverrideDeleteResponseSchema = z.object({
1003
- type: z.literal("dashboard.environments.source-overrides.delete.response"),
1002
+ const contextSourceOverrideDeleteResponseSchema = z.object({
1003
+ type: z.literal("dashboard.contexts.source-overrides.delete.response"),
1004
1004
  requestId: z.string(),
1005
1005
  error: z.string().optional()
1006
1006
  });
1007
1007
  /**
1008
- * A scope→environment binding with its host selector. `hostPattern` is the host
1008
+ * A scope→context binding with its host selector. `hostPattern` is the host
1009
1009
  * the binding applies to (`'**'` = all hosts); exact / glob / regex over a
1010
1010
  * fan-out child's agentId / hostname / labels.
1011
1011
  */
1012
- const envBindingEntrySchema = z.object({
1012
+ const contextBindingEntrySchema = z.object({
1013
1013
  scopePattern: z.string(),
1014
1014
  hostPattern: z.string()
1015
1015
  });
1016
- /** List bindings for an environment. */
1017
- const envBindingsListRequestSchema = z.object({
1018
- type: z.literal("dashboard.environments.bindings.list"),
1016
+ /** List bindings for an context. */
1017
+ const contextBindingsListRequestSchema = z.object({
1018
+ type: z.literal("dashboard.contexts.bindings.list"),
1019
1019
  requestId: z.string(),
1020
1020
  actor: actorPrincipalSchema,
1021
- environmentId: z.string()
1021
+ contextId: z.string()
1022
1022
  });
1023
- const envBindingsListResponseSchema = z.object({
1024
- type: z.literal("dashboard.environments.bindings.list.response"),
1023
+ const contextBindingsListResponseSchema = z.object({
1024
+ type: z.literal("dashboard.contexts.bindings.list.response"),
1025
1025
  requestId: z.string(),
1026
- bindings: z.array(envBindingEntrySchema).optional(),
1026
+ bindings: z.array(contextBindingEntrySchema).optional(),
1027
1027
  error: z.string().optional()
1028
1028
  });
1029
- /** Set bindings (scope + host patterns) for an environment. */
1030
- const envBindingsSetRequestSchema = z.object({
1031
- type: z.literal("dashboard.environments.bindings.set"),
1029
+ /** Set bindings (scope + host patterns) for an context. */
1030
+ const contextBindingsSetRequestSchema = z.object({
1031
+ type: z.literal("dashboard.contexts.bindings.set"),
1032
1032
  requestId: z.string(),
1033
1033
  actor: actorPrincipalSchema,
1034
- environmentId: z.string(),
1035
- bindings: z.array(envBindingEntrySchema)
1034
+ contextId: z.string(),
1035
+ bindings: z.array(contextBindingEntrySchema)
1036
1036
  });
1037
- const envBindingsSetResponseSchema = z.object({
1038
- type: z.literal("dashboard.environments.bindings.set.response"),
1037
+ const contextBindingsSetResponseSchema = z.object({
1038
+ type: z.literal("dashboard.contexts.bindings.set.response"),
1039
1039
  requestId: z.string(),
1040
1040
  error: z.string().optional()
1041
1041
  });
1042
1042
  /** List all scoped secrets for the org. */
1043
- const envSecretsListRequestSchema = z.object({
1044
- type: z.literal("dashboard.environments.secrets.list"),
1043
+ const contextSecretsListRequestSchema = z.object({
1044
+ type: z.literal("dashboard.contexts.secrets.list"),
1045
1045
  requestId: z.string(),
1046
1046
  actor: actorPrincipalSchema
1047
1047
  });
1048
- const envSecretsListResponseSchema = z.object({
1049
- type: z.literal("dashboard.environments.secrets.list.response"),
1048
+ const contextSecretsListResponseSchema = z.object({
1049
+ type: z.literal("dashboard.contexts.secrets.list.response"),
1050
1050
  requestId: z.string(),
1051
1051
  secrets: z.array(z.object({
1052
1052
  scope: z.string(),
@@ -1057,80 +1057,80 @@ const envSecretsListResponseSchema = z.object({
1057
1057
  error: z.string().optional()
1058
1058
  });
1059
1059
  /** Set (create or update) a scoped secret. */
1060
- const envSecretSetRequestSchema = z.object({
1061
- type: z.literal("dashboard.environments.secrets.set"),
1060
+ const contextSecretSetRequestSchema = z.object({
1061
+ type: z.literal("dashboard.contexts.secrets.set"),
1062
1062
  requestId: z.string(),
1063
1063
  actor: actorPrincipalSchema,
1064
1064
  scope: z.string(),
1065
1065
  key: z.string(),
1066
1066
  value: z.string()
1067
1067
  });
1068
- const envSecretSetResponseSchema = z.object({
1069
- type: z.literal("dashboard.environments.secrets.set.response"),
1068
+ const contextSecretSetResponseSchema = z.object({
1069
+ type: z.literal("dashboard.contexts.secrets.set.response"),
1070
1070
  requestId: z.string(),
1071
1071
  error: z.string().optional()
1072
1072
  });
1073
1073
  /** Delete a scoped secret. */
1074
- const envSecretDeleteRequestSchema = z.object({
1075
- type: z.literal("dashboard.environments.secrets.delete"),
1074
+ const contextSecretDeleteRequestSchema = z.object({
1075
+ type: z.literal("dashboard.contexts.secrets.delete"),
1076
1076
  requestId: z.string(),
1077
1077
  actor: actorPrincipalSchema,
1078
1078
  scope: z.string(),
1079
1079
  key: z.string()
1080
1080
  });
1081
- const envSecretDeleteResponseSchema = z.object({
1082
- type: z.literal("dashboard.environments.secrets.delete.response"),
1081
+ const contextSecretDeleteResponseSchema = z.object({
1082
+ type: z.literal("dashboard.contexts.secrets.delete.response"),
1083
1083
  requestId: z.string(),
1084
1084
  error: z.string().optional()
1085
1085
  });
1086
1086
  /** Create an empty scope. */
1087
- const envSecretScopeCreateRequestSchema = z.object({
1088
- type: z.literal("dashboard.environments.secrets.scope.create"),
1087
+ const contextSecretScopeCreateRequestSchema = z.object({
1088
+ type: z.literal("dashboard.contexts.secrets.scope.create"),
1089
1089
  requestId: z.string(),
1090
1090
  actor: actorPrincipalSchema,
1091
1091
  scope: z.string()
1092
1092
  });
1093
- const envSecretScopeCreateResponseSchema = z.object({
1094
- type: z.literal("dashboard.environments.secrets.scope.create.response"),
1093
+ const contextSecretScopeCreateResponseSchema = z.object({
1094
+ type: z.literal("dashboard.contexts.secrets.scope.create.response"),
1095
1095
  requestId: z.string(),
1096
1096
  error: z.string().optional()
1097
1097
  });
1098
- /** Rename a scope -- also updates all environment bindings referencing old scope. */
1099
- const envSecretScopeRenameRequestSchema = z.object({
1100
- type: z.literal("dashboard.environments.secrets.scope.rename"),
1098
+ /** Rename a scope -- also updates all context bindings referencing old scope. */
1099
+ const contextSecretScopeRenameRequestSchema = z.object({
1100
+ type: z.literal("dashboard.contexts.secrets.scope.rename"),
1101
1101
  requestId: z.string(),
1102
1102
  actor: actorPrincipalSchema,
1103
1103
  oldScope: z.string(),
1104
1104
  newScope: z.string()
1105
1105
  });
1106
- const envSecretScopeRenameResponseSchema = z.object({
1107
- type: z.literal("dashboard.environments.secrets.scope.rename.response"),
1106
+ const contextSecretScopeRenameResponseSchema = z.object({
1107
+ type: z.literal("dashboard.contexts.secrets.scope.rename.response"),
1108
1108
  requestId: z.string(),
1109
1109
  error: z.string().optional()
1110
1110
  });
1111
- /** Delete a scope and all its secrets. Also removes environment bindings referencing this scope. */
1112
- const envSecretScopeDeleteRequestSchema = z.object({
1113
- type: z.literal("dashboard.environments.secrets.scope.delete"),
1111
+ /** Delete a scope and all its secrets. Also removes context bindings referencing this scope. */
1112
+ const contextSecretScopeDeleteRequestSchema = z.object({
1113
+ type: z.literal("dashboard.contexts.secrets.scope.delete"),
1114
1114
  requestId: z.string(),
1115
1115
  actor: actorPrincipalSchema,
1116
1116
  scope: z.string()
1117
1117
  });
1118
- const envSecretScopeDeleteResponseSchema = z.object({
1119
- type: z.literal("dashboard.environments.secrets.scope.delete.response"),
1118
+ const contextSecretScopeDeleteResponseSchema = z.object({
1119
+ type: z.literal("dashboard.contexts.secrets.scope.delete.response"),
1120
1120
  requestId: z.string(),
1121
1121
  error: z.string().optional()
1122
1122
  });
1123
- /** Fetch runs that targeted a specific environment, keyed by environment id. */
1124
- const envHistoryRequestSchema = z.object({
1125
- type: z.literal("dashboard.environments.history"),
1123
+ /** Fetch runs that targeted a specific context, keyed by context id. */
1124
+ const contextHistoryRequestSchema = z.object({
1125
+ type: z.literal("dashboard.contexts.history"),
1126
1126
  requestId: z.string(),
1127
1127
  actor: actorPrincipalSchema,
1128
- environmentId: z.string(),
1128
+ contextId: z.string(),
1129
1129
  limit: z.number().optional(),
1130
1130
  offset: z.number().optional()
1131
1131
  });
1132
- const envHistoryResponseSchema = z.object({
1133
- type: z.literal("dashboard.environments.history.response"),
1132
+ const contextHistoryResponseSchema = z.object({
1133
+ type: z.literal("dashboard.contexts.history.response"),
1134
1134
  requestId: z.string(),
1135
1135
  runs: z.array(z.object({
1136
1136
  id: z.string(),
@@ -1141,7 +1141,7 @@ const envHistoryResponseSchema = z.object({
1141
1141
  commitSha: z.string().nullable(),
1142
1142
  startedAt: z.coerce.string().nullable(),
1143
1143
  completedAt: z.coerce.string().nullable(),
1144
- environment: z.string().nullable()
1144
+ context: z.string().nullable()
1145
1145
  })).optional(),
1146
1146
  error: z.string().optional()
1147
1147
  });
@@ -1153,7 +1153,7 @@ const HeldRunStatus = z.enum([
1153
1153
  "expired"
1154
1154
  ]);
1155
1155
  /** Queue type for held runs. */
1156
- const HeldRunQueueType = z.enum(["environment", "security"]);
1156
+ const HeldRunQueueType = z.enum(["context", "security"]);
1157
1157
  /** List held runs. */
1158
1158
  const heldRunsListRequestSchema = z.object({
1159
1159
  type: z.literal("dashboard.held-runs.list"),
@@ -1179,8 +1179,8 @@ const heldRunsListResponseSchema = z.object({
1179
1179
  heldRuns: z.array(z.object({
1180
1180
  id: z.string(),
1181
1181
  runId: z.string(),
1182
- environmentId: z.string().nullable(),
1183
- environmentName: z.string().nullable(),
1182
+ contextId: z.string().nullable(),
1183
+ contextName: z.string().nullable(),
1184
1184
  holdType: z.string(),
1185
1185
  queueType: HeldRunQueueType,
1186
1186
  status: HeldRunStatus,
@@ -1796,7 +1796,7 @@ const testRelayTriggerResponseSchema = z.object({
1796
1796
  status: z.enum(["accepted", "rejected"]).optional(),
1797
1797
  reason: z.string().optional(),
1798
1798
  jobIds: z.array(z.string()).optional(),
1799
- /** User-visible warnings on acceptance (e.g. skipped non-test bound environments). */
1799
+ /** User-visible warnings on acceptance (e.g. skipped non-test bound contexts). */
1800
1800
  warnings: z.array(z.string()).optional(),
1801
1801
  error: z.string().optional()
1802
1802
  });
@@ -1872,27 +1872,27 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
1872
1872
  runCancelRequestSchema,
1873
1873
  dashboardPayloadRequestSchema,
1874
1874
  dashboardOrchLogsRequestSchema,
1875
- envListRequestSchema,
1876
- envGetRequestSchema,
1877
- envCreateRequestSchema,
1878
- envUpdateRequestSchema,
1879
- envTestAccessSetRequestSchema,
1880
- envDeleteRequestSchema,
1881
- envVarsListRequestSchema,
1882
- envVarSetRequestSchema,
1883
- envVarDeleteRequestSchema,
1884
- envSourceOverridesListRequestSchema,
1885
- envSourceOverrideSetRequestSchema,
1886
- envSourceOverrideDeleteRequestSchema,
1887
- envBindingsListRequestSchema,
1888
- envBindingsSetRequestSchema,
1889
- envSecretsListRequestSchema,
1890
- envSecretSetRequestSchema,
1891
- envSecretDeleteRequestSchema,
1892
- envSecretScopeCreateRequestSchema,
1893
- envSecretScopeRenameRequestSchema,
1894
- envSecretScopeDeleteRequestSchema,
1895
- envHistoryRequestSchema,
1875
+ contextListRequestSchema,
1876
+ contextGetRequestSchema,
1877
+ contextCreateRequestSchema,
1878
+ contextUpdateRequestSchema,
1879
+ contextTestAccessSetRequestSchema,
1880
+ contextDeleteRequestSchema,
1881
+ contextVarsListRequestSchema,
1882
+ contextVarSetRequestSchema,
1883
+ contextVarDeleteRequestSchema,
1884
+ contextSourceOverridesListRequestSchema,
1885
+ contextSourceOverrideSetRequestSchema,
1886
+ contextSourceOverrideDeleteRequestSchema,
1887
+ contextBindingsListRequestSchema,
1888
+ contextBindingsSetRequestSchema,
1889
+ contextSecretsListRequestSchema,
1890
+ contextSecretSetRequestSchema,
1891
+ contextSecretDeleteRequestSchema,
1892
+ contextSecretScopeCreateRequestSchema,
1893
+ contextSecretScopeRenameRequestSchema,
1894
+ contextSecretScopeDeleteRequestSchema,
1895
+ contextHistoryRequestSchema,
1896
1896
  heldRunsListRequestSchema,
1897
1897
  heldRunApproveRequestSchema,
1898
1898
  heldRunRejectRequestSchema,
@@ -1946,27 +1946,27 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
1946
1946
  runCancelResponseSchema,
1947
1947
  dashboardPayloadResponseSchema,
1948
1948
  dashboardOrchLogsResponseSchema,
1949
- envListResponseSchema,
1950
- envGetResponseSchema,
1951
- envCreateResponseSchema,
1952
- envUpdateResponseSchema,
1953
- envTestAccessSetResponseSchema,
1954
- envDeleteResponseSchema,
1955
- envVarsListResponseSchema,
1956
- envVarSetResponseSchema,
1957
- envVarDeleteResponseSchema,
1958
- envSourceOverridesListResponseSchema,
1959
- envSourceOverrideSetResponseSchema,
1960
- envSourceOverrideDeleteResponseSchema,
1961
- envBindingsListResponseSchema,
1962
- envBindingsSetResponseSchema,
1963
- envSecretsListResponseSchema,
1964
- envSecretSetResponseSchema,
1965
- envSecretDeleteResponseSchema,
1966
- envSecretScopeCreateResponseSchema,
1967
- envSecretScopeRenameResponseSchema,
1968
- envSecretScopeDeleteResponseSchema,
1969
- envHistoryResponseSchema,
1949
+ contextListResponseSchema,
1950
+ contextGetResponseSchema,
1951
+ contextCreateResponseSchema,
1952
+ contextUpdateResponseSchema,
1953
+ contextTestAccessSetResponseSchema,
1954
+ contextDeleteResponseSchema,
1955
+ contextVarsListResponseSchema,
1956
+ contextVarSetResponseSchema,
1957
+ contextVarDeleteResponseSchema,
1958
+ contextSourceOverridesListResponseSchema,
1959
+ contextSourceOverrideSetResponseSchema,
1960
+ contextSourceOverrideDeleteResponseSchema,
1961
+ contextBindingsListResponseSchema,
1962
+ contextBindingsSetResponseSchema,
1963
+ contextSecretsListResponseSchema,
1964
+ contextSecretSetResponseSchema,
1965
+ contextSecretDeleteResponseSchema,
1966
+ contextSecretScopeCreateResponseSchema,
1967
+ contextSecretScopeRenameResponseSchema,
1968
+ contextSecretScopeDeleteResponseSchema,
1969
+ contextHistoryResponseSchema,
1970
1970
  heldRunsListResponseSchema,
1971
1971
  heldRunApproveResponseSchema,
1972
1972
  heldRunRejectResponseSchema,
@@ -2078,11 +2078,11 @@ const runListItemSchema = z.object({
2078
2078
  hadCompileJob: z.boolean(),
2079
2079
  compileJobId: z.string().nullable(),
2080
2080
  /**
2081
- * Distinct bound deployment-environment names across the run's jobs
2082
- * (first-seen order). Drives the run-list environment chips; empty/absent
2083
- * when no job binds an environment.
2081
+ * Distinct bound deployment-context names across the run's jobs
2082
+ * (first-seen order). Drives the run-list context chips; empty/absent
2083
+ * when no job binds an context.
2084
2084
  */
2085
- environments: z.array(z.string()).optional(),
2085
+ contexts: z.array(z.string()).optional(),
2086
2086
  /**
2087
2087
  * Run-level repo provider (origin host) — distinct from `source.provider`
2088
2088
  * which is derived from the routing key. Drives provider-aware repo links.
@@ -2285,6 +2285,6 @@ const DashboardResponseErrorCode = z.enum([
2285
2285
  "internal_error"
2286
2286
  ]);
2287
2287
  //#endregion
2288
- export { DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema };
2288
+ export { ContextDeleteErrorCode, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema };
2289
2289
 
2290
2290
  //# sourceMappingURL=dashboard.js.map