@epilot/cli 0.1.143 → 0.1.144

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 CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.143 — CLI for epilot APIs
32
+ epilot v0.1.144 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -1150,6 +1150,9 @@
1150
1150
  "description": "Target version to create"
1151
1151
  }
1152
1152
  ],
1153
+ "requestBody": {
1154
+ "$ref": "#/components/requestBodies/CloneVersionRequest"
1155
+ },
1153
1156
  "responses": {
1154
1157
  "201": {
1155
1158
  "description": "New version created successfully",
@@ -1902,6 +1905,28 @@
1902
1905
  "$ref": "#/components/schemas/Options"
1903
1906
  },
1904
1907
  "description": "Replaces the full set of app-level option declarations for this version.\nOption keys must be unique app-wide; `secret`-touching options are always\nsensitive and must not declare `sensitive: false`.\n"
1908
+ },
1909
+ "changelog": {
1910
+ "type": "string",
1911
+ "maxLength": 250,
1912
+ "description": "Short description of what changed in this version"
1913
+ }
1914
+ }
1915
+ }
1916
+ }
1917
+ }
1918
+ },
1919
+ "CloneVersionRequest": {
1920
+ "required": false,
1921
+ "content": {
1922
+ "application/json": {
1923
+ "schema": {
1924
+ "type": "object",
1925
+ "properties": {
1926
+ "changelog": {
1927
+ "type": "string",
1928
+ "maxLength": 250,
1929
+ "description": "Short description of what the new version will change"
1905
1930
  }
1906
1931
  }
1907
1932
  }
@@ -2009,7 +2034,7 @@
2009
2034
  },
2010
2035
  "Options": {
2011
2036
  "type": "object",
2012
- "description": "Options for the component configuration",
2037
+ "description": "An option declaration — a setting the installing org fills in. Declared at app level.",
2013
2038
  "required": [
2014
2039
  "key",
2015
2040
  "type"
@@ -2058,7 +2083,7 @@
2058
2083
  },
2059
2084
  "sensitive": {
2060
2085
  "type": "boolean",
2061
- "description": "Write-only, server-side only value — like a sensitive environment variable\n(app-level options only). Sensitive values are never serialized in any response;\nthey are resolvable only via server-side channels (API proxy injection, function\n`secrets` allowlist, the internal options/resolve endpoint). Non-sensitive values\nare readable wherever the app runs, including the end-customer browser (journey and\nportal runtime). Forced to true for `secret`-touching options. Default: false.\n"
2086
+ "description": "Write-only, server-side only value — like a sensitive environment variable\n(app-level options only). Sensitive values are never serialized in any response;\nthey are resolvable only via server-side channels (API proxy injection, function\nruns, the internal options/resolve endpoint). Non-sensitive values\nare readable wherever the app runs, including the end-customer browser (journey and\nportal runtime). Forced to true for `secret`-touching options. Default: false.\n"
2062
2087
  },
2063
2088
  "configured": {
2064
2089
  "type": "boolean",
@@ -2179,6 +2204,7 @@
2179
2204
  "EXTERNAL_PRODUCT_CATALOG",
2180
2205
  "CUSTOM_PAGE",
2181
2206
  "API_PROXY",
2207
+ "EXTERNAL_VALUES",
2182
2208
  "APP_FUNCTION"
2183
2209
  ],
2184
2210
  "description": "Type of app component"
@@ -2375,7 +2401,8 @@
2375
2401
  "CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent",
2376
2402
  "EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent",
2377
2403
  "CUSTOM_PAGE": "#/components/schemas/CustomPageComponent",
2378
- "API_PROXY": "#/components/schemas/ApiProxyComponent"
2404
+ "API_PROXY": "#/components/schemas/ApiProxyComponent",
2405
+ "EXTERNAL_VALUES": "#/components/schemas/ExternalValuesComponent"
2379
2406
  }
2380
2407
  },
2381
2408
  "oneOf": [
@@ -2405,6 +2432,9 @@
2405
2432
  },
2406
2433
  {
2407
2434
  "$ref": "#/components/schemas/ApiProxyComponent"
2435
+ },
2436
+ {
2437
+ "$ref": "#/components/schemas/ExternalValuesComponent"
2408
2438
  }
2409
2439
  ]
