@checkstack/automation-frontend 0.8.0 → 0.9.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # @checkstack/automation-frontend
2
2
 
3
+ ## 0.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2e20792: Declare `sideEffects` (CSS-only) so bundlers can tree-shake these packages' barrel exports
8
+
9
+ These packages now declare `"sideEffects": ["**/*.css"]` in their
10
+ `package.json`. This lets a consuming bundle drop unused barrel re-exports
11
+ instead of pulling a whole package's component graph when only one
12
+ provider/hook is imported (e.g. importing `SessionProvider` no longer dragged an
13
+ admin form). It is build metadata only - no runtime behavior change.
14
+
15
+ - Updated dependencies [2e20792]
16
+ - Updated dependencies [2e20792]
17
+ - Updated dependencies [2e20792]
18
+ - @checkstack/frontend-api@0.12.0
19
+ - @checkstack/ui@1.19.0
20
+ - @checkstack/auth-frontend@0.10.0
21
+ - @checkstack/signal-frontend@0.3.0
22
+ - @checkstack/ai-common@0.6.1
23
+ - @checkstack/auth-common@0.11.1
24
+ - @checkstack/automation-common@0.8.1
25
+ - @checkstack/catalog-common@2.4.3
26
+ - @checkstack/gitops-frontend@0.6.2
27
+ - @checkstack/integration-common@0.9.3
28
+ - @checkstack/script-packages-frontend@0.4.2
29
+ - @checkstack/secrets-frontend@0.3.2
30
+ - @checkstack/common@0.17.0
31
+ - @checkstack/template-engine@0.4.6
32
+
33
+ ## 0.9.0
34
+
35
+ ### Minor Changes
36
+
37
+ - 748dc50: Fix automation expression fields and harden the Jira search action so actions are reliable to author.
38
+
39
+ - **Expression fields reject `{{ }}` at save time.** `when` / `conditions` / a `condition` guard / `wait_until.condition` / a trigger or `wait_for_trigger` `filter` / `repeat.for_each|while|until` / `numeric_state.value` are BARE expressions and reference fields directly. Wrapping one in `{{ }}` (template syntax) used to pass validation and then throw a parse error at dispatch time. A new schema refinement (`collectExpressionDelimiterIssues`) now blocks the save (create / update / GitOps / editor) with a clear message. The misleading "Template returning truthy/falsy" schema descriptions are reworded to say "bare expression (no `{{ }}`)".
40
+ - **Fixed three built-in templates** that wrapped their `when` condition in `{{ }}` (`ai-triage-file-jira-bug`, `jira-comment-transition-on-recovery`, `ai-severity-escalation`) and the webhook-subscription migration that emitted a `{{ }}`-wrapped `systemFilter` condition.
41
+ - **The artifact-wiring validator now scans bare expression conditions**, not just `{{ }}` template spans, so a dropped `<artifactType>` segment (e.g. `artifacts.find.found` instead of `artifacts.find.issue_search.found`) is still caught in a `when` / `condition`.
42
+ - **Jira `search_issues` correlation overhaul.** `statusCategory` is now a dropdown (`new` / `indeterminate` / `done`) instead of free text. A new `labels` filter (`labels in (...)`, AND of all labels) is the reliable way to find the ticket for a specific system, and the two Jira built-in templates now tag issues with a stable `checkstack-sys-<systemId>` label on create and search by it instead of fuzzy `summaryContains`. A search whose CONFIGURED filter renders empty now fails loudly instead of silently broadening to "every ticket in the project". Results are ordered `created DESC` so `firstIssueKey` is deterministic.
43
+ - **Fixed `{{ }}` autocomplete hiding upstream artifacts in raw config fields.** The raw multi-type editor (used by Jira `summary` / `description` and every other `["raw"]` action-config field) matched its autocomplete query without trimming the leading space after `{{`, so typing `{{ arti` produced the query `" arti"`, which matched nothing — the popup emptied the instant a letter was typed and `artifacts.*` (and all other fields) never appeared. The query is now trimmed before matching (the autocomplete logic was extracted to a pure, unit-tested helper). This was most visible on an action nested in a `choose` branch, where upstream artifacts are exactly what you reference. The popup rows also now keep the distinguishing leaf segment (`…analysis.summary`) visible instead of end-truncating every deep path to an identical shared prefix.
44
+ - **Editor UX: expression vs template is now visible.** `TemplateValueInput` gains a `mode` prop; in `expression` mode it shows a focus hint ("reference fields directly, without `{{ }}`") and an inline error the moment a `{{ }}` delimiter is typed, instead of failing only at save / run time. Every expression-field editor (conditions, trigger / `wait_for_trigger` filters, `repeat` for_each/while/until, `window.partitionBy`) now runs in expression mode, and their misleading "Filter template" / "Condition template" labels and `{{ }}` placeholders are corrected.
45
+ - **AI assistant guidance corrected.** The `building-automations` doc (bundled into the AI docs index) no longer tells the model to wrap a condition in `{{ }}`.
46
+ - **Jira provider docs corrected.** The setup help advertised a fabricated nested `payload.system.name`; platform events expose flat `systemId` / `systemName`, so the example payload and template-syntax snippet now use the real flat shape.
47
+
48
+ BREAKING CHANGE: An automation definition that wrongly wrapped a condition / filter in `{{ }}` is now rejected on save. These definitions already failed at run time; re-save them with the braces removed (e.g. `artifacts.find.issue_search.found != true`).
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [748dc50]
53
+ - @checkstack/automation-common@0.8.0
54
+ - @checkstack/ui@1.18.0
55
+ - @checkstack/auth-frontend@0.9.1
56
+ - @checkstack/gitops-frontend@0.6.1
57
+ - @checkstack/script-packages-frontend@0.4.1
58
+ - @checkstack/secrets-frontend@0.3.1
59
+
3
60
  ## 0.8.0
