@sanity/workflow-cli 0.24.0 → 0.26.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,52 @@
|
|
|
1
1
|
# @sanity/workflow-cli
|
|
2
2
|
|
|
3
|
+
## 0.26.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @sanity/workflow-engine@0.26.0
|
|
8
|
+
|
|
9
|
+
## 0.25.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 177d600: Deployed workflow environment tags are now discoverable.
|
|
14
|
+
|
|
15
|
+
The engine gains two cross-partition GROQ builders: `deployedTagsGroq()` lists
|
|
16
|
+
every tag holding a deployed definition in a resource, and
|
|
17
|
+
`definitionTagsGroq()` narrows that to one definition name via `$definition`.
|
|
18
|
+
Both deliberately span tag partitions — every other read is tag-scoped, and
|
|
19
|
+
`workflow.query` refuses GROQ that isn't — so they answer "which environments
|
|
20
|
+
exist here" for a caller holding a resource but no tag. They report what is
|
|
21
|
+
_observed_: a tag with nothing deployed does not appear.
|
|
22
|
+
|
|
23
|
+
The stdio MCP server adds a `list_workflow_tags` tool taking a
|
|
24
|
+
`workflow_resource` and no tag. It is registered by the host rather than exported
|
|
25
|
+
as a tool def, because a def is only ever handed an engine and an engine is
|
|
26
|
+
pinned to one tag. `LIST_WORKFLOW_TAGS_TOOL_NAME` and
|
|
27
|
+
`LIST_WORKFLOW_TAGS_DESCRIPTION` are exported so an embedding host registers the
|
|
28
|
+
same capability under the same name without re-authoring the model-facing
|
|
29
|
+
wording. The `tag` parameter's description now points an agent at that tool where
|
|
30
|
+
a server offers it and at the user otherwise, and requires confirmation either
|
|
31
|
+
way — having the list does not license picking from it.
|
|
32
|
+
|
|
33
|
+
Both registration paths share one outcome path, `withToolTelemetry`, so the
|
|
34
|
+
result envelope, error rendering, and the `Editorial Workflows MCP Tool Called`
|
|
35
|
+
event cannot diverge between a def-backed tool and a host-registered one. Tag
|
|
36
|
+
discovery reports its adoption event like every other tool, and because it names
|
|
37
|
+
a resource it can also initialize the stdio server's deferred telemetry shell —
|
|
38
|
+
which matters when discovery is an agent's first call.
|
|
39
|
+
|
|
40
|
+
The CLI's definition-tags probe runs the engine's builder instead of its own
|
|
41
|
+
copy of the query, so its `params` key is `definition` rather than `name`, and
|
|
42
|
+
the tag partitions it names in an ambiguity error arrive sorted from the lake.
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [177d600]
|
|
47
|
+
- Updated dependencies [fc12989]
|
|
48
|
+
- @sanity/workflow-engine@0.25.0
|
|
49
|
+
|
|
3
50
|
## 0.24.0
|
|
4
51
|
|
|
5
52
|
### Minor Changes
|
|
@@ -61,7 +61,7 @@ async function assertSingleTagPartition({ targets, name, }) {
|
|
|
61
61
|
const tags = await target.client.fetch(groq, params, { tag: 'definition.show' });
|
|
62
62
|
if (tags.length > 1) {
|
|
63
63
|
fail(`Definition "${name}" exists in several tag partitions in ` +
|
|
64
|
-
`${resourceLabel(target.resource)} — pass --tag to choose one.`, tags.
|
|
64
|
+
`${resourceLabel(target.resource)} — pass --tag to choose one.`, tags.join('\n'));
|
|
65
65
|
}
|
|
66
66
|
}));
|
|
67
67
|
}
|
|
@@ -10,10 +10,9 @@ export declare function buildDefinitionShowQuery(flags: DefinitionShowQueryArgs)
|
|
|
10
10
|
params: Record<string, unknown>;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* prod operator the dev definition), the same way a cross-dataset hit does.
|
|
13
|
+
* The engine's {@link definitionTagsGroq} in this package's `{groq, params}`
|
|
14
|
+
* calling shape. Refusing an untagged lookup that spans partitions mirrors the
|
|
15
|
+
* cross-dataset rule: ambiguity errors, never picks.
|
|
17
16
|
*/
|
|
18
17
|
export declare function buildDefinitionTagsQuery(name: string): {
|
|
19
18
|
groq: string;
|
package/dist/lib/definitions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WORKFLOW_DEFINITION_TYPE, assertReadableModel, errorMessage, tagScopeFilter, validateDefinition, } from '@sanity/workflow-engine';
|
|
1
|
+
import { WORKFLOW_DEFINITION_TYPE, assertReadableModel, definitionTagsGroq, errorMessage, tagScopeFilter, validateDefinition, } from '@sanity/workflow-engine';
|
|
2
2
|
import { fail } from "./fail.js";
|
|
3
3
|
export function buildDefinitionShowQuery(flags) {
|
|
4
4
|
const params = { name: flags.name };
|
|
@@ -16,8 +16,8 @@ export function buildDefinitionShowQuery(flags) {
|
|
|
16
16
|
}
|
|
17
17
|
export function buildDefinitionTagsQuery(name) {
|
|
18
18
|
return {
|
|
19
|
-
groq:
|
|
20
|
-
params: { name },
|
|
19
|
+
groq: definitionTagsGroq(),
|
|
20
|
+
params: { definition: name },
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
export async function fetchDeployedDefinition({ client, name, tag, version, }) {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/workflow-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Command-line tool for deploying, inspecting, and administering Sanity workflow definitions and instances.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"@types/node": "^24.12.4",
|
|
63
63
|
"oclif": "^4.23.16",
|
|
64
64
|
"vitest": "^4.1.8",
|
|
65
|
-
"@sanity/workflow-engine": "0.
|
|
66
|
-
"@sanity/workflow-
|
|
67
|
-
"@sanity/workflow-
|
|
65
|
+
"@sanity/workflow-engine": "0.26.0",
|
|
66
|
+
"@sanity/workflow-engine-test": "0.26.0",
|
|
67
|
+
"@sanity/workflow-examples": "0.10.5"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@sanity/workflow-engine": "0.
|
|
70
|
+
"@sanity/workflow-engine": "0.26.0"
|
|
71
71
|
},
|
|
72
72
|
"oclif": {
|
|
73
73
|
"bin": "sanity-workflows",
|