2410
2440
  }
@@ -2428,6 +2458,25 @@
2428
2458
  }
2429
2459
  }
2430
2460
  },
2461
+ "ExternalValuesComponent": {
2462
+ "type": "object",
2463
+ "description": "Exposes typed values resolved from an external system at runtime (e.g. a meter reading prediction). Consumers such as validation rules reference a hook and one of its results by id. Resolution is performed by the external-values-api on behalf of authenticated epilot 360 users and portal end customers.\n",
2464
+ "required": [
2465
+ "component_type",
2466
+ "configuration"
2467
+ ],
2468
+ "properties": {
2469
+ "component_type": {
2470
+ "type": "string",
2471
+ "enum": [
2472
+ "EXTERNAL_VALUES"
2473
+ ]
2474
+ },
2475
+ "configuration": {
2476
+ "$ref": "#/components/schemas/ExternalValuesConfig"
2477
+ }
2478
+ }
2479
+ },
2431
2480
  "CustomCapabilityComponent": {
2432
2481
  "type": "object",
2433
2482
  "required": [
@@ -3667,7 +3716,7 @@
3667
3716
  "additionalProperties": false
3668
3717
  },
3669
3718
  "PortalExtensionHookVisualizationMetadata": {
3670
- "description": "Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:\n - 200 with a JSON body of shape:\n {\n \"type_options\": [\n { \"id\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"statistical_method\": \"sum\", \"unit\": \"kWh\", \"color\": \"primary\", \"precision\": 2 },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\n Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.\n Each type option may also customize its rendering: `color` picks a Spark palette color (`primary`, `slate`, `mauve`, `orange`, `red`, `tomato`, `amber`, `green`, `blue`) used to draw the type's series; `precision` sets the number of decimal places to show for that type's values (axis labels, tooltips, summaries). Both are optional — the consumer falls back to its own defaults when they are omitted.\n `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):\n - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.\n - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.\n All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.\nThe portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.\n",
3719
+ "description": "Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:\n - 200 with a JSON body of shape:\n {\n \"type_options\": [\n { \"id\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"statistical_method\": \"sum\", \"unit\": \"kWh\", \"color\": \"primary\", \"precision\": 2 },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\", \"P1Y\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\n Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.\n Each type option may also customize its rendering: `color` picks a Spark palette color (`primary`, `slate`, `mauve`, `orange`, `red`, `tomato`, `amber`, `green`, `blue`) used to draw the type's series; `precision` sets the number of decimal places to show for that type's values (axis labels, tooltips, summaries). Both are optional — the consumer falls back to its own defaults when they are omitted.\n `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):\n - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.\n - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.\n All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.\nThe portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.\n",
3671
3720
  "type": "object",
3672
3721
  "properties": {
3673
3722
  "id": {
@@ -5082,6 +5131,204 @@
5082
5131
  }
5083
5132
  }
5084
5133
  },
5134
+ "ExternalValuesConfig": {
5135
+ "type": "object",
5136
+ "description": "Configuration for an EXTERNAL_VALUES component",
5137
+ "required": [
5138
+ "hooks"
5139
+ ],
5140
+ "properties": {
5141
+ "hooks": {
5142
+ "type": "array",
5143
+ "description": "Hooks exposed by this component. Hook ids must be unique within the component.",
5144
+ "items": {
5145
+ "$ref": "#/components/schemas/ExternalValuesHook"
5146
+ }
5147
+ }
5148
+ }
5149
+ },
5150
+ "ExternalValuesHook": {
5151
+ "type": "object",
5152
+ "description": "One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.\n",
5153
+ "required": [
5154
+ "id",
5155
+ "name",
5156
+ "call",
5157
+ "result"
5158
+ ],
5159
+ "properties": {
5160
+ "id": {
5161
+ "type": "string",
5162
+ "pattern": "^[a-zA-Z0-9_-]{1,100}$",
5163
+ "description": "Stable identifier; consumers (e.g. validation rules) reference it. Renaming breaks references."
5164
+ },
5165
+ "name": {
5166
+ "$ref": "#/components/schemas/TranslatedString"
5167
+ },
5168
+ "description": {
5169
+ "$ref": "#/components/schemas/TranslatedString"
5170
+ },
5171
+ "auth_type": {
5172
+ "type": "string",
5173
+ "enum": [
5174
+ "none",
5175
+ "header",
5176
+ "bearer",
5177
+ "hmac"
5178
+ ],
5179
+ "default": "none",
5180
+ "description": "Static request authentication applied to the call.\n- `none`: no static authentication.\n- `header`: sends `auth_secret` in header `auth_header` (default `X-API-Key`).\n- `bearer`: sends `Authorization: Bearer <auth_secret>`.\n- `hmac`: signs the request per Standard Webhooks (headers `webhook-id`,\n `webhook-timestamp`, `webhook-signature` = `v1,<base64 HMAC-SHA256>` over\n `<id>.<timestamp>.<body>`) using `auth_secret` as a `whsec_`-prefixed\n base64 secret, exactly as epilot webhooks do.\n\n`auth_secret` is required when `auth_type` is `header`, `bearer` or `hmac`.\nCombine with `auth` (a pre-call that fetches a token) when the target needs both.\n"
5181
+ },
5182
+ "auth_header": {
5183
+ "type": "string",
5184
+ "description": "Header name used when `auth_type` is `header`. Defaults to `X-API-Key`."
5185
+ },
5186
+ "auth_secret": {
5187
+ "type": "string",
5188
+ "description": "Liquid template resolving to the secret, e.g. \"{{Options.api_key}}\". Must reference an option declared with `type: secret`; literals are rejected. Required when `auth_type` is `header`, `bearer` or `hmac`.",
5189
+ "example": "{{Options.api_key}}"
5190
+ },
5191
+ "auth": {
5192
+ "$ref": "#/components/schemas/PortalExtensionAuthBlock"
5193
+ },
5194
+ "call": {
5195
+ "type": "object",
5196
+ "required": [
5197
+ "url"
5198
+ ],
5199
+ "properties": {
5200
+ "method": {
5201
+ "type": "string",
5202
+ "enum": [
5203
+ "GET",
5204
+ "POST",
5205
+ "PUT",
5206
+ "PATCH"
5207
+ ],
5208
+ "default": "POST",
5209
+ "description": "HTTP method to use for the call"
5210
+ },
5211
+ "url": {
5212
+ "type": "string",
5213
+ "description": "URL to call. Supports variable interpolation."
5214
+ },
5215
+ "headers": {
5216
+ "type": "object",
5217
+ "description": "Headers to send with the call. Supports variable interpolation.",
5218
+ "additionalProperties": {
5219
+ "type": "string"
5220
+ }
5221
+ },
5222
+ "params": {
5223
+ "type": "object",
5224
+ "description": "Query parameters to append to the URL. Supports variable interpolation.",
5225
+ "additionalProperties": {
5226
+ "type": "string"
5227
+ }
5228
+ },
5229
+ "body": {
5230
+ "type": "object",
5231
+ "description": "JSON body to send. Values support variable interpolation. When omitted, `{ Input, Context, Consumer }` is sent as-is.",
5232
+ "additionalProperties": true
5233
+ }
5234
+ }
5235
+ },
5236
+ "result": {
5237
+ "type": "array",
5238
+ "minItems": 1,
5239
+ "description": "Typed results extracted from the response. Result ids must be unique within the hook.",
5240
+ "items": {
5241
+ "$ref": "#/components/schemas/ExternalValuesResult"
5242
+ }
5243
+ },
5244
+ "timeout_ms": {
5245
+ "type": "integer",
5246
+ "minimum": 500,
5247
+ "maximum": 5000,
5248
+ "default": 3000,
5249
+ "description": "Timeout for the external call in milliseconds."
5250
+ },
5251
+ "on_unavailable": {
5252
+ "type": "string",
5253
+ "enum": [
5254
+ "skip",
5255
+ "block"
5256
+ ],
5257
+ "default": "skip",
5258
+ "description": "Behaviour when the external system is unavailable (timeout, network or upstream error). `skip`: consumers ignore conditions depending on this hook. `block`: consumers treat the dependent action as not allowed."
5259
+ },
5260
+ "cache": {
5261
+ "type": "object",
5262
+ "description": "Response caching. Off when omitted.",
5263
+ "required": [
5264
+ "ttl_seconds"
5265
+ ],
5266
+ "properties": {
5267
+ "ttl_seconds": {
5268
+ "type": "integer",
5269
+ "minimum": 0,
5270
+ "maximum": 3600,
5271
+ "description": "Time to live in seconds. 0 disables caching."
5272
+ },
5273
+ "key": {
5274
+ "type": "string",
5275
+ "description": "Liquid template for the cache key. Defaults to a hash of org, app, hook, `Input` and `Context`."
5276
+ }
5277
+ }
5278
+ },
5279
+ "use_static_ips": {
5280
+ "type": "boolean",
5281
+ "description": "If set, requests are sent from epilot's static egress IPs. Mutually exclusive with secure_proxy."
5282
+ },
5283
+ "secure_proxy": {
5284
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
5285
+ }
5286
+ }
5287
+ },
5288
+ "ExternalValuesResult": {
5289
+ "type": "object",
5290
+ "description": "A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.\n",
5291
+ "required": [
5292
+ "id",
5293
+ "type",
5294
+ "name"
5295
+ ],
5296
+ "properties": {
5297
+ "id": {
5298
+ "type": "string",
5299
+ "pattern": "^[a-zA-Z0-9_-]{1,100}$",
5300
+ "description": "Stable identifier of the result within the hook. Renaming breaks references."
5301
+ },
5302
+ "type": {
5303
+ "type": "string",
5304
+ "enum": [
5305
+ "number",
5306
+ "text",
5307
+ "date",
5308
+ "boolean"
5309
+ ],
5310
+ "description": "Type the extracted value is coerced to."
5311
+ },
5312
+ "name": {
5313
+ "$ref": "#/components/schemas/TranslatedString"
5314
+ },
5315
+ "template": {
5316
+ "type": "string",
5317
+ "description": "Liquid template over `Response` etc.; output coerced to `type`.",
5318
+ "example": "{{Response.value}}"
5319
+ },
5320
+ "path": {
5321
+ "type": "string",
5322
+ "description": "Dot path into the response body, e.g. \"data.limit\".",
5323
+ "example": "data.limit"
5324
+ },
5325
+ "jsonata": {
5326
+ "type": "string",
5327
+ "description": "JSONata expression over `{ Response, Input, Context, Options, Env }`.",
5328
+ "example": "$sum(Response.items.amount)"
5329
+ }
5330
+ }
5331
+ },
5085
5332
  "Grants": {
5086
5333
  "type": "array",
5087
5334
  "description": "Required grants for the app in order to call APIs for the installing tenant",
@@ -208,7 +208,7 @@
208
208
  }
209
209
  },