4
61
 
5
62
  ### Minor Changes
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@checkstack/automation-frontend",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
+ "sideEffects": [
7
+ "**/*.css"
8
+ ],
6
9
  "main": "src/index.tsx",
7
10
  "checkstack": {
8
11
  "type": "frontend"
@@ -13,20 +16,20 @@
13
16
  "lint:code": "eslint . --max-warnings 0"
14
17
  },
15
18
  "dependencies": {
16
- "@checkstack/auth-common": "0.11.0",
17
- "@checkstack/auth-frontend": "0.9.0",
18
- "@checkstack/automation-common": "0.7.1",
19
- "@checkstack/ai-common": "0.6.0",
20
- "@checkstack/catalog-common": "2.4.2",
19
+ "@checkstack/auth-common": "0.11.1",
20
+ "@checkstack/auth-frontend": "0.10.0",
21
+ "@checkstack/automation-common": "0.8.1",
22
+ "@checkstack/ai-common": "0.6.1",
23
+ "@checkstack/catalog-common": "2.4.3",
21
24
  "@checkstack/common": "0.17.0",
22
- "@checkstack/frontend-api": "0.11.1",
23
- "@checkstack/gitops-frontend": "0.6.0",
24
- "@checkstack/integration-common": "0.9.2",
25
- "@checkstack/script-packages-frontend": "0.4.0",
26
- "@checkstack/secrets-frontend": "0.3.0",
27
- "@checkstack/signal-frontend": "0.2.6",
25
+ "@checkstack/frontend-api": "0.12.0",
26
+ "@checkstack/gitops-frontend": "0.6.2",
27
+ "@checkstack/integration-common": "0.9.3",
28
+ "@checkstack/script-packages-frontend": "0.4.2",
29
+ "@checkstack/secrets-frontend": "0.3.2",
30
+ "@checkstack/signal-frontend": "0.3.0",
28
31
  "@checkstack/template-engine": "0.4.6",
29
- "@checkstack/ui": "1.17.0",
32
+ "@checkstack/ui": "1.19.0",
30
33
  "@dnd-kit/core": "^6.3.1",
31
34
  "@dnd-kit/sortable": "^8.0.0",
32
35
  "@dnd-kit/utilities": "^3.2.2",
@@ -40,6 +43,6 @@
40
43
  "typescript": "^5.0.0",
41
44
  "@types/react": "^19.0.0",
42
45
  "@checkstack/tsconfig": "0.0.7",
43
- "@checkstack/scripts": "0.6.3"
46
+ "@checkstack/scripts": "0.6.4"
44
47
  }
