@highstate/library 0.9.15 → 0.9.18

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 (46) hide show
  1. package/dist/highstate.library.msgpack +0 -0
  2. package/dist/highstate.manifest.json +5 -0
  3. package/dist/index.js +1716 -1166
  4. package/dist/index.js.map +1 -1
  5. package/package.json +8 -6
  6. package/src/abbreviations.ts +35 -0
  7. package/src/apps/code-server.ts +5 -5
  8. package/src/apps/deployment.ts +20 -20
  9. package/src/apps/dns.ts +12 -14
  10. package/src/apps/gitea.ts +2 -2
  11. package/src/apps/grocy.ts +2 -2
  12. package/src/apps/hubble.ts +2 -2
  13. package/src/apps/kubernetes-dashboard.ts +2 -2
  14. package/src/apps/mariadb.ts +10 -10
  15. package/src/apps/maybe.ts +5 -5
  16. package/src/apps/mongodb.ts +10 -10
  17. package/src/apps/network.ts +6 -6
  18. package/src/apps/postgresql.ts +10 -10
  19. package/src/apps/shared.ts +18 -19
  20. package/src/apps/syncthing.ts +6 -6
  21. package/src/apps/traefik.ts +4 -4
  22. package/src/apps/vaultwarden.ts +4 -4
  23. package/src/apps/zitadel.ts +2 -2
  24. package/src/cloudflare.ts +4 -4
  25. package/src/common.ts +25 -78
  26. package/src/distributions/index.ts +1 -0
  27. package/src/distributions/ubuntu.ts +32 -0
  28. package/src/dns.ts +10 -18
  29. package/src/files.ts +135 -0
  30. package/src/git.ts +58 -0
  31. package/src/index.ts +5 -0
  32. package/src/k3s.ts +9 -17
  33. package/src/k8s.ts +130 -146
  34. package/src/mullvad.ts +5 -9
  35. package/src/network.ts +69 -44
  36. package/src/nixos.ts +51 -86
  37. package/src/obfuscators/phantun.ts +4 -4
  38. package/src/obfuscators/shared.ts +23 -43
  39. package/src/proxmox.ts +301 -60
  40. package/src/restic.ts +17 -19
  41. package/src/sops.ts +7 -6
  42. package/src/ssh.ts +21 -19
  43. package/src/talos.ts +15 -27
  44. package/src/timeweb.ts +13 -13
  45. package/src/utils.ts +3 -3
  46. package/src/wireguard.ts +90 -127
package/src/mullvad.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineUnit, Type } from "@highstate/contract"
1
+ import { defineUnit, z } from "@highstate/contract"
2
2
  import { networkEntity, peerEntity } from "./wireguard"
3
3
  import { l4EndpointEntity } from "./network"
4
4
 