210
210
  "400": {
211
- "description": "Bad Request - Invalid request body",
211
+ "description": "Bad Request - Invalid request body. Invalid external comparison values additionally carry a\n`code` (`external_value_not_found` when the app is not installed or the hook / result does not\nexist, `external_value_incompatible` when the result type does not match the compared kind).\n",
212
212
  "content": {
213
213
  "application/json": {
214
214
  "schema": {
@@ -217,6 +217,13 @@
217
217
  "message": {
218
218
  "type": "string",
219
219
  "example": "Invalid request body"
220
+ },
221
+ "code": {
222
+ "type": "string",
223
+ "enum": [
224
+ "external_value_not_found",
225
+ "external_value_incompatible"
226
+ ]
220
227
  }
221
228
  }
222
229
  }
@@ -484,7 +491,7 @@
484
491
  }
485
492
  },
486
493
  "400": {
487
- "description": "Bad Request - Invalid request body",
494
+ "description": "Bad Request - Invalid request body. Invalid external comparison values additionally carry a\n`code` (`external_value_not_found` when the app is not installed or the hook / result does not\nexist, `external_value_incompatible` when the result type does not match the compared kind).\n",
488
495
  "content": {
489
496
  "application/json": {
490
497
  "schema": {
@@ -493,6 +500,13 @@
493
500
  "message": {
494
501
  "type": "string",
495
502
  "example": "Invalid request body"
503
+ },
504
+ "code": {
505
+ "type": "string",
506
+ "enum": [
507
+ "external_value_not_found",
508
+ "external_value_incompatible"
509
+ ]
496
510
  }
497
511
  }
498
512
  }
@@ -1984,7 +1998,7 @@
1984
1998
  },
1985
1999
  "ComparisonRuleType": {
1986
2000
  "type": "object",
1987
- "description": "Declarative validation rule (schema version v2). Supports predefined comparison operators\nover number, date and text inputs, with static, dynamic (context path) and relative-date\ncomparison values.\n",
2001
+ "description": "Declarative validation rule (schema version v2). Supports predefined comparison operators\nover number, date and text inputs, with static, dynamic (context path), relative-date and\nexternal (app-provided) comparison values.\n",
1988
2002
  "required": [
1989
2003
  "input_type",
1990
2004
  "conditions"
@@ -2088,6 +2102,12 @@
2088
2102
  {
2089
2103
  "$ref": "#/components/schemas/RelativeDateValue"
2090
2104
  },
2105
+ {
2106
+ "$ref": "#/components/schemas/EnvironmentValue"
2107
+ },
2108
+ {
2109
+ "$ref": "#/components/schemas/ExternalValue"
2110
+ },
2091
2111
  {
2092
2112
  "$ref": "#/components/schemas/RangeValue"
2093
2113
  },
@@ -2097,7 +2117,7 @@
2097
2117
  ]
2098
2118
  },
2099
2119
  "ScalarValue": {
2100
- "description": "A single comparison value - static, resolved from context, or a relative date.",
2120
+ "description": "A single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value.",
2101
2121
  "oneOf": [
2102
2122
  {
2103
2123
  "$ref": "#/components/schemas/StaticValue"
@@ -2107,9 +2127,82 @@
2107
2127
  },
2108
2128
  {
2109
2129
  "$ref": "#/components/schemas/RelativeDateValue"
2130
+ },
2131
+ {
2132
+ "$ref": "#/components/schemas/EnvironmentValue"
2133
+ },
2134
+ {
2135
+ "$ref": "#/components/schemas/ExternalValue"
2110
2136
  }
2111
2137
  ]
2112
2138
  },
2139
+ "EnvironmentValue": {
2140
+ "type": "object",
2141
+ "description": "A comparison value resolved at evaluation time from an organisation environment variable\n(environments-api). The rule stores the key, never the value, so one change to the variable\nreaches every rule that references it and a blueprint install never overwrites the\norganisation's own value.\n\nOnly browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for\ntext comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.\n`String` and `SecretString` variables are rejected at write time. Write-time validation also\nchecks that the variable exists in the organisation; a variable that exists without a value\n(for example seeded by a blueprint install) is accepted and resolves as unavailable until set.\n",
2142
+ "required": [
2143
+ "source",
2144
+ "key"
2145
+ ],
2146
+ "additionalProperties": false,
2147
+ "properties": {
2148
+ "source": {
2149
+ "type": "string",
2150
+ "enum": [
2151
+ "environment"
2152
+ ]
2153
+ },
2154
+ "key": {
2155
+ "type": "string",
2156
+ "pattern": "^[a-z0-9][a-z0-9_.\\-]{0,127}$",
2157
+ "description": "Environment variable key, e.g. `abschlag.max`."
2158
+ },
2159
+ "adjust": {
2160
+ "$ref": "#/components/schemas/ValueAdjustment"
2161
+ }
2162
+ }
2163
+ },
2164
+ "ExternalValue": {
2165
+ "type": "object",
2166
+ "description": "A comparison value produced at evaluation time by an External Values hook of an installed\napp (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is\nresolved server-side by the external-values-api, which executes the hook's HTTP call with\nthe app's credentials and returns the typed result identified by `result_id`.\n\nWrite-time validation checks that the app is installed in the organisation, that the hook\nand result exist, and that the result's type is compatible with the compared kind\n(`number` results for numeric comparisons, `text` for text, `date` for date). External values\nare resolved only for authenticated consumers (epilot 360 users and portal end customers);\nin public journeys the dependent conditions are skipped.\n",
2167
+ "required": [
2168
+ "source",
2169
+ "app_id",
2170
+ "hook_id",
2171
+ "result_id"
2172
+ ],
2173
+ "additionalProperties": false,
2174
+ "properties": {
2175
+ "source": {
2176
+ "type": "string",
2177
+ "enum": [
2178
+ "external"
2179
+ ]
2180
+ },
2181
+ "app_id": {
2182
+ "type": "string",
2183
+ "minLength": 1,
2184
+ "maxLength": 100,
2185
+ "description": "ID of the installed app that provides the External Values component."
2186
+ },
2187
+ "hook_id": {
2188
+ "type": "string",
2189
+ "minLength": 1,
2190
+ "maxLength": 100,
2191
+ "pattern": "^[a-zA-Z0-9_-]+$",
2192
+ "description": "ID of the hook within the app's External Values component."
2193
+ },
2194
+ "result_id": {
2195
+ "type": "string",
2196
+ "minLength": 1,
2197
+ "maxLength": 100,
2198
+ "pattern": "^[a-zA-Z0-9_-]+$",
2199
+ "description": "ID of the result entry within the hook whose value is compared."
2200
+ },
2201
+ "adjust": {
2202
+ "$ref": "#/components/schemas/ValueAdjustment"
2203
+ }
2204
+ }
2205
+ },
2113
2206
  "StaticValue": {
2114
2207
  "type": "object",
2115
2208
  "description": "A fixed comparison value.",
@@ -2194,6 +2287,9 @@
2194
2287
  },
2195
2288
  {
2196
2289
  "$ref": "#/components/schemas/ContextValue"
2290
+ },
2291
+ {
2292
+ "$ref": "#/components/schemas/EnvironmentValue"
2197
2293
  }
2198
2294
  ]