45
48
  }
@@ -152,6 +152,7 @@ export const ConditionEditor: React.FC<ConditionEditorProps> = ({
152
152
  value={typeof value === "string" ? value : ""}
153
153
  onChange={(next) => onChange(next)}
154
154
  placeholder="trigger.payload.severity == &quot;high&quot;"
155
+ mode="expression"
155
156
  completionProvider={completionProvider}
156
157
  />
157
158
  )}
@@ -246,6 +247,7 @@ const NumericStateBody: React.FC<{
246
247
  value={typeof ns.value === "string" ? ns.value : String(ns.value)}
247
248
  onChange={(next) => patch({ value: next })}
248
249
  placeholder="health.system.p95_latency_ms"
250
+ mode="expression"
249
251
  completionProvider={completionProvider}
250
252
  />
251
253
  </div>
@@ -271,13 +271,14 @@ const TriggerCard: React.FC<{
271
271
  />
272
272
  </div>
273
273
  <div className="space-y-1">
274
- <Label className="text-xs">Filter template</Label>
274
+ <Label className="text-xs">Filter (expression)</Label>
275
275
  <TemplateValueInput
276
276
  value={value.filter ?? ""}
277
277
  onChange={(next) =>
278
278
  onChange({ ...value, filter: next || undefined })
279
279
  }
280
- placeholder="{{ trigger.payload.severity == &quot;high&quot; }}"
280
+ placeholder="trigger.payload.severity == &quot;high&quot;"
281
+ mode="expression"
281
282
  completionProvider={templateCompletion}
282
283
  disabled={disabled}
283
284
  />
@@ -464,6 +465,7 @@ const WindowInput: React.FC<{
464
465
  })
465
466
  }
466
467
  placeholder={`Leave blank to count ${defaultPartition}`}
468
+ mode="expression"
467
469
  completionProvider={completionProvider}
468
470
  disabled={disabled}
469
471
  />
@@ -280,10 +280,11 @@ export const RepeatActionBody: React.FC<{
280
280
  <div className="space-y-1">
281
281
  <Label className="text-xs">
282
282
  {kind === "for_each"
283
- ? "Iterable (renders to JSON array)"
284
- : "Condition template"}
283
+ ? "Iterable expression (renders to JSON array)"
284
+ : "Condition (expression)"}
285
285
  </Label>
286
286
  <TemplateValueInput
287
+ mode="expression"
287
288
  value={
288
289
  kind === "for_each"
289
290
  ? (value.repeat as { for_each: string }).for_each
@@ -386,7 +386,7 @@ export const WaitForTriggerActionBody: React.FC<{
386
386
  </div>
387
387
  <div className="grid gap-2 sm:grid-cols-2">
388
388
  <div className="space-y-1">
389
- <Label className="text-xs">Filter template</Label>
389
+ <Label className="text-xs">Filter (expression)</Label>
390
390
  <TemplateValueInput
391
391
  value={value.wait_for_trigger.filter ?? ""}
392
392
  onChange={(next) =>
@@ -398,7 +398,8 @@ export const WaitForTriggerActionBody: React.FC<{
398
398
  },
399
399
  })
400
400
  }
401
- placeholder="{{ trigger.payload.id == var.targetId }}"
401
+ placeholder="trigger.payload.id == var.targetId"
402
+ mode="expression"
402
403
  completionProvider={completionProvider}
403
404
  disabled={disabled}
404
405
  />