@@ -6,14 +6,12 @@ export const peer = defineUnit({
6
6
  type: "mullvad.peer",
7
7
 
8
8
  args: {
9
- hostname: Type.Optional(Type.String()),
9
+ hostname: z.string().optional(),
10
10
 
11
11
  /**
12
12
  * Whether to include Mullvad DNS servers in the peer configuration.
13
- *
14
- * @schema
15
13
  */
16
- includeDns: Type.Default(Type.Boolean(), true),
14
+ includeDns: z.boolean().default(true),
17
15
  },
18
16
 
19
17
  inputs: {
@@ -21,8 +19,6 @@ export const peer = defineUnit({
21
19
  * The network to use for the WireGuard peer.
22
20
  *
23
21
  * If not provided, the peer will use default network configuration.
24
- *
25
- * @schema
26
22
  */
27
23
  network: {
28
24
  entity: networkEntity,
@@ -40,9 +36,9 @@ export const peer = defineUnit({
40
36
  },
41
37
 
42
38
  meta: {
43
- displayName: "Mullvad Peer",
39
+ title: "Mullvad Peer",
44
40
  description: "The Mullvad WireGuard peer fetched from the Mullvad API.",
45
- primaryIcon: "simple-icons:mullvad",
41
+ icon: "simple-icons:mullvad",
46
42
  secondaryIcon: "cib:wireguard",
47
43
  secondaryIconColor: "#88171a",
48
44
  category: "VPN",
package/src/network.ts CHANGED
@@ -1,48 +1,48 @@
1
- import { defineEntity, defineUnit, Type, type Static } from "@highstate/contract"
1
+ import { defineEntity, defineUnit, z } from "@highstate/contract"
2
2
 
3
- export const endpointVisibilitySchema = Type.StringEnum([
3
+ export const endpointVisibilitySchema = z.enum([
4
4
  "public", // Reachable from the public internet
5
5
  "external", // Reachable from outside the system boundary, but not public
6
6
  "internal", // Reachable only from within the system or cluster
7
7
  ])
8
8
 
9
- export const endpointFilterSchema = Type.Array(endpointVisibilitySchema)
9
+ export const endpointFilterSchema = endpointVisibilitySchema.array()
10
10
 
11
11
  export const l3EndpointEntity = defineEntity({
12
12
  type: "network.l3-endpoint",
13
13
 
14
- schema: Type.Intersect([
15
- Type.Object({
14
+ schema: z.intersection(
15
+ z.object({
16
16
  visibility: endpointVisibilitySchema,
17
- metadata: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
17
+ metadata: z.record(z.string(), z.unknown()).optional(),
18
18
  }),
19
- Type.Union([
20
- Type.Object({
21
- type: Type.Literal("hostname"),
19
+ z.union([
20
+ z.object({
21
+ type: z.literal("hostname"),
22
22
 
23
23
  /**
24
24
  * The hostname of the endpoint in the format of a domain name.
25
25
  */
26
- hostname: Type.String(),
26
+ hostname: z.string(),
27
27
  }),
28
- Type.Object({
29
- type: Type.Literal("ipv4"),
28
+ z.object({
29
+ type: z.literal("ipv4"),
30
30
 
31
31
  /**
32
32
  * The IPv4 address of the endpoint.
33
33
  */
34
- address: Type.String(),
34
+ address: z.string(),
35
35
  }),
36
- Type.Object({
37
- type: Type.Literal("ipv6"),
36
+ z.object({
37
+ type: z.literal("ipv6"),
38
38
 
39
39
  /**
40
40
  * The IPv6 address of the endpoint.
41
41
  */
42
- address: Type.String(),
42
+ address: z.string(),
43
43
  }),
44
44
  ]),
45
- ]),
45
+ ),
46
46
 
47
47
  meta: {
48
48
  color: "#4CAF50",
@@ -50,17 +50,17 @@ export const l3EndpointEntity = defineEntity({
50
50
  },
51
51
  })
52
52
 
53
- export const l4ProtocolSchema = Type.StringEnum(["tcp", "udp"])
53
+ export const l4ProtocolSchema = z.enum(["tcp", "udp"])
54
54
 
55
- export const portInfoSchema = Type.Object({
56
- port: Type.Number(),
55
+ export const l4PortInfoSchema = z.object({
56
+ port: z.number(),
57
57
  protocol: l4ProtocolSchema,
58
58
  })
59
59
 
60
60
  export const l4EndpointEntity = defineEntity({
61
61
  type: "network.l4-endpoint",
62
62
 
63
- schema: Type.Intersect([l3EndpointEntity.schema, portInfoSchema]),
63
+ schema: z.intersection(l3EndpointEntity.schema, l4PortInfoSchema),
64
64
 
65
65
  meta: {
66
66
  color: "#2196F3",
@@ -68,6 +68,33 @@ export const l4EndpointEntity = defineEntity({
68
68
  },
69
69
  })
70
70
 
71
+ export const l7AppInfoSchema = z.object({
72
+ /**
73
+ * The name of the application protocol used by the endpoint.
74
+ */
75
+ appProtocol: z.string(),
76
+
77
+ /**
78
+ * The resource path of the application endpoint, including query parameters.
79
+ * Must not start with a slash (`/`).
80
+ *
81
+ * Example: `api/v1/resource?query=value`, `database?param=value`, `user/repo.git`.
82
+ */
83
+ resource: z.string().optional(),
84
+ })
85
+
86
+ export const l7EndpointEntity = defineEntity({
87
+ type: "network.l7-endpoint",
88
+
89
+ schema: z.intersection(l4EndpointEntity.schema, l7AppInfoSchema),
90
+
91
+ meta: {
92
+ color: "#FF9800",
93
+ description:
94
+ "The L7 endpoint for some service. Extends an L4 endpoint with application protocol information.",
95
+ },
96
+ })
97
+
71
98
  export const l3Endpoint = defineUnit({
72
99
  type: "network.l3-endpoint",
73
100
 
@@ -77,12 +104,12 @@ export const l3Endpoint = defineUnit({
77
104
  *
78
105
  * May be a domain name or an IP address.
79
106
  */
80
- endpoint: Type.String(),
107
+ endpoint: z.string(),
81
108
 
82
109
  /**
83
110
  * The visibility of the endpoint.
84
111
  */
85
- visibility: Type.Default(endpointVisibilitySchema, "public"),
112
+ visibility: endpointVisibilitySchema.default("public"),
86
113
  },
87
114
 
88
115
  outputs: {
@@ -90,10 +117,10 @@ export const l3Endpoint = defineUnit({
90
117
  },
91
118
 
92
119
  meta: {
93
- displayName: "L3 Endpoint",
120
+ title: "L3 Endpoint",
94
121
  description: "An L3 endpoint for some service. May be a domain name or an IP address.",
95
- primaryIcon: "mdi:network-outline",
96
- primaryIconColor: "#4CAF50",
122
+ icon: "mdi:network-outline",
123
+ iconColor: "#4CAF50",
97
124
  defaultNamePrefix: "endpoint",
98
125
  category: "Network",
99
126
  },
@@ -119,12 +146,12 @@ export const l4Endpoint = defineUnit({
119
146
  * - `tcp://endpoint:port`
120
147
  * - `udp://endpoint:port`
121
148
  */
122
- endpoint: Type.String(),
149
+ endpoint: z.string(),
123
150
 
124
151
  /**
125
152
  * The visibility of the endpoint.
126
153
  */
127
- visibility: Type.Default(endpointVisibilitySchema, "public"),
154
+ visibility: endpointVisibilitySchema.default("public"),
128
155
  },
129
156
 
130
157
  outputs: {
@@ -132,10 +159,10 @@ export const l4Endpoint = defineUnit({
132
159
  },
133
160
 
134
161
  meta: {
135
- displayName: "L4 Endpoint",
162
+ title: "L4 Endpoint",
136
163
  description: "An L4 endpoint for some service. Extends an L3 endpoint with a port.",
137
- primaryIcon: "mdi:network-outline",
138
- primaryIconColor: "#2196F3",
164
+ icon: "mdi:network-outline",
165
+ iconColor: "#2196F3",
139
166
  defaultNamePrefix: "endpoint",
140
167
  category: "Network",
141
168
  },
@@ -153,26 +180,24 @@ export const l4Endpoint = defineUnit({
153
180
  * - `external`: Reachable from outside the system boundary (e.g., LAN, VPC), but not public.
154
181
  * - `internal`: Reachable only from within the application or infrastructure boundary (e.g., within a cluster).
155
182
  */
156
- export type EndpointVisibility = Static<typeof endpointVisibilitySchema>
183
+ export type EndpointVisibility = z.infer<typeof endpointVisibilitySchema>
157
184
 
158
185
  /**
159
- * Filter values used to select relevant endpoints based on visibility.
186
+ * The list of endpoint visibility levels used to filter endpoints.
160
187
  *
161
- * - `public`: Only endpoints exposed to the public internet.
162
- * - `private`: Endpoints not publicly accessible (external + internal).
163
- * - `external`: Reachable from outside the system but not public (e.g., LAN, VPC).
164
- * - `internal`: Reachable only from within the system boundary (e.g., inside a cluster).
165
- * - `most`: Select the most widely accessible endpoints, preferring visibility in the following order: `public` > `external` > `internal`.
188
+ * If empty, it will filter the most widely accessible endpoints, prefering visibility in the following order:
166
189
  * - If any public endpoints exist, all public endpoints are selected.
167
190
  * - Otherwise, if any external endpoints exist, all external endpoints are selected.
168
191
  * - If neither exist, all internal endpoints are selected.
169
192
  */
170
- export type EndpointFilter = Static<typeof endpointFilterSchema>
171
-
172
- export type L3Endpoint = Static<typeof l3EndpointEntity.schema>
173
- export type L4Endpoint = Static<typeof l4EndpointEntity.schema>
174
- export type L4Protocol = Static<typeof l4ProtocolSchema>
175
- export type L4PortInfo = Static<typeof portInfoSchema>
193
+ export type EndpointFilter = z.infer<typeof endpointFilterSchema>
194
+
195
+ export type L3Endpoint = z.infer<typeof l3EndpointEntity.schema>
196
+ export type L4Endpoint = z.infer<typeof l4EndpointEntity.schema>
197
+ export type L4Protocol = z.infer<typeof l4ProtocolSchema>
198
+ export type L4PortInfo = z.infer<typeof l4PortInfoSchema>
199
+ export type L7Endpoint = z.infer<typeof l7EndpointEntity.schema>
200
+ export type L7AppInfo = z.infer<typeof l7AppInfoSchema>
176
201
 
177
202
  /**
178
203
  * The L3 or L4 endpoint for some service.
package/src/nixos.ts CHANGED
@@ -1,25 +1,24 @@
1
- import { defineEntity, defineUnit, Type } from "@highstate/contract"
2
- import { fileEntity, serverEntity } from "./common"
3
-
4
- export const inlineModuleEntity = defineEntity({
5
- type: "nixos.inline-module",
6
-
7
- schema: Type.Object({
8
- code: Type.String(),
9
- }),
10
-
11
- meta: {
12
- displayName: "NixOS Inline Module",
13
- description: "The NixOS module reference.",
14
- color: "#5277c3",
15
- },
16
- })
1
+ import { defineUnit, z } from "@highstate/contract"
2
+ import { fileEntity, folderEntity } from "./files"
3
+ import { serverEntity } from "./common"
17
4
 
18
5
  export const inlineModule = defineUnit({
19
6
  type: "nixos.inline-module",
20
7
 
21
8
  args: {
22
- code: Type.String({ language: "nix" }),
9
+ /**
10
+ * The name of the module file.
11
+ *
12
+ * If not provided, the name will be the name of the unit.
13
+ */
14
+ moduleName: z.string().optional(),
15
+
16
+ /**
17
+ * The code of the NixOS module.
18
+ *
19
+ * In this code you can reference other modules and files by their names.
20
+ */
21
+ code: z.string().meta({ language: "nix" }),
23
22
  },
24
23
 
25
24
  inputs: {
@@ -28,17 +27,22 @@ export const inlineModule = defineUnit({
28
27
  required: false,
29
28
  multiple: true,
30
29
  },
30
+ folders: {
31
+ entity: folderEntity,
32
+ required: false,
33
+ multiple: true,
34
+ },
31
35
  },
32
36
 
33
37
  outputs: {
34
- module: inlineModuleEntity,
38
+ folder: folderEntity,
35
39
  },
36
40
 
37
41
  meta: {
38
- displayName: "NixOS Inline Module",
42
+ title: "NixOS Inline Module",
39
43
  description: "Creates a NixOS module from inline code.",
40
- primaryIcon: "simple-icons:nixos",
41
- primaryIconColor: "#7ebae4",
44
+ icon: "simple-icons:nixos",
45
+ iconColor: "#7ebae4",
42
46
  secondaryIcon: "mdi:file-code",
43
47
  category: "NixOS",
44
48
  },
@@ -49,81 +53,47 @@ export const inlineModule = defineUnit({
49
53
  },
50
54
  })
51
55
 
52
- export const flakeEntity = defineEntity({
53
- type: "nixos.flake",
54
-
55
- schema: Type.Object({
56
- url: Type.String(),
57
- }),
58
-
59
- meta: {
60
- displayName: "NixOS Flake",
61
- description: "The NixOS flake reference.",
62
- color: "#5277c3",
63
- },
64
- })
65
-
66
- export const remoteFlake = defineUnit({
67
- type: "nixos.remote-flake",
68
-
69
- args: {
70
- url: Type.String(),
71
- },
72
-
73
- outputs: {
74
- flake: flakeEntity,
75
- },
76
-
77
- meta: {
78
- displayName: "NixOS Remote Flake",
79
- description: "References a remote NixOS flake.",
80
- primaryIcon: "simple-icons:nixos",
81
- primaryIconColor: "#7ebae4",
82
- secondaryIcon: "simple-icons:git",
83
- secondaryIconColor: "#f1502f",
84
- category: "NixOS",
85
- },
86
-
87
- source: {
88
- package: "@highstate/nixos",
89
- path: "flake",
90
- },
91
- })
92
-
93
56
  export const inlineFlake = defineUnit({
94
57
  type: "nixos.inline-flake",
95
58
 
96
59
  args: {
97
- code: Type.String({ language: "nix" }),
60
+ /**
61
+ * The name of the flake folder.
62
+ *
63
+ * If not provided, the name will be the name of the unit.
64
+ */
65
+ flakeName: z.string().optional(),
66
+
67
+ /**
68
+ * The code of the `flake.nix` file.
69
+ *
70
+ * In this code you can reference other flakes, modules, files, and folders by their names.
71
+ */
72
+ code: z.string().meta({ language: "nix" }),
98
73
  },
99
74
 
100
75
  inputs: {
101
- flakes: {
102
- entity: flakeEntity,
76
+ files: {
77
+ entity: fileEntity,
103
78
  required: false,
104
79
  multiple: true,
105
80
  },
106
- modules: {
107
- entity: inlineModuleEntity,
108
- required: false,
109
- multiple: true,
110
- },
111
- files: {
112
- entity: fileEntity,
81
+ folders: {
82
+ entity: folderEntity,
113
83
  required: false,
114
84
  multiple: true,
115
85
  },
116
86
  },
117
87
 
118
88
  outputs: {
119
- flake: flakeEntity,
89
+ folder: folderEntity,
120
90
  },
121
91
 
122
92
  meta: {
123
- displayName: "NixOS Inline Flake",
93
+ title: "NixOS Inline Flake",
124
94
  description: "Creates a NixOS flake from inline code.",
125
- primaryIcon: "simple-icons:nixos",
126
- primaryIconColor: "#7ebae4",
95
+ icon: "simple-icons:nixos",
96
+ iconColor: "#7ebae4",
127
97
  secondaryIcon: "mdi:file-code",
128
98
  category: "NixOS",
129
99
  },
@@ -138,17 +108,12 @@ export const system = defineUnit({
138
108
  type: "nixos.system",
139
109
 
140
110
  args: {
141
- system: Type.Optional(Type.String()),
111
+ system: z.string().optional(),
142
112
  },
143
113
 
144
114
  inputs: {
145
- flake: flakeEntity,
146
115
  server: serverEntity,
147
- modules: {
148
- entity: inlineModuleEntity,
149
- required: false,
150
- multiple: true,
151
- },
116
+ flake: folderEntity,
152
117
  },
153
118
 
154
119
  outputs: {
@@ -156,10 +121,10 @@ export const system = defineUnit({
156
121
  },
157
122
 
158
123
  meta: {
159
- displayName: "NixOS System",
124
+ title: "NixOS System",
160
125
  description: "Creates a NixOS system on top of any server.",
161
- primaryIcon: "simple-icons:nixos",
162
- primaryIconColor: "#7ebae4",
126
+ icon: "simple-icons:nixos",
127
+ iconColor: "#7ebae4",
163
128
  secondaryIcon: "codicon:vm",
164
129
  category: "NixOS",
165
130
  },
@@ -6,9 +6,9 @@ export const deobfuscator = defineUnit({
6
6
  ...deobfuscatorSpec,
7
7
 
8
8
  meta: {
9
- displayName: "Phantun Deobfuscator",
9
+ title: "Phantun Deobfuscator",
10
10
  description: "The Phantun Deobfuscator deployed on Kubernetes.",
11
- primaryIcon: "mdi:network-outline",
11
+ icon: "mdi:network-outline",
12
12
  secondaryIcon: "mdi:hide",
13
13
  category: "Obfuscators",
14
14
  },
@@ -24,9 +24,9 @@ export const obfuscator = defineUnit({
24
24
  ...obfuscatorSpec,
25
25
 
26
26
  meta: {
27
- displayName: "Phantun Obfuscator",
27
+ title: "Phantun Obfuscator",
28
28
  description: "The Phantun Obfuscator deployed on Kubernetes.",
29
- primaryIcon: "mdi:network-outline",
29
+ icon: "mdi:network-outline",
30
30
  secondaryIcon: "mdi:hide",
31
31
  category: "Obfuscators",
32
32
  },
@@ -1,40 +1,34 @@
1
- import { Type, type Static, type TObject } from "@highstate/contract"
1
+ import { $args, $inputs, $outputs, z } from "@highstate/contract"
2
2
  import { clusterEntity } from "../k8s"
3
3
  import { l4EndpointEntity } from "../network"
4
4
 
5
5
  export const deobfuscatorSpec = {
6
- args: {
6
+ args: $args({
7
7
  /**
8
8
  * The name of the namespace and deployment to deploy the deobfuscator on.
9
9
  *
10
10
  * By default, calculated as `deobfs-{type}-{name}`.
11
11
  */
12
- appName: Type.Optional(Type.String()),
12
+ appName: z.string().optional(),
13
13
 
14
14
  /**
15
15
  * The L4 endpoint to forward deobfuscated traffic to.
16
16
  *
17
17
  * Will take precedence over the `targetEndpoint` input.
18
- *
19
- * @schema
20
18
  */
21
- targetEndpoints: Type.Default(Type.Array(Type.String()), []),
19
+ targetEndpoints: z.string().array().default([]),
22
20
 
23
21
  /**
24
22
  * Whether to expose the deobfuscator service by "NodePort" or "LoadBalancer".
25
23
  *
26
24
  * By default, the service is not exposed and only accessible from within the cluster.
27
- *
28
- * @schema
29
25
  */
30
- external: Type.Default(Type.Boolean(), false),
31
- },
26
+ external: z.boolean().default(false),
27
+ }),
32
28
 
33
- inputs: {
29
+ inputs: $inputs({
34
30
  /**
35
31
  * The Kubernetes cluster to deploy the deobfuscator on.
36
- *
37
- * @schema
38
32
  */
39
33
  k8sCluster: clusterEntity,
40
34
 
@@ -42,63 +36,53 @@ export const deobfuscatorSpec = {
42
36
  * The L4 endpoints to forward deobfuscated traffic to.
43
37
  *
44
38
  * Will select the most appropriate endpoint based on the environment.
45
- *
46
- * @schema
47
39
  */
48
40
  targetEndpoints: {
49
41
  entity: l4EndpointEntity,
50
42
  required: false,
51
43
  multiple: true,
52
44
  },
53
- },
45
+ }),
54
46
 
55
- outputs: {
47
+ outputs: $outputs({
56
48
  /**
57
49
  * The L4 endpoints of the deobfuscator accepting obfuscated traffic.
58
- *
59
- * @schema
60
50
  */
61
51
  endpoints: {
62
52
  entity: l4EndpointEntity,
63
53
  required: false,
64
54
  multiple: true,
65
55
  },
66
- },
67
- } as const
56
+ }),
57
+ }
68
58
 
69
59
  export const obfuscatorSpec = {
70
- args: {
60
+ args: $args({
71
61
  /**
72
62
  * The name of the namespace and deployment to deploy the obfuscator on.
73
63
  *
74
64
  * By default, calculated as `obfs-{type}-{name}`.
75
65
  */
76
- appName: Type.Optional(Type.String()),
66
+ appName: z.string().optional(),
77
67
 
78
68
  /**
79
69
  * The endpoint of the deobfuscator to pass obfuscated traffic to.
80
70
  *
81
71
  * Will take precedence over the `endpoint` input.
82
- *
83
- * @schema
84
72
  */
85
- endpoints: Type.Default(Type.Array(Type.String()), []),
73
+ endpoints: z.string().array().default([]),
86
74
 
87
75
  /**
88
76
  * Whether to expose the obfuscator service by "NodePort" or "LoadBalancer".
89
77
  *
90
78
  * By default, the service is not exposed and only accessible from within the cluster.
91
- *
92
- * @schema
93
79
  */
94
- external: Type.Default(Type.Boolean(), false),
95
- },
80
+ external: z.boolean().default(false),
81
+ }),
96
82
 
97
- inputs: {
83
+ inputs: $inputs({
98
84
  /**
99
85
  * The Kubernetes cluster to deploy the obfuscator on.
100
- *
101
- * @schema
102
86
  */
103
87
  k8sCluster: clusterEntity,
104
88
 
@@ -106,28 +90,24 @@ export const obfuscatorSpec = {
106
90
  * The L4 endpoints of the deobfuscator to pass obfuscated traffic to.
107
91
  *
108
92
  * Will select the most appropriate endpoint based on the environment.
109
- *
110
- * @schema
111
93
  */
112
94
  endpoints: {
113
95
  entity: l4EndpointEntity,
114
96
  required: false,
115
97
  multiple: true,
116
98
  },
117
- },
99
+ }),
118
100
 
119
- outputs: {
101
+ outputs: $outputs({
120
102
  /**
121
103
  * The L4 endpoints accepting unobfuscated traffic.
122
- *
123
- * @schema
124
104
  */
125
105
  entryEndpoints: {
126
106
  entity: l4EndpointEntity,
127
107
  multiple: true,
128
108
  },
129
- },
130
- } as const
109
+ }),
110
+ }
131
111
 
132
- export type DeobfuscatorArgs = Static<TObject<(typeof deobfuscatorSpec)["args"]>>
133
- export type ObfuscatorArgs = Static<TObject<(typeof obfuscatorSpec)["args"]>>
112
+ export type DeobfuscatorArgs = z.infer<typeof deobfuscatorSpec.args>
113
+ export type ObfuscatorArgs = z.infer<typeof obfuscatorSpec.args>