2199
2295
  },
@@ -2324,7 +2420,7 @@
2324
2420
  "description": "Comparison applied to the resolved context value. `isEmpty` / `isNotEmpty`\ntake no `value`; all other operators require one.\n"
2325
2421
  },
2326
2422
  "value": {
2327
- "description": "Static comparison value for binary operators.",
2423
+ "description": "Comparison value for binary operators: a static number, string or boolean, or an\norganisation environment variable (`Number`, `Text` or `Boolean`) so a precondition\ncan act as a per-organisation switch or threshold.\n",
2328
2424
  "oneOf": [
2329
2425
  {
2330
2426
  "type": "number"
@@ -2334,6 +2430,9 @@
2334
2430
  },
2335
2431
  {
2336
2432
  "type": "boolean"
2433
+ },
2434
+ {
2435
+ "$ref": "#/components/schemas/EnvironmentValue"
2337
2436
  }
2338
2437
  ]
2339
2438
  }
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
11
11
  var main = defineCommand({
12
12
  meta: {
13
13
  name: "epilot",
14
- version: "0.1.143",
14
+ version: "0.1.144",
15
15
  description: "CLI for epilot APIs"
16
16
  },
17
17
  args: {
@@ -31,7 +31,7 @@ var main = defineCommand({
31
31
  profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
32
32
  config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
33
33
  completion: () => import("../completion-HPDI7RNO.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-7VYPWNEV.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-4LGBIDMY.js").then((m) => m.default),
35
35
  "access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
36
36
  address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
37
37
  "address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
@@ -134,7 +134,7 @@ process.stderr.on("error", (err) => {
134
134
  if (err.code === "EPIPE") process.exit(0);
135
135
  throw err;
136
136
  });
137
- var VERSION = true ? "0.1.143" : (await null).default.version;
137
+ var VERSION = true ? "0.1.144" : (await null).default.version;
138
138
  var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
139
139
  process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
140
140
  var args = process.argv.slice(2);
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
72
72
  }
73
73
  });
74
74
  var getCurrentVersion = () => {
75
- if (true) return "0.1.143";
75
+ if (true) return "0.1.144";
76
76
  try {
77
77
  const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
78
78
  encoding: "utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/cli",
3
- "version": "0.1.143",
3
+ "version": "0.1.144",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {