@checkstack/automation-frontend 0.4.7 → 0.5.0
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,64 @@
|
|
|
1
1
|
# @checkstack/automation-frontend
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ebef442: feat(ai): let the assistant resolve dynamic integration-action field values
|
|
8
|
+
|
|
9
|
+
Integration action fields like Jira `create_issue`'s `projectKey`, `issueTypeId`,
|
|
10
|
+
and `priorityId` are not free-form - their valid values come from the connected
|
|
11
|
+
system (the editor renders them as cascading dropdowns via `x-options-resolver`).
|
|
12
|
+
The AI assistant had no way to fetch those values, so it guessed, and propose-time
|
|
13
|
+
validation never checked them - a fabricated `projectKey` only failed at runtime.
|
|
14
|
+
|
|
15
|
+
- **New user-callable `integration.resolveConnectionOptions` RPC** (the non-admin
|
|
16
|
+
counterpart of `getConnectionOptions`, mirroring `listConnectionSummaries`), so
|
|
17
|
+
automation authors and the assistant can resolve a field's options without
|
|
18
|
+
`integration.manage`. Returns option labels/values only.
|
|
19
|
+
- **New `automation.resolveActionOptions` AI tool**: resolves a field's valid
|
|
20
|
+
values live from the connection, the same source the editor dropdown uses. It
|
|
21
|
+
is provider-agnostic (reads the field's resolver and `x-depends-on` from the
|
|
22
|
+
action's own schema) and dependency-aware - for a cascade like `issueTypeId`
|
|
23
|
+
(depends on `projectKey`), the model resolves the parent first and passes it in
|
|
24
|
+
`dependencies`.
|
|
25
|
+
- **Propose-time options validation**: `automation.propose` now checks every
|
|
26
|
+
literal dynamic-option value against the live options for its connection
|
|
27
|
+
(sourcing each field's dependency values from the same config so cascades
|
|
28
|
+
resolve), flagging values the connection does not offer with guidance to call
|
|
29
|
+
`automation.resolveActionOptions`. Templated values and fields with
|
|
30
|
+
templated/absent dependencies are skipped; a resolver lookup failure is skipped
|
|
31
|
+
rather than blocking, so transient provider flakiness never gates a proposal.
|
|
32
|
+
|
|
33
|
+
- **Automation editor works for non-admins**: the editor's option-resolver
|
|
34
|
+
bridge now calls the user-callable `listConnectionSummaries` /
|
|
35
|
+
`resolveConnectionOptions` instead of the admin-gated `listConnections` /
|
|
36
|
+
`getConnectionOptions`, so an automation author without `integration.manage`
|
|
37
|
+
gets working connection pickers and cascading dropdowns instead of empty/
|
|
38
|
+
forbidden ones.
|
|
39
|
+
|
|
40
|
+
The resolver lookup and the dependency handling are factored into reusable
|
|
41
|
+
helpers that work for any provider's `x-options-resolver` fields.
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [ebef442]
|
|
46
|
+
- Updated dependencies [ebef442]
|
|
47
|
+
- @checkstack/integration-common@0.9.0
|
|
48
|
+
- @checkstack/automation-common@0.5.0
|
|
49
|
+
- @checkstack/auth-common@0.9.0
|
|
50
|
+
- @checkstack/catalog-common@2.3.5
|
|
51
|
+
- @checkstack/script-packages-frontend@0.3.9
|
|
52
|
+
- @checkstack/gitops-frontend@0.5.6
|
|
53
|
+
|
|
54
|
+
## 0.4.8
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [c4bebbb]
|
|
59
|
+
- @checkstack/integration-common@0.8.0
|
|
60
|
+
- @checkstack/script-packages-frontend@0.3.8
|
|
61
|
+
|
|
3
62
|
## 0.4.7
|
|
4
63
|
|
|
5
64
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/automation-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.tsx",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"lint:code": "eslint . --max-warnings 0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@checkstack/auth-common": "0.
|
|
17
|
-
"@checkstack/automation-common": "0.
|
|
18
|
-
"@checkstack/catalog-common": "2.3.
|
|
16
|
+
"@checkstack/auth-common": "0.9.0",
|
|
17
|
+
"@checkstack/automation-common": "0.5.0",
|
|
18
|
+
"@checkstack/catalog-common": "2.3.5",
|
|
19
19
|
"@checkstack/common": "0.15.0",
|
|
20
20
|
"@checkstack/frontend-api": "0.9.0",
|
|
21
|
-
"@checkstack/gitops-frontend": "0.5.
|
|
22
|
-
"@checkstack/integration-common": "0.
|
|
23
|
-
"@checkstack/script-packages-frontend": "0.3.
|
|
21
|
+
"@checkstack/gitops-frontend": "0.5.6",
|
|
22
|
+
"@checkstack/integration-common": "0.9.0",
|
|
23
|
+
"@checkstack/script-packages-frontend": "0.3.9",
|
|
24
24
|
"@checkstack/secrets-frontend": "0.2.5",
|
|
25
25
|
"@checkstack/signal-frontend": "0.2.4",
|
|
26
26
|
"@checkstack/template-engine": "0.4.3",
|
|
@@ -7,9 +7,9 @@ import type { OptionsResolver } from "@checkstack/ui";
|
|
|
7
7
|
* Resolver name for the connection picker itself. Mirrors the
|
|
8
8
|
* `CONNECTION_OPTIONS` constant every integration provider defines
|
|
9
9
|
* (`provider.ts` → `*_RESOLVERS.CONNECTION_OPTIONS`). The bridge resolves
|
|
10
|
-
* this one via `
|
|
11
|
-
* other resolver name via `
|
|
12
|
-
* depend on the chosen `connectionId`).
|
|
10
|
+
* this one via `listConnectionSummaries` (no connection is selected yet) and
|
|
11
|
+
* every other resolver name via `resolveConnectionOptions` (cascading dropdowns
|
|
12
|
+
* that depend on the chosen `connectionId`).
|
|
13
13
|
*/
|
|
14
14
|
const CONNECTION_RESOLVER_NAME = "connectionOptions";
|
|
15
15
|
|
|
@@ -20,8 +20,13 @@ const CONNECTION_RESOLVER_NAME = "connectionOptions";
|
|
|
20
20
|
*
|
|
21
21
|
* Returns a stable, name-agnostic resolver map: the `connectionOptions`
|
|
22
22
|
* resolver lists the provider's connections, and any other resolver name is
|
|
23
|
-
* forwarded to `
|
|
24
|
-
* passing the live form values as `context` for dependent fields.
|
|
23
|
+
* forwarded to `resolveConnectionOptions` for the currently selected
|
|
24
|
+
* connection, passing the live form values as `context` for dependent fields.
|
|
25
|
+
*
|
|
26
|
+
* Both calls are the USER-CALLABLE integration endpoints (`listConnectionSummaries`
|
|
27
|
+
* + `resolveConnectionOptions`), NOT the admin-gated `listConnections` /
|
|
28
|
+
* `getConnectionOptions`: an automation author needs working dropdowns without
|
|
29
|
+
* holding `integration.manage`. They return labels/ids only (no config/secrets).
|
|
25
30
|
*
|
|
26
31
|
* When `connectionProviderId` is undefined (a non-connection action such as
|
|
27
32
|
* Log or Run Script), an empty map is returned so nothing tries to resolve.
|
|
@@ -45,7 +50,7 @@ export function useConnectionOptionResolvers(
|
|
|
45
50
|
|
|
46
51
|
const resolver: OptionsResolver = async (formValues) => {
|
|
47
52
|
if (resolverName === CONNECTION_RESOLVER_NAME) {
|
|
48
|
-
const connections = await client.
|
|
53
|
+
const connections = await client.listConnectionSummaries.call({
|
|
49
54
|
providerId,
|
|
50
55
|
});
|
|
51
56
|
return connections.map((connection) => ({
|
|
@@ -59,7 +64,7 @@ export function useConnectionOptionResolvers(
|
|
|
59
64
|
return [];
|
|
60
65
|
}
|
|
61
66
|
|
|
62
|
-
const options = await client.
|
|
67
|
+
const options = await client.resolveConnectionOptions.call({
|
|
63
68
|
providerId,
|
|
64
69
|
connectionId,
|
|
65
70
|
resolverName,
|